Spring Shooting in OpenPathSampling¶
Authors: Sander Roet
This module implements the spring shooting method in OpenPathSampling
Purpose of Module¶
Transition path sampling is most efficient when paths are generated from the top of the free energy barrier. However, complex (biomolecular) activated processes, such as nucleation or protein binding/unbinding, can have asymmetric and peaked barriers. Using uniform selection on these type of processes will not be efficient, as it, on average, results in selected points that are not on the top of the barrier. Paths generated from these points have a low acceptance probability and accepted transition paths decorrelate slowly, resulting in a low overall efficiency. Spring shooting was developed to increase the efficiency of path sampling of these types of barriers, without any prior knowledge of the barrier shape. The spring shooting algorithm uses a shooting point selector that is biased with a spring potential. This bias pulls the selection of points towards the transition state at the top of the barrier. The paths that are generated from points selected by this biased selector therefore have an increased acceptance probability and decorrelation between accepted transition paths is also increased. This results in a higher overall efficiency. The spring shooting algorithm is described by Brotzakis and Bolhuis (http://dx.doi.org/10.1063/1.4965882).
In summary, the spring shooting selection algorithm is a selector for the
one-way shooting method for transition path sampling, which uses a bias. This
bias is of the shape
. Where
for
forward shooting and
for backward shooting,
is the
given spring constant and
is the
number of shifted frames of the new shooting point
compared to the previous accepted shooting point
. The choice of
is limited to the interval
. The shooting move is rejected if
a
is selected that is outside of the current path and is
accepted if the trajectory satisfies the path ensemble.
The main difference of this module compared to the paper is that instead of using a rejection algorithm to sample from the correct distribution, the correct distribution is sampled directly.
The implementation introduces the following new classes:
SpringShootingSelectorinherits fromShootingPointSelectorand implements the shooting point selection, using a bias of the shape
. At initialization it also takes an
initial_guessas the initial reference point. This will default tofloor(len(trajectory)/2). To correctly keep track of the history the selector has to be the same instance for the forward and backward mover. Thepickfunction has to be called with a direction in order to be able to use the correct value for
. The selector then
draws a random number in the range
, multiplies it with the
sum of the biases. It the sums the biases from
to
and returns the index when this sum is bigger than the
random number.
The restart_from_stepfunction makes it possible to restart the selector at a specific step. It takes anMCStepand reconstructs the correct history from theMoveDetails.SpringMoverinherits fromEngineMoverand is the parent class for theForwardSpringMoverandBackwardSpringMoverclasses. It calls theselector.pickfunction withself.directionto get the correct shooting point. It also build adds the neededMoveDetailsin order to be able to restart the selector. If an invalid snapshot has been chosen it will not run dynamics but will build aSamplewith an acceptance probability of 0.0.SpringShootingMoverinherits fromSpecializedRandomChoiceMoverand behaves similar, except it takes the extra arguments:delta_max,k_springandinitial_guess. These are then used to make theSpringShootingSelectorand this selector is given to both the forward and backward mover.SpringShootingStrategyinherits fromSingleEnsembleMoveStrategyand will make theSpringShootingMoverfor every ensemble, with the given values ofdelta_max,k_springandinitial_guess.SpringShootingMoveSchemeinherits fromMoveSchemeand it will use theSpringShootingStrategyto build all the necessary movers for the givennetwork, with the given values ofdelta_max,k_springandinitial_guess. Also the functionsto_dictandfrom_dicthave been adapted to save and load with all the data
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¶
This module has been included in the OpenPathSampling core. Its tests can
be run by setting up a developer install of OpenPathSampling and running
the command py.test from the root directory of the repository.
Examples¶
- An example on how to set up a simulation using the
SpringShootingMoveSchemeand the comparison with theUniformSelectorcan be found inspring_shooting_example.ipynbin theexamples/miscdirectory (https://github.com/openpathsampling/openpathsampling/tree/master/examples/misc). Open it usingjupyter notebook spring_shooting_example.ipynb(seeJupyter notebookdocumentation at http://jupyter.org/ for more details)
Source Code¶
This module has been merged into OpenPathSampling. It was added in the following pull request: