Expand description
§molrs
Unified façade for the molrs molecular simulation toolkit.
This crate re-exports the molrs workspace crates under a single namespace. Downstream users add one dependency and opt into sub-systems via features:
molcrafts-molrs = { version = "0.0.11", features = ["io", "smiles"] }Then:
ⓘ
use molrs::Frame; // from molrs-core
use molrs::io::read_xyz; // feature = "io"
use molrs::smiles::parse; // feature = "smiles"§Features
io— file I/O (PDB, XYZ, LAMMPS, CHGCAR, Cube, Zarr)compute— trajectory analysis (RDF, MSD, clustering, tensors)smiles— SMILES parserff— force fields (MMFF94, PME, typifier)embed— 3D coordinate generationfull— everything above
Core flags forwarded to molrs-core: rayon, zarr, filesystem, blas.
§Molecular packing
The Packmol port lives in the standalone molcrafts-molpack crate
(https://github.com/MolCrafts/molpack); add it as a separate dependency
when needed.
Modules§
- atomistic
- All-atom molecular graph with element-level semantics.
- block
- Block: dict-like keyed arrays with consistent axis-0 length and heterogeneous types.
- coarsegrain
- Coarse-grained molecular graph.
- data
- Embedded data files shipped with molrs-core.
- element
- Element data and basic lookup utilities.
- error
- Unified error types for the molrs library.
- field
- Field observables for MolRec-style continuous physical quantities.
- frame
- Frame: a dictionary mapping string keys to heterogeneous
Blocks. - frame_
access - Unified access trait for owned and borrowed frame types.
- frame_
view - Zero-copy borrowed view of a
Frame. - gasteiger
- Gasteiger-Marsili (1980) iterative electronegativity equalization.
- grid
- Uniform spatial grid storing multiple named scalar arrays.
- hydrogens
- Hydrogen addition for molecular graphs.
- mapping
- AA ↔ CG mapping: coarsen and backmap between
AtomisticandCoarseGrainmolecular graphs. - math
- Small linear algebra helpers with optional BLAS-backed implementation.
- molgraph
- Dynamic molecular graph for editing-oriented CRUD operations.
- molrec
- Backend-agnostic MolRec logical model.
- neighbors
- Neighbor-list algorithms for pairwise distance queries.
- region
- Region module exports
- rings
- Ring detection for molecular graphs.
- rotatable
- Rotatable bond detection and downstream atom BFS.
- stereo
- Stereochemistry support for molecular graphs.
- topology
- Graph-based molecular topology using petgraph.
- types
- Common numeric and geometry type aliases used across the crate.
Structs§
- Atom
- A dynamic property bag representing an atom (or bead).
- AtomId
- Stable handle to an atom in a
MolGraph. - Atomistic
- All-atom molecular graph.
- Block
- A dictionary from string keys to ndarray arrays with a consistent axis-0 length.
- Bond
- A bond between two atoms.
- BondId
- Stable handle to a bond in a
MolGraph. - CGMapping
- AA ↔ CG mapping definition.
- Coarse
Grain - Coarse-grained molecular graph.
- Frame
- A dictionary from string keys to
Blocks. - Frame
View - A borrowed, read-only view of a
Frame. - Gasteiger
Charges - Computed Gasteiger partial charges for one heavy atom.
- Grid
- A collection of named scalar arrays on a shared uniform spatial grid.
- MolGraph
- A dynamic molecular graph supporting ergonomic CRUD for atoms, bonds, angles, and dihedrals.
- MolRec
- Single logical MolRec object.
- Observable
Record - Named observable with semantic metadata.
- Ring
Info - All ring information for a
MolGraph, produced byfind_rings. - Topology
- Graph-based molecular topology.
- Topology
Ring Info - Ring information from SSSR detection on a
Topologygraph. - Trajectory
- Trajectory-like list of frame states plus shared indexing arrays.
- Uniform
Grid Field - Uniform real-space grid samples of a scalar field.
Enums§
- Bond
Stereo - Double-bond stereochemistry.
- Element
- Chemical element with complete periodic table (elements 1-118)
- MolRs
Error - Main error type for the molrs library.
- Observable
Data - Raw observable payload.
- Observable
Kind - Observable kind aligned with the MolRec metadata contract.
- Prop
Value - Heterogeneous property value stored in an
Atom. - Tetrahedral
Stereo - Tetrahedral stereochemistry at an atom.
- Weight
Scheme - How bead positions are computed from constituent atoms.
Traits§
- Frame
Access - Unified read-only access for
FrameandFrameView.
Functions§
- add_
hydrogens - Return a new
MolGraphwith explicit hydrogen atoms added to every heavy atom that has unfilled valence. - assign_
bond_ stereo_ from_ 3d - Infer E/Z stereochemistry for every double bond from 3-D coordinates.
- assign_
stereo_ from_ 3d - Infer tetrahedral chirality for every potential stereocentre from 3-D coordinates.
- chiral_
volume - Compute the signed scalar triple product (chiral volume) at
center. - compute_
gasteiger_ charges - Compute Gasteiger-Marsili (1980) partial charges for every heavy atom in
mol. - find_
chiral_ centers - Return the atom IDs that are potential tetrahedral stereocentres: atoms with exactly 4 distinct neighbour atom IDs.
- find_
rings - Compute the ring information (SSSR / minimum cycle basis) for
mol. - implicit_
h_ count - Compute the number of hydrogens to add to
atom_id. - remove_
hydrogens - Return a new
MolGraphwith all terminal explicit hydrogen atoms removed.
Type Aliases§
- Bead
- Alias for coarse-grained usage — same type, different prop keys by convention.
- Schema
Value - Hierarchical schema node used by
meta,method, andparameters.