Monte Carlo moves¶
In TIS and RETIS simulations, every Monte Carlo cycle proposes a new trajectory (a path) from the current one using a move, and then accepts or rejects it. A move only changes how a trial path is generated – it never changes which path ensemble is being sampled – so every move listed here targets the exact same distribution and may be combined freely without biasing the result.
This page explains what each move does. The compact two-letter code
that PyRETIS writes for every cycle (sh, tr, s+ …) is
collected, together with the rejection codes, in
Path types and rejection reasons. Which move is used in each
ensemble is controlled by the shooting_moves keyword of the
[TIS] section.
See also
Added a new move, or changed an existing one? A correct move must reproduce the same crossing probability and rate constant as the established ones, within statistical error. Validate it with the reproducibility suite described in Extending and validating PyRETIS.
Basic moves¶
These are the standard TIS/RETIS moves and are sufficient for most simulations.
Shooting (sh)¶
The workhorse of path sampling. A shooting point is picked at random among the phase-space points of the current accepted path, its momenta are modified, and the equations of motion are integrated forward and backward from that point to assemble a new trial path. The trial is accepted only if it still satisfies the ensemble’s start/end conditions (i.e. it crosses the relevant interface).
How the momenta are modified is set by the sigma_v keyword:
Aimless shooting (
sigma_vnegative, the default): the velocities at the shooting point are redrawn from the Maxwell–Boltzmann distribution at the system temperature.Non-aimless shooting (
sigma_vzero or positive): a Gaussian perturbation of widthsigma_v, the same for every particle, is added to the current velocities and the momentum change is accepted or rejected with the Metropolis criterion.
Biased shooting (bias)¶
Standard shooting picks the shooting point uniformly. The biased move
picks it non-uniformly – biased toward “interesting” frames such as the
barrier top – to converge a rate in fewer MD steps, without changing the
sampled path ensemble: the crossing probability and the rate are
statistically identical. A per-frame weight \(w(x)\) (set by a
[shooting-selector]) gives the selection probability \(w_i/W\), and a
valid trial path is accepted with the exact correction
\(\min(1, W_\mathrm{old}/W_\mathrm{new})\). It needs aimless shooting
(sigma_v < 0) and a [shooting-selector] section. See
Biased shooting-point selection
for the theory, the selectors, and a worked TOML example. The 'exp'
shooting move of PyRETIS 3, a heuristic without this correction, does not
run outside an explore run: use 'bias'.
Time-reversal (tr)¶
A cheap move that needs no new integration: the current accepted path is reversed in time – the order of the phase points is inverted and the momenta are flipped – to produce the trial path. For deterministic dynamics the reversed trajectory is itself a valid trajectory, so time-reversal is typically interleaved with shooting to help decorrelate the sampled paths.
Zero swap (s+ / s-)¶
The swap of RETIS between the two ensembles at the initial state,
[0^-] and [0^+]: each builds its new path from the frames where
the other’s path crosses the first interface, and the equations of
motion are integrated to complete it. In a retis run, a move picked
in [0^-] or [0^+] is the zero swap, with the probability set by
the swapfreq keyword of the
[RETIS] section, when the other ensemble is
free. The code s+ is recorded in [0^-] and s- in [0^+].
A retis run attempts no other swap: the positive ensembles exchange
their paths through infinite swapping (below), which can show in
pathensemble.txt as several rows of one cycle, each with its
share in FracInc. A repptis run, with the same probability,
swaps a picked ensemble with an adjacent one: [0^-] with [0^+]
by the zero swap, two positive ensembles by a swap recorded as p+ /
p-.
Advanced moves: sub-trajectory moves¶
Stone Skipping (ss), Web Throwing (wt) [1] and Wire Fencing
(wf) [2] build a new path from several short sub-trajectories
(“jumps”) instead of a single long shot. They are designed to improve
sampling efficiency and path decorrelation for stiff or diffusive
barriers where ordinary shooting struggles. The number of
sub-trajectories is set by n_jumps, and high_accept selects
the high-acceptance variant of each move.
Multiresolution Wire Fencing (mwf) runs the Wire Fencing scheme
at two engine resolutions, and is described below.
Fig. 5 Cartoon of the three sub-trajectory moves. The old path is shown in blue, the sampled sub-trajectories in orange, and the resulting new path – a chosen sub-trajectory together with its extensions – in green.¶
Stone Skipping (ss)¶
Generates the new path through a sequence of short shooting steps that “skip” off the interface, reusing the accepted sub-paths. See [1] for the algorithm and acceptance rule.
Web Throwing (wt)¶
A sub-trajectory move closely related to Stone Skipping, also introduced in [1].
Wire Fencing (wf)¶
A sub-trajectory move [2] that bounds its sub-paths with an additional cap interface, placed above the ensemble interface and set by the interface_cap keyword. The cap has to lie beyond the interface defining the ensemble; choosing it poorly can hurt sampling efficiency.
Multiresolution Wire Fencing (mwf)¶
Wire Fencing run at two engine resolutions. The intermediate
sub-paths of each set are shot with the reduced subcycle count set
by mwf_subcycle_small,
and the final sub-path of the set is shot with the engine’s own
subcycles. The surviving sub-path is extended to a full path and
accepted with the same sub-trajectory acceptance rule as the moves
above. mwf_nsubpath sets how
many sub-paths a set holds, and n_jumps how many sets are generated.
A hands-on walkthrough of configuring these three moves is given in the sub-trajectory moves tutorial.
Infinite swapping and parallel workers¶
Every path-sampling run of PyRETIS uses the infinite-swapping sampler [3] – an asynchronous, highly parallel reformulation of the replica-exchange move. It removes the main scaling bottleneck of classical RETIS, where a replica swap is a synchronisation point: every worker must finish its current trajectory before the next round of swaps can be evaluated.
Instead of attempting swaps between fixed neighbouring pairs, the infinite-swapping scheme keeps a central coordinator that records swap acceptance statistics over the running stream of completed trajectories. Each worker then draws its next task from the resulting distribution and is handed new work as soon as it frees up. As a result the wall-clock time keeps scaling close to linearly with the number of workers over a far wider range than synchronous replica exchange allows. The Wire Fencing move described above pairs naturally with this sampler, since it keeps acceptance high on the long paths that aggressive parallel sampling tends to produce.
Every path-sampling run – task = "tis", "retis", "explore",
"pptis" or "repptis" – runs on this sampler, through the same
pyretis run command as every other simulation. The number of
parallel workers is the workers keyword of a [runner] section;
without one the run has one worker. The runner section reference documents the [runner] keywords and the
environment overrides, and the infinite-swapping tutorial walks through a runnable example. task =
"infinite_swapping" belongs to inputs of the legacy-runner schema; an
input written with the sections of this guide that sets it is refused,
with a message that names the task to set instead.
pyretis analyse combines the per-interface crossing probabilities
into the overall one by matching them, the default, or with the
Weighted Histogram Analysis Method (WHAM) [4], which reweights
the paths shared across all ensembles in a single histogram;
method of the
[analysis] section selects "wham", or "both" for both.
See the analysis guide.
Other moves¶
These appear mainly in specific algorithms or during path initiation; all their codes are listed in Move types.
Target swap (
ts) – builds a new path by swapping toward an allowed target index, looping forward and backward along the old trajectory (integrating where required).Mirror (
mr) – mirrors the order parameter in place and recomputes it along the path; always accepted.Null move (
00) – keeps the current path unchanged. A PyRETIS 4 run attempts none:[retis] nullmovesand[tis] nullmovesare refused. The code appears in the output of a PyRETIS 3 run withnullmoves = True.Initiation moves – how the very first path of a run is produced: kick initiation (
ki), initial shoot (is), and loading an existing path from external files, either unformatted/binary (ld) or formatted/text (rf; PyRETIS 3 wrote it asre). A path-sampling run writes the rows of its initial paths inpathensemble.txtwithld, whether they were loaded or kicked.
Configuring moves¶
The moves are selected and tuned through the [TIS] and [RETIS] input sections. The most relevant keywords are:
Keyword |
Controls |
|---|---|
The move used in each ensemble ( |
|
Aimless vs. non-aimless shooting and the velocity-perturbation width. |
|
Number of sub-trajectories for Stone Skipping, Web Throwing and Wire Fencing. |
|
Selects the high-acceptance variant of the sub-trajectory moves. |
|
The cap interface used by Wire Fencing. |
|
The probability of a swap move. |