| 64 |
|
MemoryUtils::deletePointers(bonds_); |
| 65 |
|
MemoryUtils::deletePointers(bends_); |
| 66 |
|
MemoryUtils::deletePointers(torsions_); |
| 67 |
+ |
MemoryUtils::deletePointers(inversions_); |
| 68 |
|
MemoryUtils::deletePointers(rigidBodies_); |
| 69 |
|
MemoryUtils::deletePointers(cutoffGroups_); |
| 70 |
|
MemoryUtils::deletePointers(constraintPairs_); |
| 96 |
|
if (std::find(torsions_.begin(), torsions_.end(), torsion) == |
| 97 |
|
torsions_.end()) { |
| 98 |
|
torsions_.push_back(torsion); |
| 99 |
+ |
} |
| 100 |
+ |
} |
| 101 |
+ |
|
| 102 |
+ |
void Molecule::addInversion(Inversion* inversion) { |
| 103 |
+ |
if (std::find(inversions_.begin(), inversions_.end(), inversion) == |
| 104 |
+ |
inversions_.end()) { |
| 105 |
+ |
inversions_.push_back(inversion); |
| 106 |
|
} |
| 107 |
|
} |
| 108 |
|
|
| 245 |
|
Bond* bond; |
| 246 |
|
Bend* bend; |
| 247 |
|
Torsion* torsion; |
| 248 |
+ |
Inversion* inversion; |
| 249 |
|
Molecule::BondIterator bondIter;; |
| 250 |
|
Molecule::BendIterator bendIter; |
| 251 |
|
Molecule::TorsionIterator torsionIter; |
| 252 |
+ |
Molecule::InversionIterator inversionIter; |
| 253 |
|
|
| 254 |
|
RealType potential = 0.0; |
| 255 |
|
|
| 266 |
|
potential += torsion->getPotential(); |
| 267 |
|
} |
| 268 |
|
|
| 269 |
+ |
for (inversion = beginInversion(inversionIter); torsion != NULL; |
| 270 |
+ |
inversion = nextInversion(inversionIter)) { |
| 271 |
+ |
potential += inversion->getPotential(); |
| 272 |
+ |
} |
| 273 |
+ |
|
| 274 |
|
return potential; |
| 275 |
|
|
| 276 |
|
} |
| 282 |
|
o << mol.getNBonds() << " bonds" << std::endl; |
| 283 |
|
o << mol.getNBends() << " bends" << std::endl; |
| 284 |
|
o << mol.getNTorsions() << " torsions" << std::endl; |
| 285 |
+ |
o << mol.getNInversions() << " inversions" << std::endl; |
| 286 |
|
o << mol.getNRigidBodies() << " rigid bodies" << std::endl; |
| 287 |
|
o << mol.getNIntegrableObjects() << "integrable objects" << std::endl; |
| 288 |
|
o << mol.getNCutoffGroups() << "cutoff groups" << std::endl; |