# | Line 367 | Line 367 | void SimInfo::addExcludePairs(Molecule* mol) { | |
---|---|---|
367 | exclude_.addPair(c, d); | |
368 | } | |
369 | ||
370 | < | |
370 | > | Molecule::RigidBodyIterator rbIter; |
371 | > | RigidBody* rb; |
372 | > | for (rb = mol->beginRigidBody(rbIter); rb != NULL; rb = mol->nextRigidBody(rbIter)) { |
373 | > | std::vector<Atom*> atoms = rb->getAtoms(); |
374 | > | for (int i = 0; i < atoms.size() -1 ; ++i) { |
375 | > | for (int j = i + 1; j < atoms.size(); ++j) { |
376 | > | a = atoms[i]->getGlobalIndex(); |
377 | > | b = atoms[j]->getGlobalIndex(); |
378 | > | exclude_.addPair(a, b); |
379 | > | } |
380 | > | } |
381 | > | } |
382 | > | |
383 | > | Molecule::CutoffGroupIterator cgIter; |
384 | > | CutoffGroup* cg; |
385 | > | for (cg = mol->beginCutoffGroup(cgIter); cg != NULL; cg = mol->nextCutoffGroup(cgIter)) { |
386 | > | std::vector<Atom*> atoms = cg->getAtoms(); |
387 | > | for (int i = 0; i < atoms.size() -1 ; ++i) { |
388 | > | for (int j = i + 1; j < atoms.size(); ++j) { |
389 | > | a = atoms[i]->getGlobalIndex(); |
390 | > | b = atoms[j]->getGlobalIndex(); |
391 | > | exclude_.addPair(a, b); |
392 | > | } |
393 | > | } |
394 | > | } |
395 | > | |
396 | } | |
397 | ||
398 | void SimInfo::removeExcludePairs(Molecule* mol) { | |
# | Line 412 | Line 437 | void SimInfo::removeExcludePairs(Molecule* mol) { | |
437 | exclude_.removePair(c, d); | |
438 | } | |
439 | ||
440 | + | Molecule::RigidBodyIterator rbIter; |
441 | + | RigidBody* rb; |
442 | + | for (rb = mol->beginRigidBody(rbIter); rb != NULL; rb = mol->nextRigidBody(rbIter)) { |
443 | + | std::vector<Atom*> atoms = rb->getAtoms(); |
444 | + | for (int i = 0; i < atoms.size() -1 ; ++i) { |
445 | + | for (int j = i + 1; j < atoms.size(); ++j) { |
446 | + | a = atoms[i]->getGlobalIndex(); |
447 | + | b = atoms[j]->getGlobalIndex(); |
448 | + | exclude_.removePair(a, b); |
449 | + | } |
450 | + | } |
451 | + | } |
452 | + | |
453 | + | Molecule::CutoffGroupIterator cgIter; |
454 | + | CutoffGroup* cg; |
455 | + | for (cg = mol->beginCutoffGroup(cgIter); cg != NULL; cg = mol->nextCutoffGroup(cgIter)) { |
456 | + | std::vector<Atom*> atoms = cg->getAtoms(); |
457 | + | for (int i = 0; i < atoms.size() -1 ; ++i) { |
458 | + | for (int j = i + 1; j < atoms.size(); ++j) { |
459 | + | a = atoms[i]->getGlobalIndex(); |
460 | + | b = atoms[j]->getGlobalIndex(); |
461 | + | exclude_.removePair(a, b); |
462 | + | } |
463 | + | } |
464 | + | } |
465 | + | |
466 | } | |
467 | ||
468 | ||
# | Line 646 | Line 697 | void SimInfo::setupFortranSim() { | |
697 | } | |
698 | ||
699 | //setup fortran simulation | |
649 | – | //gloalExcludes and molMembershipArray should go away (They are never used) |
650 | – | //why the hell fortran need to know molecule? |
651 | – | //OOPSE = Object-Obfuscated Parallel Simulation Engine |
700 | int nGlobalExcludes = 0; | |
701 | int* globalExcludes = NULL; | |
702 | int* excludeList = exclude_.getExcludeList(); | |
# | Line 836 | Line 884 | void SimInfo::setSnapshotManager(SnapshotManager* sman | |
884 | } | |
885 | ||
886 | void SimInfo::setSnapshotManager(SnapshotManager* sman) { | |
887 | < | //if (sman_ == sman_) { |
888 | < | // return; |
889 | < | //} |
890 | < | |
843 | < | //delete sman_; |
887 | > | if (sman_ == sman) { |
888 | > | return; |
889 | > | } |
890 | > | delete sman_; |
891 | sman_ = sman; | |
892 | ||
893 | Molecule* mol; |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |