Expand description
chematic-crystal — periodic (crystal) structure representation and
geometry for the chematic ecosystem.
This crate is a pure structural/geometric foundation: Lattice,
fractional/Cartesian coordinates, PeriodicSite/PeriodicStructure,
periodic-boundary-condition displacement and distance, periodic neighbor
enumeration, and diagonal supercells. It is deliberately not an
extension of chematic_core::Molecule – see the crate README and
docs/rfcs/chematic_crystal_foundation.md for why a periodic crystal
and a molecular bond graph are kept as distinct first-class types.
§Scope
No symmetry (space groups, Wyckoff positions, Niggli reduction), no CIF
parser, no XRD, no DFT, no materials-property prediction. See
docs/crystal_scope.md for the full non-goal list.
§Design principles
- Pure Rust,
#![forbid(unsafe_code)], zero required dependencies beyondchematic-core(optionalserde). - Compiles to
wasm32-unknown-unknownwithout modification. - Public constructors reject
NaN/Infinityrather than propagate them. - Deterministic output ordering everywhere (no float-keyed sorts).
Re-exports§
pub use error::CrystalError;pub use fingerprint::FingerprintError;pub use fingerprint::FingerprintLimits;pub use fingerprint::GeometryFingerprint;pub use fingerprint::geometry_fingerprint;pub use lattice::Lattice;pub use neighbor::PeriodicNeighbor;pub use periodic::PeriodicDisplacement;pub use periodic::minimum_image;pub use poscar::PoscarDocument;pub use poscar::PoscarError;pub use poscar::PredictorCorrector;pub use poscar::parse_contcar;pub use poscar::parse_poscar;pub use poscar::write_poscar;pub use site::CartesianCoord;pub use site::FractionalCoord;pub use site::Occupancy;pub use site::PeriodicSite;pub use site::SiteSpecies;pub use structure::CompositionSummary;pub use structure::PeriodicStructure;
Modules§
- error
- Error type for
chematic-crystal. - fingerprint
- Experimental, deterministic geometry fingerprint for caller-supplied structures. This is not symmetry detection, polymorph identification, or a retrieval score.
- lattice
Lattice: a validated 3x3 lattice matrix + cached inverse.- neighbor
- Cutoff-radius periodic neighbor enumeration.
- periodic
- Exact periodic-boundary displacement and minimum-image distance.
- poscar
- POSCAR / CONTCAR (VASP structure file format) read/write.
- site
- Coordinate newtypes, occupancy, and the periodic site type.
- structure
PeriodicStructure: aLatticeplus itsPeriodicSites.- supercell
- Diagonal supercell generation.
- validation
- Shared, crate-internal validation helpers.