1 #ifndef OPENMM_CUSTOMCOMPOUNDBONDFORCE_H_
2 #define OPENMM_CUSTOMCOMPOUNDBONDFORCE_H_
38 #include "internal/windowsExport.h"
113 return particlesPerBond;
125 return bondParameters.size();
131 return globalParameters.size();
137 return functions.size();
142 const std::string& getEnergyFunction()
const;
146 void setEnergyFunction(
const std::string& energy);
153 int addPerBondParameter(
const std::string& name);
160 const std::string& getPerBondParameterName(
int index)
const;
167 void setPerBondParameterName(
int index,
const std::string& name);
175 int addGlobalParameter(
const std::string& name,
double defaultValue);
182 const std::string& getGlobalParameterName(
int index)
const;
189 void setGlobalParameterName(
int index,
const std::string& name);
196 double getGlobalParameterDefaultValue(
int index)
const;
203 void setGlobalParameterDefaultValue(
int index,
double defaultValue);
211 int addBond(
const std::vector<int>& particles,
const std::vector<double>& parameters);
219 void getBondParameters(
int index, std::vector<int>& particles, std::vector<double>& parameters)
const;
227 void setBondParameters(
int index,
const std::vector<int>& particles,
const std::vector<double>& parameters);
238 int addFunction(
const std::string& name,
const std::vector<double>& values,
double min,
double max);
249 void getFunctionParameters(
int index, std::string& name, std::vector<double>& values,
double& min,
double& max)
const;
260 void setFunctionParameters(
int index,
const std::string& name,
const std::vector<double>& values,
double min,
double max);
271 void updateParametersInContext(
Context& context);
276 class BondParameterInfo;
277 class GlobalParameterInfo;
279 int particlesPerBond;
280 std::string energyExpression;
281 std::vector<BondParameterInfo> bondParameters;
282 std::vector<GlobalParameterInfo> globalParameters;
283 std::vector<BondInfo> bonds;
284 std::vector<FunctionInfo> functions;
291 class CustomCompoundBondForce::BondInfo {
293 std::vector<int> particles;
294 std::vector<double> parameters;
297 BondInfo(
const std::vector<int>& particles,
const std::vector<double>& parameters) :
298 particles(particles), parameters(parameters) {
306 class CustomCompoundBondForce::BondParameterInfo {
309 BondParameterInfo() {
311 BondParameterInfo(
const std::string& name) : name(name) {
319 class CustomCompoundBondForce::GlobalParameterInfo {
323 GlobalParameterInfo() {
325 GlobalParameterInfo(
const std::string& name,
double defaultValue) : name(name), defaultValue(defaultValue) {
333 class CustomCompoundBondForce::FunctionInfo {
336 std::vector<double> values;
340 FunctionInfo(
const std::string& name,
const std::vector<double>& values,
double min,
double max) :
341 name(name), values(values), min(min), max(max) {