OpenMM
 All Classes Namespaces Functions Variables Pages
RPMDIntegrator Class Reference

This is an Integrator which simulates a System using ring polymer molecular dynamics (RPMD). More...

+ Inheritance diagram for RPMDIntegrator:

Public Member Functions

def getNumCopies
 getNumCopies(RPMDIntegrator self) -> int More...
 
def getTemperature
 getTemperature(RPMDIntegrator self) -> double More...
 
def setTemperature
 setTemperature(RPMDIntegrator self, double temp) More...
 
def getFriction
 getFriction(RPMDIntegrator self) -> double More...
 
def setFriction
 setFriction(RPMDIntegrator self, double coeff) More...
 
def getApplyThermostat
 getApplyThermostat(RPMDIntegrator self) -> bool More...
 
def setApplyThermostat
 setApplyThermostat(RPMDIntegrator self, bool apply) More...
 
def getRandomNumberSeed
 getRandomNumberSeed(RPMDIntegrator self) -> int More...
 
def setRandomNumberSeed
 setRandomNumberSeed(RPMDIntegrator self, int seed) More...
 
def getContractions
 getContractions(RPMDIntegrator self) -> mapii More...
 
def setPositions
 setPositions(RPMDIntegrator self, int copy, std::vector< Vec3,std::allocator< Vec3 > > const & positions) More...
 
def setVelocities
 setVelocities(RPMDIntegrator self, int copy, std::vector< Vec3,std::allocator< Vec3 > > const & velocities) More...
 
def getTotalEnergy
 getTotalEnergy(RPMDIntegrator self) -> double More...
 
def step
 step(RPMDIntegrator self, int steps) More...
 
def getState
 getState(self, copy, getPositions = False, getVelocities = False, getForces = False, getEnergy = False, getParameters = False, enforcePeriodicBox = False, groups = -1) -> State More...
 
def __init__
 init(OpenMM::RPMDIntegrator self, int numCopies, double temperature, double frictionCoeff, double stepSize) -> RPMDIntegrator init(OpenMM::RPMDIntegrator self, int numCopies, double temperature, double frictionCoeff, double stepSize, mapii contractions) -> RPMDIntegrator init(OpenMM::RPMDIntegrator self, RPMDIntegrator other) -> RPMDIntegrator More...
 
def __del__
 del(OpenMM::RPMDIntegrator self) More...
 
- Public Member Functions inherited from Integrator
def __init__
 
def __del__
 del(OpenMM::Integrator self) More...
 
def getStepSize
 getStepSize(Integrator self) -> double More...
 
def setStepSize
 setStepSize(Integrator self, double size) More...
 
def getConstraintTolerance
 getConstraintTolerance(Integrator self) -> double More...
 
def setConstraintTolerance
 setConstraintTolerance(Integrator self, double tol) More...
 
def step
 step(Integrator self, int steps) More...
 

Public Attributes

 this
 

Detailed Description

This is an Integrator which simulates a System using ring polymer molecular dynamics (RPMD).

It simulates many copies of the System, with successive copies connected by harmonic springs to form a ring. This allows certain quantum mechanical effects to be efficiently simulated.

By default this Integrator applies a PILE thermostat to the system to simulate constant temperature dynamics. You can disable the thermostat by calling setApplyThermostat(false).

Because this Integrator simulates many copies of the System at once, it must be used differently from other Integrators. Instead of setting positions and velocities by calling methods of the Context, you should use the corresponding methods of the Integrator to set them for specific copies of the System. Similarly, you should retrieve state information for particular copies by calling getState() on the Integrator. Do not query the Context for state information.

You can optionally specify a set of "ring polymer contractions", by which different force groups are evaluated on different numbers of copies, instead of computing every force on every copy. This can be much more efficient, since different forces may vary widely in how many times they must be evaluated to produce sufficient accuracy. For example, you might simulate a 32 copy ring polymer and evaluate bonded forces on every copy, but contract it down to only 6 copies for computing nonbonded interactions, and down to only a single copy (the centroid) for computing the reciprocal space part of PME.

Constructor & Destructor Documentation

def __init__ (   self,
  args 
)

init(OpenMM::RPMDIntegrator self, int numCopies, double temperature, double frictionCoeff, double stepSize) -> RPMDIntegrator init(OpenMM::RPMDIntegrator self, int numCopies, double temperature, double frictionCoeff, double stepSize, mapii contractions) -> RPMDIntegrator init(OpenMM::RPMDIntegrator self, RPMDIntegrator other) -> RPMDIntegrator

Create a RPMDIntegrator.

Parameters
numCopiesthe number of copies of the system that should be simulated
temperaturethe temperature of the heat bath (in Kelvin)
frictionCoeffthe friction coefficient which couples the system to the heat bath (in inverse picoseconds)
stepSizethe step size with which to integrator the system (in picoseconds)
contractionsthe ring polymer contractions to use for evaluating different force groups. Each key in the map is the index of a force group, and the corresponding value is the number of copies to evaluate that force group on. If no entry is provided for a force group (the default), it is evaluated independently on every copy.

References simtk.openmm.openmm.stripUnits().

def __del__ (   self)

del(OpenMM::RPMDIntegrator self)

References simtk.openmm.openmm.stripUnits().

Member Function Documentation

def getApplyThermostat (   self)

getApplyThermostat(RPMDIntegrator self) -> bool

Get whether a thermostat is applied to the system.

References simtk.openmm.openmm.stripUnits().

def getContractions (   self)

getContractions(RPMDIntegrator self) -> mapii

Get the ring polymer contractions to use for evaluating different force groups. Each key in the map is the index of a force group, and the corresponding value is the number of copies to evaluate that force group on. If no entry is provided for a force group, it is evaluated independently on every copy.

References simtk.openmm.openmm.stripUnits().

def getFriction (   self)

getFriction(RPMDIntegrator self) -> double

Get the friction coefficient which determines how strongly the system is coupled to the heat bath (in inverse ps).

References simtk.openmm.openmm.stripUnits().

def getNumCopies (   self)

getNumCopies(RPMDIntegrator self) -> int

Get the number of copies of the system being simulated.

References simtk.openmm.openmm.stripUnits().

def getRandomNumberSeed (   self)

getRandomNumberSeed(RPMDIntegrator self) -> int

Get the random number seed. See setRandomNumberSeed() for details.

References simtk.openmm.openmm.stripUnits().

def getState (   self,
  copy,
  getPositions = False,
  getVelocities = False,
  getForces = False,
  getEnergy = False,
  getParameters = False,
  enforcePeriodicBox = False,
  groups = -1 
)

getState(self, copy, getPositions = False, getVelocities = False, getForces = False, getEnergy = False, getParameters = False, enforcePeriodicBox = False, groups = -1) -> State

Get a State object recording the current state information about one copy of the system.

Parameters
copy(int) the index of the copy for which to retrieve state information
getPositions(bool=False) whether to store particle positions in the State
getVelocities(bool=False) whether to store particle velocities in the State
getForces(bool=False) whether to store the forces acting on particles in the State
getEnergy(bool=False) whether to store potential and kinetic energy in the State
getParameter(bool=False) whether to store context parameters in the State
enforcePeriodicBox(bool=False) if false, the position of each particle will be whatever position is stored in the Context, regardless of periodic boundary conditions. If true, particle positions will be translated so the center of every molecule lies in the same periodic box.
groups(int=-1) a set of bit flags for which force groups to include when computing forces and energies. Group i will be included if (groups&(1<<i)) != 0. The default value includes all groups.

References Context._getStateAsLists(), and RPMDIntegrator._getStateAsLists().

Referenced by RPMDIntegrator.step().

def getTemperature (   self)

getTemperature(RPMDIntegrator self) -> double

Get the temperature of the heat bath (in Kelvin).

References simtk.openmm.openmm.stripUnits().

def getTotalEnergy (   self)

getTotalEnergy(RPMDIntegrator self) -> double

Get the total energy of the ring polymer. This includes the potential and kinetic energies of all copies, plus the potential energy of the harmonic springs that link copies together.

References simtk.openmm.openmm.stripUnits().

def setApplyThermostat (   self,
  args 
)

setApplyThermostat(RPMDIntegrator self, bool apply)

Set whether a thermostat is applied to the system.

References simtk.openmm.openmm.stripUnits().

def setFriction (   self,
  args 
)

setFriction(RPMDIntegrator self, double coeff)

Set the friction coefficient which determines how strongly the system is coupled to the heat bath (in inverse ps).

Parameters
coeffthe friction coefficient, measured in 1/ps

References simtk.openmm.openmm.stripUnits().

def setPositions (   self,
  args 
)

setPositions(RPMDIntegrator self, int copy, std::vector< Vec3,std::allocator< Vec3 > > const & positions)

Set the positions of all particles in one copy of the system.

Parameters
copythe index of the copy for which to set positions
positionsthe positions of all particles in the system

References simtk.openmm.openmm.stripUnits().

def setRandomNumberSeed (   self,
  args 
)

setRandomNumberSeed(RPMDIntegrator self, int seed)

Set the random number seed. The precise meaning of this parameter is undefined, and is left up to each Platform to interpret in an appropriate way. It is guaranteed that if two simulations are run with different random number seeds, the sequence of random forces will be different. On the other hand, no guarantees are made about the behavior of simulations that use the same seed. In particular, Platforms are permitted to use non-deterministic algorithms which produce different results on successive runs, even if those runs were initialized identically.

References simtk.openmm.openmm.stripUnits().

def setTemperature (   self,
  args 
)

setTemperature(RPMDIntegrator self, double temp)

Set the temperature of the heat bath (in Kelvin).

Parameters
tempthe temperature of the heat bath, measured in Kelvin

References simtk.openmm.openmm.stripUnits().

def setVelocities (   self,
  args 
)

setVelocities(RPMDIntegrator self, int copy, std::vector< Vec3,std::allocator< Vec3 > > const & velocities)

Get the velocities of all particles in one copy of the system.

Parameters
copythe index of the copy for which to set velocities
velocitiesthe velocities of all particles in the system

References simtk.openmm.openmm.stripUnits().

def step (   self,
  args 
)

step(RPMDIntegrator self, int steps)

Advance a simulation through time by taking a series of time steps.

Parameters
stepsthe number of time steps to take

References RPMDIntegrator.getState(), and simtk.openmm.openmm.stripUnits().

Member Data Documentation

this

Referenced by System.__init__().


The documentation for this class was generated from the following file: