Spglib is a library for finding and handling crystal symmetries written in C.
Spglib for python is found at Spglib for python.
Spglib-1.7.4.x. is the stable release.
Spglib-1.9.0 is the latest release. Updates and changes of API and definitions of variables can happen againt previous versions and they are written in the document.
Version history is summarized in ChangeLog.
Python module pyspglib is renamed to spglib in version 1.9.0.
In versions 1.8.x or before, the python wrapper (pyspglib) was considered as a special extention of spglib and separately maintained, but in version 1.9.x and later, it starts to be a part of spglib as a usual extension, and this python wrapper will be maintained to work following every update of c-spglib. The package name is changed from pyspglib to spglib. Following this change, the way to import python spglib module is changed and it is written in Spglib for python.
Unzip, configure, and make:
% tar xvfz spglib-1.7.4.tar.gz % cd spglib-1.7.4 % ./configure % make
Copy the libraries where you want using OpenMP. The libraries may
src/.libs if you don’t
Bottle neck of symmetry operation search may be eased using the OpenMP threading. In the case of gcc (> 4.2), set the following environment variables before running configure script:
% export LIBS='-lgomp' % export CFLAGS='-fopenmp'
Overhead of threading is relatively large when the number of atoms is small. Therefore the threading is activated when the number of atoms >= 1000.
Python module is prepared in the
See the details at Spglib for python.
The ruby script
ruby directory reads a VASP
POSCAR formatted file and finds the space-group type. The
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
Some more options are shown with
ruby symPoscar.rb --help
The way to compile the ruby module is explained in ruby/README.
For questions, bug reports, and comments, please visit following mailing list:
Spglib project acknowledges Yusuke Seto for the Crystallographic database, Dimitar Pashov for the fortran interface, Paweł T. Jochym for python packages.