Utility for symmetry information of crystal structures
'syminfo' is a command-line utility to obtain symmetry information from crystal structures. Specifically, 'syminfo' can do the following:
- Find all space group operations
- Find symmetry equivalent atoms in the unit cell
- Find reduced basis
Warning: This code is largely untested. Determination of symmetry operations is believed to be reliable. Other functionality should be thoroughly tested!
Compiling the code should be as simple as
make
The code is completely self-contained and does not depend on libraries. The only requirement is a Fortran 90 compiler. The Intel compiler (ifort) has been used for testing.
Compilation produces a self-contained executable in the main folder. Copy 'syminfo' to a location on your path (e.g., $HOME/bin). That should be it.
syminfo reads crystal structure information from stdin
and prints symmetry information to stdout
. The simplest call sequence
syminfo < my_structure.str
will read the crystal structure defined in my_structure.str
and output all symmetry operations.
A number of command line parameters are available for other behaviour.
syminfo - Determine pointgroup, spacegroup, and reduced cell information
usage: syminfo [-p] [-r] [-v] [-h] [-2d] [-a spacegroup.dat] [-m spacegroup.dat] < structure
Options:
-h Display help message
-v Display version
-pg Output point-group
-p Output transformation matrix to primitive cell
-r Output coordinates of reduced basis
-a Applies the spacegroup in file spacegroup.dat to the
supplied structure
-m Matrix of symmetry equivalent coordinates under
the given spacegroup
-2d 2D mode; ignores symmetry in z-direction
apart from mirror-plane in x-y
-cart Use cartesian reference frame. Usually, space group
operations operate on direct coordinates according to
p' = P*p + t. With this switch, the space group is
referencing the cartesian frame. This is achieved via
the transformations P->C*P*C^-1 and t->C*t.
-cartin Use cartesian frame for input
-cartout Use cartesian frame for outout
The expected format is similar to the POSCAR file format used by VASP (the Vienna Ab Initio Simulation Package). The example below describes Iron, a FCC crystal:
3.0000000E+00 0.0000000E+00 0.0000000E+00
0.0000000E+00 3.0000000E+00 0.0000000E+00
0.0000000E+00 0.0000000E+00 3.0000000E+00
4
0.0000000E+00 0.0000000E+00 0.0000000E+00 Fe 0.00
0.5000000E+00 0.5000000E+00 0.0000000E+00 Fe 0.00
0.0000000E+00 0.5000000E+00 0.5000000E+00 Fe 0.00
0.5000000E+00 0.0000000E+00 0.5000000E+00 Fe 0.00
The input file consists of three sections:
- The first three lines give the lattice vectors a,b, and c in the cartesian reference frame
- A single line contained the total number of atoms. Note: that is different from the POSCAR format, which expects the number of atoms per type.
- Specification of atomic coordinates. Each row defines one atom with the first three numbers specifying the position in direct coordinates (i.e., as fractions of the lattice vectors), followed by the element and the nominal charge (or spin).
All space group operations are returned as default. The outout for an FCC structure starts like:
192
0.000000000E+00 0.000000000E+00 -0.100000000E+01
0.000000000E+00 0.000000000E+00 -0.100000000E+01
0.000000000E+00 -0.100000000E+01 0.000000000E+00
--------------------------------------------------------
0.000000000E+00 0.000000000E+00 0.000000000E+00
0.000000000E+00 0.000000000E+00 -0.100000000E+01
0.000000000E+00 0.000000000E+00 -0.100000000E+01
0.000000000E+00 -0.100000000E+01 0.000000000E+00
--------------------------------------------------------
0.500000000E+01 0.500000000E+01 0.000000000E+00
...
The first line prints the number of space group operations. There are 48x4=192 operations, because each of the 48 point group operations can be combined with a translation between atoms in the cubic unit cell (see definition of space group 227). The rest of the output consists of blocks of symmetry operations W. Each symmetry operation
consists of a 3x3 rotation matrix R and a translation t below a line. The translation vector is printed in direct coordinates. An empty line separates operations.
Using the -m <spacegroup_operators.sym>
switch will find all symmetry equivalent atoms under the set of space group operations defined in the file spacegroup_operators.sym
(see above for the format). The returned square matrix has the dimensions of the number of atom, which is printed in the first line, and contains a T
if two atoms are equivalent. Otherwise, a F
designates symmetry distinct pairs. Atom order is the same as in the input file.
For example,
syminfo -m example/fcc.sym < example/fcc.str
will produce a 4x4 matrix, indicating that all atoms are symmetry equivalent.
4
T T T T
T T T T
T T T T
T T T T
The -r
command-line argument produces a structure file (using the input format) that contains only symmetry inequivalent coordinates followed by all symmetry operations (see output format above).
syminfo -r < example/fcc.str
will produce
0.3000000E+01 0.0000000E+00 0.0000000E+00
0.0000000E+00 0.3000000E+01 0.0000000E+00
0.0000000E+00 0.0000000E+00 0.3000000E+01
1
0.0000000E+00 0.0000000E+00 0.0000000E+00 Fe 0.00
192
0.000000000E+00 0.000000000E+00 -0.100000000E+01
0.000000000E+00 -0.100000000E+01 0.000000000E+00
-0.100000000E+01 0.000000000E+00 0.000000000E+00
--------------------------------------------------------
0.000000000E+00 0.000000000E+00 0.000000000E+00
0.000000000E+00 0.000000000E+00 -0.100000000E+01
0.000000000E+00 -0.100000000E+01 0.000000000E+00
-0.100000000E+01 0.000000000E+00 0.000000000E+00
--------------------------------------------------------
0.000000000E+00 0.500000000E+00 0.500000000E+00
...
This is the inverse of the -r
switch and finds all atomic positions within the unit cell from a list of symmetry inequivalent positions.i
The -p
switch finds a suitable primitive cell and returns the transformation matrix T such that the lattice vectors (written as a 3x3 matrix L) transform according to
Coordinates and translations transform according to
Rotation matrices of the symmetry operations transform according to
Note: The number of space group operations in a primitive cell can be reduced, because the new lattice vectors might conicide with some of the translation operations in a non-primitive cell.