| 231 |  | vector<Atom*>::iterator k; | 
| 232 |  |  | 
| 233 |  | Molecule* mol; | 
| 234 | < | StuntDouble* integrableObject; | 
| 234 | > | StuntDouble* sd; | 
| 235 |  | Atom* atom; | 
| 236 |  |  | 
| 237 |  | ndf_local = 0; | 
| 238 |  | nfq_local = 0; | 
| 239 |  |  | 
| 240 |  | for (mol = beginMolecule(i); mol != NULL; mol = nextMolecule(i)) { | 
| 241 | < | for (integrableObject = mol->beginIntegrableObject(j); integrableObject != NULL; | 
| 242 | < | integrableObject = mol->nextIntegrableObject(j)) { | 
| 241 | > |  | 
| 242 | > | for (sd = mol->beginIntegrableObject(j); sd != NULL; | 
| 243 | > | sd = mol->nextIntegrableObject(j)) { | 
| 244 |  |  | 
| 245 |  | ndf_local += 3; | 
| 246 |  |  | 
| 247 | < | if (integrableObject->isDirectional()) { | 
| 248 | < | if (integrableObject->isLinear()) { | 
| 247 | > | if (sd->isDirectional()) { | 
| 248 | > | if (sd->isLinear()) { | 
| 249 |  | ndf_local += 2; | 
| 250 |  | } else { | 
| 251 |  | ndf_local += 3; | 
| 252 |  | } | 
| 253 |  | } | 
| 254 |  | } | 
| 255 | + |  | 
| 256 |  | for (atom = mol->beginFluctuatingCharge(k); atom != NULL; | 
| 257 |  | atom = mol->nextFluctuatingCharge(k)) { | 
| 258 |  | if (atom->isFluctuatingCharge()) { | 
| 314 |  | MoleculeIterator i; | 
| 315 |  | vector<StuntDouble*>::iterator j; | 
| 316 |  | Molecule* mol; | 
| 317 | < | StuntDouble* integrableObject; | 
| 317 | > | StuntDouble* sd; | 
| 318 |  |  | 
| 319 |  | // Raw degrees of freedom that we have to set | 
| 320 |  | ndfRaw_local = 0; | 
| 321 |  |  | 
| 322 |  | for (mol = beginMolecule(i); mol != NULL; mol = nextMolecule(i)) { | 
| 321 | – | for (integrableObject = mol->beginIntegrableObject(j); integrableObject != NULL; | 
| 322 | – | integrableObject = mol->nextIntegrableObject(j)) { | 
| 323 |  |  | 
| 324 | + | for (sd = mol->beginIntegrableObject(j); sd != NULL; | 
| 325 | + | sd = mol->nextIntegrableObject(j)) { | 
| 326 | + |  | 
| 327 |  | ndfRaw_local += 3; | 
| 328 |  |  | 
| 329 | < | if (integrableObject->isDirectional()) { | 
| 330 | < | if (integrableObject->isLinear()) { | 
| 329 | > | if (sd->isDirectional()) { | 
| 330 | > | if (sd->isLinear()) { | 
| 331 |  | ndfRaw_local += 2; | 
| 332 |  | } else { | 
| 333 |  | ndfRaw_local += 3; | 
| 387 |  | Molecule::RigidBodyIterator rbIter; | 
| 388 |  | RigidBody* rb; | 
| 389 |  | Molecule::IntegrableObjectIterator ii; | 
| 390 | < | StuntDouble* integrableObject; | 
| 390 | > | StuntDouble* sd; | 
| 391 |  |  | 
| 392 | < | for (integrableObject = mol->beginIntegrableObject(ii); | 
| 393 | < | integrableObject != NULL; | 
| 391 | < | integrableObject = mol->nextIntegrableObject(ii)) { | 
| 392 | > | for (sd = mol->beginIntegrableObject(ii); sd != NULL; | 
| 393 | > | sd = mol->nextIntegrableObject(ii)) { | 
| 394 |  |  | 
| 395 | < | if (integrableObject->isRigidBody()) { | 
| 396 | < | rb = static_cast<RigidBody*>(integrableObject); | 
| 395 | > | if (sd->isRigidBody()) { | 
| 396 | > | rb = static_cast<RigidBody*>(sd); | 
| 397 |  | vector<Atom*> atoms = rb->getAtoms(); | 
| 398 |  | set<int> rigidAtoms; | 
| 399 |  | for (int i = 0; i < static_cast<int>(atoms.size()); ++i) { | 
| 404 |  | } | 
| 405 |  | } else { | 
| 406 |  | set<int> oneAtomSet; | 
| 407 | < | oneAtomSet.insert(integrableObject->getGlobalIndex()); | 
| 408 | < | atomGroups.insert(map<int, set<int> >::value_type(integrableObject->getGlobalIndex(), oneAtomSet)); | 
| 407 | > | oneAtomSet.insert(sd->getGlobalIndex()); | 
| 408 | > | atomGroups.insert(map<int, set<int> >::value_type(sd->getGlobalIndex(), oneAtomSet)); | 
| 409 |  | } | 
| 410 |  | } | 
| 411 |  |  | 
| 539 |  | Molecule::RigidBodyIterator rbIter; | 
| 540 |  | RigidBody* rb; | 
| 541 |  | Molecule::IntegrableObjectIterator ii; | 
| 542 | < | StuntDouble* integrableObject; | 
| 542 | > | StuntDouble* sd; | 
| 543 |  |  | 
| 544 | < | for (integrableObject = mol->beginIntegrableObject(ii); | 
| 545 | < | integrableObject != NULL; | 
| 544 | < | integrableObject = mol->nextIntegrableObject(ii)) { | 
| 544 | > | for (sd = mol->beginIntegrableObject(ii); sd != NULL; | 
| 545 | > | sd = mol->nextIntegrableObject(ii)) { | 
| 546 |  |  | 
| 547 | < | if (integrableObject->isRigidBody()) { | 
| 548 | < | rb = static_cast<RigidBody*>(integrableObject); | 
| 547 | > | if (sd->isRigidBody()) { | 
| 548 | > | rb = static_cast<RigidBody*>(sd); | 
| 549 |  | vector<Atom*> atoms = rb->getAtoms(); | 
| 550 |  | set<int> rigidAtoms; | 
| 551 |  | for (int i = 0; i < static_cast<int>(atoms.size()); ++i) { | 
| 556 |  | } | 
| 557 |  | } else { | 
| 558 |  | set<int> oneAtomSet; | 
| 559 | < | oneAtomSet.insert(integrableObject->getGlobalIndex()); | 
| 560 | < | atomGroups.insert(map<int, set<int> >::value_type(integrableObject->getGlobalIndex(), oneAtomSet)); | 
| 559 | > | oneAtomSet.insert(sd->getGlobalIndex()); | 
| 560 | > | atomGroups.insert(map<int, set<int> >::value_type(sd->getGlobalIndex(), oneAtomSet)); | 
| 561 |  | } | 
| 562 |  | } | 
| 563 |  |  |