# AndersenThermostat Class Reference

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

`#include <AndersenThermostat.h>`

Inheritance diagram for AndersenThermostat:

List of all members.

## Public Member Functions
| AndersenThermostat (double defaultTemperature, double defaultCollisionFrequency)
| Create an AndersenThermostat.
double | getDefaultTemperature () const
| Get the default temperature of the heat bath (in Kelvin).
void | setDefaultTemperature (double temperature)
| Set the default temperature of the heat bath.
double | getDefaultCollisionFrequency () const
| Get the default collision frequency (in 1/ps).
void | setDefaultCollisionFrequency (double frequency)
| Set the default collision frequency.
int | getRandomNumberSeed () const
| Get the random number seed.
void | setRandomNumberSeed (int seed)
| Set the random number seed.
## 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
ForceImpl * | createImpl () const
| When a Context is created, it invokes this method on each Force in the System.

## Detailed Description

This class uses the Andersen method to maintain constant temperature.

## Constructor & Destructor Documentation

AndersenThermostat | ( | double | defaultTemperature,
|  | double | defaultCollisionFrequency |
| ) |  |  |

Create an AndersenThermostat.

Parameters:

  | defaultTemperature | the default temperature of the heat bath (in Kelvin)
  | defaultCollisionFrequency | the default collision frequency (in 1/ps)

## Member Function Documentation

static const std::string& CollisionFrequency | ( |  | ) | `[inline, static]`

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

ForceImpl* createImpl | ( |  | ) | const`[protected, virtual]`

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 setDefaultCollisionFrequency | ( | double | frequency | ) | `[inline]`

Set the default collision frequency.

This will affect any new Contexts you create, but not ones that already exist.

Parameters:

  | frequency | the default collision frequency (in 1/ps)

void setDefaultTemperature | ( | double | temperature | ) | `[inline]`

Set the default temperature of the heat bath.

This will affect any new Contexts you create, but not ones that already exist.

Parameters:

  | temperature | the default temperature of the heat bath (in Kelvin)

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 | ( |  | ) | `[inline, static]`

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:

- AndersenThermostat.h