#include <Simulation.h>

Public Member Functions | |
| Simulation () | |
| Constructor. | |
| Simulation (const Simulation &) | |
| Copy constructor. | |
| virtual Simulation * | Clone () |
| Clone function. | |
| virtual | ~Simulation () |
| Destructor. | |
| void | operator++ (const int) |
| Step the simulation forward one timestep. | |
| void | operator+= (const int) |
| Step the simulation forward "n" timesteps. | |
| void | operator-- (const int) |
| Step the simulation backward one timestep. | |
| void | operator-= (const int) |
| Step the simulation backward n timesteps. | |
| void | StepForward (const int) |
| Step the simulation forward "n" timesteps. | |
| void | StepBackward (const int) |
| Step the simulation backward "n" timesteps. | |
| void | RescaleSystem (const glotz_flt) |
| void | RescaleSystem (const glotz_vec) |
| void | RescaleSystem (const glotz_flt, const glotz_flt, const glotz_flt) |
| void | RescaleVelocities (const glotz_flt) |
| void | InvertVelocities () |
| void | ZeroLinearMomentum () |
| int | Fail () |
| Get a boolean value indicating whether or not the simulation has failed. | |
| void | Save (const char *) |
| Save the current state of the simulation. | |
| void | Restore (const char *) |
| Restore the simulaiton from a previous state. | |
| void | Save () |
| Save the current state of the simulation. | |
| void | Load (const char *) |
| Restore the simulaiton from a previous state. | |
| void | Serialize (glotzutil::Archive &) |
| virtual glotz_flt | ComputePotentialEnergy () |
| Compute the system potential energy. | |
| virtual glotz_flt | ComputeKineticEnergy () |
| Compute the system kinetic energy. | |
| virtual glotz_flt | ComputeLinearKineticEnergy () |
| Compute kinetic energy from translation. | |
| virtual glotz_flt | ComputeAngularKineticEnergy () |
| Compute kinetic energy from rotation. | |
| virtual glotz_flt | ComputeVirial () |
| Compute the system viral. | |
| virtual glotz_flt | ComputeTemperature () |
| Compute the system temperature. | |
| virtual glotz_flt | ComputePressure () |
| Compute the system pressure. | |
| virtual glotz_flt | ComputeTotalEnergy () |
| Compute the system total energy. | |
| virtual glotz_flt | ComputeNumberDensity () |
| Compute the number density. | |
| virtual glotz_flt | ComputeVolumeFraction () |
| Compute the volume fraction. | |
| virtual int | ComputeDegreesOfFreedom () |
| Compute the system's degrees of freedom. | |
| void | AddParticle (Particle *) |
| Add a new particle to the system. | |
| void | AddInteraction (const int, const int, Potential *) |
| Add a new set of particle interactions to the system. | |
| void | AddSimulationModifier (SimulationModifier *) |
| Add a new modifier the the simulation. | |
| void | RemoveParticle (Particle *) |
| Remove an existing particle from the system. | |
| void | RemoveSimulationModifier (SimulationModifier *) |
| Remove an existing modifier from the simulation. | |
| void | RemoveInteraction (Potential *) |
| Remove an existing set of particle interactions from the system. | |
| void | SetForceRoutine (ForceRoutine *) |
| Set the force calculation method. | |
| void | SetIntegrationScheme (IntegrationScheme *) |
| Set the scheme used to integrate Newton's equations of motion. | |
| void | SetBoundaryConditions (BoundaryConditions *) |
| Set the type of boundary conditions. | |
| void | SetUnits (Units *) |
| Set the type of units (reduced, real, etc.). | |
| void | SetDimensions (const int) |
| Set the number of dimensions. | |
| void | SetTimestep (const glotz_flt) |
| Set the integration timestep. | |
| void | SetConfiguration (glotzdatasources::Lattice *) |
| Set the initial configuration (requires datasources enabled). | |
| BoundaryConditions * | GetBoundaryConditions () |
| Get a pointer to the boundary conditions. | |
| std::string | GetEnsemble () |
| Get a string describing the ensmeble being sampled. | |
| glotz_flt | GetTargetTemperature () |
| Get thermostat temperature. | |
| glotz_flt | GetTargetPressure () |
| Get barostat pressure. | |
| glotz_flt | GetTimestep () |
| Get the size of the simulation timestep. | |
| ErrorList | GetErrorList () |
| Get the list of errors that the simulation has encountered. | |
| ObjectList & | GetObjects () |
| Get a list of interacting objects. | |
| ParticleList & | GetParticleList () |
| Get a list of particles. | |
| BeadList & | GetBeadList () |
| Get a list of particles. | |
| int | GetNumberOfObjects () |
| Get the number of interacting objects. | |
| int | GetNumberOfBeads () |
| Get the number of beads. | |
| int | GetNumberOfParticles () |
| Get the number of particles. | |
| int | GetNumberOfRigidBodies () |
| Get the number of rigid bodies. | |
| int | GetNumberOfSprings () |
| Get the number of springs. | |
| int | GetDimensions () |
| Get the dimensionality. | |
| int | GetNumberOfSimulationModifiers () |
| Get the number of simulation modifiers. | |
| int | GetNumberOfPotentials () |
| Get the number of potentials. | |
| int | GetTimesteps () |
| Get the number of timesteps the simulation has performed. | |
| void | PrintPotentialEnergy (std::ostream &) |
| void | PrintPotentialEnergies (std::ostream &) |
| void | PrintPositions (std::ostream &) |
| void | PrintVelocities (std::ostream &) |
| void | PrintForces (std::ostream &) |
| void | PrintVis3d (std::ostream &) |
| void | PrintVis3dTemplate (std::ostream &) |
| void | PrintParticles (std::ostream &, std::string &) |
| void | PrintParticles (std::ostream &, const char *) |
Public Attributes | |
| ParticleList | gParticle |
| Global vector of particles. | |
| ObjectList | gInteractingObject |
| Global vector of objects. | |
| BeadList | gBead |
| Global vector of beads. | |
| RigidBodyList | gRigidBody |
| Global vector of rigid bodies. | |
| SpringList | gSpring |
| Global vector of springs. | |
| PotentialMap | gPotentialMap |
| Global map of potentials. | |
| PotentialList | gPotential |
| Global list of potentials. | |
| SimulationModifierList | gSimulationModifier |
| Global map of simulation components. | |
| ForceRoutine * | gForceRoutine |
| Global pointer to the force routine. | |
| IntegrationScheme * | gIntegrationScheme |
| Global pointer to the integration scheme. | |
| BoundaryConditions * | gBoundaryConditions |
| Global pointer to simulation boundary conditions. | |
| Units * | gUnits |
| Global pointer to the simulation units. | |
| int | gDimensions |
| Simulation dimensions. | |
| glotz_flt | gTimestep |
| Simulation timestep. | |
| SimulationEventManager * | gEventManager |
| Manages "events" or changes to the simulation. | |
| BaseObjectList | gBaseObject |
| List of pointers to all objects (force routines, integrators, particles, etc.). | |
Protected Types | |
| enum | { BACKWARD = -1, FORWARD = 1 } |
Protected Member Functions | |
| void | FinalizeUnserialization () |
| void | CheckForErrors () |
| Check the simulation for errors. | |
| void | HandleEvents () |
| Handle Events. | |
| virtual void | OnEvent () |
| Perform when an event occurs. | |
| void | Timestep () |
Protected Attributes | |
| int | mDirectionOfTime |
| bool | mIsFirstTimeVis3d |
| RigidBodyUpdater * | mRigidBodyUpdater |
| SimulationEvent | mPossibleEvents |
| A list of events that the simulation reacts to. | |
Performs a molecular dynamics (MD) simulation. Can also perform Brownian Dynamics (BD) and Dissipative Particle Dynamics (DPD) simulations as well. For more information on simulation methods, see:
An MD Simulation needs several inputs in order to run.
| glotzmd::Simulation::Simulation | ( | ) |
| glotzmd::Simulation::Simulation | ( | const Simulation & | rhs | ) |
Copy constructor.
| glotzmd::Simulation::~Simulation | ( | ) | [virtual] |
| Simulation * glotzmd::Simulation::Clone | ( | ) | [virtual] |
Clone function.
Clone() creates a new simulation that is identical to the current one and returns a pointer to it. This type of routine is particularly useful when trying to run multiple parallel simulations (i.e. parallel tempering, replica exchange, etc.
Reimplemented from glotzsimapi::SimulationApi.
Reimplemented in glotzlammps::Simulation.
| void glotzmd::Simulation::operator++ | ( | const | int | ) | [virtual] |
Step the simulation forward one timestep.
Reimplemented from glotzsimapi::SimulationApi.
Reimplemented in glotzlammps::Simulation.
| void glotzmd::Simulation::operator+= | ( | const | int | ) | [virtual] |
Step the simulation forward "n" timesteps.
Reimplemented from glotzsimapi::SimulationApi.
Reimplemented in glotzlammps::Simulation.
| void glotzmd::Simulation::operator-- | ( | const | int | ) | [virtual] |
Step the simulation backward one timestep.
Reimplemented from glotzsimapi::SimulationApi.
Reimplemented in glotzlammps::Simulation.
| void glotzmd::Simulation::operator-= | ( | const | int | ) | [virtual] |
Step the simulation backward n timesteps.
Reimplemented from glotzsimapi::SimulationApi.
Reimplemented in glotzlammps::Simulation.
| void glotzmd::Simulation::StepForward | ( | const | int | ) | [virtual] |
Step the simulation forward "n" timesteps.
| timesteps | is the number of timesteps to integrate forward |
Reimplemented from glotzsimapi::SimulationApi.
Reimplemented in glotzlammps::Simulation.
| void glotzmd::Simulation::StepBackward | ( | const | int | ) | [virtual] |
Step the simulation backward "n" timesteps.
Reimplemented from glotzsimapi::SimulationApi.
Reimplemented in glotzlammps::Simulation.
| void glotzmd::Simulation::RescaleSystem | ( | const | glotz_flt | ) |
| void glotzmd::Simulation::RescaleSystem | ( | const | glotz_vec | ) |
| void glotzmd::Simulation::RescaleSystem | ( | const | glotz_flt, | |
| const | glotz_flt, | |||
| const | glotz_flt | |||
| ) |
| void glotzmd::Simulation::RescaleVelocities | ( | const | glotz_flt | ) |
| void glotzmd::Simulation::InvertVelocities | ( | ) |
Reimplemented in glotzlammps::Simulation.
| void glotzmd::Simulation::ZeroLinearMomentum | ( | ) |
| int glotzmd::Simulation::Fail | ( | ) |
Get a boolean value indicating whether or not the simulation has failed.
| void glotzmd::Simulation::Save | ( | const char * | filename | ) |
Save the current state of the simulation.
| filename | is the filename to save the simulation to |
| void glotzmd::Simulation::Restore | ( | const char * | filename | ) |
Restore the simulaiton from a previous state.
| filename | is the filename to load the simulation from |
| void glotzmd::Simulation::Save | ( | ) |
Save the current state of the simulation.
Save to default filename
| void glotzmd::Simulation::Load | ( | const char * | filename | ) |
Restore the simulaiton from a previous state.
| filename | is the filename to load the simulation from |
| void glotzmd::Simulation::Serialize | ( | glotzutil::Archive & | ar | ) | [virtual] |
Reimplemented from glotzutil::Serializable.
| glotz_flt glotzmd::Simulation::ComputePotentialEnergy | ( | ) | [virtual] |
| glotz_flt glotzmd::Simulation::ComputeKineticEnergy | ( | ) | [virtual] |
| glotz_flt glotzmd::Simulation::ComputeLinearKineticEnergy | ( | ) | [virtual] |
Compute kinetic energy from translation.
| glotz_flt glotzmd::Simulation::ComputeAngularKineticEnergy | ( | ) | [virtual] |
Compute kinetic energy from rotation.
| glotz_flt glotzmd::Simulation::ComputeVirial | ( | ) | [virtual] |
Compute the system viral.
| glotz_flt glotzmd::Simulation::ComputeTemperature | ( | ) | [virtual] |
| glotz_flt glotzmd::Simulation::ComputePressure | ( | ) | [virtual] |
| glotz_flt glotzmd::Simulation::ComputeTotalEnergy | ( | ) | [virtual] |
| glotz_flt glotzmd::Simulation::ComputeNumberDensity | ( | ) | [virtual] |
Compute the number density.
| glotz_flt glotzmd::Simulation::ComputeVolumeFraction | ( | ) | [virtual] |
Compute the volume fraction.
| int glotzmd::Simulation::ComputeDegreesOfFreedom | ( | ) | [virtual] |
Compute the system's degrees of freedom.
| void glotzmd::Simulation::AddParticle | ( | Particle * | particle | ) |
Add a new particle to the system.
| particle | is the particle to be added |
| void glotzmd::Simulation::AddInteraction | ( | const | int, | |
| const | int, | |||
| Potential * | potential | |||
| ) |
Add a new set of particle interactions to the system.
| type1 | is one of the interacting types | |
| type2 | is one of the interacting types | |
| potential | is the potential function describing the interaction |
| void glotzmd::Simulation::AddSimulationModifier | ( | SimulationModifier * | mod | ) |
Add a new modifier the the simulation.
| mod | is the modifier to be added |
| void glotzmd::Simulation::RemoveParticle | ( | Particle * | particle | ) |
Remove an existing particle from the system.
| particle | is the particle to be removed |
| void glotzmd::Simulation::RemoveSimulationModifier | ( | SimulationModifier * | mod | ) |
Remove an existing modifier from the simulation.
| mod | is the modifier to remove |
| void glotzmd::Simulation::RemoveInteraction | ( | Potential * | potential | ) |
Remove an existing set of particle interactions from the system.
| potential | is the potential function to be removed |
| void glotzmd::Simulation::SetForceRoutine | ( | ForceRoutine * | forceRoutine | ) |
Set the force calculation method.
| forceRoutine | is the force routine that the simulation will use |
| void glotzmd::Simulation::SetIntegrationScheme | ( | IntegrationScheme * | integrationScheme | ) |
Set the scheme used to integrate Newton's equations of motion.
| integrationScheme | is the integration scheme that the simulation will use |
| void glotzmd::Simulation::SetBoundaryConditions | ( | BoundaryConditions * | boundaryConditions | ) |
Set the type of boundary conditions.
| boundaryConditions | is the set of boundary conditions that the simulation will use |
| void glotzmd::Simulation::SetUnits | ( | Units * | units | ) |
Set the type of units (reduced, real, etc.).
| units | is the unit system used for printing data |
| void glotzmd::Simulation::SetDimensions | ( | const | int | ) |
Set the number of dimensions.
| void glotzmd::Simulation::SetTimestep | ( | const | glotz_flt | ) |
Set the integration timestep.
| timestep | is the integration timestep |
| void glotzmd::Simulation::SetConfiguration | ( | glotzdatasources::Lattice * | datasource | ) |
Set the initial configuration (requires datasources enabled).
| BoundaryConditions * glotzmd::Simulation::GetBoundaryConditions | ( | ) |
Get a pointer to the boundary conditions.
| std::string glotzmd::Simulation::GetEnsemble | ( | ) |
Get a string describing the ensmeble being sampled.
| glotz_flt glotzmd::Simulation::GetTargetTemperature | ( | ) |
Get thermostat temperature.
| glotz_flt glotzmd::Simulation::GetTargetPressure | ( | ) |
Get barostat pressure.
| glotz_flt glotzmd::Simulation::GetTimestep | ( | ) |
Get the size of the simulation timestep.
| ErrorList glotzmd::Simulation::GetErrorList | ( | ) |
Get the list of errors that the simulation has encountered.
| ObjectList & glotzmd::Simulation::GetObjects | ( | ) |
Get a list of interacting objects.
| ParticleList & glotzmd::Simulation::GetParticleList | ( | ) |
Get a list of particles.
| BeadList & glotzmd::Simulation::GetBeadList | ( | ) |
Get a list of particles.
| int glotzmd::Simulation::GetNumberOfObjects | ( | ) |
Get the number of interacting objects.
| int glotzmd::Simulation::GetNumberOfBeads | ( | ) |
Get the number of beads.
| int glotzmd::Simulation::GetNumberOfParticles | ( | ) |
Get the number of particles.
| int glotzmd::Simulation::GetNumberOfRigidBodies | ( | ) |
Get the number of rigid bodies.
| int glotzmd::Simulation::GetNumberOfSprings | ( | ) |
Get the number of springs.
| int glotzmd::Simulation::GetDimensions | ( | ) |
Get the dimensionality.
| int glotzmd::Simulation::GetNumberOfSimulationModifiers | ( | ) |
Get the number of simulation modifiers.
| int glotzmd::Simulation::GetNumberOfPotentials | ( | ) |
Get the number of potentials.
| int glotzmd::Simulation::GetTimesteps | ( | ) | [virtual] |
Get the number of timesteps the simulation has performed.
Reimplemented from glotzsimapi::SimulationApi.
| void glotzmd::Simulation::PrintPotentialEnergy | ( | std::ostream & | os | ) |
Reimplemented in glotzlammps::Simulation.
| void glotzmd::Simulation::PrintPotentialEnergies | ( | std::ostream & | os | ) |
| void glotzmd::Simulation::PrintPositions | ( | std::ostream & | os | ) |
| void glotzmd::Simulation::PrintVelocities | ( | std::ostream & | os | ) |
| void glotzmd::Simulation::PrintForces | ( | std::ostream & | os | ) |
| void glotzmd::Simulation::PrintVis3d | ( | std::ostream & | os | ) |
| void glotzmd::Simulation::PrintVis3dTemplate | ( | std::ostream & | os | ) |
| void glotzmd::Simulation::PrintParticles | ( | std::ostream & | os, | |
| std::string & | format | |||
| ) |
| void glotzmd::Simulation::PrintParticles | ( | std::ostream & | os, | |
| const char * | format | |||
| ) |
| void glotzmd::Simulation::FinalizeUnserialization | ( | ) | [protected] |
| void glotzmd::Simulation::CheckForErrors | ( | ) | [protected] |
Check the simulation for errors.
Prints error messages to the screen.
| void glotzmd::Simulation::HandleEvents | ( | ) | [protected] |
Handle Events.
| void glotzmd::Simulation::OnEvent | ( | ) | [protected, virtual] |
| void glotzmd::Simulation::Timestep | ( | ) | [protected] |
Global vector of particles.
Global vector of objects.
Global vector of beads.
Global vector of rigid bodies.
Global vector of springs.
Global map of potentials.
Global list of potentials.
Global map of simulation components.
Global pointer to the force routine.
Global pointer to the integration scheme.
Global pointer to simulation boundary conditions.
Global pointer to the simulation units.
Simulation dimensions.
| glotz_flt glotzmd::Simulation::gTimestep |
Simulation timestep.
Manages "events" or changes to the simulation.
List of pointers to all objects (force routines, integrators, particles, etc.).
int glotzmd::Simulation::mDirectionOfTime [protected] |
bool glotzmd::Simulation::mIsFirstTimeVis3d [protected] |
RigidBodyUpdater* glotzmd::Simulation::mRigidBodyUpdater [protected] |
SimulationEvent glotzmd::Simulation::mPossibleEvents [protected] |
A list of events that the simulation reacts to.
1.5.3