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

Comparing branches/development/src/primitives/GhostTorsion.cpp (file contents):
Revision 1665 by gezelter, Tue Nov 22 20:38:56 2011 UTC vs.
Revision 1712 by gezelter, Sat May 19 13:30:21 2012 UTC

# Line 48 | Line 48 | namespace OpenMD {
48                               DirectionalAtom* ghostAtom, TorsionType *tt)
49      : Torsion(atom1, atom2, ghostAtom, ghostAtom, tt) {}
50    
51 <  void GhostTorsion::calcForce(RealType& angle) {
51 >  void GhostTorsion::calcForce(RealType& angle, bool doParticlePot) {
52      DirectionalAtom* ghostAtom = static_cast<DirectionalAtom*>(atom3_);    
53      
54      Vector3d pos1 = atom1_->getPos();
# Line 97 | Line 97 | namespace OpenMD {
97      f3.negate();
98      ghostAtom->addTrq(cross(r43, f3));    
99      
100 <    atom1_->addParticlePot(potential_);
101 <    atom2_->addParticlePot(potential_);
102 <    ghostAtom->addParticlePot(potential_);
100 >    if (doParticlePot) {
101 >      atom1_->addParticlePot(potential_);
102 >      atom2_->addParticlePot(potential_);
103 >      ghostAtom->addParticlePot(potential_);
104 >    }
105  
106      angle = acos(cos_phi) /M_PI * 180.0;
107    }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines