msg-byu / symlib

Spacegroup finder. Includes symmetry-related routines for cluster expansion and other codes that rely on symmetries of lattices and crystals.
MIT License
12 stars 15 forks source link

symlib

Symmetry-related routines for cluster expansion and other codes that rely on symmetries of lattices and crystals. This code was started by GLWH in 1997 with help from Harold Stokes (Mr. Isotropy, see iso.byu.edu). It now includes a number of numerical and combinatorial routines that have been useful in developing UNCLE (the UNiversal CLuster Expansion code). The enum project also relies on this library.

Some key algorithms found in symlib include:

Compiling symlib

symlib ships with a Makefile in the src/ directory. Although it has several rules for different use cases, for a quickstart, just type:

cd src/
make F90=[gfortran|ifort]

This will generate libraries libutils.a libsym.a libcomparestructs.a librational.a libcombinatorics.a. For API references on these libraries (which have to still be generated using fortpy), check out the wiki page.

Running the Unit Tests

symlib is ~10% unit tested. Tests can be run using fortpy. We recommend using a virtualenv to run all the unit tests.

pip install fortpy
cd symlib
runtests.py src/

This will compile a series of drivers to test the symlib codes in a directory at staging/. Any errors or warnings generated will be redirected to stdout.

Troubleshooting

So far, no one has ever had any problems installing and using this code :D.

Code sources

The files src/classes.f90 and src/itertools.f90 were taken from the Polya respository.