Materials
Build materials from chemical formulas, inspect fractions, mix, and export XML.
Nucleide models a material as a map from canonical nuclide identifiers to masses. From that compact representation it can derive atom fractions, weight fractions, and serializations used by transport codes.
From a chemical formula
The formula parser understands element symbols, parentheses, and hydrates. For
example, H2O expands to natural hydrogen and natural oxygen using AME2020
masses and natural abundances.
Loading Nucleide WASM…
Browse the Materials Compendium
The full DOE/PNNL Materials Compendium — hundreds of named materials with
isotope-level weight fractions — is fetched as JSON and parsed in your browser
by Nucleide’s WASM build, using the same MaterialsCompendium API available
in Python. Pick a material to inspect its composition.
Loading Nucleide WASM…
Atom vs. weight fractions
For a material with stored masses :
where is the atomic mass of nuclide . The demo above computes both and plots them as grouped horizontal bars.
Mixing materials
Material::mix_by_mass combines materials using relative mass weights. The
fractions do not need to sum to one; they are normalized internally.
XML export
The to_xml(name, density) method produces an OpenMC-style material XML
fragment, including the canonical nuclide list, densities, and mass fractions.
See also
- Tutorial: Build materials
- Theory: Nuclear data
- Crate docs:
crates/material/src/lib.rs