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 { |
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) { |
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 |
|
} |