A fast and robust crystal symmetry finder, written in Rust.
Several times faster symmetry detection than Spglib for Materials Project datasetEach interface has its own README with installation, usage, and development instructions:
- Rust (
moyo): core implementation (crates.io, docs) - Python (
moyopy): Python binding (PyPI, docs) - C (
moyoc): C binding, built and consumed with CMake (docs) - Fortran: Fortran interface on top of
the C binding (optional
moyo::moyofCMake target) - JavaScript (
moyo-wasm): JavaScript and WebAssembly binding (npm) - Web viewer: browse the 230 space groups, 80 layer
groups, and 1651 magnetic space groups at https://spglib.github.io/moyo/
(static SPA powered by
moyo-wasm)
The functionality categories below mirror the sections of the moyopy API reference.
Legend: ✅ supported · 🟡 partial · ❌ not exposed · ➖ not applicable.
| Category | Functionality | Rust (moyo) |
Python (moyopy) |
C (moyoc) |
JS/WASM (moyo-wasm) |
|---|---|---|---|---|---|
| Shared | Core types | ✅ | ✅ | 🟡 | 🟡 |
| Space group | Dataset from cell | ✅ | ✅ | ✅ | ✅ |
| Space group | Data access | ✅ | ✅ | 🟡 | 🟡 |
| Space group | Group identification | ✅ | ✅ | 🟡 | ❌ |
| Layer group | Dataset from cell | ✅ | ✅ | ✅ | ❌ |
| Layer group | Data access | ✅ | ✅ | 🟡 | 🟡 |
| Layer group | Group identification | ✅ | ✅ | ✅ | ❌ |
| Magnetic space group | Dataset from cell | ✅ | ✅ | ✅ | ❌ |
| Magnetic space group | Data access | ✅ | ✅ | ✅ | 🟡 |
| Magnetic space group | Group identification | ✅ | ✅ | ✅ | ❌ |
Notes:
- Core types are
Cell,Operations, andUnimodularTransformation. C exposesCell, magnetic cells,Operations, andMagneticOperations; WASM exposes onlyCelland (implicitly)Operationsvia the dataset output.UnimodularTransformationis not bound in either. - "Dataset from cell" is the main symmetry-analysis entry point
(
MoyoDataset,MoyoLayerDataset,MoyoCollinearMagneticDataset,MoyoNonCollinearMagneticDataset). - "Data access" covers classification tables and lookup helpers (e.g.
Setting,Centering,HallSymbolEntry,SpaceGroupType,ArithmeticCrystalClass,operations_from_number,LayerSetting,LayerCentering,LayerHallSymbolEntry,LayerGroupType,LayerArithmeticCrystalClass,operations_from_layer_number,MagneticSpaceGroupType,magnetic_operations_from_uni_number). - C's "Data access" is 🟡 because the standalone
Centering,ArithmeticCrystalClass, andWyckoffPositionclasses are not bound (their content is reachable as strings through the entry and group-type lookups); the settings, Hall symbol entries, group types, andoperations_from_*generators are all exposed. - "Group identification" recovers a group label from a primitive list of
symmetry operations (
PointGroup+SpaceGroup+integral_normalizer,LayerGroup,MagneticSpaceGroup). C's space-group row is 🟡 becauseintegral_normalizeris not bound;PointGroup,SpaceGroup,LayerGroup, andMagneticSpaceGroupare all exposed. - The Fortran interface mirrors the C column one-to-one (it wraps the complete moyoc API).
If you use moyo or its interfaces in your work, please cite the following figshare entry.
@misc{moyo,
author = {Kohei Shinohara},
title = {{moyo: A fast and robust crystal symmetry finder, written in Rust}},
year = {2026},
month = {1},
doi = {10.6084/m9.figshare.31081162.v1},
url = {https://figshare.com/articles/software/moyo_A_fast_and_robust_crystal_symmetry_finder_written_in_Rust_/31081162},
note = {Source code available at \url{https://github.com/spglib/moyo}}
}
This citation may be superseded by a peer-reviewed publication in the future.
cargo install cargo-release cargo-edit cargo-deny cargo-semver-checksPrerequisites: cargo install cargo-release cargo-edit cargo-deny cargo-semver-checks
cargo semver-checksto lint a new releasecargo set-version --bump patchfor patch version increment- Write change log and create a pull request
- After merging the pull request, run
cargo release --execute(If you already release the package in crates.io, runcargo release --execute --no-publish)- This automatically creates a git tag and pushes it to Remote, and triggers GitHub Actions to publish the packages.
RUST_LOG=debug cargo test -- --nocaptureWe thank Dr. Yusuke Seto for providing the crystallographic database. We thank Dr. Juan Rodríguez-Carvajal for providing the magnetic space-group database.