use-molecule
Small molecular identity primitives for RustUse chemistry crates.
use-molecule represents molecules as discrete chemical entities with a name,
formula, optional explicit atoms, optional simple atom connections, formal
charge, and lightweight classification labels. It stays structural and avoids
simulation, force fields, orbital theory, reaction modeling, file formats,
external data fetching, and molecule databases.
What this crate provides
| Item | Purpose |
|---|---|
Molecule |
Named molecular entity with formula and metadata |
MoleculeBuilder |
Builder for optional atom-level molecule assembly |
MoleculeName |
Validated molecule name |
MolecularFormula |
Molecule-facing formula wrapper |
MolecularAtom |
Explicit atom entry |
MolecularAtomId |
Optional validated atom identifier |
AtomIndex |
Zero-based explicit atom index |
AtomLabel |
Validated atom element-label shape |
AtomCount |
Explicit atom count wrapper |
AtomConnection |
Simple index-to-index atom connection |
MoleculeCharge |
Formal molecule charge |
MoleculeKind |
Lightweight classification label |
MoleculeValidationError |
Structured construction and validation errors |
Installation
[]
= "0.1.0"
Quick Examples
Create a simple molecule
use ChemicalFormula;
use ;
#
Build a molecule with explicit atoms
use ;
#
Scope
- Represents molecule identity, names, formulas, atoms, connections, charge, and kind labels.
- Uses
use-chemical-formulafor formula primitives and atom label shape validation. - Validates that molecule names, atom identifiers, atom labels, and connection indices are structurally usable.
- Keeps atom connections as simple index pairs with an optional order.
- No molecular geometry.
- No force fields.
- No orbital theory or quantum chemistry.
- No reactions or stoichiometry.
- No molar mass calculation.
- No SMILES, InChI, MOL, SDF, PDB, or other external chemical file formats.
- No runtime network access or hardcoded molecule database.
Relationship to use-chemistry
use-molecule is a focused child crate for molecular identity primitives. The
use-chemistry umbrella crate reexports it alongside compound, formula,
element, isotope, periodic-table, atomic-number, atomic-mass, and electron-shell
helpers.