ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/devel_omp/src/brains/ForceManager.cpp
(Generate patch)

Comparing:
branches/development/src/brains/ForceManager.cpp (file contents), Revision 1583 by gezelter, Thu Jun 16 22:00:08 2011 UTC vs.
branches/devel_omp/src/brains/ForceManager.cpp (file contents), Revision 1595 by chuckv, Tue Jul 19 18:50:04 2011 UTC

# Line 75 | Line 75 | namespace OpenMD {
75    /**
76     * setupCutoffs
77     *
78 <   * Sets the values of cutoffRadius, cutoffMethod, and cutoffPolicy
78 >   * Sets the values of cutoffRadius, switchingRadius, cutoffMethod,
79 >   * and cutoffPolicy
80     *
81     * cutoffRadius : realType
82     *  If the cutoffRadius was explicitly set, use that value.
# Line 85 | Line 86 | namespace OpenMD {
86     *      simulation for suggested cutoff values (e.g. 2.5 * sigma).
87     *      Use the maximum suggested value that was found.
88     *
89 <   * cutoffMethod : (one of HARD, SWITCHED, SHIFTED_FORCE, SHIFTED_POTENTIAL)
89 >   * cutoffMethod : (one of HARD, SWITCHED, SHIFTED_FORCE,
90 >   *                        or SHIFTED_POTENTIAL)
91     *      If cutoffMethod was explicitly set, use that choice.
92     *      If cutoffMethod was not explicitly set, use SHIFTED_FORCE
93     *
94     * cutoffPolicy : (one of MIX, MAX, TRADITIONAL)
95     *      If cutoffPolicy was explicitly set, use that choice.
96     *      If cutoffPolicy was not explicitly set, use TRADITIONAL
97 +   *
98 +   * switchingRadius : realType
99 +   *  If the cutoffMethod was set to SWITCHED:
100 +   *      If the switchingRadius was explicitly set, use that value
101 +   *          (but do a sanity check first).
102 +   *      If the switchingRadius was not explicitly set: use 0.85 *
103 +   *      cutoffRadius_
104 +   *  If the cutoffMethod was not set to SWITCHED:
105 +   *      Set switchingRadius equal to cutoffRadius for safety.
106     */
107    void ForceManager::setupCutoffs() {
108      
# Line 130 | Line 141 | namespace OpenMD {
141      }
142  
143      fDecomp_->setUserCutoff(rCut_);
144 +    interactionMan_->setCutoffRadius(rCut_);
145  
146      map<string, CutoffMethod> stringToCutoffMethod;
147      stringToCutoffMethod["HARD"] = HARD;
# Line 201 | Line 213 | namespace OpenMD {
213        simError();
214        cutoffPolicy_ = TRADITIONAL;        
215      }
204    fDecomp_->setCutoffPolicy(cutoffPolicy_);
205  }
216  
217 <  /**
218 <   * setupSwitching
209 <   *
210 <   * Sets the values of switchingRadius and
211 <   *  If the switchingRadius was explicitly set, use that value (but check it)
212 <   *  If the switchingRadius was not explicitly set: use 0.85 * cutoffRadius_
213 <   */
214 <  void ForceManager::setupSwitching() {
215 <    Globals* simParams_ = info_->getSimParams();
216 <
217 >    fDecomp_->setCutoffPolicy(cutoffPolicy_);
218 >        
219      // create the switching function object:
220 +
221      switcher_ = new SwitchingFunction();
222 <    
223 <    if (simParams_->haveSwitchingRadius()) {
224 <      rSwitch_ = simParams_->getSwitchingRadius();
225 <      if (rSwitch_ > rCut_) {        
222 >  
223 >    if (cutoffMethod_ == SWITCHED) {
224 >      if (simParams_->haveSwitchingRadius()) {
225 >        rSwitch_ = simParams_->getSwitchingRadius();
226 >        if (rSwitch_ > rCut_) {        
227 >          sprintf(painCave.errMsg,
228 >                  "ForceManager::setupCutoffs: switchingRadius (%f) is larger "
229 >                  "than the cutoffRadius(%f)\n", rSwitch_, rCut_);
230 >          painCave.isFatal = 1;
231 >          painCave.severity = OPENMD_ERROR;
232 >          simError();
233 >        }
234 >      } else {      
235 >        rSwitch_ = 0.85 * rCut_;
236          sprintf(painCave.errMsg,
237 <                "ForceManager::setupSwitching: switchingRadius (%f) is larger "
238 <                "than the cutoffRadius(%f)\n", rSwitch_, rCut_);
239 <        painCave.isFatal = 1;
240 <        painCave.severity = OPENMD_ERROR;
237 >                "ForceManager::setupCutoffs: No value was set for the switchingRadius.\n"
238 >                "\tOpenMD will use a default value of 85 percent of the cutoffRadius.\n"
239 >                "\tswitchingRadius = %f. for this simulation\n", rSwitch_);
240 >        painCave.isFatal = 0;
241 >        painCave.severity = OPENMD_WARNING;
242          simError();
243        }
244 <    } else {      
245 <      rSwitch_ = 0.85 * rCut_;
246 <      sprintf(painCave.errMsg,
247 <              "ForceManager::setupSwitching: No value was set for the switchingRadius.\n"
248 <              "\tOpenMD will use a default value of 85 percent of the cutoffRadius.\n"
249 <              "\tswitchingRadius = %f. for this simulation\n", rSwitch_);
250 <      painCave.isFatal = 0;
251 <      painCave.severity = OPENMD_WARNING;
252 <      simError();
253 <    }          
244 >    } else {
245 >      if (simParams_->haveSwitchingRadius()) {
246 >        map<string, CutoffMethod>::const_iterator it;
247 >        string theMeth;
248 >        for (it = stringToCutoffMethod.begin();
249 >             it != stringToCutoffMethod.end(); ++it) {
250 >          if (it->second == cutoffMethod_) {
251 >            theMeth = it->first;
252 >            break;
253 >          }
254 >        }
255 >        sprintf(painCave.errMsg,
256 >                "ForceManager::setupCutoffs: the cutoffMethod (%s)\n"
257 >                "\tis not set to SWITCHED, so switchingRadius value\n"
258 >                "\twill be ignored for this simulation\n", theMeth.c_str());
259 >        painCave.isFatal = 0;
260 >        painCave.severity = OPENMD_WARNING;
261 >        simError();
262 >      }
263 >
264 >      rSwitch_ = rCut_;
265 >    }
266      
267      // Default to cubic switching function.
268      sft_ = cubic;
# Line 263 | Line 289 | namespace OpenMD {
289      }
290      switcher_->setSwitchType(sft_);
291      switcher_->setSwitch(rSwitch_, rCut_);
292 +    interactionMan_->setSwitchingRadius(rSwitch_);
293    }
294    
295    void ForceManager::initialize() {
296  
297      if (!info_->isTopologyDone()) {
298 +
299        info_->update();
300        interactionMan_->setSimInfo(info_);
301        interactionMan_->initialize();
# Line 275 | Line 303 | namespace OpenMD {
303        // We want to delay the cutoffs until after the interaction
304        // manager has set up the atom-atom interactions so that we can
305        // query them for suggested cutoff values
278
306        setupCutoffs();
280      setupSwitching();
307  
308        info_->prepareTopology();      
309      }
310  
311      ForceFieldOptions& fopts = forceField_->getForceFieldOptions();
312      
313 <    // Force fields can set options on how to scale van der Waals and electrostatic
314 <    // interactions for atoms connected via bonds, bends and torsions
315 <    // in this case the topological distance between atoms is:
313 >    // Force fields can set options on how to scale van der Waals and
314 >    // electrostatic interactions for atoms connected via bonds, bends
315 >    // and torsions in this case the topological distance between
316 >    // atoms is:
317      // 0 = topologically unconnected
318      // 1 = bonded together
319      // 2 = connected via a bend
# Line 320 | Line 347 | namespace OpenMD {
347  
348      preCalculation();  
349      shortRangeInteractions();
350 <    longRangeInteractions();
350 > //    longRangeInteractions();
351 >    longRangeInteractionsRapaport();
352      postCalculation();    
353    }
354    
# Line 338 | Line 366 | namespace OpenMD {
366      
367      for (mol = info_->beginMolecule(mi); mol != NULL;
368           mol = info_->nextMolecule(mi)) {
369 <      for(atom = mol->beginAtom(ai); atom != NULL; atom = mol->nextAtom(ai)) {
369 >      for(atom = mol->beginAtom(ai); atom != NULL;
370 >          atom = mol->nextAtom(ai)) {
371          atom->zeroForcesAndTorques();
372        }
373 <          
373 >      
374        //change the positions of atoms which belong to the rigidbodies
375        for (rb = mol->beginRigidBody(rbIter); rb != NULL;
376             rb = mol->nextRigidBody(rbIter)) {
377          rb->zeroForcesAndTorques();
378        }        
379 <
379 >      
380        if(info_->getNGlobalCutoffGroups() != info_->getNGlobalAtoms()){
381          for(cg = mol->beginCutoffGroup(ci); cg != NULL;
382              cg = mol->nextCutoffGroup(ci)) {
# Line 356 | Line 385 | namespace OpenMD {
385          }
386        }      
387      }
388 <  
388 >    
389      // Zero out the stress tensor
390      tau *= 0.0;
391      
# Line 410 | Line 439 | namespace OpenMD {
439            dataSet.prev.angle = dataSet.curr.angle = angle;
440            dataSet.prev.potential = dataSet.curr.potential = currBendPot;
441            dataSet.deltaV = 0.0;
442 <          bendDataSets.insert(map<Bend*, BendDataSet>::value_type(bend, dataSet));
442 >          bendDataSets.insert(map<Bend*, BendDataSet>::value_type(bend,
443 >                                                                  dataSet));
444          }else {
445            i->second.prev.angle = i->second.curr.angle;
446            i->second.prev.potential = i->second.curr.potential;
# Line 479 | Line 509 | namespace OpenMD {
509      curSnapshot->statData[Stats::INVERSION_POTENTIAL] = inversionPotential;    
510    }
511    
512 +  void ForceManager::longRangeInteractionsRapaport() {
513 +
514 +    Snapshot* curSnapshot = info_->getSnapshotManager()->getCurrentSnapshot();
515 +    DataStorage* config = &(curSnapshot->atomData);
516 +    DataStorage* cgConfig = &(curSnapshot->cgData);
517 +
518 +    //calculate the center of mass of cutoff group
519 +
520 +    SimInfo::MoleculeIterator mi;
521 +    Molecule* mol;
522 +    Molecule::CutoffGroupIterator ci;
523 +    CutoffGroup* cg;
524 +
525 +    if(info_->getNCutoffGroups() > 0){
526 +      for (mol = info_->beginMolecule(mi); mol != NULL;
527 +           mol = info_->nextMolecule(mi)) {
528 +        for(cg = mol->beginCutoffGroup(ci); cg != NULL;
529 +            cg = mol->nextCutoffGroup(ci)) {
530 +          cerr << "branch1\n";
531 +          cerr << "globind = " << cg->getGlobalIndex() << "\n";
532 +          cg->updateCOM();
533 +        }
534 +      }
535 +    } else {
536 +      // center of mass of the group is the same as position of the atom
537 +      // if cutoff group does not exist
538 +      cerr << "branch2\n";
539 +      cgConfig->position = config->position;
540 +    }
541 +
542 +    fDecomp_->zeroWorkArrays();
543 +    fDecomp_->distributeData();
544 +
545 +    int cg1, cg2, atom1, atom2, topoDist;
546 +    Vector3d d_grp, dag, d;
547 +    RealType rgrpsq, rgrp, r2, r;
548 +    RealType electroMult, vdwMult;
549 +    RealType vij;
550 +    Vector3d fij, fg, f1;
551 +    tuple3<RealType, RealType, RealType> cuts;
552 +    RealType rCutSq;
553 +    bool in_switching_region;
554 +    RealType sw, dswdr, swderiv;
555 +    vector<int> atomListColumn, atomListRow, atomListLocal;
556 +    InteractionData idat;
557 +    SelfData sdat;
558 +    RealType mf;
559 +    RealType lrPot;
560 +    RealType vpair;
561 +    potVec longRangePotential(0.0);
562 +    potVec workPot(0.0);
563 +
564 +    int loopStart, loopEnd;
565 +
566 +    idat.vdwMult = &vdwMult;
567 +    idat.electroMult = &electroMult;
568 +    idat.pot = &workPot;
569 +    sdat.pot = fDecomp_->getEmbeddingPotential();
570 +    idat.vpair = &vpair;
571 +    idat.f1 = &f1;
572 +    idat.sw = &sw;
573 +    idat.shiftedPot = (cutoffMethod_ == SHIFTED_POTENTIAL) ? true : false;
574 +    idat.shiftedForce = (cutoffMethod_ == SHIFTED_FORCE) ? true : false;
575 +
576 +    loopEnd = PAIR_LOOP;
577 +    if (info_->requiresPrepair() ) {
578 +      loopStart = PREPAIR_LOOP;
579 +    } else {
580 +      loopStart = PAIR_LOOP;
581 +    }
582 +
583 +    for (int iLoop = loopStart; iLoop <= loopEnd; iLoop++) {
584 +
585 +      if (iLoop == loopStart) {
586 +        bool update_nlist = fDecomp_->checkNeighborList();
587 +        if (update_nlist)
588 +                neighborMatW = fDecomp_->buildLayerBasedNeighborList();
589 +      }
590 +
591 +      int i;
592 + #pragma omp parallel for num_threads(2) private(i)
593 +      for(i = 0; i < neighborMatW.size(); ++i)
594 +          for(vector<int>::iterator j = neighborMatW[i].begin(); j != neighborMatW[i].end(); ++j)
595 +                  {
596 +                         cg1 = i;
597 +                         cg2 = *j;
598 +
599 +                        cuts = fDecomp_->getGroupCutoffs(cg1, cg2);
600 +
601 +                        d_grp  = fDecomp_->getIntergroupVector(cg1, cg2);
602 +                        curSnapshot->wrapVector(d_grp);
603 +                        rgrpsq = d_grp.lengthSquare();
604 +
605 +                        rCutSq = cuts.second;
606 +
607 +                        if (rgrpsq < rCutSq) {
608 +                          idat.rcut = &cuts.first;
609 +                          if (iLoop == PAIR_LOOP) {
610 +                                vij = 0.0;
611 +                                fij = V3Zero;
612 +                          }
613 +
614 +                          in_switching_region = switcher_->getSwitch(rgrpsq, sw, dswdr,
615 +                                                                                                                 rgrp);
616 +
617 +                          atomListRow = fDecomp_->getAtomsInGroupRow(cg1);
618 +                          atomListColumn = fDecomp_->getAtomsInGroupColumn(cg2);
619 +
620 +                          for (vector<int>::iterator ia = atomListRow.begin();
621 +                                   ia != atomListRow.end(); ++ia) {
622 +                                atom1 = (*ia);
623 +
624 +                                for (vector<int>::iterator jb = atomListColumn.begin();
625 +                                         jb != atomListColumn.end(); ++jb) {
626 +                                  atom2 = (*jb);
627 +
628 +                                  if (!fDecomp_->skipAtomPair(atom1, atom2)) {
629 +                                        vpair = 0.0;
630 +                                        workPot = 0.0;
631 +                                        f1 = V3Zero;
632 +
633 +                                        fDecomp_->fillInteractionData(idat, atom1, atom2);
634 +
635 +                                        topoDist = fDecomp_->getTopologicalDistance(atom1, atom2);
636 +                                        vdwMult = vdwScale_[topoDist];
637 +                                        electroMult = electrostaticScale_[topoDist];
638 +
639 +                                        if (atomListRow.size() == 1 && atomListColumn.size() == 1) {
640 +                                          idat.d = &d_grp;
641 +                                          idat.r2 = &rgrpsq;
642 +                                          cerr << "dgrp = " << d_grp << "\n";
643 +                                        } else {
644 +                                          d = fDecomp_->getInteratomicVector(atom1, atom2);
645 +                                          curSnapshot->wrapVector( d );
646 +                                          r2 = d.lengthSquare();
647 +                                          cerr << "datm = " << d<< "\n";
648 +                                          idat.d = &d;
649 +                                          idat.r2 = &r2;
650 +                                        }
651 +
652 +                                        cerr << "idat.d = " << *(idat.d) << "\n";
653 +                                        r = sqrt( *(idat.r2) );
654 +                                        idat.rij = &r;
655 +
656 +                                        if (iLoop == PREPAIR_LOOP) {
657 +                                          interactionMan_->doPrePair(idat);
658 +                                        } else {
659 +                                          interactionMan_->doPair(idat);
660 +                                          fDecomp_->unpackInteractionData(idat, atom1, atom2);
661 +
662 +                                          cerr << "d = " << *(idat.d) << "\tv=" << vpair << "\tf=" << f1 << "\n";
663 +                                          vij += vpair;
664 +                                          fij += f1;
665 +                                          tau -= outProduct( *(idat.d), f1);
666 +                                        }
667 +                                  }
668 +                                }
669 +                          }
670 +
671 +                          if (iLoop == PAIR_LOOP) {
672 +                                if (in_switching_region) {
673 +                                  swderiv = vij * dswdr / rgrp;
674 +                                  fg = swderiv * d_grp;
675 +                                  fij += fg;
676 +
677 +                                  if (atomListRow.size() == 1 && atomListColumn.size() == 1) {
678 +                                        tau -= outProduct( *(idat.d), fg);
679 +                                  }
680 +
681 +                                  for (vector<int>::iterator ia = atomListRow.begin();
682 +                                           ia != atomListRow.end(); ++ia) {
683 +                                        atom1 = (*ia);
684 +                                        mf = fDecomp_->getMassFactorRow(atom1);
685 +                                        // fg is the force on atom ia due to cutoff group's
686 +                                        // presence in switching region
687 +                                        fg = swderiv * d_grp * mf;
688 +                                        fDecomp_->addForceToAtomRow(atom1, fg);
689 +
690 +                                        if (atomListRow.size() > 1) {
691 +                                          if (info_->usesAtomicVirial()) {
692 +                                                // find the distance between the atom
693 +                                                // and the center of the cutoff group:
694 +                                                dag = fDecomp_->getAtomToGroupVectorRow(atom1, cg1);
695 +                                                tau -= outProduct(dag, fg);
696 +                                          }
697 +                                        }
698 +                                  }
699 +                                  for (vector<int>::iterator jb = atomListColumn.begin();
700 +                                           jb != atomListColumn.end(); ++jb) {
701 +                                        atom2 = (*jb);
702 +                                        mf = fDecomp_->getMassFactorColumn(atom2);
703 +                                        // fg is the force on atom jb due to cutoff group's
704 +                                        // presence in switching region
705 +                                        fg = -swderiv * d_grp * mf;
706 +                                        fDecomp_->addForceToAtomColumn(atom2, fg);
707 +
708 +                                        if (atomListColumn.size() > 1) {
709 +                                          if (info_->usesAtomicVirial()) {
710 +                                                // find the distance between the atom
711 +                                                // and the center of the cutoff group:
712 +                                                dag = fDecomp_->getAtomToGroupVectorColumn(atom2, cg2);
713 +                                                tau -= outProduct(dag, fg);
714 +                                          }
715 +                                        }
716 +                                  }
717 +                                }
718 +                                //if (!SIM_uses_AtomicVirial) {
719 +                                //  tau -= outProduct(d_grp, fij);
720 +                                //}
721 +                          }
722 +                        }
723 +                  }
724 +
725 +      if (iLoop == PREPAIR_LOOP) {
726 +        if (info_->requiresPrepair()) {
727 +
728 +          fDecomp_->collectIntermediateData();
729 +
730 +          for (int atom1 = 0; atom1 < info_->getNAtoms(); atom1++) {
731 +            fDecomp_->fillSelfData(sdat, atom1);
732 +            interactionMan_->doPreForce(sdat);
733 +          }
734 +
735 +          fDecomp_->distributeIntermediateData();
736 +
737 +        }
738 +      }
739 +
740 +    }
741 +
742 +    fDecomp_->collectData();
743 +
744 +    if (info_->requiresSelfCorrection()) {
745 +
746 +      for (int atom1 = 0; atom1 < info_->getNAtoms(); atom1++) {
747 +        fDecomp_->fillSelfData(sdat, atom1);
748 +        interactionMan_->doSelfCorrection(sdat);
749 +      }
750 +
751 +    }
752 +
753 +    longRangePotential = *(fDecomp_->getEmbeddingPotential()) +
754 +      *(fDecomp_->getPairwisePotential());
755 +
756 +    lrPot = longRangePotential.sum();
757 +
758 +    //store the tau and long range potential
759 +    curSnapshot->statData[Stats::LONG_RANGE_POTENTIAL] = lrPot;
760 +    curSnapshot->statData[Stats::VANDERWAALS_POTENTIAL] = longRangePotential[VANDERWAALS_FAMILY];
761 +    curSnapshot->statData[Stats::ELECTROSTATIC_POTENTIAL] = longRangePotential[ELECTROSTATIC_FAMILY];
762 +  }
763 +
764    void ForceManager::longRangeInteractions() {
765  
766      Snapshot* curSnapshot = info_->getSnapshotManager()->getCurrentSnapshot();
# Line 497 | Line 779 | namespace OpenMD {
779             mol = info_->nextMolecule(mi)) {
780          for(cg = mol->beginCutoffGroup(ci); cg != NULL;
781              cg = mol->nextCutoffGroup(ci)) {
782 +          cerr << "branch1\n";
783 +          cerr << "globind = " << cg->getGlobalIndex() << "\n";
784            cg->updateCOM();
785          }
786        }      
787      } else {
788        // center of mass of the group is the same as position of the atom  
789        // if cutoff group does not exist
790 +      cerr << "branch2\n";
791        cgConfig->position = config->position;
792      }
793  
# Line 551 | Line 836 | namespace OpenMD {
836      
837        if (iLoop == loopStart) {
838          bool update_nlist = fDecomp_->checkNeighborList();
839 <        if (update_nlist)
839 >        if (update_nlist)
840            neighborList = fDecomp_->buildNeighborList();
841 +
842        }      
843          
844 <      for (vector<pair<int, int> >::iterator it = neighborList.begin();
845 <             it != neighborList.end(); ++it) {
846 <                
844 >      for (vector<pair<int, int> >::iterator it = neighborList.begin();
845 >             it != neighborList.end(); ++it)
846 >      {
847          cg1 = (*it).first;
848          cg2 = (*it).second;
849          
# Line 572 | Line 858 | namespace OpenMD {
858          if (rgrpsq < rCutSq) {
859            idat.rcut = &cuts.first;
860            if (iLoop == PAIR_LOOP) {
861 <            vij *= 0.0;
861 >            vij = 0.0;
862              fij = V3Zero;
863            }
864            
# Line 589 | Line 875 | namespace OpenMD {
875              for (vector<int>::iterator jb = atomListColumn.begin();
876                   jb != atomListColumn.end(); ++jb) {              
877                atom2 = (*jb);
878 <            
878 >
879                if (!fDecomp_->skipAtomPair(atom1, atom2)) {
880                  vpair = 0.0;
881                  workPot = 0.0;
# Line 604 | Line 890 | namespace OpenMD {
890                  if (atomListRow.size() == 1 && atomListColumn.size() == 1) {
891                    idat.d = &d_grp;
892                    idat.r2 = &rgrpsq;
893 +                  cerr << "dgrp = " << d_grp << "\n";
894                  } else {
895                    d = fDecomp_->getInteratomicVector(atom1, atom2);
896                    curSnapshot->wrapVector( d );
897                    r2 = d.lengthSquare();
898 +                  cerr << "datm = " << d<< "\n";
899                    idat.d = &d;
900                    idat.r2 = &r2;
901                  }
902                  
903 +                cerr << "idat.d = " << *(idat.d) << "\n";
904                  r = sqrt( *(idat.r2) );
905                  idat.rij = &r;
906                
# Line 620 | Line 909 | namespace OpenMD {
909                  } else {
910                    interactionMan_->doPair(idat);
911                    fDecomp_->unpackInteractionData(idat, atom1, atom2);
912 +
913 +                  cerr << "d = " << *(idat.d) << "\tv=" << vpair << "\tf=" << f1 << "\n";
914                    vij += vpair;
915                    fij += f1;
916                    tau -= outProduct( *(idat.d), f1);
# Line 632 | Line 923 | namespace OpenMD {
923              if (in_switching_region) {
924                swderiv = vij * dswdr / rgrp;
925                fg = swderiv * d_grp;
635
926                fij += fg;
927  
928                if (atomListRow.size() == 1 && atomListColumn.size() == 1) {
# Line 684 | Line 974 | namespace OpenMD {
974        }
975  
976        if (iLoop == PREPAIR_LOOP) {
977 <        if (info_->requiresPrepair()) {            
977 >        if (info_->requiresPrepair()) {
978 >
979            fDecomp_->collectIntermediateData();
980  
981            for (int atom1 = 0; atom1 < info_->getNAtoms(); atom1++) {
982              fDecomp_->fillSelfData(sdat, atom1);
983              interactionMan_->doPreForce(sdat);
984            }
985 <          
986 <          
987 <          fDecomp_->distributeIntermediateData();        
985 >
986 >          fDecomp_->distributeIntermediateData();
987 >
988          }
989        }
990  
991      }
992      
993      fDecomp_->collectData();
703    
704    if ( info_->requiresSkipCorrection() ) {
705      
706      for (int atom1 = 0; atom1 < fDecomp_->getNAtomsInRow(); atom1++) {
707
708        vector<int> skipList = fDecomp_->getSkipsForAtom( atom1 );
994          
710        for (vector<int>::iterator jb = skipList.begin();
711             jb != skipList.end(); ++jb) {        
712    
713          atom2 = (*jb);
714          fDecomp_->fillSkipData(idat, atom1, atom2);
715          interactionMan_->doSkipCorrection(idat);
716          fDecomp_->unpackSkipData(idat, atom1, atom2);
717
718        }
719      }
720    }
721    
995      if (info_->requiresSelfCorrection()) {
996  
997        for (int atom1 = 0; atom1 < info_->getNAtoms(); atom1++) {          

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines