☰ Menu
CLI Open source 18 installs/mo

spglib for Mac

spglib

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

  1. Open Terminal (press ⌘ + Space and type “Terminal”).
  2. If Homebrew is not installed yet, run the command below first.
  3. Run this command:

Latest 10 releases

Last updated 2026-10-14; current version v2.8.0, with the latest 10 releases listed.

VersionReleasedTypeSizemacOSWindowsLinux
v2.8.02026-10-14Stable————
v2.7.02025-12-29Stable————
v2.6.02025-03-10Stable————
v2.5.02024-07-11Stable————
v2.4.02024-04-11Stable————
v2.3.12024-02-11Stable————
v2.3.02024-01-27Stable————
v2.2.02023-12-08Stable————
v2.1.02023-09-10Stable————
v1.11.2.12019-01-16Stable————

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.

Compared with similar apps
AppVersionLicenseArchitecture30-day installs
spglibv2.8.0BSD-3-ClauseCLI18
shuttle-cliv0.25.2Apache-2.0CLI19
libetpan1.10.1BSD-3-ClauseCLI24
breseqv0.40.3GPL-2.0-or-later AND MIT AND BSD-3-ClauseCLI24

Similar apps: Command-line Tools

Leave a comment

评论表单加载中…