| 69 |
|
|
| 70 |
|
class Bend : public ShortRangeInteraction { |
| 71 |
|
public: |
| 72 |
+ |
using ShortRangeInteraction::getValue; |
| 73 |
+ |
using ShortRangeInteraction::getPrevValue; |
| 74 |
|
Bend(Atom* atom1, Atom* atom2, Atom* atom3, BendType* bt) |
| 75 |
|
: ShortRangeInteraction(), bendType_(bt) { |
| 76 |
|
atoms_.resize(3); |
| 90 |
|
Vector3d r21 = pos1 - pos2; |
| 91 |
|
RealType d21 = r21.length(); |
| 92 |
|
|
| 91 |
– |
RealType d21inv = 1.0 / d21; |
| 92 |
– |
|
| 93 |
|
Vector3d r23 = pos3 - pos2; |
| 94 |
|
RealType d23 = r23.length(); |
| 95 |
|
|
| 96 |
– |
RealType d23inv = 1.0 / d23; |
| 97 |
– |
|
| 96 |
|
RealType cosTheta = dot(r21, r23) / (d21 * d23); |
| 97 |
|
|
| 98 |
|
//check roundoff |