Input file sections¶
The PyRETIS input file described in detail in the user guide. The short version is:
The input file is TOML. It is organised into sections whose keywords are given values:
[section] keyword = "value"
Comments are marked with a #.
Section names and keywords are lower case, and the file is case-sensitive.
Below, we list the different sections that you can make use of in order to define your simulation:
Section |
Usage |
|---|---|
For defining the simulation we are going to run. |
|
For defining system properties. |
|
For defining a simulation box. |
|
For defining the initial state of particles. |
|
For defining a forcefield. |
|
For defining potential functions to use in the force field. |
|
For defining the simulation engine. |
|
For defining the order parameter. |
|
For defining settings for a RETIS simulation. |
|
For defining settings for a PPTIS or REPPTIS simulation. |
|
For defining settings for a TIS simulation. |
|
For configuring the infinite-swapping scheduler (parallel workers). |
|
For defining how the initial path is generated. |
|
For defining output settings. |
|
For defining custom unit systems. |
In addition, an analysis can be defined using:
Section |
Usage |
|---|---|
For defining an analysis. |
Keywords that take no effect on a run¶
Every keyword an input gives either takes effect on the run, or the input is refused before the run starts, except the keywords listed below. A keyword a section does not know, such as a misspelled one, is refused with a message that names it and its section. A keyword of the table below, which takes no effect on the run, is refused with a message that names it and its value, says why it takes no effect, and names the keyword to set instead when another keyword sets what it would set.
The run does not refuse these keywords yet, so check them against their pages:
A keyword of
[engine],[engine0], a numbered engine section of a pool,[orderparameter],[[collective-variable]],[[potential]]or[shooting-selector]that the class the section names does not take, such as a misspelledgamma: a warning names it (These settings are not used by "Langevin" and are being IGNORED: "gama"), and the run goes on as if the keyword were not there, with the default in its place. When the class needs the keyword the misspelling leaves out, the run stops instead withRequired argument "gamma" ... not found!. No warning namesname,seed,rgen,type,parameter,exe_path,input_path,input_files,conf,topology,index,input_o,templateorcp2k_format, even in a section whose class does not take them, nor a keyword of[shooting-selector]on a run without a"bias"move, which does not use the section.A keyword that
[initial-path],[particles.position],[particles.velocity], theplottable of[analysis]or the[infinit]section ofpyretis tools initdoes not know, such as a misspelled[initial-path] methodor[particles.velocity] momentum: no message names it, and PyRETIS takes the input as if the keyword were not there.[particles] type, which the run sets from
[engine] classin place of the value an input gives, without a message.Keywords that take no effect on some runs, as their pages say: [particles] npart on every run but the analysis of an
md-fluxrun; [output] archive_every on anmd-fluxrun, and[output] cross-file, andorder-filewithout an[orderparameter]section, on anmd-nverun; and[simulation] swap_attributesof PyRETIS 3, with a warning.On an
md,md-nveormd-fluxtask, the keywords that set the moves and the ensembles of a path-sampling run. No message names them when the task starts, and the run is the one it is without them, so leave them out of the input of an md task:every keyword of [tis] and [retis] but
relative_shoots, which the task refuses;[simulation] priority_shootingand the path sampling keywordsflux,zero_left,zero_ensemble,permeability,pick_schemeandload_dirof[simulation];[simulation] interfaceson anmdormd-nvetask;[simulation] ensemble_engines with the numbered engine sections
[engine1],[engine2], … it names. The task checks that it gives one list per interface (so an input without interfaces refuses any list), that each list names sections the input defines with a class, and that it names each numbered section, but it compares no times per step; an[engine0]section is refused.
A value that is refused on every task is refused in them too: an
rgenthat names no generator (see below), and an engineclassthat is not an engine of PyRETIS in a section withoutmodule, or that themoduleof its section does not define. A restart compares some of these keywords with the restart file (see Restarting an md task).
A keyword can take effect on one task and none on another: the
[output] keywords of the in-process output are read by the md
tasks and refused by a path-sampling run, whose scheduler writes its own
output files. A legacy .rst input is checked in the same way, before
pyretis run writes the TOML twin of a path-sampling one. A value the
table accepts states what the run does (rgen = "pcg64",
[engine] subcycles = 1): the run takes it as it takes an input
without the keyword.
A run file (output.toml) written by an earlier PyRETIS that holds
such a keyword continues and analyses. Its [simulation] zeroswap is
read as [retis] swapfreq, in place of the swapfreq the file
holds, and its [tis] relative_shoots as [retis] relative_shoots
when the file sets none; a warning names each value read so. Every other
such keyword is left out when the file is read: silently when its value
is the one the run takes without the keyword, or one the table accepts,
and named in a warning otherwise.
In the table, a path-sampling run is a run of the task retis,
repptis, tis, pptis or explore, and the refusal applies
to make-tis-files as well, which writes the input of a tis run of
each ensemble.
Keyword |
Refused on |
Set instead |
|---|---|---|
|
Every task. |
|
|
Every task but |
|
|
Every task. |
|
|
Every task but a path-sampling run that picks the ensemble of
its moves: a |
|
|
A |
|
|
A path-sampling run. |
|
|
A path-sampling run. |
|
|
A path-sampling run, unless the value is |
|
|
A path-sampling run, unless the value is 0 or equals
|
|
|
A path-sampling run, unless the value equals
|
|
|
Every run in which no ensemble runs it: an ensemble runs it when
its list in |
|
|
A path-sampling run. |
|
|
A path-sampling run, unless the value is |
|
|
A path-sampling run. |
|
|
A path-sampling run other than |
|
|
A path-sampling run other than |
|
|
A path-sampling run other than |
|
|
A path-sampling run other than a |
|
|
A path-sampling run. |
|
|
An |
The run file output.toml of a run records none of these keywords.
The rgen keyword of [simulation], [system], [tis],
[engine], [engine0], [retis], [particles.velocity] and of
a numbered engine section names a random generator: "pcg64" (numpy’s PCG64),
"rgen" (numpy’s legacy MT19937), "mock", "rgen-borg" or
"mock-borg". An input whose rgen names no generator is refused
on every task, with the values that name one.
Notation for describing keywords¶
Each keyword entry is shown as:
keyword = DATA-TYPE
where keyword is the input-file key and DATA-TYPE is the kind of value
accepted by that key. The paragraph below each keyword explains what it controls.
When a keyword has a default value, the default is listed directly below the
description.
Example:
task = string
Selects the simulation task to run.
Default:
md
The data types used in the keyword reference are listed below.
DATA-TYPE |
Description |
Example |
|---|---|---|
string |
Text, in quotes. |
|
integer |
An integer. |
|
float |
A floating-point number. |
|
boolean |
|
|
dictionary |
A TOML table: names, each with a value. |
|
list |
Values in square brackets. |
|
tuple |
A list of a fixed number of values. |
|
None |
No value: leave the keyword out of the input. |