pyxtal
Python code for generation of crystal structures based on symmetry constraints.
What it is and what it does
PyXtal is a Python library for designing crystal structures under symmetry constraints and analyzing their properties. It lets you generate atomic and molecular crystals by specifying symmetry group, stoichiometry, and Wyckoff positions, then export them to standard formats (cif, etc.) or pass them to external tools. The package handles structure manipulation via subgroup/supergroup symmetry relations, includes built-in and external geometry optimization, and provides X-ray diffraction analysis.
The library sits on top of established materials-science dependencies: spglib for symmetry operations, pymatgen and ASE for structure I/O and manipulation, scipy and networkx for numerical and graph operations. It is actively maintained, has no compiled dependencies in the base install, and is widely used in materials discovery workflows—particularly for high-throughput screening and ferroelectric materials design.
Use it for:
- Generate candidate crystal structures for a given space group and composition to seed high-throughput computational screening.
- Analyze and manipulate crystal symmetry relationships (subgroup/supergroup transitions) for phase-transition studies.
- Export structures in multiple formats (cif, POSCAR, etc.) for downstream simulation with external codes.
- Compute X-ray diffraction patterns for experimental validation or structure identification.
- Design molecular crystal packings with specified Wyckoff positions for organic materials research.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PyXtal generates crystal structures with specified symmetry constraints and analyzes their properties, supporting atomic and molecular crystals in multiple dimensions with X-ray diffraction analysis and structure manipulation via symmetry relations.
Yes. PyXtal is actively maintained, has no security vulnerabilities, uses a permissive MIT license, and sits in the top tier by download volume. Install friction is low. It is the right choice if you need to generate or manipulate crystal structures under symmetry constraints; if you only need to read/write existing structures, other tools may suffice.
Install
pyxtal on PyPI
pip
pip install pyxtaluv
uv add pyxtalpoetry
poetry add pyxtalInstalling pyxtal
Before you install
Low friction: pure Python wheel with no compiled dependencies. Active maintenance—last commit 80 days ago with 384 GitHub stars. Requires Python 3.9+. Runtime depends on established scientific libraries (pymatgen, scipy, networkx, ase, spglib).
License in practice
MIT license (permissive): you may use, modify, and distribute PyXtal freely in commercial and private projects, with minimal restrictions beyond attribution.
Quickstart
pip install pyxtal
from pyxtal import Crystal
# Generate a crystal with specified space group and stoichiometry
crystal = Crystal.from_random(3, 'Pm-3m', ['Na', 'Cl'], [1, 1])
print(crystal)
Requires Python 3.9 or later. Optional Julia integration (pyxtal.lego) requires INSTALL_JULIA=1 environment variable at install time.
Verify before relying
- Whether the optional Julia integration (pyxtal.lego module) is required for typical workflows or only for specialized use cases.
- Performance characteristics when generating large structures or working with high-dimensional symmetry spaces.
- Whether all exported formats (cif, etc.) round-trip correctly through pymatgen and ASE integration.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 11 — spglib, pymatgen, pandas, networkx, ase, scipy, vasprun-xml, importlib_metadata, typing-extensions, pyocse, psutil |
| Maintenance | actively maintained — 80 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 569,401/month — #5,962 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyxtal-1.1.4-py3-none-any.whl
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
symfcSymfc computes force constants from atomic…
unclear · top 15,000 on PyPI
moyopyMoyopy is a Python binding for Moyo, a crystal…
permissive · top 15,000 on PyPI
spglibspglib provides Python bindings to a C library…
permissive · top 5,000 on PyPI
seekpathSeeK-path generates optimal k-point band paths…
permissive · top 15,000 on PyPI
pyocseAutomates simulation workflows for organic…
permissive · top 15,000 on PyPI
pymatgen-corepymatgen-core provides core data structures and…
permissive · top 15,000 on PyPI
periodictableProvides a periodic table of the elements with…
permissive · top 15,000 on PyPI
aseASE provides Python tools for setting up,…
copyleft · top 5,000 on PyPI
xraydbXrayDB provides a Python interface to a SQLite…
permissive · top 15,000 on PyPI
chgnetCHGNet is a pretrained graph neural network…
permissive · top 15,000 on PyPI