spglib for Mac
C library for finding and handling crystal symmetries
spglib — overview
C library for finding and handling crystal symmetries Spglib What does Spglib do? Requirements How to use Spglib How install the python library How to manually compile How to run test How to cite Spglib Contributing Documentation
What does Spglib do?
A crystal structure is given to a spglib function to obtain symmetry information. spg_get_dataset is the function that returns most fruitful space group information. This returns the result in the C-structure SpglibDataset. We don't know the length of symmetry operations to be returned, the memory spaces are allocated dynamically, which means we have to free them. by spg_free_dataset. To tolerate tiny distortion of crystal structure, it has to be specified when calling symmetry search function. The following pages show the details. Crystal structure format Functions Spglib dataset
Requirements C standard: As of version 2.1.0, Spglib explicitly enforces a minimum standard of
How to use Spglib
We currently only officially support conda and pip packaging of spglib, with plans to expand to FedoraProject in the near future. We are looking for additional contributors to package on other linux distributions. For the systems that are not yet officially supported please look at the instructions for manual compilation
The main interface for spglib is the C api, but we also officially support Fortran and Python interfaces. For a minimal example of how to use this library please check the provided examples
How install the python library
Spglib is available on PyPi, so it can be installed as:
Alternatively you can install the conda package that bundles the C and Fortran libraries
This python library will default to the system installed Spglib library detected, specified via LD_LIBRARY_PATH on Linux or DYLD_LIBRARY_PATH on MacOS, otherwise defaulting to a bundled version.
For more details and how to build the python project from source, see the python documentation.
How to manually compile
The minimum configuration, build and install instructions are as follows:
For more details on configuration options and how to link your project check the cmake documentation. A minimal example project using spglib is available at example.
How to run test
The C library tests are incorporated in the CMake projects and enabled by default. To execute these tests, run the following command with the appropriate path to the build directory
Additionally, there are python tests that cover more use-cases. See the README in the python folder for more details
How to cite Spglib
If you use spglib in your research, please consider citing the following work: Atsushi Togo, Kohei Shinohara and Isao Tanaka, Spglib: a software library for crystal symmetry search, Sci. Technol. Adv. Mater., Meth. 4, 2384822-2384836 (2024) (open access)
Details
用于查找和处理晶体对称性的 C 库
How to install spglib
- Open Terminal (press ⌘ + Space and type “Terminal”).
- If Homebrew is not installed yet, run the command below first.
- Run this command:
Latest 10 releases
Last updated 2026-10-14; current version v2.8.0, with the latest 10 releases listed.
| Version | Released | Type | Size | macOS | Windows | Linux |
|---|---|---|---|---|---|---|
| v2.8.0 | 2026-10-14 | Stable | — | — | — | — |
| v2.7.0 | 2025-12-29 | Stable | — | — | — | — |
| v2.6.0 | 2025-03-10 | Stable | — | — | — | — |
| v2.5.0 | 2024-07-11 | Stable | — | — | — | — |
| v2.4.0 | 2024-04-11 | Stable | — | — | — | — |
| v2.3.1 | 2024-02-11 | Stable | — | — | — | — |
| v2.3.0 | 2024-01-27 | Stable | — | — | — | — |
| v2.2.0 | 2023-12-08 | Stable | — | — | — | — |
| v2.1.0 | 2023-09-10 | Stable | — | — | — | — |
| v1.11.2.1 | 2019-01-16 | Stable | — | — | — | — |
Data from GitHub Releases; stable releases first, each group sorted newest first.
Compared with similar apps
Only public metadata is compared, with no subjective recommendation; see the compare pages for field-by-field comparisons.
| App | Version | License | Architecture | 30-day installs |
|---|---|---|---|---|
| spglib | v2.8.0 | BSD-3-Clause | CLI | 18 |
| shuttle-cli | v0.25.2 | Apache-2.0 | CLI | 19 |
| libetpan | 1.10.1 | BSD-3-Clause | CLI | 24 |
| breseq | v0.40.3 | GPL-2.0-or-later AND MIT AND BSD-3-Clause | CLI | 24 |
Similar apps: Command-line Tools
shuttle-cli
A CLI for handling shared build and deploy tools between many projects no matter what…libetpan
Portable mail library handling several protocolsbreseq
Computational pipeline for finding mutations in short-read DNA resequencing datapolkit
polkit is a toolkit for defining and handling authorizations.libxkbfile
libxkbfile is a set of routines within the X.Org system responsible for handling XKB keyboard…openssl@4
Cryptography and SSL/TLS ToolkitCategories: Command-line Tools