29 #ifndef CDPL_FORCEFIELD_MMFF94ENERGYCALCULATOR_HPP
30 #define CDPL_FORCEFIELD_MMFF94ENERGYCALCULATOR_HPP
44 template <
typename ValueType>
59 template <
typename CoordsArray>
80 ValueType totalEnergy;
81 ValueType bondStretchingEnergy;
82 ValueType angleBendingEnergy;
83 ValueType stretchBendEnergy;
84 ValueType outOfPlaneEnergy;
85 ValueType torsionEnergy;
86 ValueType electrostaticEnergy;
87 ValueType vanDerWaalsEnergy;
88 unsigned int interactionTypes;
97 template <
typename ValueType>
99 interactionData(0), totalEnergy(), bondStretchingEnergy(), angleBendingEnergy(),
100 stretchBendEnergy(), outOfPlaneEnergy(), torsionEnergy(), electrostaticEnergy(),
101 vanDerWaalsEnergy(), interactionTypes(InteractionType::
ALL)
104 template <
typename ValueType>
106 interactionData(&ia_data), totalEnergy(), bondStretchingEnergy(),
107 angleBendingEnergy(), stretchBendEnergy(), outOfPlaneEnergy(), torsionEnergy(), electrostaticEnergy(),
108 vanDerWaalsEnergy(), interactionTypes(InteractionType::
ALL)
111 template <
typename ValueType>
114 interactionTypes = types;
117 template <
typename ValueType>
120 return interactionTypes;
123 template <
typename ValueType>
126 interactionData = &ia_data;
129 template <
typename ValueType>
130 template <
typename CoordsArray>
133 if (!interactionData) {
134 totalEnergy = ValueType();
135 bondStretchingEnergy = ValueType();
136 angleBendingEnergy = ValueType();
137 stretchBendEnergy = ValueType();
138 outOfPlaneEnergy = ValueType();
139 torsionEnergy = ValueType();
140 electrostaticEnergy = ValueType();
141 vanDerWaalsEnergy = ValueType();
146 totalEnergy = ValueType();
149 bondStretchingEnergy = calcMMFF94BondStretchingEnergy<ValueType>(interactionData->getBondStretchingInteractions().getElementsBegin(),
150 interactionData->getBondStretchingInteractions().getElementsEnd(),
152 totalEnergy += bondStretchingEnergy;
155 bondStretchingEnergy = ValueType();
159 angleBendingEnergy = calcMMFF94AngleBendingEnergy<ValueType>(interactionData->getAngleBendingInteractions().getElementsBegin(),
160 interactionData->getAngleBendingInteractions().getElementsEnd(),
162 totalEnergy += angleBendingEnergy;
165 angleBendingEnergy = ValueType();
168 stretchBendEnergy = calcMMFF94StretchBendEnergy<ValueType>(interactionData->getStretchBendInteractions().getElementsBegin(),
169 interactionData->getStretchBendInteractions().getElementsEnd(),
171 totalEnergy += stretchBendEnergy;
174 stretchBendEnergy = ValueType();
177 outOfPlaneEnergy = calcMMFF94OutOfPlaneBendingEnergy<ValueType>(interactionData->getOutOfPlaneBendingInteractions().getElementsBegin(),
178 interactionData->getOutOfPlaneBendingInteractions().getElementsEnd(),
180 totalEnergy += outOfPlaneEnergy;
183 outOfPlaneEnergy = ValueType();
186 torsionEnergy = calcMMFF94TorsionEnergy<ValueType>(interactionData->getTorsionInteractions().getElementsBegin(),
187 interactionData->getTorsionInteractions().getElementsEnd(),
189 totalEnergy += torsionEnergy;
192 torsionEnergy = ValueType();
195 electrostaticEnergy = calcMMFF94ElectrostaticEnergy<ValueType>(interactionData->getElectrostaticInteractions().getElementsBegin(),
196 interactionData->getElectrostaticInteractions().getElementsEnd(),
198 totalEnergy += electrostaticEnergy;
201 electrostaticEnergy = ValueType();
204 vanDerWaalsEnergy = calcMMFF94VanDerWaalsEnergy<ValueType>(interactionData->getVanDerWaalsInteractions().getElementsBegin(),
205 interactionData->getVanDerWaalsInteractions().getElementsEnd(),
207 totalEnergy += vanDerWaalsEnergy;
210 vanDerWaalsEnergy = ValueType();
215 template <
typename ValueType>
221 template <
typename ValueType>
224 return bondStretchingEnergy;
227 template <
typename ValueType>
230 return angleBendingEnergy;
233 template <
typename ValueType>
236 return stretchBendEnergy;
239 template <
typename ValueType>
242 return outOfPlaneEnergy;
245 template <
typename ValueType>
248 return torsionEnergy;
251 template <
typename ValueType>
254 return electrostaticEnergy;
257 template <
typename ValueType>
260 return vanDerWaalsEnergy;
265 #endif // CDPL_FORCEFIELD_MMFF94ENERGYCALCULATOR_HPP