Subtrajectory moves in a 1D potential

This example shows how to use the subtrajectory monte carlo moves Stone Skipping (SS), Web Throwing (WT) [1] and Wire Fencing (WF) [2] in (Replica Exchange) Transition Interface Sampling simulations for sampling trajectories of a particle in a 1D well. The three moves are sketched out below:

The three subtrajectory moves

Fig. 30 Cartoon representation of the three subtrajectory moves: stone skipping, web throwing and web throwing. The old path is shown in blue. Four subtrajectories are shown in orange. The final new path consists of the fourth subtrajectory and its extensions in green.

Further details on the 1D potential, how to create the PyRETIS input file and calculating reaction rates using TIS/RETIS are explained by the previous 1D potential TIS example and RETIS example.


Verification status: passing – see Tutorial map.

Tutorial quick start

  • Best starting point: examples/tutorials/path_sampling/1D-double-well/submoves/.
  • Edit first: the shooting_moves, interface_sour, interface_cap, and n_jumps settings in the TIS section.
  • Run: pyretisrun -i retis.toml -p from the tutorial folder, or pyretisrun -i retis.rst -p for the section-based input shown below.
  • Analyse: pyretisanalyse -i out.rst after out.rst is created.
  • Expected output: standard RETIS ensemble folders plus move labels for stone skipping, web throwing, and wire fencing in pathensemble.txt.
  • Related check: examples/tests/test-internal/retis-ss-wt-wf/; see Example test status.

Defining the shooting move

To define the specific shooting moves performed in each of the ensembles in i.e. a RETIS simulation, the number of ensembles needs to be known. This information can be obtained from reading the interfaces variable in the simulation section of the input file:

Simulation
----------
task = retis
steps = 200
interfaces = [-0.99, -0.8, -0.7, -0.6, -0.5, -0.4, -0.3, 1.0]

Here we have one \([0^{-}]\) ensemble and seven \([i^{+}]\) ensembles for a total of 8 ensembles. Then we can define the specific shooting moves to be performed in each ensemble in the tis section:

TIS settings
------------
freq = 0.0
maxlength = 50000
allowmaxlength = False
zero_momentum = False
rescale_energy = False
sigma_v = -1
seed = 0
shooting_moves = ['sh', 'sh', 'ss', 'ss', 'wt', 'wt', 'wf', 'wf']
interface_sour = -0.8
interface_cap = 0.1
n_jumps = 6
high_accept = True

The shooting_moves variable defines the list of shooting moves to be used for all the ensembles. Here we see that \([0^{-}]\) and \([0^{+}]\) performs the shooting move while the other ensembles performs the SS, WT and WF moves. The interface_sour sets the SOUR interface for the WT, while if defined, the interface_cap variable sets the upper value limit of subtrajectories generated by the WF move. The variable n_jumps defines the number of subtrajectories to be generated per move and the bool high_accept determines whether the high acceptance protocol should be used or not. See Move types for the full list of move type codes and Path status codes for all acceptance and rejection status codes.


Running the RETIS simulation

Running a RETIS simulation with subtrajectory moves works the same way as running without subtrajectory moves. Below is a complete input file (let’s call it retis.rst).

Show/hide the full input file »

RETIS 1D subtrajectory moves example
====================================

Simulation
----------
task = retis
steps = 200
interfaces = [-0.99, -0.8, -0.7, -0.6, -0.5, -0.4, -0.3, 1.0]

System
------
units = reduced
dimensions = 1
temperature = 0.07

Box
---
periodic = [False]

Engine
------
class = Langevin
timestep = 0.025
gamma = 0.3
high_friction = False
seed = 0

TIS settings
------------
freq = 0.0
maxlength = 50000
allowmaxlength = False
zero_momentum = False
rescale_energy = False
sigma_v = -1
seed = 0
shooting_moves = ['sh', 'sh', 'ss', 'ss', 'wt', 'wt', 'wf', 'wf']
interface_sour = -0.8
interface_cap = 0.1
n_jumps = 6
high_accept = True

RETIS settings
--------------
swapfreq = 0.5
relative_shoots = None
nullmoves = True
swapsimul = True

Initial-path settings
---------------------
method = kick
kick-from = initial

Particles
---------
position = {'input_file': 'initial.xyz'}
mass = {'Ar': 1.0}
name = ['Ar']
ptype = [0]

Forcefield settings
-------------------
description = 1D double well

Potential
---------
class = DoubleWell
a = 1.0
b = 2.0
c = 0.0

Orderparameter
--------------
class = Position
dim = x
index = 0
periodic = False

Output
------
backup = overwrite
order-file = -1
trajectory-file = -1
energy-file = -1

The initial configuration initial.xyz is included in the tutorial folder. The simulation can then be executed using:

pyretisrun -i retis.toml -p

The -p option will display a progress bar for your simulation.


Tested by

The subtrajectory move settings are represented by examples/tutorials/path_sampling/1D-double-well/submoves/ and checked by examples/tests/test-internal/retis-ss-wt-wf/. Use the fixture as the short regression check and this page as the user-facing guide to choosing and interpreting the move settings.

References

[1]E. Riccardi, O. Dahlen and T. S. van Erp, Fast decorrelating Monte Carlo moves for efficient path sampling, J. Phys. Chem. Lett. 8, 4456-4460 (2017), https://doi.org/10.1021/acs.jpclett.7b01617
[2]D. T. Zhang, E. Riccardi and T. S. van Erp, Enhanced path sampling using subtrajectory Monte Carlo moves, J. Chem. Phys. 158, 024113 (2023), https://doi.org/10.1063/5.0127249