Two-Way Shooting in OpenPathSampling¶
Authors: David W.H. Swenson
This module adds the ability to do two-way shooting to OpenPathSampling.
Purpose of Module¶
Different types of dynamics are better suited for different kinds of Monte Carlo moves in path sampling. “One-way shooting,” which was already implemented in OpenPathSampling, is an efficient approach for sampling paths when the dynamics are chaotic or diffusive. However, it requires stochastic dynamics, and therefore isn’t appropriate for deterministic dynamics, as should be used with ballistic processes. For ballistic processes and deterministic dynamics, the “two-way shooting” move, which is implemented in this module, should be used. These moves differ in that one-way shooting selects a frame as a shooting point and evolves the trajectory either forward or backward, keeping part of the original trajectory, whereas two-way shooting selects a shooting point, modified it (usually by changing the velocities) and evolves both forward and backward. In one-way shooting, the stochastic dynamics obviates the need to modify the shooting point.
The shooting point selection methods used by one-way shooting can be re-used
for two-way shooting. However, two-way shooting requires a
SnapshotModifier
, which one-way shooting does not. The basics of the
SnapshotModifier
, as well as an implementation which completely
randomizes the velocities according to the Boltzmann distribution, were
included in a module to do committor simulations.
This module implements the movers and move strategies necessary to support two-way shooting:
AbstractTwoWayShootingMover
, subclass ofEngineMover
. There’s a possibility that generalized ensembles may behave differently if you shoot the forward part of the path first, versus the backward part of the path. This isn’t the case for common TIS and TPS ensembles, but in case it is important for other ensembles, we create separate forward-first and backward-first two way shooting movers. This class is a common abstract base class for both.ForwardFirstTwoWayShootingMover
, subclass ofAbstractTwoWayShootingMover
, which implements two-way shooting where the forward half-trajectory is generated first.BackwardFirstTwoWayShootingMOver
, subclass ofAbstractTwoWayShootingMover
, which implements two-way shooting where the backward half-trajectory is generated first.TwoWayShootingMover
, subclass ofRandomChoiceMover
, which randomly selects to either shoot forward-first or backward-first.TwoWayShootingStrategy
, subclass ofMoveStrategy
, which generates aTwoWayShootingMover
for every ensemble of interest.
In addition, this module implements new snapshot modifiers to change the velocities of the shooting point:
GeneralizedDirectionModifier
, subclass ofSnapshotModifier
, which acts as an abstract base class for the specific velocity direction modifiers.VelocityDirectionModifier
, subclass ofGeneralizedDirectionModifier
, which modifies all the velocities of the selected subset of atoms.SingleAtomVelocityDirectionModifier
, subclass ofGeneralizedDirectionModifier
, which modifies the velocities on one of the selected subset of atoms.
Beyond these, the previously existing RandomVelocities
snapshot modifier
is also likely to be used with two-way shooting.
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¶
Tests in OpenPathSampling use the nose package.
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 nosetests
from the root directory of the repository.
Source Code¶
This module has been merged into OpenPathSampling. It is composed of the following pull requests: