PyRETIS TOML configuration schema¶
This document lists the keys of the scheduler configuration, grouped by
section: the configuration the scheduler builds in memory from a
canonical input (task = "retis", [tis], …). The scheduler
configuration is set up by pyretis.simulation.setup.setup_config. No
file PyRETIS writes holds it: the run file output.toml records the
canonical input (see [current] below).
The deprecated legacy-runner schema (a [runner] section, the
path-sampling settings under [simulation.tis_set], no [simulation] task) is an input of this shape. PyRETIS 4 converts such an input to
its canonical form when it reads it, with a deprecation notice, and
PyRETIS 5 will not read it. pyretis run, pyretis analyse, the
scheduler set-up of a programmatic run and the interface optimiser
convert it the same way (pyretis/tools/convert_legacy_schema.py): each
key goes to its input key (the table below), the canonical form is
parsed as every canonical input is, and the conversion is checked
against the scheduler configuration of the input, a difference stopping
it with the settings that differ. python -m pyretis.tools.convert_legacy_schema <file> writes the canonical form to
a file once, with the same check.
A canonical input reaches these keys through the declared key table,
pyretis.inout.key_table: one entry per scheduler path names the input
keys it is read from. The keys whose name or section differ:
Scheduler key |
Input key |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A message of pyretis run names a setting by its input key, e.g.
[simulation] zero_left. The run file output.toml records the canonical
input, not this configuration (see [current] below).
An input key either takes effect on the run or the input is refused:
pyretis/inout/key_table.py:NO_EFFECT declares the input keys and
sections that take no effect on a run, with the runs they take none on,
and the settings parse of a canonical input refuses each one the input
gives, naming the key and, for a key whose value another key sets, that
key ([simulation] zeroswap names [retis] swapfreq; [simulation] relative_shoots and [tis] relative_shoots name [retis] relative_shoots; [simulation] restart names [initial-path] method = "restart"). The table of these keys is in the input reference
(docs/user/section/sections.rst, “Keywords that take no effect on a
run”). The canonical form of a legacy-runner input is refused the same
way, and the message names each key in the canonical input and in the
legacy-runner input, e.g. [tis] nullmoves ([simulation.tis_set] nullmoves of the legacy-runner input) = true. The conversion gives
[simulation] zeroswap its input key, [retis] swapfreq of a retis
run (a tis or explore run, which attempts no swap, leaves it out with
a warning), and leaves out the [output] keys of the in-process output,
with a warning.
[runner]¶
Key |
Type |
Default |
Description |
|---|---|---|---|
|
int |
required |
Number of parallel REPEX workers |
|
list[str] |
|
Per-worker MD run commands (optional) |
[simulation]¶
Key |
Type |
Default |
Description |
|---|---|---|---|
|
list[float] |
required |
Sorted interface values for TIS ensembles |
|
int |
required |
Total number of RETIS cycles |
|
list[str] |
required |
Move type per interface: |
|
int |
|
RNG seed for reproducibility |
|
str |
|
Name of the per-ensemble operational trajectory store ( |
|
float |
|
Probability of a swap move: in a |
|
int |
|
Ensemble picking scheme (0 = uniform) |
|
list[float] or null |
|
Relative per-ensemble move-selection frequencies (one weight per ensemble, interface order, |
|
bool |
|
Weights the per-ensemble pick toward the ensembles with fewer submitted moves (weight |
|
list[list[str]] |
auto |
Engine keys per interface |
[simulation.tis_set]¶
Key |
Type |
Default |
Description |
|---|---|---|---|
|
int |
|
Maximum allowed path length. The default is a deliberately generous cap so an input need not set it; a run that falls back to it logs that it did, and records the value it used. Set it explicitly for systems with long paths — a cap that is too small biases the sampling |
|
bool |
|
Accept paths exactly at max length |
|
bool |
|
Reset the centre-of-mass momentum after every velocity draw: shooting and the kicks of the initial-path search, in every engine. GROMACS with |
|
float or bool |
|
The total energy the shooting velocities are re-scaled to; |
|
int |
required |
Velocity reassignment jumps per shooting move |
|
bool |
|
Use quantIS variant (per-ensemble engines) |
|
bool/int |
|
Create a minus interface below the first |
|
bool |
|
Accept all paths unconditionally |
|
float |
optional |
Upper interface cap for flux collection |
|
int |
|
Max ensemble block size for which the exact matrix permanent is computed (larger blocks use the stochastic approximation) |
|
int |
|
Sample count for the stochastic permanent approximation used above |
|
bool |
|
Forbid the stochastic fallback (raise instead of approximating a block larger than |
[engine]¶
Multiple engines can be defined as [engine], [engine0], [engine1], etc.
Key |
Type |
Default |
Description |
|---|---|---|---|
|
str |
required |
Engine type: |
|
str |
required |
Backend name (for logging) |
|
float |
required |
MD timestep in engine’s native units |
|
int |
required |
MD steps between two stored frames of a path; an internal integrator of |
|
float |
required |
Simulation temperature |
|
float |
required |
Boltzmann constant (kB) |
|
str |
external only |
Path to external engine input files |
|
str |
CP2K only |
CP2K executable name |
|
str |
GROMACS only |
GROMACS executable (e.g. |
|
str |
LAMMPS only |
LAMMPS executable (e.g. |
|
list/str |
GROMACS |
Particle masses or path to masses.txt |
[engine.integrator]¶
Key |
Type |
Description |
|---|---|---|
|
str |
Integrator class: |
[engine.integrator.settings]¶
Keys vary by integrator. Examples for Langevin:
Key |
Type |
Description |
|---|---|---|
|
float |
Friction coefficient |
|
float |
Inverse temperature: |
[engine.potential]¶
Key |
Type |
Description |
|---|---|---|
|
str |
Potential class: |
[engine.potential.settings]¶
Keys vary by potential. Examples for DoubleWell:
Key |
Type |
Description |
|---|---|---|
|
float |
Quartic coefficient |
|
float |
Quadratic coefficient |
|
float |
Constant offset |
[engine.particles]¶
Key |
Type |
Description |
|---|---|---|
|
list[float] |
Mass of each particle |
|
list[str] |
Name/symbol of each particle |
|
list[list[float]] |
Initial position of each particle |
[engine.box]¶
Key |
Type |
Description |
|---|---|---|
|
list[bool] |
Periodicity per dimension |
[orderparameter]¶
Key |
Type |
Default |
Description |
|---|---|---|---|
|
str |
required |
Order parameter class |
|
list[int] |
required |
Particle indices for the OP |
|
bool |
required |
Apply PBC to OP calculation |
|
str |
external |
Path to Python file with custom OP class |
[output]¶
Key |
Type |
Default |
Description |
|---|---|---|---|
|
str |
required |
Output directory |
|
int |
|
Cycles between two progress reports of the scheduler in the log ( |
|
int/bool |
|
Print frequency of ensemble distribution |
|
int |
optional |
Order parameter output frequency |
|
int |
optional |
Energy output frequency |
|
int |
optional |
Read by the in-process tasks ( |
|
str |
|
Read by the in-process tasks ( |
|
int |
|
Long-term archive cadence: a superseded path MOVES from its per-ensemble operational store ( |
|
list[str] |
|
Extra trajectory file patterns the archiver carries along when moving a path |
|
str |
|
Run-log file name; also used by the worker processes, which append to the same file (an explicit |
|
str |
|
Start-of-run treatment of an existing run log: |
|
str/int |
|
Per-trajectory engine-log retention: each finished trajectory’s engine logs ( |
[current] (scheduler-generated run state)¶
Do not add this section to the input file you write. When a run starts,
pyretis run writes output.toml in the run directory. That generated file
is the run record: it contains the sections of the canonical input, under
the names of the input and with every default the run takes resolved (the
zero-swap probability as [retis] swapfreq), and a [current] section
recording the latest restartable scheduler state. It holds none of the
settings the input parse derives (the engine type, the input_files the
GROMACS and CP2K checkers find, the exe_path of the run directory, the
per-ensemble copies of the sections), and none of the keys and sections
that take no effect on the run (pyretis/inout/key_table.py:NO_EFFECT):
the settings parse refuses each one an input gives, and the record leaves
out the value the parse gives such a key (the [simulation] restart it
derives from method = "restart", the [engine0] of a run that runs no
[engine0] engine, [simulation] rgen, and the rgen of [tis],
[engine] and [system] for a run whose initiation kicks no path in
process). It records [output] screen. The scheduler builds
its configuration from those sections with the key table, when the run
starts and when it resumes. pyretis run -i output.toml resumes the run,
and pyretis analyse -i output.toml analyses it as its input would. The
output.toml of an earlier PyRETIS that holds keys of no effect is read
without them (pyretis/inout/run_record.py:load_run): silently when the
value is the one the settings parse gives, named in a warning otherwise;
[simulation] zeroswap is read as [retis] swapfreq, and [tis] relative_shoots as [retis] relative_shoots when the file sets none
there.
The scheduler rewrites output.toml atomically at checkpoints, so it is
safe to inspect between updates. Treat it as output, however: changing it
by hand can make the stored state inconsistent with trajectories and other
run files. To change a simulation, edit the original input and start a new
run; to continue an interrupted one, restart from its run directory and let
PyRETIS read output.toml.
restart.toml is the older name for the same kind of generated state file.
It is read only as a fallback when output.toml is absent, so previously
created runs remain restartable. The output.toml and restart.toml of an
earlier PyRETIS hold the scheduler configuration of this document, with its
[simulation.tis_set] table, and the [current] state. A continuation
with [initial-path] method = "restart" reads such a state file and
compares its settings with the continuation’s; pyretis run -i refuses it
and names that route. pyretis analyse -i reads its settings under the
names of the input, through the inverse of the key table
(pyretis/inout/key_table.py:canonical_items), and refuses the state file
of a tis run of one ensemble, whose analysis counts a crossing at [tis] detect when the input gives [tis] ensemble_number, which the scheduler
configuration does not say.
Key |
Type |
Description |
|---|---|---|
|
int |
Current RETIS cycle |
|
int |
Total trajectory count |
|
int |
Number of ensembles |
|
list[int] |
Active path indices |
|
dict |
NumPy Generator state for restart |
|
dict |
Version/env metadata (P7.3) |
|
int |
Previous cstep on restart |