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 1618 by gezelter, Mon Sep 12 17:09:26 2011 UTC vs.
Revision 1712 by gezelter, Sat May 19 13:30:21 2012 UTC

# Line 36 | Line 36
36   * [1]  Meineke, et al., J. Comp. Chem. 26, 252-271 (2005).            
37   * [2]  Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006).          
38   * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008).          
39 < * [4]  Vardeman & Gezelter, in progress (2009).                        
39 > * [4]  Kuang & Gezelter,  J. Chem. Phys. 133, 164101 (2010).
40 > * [5]  Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
41   */
42  
43   /**
# Line 200 | Line 201 | namespace OpenMD {
201          // electrostaticSummationMethod keyword.
202          
203          if (simParams_->haveElectrostaticSummationMethod()) {
204 <          std::string myMethod = simParams_->getElectrostaticSummationMethod();
204 >          string myMethod = simParams_->getElectrostaticSummationMethod();
205            toUpper(myMethod);
206          
207            if (myMethod == "SHIFTED_POTENTIAL") {
# Line 255 | Line 256 | namespace OpenMD {
256      stringToCutoffPolicy["MAX"] = MAX;
257      stringToCutoffPolicy["TRADITIONAL"] = TRADITIONAL;    
258  
259 <    std::string cutPolicy;
259 >    string cutPolicy;
260      if (forceFieldOptions_.haveCutoffPolicy()){
261        cutPolicy = forceFieldOptions_.getCutoffPolicy();
262      }else if (simParams_->haveCutoffPolicy()) {
# Line 387 | Line 388 | namespace OpenMD {
388        setupCutoffs();
389  
390        info_->prepareTopology();      
391 +
392 +      doParticlePot_ = info_->getSimParams()->getOutputParticlePotential();
393 +  
394      }
395  
396      ForceFieldOptions& fopts = forceField_->getForceFieldOptions();
# Line 501 | 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 509 | 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 534 | 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 558 | 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 649 | Line 653 | namespace OpenMD {
653      idat.sw = &sw;
654      idat.shiftedPot = (cutoffMethod_ == SHIFTED_POTENTIAL) ? true : false;
655      idat.shiftedForce = (cutoffMethod_ == SHIFTED_FORCE) ? true : false;
656 +    idat.doParticlePot = doParticlePot_;
657 +    sdat.doParticlePot = doParticlePot_;
658      
659      loopEnd = PAIR_LOOP;
660      if (info_->requiresPrepair() ) {
# Line 853 | Line 859 | namespace OpenMD {
859      MPI_Allreduce(tmpTau.getArrayPointer(), tau.getArrayPointer(),
860                    9, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD);
861   #endif
862 <    curSnapshot->statData.setTau(tau);
862 >    curSnapshot->setTau(tau);
863    }
864  
865   } //end namespace OpenMD

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines