Input, Output, and CLI
Running SRTC from the release bundle. These docs are written against the
srtccommand line. In the distributed bundle that command lives inside the container, so run it through Compose from the unpacked bundle directory:docker compose run --rm -v "$PWD":/io backend srtc --helpFiles you pass in should sit under the mounted
/io, and that is also where to write outputs. On Linux the container runs as an unprivileged user, so add--user "$(id -u):$(id -g)"when writing to a mounted directory or the run fails with a permission error creating the output directory:docker compose run --rm --user "$(id -u):$(id -g)" -v "$PWD":/io backend \ srtc -i examples/fwd_transport/oltaris_al_si.deck -o /io/out/results.out \ --depth-g-cm2 1.0 --histories 100000 --seed 1The physics libraries are already in place, and the shipped example decks resolve against them, so the examples below run as written. See Downloads to get the bundle, and the Viewer guide for the browser GUI, which needs none of this.
For a task-oriented walkthrough (build, run, examples, troubleshooting), see the User manual.
Command summary
Recommended: MCNP-style run
srtc \
-i examples/fwd_transport/oltaris_al_si.deck \
-o output/run1/results.out \
--depth-g-cm2 1.0 \
--histories 100000 \
--seed 1
Creates output/run1/results.out, results_dose.out, and results_spectrum.out.
Legacy subcommands
docker compose run --rm backend srtc run examples/fwd_transport/oltaris_al_si.deck --histories 100000
docker compose run --rm backend srtc compare-oltaris --histories 100000
docker compose run --rm backend srtc data process --manifest data/manifests/default.toml
CLI options (primary mode)
| Option | Default | Description |
|---|---|---|
-i, --input |
(required) | Path to .deck or .toml |
-o, --output |
output/<deck_stem>/ |
Output file or directory |
--depth-g-cm2 |
1.0 |
Al-equivalent slab thickness when no LAYER cards |
--histories |
100000 |
Number of Monte Carlo histories |
--seed |
1 |
RNG seed |
--spectrum-csv |
— | Override external spectrum file (single-source cases) |
When -o is omitted, a CSV dose row is also printed to stdout.
Legacy run subcommand options:
| Option | Default | Description |
|---|---|---|
config |
(required) | Path to .toml or .deck |
--spectrum-output |
— | Additional spectrum CSV path |
Stdout dose row (when -o is omitted)
depth_g_cm2,dose_rad_day,dose_std_dev_rad,proton_dose_rad_day,proton_dose_std_dev_rad,neutron_dose_rad_day,neutron_dose_std_dev_rad,electron_dose_rad_day,electron_dose_std_dev_rad,photon_dose_rad_day,photon_dose_std_dev_rad,proton_peak_MeV,histories
TOML configuration
Example: examples/fwd_transport/oltaris_al_si.toml
[source]
particle = "proton"
spectrum_csv = "../test_spectrums/350kmx350kmx53deg_proton_0gcm2.csv"
spectrum_unit = "per_day_cm2_mev"
[geometry]
shield_material = "al"
detector_material = "si"
detector_thickness_cm = 0.01
[scoring]
detector_area_cm2 = 1.0
[physics]
data_dir = "../data/processed"
provider = "sample"
stopping_mode = "total"
[transport]
min_energy_mev = 0.1
max_steps_per_history = 20000
step_fraction = 0.03
Layer stacks are deck-only today; use a .deck file for ordered multi-material shields.
NOVICE-style deck
Example: examples/fwd_transport/spacecraft_stack.deck
Card reference
| Card | Purpose |
|---|---|
TITLE |
Optional run label |
MATERIAL |
Optional alias/density override for a compendium material (NAME=, optional DENSITY_G_CM3=) |
SPECTRUM … END_SPECTRUM |
Primary particle spectrum (file path or inline points) |
SHIELD |
Default shield material (required if no layers define it) |
LAYER |
One layer: ORDER, MATERIAL, THICKNESS_G_CM2 or THICKNESS_MM |
DETECTOR |
Scoring slab: MATERIAL, THICKNESS_CM or THICKNESS_MM, AREA_CM2 |
PHYSICS |
Data directory and provider options |
TRANSPORT |
Cutoffs and step controls |
RAYTRACE |
Ray-trace sector grid and curve selection (see raytrace.md) |
RAYTRACE_CURVE |
Named dose-depth CSV registration |
END |
Optional terminator |
Comments: #, !, or * at line start.
SPECTRUM fields
Each SPECTRUM card defines one primary particle and its fluence tabulation. Repeat the card
for mixed proton/electron (or other) environments.
| Field | Values | Meaning |
|---|---|---|
PARTICLE |
PROTON, ELECTRON, NEUTRON, … |
Primary type (PHOTON rejected — secondaries only) |
FILE / SPECTRUM / PATH |
file path | External CSV (mutually exclusive with inline block) |
UNIT |
PER_DAY_CM2_MEV, PER_DAY_CM2, … |
Flux units label |
FORM |
DIFFERENTIAL, INTEGRAL |
Tabulated quantity type |
INTERP |
LOG_LINEAR, LINEAR |
Energy sampling and interpolation |
The legacy SOURCE card is no longer accepted; put all source information on SPECTRUM.
Inline spectrum block
SPECTRUM PARTICLE=PROTON UNIT=PER_DAY_CM2_MEV FORM=DIFFERENTIAL INTERP=LOG_LINEAR
0.1040279 13773110
0.1596987 12515310
...
END_SPECTRUM
Each line: energy_MeV value or E_MEV=... VALUE=....
Repeat SPECTRUM cards to combine multiple primary particles. Each spectrum is either:
| Form | Deck syntax | Traceability |
|---|---|---|
| File | SPECTRUM PARTICLE=PROTON FILE=path.csv |
Path recorded in deck and results.out |
| Inline | SPECTRUM PARTICLE=ELECTRON + energy rows + END_SPECTRUM |
Points live in the deck file |
FILE, SPECTRUM, and PATH are equivalent field names for an external CSV. When several
primaries are present, history counts are mixed in proportion to each spectrum's integral.
Example mixed deck: examples/fwd_transport/proton_electron_mixed.deck.
Integral spectrum example (electrons)
SPECTRUM PARTICLE=ELECTRON UNIT=PER_DAY_CM2 FORM=INTEGRAL INTERP=LOG_LINEAR
1.0 100.0
10.0 10.0
100.0 1.0
END_SPECTRUM
Integral points must be monotonic in energy; the code differences adjacent intervals to obtain differential bin fluxes.
Photons as secondaries
Photons are not accepted as a primary source. Specify PROTON or ELECTRON (or other
charged/hadronic primaries where supported). Photons appear during transport from bremsstrahlung
and other EM interactions, and are tallied separately in the output spectrum and dose columns.
PHOTON remains the particle name for secondary neutral EM quanta in outputs; no separate
gamma keyword is used.
Layer ordering
LAYER ORDER=1 MATERIAL=STEEL THICKNESS_G_CM2=0.50
LAYER ORDER=2 MATERIAL=AL THICKNESS_G_CM2=2.00
LAYER ORDER=3 MATERIAL=PE THICKNESS_G_CM2=1.00
ORDER=1 is the entry face — radiation enters steel first, then aluminum, then polyethylene.
Layers are sorted by ORDER before transport. If ORDER is omitted, declaration order is used.
Compendium materials
SRTC includes the 411-material PNNL Materials Compendium. Use a compendium name, slug, or alias directly in material fields:
LAYER ORDER=1 MATERIAL="Aluminum, alloy 6061-O" THICKNESS_MM=2.0
LAYER ORDER=2 MATERIAL=water_liquid THICKNESS_MM=2.0
DETECTOR MATERIAL="Bone Equivalent Plastic, B-110" THICKNESS_MM=1.0 AREA_CM2=1.0
Quotes are required for names containing spaces or punctuation. Common short aliases still work:
AL, SI, SS, PE, FE, W, and WATER.
See examples/fwd_transport/compendium_alloy_stack.deck and
examples/fwd_transport/compendium_tissue_detector.deck.
Thickness in millimetres
LAYER ORDER=1 MATERIAL=AL THICKNESS_MM=10.0
Conversion: thickness_g_cm2 = DENSITY_G_CM3 × THICKNESS_MM / 10. The same rule applies to
DETECTOR THICKNESS_MM=. SRTC uses the compendium density by default; add a MATERIAL
card with DENSITY_G_CM3 only when you need to override that density. Do not combine
THICKNESS_MM and THICKNESS_G_CM2 on one card.
Outputs
With -o, results are written using the selected output stem, for example results.out,
results_dose.out, and results_spectrum.out. See the User manual for details.
Legacy --spectrum-output
output/spacecraft_stack_spectrum.csv:
shield_depth_g_cm2,particle,bin_low_MeV,bin_high_MeV,weighted_counts
1,proton,0.1,0.111,...
1,neutron,0.1,0.111,...
For layered decks without a single depth parameter, the CLI --depth-g-cm2 value (default 1.0)
is written in the first column as a label only.
OLTARIS comparison (compare-oltaris)
Written to tests/comparisons/oltaris/1d/ (default):
| File | Content |
|---|---|
dose_comparison.csv |
OLTARIS vs SRTC dose, ratio, peak energies, MC dose standard deviation |
particle_spectra.csv |
All depths, protons + neutrons |
spectrum_{depth}gcm2.csv |
Per-depth spectrum |
rust_mc_dose_std_dev_rad is the absolute standard deviation of the SRTC dose estimate in rad/day.
compare-oltaris options:
| Option | Default |
|---|---|
--config |
examples/fwd_transport/oltaris_al_si.toml |
--depths |
test_spectrums/350x350x53deg_Dose_vs_Depth.csv |
--spectra-dir |
test_spectrums |
--histories |
100000 |
--seed |
1 |
--output |
tests/comparisons/oltaris/1d |
External spectrum CSV format
Used by OLTARIS test files and optional SPECTRUM=path.csv:
"Energy (EU*)","Particle = proton_Depth in aluminum = 0"
0.1040279,13773110
...
Two columns: energy (MeV), differential flux. Header row is skipped automatically if present.
The deck reader accepts comma- and whitespace-separated columns. The web viewer's Load CSV goes further: it opens an import prompt where the delimiter (comma, tab, space, semicolon, any whitespace, or auto-detect) and the file's convention (flux vs fluence, differential vs integral-above, and a flux's time base) are declared and validated before the points are accepted — see the viewer guide, §4.
Heavy-ion tracking cut
TRANSPORT ION_EMIN_MEV_PER_NUCLEON=<MeV/u> (alias ION_EMIN_MEV_U, default 10)
drops ions below that kinetic energy per nucleon from transport and from every LET
tally. Applies to ions with A ≥ 2; protons keep EMIN_MEV.
It is a transport cut, not a tally filter — the ion leaves the state rather than being ground down to the floor and discarded at scoring. An ion below it has a residual range too small to cross anything (Fe-56 at 10 MeV/u: ~0.03 g/cm²) but a very high LET, so without the cut those stopped-in-place tracks pile into the top of the LET spectrum, where SEE rate integrals are most sensitive. 10 MeV/u is CREME96's convention.
TRANSPORT METHOD=RAYTRACE ION_EMIN_MEV_PER_NUCLEON=10
Heavy-ion (GCR) environment files
srtc hi-environment, srtc hi-depth-sweep and srtc dose-depth-curve --hi-environment all read the same two formats, detected from the file's content
(override with --format oltaris|creme96):
| Format | Recognised by | Energy axis | Flux units as written |
|---|---|---|---|
| OLTARIS BON2020 | … array dimensions and data header cards |
MeV/amu | #/(cm²·day·EU*) |
| CREME96 | anything else | MeV/nucleon | #/(m²·s·sr·MeV/nuc) |
Both are converted to SRTC's native #/(cm²·day·MeV) against total ion MeV — the
per-nucleon axis is multiplied by A and the differential divided by A. A CREME96 flux
additionally picks up 4π sr × 1e-4 (m²→cm²) × 86400 (s→day) ≈ 108.6; that assumption is
read from the file's header when it states different units and is always reported back
(flux_note in the JSON, and in the viewer's environment panel).
CREME96 files may be written either way:
! Energy (MeV/nucleon) Flux (#/m2-s-sr-MeV/nuc)
Z = 26 # or a bare `26`, `Fe`, `Fe56`, `ION 26 56`
1.000E+01 1.200E-05
1.000E+02 5.200E-05
# Energy H He Fe
1.0e1 1.0e-1 1.0e-2 1.0e-6
Data rows before any species header are an error, not a guess. CREME96 tabulates per
element, so each Z transports as its most abundant isotope (Z=26 → Fe-56, Z=28 →
Ni-58). test_spectrums/creme96/format_example.flx is a runnable layout example —
illustrative numbers, not a physics reference.
Physics data directory
Runtime loads HDF5 libraries from physics.data_dir (default: /data/jendl-5):
| File | Role |
|---|---|
materials.h5 |
Compendium definitions |
em_stopping.h5 |
Stopping powers |
em_photon.h5 |
Photon interaction partials |
hadronic.h5 |
Reaction σ, products, MF6 law rows |
fragmentation.h5 |
Heavy-ion fragmentation model grids |
index.toml |
Library index |
Shipped inside the release bundle, already built.md). Gitignored. Requires libhdf5-dev. Set SRTC_SKIP_DATA_BUILD=1` to skip regeneration.