--- id: spglib version: "2.7.0" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # spglib — This is the spglib module. License: permissive · Maintenance: active · Downloads: 1.4M/mo ## What it is and what it does spglib is a Python interface to a C library for crystallographic symmetry analysis. It identifies space groups, finds symmetry operations, and handles crystal structure symmetries—core tasks in materials science, solid-state physics, and computational chemistry. The package wraps a compiled C backend and depends on numpy, importlib-resources, and typing-extensions. It is intended for researchers and engineers working with crystal structures who need to programmatically detect and manipulate symmetries. The bindings can use either a bundled Spglib library or link to a system-installed version via LD_LIBRARY_PATH or DYLD_LIBRARY_PATH, offering flexibility in environments with pre-existing Spglib installations. Use it for: - Identify the space group and symmetry operations of a crystal structure from lattice and atomic positions - Reduce a crystal structure to its primitive cell using symmetry information - Generate equivalent atomic positions under space group symmetry operations - Validate crystal structure symmetry in materials discovery or high-throughput screening workflows - Integrate symmetry analysis into computational materials science pipelines ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. spglib provides Python bindings to a C library for identifying and manipulating crystal symmetries and space groups in crystallographic structures. Yes, if you work with crystallographic data. spglib is actively maintained, carries no known vulnerabilities, supports modern Python versions (3.9–3.14), and is widely used in materials science. Medium install friction is typical for compiled bindings and poses no barrier on standard platforms. The BSD-3-Clause license is permissive. ## Install pip install spglib uv add spglib poetry add spglib ## Installing spglib Before you install: Medium install friction due to compiled C bindings, but well-supported across Python 3.9–3.14 and major platforms (macOS, Windows, Linux). Active maintenance with recent commits and no known vulnerabilities. Requires numpy pre-installation. License in practice: BSD-3-Clause permissive license allows commercial and private use with minimal restrictions; attribution required. Quickstart: pip install spglib import spglib spglib.get_spacegroup((lattice, positions, numbers)) numpy must be installed before spglib; C bindings require compatible platform wheels or a system Spglib library. Verify before relying: - Exact API surface and available symmetry operations beyond space group detection - Performance characteristics for large crystal structures - Whether bundled vs. system Spglib library choice affects behavior or performance ## Package facts - License: BSD-3-Clause (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 1.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags crystal symmetry detection, space group identification, crystallographic symmetry analysis, crystal structure symmetry, spacegroup finder, symmetry operations crystal, crystallography symmetry tools, crystallography, materials-science, symmetry-analysis [View on SkillFed](https://skillfed.io/packages/spglib) · [View on PyPI](https://pypi.org/project/spglib/)