Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

MDLJ_Simulation Class Reference

Inheritance diagram for MDLJ_Simulation:

Inheritance graph
[legend]
Collaboration diagram for MDLJ_Simulation:

Collaboration graph
[legend]
List of all members.

Detailed Description

This performs a Molecular-dynamic Lennard-Jones simulation on a cluster.

Note:
Ideas adopted from Allen and Tildesley.
Author:
John Schneiderman

Definition at line 30 of file mdljsimulation.h.

Public Member Functions

void clear ()
 MDLJ_Simulation (const ConfigurationDatabase &conf)
double reducedKineticEnergy () const
double reducedPotentialEnergy () const
double reducedTotalEnergy () const
virtual void run (Cluster &cluster, string currentRun, string prevRun)

Protected Member Functions

void adjustPosCenMass (Cluster &cluster) const
void calculateAccelerations (Cluster &cluster) const
void calculatePositions (Cluster &cluster) const
void calculateVelocities (Cluster &cluster) const
virtual double findLastStep (string baseName) const

Private Attributes

double m_reducedEnergyTotal
double m_reducedKineticEnergy
double m_reducedPotentialEnergy


Constructor & Destructor Documentation

MDLJ_Simulation::MDLJ_Simulation const ConfigurationDatabase conf  ) 
 

General constructor.

Parameters:
conf is the default configuration values.

Definition at line 33 of file mdljsimulation.cpp.

References m_reducedEnergyTotal, m_reducedKineticEnergy, and m_reducedPotentialEnergy.


Member Function Documentation

void MDLJ_Simulation::adjustPosCenMass Cluster cluster  )  const [protected]
 

Adjusts the positions of a cluster according to its centre of mass.

Parameters:
cluster is the cluster to adjust.

Definition at line 222 of file mdljsimulation.cpp.

References Cluster::positionCentreMass(), and Cluster::size().

Here is the call graph for this function:

void MDLJ_Simulation::calculateAccelerations Cluster cluster  )  const [protected]
 

Calculates the accelerations, and the total potential energy of the simulation.

Parameters:
cluster is the cluster whose accelerations are adjusted for the simulation.

Definition at line 185 of file mdljsimulation.cpp.

References Cluster::potentialEnergyTotal(), Cluster::setPotentialEnergyTotal(), Cluster::size(), Coordinate::x, Coordinate::y, and Coordinate::z.

Referenced by run().

Here is the call graph for this function:

void MDLJ_Simulation::calculatePositions Cluster cluster  )  const [protected]
 

Moves the positions of a cluster during the simulation.

Parameters:
cluster is the cluster whose positions are adjusted for the simulation.

Definition at line 153 of file mdljsimulation.cpp.

References BaseSimulation::m_changeInStep, and Cluster::size().

Referenced by run().

Here is the call graph for this function:

void MDLJ_Simulation::calculateVelocities Cluster cluster  )  const [protected]
 

Calculates the velocity of a cluster during a the simulation and calcultes the total kinetic energy.

Parameters:
cluster is the cluster whose velocities are adjusted for the simulation.

Definition at line 169 of file mdljsimulation.cpp.

References BaseSimulation::m_changeInStep, Cluster::setKineticEnergyTotal(), and Cluster::size().

Referenced by run().

Here is the call graph for this function:

void MDLJ_Simulation::clear  ) 
 

Clears the mdljSimulation.

Reimplemented from MD_Simulation.

Definition at line 147 of file mdljsimulation.cpp.

References MD_Simulation::clear(), m_reducedEnergyTotal, m_reducedKineticEnergy, and m_reducedPotentialEnergy.

Here is the call graph for this function:

double MDLJ_Simulation::findLastStep string  baseName  )  const [protected, virtual]
 

Finds the last step in the a series of simulations.

Parameters:
baseName is the name of the file that is the direct previous run.
Returns:
the last time value in the series of runs. If there is not a previous run, returns zero.

Implements BaseSimulation.

Definition at line 233 of file mdljsimulation.cpp.

Referenced by run().

double MDLJ_Simulation::reducedKineticEnergy  )  const
 

An accessor to the reduced kinetic energy.

Returns:
the reduced kinetic energy.

Definition at line 43 of file mdljsimulation.cpp.

References m_reducedKineticEnergy.

double MDLJ_Simulation::reducedPotentialEnergy  )  const
 

An accessor to the reduced potential energy.

Returns:
the reduced potential energy.

Definition at line 38 of file mdljsimulation.cpp.

References m_reducedPotentialEnergy.

double MDLJ_Simulation::reducedTotalEnergy  )  const
 

An accessor to the reduced total energy.

Returns:
the reduced total energy.

Definition at line 48 of file mdljsimulation.cpp.

References m_reducedEnergyTotal.

void MDLJ_Simulation::run Cluster cluster,
string  currentRun,
string  prevRun
[virtual]
 

Runs a molecular dynamics simulation using the Lennard-Jones model. During the run, a run file and a
miscellaneous file have been created. The run file (currentRun.run) has the information pulled
from each step of the run. The miscellaneous file (currentRun.msc) has various information
regarding the run.

Parameters:
cluster is the cluster that is ready to be manipulated during the simulation.
currentRun is the base name for the current run.
prevRun is the base name of the previous run files.

Implements BaseSimulation.

Definition at line 53 of file mdljsimulation.cpp.

References KineticEnergyHistogram::acquire(), PotentialEnergyHistogram::acquire(), RadialDistributionFunction::acquire(), RadialDensityHistogram::acquire(), calculateAccelerations(), Cluster::calculateCentreMass(), Cluster::calculateKineticEnergy(), calculatePositions(), Cluster::calculatePotentialEnergy(), calculateVelocities(), findLastStep(), Cluster::kineticEnergyTotal(), MD_Simulation::m_accumEnergySQ, MD_Simulation::m_accumEnergyTotal, MD_Simulation::m_accumKineticSQ, MD_Simulation::m_accumKineticTotal, MD_Simulation::m_accumPotentialSQ, MD_Simulation::m_accumPotentialTotal, BaseSimulation::m_changeInStep, BaseSimulation::m_kineticEnergyHistogram, BaseSimulation::m_potentialEnergyHistogram, BaseSimulation::m_printInterval, BaseSimulation::m_radialDensityHistogram, BaseSimulation::m_radialDistributionFunction, m_reducedEnergyTotal, m_reducedKineticEnergy, m_reducedPotentialEnergy, BaseSimulation::m_runSteps, BaseSimulation::m_stepStart, MD_Simulation::m_temperature, MD_Simulation::m_timeStep, Cluster::potentialEnergyTotal(), Cluster::PRECISION, BaseHistogram::pullingInterval(), Cluster::size(), Cluster::WIDTH, PotentialEnergyHistogram::write(), KineticEnergyHistogram::write(), RadialDistributionFunction::write(), RadialDensityHistogram::write(), and MD_Simulation::writeAverages().

Here is the call graph for this function:


Member Data Documentation

double MDLJ_Simulation::m_reducedEnergyTotal [private]
 

Parameters:
reducedEnergyTotal is the reduced total energy of the system.

Definition at line 102 of file mdljsimulation.h.

Referenced by clear(), MDLJ_Simulation(), reducedTotalEnergy(), and run().

double MDLJ_Simulation::m_reducedKineticEnergy [private]
 

Parameters:
m_reducedKineticEnergy is the reduced kinetic energy of the system.

Definition at line 100 of file mdljsimulation.h.

Referenced by clear(), MDLJ_Simulation(), reducedKineticEnergy(), and run().

double MDLJ_Simulation::m_reducedPotentialEnergy [private]
 

Parameters:
m_reducedPotentialEnergy is the reduced potential energy of the system.

Definition at line 98 of file mdljsimulation.h.

Referenced by clear(), MDLJ_Simulation(), reducedPotentialEnergy(), and run().


The documentation for this class was generated from the following files:
Generated on Tue Mar 28 23:29:07 2006 for ClusterSim by  doxygen 1.4.4