spglib

This is the spglib module.

108 个版本 Python >=3.9
安装
pip install spglib
poetry add spglib
pipenv install spglib
conda install spglib
描述

spglib

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 <https://github.com/spglib/spglib/releases>__.

Note that the Python bindings will link to the system/environment installed Spglib (loaded from :code:LD_LIBRARY_PATH or :code: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 :code: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:

.. code-block:: console

    $ pip install spglib

Conda is another choice:

.. code-block:: console

    $ 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 :code:`pyproject.toml`. Then simply run the following in the root directory.

.. code-block:: console

    $ python -m build
    $ pip install .

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

.. code-block:: console

    $ pip install .[test]

Running tests
~~~~~~~~~~~~~

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

.. code-block:: console

    $ pytest
版本列表
2.7.0 2025-12-29
2.6.0 2025-03-10
2.5.0 2024-07-11
2.4.0 2024-04-11
2.3.1 2024-02-11
2.3.0 2024-01-27
2.2.0 2023-12-08
2.1.0 2023-09-10
2.0.2 2022-11-06
2.0.1 2022-08-31
2.0.0 2022-08-17
1.16.5 2022-05-06
1.16.4 2022-05-05
1.16.3 2021-12-08
1.16.2 2021-08-10
1.16.1 2021-01-29
1.16.0 2020-07-30
1.15.1 2020-04-28
1.15.0 2020-04-18
1.14.1.post0 2019-07-30
1.14.0.post23 2019-07-30
1.14.0.post0 2019-07-30
1.13.0.post6 2019-07-02
1.13.0.post5 2019-07-02
1.13.0.post4 2019-07-02
1.13.0.post3 2019-07-02
1.13.0.post2 2019-07-02
1.13.0.post1 2019-07-02
1.13.0.post0 2019-07-02
1.12.2.post0 2019-02-06
1.12.1.post7 2019-02-01
1.12.1.post0 2019-01-30
1.12.0.post5 2019-01-29
1.12.0.post3 2019-01-29
1.11.2.post1 2018-12-07
1.11.2.post0 2018-12-07
1.11.1.post3 2018-11-12
1.11.0.post19 2018-11-08
1.11.0.post18 2018-11-08
1.10.4.11 2018-08-10
1.10.4.7 2018-08-07
1.10.4.1 2018-08-01
1.10.4 2018-08-01
1.10.3.75 2018-07-14
1.10.3.65 2018-04-20
1.10.3.62 2018-04-19
1.10.3.56 2018-04-18
1.10.3.54 2018-04-16
1.10.3.52 2018-04-16
1.10.3.50 2018-03-29
1.10.3.43 2018-03-21
1.10.3.41 2018-03-21
1.10.3.39 2018-02-23
1.10.3.33 2018-02-23
1.10.3.23 2018-02-22
1.10.3.20 2018-02-22
1.10.3.14 2018-01-29
1.10.3.12 2018-01-29
1.10.3.5 2018-01-18
1.10.3 2018-01-13
1.10.2.4 2017-12-13
1.10.2 2017-12-13
1.10.1.4 2017-11-07
1.10.1 2017-10-27
1.10.0.2 2017-10-22
1.10.0.1 2017-10-22
1.10.0 2017-10-22
1.9.10.1 2017-10-02
1.9.10 2017-10-02
1.9.9.121 2017-09-28
1.9.9.116 2017-09-22
1.9.9.44 2017-05-15
1.9.9.38 2017-03-25
1.9.9.29 2017-03-19
1.9.9.25 2017-03-16
1.9.9.18 2016-12-20
1.9.9.15 2016-12-19
1.9.9.11 2016-12-15
1.9.9.5 2016-12-15
1.9.9 2016-12-14
1.9.8.20 2016-11-25
1.9.8.15 2016-11-07
1.9.8.11 2016-11-03
1.9.8.9 2016-11-03
1.9.8.7 2016-11-02
1.9.8 2016-11-01
1.9.7.17 2016-10-29
1.9.7.9 2016-10-24
1.9.7.1 2016-10-19
1.9.7 2016-10-19
1.9.6 2016-10-17
1.9.5 2016-09-15
1.9.4.4 2016-07-28
1.9.4.3 2016-07-28
1.9.4.2 2016-05-13
1.9.3.4 2016-05-12
1.9.3.1 2016-05-11
1.9.3 2016-05-11
1.9.2.13 2016-05-11
1.9.0.54 2016-03-07
1.9.0.53 2016-03-07
1.9.0.52 2016-03-06
1.9.0.5 2015-12-22
1.6.0.3 2014-05-20
1.6.0.2 2014-05-20
1.6.0.1 2014-05-20
1.6.0 2014-05-20