In spglib, I implemented a function to access symmetry operations of
’conventional’ unit cell using the index of hall symbol. It’s up to
the Avogadro development strategy if Avogadro uses this function or
not. Avogadro may wait for the fix in openbabel.
The code is found at
The function is as follows:
/* Space-group operations in built-in database are accessed by index /
/ of hall symbol. The index is defined as number from 1 to 530. /
/ The muximum number of symmetry operations is 192. */
int spg_get_symmetry_from_database(int rotations,
const int hall_number);
I think there is no definition of index number of hall symbol. So the
hall_number used in spglib is considered as just a local definition.
If you prepare (graphical) user interface, the hall_number should be
generated from a space group type with its setting of axes and origin.
On Fri, Aug 22, 2014 at 12:53 AM, Defusco III, Albert A
[email protected] wrote:
Yes, I meant non-primitive translation. For now I would prefer to retrieve this information from Spglib to avoid replication errors. I can have Avogadro translate a Hall symbol to the Hall number used in spg_database.c.
Dealing with International symbols and non-primitive unit cells could be troublesome, but I could always just force the user to choose an origin.
On Aug 20, 2014, at 7:57 PM, Atsushi Togo [email protected] wrote:
If you mean origin_shift as non primitive translation part of space
group operations, I can understand what you wrote. I can extend spglib
so that the database is accessed from the API. The other option is
just to hard code the database in Avogadro’s crystallography extension
itself. It may be a matter of strategy. If Avogadro may have a chance
to use other crystal symmetry libraries in the future, it may be
better the later option.
On Thu, Aug 21, 2014 at 6:06 AM, Defusco III, Albert A [email protected] wrote:
Good afternoon everyone,
I am working on getting porting the crystallography extension and space group support into Avogadro 2. What is missing from Avogadro 2 is a look-up of rotation matrices and origin shift vectors for a given space group. Do you believe it is possible to extend Sgplib so that I can get these quantities when specifying just the space group (either Hall symbol/number or international symbol/number)?
Here’s what I’ve done so far
I have added support for rotation matrices and origin shift vectors in Avogado2’s UnitCell class and added a fillUnitCell method to crystaltools.cpp. A filled unit cell can then be given the the Spglib routines for further action. (The rotation matrices and origin shift vectors are only available if read from a cml file where they have been specified in child nodes of .)
Once a filled unit cell is generated all AvoSpglib/Spglib routines are nearly unchanged when ported into Avogadro2.
Here’s an example of what I mean.
int numRotations = get_rotation(int HallNumber,
HallNumber is read as input and rotation and origin_shift are populated on output.The length of the rotation and origin_shift arrays is numRotations.
Using the space group “F 4d 2 3 -1d” (#525) there are 192 rotation matrices and origin shift vectors.
Albert DeFusco, Ph.D.
Research Assistant Professor
Technical Director, Center for Simulation and Modeling
University of Pittsburgh
Pittsburgh, PA 15260