Emdee
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Protected Attributes | List of all members
MoleculeSystem Class Reference

The MoleculeSystem class is the core of the molecular dynamics simulation. It provides functions to add and remove atoms, start simulations, and sampling of statistical properties. More...

#include <moleculesystem.h>

Collaboration diagram for MoleculeSystem:
Collaboration graph
[legend]

Public Member Functions

 MoleculeSystem ()
 
void addAtoms (const vector< Atom * > &atoms)
 
const vector< Atom * > & atoms () const
 
const vector
< MoleculeSystemCell * > & 
globalCells () const
 
const vector< AtomType > & particleTypes () const
 
void updateForces ()
 
void simulate ()
 
void setBoundaries (double min, double max)
 
void setBoundaries (double xMin, double xMax, double yMin, double yMax, double zMin, double zMax)
 
void setBoundaries (mat boundaries)
 
void setupCells (double requestedCellLength=0.0)
 
const mat & cellShiftVectors ()
 
void refreshCellContents ()
 
void setIntegrator (Integrator *integrator)
 
void updateStatistics ()
 
bool isOutputEnabled () const
 
void setOutputEnabled (bool enabled)
 
bool isSaveEnabled () const
 
void setSaveEnabled (bool enabled)
 
void obeyBoundaries ()
 
void setFileManager (FileManager *fileManager)
 
void addModifier (Modifier *modifier)
 
void removeModifier (Modifier *modifier)
 
void applyModifiers ()
 
Integratorintegrator () const
 
double kineticEnergyTotal ()
 
double potentialEnergyTotal ()
 
double temperature () const
 
double pressure () const
 
double averageDisplacement () const
 
double averageSquareDisplacement () const
 
const mat & boundaries () const
 
double time () const
 
const irowvec & nCells () const
 
void setTime (double currentTime)
 
void setBoltzmannConstant (double boltzmannConstant)
 
bool load (string fileName)
 
void clearAtoms ()
 
void addAtomsToCorrectCells (vector< Atom * > &atoms)
 
void setStep (uint step)
 
void deleteAtoms ()
 
void setAverageSquareDisplacement (double averageSquareDisplacement)
 
void setAverageDisplacement (double averageDisplacement)
 
void setupProcessors ()
 
MoleculeSystemCellcell (int i, int j, int k)
 
Processorprocessor ()
 
void setCalculatePressureEnabled (bool enable)
 
bool isCalculatePressureEnabled ()
 
void setCalculatePotentialEnabled (bool enable)
 
bool isCalculatePotentialEnabled ()
 
void setSaveEveryNSteps (int nSteps)
 
int saveEveryNSteps ()
 
bool shouldTimeStepBeSaved ()
 
void setNSimulationSteps (int nSteps)
 
int nSimulationSteps ()
 
void setProgressReporter (ProgressReporter *progressReporter)
 
void addSingleParticleForce (SingleParticleForce *force)
 
const vector
< SingleParticleForce * > & 
singleParticleForces () const
 
void setParticleTypes (const vector< AtomType > &particleTypes)
 
const unordered_map< int,
AtomType > & 
particleTypesById ()
 
bool isOutputEnabledForThisStep () const
 
void save ()
 
void save (string fileName)
 
void setCreateSymlink (bool enabled)
 
const vector
< MoleculeSystemCell * > & 
localCells () const
 
ThreeParticleForcethreeParticleForce () const
 
void setThreeParticleForce (ThreeParticleForce *threeParticleForce)
 
TwoParticleForcetwoParticleForce () const
 
void setTwoParticleForce (TwoParticleForce *twoParticleForce)
 
int cellIndex (int xIndex, int yIndex, int zIndex)
 
void setPeriodicity (bool periodicInX, bool periodicInY, bool periodicInZ)
 
int nAtomsTotal ()
 
const vector
< MoleculeSystemCell * > & 
localAndGhostCells () const
 

Protected Attributes

vector< Atom * > m_atoms
 
Integratorm_integrator
 
mat m_boundaries
 
int m_nDimensions
 
mat m_cellShiftVectors
 
int pow3nDimensions
 
irowvec m_globalCellsPerDimension
 
rowvec m_cellLengths
 
vector< MoleculeSystemCell * > m_globalCells
 
bool m_isSaveEnabled
 
bool m_isOutputEnabled
 
bool m_areCellsSetUp
 
double m_temperature
 
vector< Modifier * > m_modifiers
 
double m_averageDisplacement
 
double m_averageSquareDisplacement
 
double m_pressure
 
uint m_step
 
double m_time
 
bool m_skipInitialize
 
double m_kineticEnergyTotal
 
double m_potentialEnergyTotal
 
Processorm_processor
 
bool m_isCalculatePressureEnabled
 
bool m_isCalculatePotentialEnabled
 
int m_saveEveryNSteps
 
int m_nSimulationSteps
 
bool m_isFinalTimeStep
 
ProgressReporterm_progressReporter
 
vector< SingleParticleForce * > m_singleParticleForces
 
vector< AtomTypem_particleTypes
 
unordered_map< int, AtomTypem_particleTypesByID
 
bool m_isCreateSymlinkEnabled
 
bool m_isPeriodicDimension [3]
 
TwoParticleForcem_twoParticleForce
 
ThreeParticleForcem_threeParticleForce
 
int m_nAtomsTotal
 

Detailed Description

The MoleculeSystem class is the core of the molecular dynamics simulation. It provides functions to add and remove atoms, start simulations, and sampling of statistical properties.

Constructor & Destructor Documentation

MoleculeSystem::MoleculeSystem ( )

Member Function Documentation

void MoleculeSystem::addAtoms ( const vector< Atom * > &  atoms)
void MoleculeSystem::addAtomsToCorrectCells ( vector< Atom * > &  atoms)
void MoleculeSystem::addModifier ( Modifier modifier)
void MoleculeSystem::addSingleParticleForce ( SingleParticleForce force)
inline
void MoleculeSystem::applyModifiers ( )
const vector< Atom * > & MoleculeSystem::atoms ( ) const
double MoleculeSystem::averageDisplacement ( ) const
inline
double MoleculeSystem::averageSquareDisplacement ( ) const
inline
const mat& MoleculeSystem::boundaries ( ) const
inline
MoleculeSystemCell * MoleculeSystem::cell ( int  i,
int  j,
int  k 
)
int MoleculeSystem::cellIndex ( int  xIndex,
int  yIndex,
int  zIndex 
)
const mat & MoleculeSystem::cellShiftVectors ( )
void MoleculeSystem::clearAtoms ( )
void MoleculeSystem::deleteAtoms ( )
const vector< MoleculeSystemCell * > & MoleculeSystem::globalCells ( ) const
Integrator* MoleculeSystem::integrator ( ) const
inline
bool MoleculeSystem::isCalculatePotentialEnabled ( )
inline
bool MoleculeSystem::isCalculatePressureEnabled ( )
inline
bool MoleculeSystem::isOutputEnabled ( ) const
bool MoleculeSystem::isOutputEnabledForThisStep ( ) const
bool MoleculeSystem::isSaveEnabled ( ) const
double MoleculeSystem::kineticEnergyTotal ( )
inline
bool MoleculeSystem::load ( string  fileName)
const vector< MoleculeSystemCell * > & MoleculeSystem::localAndGhostCells ( ) const
const vector< MoleculeSystemCell * > & MoleculeSystem::localCells ( ) const
int MoleculeSystem::nAtomsTotal ( )
const irowvec & MoleculeSystem::nCells ( ) const
inline
int MoleculeSystem::nSimulationSteps ( )
inline
void MoleculeSystem::obeyBoundaries ( )
const vector< AtomType > & MoleculeSystem::particleTypes ( ) const
inline
const unordered_map< int, AtomType > & MoleculeSystem::particleTypesById ( )
inline
double MoleculeSystem::potentialEnergyTotal ( )
inline
double MoleculeSystem::pressure ( ) const
inline
Processor* MoleculeSystem::processor ( )
void MoleculeSystem::refreshCellContents ( )
void MoleculeSystem::removeModifier ( Modifier modifier)
void MoleculeSystem::save ( )
void MoleculeSystem::save ( string  fileName)
int MoleculeSystem::saveEveryNSteps ( )
inline
void MoleculeSystem::setAverageDisplacement ( double  averageDisplacement)
void MoleculeSystem::setAverageSquareDisplacement ( double  averageSquareDisplacement)
void MoleculeSystem::setBoltzmannConstant ( double  boltzmannConstant)
void MoleculeSystem::setBoundaries ( double  min,
double  max 
)
void MoleculeSystem::setBoundaries ( double  xMin,
double  xMax,
double  yMin,
double  yMax,
double  zMin,
double  zMax 
)
void MoleculeSystem::setBoundaries ( mat  boundaries)
void MoleculeSystem::setCalculatePotentialEnabled ( bool  enable)
inline
void MoleculeSystem::setCalculatePressureEnabled ( bool  enable)
inline
void MoleculeSystem::setCreateSymlink ( bool  enabled)
void MoleculeSystem::setFileManager ( FileManager fileManager)
void MoleculeSystem::setIntegrator ( Integrator integrator)
void MoleculeSystem::setNSimulationSteps ( int  nSteps)
inline
void MoleculeSystem::setOutputEnabled ( bool  enabled)
void MoleculeSystem::setParticleTypes ( const vector< AtomType > &  particleTypes)
void MoleculeSystem::setPeriodicity ( bool  periodicInX,
bool  periodicInY,
bool  periodicInZ 
)
void MoleculeSystem::setProgressReporter ( ProgressReporter progressReporter)
inline
void MoleculeSystem::setSaveEnabled ( bool  enabled)
void MoleculeSystem::setSaveEveryNSteps ( int  nSteps)
inline
void MoleculeSystem::setStep ( uint  step)
void MoleculeSystem::setThreeParticleForce ( ThreeParticleForce threeParticleForce)
void MoleculeSystem::setTime ( double  currentTime)
void MoleculeSystem::setTwoParticleForce ( TwoParticleForce twoParticleForce)
void MoleculeSystem::setupCells ( double  requestedCellLength = 0.0)
void MoleculeSystem::setupProcessors ( )
bool MoleculeSystem::shouldTimeStepBeSaved ( )
void MoleculeSystem::simulate ( )
const vector< SingleParticleForce * > & MoleculeSystem::singleParticleForces ( ) const
inline
double MoleculeSystem::temperature ( ) const
inline
ThreeParticleForce * MoleculeSystem::threeParticleForce ( ) const
double MoleculeSystem::time ( ) const
inline
TwoParticleForce * MoleculeSystem::twoParticleForce ( ) const
void MoleculeSystem::updateForces ( )
void MoleculeSystem::updateStatistics ( )

Member Data Documentation

bool MoleculeSystem::m_areCellsSetUp
protected
vector<Atom*> MoleculeSystem::m_atoms
protected
double MoleculeSystem::m_averageDisplacement
protected
double MoleculeSystem::m_averageSquareDisplacement
protected
mat MoleculeSystem::m_boundaries
protected
rowvec MoleculeSystem::m_cellLengths
protected
mat MoleculeSystem::m_cellShiftVectors
protected
vector<MoleculeSystemCell*> MoleculeSystem::m_globalCells
protected
irowvec MoleculeSystem::m_globalCellsPerDimension
protected
Integrator* MoleculeSystem::m_integrator
protected
bool MoleculeSystem::m_isCalculatePotentialEnabled
protected
bool MoleculeSystem::m_isCalculatePressureEnabled
protected
bool MoleculeSystem::m_isCreateSymlinkEnabled
protected
bool MoleculeSystem::m_isFinalTimeStep
protected
bool MoleculeSystem::m_isOutputEnabled
protected
bool MoleculeSystem::m_isPeriodicDimension[3]
protected
bool MoleculeSystem::m_isSaveEnabled
protected
double MoleculeSystem::m_kineticEnergyTotal
protected
vector<Modifier*> MoleculeSystem::m_modifiers
protected
int MoleculeSystem::m_nAtomsTotal
protected
int MoleculeSystem::m_nDimensions
protected
int MoleculeSystem::m_nSimulationSteps
protected
vector<AtomType> MoleculeSystem::m_particleTypes
protected
unordered_map<int,AtomType> MoleculeSystem::m_particleTypesByID
protected
double MoleculeSystem::m_potentialEnergyTotal
protected
double MoleculeSystem::m_pressure
protected
Processor* MoleculeSystem::m_processor
protected
ProgressReporter* MoleculeSystem::m_progressReporter
protected
int MoleculeSystem::m_saveEveryNSteps
protected
vector<SingleParticleForce*> MoleculeSystem::m_singleParticleForces
protected
bool MoleculeSystem::m_skipInitialize
protected
uint MoleculeSystem::m_step
protected
double MoleculeSystem::m_temperature
protected
ThreeParticleForce* MoleculeSystem::m_threeParticleForce
protected
double MoleculeSystem::m_time
protected
TwoParticleForce* MoleculeSystem::m_twoParticleForce
protected
int MoleculeSystem::pow3nDimensions
protected

The documentation for this class was generated from the following files: