#include <molecularDynamics.h>
Inheritance diagram for MolecularDynamics:
Public Member Functions | |
Constructors and Destructors | |
MolecularDynamics () | |
Default constructor. | |
MolecularDynamics (ForceField &force_field) | |
Constructor. | |
MolecularDynamics (const MolecularDynamics &rhs) | |
Copy constructor. | |
virtual | ~MolecularDynamics () |
Destructor. | |
Assignments | |
const MolecularDynamics & | operator= (const MolecularDynamics &rhs) |
Assignment operator. | |
void | set (const MolecularDynamics &rhs) |
Assign a molecular dynamics objects. | |
Debugging and Diagnostics | |
bool | isValid () const |
Has the molecular dynamics class been successfully set up? | |
Setup methods | |
virtual bool | setup (ForceField &force_field, SnapShotManager *snapshot_man) |
Set up the molecular dynamics. | |
virtual bool | setup (ForceField &forcefield, SnapShotManager *snapshot_man, const Options &myoptions) |
Set up the molecular dynamics. | |
virtual bool | specificSetup () |
Specific setup; derived class can use this method for additional preparations if necessary. | |
Accessors | |
void | setNumberOfIteration (Size number) |
Set the number of the current iteration. | |
void | setMaximalNumberOfIterations (Size number) |
Set the maximal number of iterations that will be carried out. | |
void | setMaximalSimulationTime (double time) |
Set the maximal simulation time in ps that will be carried out. | |
virtual void | setTimeStep (double step) |
Set the time step in ps. | |
void | setReferenceTemperature (double temperature) |
Set the reference temperature for the system. | |
void | setCurrentTime (double time) |
Set the current time of the MD run in picoseconds. | |
void | setEnergyOutputFrequency (Size number) |
Set the energy output frequency. | |
void | setSnapShotFrequency (Size number) |
Set the snapshot frequency. | |
Size | getEnergyOutputFrequency () const |
Get the energy output frequency. | |
Size | getNumberOfIterations () const |
Get the current iteration of the MD simulation. | |
Size | getMaximalNumberOfIterations () const |
Get the maximal number of iterations of the MD simulation. | |
double | getMaximalSimulationTime () const |
Get the maximal simulation time of the MD simulation. | |
double | getTimeStep () const |
Get the current time step. | |
Size | getSnapShotFrequency () const |
Get the snapshot frequency. | |
double | getTemperature () const |
Get the current temperature of the system. | |
double | getTime () const |
Get the current time of the MD simulation. | |
double | getTotalEnergy () const |
Get the current total energy of the system. | |
double | getPotentialEnergy () const |
Get the current potential energy of the system. | |
double | getKineticEnergy () const |
Get the current kinetic energy of the system. | |
ForceField * | getForceField () const |
Get the force field the MD simulation is bound to. | |
bool | simulate (bool restart=false) |
Start the molecular dynamics simulation. | |
bool | simulateTime (double simulation_time, bool restart=false) |
Simulate a given time interval. | |
virtual bool | simulateIterations (Size number, bool restart=false) |
Start the molecular dynamics simulation and carry out the given number of iterations. | |
void | enableEnergyAbortCondition (bool state) |
Specify if the MDSimulation aborts if the Energy is greater than abort_energy_. | |
bool | energyAbortConditionEnabled () const |
Query if the MDSimulation aborts if the Energy is greater than abort_energy_. | |
void | setEnergyToAbort (float value) |
Specify the energy to abort the simulation. | |
float | getEnergyToAbort () const |
Query the energy to abort the simulation. | |
Public Attributes | |
Public Attributes | |
Options | options |
The options for this class. | |
Protected Member Functions | |
void | updateInstantaneousTemperature () |
Protected Attributes | |
bool | valid_ |
ForceField * | force_field_ptr_ |
System * | system_ptr_ |
AtomVector | atom_vector_ |
Size | number_of_iteration_ |
Size | maximal_number_of_iterations_ |
double | time_step_ |
double | reference_temperature_ |
double | current_temperature_ |
double | kinetic_energy_ |
double | total_energy_ |
double | current_time_ |
Size | energy_output_frequency_ |
Size | snapshot_frequency_ |
SnapShotManager * | snapshot_manager_ptr_ |
bool | abort_by_energy_enabled_ |
float | abort_energy_ |
This class is the base class for classical molecular dynamics simulations. Actual MD classes are derived from this class and then implement the actual simulation classes for the different ensembles or methods.
|
Default constructor.
|
|
Constructor. It expects the forcefield |
|
Destructor.
|
|
Query the energy to abort the simulation. The default value is 10^8. |
|
Assign a molecular dynamics objects.
|
|
Set the energy output frequency. The current energies during the simulation will be printed every number steps. |
|
Specify the energy to abort the simulation. The default value is 10^8. |
|
Set the maximal number of iterations that will be carried out. If the number of the start iteration is 0 (which is the default), this method sets the total number of simulated iterations. |
|
Set the maximal simulation time in ps that will be carried out. If the start time is zero(which is the default), then this method sets the total simulation time. |
|
Set the reference temperature for the system. In isothermal ensembles, this is the simulation temperature set set by the thermostat. |
|
Set the time step in ps. Note that this will change the maximum simulation time. Reimplemented in CanonicalMD, and MicroCanonicalMD. |
|
Start the molecular dynamics simulation. This method calls simulateIterations with the maximum number of iterations.
|
|
Start the molecular dynamics simulation and carry out the given number of iterations. This is the proper simulation method, which is implemented in the derived classes only. The implementation provided by MolecularDynamics is simply empty.
Reimplemented in CanonicalMD, and MicroCanonicalMD. |
|
Simulate a given time interval. This method determines the number of steps necessary to simulate a given time interval and executes a simulation for that interval by calling simulateIterations .
|