use-stoichiometry
Small stoichiometry primitives for RustUse chemistry crates.
use-stoichiometry represents stoichiometric coefficients, formula terms,
mole ratios, reaction-side entries, reagent labels, and simple yield values. It
stays structural and intentionally avoids equation balancing, product
inference, reaction kinetics, thermochemistry, equilibrium calculations,
electrochemistry, lab automation, and reaction databases.
What this crate provides
| Item | Purpose |
|---|---|
StoichiometricCoefficient |
Nonzero stoichiometric coefficient |
StoichiometricTerm |
Coefficient plus formula |
StoichiometricRatio |
Coefficient ratio |
MoleRatio |
Mole-ratio wrapper |
ReactionSide |
Reactant or product side label |
ReactionEntry |
Formula entry on one reaction side |
ReactantEntry |
Reactant-side entry wrapper |
ProductEntry |
Product-side entry wrapper |
FormulaQuantity |
Formula plus stoichiometric coefficient |
LimitingReagent |
Validated limiting-reagent label |
ExcessReagent |
Validated excess-reagent label |
TheoreticalYield |
Positive finite theoretical yield value |
ActualYield |
Nonnegative finite actual yield value |
PercentYield |
Nonnegative finite percent yield value |
StoichiometryValidationError |
Structured construction and validation error |
Installation
[]
= "0.1.0"
Quick Examples
Create a reaction entry
use ChemicalFormula;
use ;
#
Create a mole ratio
use ;
#
Calculate percent yield
use PercentYield;
#
Scope
- Represents stoichiometric coefficients, formula terms, mole ratios, reaction-side labels, formula quantities, limiting-reagent labels, excess-reagent labels, theoretical yield values, actual yield values, percent yield values, and stable display formatting.
- Uses
use-chemical-formulafor formula primitives and parsing examples. - Keeps all chemistry knowledge caller-provided. Callers choose formulas, coefficients, sides, labels, and yield values.
- No chemical equation balancing.
- No product inference from reactants.
- No reaction kinetics.
- No thermochemistry.
- No equilibrium calculations.
- No electrochemistry.
- No unit-heavy mass/mole conversion.
- No hardcoded reaction database.
- No runtime network access or external chemistry data.
- No lab automation toolkit behavior.
Relationship to use-chemistry
use-stoichiometry is a focused child crate for stoichiometry primitives. The
use-chemistry umbrella crate reexports it alongside formula, compound,
molecule, ion, oxidation-state, bond, element, isotope, periodic-table,
atomic-number, atomic-mass, and electron-shell helpers.