ProtoMol - an object-oriented component based framework for Molecular Dynamics simulations.

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

ProtoMol::MCIntegrator Class Reference

#include <MCIntegrator.h>

Inheritance diagram for ProtoMol::MCIntegrator:

ProtoMol::MTSIntegrator ProtoMol::StandardIntegrator ProtoMol::Integrator ProtoMol::Makeable ProtoMol::DLMCIntegrator ProtoMol::HMCIntegrator ProtoMol::ShadowHMCIntegrator List of all members.

Public Member Functions

 MCIntegrator ()
 MCIntegrator (int cycles, bool randomCycLen, Real initialTemperature, ForceGroup *overloadedForces, StandardIntegrator *nextIntegrator)
virtual ~MCIntegrator ()
virtual void getParameters (std::vector< Parameter > &parameters) const
virtual void initialize (GenericTopology *topo, Vector3DBlock *positions, Vector3DBlock *velocities, ScalarStructure *energies)
virtual void run (int numTimesteps)
Real getInitialTemperature () const

Protected Member Functions

virtual void walk (int steps)
virtual bool metropolisTest ()
bool metropolisTest (Real newEnergy, Real oldEnergy)
virtual void perturbSystem ()=0
virtual void saveValues ()=0
virtual void restoreValues ()=0

Protected Attributes

const bool myRandomCycLen
Real myTime
Vector3DBlockmyOldPositions
Vector3DBlockmyOldVelocities
ScalarStructuremyOldEnergies

Private Attributes

Real myInitialTemperature
Real myOldKineticEnergy

Detailed Description

Base class for Monte Carlo MTS integrators.


Constructor & Destructor Documentation

ProtoMol::MCIntegrator::MCIntegrator  ) 
 

ProtoMol::MCIntegrator::MCIntegrator int  cycles,
bool  randomCycLen,
Real  initialTemperature,
ForceGroup overloadedForces,
StandardIntegrator nextIntegrator
 

ProtoMol::MCIntegrator::~MCIntegrator  )  [virtual]
 


Member Function Documentation

Real ProtoMol::MCIntegrator::getInitialTemperature  )  const [inline]
 

void ProtoMol::MCIntegrator::getParameters std::vector< Parameter > &  parameters  )  const [virtual]
 

retrieve all parameters

Reimplemented from ProtoMol::MTSIntegrator.

Reimplemented in ProtoMol::ShadowHMCIntegrator.

void ProtoMol::MCIntegrator::initialize GenericTopology topo,
Vector3DBlock positions,
Vector3DBlock velocities,
ScalarStructure energies
[virtual]
 

Set the integrator up. This method can be called at any time, and should perform any starting force evaluations the integrator needs in order to run correctly. The simulation data should be kept in the given structures.

Reimplemented from ProtoMol::MTSIntegrator.

Reimplemented in ProtoMol::DLMCIntegrator, ProtoMol::HMCIntegrator, and ProtoMol::ShadowHMCIntegrator.

bool ProtoMol::MCIntegrator::metropolisTest Real  newEnergy,
Real  oldEnergy
[protected]
 

Implementation of the metropolis test.

bool ProtoMol::MCIntegrator::metropolisTest  )  [protected, virtual]
 

Metropolis test interface which calls metropolisTest with arguments.

virtual void ProtoMol::MCIntegrator::perturbSystem  )  [protected, pure virtual]
 

Each class must implement its own system perturbation method.

Implemented in ProtoMol::DLMCIntegrator, ProtoMol::HMCIntegrator, and ProtoMol::ShadowHMCIntegrator.

void ProtoMol::MCIntegrator::restoreValues  )  [protected, pure virtual]
 

Implemented in ProtoMol::DLMCIntegrator, ProtoMol::HMCIntegrator, and ProtoMol::ShadowHMCIntegrator.

void ProtoMol::MCIntegrator::run int  numTimesteps  )  [virtual]
 

Run the integrator for the certain number of timesteps. It can be assumed that the topology and forces have not changed since the last time the integrator was initialized.

Reimplemented from ProtoMol::StandardIntegrator.

Reimplemented in ProtoMol::ShadowHMCIntegrator.

void ProtoMol::MCIntegrator::saveValues  )  [protected, pure virtual]
 

Save/restore state implementations (default pos, vel & energies).

Implemented in ProtoMol::DLMCIntegrator, ProtoMol::HMCIntegrator, and ProtoMol::ShadowHMCIntegrator.

void ProtoMol::MCIntegrator::walk int  steps  )  [protected, virtual]
 

Implements the MC algorithm.


Member Data Documentation

Real ProtoMol::MCIntegrator::myInitialTemperature [private]
 

ScalarStructure* ProtoMol::MCIntegrator::myOldEnergies [protected]
 

Real ProtoMol::MCIntegrator::myOldKineticEnergy [private]
 

Vector3DBlock* ProtoMol::MCIntegrator::myOldPositions [protected]
 

Vector3DBlock* ProtoMol::MCIntegrator::myOldVelocities [protected]
 

const bool ProtoMol::MCIntegrator::myRandomCycLen [protected]
 

There is some evidence that random cycle lengths reduce correlations between steps. Ref: Mackenzie 1989, "An Improved Hybrid Monte Carlo Method". Off by default. XXX May not display time correctly.

Real ProtoMol::MCIntegrator::myTime [protected]
 


The documentation for this class was generated from the following files: Last update: . GNU GENERAL PUBLIC LICENSE, copyrighted by the University of Notre Dame and the University of Bergen, Norway.