Skip to main content

Module material

Module material 

Source
Expand description

Materials: elements combined by atom or mass fraction, with a mass density, a derived atom number density, and per-element displacement (E_d), lattice binding (E_b) and surface binding (E_s) energies.

§Conventions (read this before trusting a default)

  • Fractions passed in are relative weights: they are normalised by dividing by their sum, so stoichiometric counts (Si 1, O 2) are valid. The sum must be finite and strictly positive and every entry finite and non-negative; otherwise construction fails. Normalisation is exact division, with no tolerance window.
  • E_d, E_b, E_s are model parameters, not measured properties of your sample. Defaults come from crate::elements and are conventions with citations there: E_s defaults to the elemental cohesive (sublimation) energy where one is tabulated; E_d defaults to the ASTM E521 convention value where one is recorded; E_b defaults to 0 eV, the common choice for amorphous-target binary-collision runs. Where there is no default (None) the getter returns MaterialError::EnergyNotSet so the user has to decide. Energies are stored in eV (suffix _ev); see crate::units.
  • Elements keep the order they were given in, so every output derived from a material is deterministic.
  • Atom number density follows n_i = x_i * rho * N_A / sum_j(x_j * M_j) with x the atom fractions, rho the mass density and M the atomic weights (CODATA 2022 N_A).

Structs§

Component
One element within a material.
ElementSpec
Serialized form of one element entry. Give exactly one of symbol / z and exactly one of atom_fraction / mass_fraction; every element of a material must use the same fraction kind.
Material
A material: a list of elements, a mass density and per-element energies.
MaterialSpec
Serialized form of a Material (what the CLI’s TOML describes).

Enums§

EnergyKind
Which per-element energy a message is about.
MaterialError
Errors from building or querying a Material.