Skip to content

spglib/moyo

Repository files navigation

moyo

image moyo at crates.io image

A fast and robust crystal symmetry finder, written in Rust.

Several times faster symmetry detection than Spglib for Materials Project dataset

Interfaces

Each interface has its own README with installation, usage, and development instructions:

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, and UnimodularTransformation. C exposes Cell, magnetic cells, Operations, and MagneticOperations; WASM exposes only Cell and (implicitly) Operations via the dataset output. UnimodularTransformation is 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, and WyckoffPosition classes are not bound (their content is reachable as strings through the entry and group-type lookups); the settings, Hall symbol entries, group types, and operations_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 🟑 because integral_normalizer is not bound; PointGroup, SpaceGroup, LayerGroup, and MagneticSpaceGroup are all exposed.
  • The Fortran interface mirrors the C column one-to-one (it wraps the complete moyoc API).

How to cite moyo and its interfaces

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.

Dev

cargo install cargo-release cargo-edit cargo-deny cargo-semver-checks

How to release

Prerequisites: cargo install cargo-release cargo-edit cargo-deny cargo-semver-checks

  1. cargo semver-checks to lint a new release
  2. cargo set-version --bump patch for patch version increment
  3. Write change log and create a pull request
  4. After merging the pull request, run cargo release --execute (If you already release the package in crates.io, run cargo release --execute --no-publish)
    • This automatically creates a git tag and pushes it to Remote, and triggers GitHub Actions to publish the packages.

Debugging

RUST_LOG=debug cargo test -- --nocapture

Acknowledgments

We thank Dr. Yusuke Seto for providing the crystallographic database. We thank Dr. Juan RodrΓ­guez-Carvajal for providing the magnetic space-group database.

About

Library for Crystal Symmetry in Rust

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

 
 
 

Contributors