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

Comparing:
trunk/src/restraints/ObjectRestraint.cpp (file contents), Revision 1396 by gezelter, Sat Dec 5 02:57:05 2009 UTC vs.
branches/development/src/restraints/ObjectRestraint.cpp (file contents), Revision 1465 by chuckv, Fri Jul 9 23:08:25 2010 UTC

# Line 46 | Line 46 | namespace OpenMD {
46    void ObjectRestraint::calcForce(Vector3d struc) {
47  
48      pot_ = 0.0;
49    
49      if (restType_ & rtDisplacement) {
50        Vector3d del = struc - refPos_;
51 <      RealType r = del.length();  
51 >      RealType r = del.length();
52        Vector3d frc = -kDisp_ * del;
53        RealType p = 0.5 * kDisp_ * del.lengthSquare();
54 <      pot_ += p;
54 >      pot_ = p;
55        force_ = frc * scaleFactor_;
56        restInfo_[rtDisplacement] = std::make_pair(r,p);
57      }
# Line 73 | Line 72 | namespace OpenMD {
72  
73        RealType twistAngle, swingAngle;
74        Vector3d swingAxis;
75 <      RealType tw, swingX, swingY;
75 >      RealType swingX, swingY;
76        
77 <      quat.getTwistSwingAxisAngle(twistAngle, swingAngle, swingAxis);
78 <      quat.toSwingTwist(swingX, swingY, tw);
79 <      
77 >      quat.toSwingTwist(swingX, swingY, twistAngle);
78 >
79 >
80        RealType dVdtwist, dVdswingX, dVdswingY;
81        RealType dTwist, dSwingX, dSwingY;
82        RealType p;

Comparing:
trunk/src/restraints/ObjectRestraint.cpp (property svn:keywords), Revision 1396 by gezelter, Sat Dec 5 02:57:05 2009 UTC vs.
branches/development/src/restraints/ObjectRestraint.cpp (property svn:keywords), Revision 1465 by chuckv, Fri Jul 9 23:08:25 2010 UTC

# Line 0 | Line 1
1 + Author Id Revision Date

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines