66#include "io/ForceFieldOptions.hpp"
68#include "nonbonded/SwitchingFunction.hpp"
71#include "selection/SelectionManager.hpp"
73#include "utils/RandNumGen.hpp"
74#include "utils/simError.h"
80 forceField_(ff), simParams_(simParams), randNumGen_ {nullptr}, nAtoms_(0),
81 nBonds_(0), nBends_(0), nTorsions_(0), nInversions_(0), nRigidBodies_(0),
82 nIntegrableObjects_(0), nCutoffGroups_(0), nConstraints_(0),
83 nFluctuatingCharges_(0), nGlobalMols_(0), nGlobalAtoms_(0),
84 nGlobalCutoffGroups_(0), nGlobalIntegrableObjects_(0),
85 nGlobalRigidBodies_(0), nGlobalFluctuatingCharges_(0), nGlobalBonds_(0),
86 nGlobalBends_(0), nGlobalTorsions_(0), nGlobalInversions_(0),
87 nGlobalConstraints_(0), hasNGlobalConstraints_(false), ndf_(0),
88 fdf_local(0), ndfRaw_(0), ndfTrans_(0), nZconstraint_(0), sman_(NULL),
89 topologyDone_(false), calcBoxDipole_(false), calcBoxQuadrupole_(false),
90 useAtomicVirial_(true) {
92 int nMolWithSameStamp;
99 vector<Component*> components = simParams->getComponents();
101 for (vector<Component*>::iterator i = components.begin();
102 i != components.end(); ++i) {
103 molStamp = (*i)->getMoleculeStamp();
104 if ((*i)->haveRegion()) {
105 molStamp->setRegion((*i)->getRegion());
108 molStamp->setRegion(-1);
111 nMolWithSameStamp = (*i)->getNMol();
113 addMoleculeStamp(molStamp, nMolWithSameStamp);
116 nGlobalAtoms_ += molStamp->getNAtoms() * nMolWithSameStamp;
117 nGlobalBonds_ += molStamp->getNBonds() * nMolWithSameStamp;
118 nGlobalBends_ += molStamp->getNBends() * nMolWithSameStamp;
119 nGlobalTorsions_ += molStamp->getNTorsions() * nMolWithSameStamp;
120 nGlobalInversions_ += molStamp->getNInversions() * nMolWithSameStamp;
123 int nAtomsInGroups = 0;
124 int nCutoffGroupsInStamp = molStamp->getNCutoffGroups();
126 for (
int j = 0; j < nCutoffGroupsInStamp; j++) {
127 cgStamp = molStamp->getCutoffGroupStamp(j);
128 nAtomsInGroups += cgStamp->getNMembers();
131 nGroups += nCutoffGroupsInStamp * nMolWithSameStamp;
133 nCutoffAtoms += nAtomsInGroups * nMolWithSameStamp;
136 int nAtomsInRigidBodies = 0;
137 int nRigidBodiesInStamp = molStamp->getNRigidBodies();
139 for (
int j = 0; j < nRigidBodiesInStamp; j++) {
140 rbStamp = molStamp->getRigidBodyStamp(j);
141 nAtomsInRigidBodies += rbStamp->getNMembers();
144 nGlobalRigidBodies_ += nRigidBodiesInStamp * nMolWithSameStamp;
145 nRigidAtoms += nAtomsInRigidBodies * nMolWithSameStamp;
154 nGlobalCutoffGroups_ = nGlobalAtoms_ - nCutoffAtoms + nGroups;
161 nGlobalIntegrableObjects_ =
162 nGlobalAtoms_ - nRigidAtoms + nGlobalRigidBodies_;
164 nGlobalMols_ = molStampIds_.size();
165 molToProcMap_.resize(nGlobalMols_);
169 std::uint_fast32_t seed;
171 if (simParams_->haveSeed())
172 seed =
static_cast<std::uint_fast32_t
>(simParams_->getSeed());
174 seed = std::mt19937::default_seed;
176 randNumGen_ = std::make_shared<Utils::RandNumGen>(seed);
179 SimInfo::~SimInfo() {
180 Utils::deletePointers(molecules_);
191 if (i == molecules_.end()) {
216 if (i != molecules_.end()) {
217 assert(mol == i->second);
241 i = molecules_.begin();
242 return i == molecules_.end() ? NULL : i->second;
247 return i == molecules_.end() ? NULL : i->second;
250 void SimInfo::calcNdf() {
251 int ndf_local, nfq_local;
253 vector<StuntDouble*>::iterator j;
254 vector<Atom*>::iterator k;
264 for (sd = mol->beginIntegrableObject(j); sd != NULL;
265 sd = mol->nextIntegrableObject(j)) {
277 for (atom = mol->beginFluctuatingCharge(k); atom != NULL;
278 atom = mol->nextFluctuatingCharge(k)) {
279 if (atom->isFluctuatingCharge()) { nfq_local++; }
283 ndfLocal_ = ndf_local;
286 ndf_local -= nConstraints_;
289 MPI_Allreduce(&ndf_local, &ndf_, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD);
290 MPI_Allreduce(&nfq_local, &nGlobalFluctuatingCharges_, 1, MPI_INT, MPI_SUM,
294 nGlobalFluctuatingCharges_ = nfq_local;
299 ndf_ = ndf_ - 3 - nZconstraint_;
302 int SimInfo::getFdf() {
304 MPI_Allreduce(&fdf_local, &fdf_, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD);
312 int nLocalCutoffAtoms = 0;
316 Molecule::CutoffGroupIterator ci;
319 for (cg = mol->beginCutoffGroup(ci); cg != NULL;
320 cg = mol->nextCutoffGroup(ci)) {
321 nLocalCutoffAtoms += cg->getNumAtom();
325 return nAtoms_ - nLocalCutoffAtoms + nCutoffGroups_;
328 void SimInfo::calcNdfRaw() {
332 vector<StuntDouble*>::iterator j;
340 for (sd = mol->beginIntegrableObject(j); sd != NULL;
341 sd = mol->nextIntegrableObject(j)) {
355 MPI_Allreduce(&ndfRaw_local, &ndfRaw_, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD);
357 ndfRaw_ = ndfRaw_local;
361 void SimInfo::calcNdfTrans() {
364 ndfTrans_local = 3 * nIntegrableObjects_ - nConstraints_;
367 MPI_Allreduce(&ndfTrans_local, &ndfTrans_, 1, MPI_INT, MPI_SUM,
370 ndfTrans_ = ndfTrans_local;
373 ndfTrans_ = ndfTrans_ - 3 - nZconstraint_;
378 vector<Bond*>::iterator bondIter;
379 vector<Bend*>::iterator bendIter;
380 vector<Torsion*>::iterator torsionIter;
381 vector<Inversion*>::iterator inversionIter;
399 map<int, set<int>> atomGroups;
400 Molecule::RigidBodyIterator rbIter;
402 Molecule::IntegrableObjectIterator ii;
405 for (sd = mol->beginIntegrableObject(ii); sd != NULL;
406 sd = mol->nextIntegrableObject(ii)) {
409 vector<Atom*> atoms = rb->
getAtoms();
411 for (
int i = 0; i < static_cast<int>(atoms.size()); ++i) {
412 rigidAtoms.insert(atoms[i]->getGlobalIndex());
414 for (
int i = 0; i < static_cast<int>(atoms.size()); ++i) {
415 atomGroups.insert(map<
int, set<int>>::value_type(
416 atoms[i]->getGlobalIndex(), rigidAtoms));
422 map<
int, set<int>>::value_type(sd->
getGlobalIndex(), oneAtomSet));
426 for (bond = mol->beginBond(bondIter); bond != NULL;
427 bond = mol->nextBond(bondIter)) {
431 if (options_.havevdw12scale() || options_.haveelectrostatic12scale()) {
432 oneTwoInteractions_.
addPair(a, b);
434 excludedInteractions_.
addPair(a, b);
438 for (bend = mol->beginBend(bendIter); bend != NULL;
439 bend = mol->nextBend(bendIter)) {
444 if (options_.havevdw12scale() || options_.haveelectrostatic12scale()) {
445 oneTwoInteractions_.
addPair(a, b);
446 oneTwoInteractions_.
addPair(b, c);
448 excludedInteractions_.
addPair(a, b);
449 excludedInteractions_.
addPair(b, c);
452 if (options_.havevdw13scale() || options_.haveelectrostatic13scale()) {
453 oneThreeInteractions_.
addPair(a, c);
455 excludedInteractions_.
addPair(a, c);
459 for (torsion = mol->beginTorsion(torsionIter); torsion != NULL;
460 torsion = mol->nextTorsion(torsionIter)) {
466 if (options_.havevdw12scale() || options_.haveelectrostatic12scale()) {
467 oneTwoInteractions_.
addPair(a, b);
468 oneTwoInteractions_.
addPair(b, c);
469 oneTwoInteractions_.
addPair(c, d);
471 excludedInteractions_.
addPair(a, b);
472 excludedInteractions_.
addPair(b, c);
473 excludedInteractions_.
addPair(c, d);
476 if (options_.havevdw13scale() || options_.haveelectrostatic13scale()) {
477 oneThreeInteractions_.
addPair(a, c);
478 oneThreeInteractions_.
addPair(b, d);
480 excludedInteractions_.
addPair(a, c);
481 excludedInteractions_.
addPair(b, d);
484 if (options_.havevdw14scale() || options_.haveelectrostatic14scale()) {
485 oneFourInteractions_.
addPair(a, d);
487 excludedInteractions_.
addPair(a, d);
491 for (inversion = mol->beginInversion(inversionIter); inversion != NULL;
492 inversion = mol->nextInversion(inversionIter)) {
498 if (options_.havevdw12scale() || options_.haveelectrostatic12scale()) {
499 oneTwoInteractions_.
addPair(a, b);
500 oneTwoInteractions_.
addPair(a, c);
501 oneTwoInteractions_.
addPair(a, d);
503 excludedInteractions_.
addPair(a, b);
504 excludedInteractions_.
addPair(a, c);
505 excludedInteractions_.
addPair(a, d);
508 if (options_.havevdw13scale() || options_.haveelectrostatic13scale()) {
509 oneThreeInteractions_.
addPair(b, c);
510 oneThreeInteractions_.
addPair(b, d);
511 oneThreeInteractions_.
addPair(c, d);
513 excludedInteractions_.
addPair(b, c);
514 excludedInteractions_.
addPair(b, d);
515 excludedInteractions_.
addPair(c, d);
519 for (rb = mol->beginRigidBody(rbIter); rb != NULL;
520 rb = mol->nextRigidBody(rbIter)) {
521 vector<Atom*> atoms = rb->
getAtoms();
522 for (
int i = 0; i < static_cast<int>(atoms.size()) - 1; ++i) {
523 for (
int j = i + 1; j < static_cast<int>(atoms.size()); ++j) {
524 a = atoms[i]->getGlobalIndex();
525 b = atoms[j]->getGlobalIndex();
526 excludedInteractions_.
addPair(a, b);
534 vector<Bond*>::iterator bondIter;
535 vector<Bend*>::iterator bendIter;
536 vector<Torsion*>::iterator torsionIter;
537 vector<Inversion*>::iterator inversionIter;
547 map<int, set<int>> atomGroups;
548 Molecule::RigidBodyIterator rbIter;
550 Molecule::IntegrableObjectIterator ii;
553 for (sd = mol->beginIntegrableObject(ii); sd != NULL;
554 sd = mol->nextIntegrableObject(ii)) {
557 vector<Atom*> atoms = rb->
getAtoms();
559 for (
int i = 0; i < static_cast<int>(atoms.size()); ++i) {
560 rigidAtoms.insert(atoms[i]->getGlobalIndex());
562 for (
int i = 0; i < static_cast<int>(atoms.size()); ++i) {
563 atomGroups.insert(map<
int, set<int>>::value_type(
564 atoms[i]->getGlobalIndex(), rigidAtoms));
570 map<
int, set<int>>::value_type(sd->
getGlobalIndex(), oneAtomSet));
574 for (bond = mol->beginBond(bondIter); bond != NULL;
575 bond = mol->nextBond(bondIter)) {
579 if (options_.havevdw12scale() || options_.haveelectrostatic12scale()) {
586 for (bend = mol->beginBend(bendIter); bend != NULL;
587 bend = mol->nextBend(bendIter)) {
592 if (options_.havevdw12scale() || options_.haveelectrostatic12scale()) {
600 if (options_.havevdw13scale() || options_.haveelectrostatic13scale()) {
607 for (torsion = mol->beginTorsion(torsionIter); torsion != NULL;
608 torsion = mol->nextTorsion(torsionIter)) {
614 if (options_.havevdw12scale() || options_.haveelectrostatic12scale()) {
624 if (options_.havevdw13scale() || options_.haveelectrostatic13scale()) {
632 if (options_.havevdw14scale() || options_.haveelectrostatic14scale()) {
639 for (inversion = mol->beginInversion(inversionIter); inversion != NULL;
640 inversion = mol->nextInversion(inversionIter)) {
646 if (options_.havevdw12scale() || options_.haveelectrostatic12scale()) {
656 if (options_.havevdw13scale() || options_.haveelectrostatic13scale()) {
667 for (rb = mol->beginRigidBody(rbIter); rb != NULL;
668 rb = mol->nextRigidBody(rbIter)) {
669 vector<Atom*> atoms = rb->
getAtoms();
670 for (
int i = 0; i < static_cast<int>(atoms.size()) - 1; ++i) {
671 for (
int j = i + 1; j < static_cast<int>(atoms.size()); ++j) {
672 a = atoms[i]->getGlobalIndex();
673 b = atoms[j]->getGlobalIndex();
680 void SimInfo::addMoleculeStamp(
MoleculeStamp* molStamp,
int nmol) {
684 curStampId = moleculeStamps_.size();
686 moleculeStamps_.push_back(molStamp);
687 molStampIds_.insert(molStampIds_.end(), nmol, curStampId);
713 SimInfo::MoleculeIterator mi;
715 Molecule::AtomIterator ai;
717 AtomTypeSet atomTypes;
720 for (atom = mol->beginAtom(ai); atom != NULL; atom = mol->nextAtom(ai)) {
730 vector<int> foundTypes;
731 AtomTypeSet::iterator i;
732 for (i = atomTypes.begin(); i != atomTypes.end(); ++i)
733 foundTypes.push_back((*i)->getIdent());
736 int count_local = foundTypes.size();
739 MPI_Comm_size(MPI_COMM_WORLD, &nproc);
743 vector<int> counts(nproc, 0);
744 vector<int> disps(nproc, 0);
747 MPI_Allgather(&count_local, 1, MPI_INT, &counts[0], 1, MPI_INT,
752 int totalCount = counts[0];
753 for (
int iproc = 1; iproc < nproc; iproc++) {
754 disps[iproc] = disps[iproc - 1] + counts[iproc - 1];
755 totalCount += counts[iproc];
759 vector<int> ftGlobal(totalCount);
762 MPI_Allgatherv(&foundTypes[0], count_local, MPI_INT, &ftGlobal[0],
763 &counts[0], &disps[0], MPI_INT, MPI_COMM_WORLD);
765 vector<int>::iterator j;
769 set<int> foundIdents;
771 for (j = ftGlobal.begin(); j != ftGlobal.end(); ++j)
772 foundIdents.insert((*j));
776 set<int>::iterator it;
777 for (it = foundIdents.begin(); it != foundIdents.end(); ++it)
785 int getGlobalCountOfType(
AtomType*) {
800 void SimInfo::setupSimVariables() {
801 useAtomicVirial_ = simParams_->getUseAtomicVirial();
804 calcBoxDipole_ =
false;
805 if (simParams_->haveAccumulateBoxDipole())
806 if (simParams_->getAccumulateBoxDipole()) { calcBoxDipole_ =
true; }
809 calcBoxQuadrupole_ =
false;
810 if (simParams_->haveAccumulateBoxQuadrupole())
811 if (simParams_->getAccumulateBoxQuadrupole()) {
812 calcBoxQuadrupole_ =
true;
815 AtomTypeSet::iterator i;
816 AtomTypeSet atomTypes;
818 bool usesElectrostatic =
false;
819 bool usesMetallic =
false;
820 bool usesDirectional =
false;
821 bool usesFluctuatingCharges =
false;
823 for (i = atomTypes.begin(); i != atomTypes.end(); ++i) {
824 usesElectrostatic |= (*i)->isElectrostatic();
825 usesMetallic |= (*i)->isMetal();
826 usesDirectional |= (*i)->isDirectional();
827 usesFluctuatingCharges |= (*i)->isFluctuatingCharge();
833 temp = usesDirectional;
834 MPI_Allreduce(MPI_IN_PLACE, &temp, 1, MPI_INT, MPI_LOR, MPI_COMM_WORLD);
835 usesDirectionalAtoms_ = (temp == 0) ?
false : true;
838 MPI_Allreduce(MPI_IN_PLACE, &temp, 1, MPI_INT, MPI_LOR, MPI_COMM_WORLD);
839 usesMetallicAtoms_ = (temp == 0) ?
false : true;
841 temp = usesElectrostatic;
842 MPI_Allreduce(MPI_IN_PLACE, &temp, 1, MPI_INT, MPI_LOR, MPI_COMM_WORLD);
843 usesElectrostaticAtoms_ = (temp == 0) ?
false : true;
845 temp = usesFluctuatingCharges;
846 MPI_Allreduce(MPI_IN_PLACE, &temp, 1, MPI_INT, MPI_LOR, MPI_COMM_WORLD);
847 usesFluctuatingCharges_ = (temp == 0) ?
false : true;
850 usesDirectionalAtoms_ = usesDirectional;
851 usesMetallicAtoms_ = usesMetallic;
852 usesElectrostaticAtoms_ = usesElectrostatic;
853 usesFluctuatingCharges_ = usesFluctuatingCharges;
857 requiresPrepair_ = usesMetallicAtoms_ ? true :
false;
858 requiresSkipCorrection_ = usesElectrostaticAtoms_ ? true :
false;
859 requiresSelfCorrection_ = usesElectrostaticAtoms_ ? true :
false;
863 SimInfo::MoleculeIterator mi;
865 Molecule::AtomIterator ai;
868 vector<int> GlobalAtomIndices(
getNAtoms(), 0);
871 for (atom = mol->beginAtom(ai); atom != NULL; atom = mol->nextAtom(ai)) {
875 return GlobalAtomIndices;
879 SimInfo::MoleculeIterator mi;
881 Molecule::CutoffGroupIterator ci;
884 vector<int> GlobalGroupIndices;
889 for (cg = mol->beginCutoffGroup(ci); cg != NULL;
890 cg = mol->nextCutoffGroup(ci)) {
891 GlobalGroupIndices.push_back(cg->getGlobalIndex());
894 return GlobalGroupIndices;
899 SimInfo::MoleculeIterator mi;
901 Molecule::CutoffGroupIterator ci;
903 Molecule::AtomIterator ai;
915 massFactors_.clear();
919 for (cg = mol->beginCutoffGroup(ci); cg != NULL;
920 cg = mol->nextCutoffGroup(ci)) {
921 totalMass = cg->getMass();
922 for (atom = cg->beginAtom(ai); atom != NULL; atom = cg->nextAtom(ai)) {
940 int reg = mol->getRegion();
941 for (atom = mol->beginAtom(ai); atom != NULL; atom = mol->nextAtom(ai)) {
942 identArray_.push_back(atom->getIdent());
943 regions_.push_back(reg);
947 topologyDone_ =
true;
967 const string& propName) {
972 if (sman_ == sman) {
return; }
976 SimInfo::MoleculeIterator mi;
977 Molecule::AtomIterator ai;
978 Molecule::RigidBodyIterator rbIter;
979 Molecule::CutoffGroupIterator cgIter;
980 Molecule::BondIterator bondIter;
981 Molecule::BendIterator bendIter;
982 Molecule::TorsionIterator torsionIter;
983 Molecule::InversionIterator inversionIter;
995 for (atom = mol->beginAtom(ai); atom != NULL; atom = mol->nextAtom(ai)) {
998 for (rb = mol->beginRigidBody(rbIter); rb != NULL;
999 rb = mol->nextRigidBody(rbIter)) {
1002 for (cg = mol->beginCutoffGroup(cgIter); cg != NULL;
1003 cg = mol->nextCutoffGroup(cgIter)) {
1006 for (bond = mol->beginBond(bondIter); bond != NULL;
1007 bond = mol->nextBond(bondIter)) {
1010 for (bend = mol->beginBend(bendIter); bend != NULL;
1011 bend = mol->nextBend(bendIter)) {
1014 for (torsion = mol->beginTorsion(torsionIter); torsion != NULL;
1015 torsion = mol->nextTorsion(torsionIter)) {
1018 for (inversion = mol->beginInversion(inversionIter); inversion != NULL;
1019 inversion = mol->nextInversion(inversionIter)) {
1025 ostream& operator<<(ostream& o,
SimInfo&) {
return o; }
1028 if (index >=
int(IOIndexToIntegrableObject.size())) {
1030 painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
1031 "SimInfo::getIOIndexToIntegrableObject Error: Integrable Object\n"
1032 "\tindex exceeds number of known objects!\n");
1033 painCave.isFatal = 1;
1037 return IOIndexToIntegrableObject.at(index);
1040 void SimInfo::setIOIndexToIntegrableObject(
const vector<StuntDouble*>& v) {
1041 IOIndexToIntegrableObject = v;
1044 void SimInfo::calcNConstraints() {
1046 MPI_Allreduce(&nConstraints_, &nGlobalConstraints_, 1, MPI_INT, MPI_SUM,
1049 nGlobalConstraints_ = nConstraints_;
AtomType * getAtomType()
Returns the AtomType of this Atom.
AtomType is what OpenMD looks to for unchanging data about an atom.
void setSnapshotManager(SnapshotManager *sman)
Sets the Snapshot Manager of this cutoffGroup.
AtomType * getAtomType(const std::string &at)
getAtomType by string
size_t getNIntegrableObjects()
Returns the total number of integrable objects in this molecule.
size_t getNInversions()
Returns the total number of improper torsions in this molecule.
int getGlobalIndex()
Returns the global index of this molecule.
size_t getNBends()
Returns the total number of bends in this molecule.
size_t getNConstraintPairs()
Returns the total number of constraints in this molecule.
size_t getNAtoms()
Returns the total number of atoms in this molecule.
size_t getNRigidBodies()
Returns the total number of rigid bodies in this molecule.
size_t getNBonds()
Returns the total number of bonds in this molecule.
size_t getNCutoffGroups()
Returns the total number of cutoff groups in this molecule.
size_t getNTorsions()
Returns the total number of torsions in this molecule.
void addPair(int i, int j)
Adds a pair into this PairList class.
void removePair(int i, int j)
Remove a pair from PairList class.
std::shared_ptr< GenericData > getPropertyByName(const std::string &propName)
Returns property.
std::vector< std::shared_ptr< GenericData > > getProperties()
Returns all of the properties in PropertyMap.
void addProperty(std::shared_ptr< GenericData > genData)
Adds property into property map.
bool removeProperty(const std::string &propName)
Removes property from PropertyMap by name.
std::vector< std::string > getPropertyNames()
Returns all names of properties.
std::vector< Atom * > getAtoms()
Returns the atoms of this rigid body.
void setSnapshotManager(SnapshotManager *sman)
Sets the Snapshot Manager of this ShortRangeInteraction.
One of the heavy-weight classes of OpenMD, SimInfo maintains objects and variables relating to the cu...
bool removeMolecule(Molecule *mol)
Removes a molecule from SimInfo.
std::vector< std::shared_ptr< GenericData > > getProperties()
Returns all of the properties in PropertyMap.
std::vector< int > getGlobalGroupIndices()
returns a vector which maps the local cutoff group index on this processor to the global cutoff group...
void removeInteractionPairs(Molecule *mol)
remove all special interaction pairs which belong to a molecule from the appropriate lists.
Molecule * beginMolecule(MoleculeIterator &i)
Returns the first molecule in this SimInfo and intialize the iterator.
unsigned int getNAtoms()
Returns the number of local atoms.
void prepareTopology()
Do final bookkeeping before Force managers need their data.
std::shared_ptr< GenericData > getPropertyByName(const std::string &propName)
Returns property.
void setSnapshotManager(SnapshotManager *sman)
Sets the snapshot manager.
bool addMolecule(Molecule *mol)
Adds a molecule.
std::vector< std::string > getPropertyNames()
Returns all names of properties.
void addInteractionPairs(Molecule *mol)
add all special interaction pairs (including excluded interactions) in a molecule into the appropriat...
unsigned int getNLocalCutoffGroups()
Returns the number of effective cutoff groups on local processor.
Molecule * nextMolecule(MoleculeIterator &i)
Returns the next avaliable Molecule based on the iterator.
StuntDouble * getIOIndexToIntegrableObject(int index)
return an integral objects by its global index.
void addProperty(std::shared_ptr< GenericData > genData)
Adds property into property map.
std::vector< int > getGlobalAtomIndices()
returns a vector which maps the local atom index on this processor to the global atom index.
void removeProperty(const std::string &propName)
Removes property from PropertyMap by name.
AtomTypeSet getSimulatedAtomTypes()
Returns the set of atom types present in this simulation.
SimInfo(ForceField *ff, Globals *simParams)
Constructor of SimInfo.
SnapshotManager class is an abstract class which maintains a series of snapshots.
"Don't move, or you're dead! Stand up! Captain, we've got them!"
RealType getMass()
Returns the mass of this stuntDouble.
bool isLinear()
Tests the if this stuntDouble is a linear rigidbody.
void setSnapshotManager(SnapshotManager *sman)
Sets the Snapshot Manager of this stuntDouble.
bool isRigidBody()
Tests if this stuntDouble is a rigid body.
int getGlobalIndex()
Returns the global index of this stuntDouble.
bool isDirectional()
Tests if this stuntDouble is a directional one.
int getLocalIndex()
Returns the local index of this stuntDouble.
This basic Periodic Table class was originally taken from the data.cpp file in OpenBabel.