PyXtal
Random symmetry-respecting crystal generation for structure prediction.
Tool 069 of 100 in the MolForge directory of open-source tools. Every fact below was read from the repository's host on 2026-11-28.

What PyXtal is
PyXtal is a Python library for generating crystal structures that obey a chosen symmetry. Given a space group, the atoms or molecules and how many of each, it picks compatible Wyckoff positions, the sets of symmetry-equivalent sites in a space group, and places the species so that the result has exactly the requested symmetry. It handles three-dimensional crystals, layer and rod groups, point-group clusters and molecular crystals, where rigid molecules are oriented to match the site symmetry of their Wyckoff position.
The main use is seeding crystal structure prediction: random symmetric structures are better starting points than uniformly random ones because real crystals are symmetric. Structures convert to pymatgen or ASE objects for relaxation with any calculator, and PyXtal reads existing structures to analyse their symmetry and Wyckoff assignments. Further tools cover subgroup and supergroup relations between structures, simulated powder diffraction patterns and a global optimisation module for molecular crystal structure prediction.
PyXtal generates and analyses; it does not evaluate energies, so every structure must be relaxed and ranked by an external method.
Features
- Random structure generation for any space, layer, rod or point group
- Molecular crystals with rigid molecules placed on compatible Wyckoff sites
- Symmetry analysis and Wyckoff assignment of existing structures
- Subgroup and supergroup relations between structures
- Simulated powder X-ray diffraction patterns for generated structures
- Conversion to pymatgen and ASE objects
- Global optimisation workflows for molecular crystal structure prediction
What it is for
- Generate symmetric starting structures for crystal structure prediction
- Build candidate molecular crystal packings for a given molecule
- Determine the Wyckoff positions occupied in a known structure
- Trace a phase transition through a group-subgroup relation
Verified facts
| Family | Materials science: structures and properties |
|---|---|
| Language or basis | Python |
| Repository | https://github.com/MaterSim/PyXtal (GitHub) |
| Licence | MIT (SPDX identifier as declared in the repository) |
| Main language on GitHub | Python |
| Last commit | 2026-10-26 |
| Latest release | v1.1.5 (2026-09-09) |
| Stars | 396 on 2026-11-28 |
| Open issues and pull requests | 10 on 2026-11-28 |
| Repository created | 2018-04-05 |
| Verified | 2026-11-28 by MolForge's checking script, against the host's API |
Where PyXtal fits
Analyse and generate crystal structures, then derive phonons, transport and other properties.
Questions people ask
- What input does PyXtal need to generate a crystal?
- The dimensionality, a space group by number or symbol, a list of species and the count of each per cell. For molecular crystals the species are molecules given as SMILES, XYZ files or names from its built-in set. Cell volume and minimum distances have defaults that can be overridden.
- How is PyXtal different from XtalOpt?
- XtalOpt is a complete structure-prediction program that generates, relaxes and evolves populations through external codes. PyXtal is a library focused on the generation and symmetry-analysis step, leaving relaxation and search strategy to the user's own scripts or to other packages that import it. The two can be combined.
- Can PyXtal handle molecular crystals?
- Yes. It treats molecules as rigid bodies, determines each molecule's point-group symmetry and places them only on Wyckoff positions whose site symmetry is compatible, choosing orientations accordingly. A dedicated module runs global optimisation for molecular crystal structure prediction using external force fields or calculators.
- Does PyXtal compute energies?
- No. It produces structures and symmetry information. To rank candidates you convert them to ASE or pymatgen objects and relax them with a DFT code, a classical force field or a machine-learned potential of your choice.
- Is PyXtal open source?
- Yes. The repository declares the MIT licence (SPDX identifier read from the host on 2026-11-28). Read the licence text in the repository before redistributing or embedding it.
- Where is the PyXtal source code?
- At https://github.com/MaterSim/PyXtal (GitHub). This is the address the host reported on the day of verification; renamed repositories are followed to their new home.
- Is PyXtal still maintained?
- The last commit was pushed on 2026-10-26 and the latest tagged release is v1.1.5 from 2026-09-09; the repository had 10 open issues and pull requests on 2026-11-28.
- Does MolForge use PyXtal?
- No. MolForge runs nine of the hundred tools in this directory (RDKit, OpenMM, AutoDock Vina, Open Babel, MDTraj, pymbar and NGL, plus PySCF and xTB in MFsig); PyXtal is listed because of its place in materials science: structures and properties, not because we run it.
Our comments on PyXtal
MolForge does not run PyXtal in production. This page is a verified pointer, not a review: the facts above come from the repository on the date shown, the description is ours, and we make no claim about accuracy or speed that we have not measured. If you maintain PyXtal and something here is wrong or out of date, write to hello@molforge.ai and we will correct the source file.
Test status
Not tested by MolForge. To check PyXtal yourself: clone the repository, follow the installation section of its README, and run the test suite the project ships before trusting a result; the last-commit date and the open issue count above tell you how alive the project is.