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

Comparing trunk/OOPSE-2.0/src/types/CharmmTorsionType.cpp (file contents):
Revision 1930 by gezelter, Wed Jan 12 22:41:40 2005 UTC vs.
Revision 1937 by tim, Thu Jan 13 19:40:37 2005 UTC

# Line 38 | Line 38
38   * University of Notre Dame has been advised of the possibility of
39   * such damages.
40   */
41 <
41 > #include <cmath>
42   #include "types/CharmmTorsionType.hpp"
43   #include "utils/NumericConstant.hpp"
44   namespace oopse {
# Line 46 | Line 46 | void CharmmTorsionType::calcForce(double cosPhi, doubl
46   void CharmmTorsionType::calcForce(double cosPhi, double sinPhi, double& V, double& dVdPhi) {
47      V = 0;
48      dVdPhi = 0;
49 <    double phi = -atan2(sinPhi, cosPhi);
49 >    double phi = -std::atan2(sinPhi, cosPhi);
50      
51      std::vector<CharmmTorsionParameter>::iterator i;
52      for (i = parameter_.begin(); i != parameter_.end(); ++i) {
# Line 69 | Line 69 | void CharmmTorsionType::calcForce(double cosPhi, doubl
69  
70          } else {
71              //use normal cos form if periodicity is greater than 0
72 <            V += kchi * (1 + cos(n * phi + delta));
73 <            dVdPhi += -n * kchi * sin(n * phi + delta);
72 >            V += kchi * (1 + std::cos(n * phi + delta));
73 >            dVdPhi += -n * kchi * std::sin(n * phi + delta);
74          }
75      }
76   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines