skillfed

pyxtal

Python code for generation of crystal structures based on symmetry constraints.

pyxtal v1.1.4 569.4K downloads/30d#5,962 on PyPI384
Permissive license MIT Active released

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 pyxtal

uv

uv add pyxtal

poetry

poetry add pyxtal

Installing 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

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

crystal structure generation symmetryatomic crystal buildermolecular crystal designwyckoff position generationx-ray diffraction analysiscrystal symmetry analysismaterial structure design
materials-sciencecrystallographysymmetry-analysis

More Scientific/Engineering packages