| 72 |
|
forceField_(ff), simParams_(simParams), |
| 73 |
|
ndf_(0), fdf_local(0), ndfRaw_(0), ndfTrans_(0), nZconstraint_(0), |
| 74 |
|
nGlobalMols_(0), nGlobalAtoms_(0), nGlobalCutoffGroups_(0), |
| 75 |
< |
nGlobalIntegrableObjects_(0), nGlobalRigidBodies_(0), nGlobalFluctuatingCharges_(0), |
| 76 |
< |
nAtoms_(0), nBonds_(0), nBends_(0), nTorsions_(0), nInversions_(0), |
| 77 |
< |
nRigidBodies_(0), nIntegrableObjects_(0), nCutoffGroups_(0), |
| 78 |
< |
nConstraints_(0), nFluctuatingCharges_(0), sman_(NULL), topologyDone_(false), |
| 75 |
> |
nGlobalIntegrableObjects_(0), nGlobalRigidBodies_(0), |
| 76 |
> |
nGlobalFluctuatingCharges_(0), nGlobalBonds_(0), nGlobalBends_(0), |
| 77 |
> |
nGlobalTorsions_(0), nGlobalInversions_(0), nAtoms_(0), nBonds_(0), |
| 78 |
> |
nBends_(0), nTorsions_(0), nInversions_(0), nRigidBodies_(0), |
| 79 |
> |
nIntegrableObjects_(0), nCutoffGroups_(0), nConstraints_(0), |
| 80 |
> |
nFluctuatingCharges_(0), sman_(NULL), topologyDone_(false), |
| 81 |
|
calcBoxDipole_(false), useAtomicVirial_(true) { |
| 82 |
|
|
| 83 |
|
MoleculeStamp* molStamp; |
| 105 |
|
addMoleculeStamp(molStamp, nMolWithSameStamp); |
| 106 |
|
|
| 107 |
|
//calculate atoms in molecules |
| 108 |
< |
nGlobalAtoms_ += molStamp->getNAtoms() *nMolWithSameStamp; |
| 108 |
> |
nGlobalAtoms_ += molStamp->getNAtoms() * nMolWithSameStamp; |
| 109 |
> |
nGlobalBonds_ += molStamp->getNBonds() * nMolWithSameStamp; |
| 110 |
> |
nGlobalBends_ += molStamp->getNBends() * nMolWithSameStamp; |
| 111 |
> |
nGlobalTorsions_ += molStamp->getNTorsions() * nMolWithSameStamp; |
| 112 |
> |
nGlobalInversions_ += molStamp->getNInversions() * nMolWithSameStamp; |
| 113 |
|
|
| 114 |
|
//calculate atoms in cutoff groups |
| 115 |
|
int nAtomsInGroups = 0; |
| 994 |
|
delete sman_; |
| 995 |
|
sman_ = sman; |
| 996 |
|
|
| 997 |
< |
Molecule* mol; |
| 998 |
< |
RigidBody* rb; |
| 993 |
< |
Atom* atom; |
| 994 |
< |
CutoffGroup* cg; |
| 995 |
< |
SimInfo::MoleculeIterator mi; |
| 997 |
> |
SimInfo::MoleculeIterator mi; |
| 998 |
> |
Molecule::AtomIterator ai; |
| 999 |
|
Molecule::RigidBodyIterator rbIter; |
| 997 |
– |
Molecule::AtomIterator atomIter; |
| 1000 |
|
Molecule::CutoffGroupIterator cgIter; |
| 1001 |
+ |
Molecule::BondIterator bondIter; |
| 1002 |
+ |
Molecule::BendIterator bendIter; |
| 1003 |
+ |
Molecule::TorsionIterator torsionIter; |
| 1004 |
+ |
Molecule::InversionIterator inversionIter; |
| 1005 |
|
|
| 1006 |
+ |
Molecule* mol; |
| 1007 |
+ |
Atom* atom; |
| 1008 |
+ |
RigidBody* rb; |
| 1009 |
+ |
CutoffGroup* cg; |
| 1010 |
+ |
Bond* bond; |
| 1011 |
+ |
Bend* bend; |
| 1012 |
+ |
Torsion* torsion; |
| 1013 |
+ |
Inversion* inversion; |
| 1014 |
+ |
|
| 1015 |
|
for (mol = beginMolecule(mi); mol != NULL; mol = nextMolecule(mi)) { |
| 1016 |
|
|
| 1017 |
< |
for (atom = mol->beginAtom(atomIter); atom != NULL; |
| 1018 |
< |
atom = mol->nextAtom(atomIter)) { |
| 1017 |
> |
for (atom = mol->beginAtom(ai); atom != NULL; |
| 1018 |
> |
atom = mol->nextAtom(ai)) { |
| 1019 |
|
atom->setSnapshotManager(sman_); |
| 1020 |
< |
} |
| 1006 |
< |
|
| 1020 |
> |
} |
| 1021 |
|
for (rb = mol->beginRigidBody(rbIter); rb != NULL; |
| 1022 |
|
rb = mol->nextRigidBody(rbIter)) { |
| 1023 |
|
rb->setSnapshotManager(sman_); |
| 1024 |
|
} |
| 1011 |
– |
|
| 1025 |
|
for (cg = mol->beginCutoffGroup(cgIter); cg != NULL; |
| 1026 |
|
cg = mol->nextCutoffGroup(cgIter)) { |
| 1027 |
|
cg->setSnapshotManager(sman_); |
| 1028 |
|
} |
| 1029 |
< |
} |
| 1030 |
< |
|
| 1029 |
> |
for (bond = mol->beginBond(bondIter); bond != NULL; |
| 1030 |
> |
bond = mol->nextBond(bondIter)) { |
| 1031 |
> |
bond->setSnapshotManager(sman_); |
| 1032 |
> |
} |
| 1033 |
> |
for (bend = mol->beginBend(bendIter); bend != NULL; |
| 1034 |
> |
bend = mol->nextBend(bendIter)) { |
| 1035 |
> |
bend->setSnapshotManager(sman_); |
| 1036 |
> |
} |
| 1037 |
> |
for (torsion = mol->beginTorsion(torsionIter); torsion != NULL; |
| 1038 |
> |
torsion = mol->nextTorsion(torsionIter)) { |
| 1039 |
> |
torsion->setSnapshotManager(sman_); |
| 1040 |
> |
} |
| 1041 |
> |
for (inversion = mol->beginInversion(inversionIter); inversion != NULL; |
| 1042 |
> |
inversion = mol->nextInversion(inversionIter)) { |
| 1043 |
> |
inversion->setSnapshotManager(sman_); |
| 1044 |
> |
} |
| 1045 |
> |
} |
| 1046 |
|
} |
| 1047 |
|
|
| 1048 |
|
|