Skip to main content

This is the spglib module.

Project description

Python bindings for C library for finding and handling crystal symmetries

Installation

The package is developed on GitHub. You can get the source for the released versions from the repository.

Note that the Python bindings will link to the system/environment installed Spglib (loaded from LD_LIBRARY_PATH or DYLD_LIBRARY_PATH), and it will default to a bundled version otherwise. To always use the system version of Spglib (e.g. in a lua-module environment) delete the bundled libraries libsymspg.so* in the python Spglib installation directory.

Using package distribution service

The easiest way to install python-spglib is to use the pypi package, for which numpy is required to be installed before the installation. A command to install spglib is:

$ pip install spglib

Conda is another choice:

$ conda install -c conda-forge spglib

These packages are made by Pawel T. Jochym.

Building from source

To build from source, make sure you have installed the build requirements in pyproject.toml. Then simply run the following in the root directory.

$ python -m build
$ pip install .

To include testing or documentation environments, simply include the relevant extras

$ pip install .[test]

Running tests

After installing the project with appropriate extras (testing), either from package manager or from source, simply run pytest in the current directory to test the python bindings

$ pytest

Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spglib-2.3.1.tar.gz (2.8 MB view hashes)

Uploaded source

Built Distributions

spglib-2.3.1-cp311-cp311-win_amd64.whl (304.0 kB view hashes)

Uploaded cp311

spglib-2.3.1-cp311-cp311-macosx_10_9_x86_64.whl (794.1 kB view hashes)

Uploaded cp311

spglib-2.3.1-cp310-cp310-win_amd64.whl (304.0 kB view hashes)

Uploaded cp310

spglib-2.3.1-cp310-cp310-macosx_10_9_x86_64.whl (794.1 kB view hashes)

Uploaded cp310

spglib-2.3.1-cp39-cp39-win_amd64.whl (304.0 kB view hashes)

Uploaded cp39

spglib-2.3.1-cp39-cp39-macosx_10_9_x86_64.whl (794.0 kB view hashes)

Uploaded cp39

spglib-2.3.1-cp38-cp38-win_amd64.whl (304.0 kB view hashes)

Uploaded cp38

spglib-2.3.1-cp38-cp38-macosx_10_9_x86_64.whl (794.1 kB view hashes)

Uploaded cp38

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page