| 55 |  | nObjects_.push_back(info_->getNGlobalBends()); | 
| 56 |  | nObjects_.push_back(info_->getNGlobalTorsions()); | 
| 57 |  | nObjects_.push_back(info_->getNGlobalInversions()); | 
| 58 | + | nObjects_.push_back(info_->getNGlobalMolecules()); | 
| 59 |  |  | 
| 60 |  | stuntdoubles_.resize(nObjects_[STUNTDOUBLE]); | 
| 61 |  | bonds_.resize(nObjects_[BOND]); | 
| 62 |  | bends_.resize(nObjects_[BEND]); | 
| 63 |  | torsions_.resize(nObjects_[TORSION]); | 
| 64 |  | inversions_.resize(nObjects_[INVERSION]); | 
| 65 | + | molecules_.resize(nObjects_[MOLECULE]); | 
| 66 |  |  | 
| 67 |  | SimInfo::MoleculeIterator mi; | 
| 68 |  | Molecule::AtomIterator ai; | 
| 82 |  |  | 
| 83 |  | for (mol = info_->beginMolecule(mi); mol != NULL; | 
| 84 |  | mol = info_->nextMolecule(mi)) { | 
| 85 | < |  | 
| 85 | > |  | 
| 86 | > | molecules_[mol->getGlobalIndex()] = mol; | 
| 87 | > |  | 
| 88 |  | for(atom = mol->beginAtom(ai); atom != NULL; | 
| 89 |  | atom = mol->nextAtom(ai)) { | 
| 90 |  | stuntdoubles_[atom->getGlobalIndex()] = atom; | 
| 166 |  | centerPos = center->getPos(); | 
| 167 |  | #endif | 
| 168 |  |  | 
| 169 | + | for (unsigned int j = 0; j < molecules_.size(); ++j) { | 
| 170 | + | Vector3d r =centerPos - molecules_[j]->getCom(); | 
| 171 | + | currSnapshot->wrapVector(r); | 
| 172 | + | if (r.length() <= distance) { | 
| 173 | + | bsResult.bitsets_[MOLECULE].setBitOn(j); | 
| 174 | + | } | 
| 175 | + | } | 
| 176 |  | for (unsigned int j = 0; j < stuntdoubles_.size(); ++j) { | 
| 177 |  | Vector3d r =centerPos - stuntdoubles_[j]->getPos(); | 
| 178 |  | currSnapshot->wrapVector(r); | 
| 282 |  | center = stuntdoubles_[i]; | 
| 283 |  | centerPos = center->getPos(frame); | 
| 284 |  | #endif | 
| 285 | + | for (unsigned int j = 0; j < molecules_.size(); ++j) { | 
| 286 | + | Vector3d r =centerPos - molecules_[j]->getCom(frame); | 
| 287 | + | currSnapshot->wrapVector(r); | 
| 288 | + | if (r.length() <= distance) { | 
| 289 | + | bsResult.bitsets_[MOLECULE].setBitOn(j); | 
| 290 | + | } | 
| 291 | + | } | 
| 292 | + |  | 
| 293 |  | for (unsigned int j = 0; j < stuntdoubles_.size(); ++j) { | 
| 294 |  | Vector3d r =centerPos - stuntdoubles_[j]->getPos(frame); | 
| 295 |  | currSnapshot->wrapVector(r); |