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

Comparing branches/development/src/brains/ForceManager.cpp (file contents):
Revision 1711 by gezelter, Sat May 19 02:58:35 2012 UTC vs.
Revision 1715 by gezelter, Tue May 22 21:55:31 2012 UTC

# Line 390 | Line 390 | namespace OpenMD {
390        info_->prepareTopology();      
391  
392        doParticlePot_ = info_->getSimParams()->getOutputParticlePotential();
393      cerr << "dPP = " << doParticlePot_ << "\n";
393    
394      }
395  
# Line 506 | Line 505 | namespace OpenMD {
505  
506        for (bond = mol->beginBond(bondIter); bond != NULL;
507             bond = mol->nextBond(bondIter)) {
508 <        bond->calcForce();
508 >        bond->calcForce(doParticlePot_);
509          bondPotential += bond->getPotential();
510        }
511  
# Line 514 | Line 513 | namespace OpenMD {
513             bend = mol->nextBend(bendIter)) {
514          
515          RealType angle;
516 <        bend->calcForce(angle);
516 >        bend->calcForce(angle, doParticlePot_);
517          RealType currBendPot = bend->getPotential();          
518          
519          bendPotential += bend->getPotential();
# Line 539 | Line 538 | namespace OpenMD {
538        for (torsion = mol->beginTorsion(torsionIter); torsion != NULL;
539             torsion = mol->nextTorsion(torsionIter)) {
540          RealType angle;
541 <        torsion->calcForce(angle);
541 >        torsion->calcForce(angle, doParticlePot_);
542          RealType currTorsionPot = torsion->getPotential();
543          torsionPotential += torsion->getPotential();
544          map<Torsion*, TorsionDataSet>::iterator i = torsionDataSets.find(torsion);
# Line 563 | Line 562 | namespace OpenMD {
562             inversion != NULL;
563             inversion = mol->nextInversion(inversionIter)) {
564          RealType angle;
565 <        inversion->calcForce(angle);
565 >        inversion->calcForce(angle, doParticlePot_);
566          RealType currInversionPot = inversion->getPotential();
567          inversionPotential += inversion->getPotential();
568          map<Inversion*, InversionDataSet>::iterator i = inversionDataSets.find(inversion);
# Line 642 | Line 641 | namespace OpenMD {
641      RealType vpair;
642      potVec longRangePotential(0.0);
643      potVec workPot(0.0);
644 +    vector<int>::iterator ia, jb;
645  
646      int loopStart, loopEnd;
647  
# Line 699 | Line 699 | namespace OpenMD {
699            atomListRow = fDecomp_->getAtomsInGroupRow(cg1);
700            atomListColumn = fDecomp_->getAtomsInGroupColumn(cg2);
701  
702 <          for (vector<int>::iterator ia = atomListRow.begin();
702 >          for (ia = atomListRow.begin();
703                 ia != atomListRow.end(); ++ia) {            
704              atom1 = (*ia);
705              
706 <            for (vector<int>::iterator jb = atomListColumn.begin();
706 >            for (jb = atomListColumn.begin();
707                   jb != atomListColumn.end(); ++jb) {              
708                atom2 = (*jb);
709  
# Line 755 | Line 755 | namespace OpenMD {
755                  tau -= outProduct( *(idat.d), fg);
756                }
757            
758 <              for (vector<int>::iterator ia = atomListRow.begin();
758 >              for (ia = atomListRow.begin();
759                     ia != atomListRow.end(); ++ia) {            
760                  atom1 = (*ia);                
761                  mf = fDecomp_->getMassFactorRow(atom1);
# Line 772 | Line 772 | namespace OpenMD {
772                    }
773                  }
774                }
775 <              for (vector<int>::iterator jb = atomListColumn.begin();
775 >              for (jb = atomListColumn.begin();
776                     jb != atomListColumn.end(); ++jb) {              
777                  atom2 = (*jb);
778                  mf = fDecomp_->getMassFactorColumn(atom2);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines