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

Comparing branches/new_design/OOPSE-4/src/types/CharmmTorsionType.cpp (file contents):
Revision 1836 by tim, Thu Nov 18 23:26:27 2004 UTC vs.
Revision 1837 by tim, Thu Dec 2 22:15:31 2004 UTC

# Line 24 | Line 24
24   */
25  
26   #include "types/CharmmTorsionType.hpp"
27 <
27 > #include "utils/NumericConstant.hpp"
28   namespace oopse {
29  
30   void CharmmTorsionType::calcForce(double cosPhi, double sinPhi, double& V, double& dVdPhi) {
# Line 42 | Line 42 | void CharmmTorsionType::calcForce(double cosPhi, doubl
42              //if periodicity is equal to 0, use harmonic form
43              double diff = phi - delta;
44  
45 <            if (diff < -OOPSEConstant::PI) {
46 <                diff += OOPSEConstant::TWOPI;
47 <            } else if (diff > OOPSEConstant::PI) {
48 <                diff -= OOPSEConstant::TWOPI;
45 >            if (diff < -NumericConstant::PI) {
46 >                diff += NumericConstant::TWO_PI;
47 >            } else if (diff > NumericConstant::PI) {
48 >                diff -= NumericConstant::TWO_PI;
49              }
50              
51              V += kchi * diff * diff;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines