Web Throwing in OpenPathSampling¶
Authors: Sander Roet, Anders Lervik, Enrico Riccardi
This module implements the web throwing method in OpenPathSampling
Purpose of Module¶
Web throwing is a Monte Carlo move in path space designed to improve the efficiency of transition interface sampling (TIS). It consists of a smart selection of shooting points and shooting moves that respects super detailed balance. The web throwing algorithm generates paths that have a much lower correlation with their original paths, even if it is more computational expensive than standard shooting. The strategy thus can significantly reduce the computational time required to study transition events and to quantify their rates. The web throwing algorithm is described by Riccardi, Dahlen, and van Erp (http://dx.doi.org/10.1021/acs.jpclett.7b01617)
The web throwing method is an shooting method for transition
interface sampling that decorrelates the trajectory between an interface
and an associated surface of unlikely return
. It does this by doing n_cycles
of
Transition Path Sampling (TPS) from to
.
The first frame in this volume is selected for a forwards shot and the last
frame in this volume is selected for a backwards shot. After the n_cycles
the new sub-trajectory is extended in both ways to satisfy the TIS ensemble.
The sampling efficiency is increased significantly if
and are positioned before and
after the barrier in the potential, respectively.
The implementation introduces the following new classes:
SecondFrameSelector
inherits fromShootingPointSelector
and selects the second frame (index = 1
) from a trajectory.SecondToLastFrameSelector
inherits fromShootingPointSelector
and selects the second to last frame of a trajectory (index = len(trajectory)-2
).WebEnsemble
inherits fromSequentialEnsemble
and implements the sampling ensemble between theVolume
and theVolume
in which the web throwing occurs.WebBackwardExtendEnsemble
inherits fromSequentialEnsemble
and implements the ensemble the partial path has to fit in after the backwards extend. This ensemble consists of one frame in the initial state followed by frames outside of any states. This should only be used in backward moves, as this only has an acceptable stop in this direction.WebShootingMover
inherits fromRandomChoiceMover
and implements the TPS shooting algorithm in theWebEnsemble
using theSecondFrameSelector
for theForwardShootMover
and theSecondToLastFrameSelector
for theBackwardShootMover
.WebCycleMover
inherits fromSequentialMover
and implementsn_cycles
sequentialWebShootingMover
in theWebEnsmeble
.WebExtendMover
inherits fromConditionalSequentialMover
and extend the sub trajectory after web throwing. It first simulates backwards to reach the initial TIS state. If this reaches any other state, the whole move is rejected. If this indeed finds the correct state the sub trajectory is extended in the forward direction to complete the TIS ensemble.WebThrowingMover
inherits fromSubPathMover
and is the canonical mover for the web throwing algorithm. From a TISensemble
it first selects a random sub-trajectory in theweb_ensemble
. Then it calls theWebCycleMover
withn_cycles
. Finally it calls theWebExtendMover
to extend the sub-trajectory back into the TISensemble
.WebThrowingStrategy
inherits fromMoveStrategy
and it builds theWebThrowingMover
for every{interface: lambda_sour}
in thesours
dictionary. Every interface should have only 1lambda_sour
associated with it.WebThrowingScheme
inherits fromMoveScheme
. This is aMoveScheme
that only does web throwing. This is mostly a convenience class used in examples and testing.
Background Information¶
This module builds on OpenPathSampling, a Python package for path sampling simulations. To learn more about OpenPathSampling, you might be interested in reading:
- OPS documentation: http://openpathsampling.org
- OPS source code: http://github.com/openpathsampling/openpathsampling
Testing¶
The tests for this module can be run by installing OpenPathSampling,
downloading source code for the module (see the Source Code
section below), and installing it by running by running
python setup.py install
from the root directory of the package.
Test this module with the nose package, by running the command nosetests
from the root directory of the repository.
Examples¶
All examples can be found in the examples
directory
(https://gitlab.e-cam2020.eu/sroet/web_throwing/tree/master/examples).
Open the ipython notebook (files with the extension .ipynb
) of interest by
running jupyter notebook file_of_interest.ipynb
in this directory, replacing
file_of_interest.ipynb
by the file you want to open. (see
Jupyter notebook
documentation at http://jupyter.org/ for more details)
The examples are:
- An example on how to set up a multiple interface set TIS (MISTIS) simulation with only web throwing and the analysis of the web throwing moves can be found in mistis_using_only_webthrowing.ipynb.
- An example on how to add the web throwing to a default MISTIS simulation can be found in adding_webthrowing_to_mistis.ipynb. This example also shows how to change the selection weight of this move and some analysis.
Source Code¶
The source code for this module can be found in: https://gitlab.e-cam2020.eu/sroet/web_throwing/tree/master.