OpenMM
 All Classes Namespaces Functions Variables Enumerations Enumerator Friends
AndersenThermostat Class Reference

This class uses the Andersen method to maintain constant temperature. More...

#include <AndersenThermostat.h>

+ Inheritance diagram for AndersenThermostat:

Public Member Functions

 AndersenThermostat (double defaultTemperature, double defaultCollisionFrequency)
 Create an AndersenThermostat.
 
double getDefaultTemperature () const
 Get the default temperature of the heat bath (in Kelvin).
 
double getDefaultCollisionFrequency () const
 Get the default collision frequency (in 1/ps).
 
int getRandomNumberSeed () const
 Get the random number seed.
 
void setRandomNumberSeed (int seed)
 Set the random number seed.
 
- Public Member Functions inherited from Force
 Force ()
 
virtual ~Force ()
 
int getForceGroup () const
 Get the force group this Force belongs to.
 
void setForceGroup (int group)
 Set the force group this Force belongs to.
 

Static Public Member Functions

static const std::string & Temperature ()
 This is the name of the parameter which stores the current temperature of the heat bath (in Kelvin).
 
static const std::string & CollisionFrequency ()
 This is the name of the parameter which store the current collision frequency (in 1/ps).
 

Protected Member Functions

ForceImplcreateImpl ()
 When a Context is created, it invokes this method on each Force in the System.
 
- Protected Member Functions inherited from Force
ForceImplgetImplInContext (Context &context)
 Get the ForceImpl corresponding to this Force in a Context.
 
ContextImplgetContextImpl (Context &context)
 Get the ContextImpl corresponding to a Context.
 

Detailed Description

This class uses the Andersen method to maintain constant temperature.

Constructor & Destructor Documentation

AndersenThermostat ( double  defaultTemperature,
double  defaultCollisionFrequency 
)

Create an AndersenThermostat.

Parameters
defaultTemperaturethe default temperature of the heat bath (in Kelvin)
defaultCollisionFrequencythe default collision frequency (in 1/ps)

Member Function Documentation

static const std::string& CollisionFrequency ( )
inlinestatic

This is the name of the parameter which store the current collision frequency (in 1/ps).

ForceImpl* createImpl ( )
protectedvirtual

When a Context is created, it invokes this method on each Force in the System.

It should create a new ForceImpl object which can be used by the context for calculating forces. The ForceImpl will be deleted automatically when the Context is deleted.

Implements Force.

double getDefaultCollisionFrequency ( ) const
inline

Get the default collision frequency (in 1/ps).

Returns
the default collision frequency, measured in 1/ps.
double getDefaultTemperature ( ) const
inline

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

Returns
the default temperature of the heat bath, measured in Kelvin.
int getRandomNumberSeed ( ) const
inline

Get the random number seed.

See setRandomNumberSeed() for details.

void setRandomNumberSeed ( int  seed)
inline

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

static const std::string& Temperature ( )
inlinestatic

This is the name of the parameter which stores the current temperature of the heat bath (in Kelvin).


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