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. 25 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.


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:

Retis 1D example
================

Simulation
----------
task = retis
steps = 200000
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
shooting_moves = ['sh', 'sh', 'ss', 'ss', 'wt', 'wt', 'wf', 'wf']
interface_sour = -0.8
interface_cap = 0.1
n_jumps = 6

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.


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 example
================

Simulation
----------
task = retis
steps = 200000
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
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 = backup
order-file = -1
trajectory-file = -1
energy-file = -1

The initial configuration initial.xyz should be downloaded and put in the same folder. The simulation can then be executed using:

pyretisrun -i retis.rst -p

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