|
OpenMD 3.2
Molecular Dynamics in the Open
|
One of the heavy-weight classes of OpenMD, SimInfo maintains objects and variables relating to the current simulation. More...
#include "brains/SimInfo.hpp"
Public Types | |
| using | MoleculeIterator = std::map<int, Molecule*>::iterator |
Public Member Functions | |
| SimInfo (ForceField *ff, Globals *simParams) | |
| Constructor of SimInfo. | |
| bool | addMolecule (Molecule *mol) |
| Adds a molecule. | |
| bool | removeMolecule (Molecule *mol) |
| Removes a molecule from SimInfo. | |
| int | getNGlobalMolecules () |
| Returns the total number of molecules in the system. | |
| int | getNGlobalAtoms () |
| Returns the total number of atoms in the system. | |
| int | getNGlobalCutoffGroups () |
| Returns the total number of cutoff groups in the system. | |
| int | getNGlobalIntegrableObjects () |
| Returns the total number of integrable objects (total number of rigid bodies plus the total number of atoms which do not belong to the rigid bodies) in the system. | |
| int | getNGlobalRigidBodies () |
| Returns the total number of integrable objects (total number of rigid bodies plus the total number of atoms which do not belong to the rigid bodies) in the system. | |
| unsigned int | getNGlobalBonds () |
| Returns the number of global bonds. | |
| unsigned int | getNGlobalBends () |
| Returns the number of global bends. | |
| unsigned int | getNGlobalTorsions () |
| Returns the number of global torsions. | |
| unsigned int | getNGlobalInversions () |
| Returns the number of global inversions. | |
| unsigned int | getNGlobalConstraints () |
| size_t | getNMolecules () |
| Returns the number of local molecules. | |
| unsigned int | getNAtoms () |
| Returns the number of local atoms. | |
| unsigned int | getNLocalCutoffGroups () |
| Returns the number of effective cutoff groups on local processor. | |
| unsigned int | getNBonds () |
| Returns the number of local bonds. | |
| unsigned int | getNBends () |
| Returns the number of local bends. | |
| unsigned int | getNTorsions () |
| Returns the number of local torsions. | |
| unsigned int | getNInversions () |
| Returns the number of local inversions. | |
| unsigned int | getNRigidBodies () |
| Returns the number of local rigid bodies. | |
| unsigned int | getNIntegrableObjects () |
| Returns the number of local integrable objects. | |
| unsigned int | getNCutoffGroups () |
| Returns the number of local cutoff groups. | |
| unsigned int | getNConstraints () |
| Returns the total number of constraints in this SimInfo. | |
| Molecule * | beginMolecule (MoleculeIterator &i) |
| Returns the first molecule in this SimInfo and intialize the iterator. | |
| Molecule * | nextMolecule (MoleculeIterator &i) |
| Returns the next avaliable Molecule based on the iterator. | |
| int | getNFluctuatingCharges () |
| Returns the total number of fluctuating charges that are present. | |
| int | getNdf () |
| Returns the number of degrees of freedom. | |
| int | getNdfLocal () |
| Returns the number of degrees of freedom (LOCAL). | |
| int | getNdfRaw () |
| Returns the number of raw degrees of freedom. | |
| int | getNdfTrans () |
| Returns the number of translational degrees of freedom. | |
| void | setFdf (int fdf) |
| sets the current number of frozen degrees of freedom | |
| int | getFdf () |
| int | getNZconstraint () |
| Returns the total number of z-constraint molecules in the system. | |
| void | setNZconstraint (int nZconstraint) |
| Sets the number of z-constraint molecules in the system. | |
| SnapshotManager * | getSnapshotManager () |
| Returns the snapshot manager. | |
| int | getAtomStorageLayout () |
| Returns the storage layouts (computed by SimCreator). | |
| int | getRigidBodyStorageLayout () |
| int | getCutoffGroupStorageLayout () |
| void | setAtomStorageLayout (int asl) |
| Sets the storage layouts (computed by SimCreator). | |
| void | setRigidBodyStorageLayout (int rbsl) |
| void | setCutoffGroupStorageLayout (int cgsl) |
| void | setSnapshotManager (SnapshotManager *sman) |
| Sets the snapshot manager. | |
| ForceField * | getForceField () |
| Returns the force field. | |
| Globals * | getSimParams () |
| Utils::RandNumGenPtr | getRandomNumberGenerator () const |
| void | update () |
| update | |
| void | prepareTopology () |
| Do final bookkeeping before Force managers need their data. | |
| LocalIndexManager * | getLocalIndexManager () |
| Returns the local index manager. | |
| int | getMoleculeStampId (int globalIndex) |
| MoleculeStamp * | getMoleculeStamp (int id) |
| Returns the molecule stamp. | |
| size_t | getNMoleculeStamp () |
| Return the total number of the molecule stamps. | |
| Molecule * | getMoleculeByGlobalIndex (int index) |
| Finds a molecule with a specified global index. | |
| int | getGlobalMolMembership (int id) |
| std::vector< int > | getGlobalAtomIndices () |
| returns a vector which maps the local atom index on this processor to the global atom index. | |
| std::vector< int > | getGlobalGroupIndices () |
| returns a vector which maps the local cutoff group index on this processor to the global cutoff group index. | |
| std::string | getFinalConfigFileName () |
| void | setFinalConfigFileName (const std::string &fileName) |
| std::string | getRawMetaData () |
| void | setRawMetaData (const std::string &rawMetaData) |
| std::string | getDumpFileName () |
| void | setDumpFileName (const std::string &fileName) |
| std::string | getStatFileName () |
| void | setStatFileName (const std::string &fileName) |
| std::string | getReportFileName () |
| void | setReportFileName (const std::string &fileName) |
| std::string | getRestFileName () |
| void | setRestFileName (const std::string &fileName) |
| void | setGlobalGroupMembership (const std::vector< int > &ggm) |
| Sets GlobalGroupMembership. | |
| void | setGlobalMolMembership (const std::vector< int > &gmm) |
| Sets GlobalMolMembership. | |
| bool | isTopologyDone () |
| bool | getCalcBoxDipole () |
| bool | getCalcBoxQuadrupole () |
| bool | getUseAtomicVirial () |
| void | addProperty (std::shared_ptr< GenericData > genData) |
| Adds property into property map. | |
| void | removeProperty (const std::string &propName) |
| Removes property from PropertyMap by name. | |
| std::vector< std::string > | getPropertyNames () |
| Returns all names of properties. | |
| std::vector< std::shared_ptr< GenericData > > | getProperties () |
| Returns all of the properties in PropertyMap. | |
| std::shared_ptr< GenericData > | getPropertyByName (const std::string &propName) |
| Returns property. | |
| void | addInteractionPairs (Molecule *mol) |
| add all special interaction pairs (including excluded interactions) in a molecule into the appropriate lists. | |
| void | removeInteractionPairs (Molecule *mol) |
| remove all special interaction pairs which belong to a molecule from the appropriate lists. | |
| AtomTypeSet | getSimulatedAtomTypes () |
| Returns the set of atom types present in this simulation. | |
| int | getGlobalCountOfType (AtomType *atype) |
| Returns the global count of atoms of a particular type. | |
| void | getCutoff (RealType &rcut, RealType &rsw) |
| bool | usesElectrostaticAtoms () |
| bool | usesDirectionalAtoms () |
| bool | usesFluctuatingCharges () |
| bool | usesAtomicVirial () |
| bool | requiresPrepair () |
| bool | requiresSkipCorrection () |
| bool | requiresSelfCorrection () |
| std::vector< int > | getGlobalGroupMembership () |
| std::vector< int > | getIdentArray () |
| std::vector< int > | getRegions () |
| std::vector< RealType > | getMassFactors () |
| PairList * | getExcludedInteractions () |
| PairList * | getOneTwoInteractions () |
| PairList * | getOneThreeInteractions () |
| PairList * | getOneFourInteractions () |
| StuntDouble * | getIOIndexToIntegrableObject (int index) |
| return an integral objects by its global index. | |
| void | setIOIndexToIntegrableObject (const std::vector< StuntDouble * > &v) |
| int | getMolToProc (int globalIndex) |
| Finds the processor where a molecule resides. | |
| void | setMolToProcMap (const std::vector< int > &molToProcMap) |
| Set MolToProcMap array. | |
Friends | |
| ostream & | operator<< (ostream &o, SimInfo &info) |
One of the heavy-weight classes of OpenMD, SimInfo maintains objects and variables relating to the current simulation.
This includes the primary list of Molecules. The Molecule class maintains all of the concrete objects (Atoms, Bond, Bend, Torsions, Inversions, RigidBodies, CutoffGroups, Constraints). In both the single and parallel versions, Atoms and RigidBodies have both global and local indices.
Definition at line 96 of file SimInfo.hpp.
| using OpenMD::SimInfo::MoleculeIterator = std::map<int, Molecule*>::iterator |
Definition at line 98 of file SimInfo.hpp.
| OpenMD::SimInfo::SimInfo | ( | ForceField * | ff, |
| Globals * | simParams ) |
Constructor of SimInfo.
| ff | pointer to a concrete ForceField instance |
| simParams | pointer to the simulation parameters in a Globals object |
Definition at line 82 of file SimInfo.cpp.
Referenced by getGlobalCountOfType().
|
virtual |
Definition at line 182 of file SimInfo.cpp.
| void OpenMD::SimInfo::addInteractionPairs | ( | Molecule * | mol | ) |
add all special interaction pairs (including excluded interactions) in a molecule into the appropriate lists.
Definition at line 379 of file SimInfo.cpp.
References addInteractionPairs(), OpenMD::RigidBody::getAtoms(), OpenMD::StuntDouble::getGlobalIndex(), and OpenMD::StuntDouble::isRigidBody().
Referenced by addInteractionPairs(), addMolecule(), and OpenMD::SimCreator::createSim().
| bool OpenMD::SimInfo::addMolecule | ( | Molecule * | mol | ) |
Adds a molecule.
| mol | Molecule to be added |
Definition at line 190 of file SimInfo.cpp.
References addInteractionPairs(), addMolecule(), OpenMD::Molecule::getGlobalIndex(), OpenMD::Molecule::getNAtoms(), OpenMD::Molecule::getNBends(), OpenMD::Molecule::getNBonds(), OpenMD::Molecule::getNConstraintPairs(), OpenMD::Molecule::getNCutoffGroups(), OpenMD::Molecule::getNIntegrableObjects(), OpenMD::Molecule::getNInversions(), OpenMD::Molecule::getNRigidBodies(), and OpenMD::Molecule::getNTorsions().
Referenced by addMolecule().
| void OpenMD::SimInfo::addProperty | ( | std::shared_ptr< GenericData > | genData | ) |
Adds property into property map.
| genData | GenericData to be added into PropertyMap |
Definition at line 954 of file SimInfo.cpp.
References addProperty().
Referenced by addProperty().
| Molecule * OpenMD::SimInfo::beginMolecule | ( | MoleculeIterator & | i | ) |
Returns the first molecule in this SimInfo and intialize the iterator.
| i | the iterator of molecule array (user shouldn't change it) |
Definition at line 243 of file SimInfo.cpp.
References beginMolecule().
Referenced by beginMolecule(), OpenMD::SimCreator::createSim(), getGlobalAtomIndices(), getGlobalGroupIndices(), getNLocalCutoffGroups(), getSimulatedAtomTypes(), prepareTopology(), and setSnapshotManager().
|
inline |
Returns the storage layouts (computed by SimCreator).
Definition at line 254 of file SimInfo.hpp.
Referenced by OpenMD::SimCreator::createSim().
|
inline |
Definition at line 381 of file SimInfo.hpp.
|
inline |
Definition at line 382 of file SimInfo.hpp.
|
inline |
Definition at line 256 of file SimInfo.hpp.
|
inline |
Definition at line 338 of file SimInfo.hpp.
|
inline |
Definition at line 597 of file SimInfo.hpp.
| int OpenMD::SimInfo::getFdf | ( | ) |
Definition at line 305 of file SimInfo.cpp.
|
inline |
Definition at line 326 of file SimInfo.hpp.
|
inline |
Returns the force field.
Definition at line 269 of file SimInfo.hpp.
| vector< int > OpenMD::SimInfo::getGlobalAtomIndices | ( | ) |
returns a vector which maps the local atom index on this processor to the global atom index.
With only one processor, these should be identical.
Definition at line 866 of file SimInfo.cpp.
References beginMolecule(), getGlobalAtomIndices(), OpenMD::StuntDouble::getGlobalIndex(), OpenMD::StuntDouble::getLocalIndex(), getNAtoms(), and nextMolecule().
Referenced by getGlobalAtomIndices().
| vector< int > OpenMD::SimInfo::getGlobalGroupIndices | ( | ) |
returns a vector which maps the local cutoff group index on this processor to the global cutoff group index.
With only one processor, these should be identical.
Definition at line 882 of file SimInfo.cpp.
References beginMolecule(), getGlobalGroupIndices(), and nextMolecule().
Referenced by getGlobalGroupIndices().
|
inline |
Definition at line 552 of file SimInfo.hpp.
|
inline |
Definition at line 310 of file SimInfo.hpp.
|
inline |
Definition at line 572 of file SimInfo.hpp.
| StuntDouble * OpenMD::SimInfo::getIOIndexToIntegrableObject | ( | int | index | ) |
return an integral objects by its global index.
In MPI version, if the StuntDouble with specified global index does not belong to local processor, a NULL will be return.
Definition at line 1031 of file SimInfo.cpp.
References getIOIndexToIntegrableObject().
Referenced by getIOIndexToIntegrableObject().
|
inline |
Returns the local index manager.
Definition at line 285 of file SimInfo.hpp.
|
inline |
Definition at line 595 of file SimInfo.hpp.
|
inline |
Finds a molecule with a specified global index.
| index |
Definition at line 303 of file SimInfo.hpp.
|
inline |
Returns the molecule stamp.
Definition at line 293 of file SimInfo.hpp.
|
inline |
Definition at line 287 of file SimInfo.hpp.
|
inline |
Finds the processor where a molecule resides.
| globalIndex | global Index of the molecule |
Definition at line 670 of file SimInfo.hpp.
|
inline |
Returns the number of local atoms.
Definition at line 175 of file SimInfo.hpp.
Referenced by getGlobalAtomIndices(), and prepareTopology().
|
inline |
Returns the number of local bends.
Definition at line 184 of file SimInfo.hpp.
|
inline |
Returns the number of local bonds.
Definition at line 181 of file SimInfo.hpp.
|
inline |
Returns the total number of constraints in this SimInfo.
Definition at line 201 of file SimInfo.hpp.
|
inline |
Returns the number of local cutoff groups.
Definition at line 198 of file SimInfo.hpp.
|
inline |
Returns the number of degrees of freedom.
Definition at line 223 of file SimInfo.hpp.
|
inline |
Returns the number of degrees of freedom (LOCAL).
Definition at line 226 of file SimInfo.hpp.
|
inline |
Returns the number of raw degrees of freedom.
Definition at line 229 of file SimInfo.hpp.
|
inline |
Returns the number of translational degrees of freedom.
Definition at line 232 of file SimInfo.hpp.
|
inline |
Returns the total number of fluctuating charges that are present.
Definition at line 220 of file SimInfo.hpp.
|
inline |
Returns the total number of atoms in the system.
Definition at line 132 of file SimInfo.hpp.
|
inline |
Returns the number of global bends.
Definition at line 155 of file SimInfo.hpp.
|
inline |
Returns the number of global bonds.
Definition at line 152 of file SimInfo.hpp.
|
inline |
Definition at line 163 of file SimInfo.hpp.
|
inline |
Returns the total number of cutoff groups in the system.
Definition at line 135 of file SimInfo.hpp.
|
inline |
Returns the total number of integrable objects (total number of rigid bodies plus the total number of atoms which do not belong to the rigid bodies) in the system.
Definition at line 142 of file SimInfo.hpp.
|
inline |
Returns the number of global inversions.
Definition at line 161 of file SimInfo.hpp.
|
inline |
Returns the total number of molecules in the system.
Definition at line 129 of file SimInfo.hpp.
|
inline |
Returns the total number of integrable objects (total number of rigid bodies plus the total number of atoms which do not belong to the rigid bodies) in the system.
Definition at line 149 of file SimInfo.hpp.
|
inline |
Returns the number of global torsions.
Definition at line 158 of file SimInfo.hpp.
|
inline |
Returns the number of local integrable objects.
Definition at line 195 of file SimInfo.hpp.
|
inline |
Returns the number of local inversions.
Definition at line 190 of file SimInfo.hpp.
| unsigned int OpenMD::SimInfo::getNLocalCutoffGroups | ( | ) |
Returns the number of effective cutoff groups on local processor.
Definition at line 314 of file SimInfo.cpp.
References beginMolecule(), getNLocalCutoffGroups(), and nextMolecule().
Referenced by getNLocalCutoffGroups().
|
inline |
Returns the number of local molecules.
Definition at line 172 of file SimInfo.hpp.
|
inline |
Return the total number of the molecule stamps.
Definition at line 296 of file SimInfo.hpp.
|
inline |
Returns the number of local rigid bodies.
Definition at line 192 of file SimInfo.hpp.
|
inline |
Returns the number of local torsions.
Definition at line 187 of file SimInfo.hpp.
|
inline |
Returns the total number of z-constraint molecules in the system.
Definition at line 243 of file SimInfo.hpp.
|
inline |
Definition at line 600 of file SimInfo.hpp.
|
inline |
Definition at line 599 of file SimInfo.hpp.
|
inline |
Definition at line 598 of file SimInfo.hpp.
| std::vector< std::shared_ptr< GenericData > > OpenMD::SimInfo::getProperties | ( | ) |
Returns all of the properties in PropertyMap.
Definition at line 966 of file SimInfo.cpp.
References getProperties().
Referenced by getProperties().
| std::shared_ptr< GenericData > OpenMD::SimInfo::getPropertyByName | ( | const std::string & | propName | ) |
Returns property.
| propName | name of property |
Definition at line 970 of file SimInfo.cpp.
References getPropertyByName().
Referenced by getPropertyByName().
| std::vector< string > OpenMD::SimInfo::getPropertyNames | ( | ) |
Returns all names of properties.
Definition at line 962 of file SimInfo.cpp.
References getPropertyNames().
Referenced by getPropertyNames().
|
inline |
Definition at line 273 of file SimInfo.hpp.
|
inline |
Definition at line 332 of file SimInfo.hpp.
|
inline |
Definition at line 582 of file SimInfo.hpp.
|
inline |
Definition at line 350 of file SimInfo.hpp.
|
inline |
Definition at line 356 of file SimInfo.hpp.
|
inline |
Definition at line 255 of file SimInfo.hpp.
|
inline |
Definition at line 271 of file SimInfo.hpp.
| AtomTypeSet OpenMD::SimInfo::getSimulatedAtomTypes | ( | ) |
Returns the set of atom types present in this simulation.
getSimulatedAtomTypes
Returns an STL set of AtomType* that are actually present in this simulation. Must query all processors to assemble this information.
Definition at line 716 of file SimInfo.cpp.
References beginMolecule(), OpenMD::Atom::getAtomType(), getSimulatedAtomTypes(), and nextMolecule().
Referenced by getSimulatedAtomTypes().
|
inline |
Returns the snapshot manager.
Definition at line 251 of file SimInfo.hpp.
|
inline |
Definition at line 344 of file SimInfo.hpp.
|
inline |
Definition at line 384 of file SimInfo.hpp.
|
inline |
Definition at line 379 of file SimInfo.hpp.
| Molecule * OpenMD::SimInfo::nextMolecule | ( | MoleculeIterator & | i | ) |
Returns the next avaliable Molecule based on the iterator.
| i | the iterator of molecule array |
Definition at line 248 of file SimInfo.cpp.
References nextMolecule().
Referenced by OpenMD::SimCreator::createSim(), getGlobalAtomIndices(), getGlobalGroupIndices(), getNLocalCutoffGroups(), getSimulatedAtomTypes(), nextMolecule(), prepareTopology(), and setSnapshotManager().
| void OpenMD::SimInfo::prepareTopology | ( | ) |
Do final bookkeeping before Force managers need their data.
The mass factor is the relative mass of an atom to the total mass of the cutoff group it belongs to. By default, all atoms are their own cutoff groups, and therefore have mass factors of
Definition at line 901 of file SimInfo.cpp.
References beginMolecule(), OpenMD::StuntDouble::getLocalIndex(), OpenMD::StuntDouble::getMass(), getNAtoms(), nextMolecule(), and prepareTopology().
Referenced by prepareTopology().
| void OpenMD::SimInfo::removeInteractionPairs | ( | Molecule * | mol | ) |
remove all special interaction pairs which belong to a molecule from the appropriate lists.
Definition at line 535 of file SimInfo.cpp.
References OpenMD::RigidBody::getAtoms(), OpenMD::StuntDouble::getGlobalIndex(), OpenMD::StuntDouble::isRigidBody(), and removeInteractionPairs().
Referenced by removeInteractionPairs(), and removeMolecule().
| bool OpenMD::SimInfo::removeMolecule | ( | Molecule * | mol | ) |
Removes a molecule from SimInfo.
Definition at line 215 of file SimInfo.cpp.
References OpenMD::Molecule::getGlobalIndex(), OpenMD::Molecule::getNAtoms(), OpenMD::Molecule::getNBends(), OpenMD::Molecule::getNBonds(), OpenMD::Molecule::getNConstraintPairs(), OpenMD::Molecule::getNCutoffGroups(), OpenMD::Molecule::getNIntegrableObjects(), OpenMD::Molecule::getNInversions(), OpenMD::Molecule::getNRigidBodies(), OpenMD::Molecule::getNTorsions(), removeInteractionPairs(), and removeMolecule().
Referenced by removeMolecule().
| void OpenMD::SimInfo::removeProperty | ( | const std::string & | propName | ) |
Removes property from PropertyMap by name.
| propName | the name of property to be removed |
Definition at line 958 of file SimInfo.cpp.
References removeProperty().
Referenced by removeProperty().
|
inline |
Definition at line 526 of file SimInfo.hpp.
|
inline |
Definition at line 528 of file SimInfo.hpp.
|
inline |
Definition at line 527 of file SimInfo.hpp.
|
inline |
Sets the storage layouts (computed by SimCreator).
Definition at line 259 of file SimInfo.hpp.
|
inline |
Definition at line 261 of file SimInfo.hpp.
|
inline |
Definition at line 340 of file SimInfo.hpp.
|
inline |
sets the current number of frozen degrees of freedom
Definition at line 235 of file SimInfo.hpp.
|
inline |
Definition at line 328 of file SimInfo.hpp.
|
inline |
Sets GlobalGroupMembership.
Definition at line 365 of file SimInfo.hpp.
|
inline |
Sets GlobalMolMembership.
Definition at line 373 of file SimInfo.hpp.
| void OpenMD::SimInfo::setIOIndexToIntegrableObject | ( | const std::vector< StuntDouble * > & | v | ) |
Definition at line 1044 of file SimInfo.cpp.
|
inline |
Set MolToProcMap array.
Definition at line 678 of file SimInfo.hpp.
|
inline |
Sets the number of z-constraint molecules in the system.
Definition at line 248 of file SimInfo.hpp.
|
inline |
Definition at line 334 of file SimInfo.hpp.
|
inline |
Definition at line 352 of file SimInfo.hpp.
|
inline |
Definition at line 358 of file SimInfo.hpp.
|
inline |
Definition at line 260 of file SimInfo.hpp.
| void OpenMD::SimInfo::setSnapshotManager | ( | SnapshotManager * | sman | ) |
Sets the snapshot manager.
Definition at line 975 of file SimInfo.cpp.
References beginMolecule(), nextMolecule(), OpenMD::CutoffGroup::setSnapshotManager(), OpenMD::ShortRangeInteraction::setSnapshotManager(), setSnapshotManager(), and OpenMD::StuntDouble::setSnapshotManager().
Referenced by OpenMD::SimCreator::createSim(), and setSnapshotManager().
|
inline |
Definition at line 346 of file SimInfo.hpp.
| void OpenMD::SimInfo::update | ( | ) |
update
Performs the global checks and variable settings after the objects have been created.
Definition at line 701 of file SimInfo.cpp.
References update().
Referenced by OpenMD::SimCreator::createSim(), and update().
|
inline |
Definition at line 525 of file SimInfo.hpp.
|
inline |
Definition at line 523 of file SimInfo.hpp.
|
inline |
Definition at line 522 of file SimInfo.hpp.
|
inline |
Definition at line 524 of file SimInfo.hpp.
|
friend |
Definition at line 1029 of file SimInfo.cpp.