1 |
< |
/* |
1 |
> |
/* |
2 |
|
* Copyright (c) 2005 The University of Notre Dame. All Rights Reserved. |
3 |
|
* |
4 |
|
* The University of Notre Dame grants you ("Licensee") a |
52 |
|
#include "primitives/Atom.hpp" |
53 |
|
#include "types/BendType.hpp" |
54 |
|
namespace oopse { |
55 |
< |
|
56 |
< |
class Bend { |
57 |
< |
public: |
58 |
< |
Bend(Atom* atom1, Atom* atom2, Atom* atom3, BendType* bt) |
59 |
< |
: atom1_(atom1), atom2_(atom2), atom3_(atom3), bendType_(bt) {} |
60 |
< |
|
61 |
< |
virtual ~Bend() {} |
62 |
< |
virtual void calcForce(); |
63 |
< |
|
64 |
< |
double getPotential() { |
65 |
< |
return potential_; |
66 |
< |
} |
67 |
< |
|
68 |
< |
Atom* getAtomA() { |
69 |
< |
return atom1_; |
70 |
< |
} |
71 |
< |
|
72 |
< |
Atom* getAtomB() { |
73 |
< |
return atom2_; |
74 |
< |
} |
75 |
< |
|
76 |
< |
Atom* getAtomC() { |
77 |
< |
return atom3_; |
78 |
< |
} |
79 |
< |
|
80 |
< |
BendType * getBendType() { |
81 |
< |
return bendType_; |
82 |
< |
} |
83 |
< |
|
84 |
< |
protected: |
85 |
< |
|
86 |
< |
double potential_; |
87 |
< |
Atom* atom1_; |
88 |
< |
Atom* atom2_; |
89 |
< |
Atom* atom3_; |
90 |
< |
BendType* bendType_; /**< bend type */ |
91 |
< |
|
92 |
< |
}; |
93 |
< |
|
94 |
< |
|
95 |
< |
|
55 |
> |
struct BendData { |
56 |
> |
RealType angle; |
57 |
> |
RealType potential; |
58 |
> |
}; |
59 |
> |
|
60 |
> |
struct BendDataSet { |
61 |
> |
RealType deltaV; |
62 |
> |
BendData prev; |
63 |
> |
BendData curr; |
64 |
> |
}; |
65 |
> |
|
66 |
> |
class Bend { |
67 |
> |
public: |
68 |
> |
Bend(Atom* atom1, Atom* atom2, Atom* atom3, BendType* bt) |
69 |
> |
: atom1_(atom1), atom2_(atom2), atom3_(atom3), bendType_(bt) {} |
70 |
> |
|
71 |
> |
virtual ~Bend() {} |
72 |
> |
virtual void calcForce(RealType& angle); |
73 |
> |
|
74 |
> |
RealType getPotential() { |
75 |
> |
return potential_; |
76 |
> |
} |
77 |
> |
|
78 |
> |
Atom* getAtomA() { |
79 |
> |
return atom1_; |
80 |
> |
} |
81 |
> |
|
82 |
> |
Atom* getAtomB() { |
83 |
> |
return atom2_; |
84 |
> |
} |
85 |
> |
|
86 |
> |
Atom* getAtomC() { |
87 |
> |
return atom3_; |
88 |
> |
} |
89 |
> |
|
90 |
> |
BendType * getBendType() { |
91 |
> |
return bendType_; |
92 |
> |
} |
93 |
> |
|
94 |
> |
protected: |
95 |
> |
|
96 |
> |
RealType potential_; |
97 |
> |
Atom* atom1_; |
98 |
> |
Atom* atom2_; |
99 |
> |
Atom* atom3_; |
100 |
> |
BendType* bendType_; /**< bend type */ |
101 |
> |
|
102 |
> |
}; |
103 |
|
} //end namespace oopse |
104 |
|
#endif //PRIMITIVES_BEND_HPP |
105 |
|
|