use-compound
Small chemical compound identity primitives for RustUse chemistry crates.
use-compound represents named chemical substances composed from formulas and
lightweight descriptors. It is intentionally structural: no compound database,
no naming engine, no reactions, no molecular geometry, no bonding model, and no
runtime data fetching.
What this crate provides
| Item | Purpose |
|---|---|
Compound |
Named compound with formula and descriptors |
CompoundName |
Validated primary compound name |
CommonName |
Optional validated common name |
SystematicName |
Optional validated systematic name |
CompoundFormula |
Compound-facing formula wrapper |
EmpiricalFormula |
Empirical formula wrapper |
MolecularFormula |
Molecular formula wrapper |
CompoundKind |
Lightweight classification label |
CompoundIdentifier |
Optional registry identifier |
CompoundRegistry |
Registry namespace for identifiers |
CompoundValidationError |
Structured construction and validation errors |
Installation
[]
= "0.1.0"
Quick Examples
Create a simple compound
use ChemicalFormula;
use ;
#
Add names and identifiers
use ChemicalFormula;
use ;
#
Scope
- Represents compound identity, names, formulas, kind labels, and identifiers.
- Uses
use-chemical-formulafor formula primitives. - Validates that names and identifier values are not empty.
- Keeps registry identifiers as lightweight wrappers only.
- No hardcoded compound database.
- No CAS checksum validation, PubChem lookup, InChI parsing, or SMILES parsing.
- No molecular geometry, bonding models, reactions, stoichiometry, molar mass, pH, solutions, thermochemistry, or simulation.
- No naming engine.
Relationship to use-chemistry
use-compound is a focused child crate for compound identity primitives. The
use-chemistry umbrella crate reexports it alongside formula, element,
isotope, periodic-table, atomic-number, atomic-mass, and electron-shell helpers.