Registry / ai-ml / moyopy

moyopy

JSON →
library0.12.0pypypi✓ verified 83d ago

moyopy is a Python binding for the moyo library, a fast and robust crystal symmetry finder written in Rust. It provides functionalities for crystallographic analysis, including space group determination and primitive cell finding. The library is actively maintained, with a current version of 0.7.9, and requires Python 3.10 or newer. New releases appear with an active cadence.

pip install moyopy
INSTALL
IMPORT
SIG · MOYOPY
M
moyopy
ai-mlpythonv0.12.0
Install
15.7s avg
Import
Disk
635MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.9.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.940 runs
build_error
glibc
py 3.103.940 runs
installs and imports cleanly · install 15.7s · import 0.000s · 594MB
635MB installed
● package 635MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MoyoDataset
from moyopy import MoyoDataset
from moyopy import get_symmetry_dataset

This quickstart demonstrates how to define a simple crystal structure and use `moyopy.get_symmetry_dataset` to obtain its symmetry properties, including the space group number, international symbol, and Hall symbol. The structure is provided as a tuple `(lattice, positions, numbers)`.

import numpy as np from moyopy import get_symmetry_dataset # Define crystal structure (lattice, positions, numbers) # Example: Diamond cubic silicon lattice = np.array([ [0, 2.735, 2.735], [2.735, 0, 2.735], [2.735, 2.735, 0] ]) positions = np.array([ [0.0, 0.0, 0.0], [0.25, 0.25, 0.25] ]) numbers = [14, 14] # Atomic numbers for Si cell = (lattice, positions, numbers) symprec = 1e-5 # Symmetry precision in Angstrom angle_tolerance = 1.0 # Angle tolerance in degrees dataset = get_symmetry_dataset(cell, symprec=symprec, angle_tolerance=angle_tolerance) print(f"Space group number: {dataset['number']}") print(f"International symbol: {dataset['international']}") print(f"Hall symbol: {dataset['hall']}") # print(f"Rotations: {dataset['rotations']}") # print(f"Translations: {dataset['translations']}")
Debug
Known issues
breakingmoyopy versions 0.6.1 and later dropped support for Python 3.9. Users on Python 3.9 must upgrade their Python environment to 3.10 or newer.
fix
Upgrade Python to 3.10 or a later supported version (e.g., `pyenv install 3.10.10`, `conda install python=3.10`).
affects: >=0.6.1
breakingThe default setting for crystal standardization in moyo-core (which moyopy binds to) changed to International Tables for Crystallography (ITA) standard. This may affect the output of standardized cells compared to previous versions.
fix
Review your code for any assumptions about the standardization output. If specific standardization behavior is required, consult moyopy documentation for available flags or methods to control standardization.
affects: >=0.6.1
gotchaThere can be differences in lattice vector ordering between the underlying Rust moyo-core and its Python bindings (moyopy), which may lead to discrepancies in `prim_std_cell.basis` results compared to other symmetry libraries like spglib. This often necessitates additional explicit ordering constraints for consistent results in downstream applications.
fix
If relying on `prim_std_cell.basis` or comparing results with `spglib`, implement explicit checks or re-ordering of lattice vectors. Consider applying constraints like a < b < c for cell parameters if needed for a specific standardization convention.
affects: All versions
Upgrade
Version history
0.12.0latest on PyPI · released Jun 13, 2026
Audit
Dependencies
typing-extensionsrequiredRequired for type hints and compatibility.
pymatgenoptionalOptional dependency for converting structures to Pymatgen objects or utilizing Pymatgen's symmetry analysis methods that can leverage moyopy as a backend.
aseoptionalOptional dependency for converting structures to ASE objects.
Agent activity
4 hits · last 30 days
node
4
Resources
moyopy — pip install moyopy · libregistry