Skip to main content

Module input

Module input 

Source
Expand description

The run description: one TOML document describing the beam, the layered target and its materials, the physics choices and the run size.

The same types are serialized back into the output metadata (summary.json), so a result carries the input that produced it. Every table uses deny_unknown_fields, so a misspelt key is an error naming the key rather than a silently ignored setting. Defaults are filled in on parsing, so the echoed input shows every choice explicitly.

The schema is documented with an example in docs/cli.md. In short:

[beam]
ion = "B"              # element symbol; mass_amu optional
energy_ev = 5000.0
tilt_deg = 7.0          # polar angle from the surface normal

[target]
substrate = "Si"        # a name from [materials], or an element symbol

[physics]
primary_cutoff_ev = 5.0
recoil_cutoff_ev = 2.0
[physics.energies.Si]
e_d_ev = 15.0

[run]
ions = 1000
seed = 1

Input::resolve validates the whole description and turns it into the engine’s types (Resolved); Resolved::models lists every model in use with its citation, for the output metadata.

An electron run is described by a different document, with an [electron] table and the same [materials] and [target]; its schema is electron.

Modules§

electron
The electron run description: one TOML document whose [electron] table describes the beam, the transport choices, the elastic and inelastic models, the per-material electron data and the tallies, next to the same [materials] and [target] tables as an ion run.

Structs§

BeamSpec
[beam]: species, energy and direction.
CrystalSpec
[[crystal]]: one cubic crystal filling some stack layers; every layer not named stays amorphous. Several entries may describe different crystals in different layers.
CrystalThermalSpec
thermal of a [[crystal]]: Debye-model vibration of the lattice atoms (crate::ion::bca::Thermal). Absent: a static, perfect lattice.
DynamicSpec
[dynamic]: a fluence-dependent target. The run’s ions are delivered in steps; after each step the target composition is updated from the transport events (module docs of crate::ion::dynamic).
EnergyOverride
Per-element energy overrides, eV.
Input
The whole run description.
LayerSpec
One finite layer, front to back.
LoadedStoppingTable
A user stopping table after loading, with what a run record needs to identify the exact file.
ModelInfo
One model in use, for the output metadata.
PhysicsSpec
[physics]: model choices, cutoffs and energy overrides.
Resolved
A validated input, in the engine’s types.
ResolvedCrystal
One crystal assignment after resolution.
ResolvedLayer
One target layer after resolution.
RunSpec
[run]: history count, seed and threads.
StoppingSpec
[stopping]: user-supplied electronic stopping tables.
TallySpec
[tally]: what the run records.
TargetSpec
[target]: finite layers front to back, then an optional semi-infinite substrate. At least one of the two must be given.
TunedEnergy
One component’s tuning, as applied.
TuningReport
What a tuning set did to a run; present in Resolved only when enabled.
TuningSet
A named, immutable, versioned set of phenomenological surface-binding energy multipliers (the pilot of the opt-in “experiment-tuned” mode).
VoxelTallySpec
[tally.voxel]: the regular grid of the voxel tally (crate::tally::VoxelTallyGrid). x is the depth; the beam is along +x from y = z = 0. Voxel i owns `[origin + i * spacing, origin + (i +

Enums§

CrystalPreset
Cubic lattice preset of a [[crystal]] assignment. Each maps to a cited preset of crate::ion::crystal::Lattice (sources and lattice constants: docs/crystal-orientation.md, docs/data-provenance.md).
DivergenceSpec
[beam.divergence]: the beam’s angular spread about its nominal direction, angles in degrees. Selected by model:
FreePathChoice
Free-path convention.
InputError
Errors from reading or validating an Input.
LengthChoice
Screening length choice.
MaterialRef
A material given by name or inline.
PotentialChoice
Screening function choice.
RelaxationChoice
Volume-relaxation convention of a dynamic run (crate::ion::dynamic::Relaxation).
StoppingChoice
Electronic stopping choice.

Constants§

ES_SPUTTER_AR_V1
es-sputter-ar-v1: one E_s multiplier per element for Ar sputtering of Si, Cu, Ag and Au, fitted by validation/experiments/run.py --fit-tuning to measured yields only (the sets in validation/data/sputtering/, each cited to its original publication in docs/data-provenance.md), with a held-out evaluation in validation/experiments/tuning_results.json.
MAX_DIVERGENCE_DEG
Largest accepted divergence width, degrees (Gaussian sigma_deg or cone half_angle_deg). The Gaussian law is a small-angle reading (plane angles), and the inward conditioning is documented for small spreads; a bound of 10 degrees is a front-end limit, not a physical constant.
NO_TUNING
The tuning value that leaves the physics untouched.
TABLE_SPEC
Scattering-table grid used for every run: per_decade points per decade of reduced energy and impact parameter. Angles outside the energy range fall back to direct quadrature in the engine; impact parameters above beta_max give no deflection (the constant-free-path p_max is about 20 screening lengths or less for solid densities). The measured interpolation error is reported in the output metadata.
TUNING_SETS
The sets that ship with the engine. Each has a reproducible fit record and a held-out evaluation (docs/data-provenance.md, “Tuning factor sets”).

Functions§

stopping_model
The electronic stopping model for a choice. For StoppingChoice::EquipartitionLsOr the engine does not use this model (it carries its own Lindhard-Scharff/Oen-Robinson mix); Lindhard-Scharff is returned so the validity range can still be checked. For StoppingChoice::None it is NoStopping, whose validity range is unbounded, so no out-of-range warning is raised.