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_v negative, the default): the velocities at the shooting point are redrawn from the Maxwell–Boltzmann distribution at the system temperature.

  • Non-aimless shooting (sigma_v zero or positive): a Gaussian perturbation of width sigma_v (scaled per particle) is added to the current velocities and the momentum change is accepted or rejected with the Metropolis criterion.

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.

Replica swapping (s+ / s-)

The defining move of RETIS. Two neighbouring path ensembles attempt to exchange their accepted paths: a path from [i^+] is offered to [(i+1)^+] and vice versa. Because a path accepted in the higher-index ensemble already crosses the lower interface, one direction is always acceptable by construction; the other is accepted when the incoming path crosses the neighbour’s interface. No integration is needed except for the [0^-]/[0^+] pair, where the equations of motion are integrated. The codes s+ and s- record whether the incoming path came from the higher- or lower-index ensemble. The frequency and pairing of swaps are set by the swapfreq and swapsimul keywords of the [RETIS] section.

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.

The three sub-trajectory moves

Fig. 14 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.

A hands-on walkthrough of configuring these three moves is given in the sub-trajectory moves tutorial.

Infinite swapping and parallel workers

For large, parallel simulations PyRETIS offers an 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.

This path is selected entirely from the input TOML – a [runner] section, or task = "infinite_swapping" under [simulation] – and runs through the same pyretisrun command as every other simulation; the number of parallel workers is a setting in that file.

Because the trajectories are no longer collected from fixed, independent ensembles, the per-interface crossing probabilities and the final rate constant are combined with the Weighted Histogram Analysis Method (WHAM) [4] rather than by simple per-ensemble averaging. See the analysis guide for how to run the WHAM crossing-probability analysis.

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; used internally (see the nullmoves keyword of the [RETIS] section).

  • 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 (re).

Configuring moves

The moves are selected and tuned through the [TIS] and [RETIS] input sections. The most relevant keywords are:

Keyword

Controls

shooting_moves

The move used in each ensemble ('sh', 'ss', 'wt', 'wf').

sigma_v

Aimless vs. non-aimless shooting and the velocity-perturbation width.

n_jumps

Number of sub-trajectories for Stone Skipping, Web Throwing and Wire Fencing.

high_accept

Selects the high-acceptance variant of the sub-trajectory moves.

interface_cap

The cap interface used by Wire Fencing.

swapfreq, swapsimul

How often, and in which pairing, RETIS attempts replica swaps.

References