ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-4/src/primitives/Bend.cpp
(Generate patch)

Comparing branches/new_design/OOPSE-4/src/primitives/Bend.cpp (file contents):
Revision 1746 by tim, Wed Nov 17 06:37:56 2004 UTC vs.
Revision 1753 by tim, Thu Nov 18 05:42:06 2004 UTC

# Line 35 | Line 35 | void Bend::calcForce() {
35  
36      double sinTheta = sqrt(1.0 - cosTheta * cosTheta);
37  
38 <    if (fabs(sinTheta) < 1.0E - 12) {
39 <        sinTheta = 1.0E - 12;
38 >    if (fabs(sinTheta) < 1.0E -12) {
39 >        sinTheta = 1.0E -12;
40      }
41  
42      double commonFactor1 = -firstDerivative / sinTheta * d12inv;
# Line 55 | Line 55 | void Bend::calcForce() {
55      atom3_->addFrc(force3);
56   }
57  
58    double k = value->k * scale;
59    double theta0 = value->theta0;
60
61    double diff = theta - theta0;
62
63    double energy = k * diff * diff;
64
65    double firstDerivative = 2.0 * k * diff;
66
58   } //end namespace oopse

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines