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 = 1Input::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§
- Beam
Spec [beam]: species, energy and direction.- Crystal
Spec [[crystal]]: one cubic crystal filling some stack layers; every layer not named stays amorphous. Several entries may describe different crystals in different layers.- Crystal
Thermal Spec thermalof a[[crystal]]: Debye-model vibration of the lattice atoms (crate::ion::bca::Thermal). Absent: a static, perfect lattice.- Dynamic
Spec [dynamic]: a fluence-dependent target. The run’sionsare delivered in steps; after each step the target composition is updated from the transport events (module docs ofcrate::ion::dynamic).- Energy
Override - Per-element energy overrides, eV.
- Input
- The whole run description.
- Layer
Spec - One finite layer, front to back.
- Loaded
Stopping Table - A user stopping table after loading, with what a run record needs to identify the exact file.
- Model
Info - One model in use, for the output metadata.
- Physics
Spec [physics]: model choices, cutoffs and energy overrides.- Resolved
- A validated input, in the engine’s types.
- Resolved
Crystal - One crystal assignment after resolution.
- Resolved
Layer - One target layer after resolution.
- RunSpec
[run]: history count, seed and threads.- Stopping
Spec [stopping]: user-supplied electronic stopping tables.- Tally
Spec [tally]: what the run records.- Target
Spec [target]: finite layers front to back, then an optional semi-infinite substrate. At least one of the two must be given.- Tuned
Energy - One component’s tuning, as applied.
- Tuning
Report - What a tuning set did to a run; present in
Resolvedonly when enabled. - Tuning
Set - A named, immutable, versioned set of phenomenological surface-binding energy multipliers (the pilot of the opt-in “experiment-tuned” mode).
- Voxel
Tally Spec [tally.voxel]: the regular grid of the voxel tally (crate::tally::VoxelTallyGrid).xis the depth; the beam is along+xfromy = z = 0. Voxeliowns `[origin + i * spacing, origin + (i +
Enums§
- Crystal
Preset - Cubic lattice preset of a
[[crystal]]assignment. Each maps to a cited preset ofcrate::ion::crystal::Lattice(sources and lattice constants:docs/crystal-orientation.md,docs/data-provenance.md). - Divergence
Spec [beam.divergence]: the beam’s angular spread about its nominal direction, angles in degrees. Selected bymodel:- Free
Path Choice - Free-path convention.
- Input
Error - Errors from reading or validating an
Input. - Length
Choice - Screening length choice.
- Material
Ref - A material given by name or inline.
- Potential
Choice - Screening function choice.
- Relaxation
Choice - Volume-relaxation convention of a dynamic run
(
crate::ion::dynamic::Relaxation). - Stopping
Choice - Electronic stopping choice.
Constants§
- ES_
SPUTTER_ AR_ V1 es-sputter-ar-v1: oneE_smultiplier per element for Ar sputtering of Si, Cu, Ag and Au, fitted byvalidation/experiments/run.py --fit-tuningto measured yields only (the sets invalidation/data/sputtering/, each cited to its original publication indocs/data-provenance.md), with a held-out evaluation invalidation/experiments/tuning_results.json.- MAX_
DIVERGENCE_ DEG - Largest accepted divergence width, degrees (Gaussian
sigma_degor conehalf_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
tuningvalue that leaves the physics untouched. - TABLE_
SPEC - Scattering-table grid used for every run:
per_decadepoints per decade of reduced energy and impact parameter. Angles outside the energy range fall back to direct quadrature in the engine; impact parameters abovebeta_maxgive no deflection (the constant-free-pathp_maxis 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::EquipartitionLsOrthe 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. ForStoppingChoice::Noneit isNoStopping, whose validity range is unbounded, so no out-of-range warning is raised.