xtalforge
A pure Rust library for building, manipulating, analysing and exporting crystal structures, with a CLI, Python bindings and WebAssembly bindings developed at parity with the Rust API.
Status:
1.5.1published on 2026-11-13. Phases 0-11 are complete and the Phase 12 binding work shipped in1.5.0; Tasks 12.1.4 (progress and cancellation), 12.3.5 (optional threads) and 12.4.1 (tutorial, playground and benchmark) remain open. The public API is frozen; later changes follow the SemVer policy indocs/api/stability.md.1.5.0added the object-oriented Python and WASM APIs, NumPy/typed arrays, typed result classes, batch helpers and the typed TypeScript interface;1.5.1is the icon and package-metadata patch. The known reference gaps are listed indocs/roadmap/index.md. The plan is indocs/roadmap; the project rules are inAGENTS.md.
What works today
- Crystal structures: elements, lattices, sites, P1 expansion, supercells, slabs, transforms, periodic neighbours, bond graphs, rings and measures.
- Symmetry: space-group detection, Wyckoff positions, standard and primitive cells, lattice reduction, subgroups, layer and magnetic groups, molecular point groups, Brillouin zones and band paths.
- Formats and editing: CIF, POSCAR, XYZ, pymatgen JSON, CSSR, GEN, LAMMPS, SHELX and PDB; atomic writes, project archives, undo/redo documents, selections, workspace runs and scene data.
- Force fields and thermodynamics: native UFF/UFF4MOF, QEq/EQeq/EEQ charges, Ewald, FIRE/L-BFGS, scans, Gamma-point vibrations, IR, thermochemistry and quasi-harmonic free energies.
- MOF platform: checker and solvent removal, deconstruction into nodes and linkers, RCSR topology, MOFid/MOFkey, open metal sites, native pore descriptors, UFF/EQeq-TraPPE adsorption, Widom/GCMC, PSM, defects, interpenetration, CoRE MOF/QMOF readers and screening.
- Core crystal features: structure matching and RMSD, strain and rattle, site editing and interpolation, Voronoi and coordination environments, bond-valence sums and oxidation states, RDF and fingerprints, unique Miller indices, slab terminations, Wulff shapes, adsorption sites, point defects, orderings and SQS, interfaces, elastic tensors, EOS fits and convex hulls.
- Analysis and builders: PXRD, porosity, isosurfaces, nets, RCSR matching, graphene, nanotubes, fullerenes, SMILES embedding, polymers, MOF assembly and powder refinement.
- Agent layer: session verbs, diagnostics, change bursts, SVG/PNG pictures, MCP over stdio and skill documents; open extension registries.
- Machine learning: the Python ASE bridge for MACE, ORB-v3 and MatterSim, with a checksum-verified model cache.
- Four surfaces at parity, with documented exceptions for the filesystem,
subprocesses and threads in WASM. See
docs/api/parity.md.
Install
Install the current release:
Goals
- Everything the headless core of Crystal-Builder does: symmetry-aware structure editing, file formats, force fields and optimizers, PXRD, porosity, topology, builders (molecules, carbons, polymers, MOFs) and powder refinement.
- Symmetry through moyo.
- Proven code reused from sci-form.
- Four surfaces at parity: Rust (
xtalforgecrate), CLI (xtalforgebinary), Python (xtalforgeon PyPI), WebAssembly (xtalforge-wasmon npm). - Documentation site built with VitePress (
docs/).
Working on the project
&& &&
See docs/guide/contributing.md for the full
checklist and the roadmap workflow.
License
Licensed under either of
- Apache License, Version 2.0 (
LICENSE-APACHE) - MIT license (
LICENSE-MIT)
at your option. Third-party code and data: THIRD_PARTY.md.