1 #ifndef OPENMM_CUSTOMTORSIONFORCE_H_
2 #define OPENMM_CUSTOMTORSIONFORCE_H_
38 #include "internal/windowsExport.h"
85 return torsions.size();
91 return parameters.size();
97 return globalParameters.size();
102 const std::string& getEnergyFunction()
const;
106 void setEnergyFunction(
const std::string& energy);
113 int addPerTorsionParameter(
const std::string& name);
120 const std::string& getPerTorsionParameterName(
int index)
const;
127 void setPerTorsionParameterName(
int index,
const std::string& name);
135 int addGlobalParameter(
const std::string& name,
double defaultValue);
142 const std::string& getGlobalParameterName(
int index)
const;
149 void setGlobalParameterName(
int index,
const std::string& name);
156 double getGlobalParameterDefaultValue(
int index)
const;
163 void setGlobalParameterDefaultValue(
int index,
double defaultValue);
174 int addTorsion(
int particle1,
int particle2,
int particle3,
int particle4,
const std::vector<double>& parameters);
185 void getTorsionParameters(
int index,
int& particle1,
int& particle2,
int& particle3,
int& particle4, std::vector<double>& parameters)
const;
196 void setTorsionParameters(
int index,
int particle1,
int particle2,
int particle3,
int particle4,
const std::vector<double>& parameters);
207 void updateParametersInContext(
Context& context);
212 class TorsionParameterInfo;
213 class GlobalParameterInfo;
214 std::string energyExpression;
215 std::vector<TorsionParameterInfo> parameters;
216 std::vector<GlobalParameterInfo> globalParameters;
217 std::vector<TorsionInfo> torsions;
224 class CustomTorsionForce::TorsionInfo {
226 int particle1, particle2, particle3, particle4;
227 std::vector<double> parameters;
228 TorsionInfo() : particle1(-1), particle2(-1), particle3(-1), particle4(-1) {
230 TorsionInfo(
int particle1,
int particle2,
int particle3,
int particle4,
const std::vector<double>& parameters) :
231 particle1(particle1), particle2(particle2), particle3(particle3), particle4(particle4), parameters(parameters) {
239 class CustomTorsionForce::TorsionParameterInfo {
242 TorsionParameterInfo() {
244 TorsionParameterInfo(
const std::string& name) : name(name) {
252 class CustomTorsionForce::GlobalParameterInfo {
256 GlobalParameterInfo() {
258 GlobalParameterInfo(
const std::string& name,
double defaultValue) : name(name), defaultValue(defaultValue) {