spglib: Space Group Library
This library is written in C and it handles crystal symmetries. Supported functionality includes
- Find symmetry operations
- Identify space-group type
- Wyckoff position assignment
- Refine crystal structure
- Search irreducible k-points
- Find a primitive cell
So far no single publications have beeen made with this library although other codes use the functionality and may include this library in thier publications.
There are no required packages besides a working C compiler.
If the OpenMP framework is to be used with spglib, the following two export commands need to be entered in the build envoronment:
- export LIBS='-lgomp'
- export CFLAGS='-fopenmp'
1) untar the archive
2) cd spglib-$VERSION
3) ./configure --prefix=$INSTALL_DIR
4) make && make install
To use the spglib you need to include the file 'spglib.h' for function definitions and link the executable statically to libsymspg.a or dynamically to libsymspg.so. Usage examples are included in the tar archive in folder examples.
The ruby code symPoscar.rb in test directory reads a VASP POSCAR formatted file and finds the space-group type. The -l option refines a slightly distorted structure within tolerance spacified with the -s option. The -o option gives the symmetry operations of the input structure.
ruby symPoscar.rb POSCAR -s 0.1 -o -l
How to compile this test is found in the README file.
A Python extension for ASE is prepared in the python/ase directory. See http://spglib.sourceforge.net/pyspglibForASE for more.
Fortran interface spglib_f08.f90 is found in example directory. This fortran interface is the contribution from Dimitar Pashov. The older versions of gfortran may have compilation problem, and may be solved by applying a patch. See http://sourceforge.net/p/spglib/mailman/message/32181136. spglib_f.c is obsolete and is not recommended to use.
For further documentation go to the sourceforge project home page at spglib.sf.net.