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

MCLJ_Simulation Class Reference

Inheritance diagram for MCLJ_Simulation:

Inheritance graph
[legend]
Collaboration diagram for MCLJ_Simulation:

Collaboration graph
[legend]
List of all members.

Detailed Description

This runs a Monte Carlo Lennard-Jones simulation on a Cluster of atoms.

Author:
John Schneiderman

Definition at line 32 of file mcljsimulation.h.

Public Member Functions

 MCLJ_Simulation (const ConfigurationDatabase &conf)
virtual void run (Cluster &cluster, string currentRun, string previousRun)

Protected Member Functions

virtual double findLastStep (string previousRun) const

Private Member Functions

Coordinate generateDistanceToMove () const
bool isAcceptableMove (double potentialEnergyDifference) const
double potentialEnergyDifference (const Cluster &cluster, const Atom &examinedAtom, const Coordinate &testPosition) const

Private Attributes

double m_potentialEnergy


Constructor & Destructor Documentation

MCLJ_Simulation::MCLJ_Simulation const ConfigurationDatabase conf  ) 
 

General constructor for a Monte Carlo Lennard-Jones simulation.

Parameters:
conf is the default configuration values.

Definition at line 36 of file mcljsimulation.cpp.

References m_potentialEnergy.


Member Function Documentation

double MCLJ_Simulation::findLastStep string  previousRun  )  const [protected, virtual]
 

Finds the last step in the a series of simulations.

Parameters:
previousRun 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 142 of file mcljsimulation.cpp.

Referenced by run().

Coordinate MCLJ_Simulation::generateDistanceToMove  )  const [private]
 

This randomly generates a distance to move an atom.

Returns:
the suggested new coordinates of the atom.

Definition at line 155 of file mcljsimulation.cpp.

References BaseSimulation::m_changeInStep, Coordinate::x, Coordinate::y, and Coordinate::z.

Referenced by run().

bool MCLJ_Simulation::isAcceptableMove double  potentialEnergyDifference  )  const [private]
 

This determines if a suggested move is acceptable based upon the potential energy difference
of the old Cluster system and the new Cluster system.

Parameters:
potentialEnergyDifference is the potential energy difference of the systems.
Returns:
true if the potential energy difference is acceptable, false else wise.

Definition at line 165 of file mcljsimulation.cpp.

Referenced by run().

double MCLJ_Simulation::potentialEnergyDifference const Cluster cluster,
const Atom examinedAtom,
const Coordinate testPosition
const [private]
 

Calculates the potential energy difference of moving one atom in a Cluster.

Parameters:
cluster is the cluster containing the atom you wish to move.
examinedAtom is the atom that you want to move in the cluster.
testPosition is the new position you wish to move the atom to.
Returns:
the potential energy difference of the moved atom.

Definition at line 173 of file mcljsimulation.cpp.

References Atom::properties, Cluster::size(), Coordinate::x, Coordinate::y, and Coordinate::z.

Referenced by run().

Here is the call graph for this function:

void MCLJ_Simulation::run Cluster cluster,
string  currentRun,
string  previousRun
[virtual]
 

Runs a molecular dynamics simulation using the Monte Carlo 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 ready to be manipulated during the simulation.
currentRun is the base name for the current run.
previousRun is the base name of the previous run files.

Implements BaseSimulation.

Definition at line 45 of file mcljsimulation.cpp.

References PotentialEnergyHistogram::acquire(), RadialDistributionFunction::acquire(), RadialDensityHistogram::acquire(), Cluster::calculateCentreMass(), Cluster::calculatePotentialEnergy(), findLastStep(), generateDistanceToMove(), isAcceptableMove(), MC_Simulation::m_accumPotentialSQ, MC_Simulation::m_accumPotentialTotal, BaseSimulation::m_kineticEnergyHistogram, m_potentialEnergy, BaseSimulation::m_potentialEnergyHistogram, BaseSimulation::m_printInterval, BaseSimulation::m_radialDensityHistogram, BaseSimulation::m_radialDistributionFunction, BaseSimulation::m_runSteps, BaseSimulation::m_stepStart, MC_Simulation::m_temperature, potentialEnergyDifference(), Cluster::potentialEnergyTotal(), Cluster::PRECISION, BaseHistogram::pullingInterval(), Cluster::size(), Cluster::WIDTH, PotentialEnergyHistogram::write(), KineticEnergyHistogram::write(), RadialDistributionFunction::write(), RadialDensityHistogram::write(), and MC_Simulation::writeAverages().

Here is the call graph for this function:


Member Data Documentation

double MCLJ_Simulation::m_potentialEnergy [private]
 

Parameters:
m_potentialEnergy is the potential energy of the system.

Definition at line 61 of file mcljsimulation.h.

Referenced by MCLJ_Simulation(), and run().


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