1 #ifndef OPENMM_CUSTOMBONDEDFORCE_H_
2 #define OPENMM_CUSTOMBONDEDFORCE_H_
38 #include "internal/windowsExport.h"
91 return parameters.size();
97 return globalParameters.size();
102 const std::string& getEnergyFunction()
const;
106 void setEnergyFunction(
const std::string& energy);
113 int addPerBondParameter(
const std::string& name);
120 const std::string& getPerBondParameterName(
int index)
const;
127 void setPerBondParameterName(
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);
172 int addBond(
int particle1,
int particle2,
const std::vector<double>& parameters);
181 void getBondParameters(
int index,
int& particle1,
int& particle2, std::vector<double>& parameters)
const;
190 void setBondParameters(
int index,
int particle1,
int particle2,
const std::vector<double>& parameters);
201 void updateParametersInContext(
Context& context);
206 class BondParameterInfo;
207 class GlobalParameterInfo;
208 std::string energyExpression;
209 std::vector<BondParameterInfo> parameters;
210 std::vector<GlobalParameterInfo> globalParameters;
211 std::vector<BondInfo> bonds;
218 class CustomBondForce::BondInfo {
220 int particle1, particle2;
221 std::vector<double> parameters;
222 BondInfo() : particle1(-1), particle2(-1) {
224 BondInfo(
int particle1,
int particle2,
const std::vector<double>& parameters) :
225 particle1(particle1), particle2(particle2), parameters(parameters) {
233 class CustomBondForce::BondParameterInfo {
236 BondParameterInfo() {
238 BondParameterInfo(
const std::string& name) : name(name) {
246 class CustomBondForce::GlobalParameterInfo {
250 GlobalParameterInfo() {
252 GlobalParameterInfo(
const std::string& name,
double defaultValue) : name(name), defaultValue(defaultValue) {