OpenMD 3.1
Molecular Dynamics in the Open
|
Classes | |
struct | HBondDonor |
Public Types | |
using | AtomIterator = std::vector<Atom*>::iterator |
using | BondIterator = std::vector<Bond*>::iterator |
using | BendIterator = std::vector<Bend*>::iterator |
using | TorsionIterator = std::vector<Torsion*>::iterator |
using | InversionIterator = std::vector<Inversion*>::iterator |
using | RigidBodyIterator = std::vector<RigidBody*>::iterator |
using | CutoffGroupIterator = std::vector<CutoffGroup*>::iterator |
using | IntegrableObjectIterator = std::vector<StuntDouble*>::iterator |
using | ConstraintPairIterator = std::vector<ConstraintPair*>::iterator |
using | ConstraintElemIterator = std::vector<ConstraintElem*>::iterator |
using | FluctuatingChargeIterator = std::vector<Atom*>::iterator |
using | HBondDonorIterator = std::vector<HBondDonor*>::iterator |
using | HBondAcceptorIterator = std::vector<Atom*>::iterator |
Public Member Functions | |
Molecule (int stampId, int globalIndex, const std::string &molName, int region) | |
int | getGlobalIndex () |
Returns the global index of this molecule. | |
int | getStampId () |
Returns the stamp id of this molecule. | |
int | getRegion () |
std::string | getType () |
Returns the name of the molecule. | |
void | setGlobalIndex (int index) |
Sets the global index of this molecule. | |
void | setConstrainTotalCharge (bool ctc) |
bool | constrainTotalCharge () |
void | addAtom (Atom *atom) |
add an atom into this molecule | |
void | addBond (Bond *bond) |
add a bond into this molecule | |
void | addBend (Bend *bend) |
add a bend into this molecule | |
void | addTorsion (Torsion *torsion) |
add a torsion into this molecule | |
void | addInversion (Inversion *inversion) |
add an improper torsion into this molecule | |
void | addRigidBody (RigidBody *rb) |
add a rigidbody into this molecule | |
void | addCutoffGroup (CutoffGroup *cp) |
add a cutoff group into this molecule | |
void | addConstraintPair (ConstraintPair *consPair) |
void | addConstraintElem (ConstraintElem *consElem) |
void | complete () |
size_t | getNAtoms () |
Returns the total number of atoms in this molecule. | |
size_t | getNBonds () |
Returns the total number of bonds in this molecule. | |
size_t | getNBends () |
Returns the total number of bends in this molecule. | |
size_t | getNTorsions () |
Returns the total number of torsions in this molecule. | |
size_t | getNInversions () |
Returns the total number of improper torsions in this molecule. | |
size_t | getNRigidBodies () |
Returns the total number of rigid bodies in this molecule. | |
size_t | getNIntegrableObjects () |
Returns the total number of integrable objects in this molecule. | |
size_t | getNCutoffGroups () |
Returns the total number of cutoff groups in this molecule. | |
size_t | getNConstraintPairs () |
Returns the total number of constraints in this molecule. | |
size_t | getNFluctuatingCharges () |
Returns the total number of fluctuating charges in this molecule. | |
size_t | getNHBondDonors () |
Returns the total number of Hydrogen Bond donors in this molecule. | |
size_t | getNHBondAcceptors () |
Returns the total number of Hydrogen Bond acceptors in this molecule. | |
Atom * | getAtomAt (unsigned int i) |
RigidBody * | getRigidBodyAt (unsigned int i) |
Atom * | beginAtom (std::vector< Atom * >::iterator &i) |
Atom * | nextAtom (std::vector< Atom * >::iterator &i) |
Bond * | beginBond (std::vector< Bond * >::iterator &i) |
Bond * | nextBond (std::vector< Bond * >::iterator &i) |
Bend * | beginBend (std::vector< Bend * >::iterator &i) |
Bend * | nextBend (std::vector< Bend * >::iterator &i) |
Torsion * | beginTorsion (std::vector< Torsion * >::iterator &i) |
Torsion * | nextTorsion (std::vector< Torsion * >::iterator &i) |
Inversion * | beginInversion (std::vector< Inversion * >::iterator &i) |
Inversion * | nextInversion (std::vector< Inversion * >::iterator &i) |
RigidBody * | beginRigidBody (std::vector< RigidBody * >::iterator &i) |
RigidBody * | nextRigidBody (std::vector< RigidBody * >::iterator &i) |
StuntDouble * | beginIntegrableObject (std::vector< StuntDouble * >::iterator &i) |
StuntDouble * | nextIntegrableObject (std::vector< StuntDouble * >::iterator &i) |
CutoffGroup * | beginCutoffGroup (std::vector< CutoffGroup * >::iterator &i) |
CutoffGroup * | nextCutoffGroup (std::vector< CutoffGroup * >::iterator &i) |
ConstraintPair * | beginConstraintPair (std::vector< ConstraintPair * >::iterator &i) |
ConstraintPair * | nextConstraintPair (std::vector< ConstraintPair * >::iterator &i) |
ConstraintElem * | beginConstraintElem (std::vector< ConstraintElem * >::iterator &i) |
ConstraintElem * | nextConstraintElem (std::vector< ConstraintElem * >::iterator &i) |
Atom * | beginFluctuatingCharge (std::vector< Atom * >::iterator &i) |
Atom * | nextFluctuatingCharge (std::vector< Atom * >::iterator &i) |
HBondDonor * | beginHBondDonor (std::vector< HBondDonor * >::iterator &i) |
HBondDonor * | nextHBondDonor (std::vector< HBondDonor * >::iterator &i) |
Atom * | beginHBondAcceptor (std::vector< Atom * >::iterator &i) |
Atom * | nextHBondAcceptor (std::vector< Atom * >::iterator &i) |
RealType | getPotential () |
Returns the total potential energy of short range interaction of this molecule. | |
RealType | getMass () |
get total mass of this molecule | |
Vector3d | getPrevCom () |
Returns the center of mass position of this molecule in the previous snapshot. | |
Vector3d | getCom () |
Returns the current center of mass position of this molecule. | |
Vector3d | getCom (int snapshotNo) |
Returns the center of mass position of this molecule in specified snapshot. | |
void | setCom (const Vector3d &newCom) |
Sets the center of this molecule. | |
void | moveCom (const Vector3d &delta) |
Moves the center of this molecule. | |
Vector3d | getComVel () |
Returns the velocity of center of mass of this molecule. | |
std::string | getMoleculeName () |
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. | |
Friends | |
std::ostream & | operator<< (std::ostream &o, Molecule &mol) |
Definition at line 78 of file Molecule.hpp.
using OpenMD::Molecule::AtomIterator = std::vector<Atom*>::iterator |
Definition at line 85 of file Molecule.hpp.
using OpenMD::Molecule::BendIterator = std::vector<Bend*>::iterator |
Definition at line 87 of file Molecule.hpp.
using OpenMD::Molecule::BondIterator = std::vector<Bond*>::iterator |
Definition at line 86 of file Molecule.hpp.
using OpenMD::Molecule::ConstraintElemIterator = std::vector<ConstraintElem*>::iterator |
Definition at line 94 of file Molecule.hpp.
using OpenMD::Molecule::ConstraintPairIterator = std::vector<ConstraintPair*>::iterator |
Definition at line 93 of file Molecule.hpp.
using OpenMD::Molecule::CutoffGroupIterator = std::vector<CutoffGroup*>::iterator |
Definition at line 91 of file Molecule.hpp.
using OpenMD::Molecule::FluctuatingChargeIterator = std::vector<Atom*>::iterator |
Definition at line 95 of file Molecule.hpp.
using OpenMD::Molecule::HBondAcceptorIterator = std::vector<Atom*>::iterator |
Definition at line 97 of file Molecule.hpp.
using OpenMD::Molecule::HBondDonorIterator = std::vector<HBondDonor*>::iterator |
Definition at line 96 of file Molecule.hpp.
using OpenMD::Molecule::IntegrableObjectIterator = std::vector<StuntDouble*>::iterator |
Definition at line 92 of file Molecule.hpp.
using OpenMD::Molecule::InversionIterator = std::vector<Inversion*>::iterator |
Definition at line 89 of file Molecule.hpp.
using OpenMD::Molecule::RigidBodyIterator = std::vector<RigidBody*>::iterator |
Definition at line 90 of file Molecule.hpp.
using OpenMD::Molecule::TorsionIterator = std::vector<Torsion*>::iterator |
Definition at line 88 of file Molecule.hpp.
OpenMD::Molecule::Molecule | ( | int | stampId, |
int | globalIndex, | ||
const std::string & | molName, | ||
int | region ) |
Definition at line 63 of file Molecule.cpp.
|
virtual |
Definition at line 69 of file Molecule.cpp.
void OpenMD::Molecule::addAtom | ( | Atom * | atom | ) |
add an atom into this molecule
Definition at line 86 of file Molecule.cpp.
void OpenMD::Molecule::addBend | ( | Bend * | bend | ) |
add a bend into this molecule
Definition at line 98 of file Molecule.cpp.
void OpenMD::Molecule::addBond | ( | Bond * | bond | ) |
add a bond into this molecule
Definition at line 92 of file Molecule.cpp.
void OpenMD::Molecule::addConstraintElem | ( | ConstraintElem * | consElem | ) |
Definition at line 139 of file Molecule.cpp.
void OpenMD::Molecule::addConstraintPair | ( | ConstraintPair * | consPair | ) |
Definition at line 132 of file Molecule.cpp.
void OpenMD::Molecule::addCutoffGroup | ( | CutoffGroup * | cp | ) |
add a cutoff group into this molecule
Definition at line 125 of file Molecule.cpp.
void OpenMD::Molecule::addInversion | ( | Inversion * | inversion | ) |
add an improper torsion into this molecule
Definition at line 111 of file Molecule.cpp.
void OpenMD::Molecule::addProperty | ( | std::shared_ptr< GenericData > | genData | ) |
Adds property into property map.
genData | GenericData to be added into PropertyMap |
Definition at line 404 of file Molecule.cpp.
void OpenMD::Molecule::addRigidBody | ( | RigidBody * | rb | ) |
add a rigidbody into this molecule
Definition at line 118 of file Molecule.cpp.
void OpenMD::Molecule::addTorsion | ( | Torsion * | torsion | ) |
add a torsion into this molecule
Definition at line 104 of file Molecule.cpp.
Definition at line 205 of file Molecule.hpp.
Definition at line 225 of file Molecule.hpp.
Definition at line 215 of file Molecule.hpp.
|
inline |
Definition at line 297 of file Molecule.hpp.
|
inline |
Definition at line 285 of file Molecule.hpp.
|
inline |
Definition at line 275 of file Molecule.hpp.
Definition at line 309 of file Molecule.hpp.
Definition at line 329 of file Molecule.hpp.
|
inline |
Definition at line 319 of file Molecule.hpp.
|
inline |
Definition at line 265 of file Molecule.hpp.
Definition at line 245 of file Molecule.hpp.
Definition at line 255 of file Molecule.hpp.
Definition at line 235 of file Molecule.hpp.
void OpenMD::Molecule::complete | ( | ) |
Definition at line 146 of file Molecule.cpp.
|
inline |
Definition at line 130 of file Molecule.hpp.
|
inline |
Definition at line 195 of file Molecule.hpp.
Vector3d OpenMD::Molecule::getCom | ( | ) |
Returns the current center of mass position of this molecule.
Definition at line 298 of file Molecule.cpp.
References OpenMD::StuntDouble::getMass(), and OpenMD::StuntDouble::getPos().
Referenced by OpenMD::Thermo::getAngularMomentum(), OpenMD::Thermo::getCom(), and OpenMD::Thermo::getComAll().
Vector3d OpenMD::Molecule::getCom | ( | int | snapshotNo | ) |
Returns the center of mass position of this molecule in specified snapshot.
snapshotNo |
Definition at line 317 of file Molecule.cpp.
References OpenMD::StuntDouble::getMass(), and OpenMD::StuntDouble::getPos().
Vector3d OpenMD::Molecule::getComVel | ( | ) |
Returns the velocity of center of mass of this molecule.
Definition at line 351 of file Molecule.cpp.
References OpenMD::StuntDouble::getMass(), and OpenMD::StuntDouble::getVel().
Referenced by OpenMD::Thermo::getAngularMomentum(), OpenMD::Thermo::getComAll(), and OpenMD::Thermo::getComVel().
|
inline |
Returns the global index of this molecule.
Definition at line 107 of file Molecule.hpp.
Referenced by OpenMD::SimInfo::addMolecule(), OpenMD::SimInfo::removeMolecule(), and OpenMD::ZConsVisitor::ZConsVisitor().
RealType OpenMD::Molecule::getMass | ( | ) |
get total mass of this molecule
Definition at line 266 of file Molecule.cpp.
References OpenMD::StuntDouble::getMass().
Referenced by OpenMD::Thermo::getAngularMomentum(), OpenMD::Thermo::getCom(), OpenMD::Thermo::getComAll(), and OpenMD::Thermo::getComVel().
|
inline |
Definition at line 381 of file Molecule.hpp.
|
inline |
Returns the total number of atoms in this molecule.
Definition at line 161 of file Molecule.hpp.
Referenced by OpenMD::SimInfo::addMolecule(), and OpenMD::SimInfo::removeMolecule().
|
inline |
Returns the total number of bends in this molecule.
Definition at line 167 of file Molecule.hpp.
Referenced by OpenMD::SimInfo::addMolecule(), and OpenMD::SimInfo::removeMolecule().
|
inline |
Returns the total number of bonds in this molecule.
Definition at line 164 of file Molecule.hpp.
Referenced by OpenMD::SimInfo::addMolecule(), and OpenMD::SimInfo::removeMolecule().
|
inline |
Returns the total number of constraints in this molecule.
Definition at line 185 of file Molecule.hpp.
Referenced by OpenMD::SimInfo::addMolecule(), and OpenMD::SimInfo::removeMolecule().
|
inline |
Returns the total number of cutoff groups in this molecule.
Definition at line 182 of file Molecule.hpp.
Referenced by OpenMD::SimInfo::addMolecule(), and OpenMD::SimInfo::removeMolecule().
|
inline |
Returns the total number of fluctuating charges in this molecule.
Definition at line 188 of file Molecule.hpp.
|
inline |
Returns the total number of Hydrogen Bond acceptors in this molecule.
Definition at line 193 of file Molecule.hpp.
|
inline |
Returns the total number of Hydrogen Bond donors in this molecule.
Definition at line 190 of file Molecule.hpp.
|
inline |
Returns the total number of integrable objects in this molecule.
Definition at line 179 of file Molecule.hpp.
Referenced by OpenMD::SimInfo::addMolecule(), and OpenMD::SimInfo::removeMolecule().
|
inline |
Returns the total number of improper torsions in this molecule.
Definition at line 173 of file Molecule.hpp.
Referenced by OpenMD::SimInfo::addMolecule(), and OpenMD::SimInfo::removeMolecule().
|
inline |
Returns the total number of rigid bodies in this molecule.
Definition at line 176 of file Molecule.hpp.
Referenced by OpenMD::SimInfo::addMolecule(), and OpenMD::SimInfo::removeMolecule().
|
inline |
Returns the total number of torsions in this molecule.
Definition at line 170 of file Molecule.hpp.
Referenced by OpenMD::SimInfo::addMolecule(), and OpenMD::SimInfo::removeMolecule().
RealType OpenMD::Molecule::getPotential | ( | ) |
Returns the total potential energy of short range interaction of this molecule.
Definition at line 370 of file Molecule.cpp.
Vector3d OpenMD::Molecule::getPrevCom | ( | ) |
Returns the center of mass position of this molecule in the previous snapshot.
Definition at line 279 of file Molecule.cpp.
References OpenMD::StuntDouble::getMass(), and OpenMD::StuntDouble::getPrevPos().
std::vector< std::shared_ptr< GenericData > > OpenMD::Molecule::getProperties | ( | ) |
Returns all of the properties in PropertyMap.
Definition at line 416 of file Molecule.cpp.
std::shared_ptr< GenericData > OpenMD::Molecule::getPropertyByName | ( | const std::string & | propName | ) |
Returns property.
propName | name of property |
Definition at line 420 of file Molecule.cpp.
std::vector< std::string > OpenMD::Molecule::getPropertyNames | ( | ) |
Returns all names of properties.
Definition at line 412 of file Molecule.cpp.
|
inline |
Definition at line 117 of file Molecule.hpp.
|
inline |
Definition at line 200 of file Molecule.hpp.
|
inline |
Returns the stamp id of this molecule.
Definition at line 116 of file Molecule.hpp.
|
inline |
Returns the name of the molecule.
Definition at line 120 of file Molecule.hpp.
void OpenMD::Molecule::moveCom | ( | const Vector3d & | delta | ) |
Moves the center of this molecule.
Definition at line 341 of file Molecule.cpp.
References OpenMD::StuntDouble::getPos(), and OpenMD::StuntDouble::setPos().
Definition at line 210 of file Molecule.hpp.
Definition at line 230 of file Molecule.hpp.
Definition at line 220 of file Molecule.hpp.
|
inline |
Definition at line 303 of file Molecule.hpp.
|
inline |
Definition at line 291 of file Molecule.hpp.
|
inline |
Definition at line 280 of file Molecule.hpp.
Definition at line 314 of file Molecule.hpp.
Definition at line 334 of file Molecule.hpp.
|
inline |
Definition at line 324 of file Molecule.hpp.
|
inline |
Definition at line 270 of file Molecule.hpp.
Definition at line 250 of file Molecule.hpp.
Definition at line 260 of file Molecule.hpp.
Definition at line 240 of file Molecule.hpp.
void OpenMD::Molecule::removeProperty | ( | const std::string & | propName | ) |
Removes property from PropertyMap by name.
propName | the name of property to be removed |
Definition at line 408 of file Molecule.cpp.
void OpenMD::Molecule::setCom | ( | const Vector3d & | newCom | ) |
Sets the center of this molecule.
Definition at line 336 of file Molecule.cpp.
|
inline |
Definition at line 128 of file Molecule.hpp.
|
inline |
Sets the global index of this molecule.
index | new global index to be set |
Definition at line 126 of file Molecule.hpp.
|
friend |
Definition at line 425 of file Molecule.cpp.