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 1761 by gezelter, Fri Jun 22 20:01:37 2012 UTC vs.
Revision 1764 by gezelter, Tue Jul 3 18:32:27 2012 UTC

# Line 449 | Line 449 | namespace OpenMD {
449      Molecule::CutoffGroupIterator ci;
450      CutoffGroup* cg;
451      
452 <    // forces are zeroed here, before any are accumulated.
452 >    // forces and potentials are zeroed here, before any are
453 >    // accumulated.
454      
455 +    Snapshot* snap = info_->getSnapshotManager()->getCurrentSnapshot();
456 +
457 +    snap->setBondPotential(0.0);
458 +    snap->setBendPotential(0.0);
459 +    snap->setTorsionPotential(0.0);
460 +    snap->setInversionPotential(0.0);
461 +
462 +    potVec zeroPot(0.0);
463 +    snap->setLongRangePotential(zeroPot);
464 +    snap->setExcludedPotentials(zeroPot);
465 +
466 +    snap->setRestraintPotential(0.0);
467 +    snap->setRawPotential(0.0);
468 +
469      for (mol = info_->beginMolecule(mi); mol != NULL;
470           mol = info_->nextMolecule(mi)) {
471        for(atom = mol->beginAtom(ai); atom != NULL;
# Line 608 | Line 623 | namespace OpenMD {
623      curSnapshot->setTorsionPotential(torsionPotential);
624      curSnapshot->setInversionPotential(inversionPotential);
625      
626 <    RealType shortRangePotential = bondPotential + bendPotential +
627 <      torsionPotential +  inversionPotential;    
626 >    // RealType shortRangePotential = bondPotential + bendPotential +
627 >    //   torsionPotential +  inversionPotential;    
628  
629 <    curSnapshot->setShortRangePotential(shortRangePotential);
629 >    // curSnapshot->setShortRangePotential(shortRangePotential);
630    }
631    
632    void ForceManager::longRangeInteractions() {
# Line 881 | Line 896 | namespace OpenMD {
896      longRangePotential = *(fDecomp_->getEmbeddingPotential()) +
897        *(fDecomp_->getPairwisePotential());
898  
899 <    curSnapshot->setLongRangePotentialFamilies(longRangePotential);
899 >    curSnapshot->setLongRangePotential(longRangePotential);
900  
901 <    lrPot = longRangePotential.sum();
901 >    // lrPot = longRangePotential.sum();
902  
903 <    //store the long range potential  
904 <    curSnapshot->setLongRangePotential(lrPot);
903 >    // //store the long range potential  
904 >    // curSnapshot->setLongRangePotential(lrPot);
905      
906      curSnapshot->setExcludedPotentials(*(fDecomp_->getExcludedSelfPotential()) +
907                                           *(fDecomp_->getExcludedPotential()));
# Line 900 | Line 915 | namespace OpenMD {
915      Molecule::RigidBodyIterator rbIter;
916      RigidBody* rb;
917      Snapshot* curSnapshot = info_->getSnapshotManager()->getCurrentSnapshot();
918 <    
918 >  
919      // collect the atomic forces onto rigid bodies
920      
921      for (mol = info_->beginMolecule(mi); mol != NULL;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines