Expand description
§molrs
A Rust library providing core molecular modeling functionality.
§Module layout
store— columnar data containers (Block,Frame,MolRec, keys)system— molecular representations (Atomistic,MolGraph,Topology, elements)chem— chemical perception (aromaticity, charges, rings, stereo, SMARTS)spatial— regions, neighbor lists, geometrymath,units— numerical and unit-system foundations
§Examples
§Element lookup
use molrs_core::Element;
// Look up elements by atomic number
let hydrogen = Element::by_number(1).unwrap();
assert_eq!(hydrogen.symbol(), "H");
// Or by symbol (case-insensitive)
let h = Element::by_symbol("h").unwrap();
assert_eq!(h.name(), "Hydrogen");§Packing
Molecular packing (Packmol port) lives in the standalone
molcrafts-molpack crate.
Re-exports§
pub use chem::aromaticity::perceive_aromaticity;pub use chem::gasteiger::GasteigerCharges;pub use chem::gasteiger::compute_gasteiger_charges;pub use chem::hydrogens::add_hydrogens;pub use chem::hydrogens::implicit_h_count;pub use chem::hydrogens::remove_hydrogens;pub use chem::rings::RingInfo;pub use chem::rings::find_rings;pub use chem::smarts::SmartsPattern;pub use chem::stereo::BondStereo;pub use chem::stereo::TetrahedralStereo;pub use chem::stereo::assign_bond_stereo_from_3d;pub use chem::stereo::assign_stereo_from_3d;pub use chem::stereo::chiral_volume;pub use chem::stereo::find_chiral_centers;pub use error::MolRsError;pub use store::block::Block;pub use store::frame::Frame;pub use store::frame_access::FrameAccess;pub use store::frame_view::FrameView;pub use store::molrec::MolRec;pub use store::molrec::ObservableData;pub use store::molrec::ObservableKind;pub use store::molrec::ObservableRecord;pub use store::molrec::SchemaValue;pub use store::molrec::Trajectory;pub use system::atomistic::AngleId;pub use system::atomistic::AtomId;pub use system::atomistic::Atomistic;pub use system::atomistic::Bond;pub use system::atomistic::BondId;pub use system::atomistic::DihedralId;pub use system::atomistic::ImproperId;pub use system::coarsegrain::CoarseGrain;pub use system::element::Element;pub use system::mapping::CGMapping;pub use system::mapping::WeightScheme;pub use system::molgraph::Atom;pub use system::molgraph::Bead;pub use system::molgraph::KindId;pub use system::molgraph::MolGraph;pub use system::molgraph::NodeId;pub use system::molgraph::PropValue;pub use system::molgraph::Relation;pub use system::topology::Topology;pub use system::topology::TopologyRingInfo;pub use units::Dimension;pub use units::Quantity;pub use units::Unit;pub use units::UnitDef;pub use units::UnitRegistry;pub use units::UnitsError;
Modules§
- chem
- Chemical perception algorithms operating on molecular graphs: aromaticity, Gasteiger charges, hydrogen handling, ring detection, stereochemistry, rotatable bonds, and SMARTS matching.
- data
- Embedded data files shipped with molrs-core.
- error
- Unified error types for the molrs library.
- math
- Small linear algebra helpers with optional BLAS-backed implementation.
- spatial
- Spatial primitives: simulation regions (
SimBox), neighbor-list algorithms, and geometric utilities. - store
- Columnar data containers:
Blockcolumn store,Framehierarchical container, trajectory persistence (MolRec), and canonical column keys. - system
- Molecular system representations: atomistic and coarse-grained entities,
topology, the
MolGraphmolecular graph, element data, and CG mapping. - types
- Common numeric and geometry type aliases used across the crate.
- units
- Pint-inspired unit system: dimensions, units, registry, parser, quantities.