1 #ifndef OPENMM_CUSTOMBONDEDFORCE_H_
2 #define OPENMM_CUSTOMBONDEDFORCE_H_
38 #include "internal/windowsExport.h"
92 return parameters.size();
98 return globalParameters.size();
103 const std::string& getEnergyFunction()
const;
107 void setEnergyFunction(
const std::string& energy);
114 int addPerBondParameter(
const std::string& name);
121 const std::string& getPerBondParameterName(
int index)
const;
128 void setPerBondParameterName(
int index,
const std::string& name);
136 int addGlobalParameter(
const std::string& name,
double defaultValue);
143 const std::string& getGlobalParameterName(
int index)
const;
150 void setGlobalParameterName(
int index,
const std::string& name);
157 double getGlobalParameterDefaultValue(
int index)
const;
164 void setGlobalParameterDefaultValue(
int index,
double defaultValue);
173 int addBond(
int particle1,
int particle2,
const std::vector<double>& parameters);
182 void getBondParameters(
int index,
int& particle1,
int& particle2, std::vector<double>& parameters)
const;
191 void setBondParameters(
int index,
int particle1,
int particle2,
const std::vector<double>& parameters);
202 void updateParametersInContext(
Context& context);
213 ForceImpl* createImpl()
const;
216 class BondParameterInfo;
217 class GlobalParameterInfo;
218 std::string energyExpression;
219 std::vector<BondParameterInfo> parameters;
220 std::vector<GlobalParameterInfo> globalParameters;
221 std::vector<BondInfo> bonds;
228 class CustomBondForce::BondInfo {
230 int particle1, particle2;
231 std::vector<double> parameters;
232 BondInfo() : particle1(-1), particle2(-1) {
234 BondInfo(
int particle1,
int particle2,
const std::vector<double>& parameters) :
235 particle1(particle1), particle2(particle2), parameters(parameters) {
243 class CustomBondForce::BondParameterInfo {
246 BondParameterInfo() {
248 BondParameterInfo(
const std::string& name) : name(name) {
256 class CustomBondForce::GlobalParameterInfo {
260 GlobalParameterInfo() {
262 GlobalParameterInfo(
const std::string& name,
double defaultValue) : name(name), defaultValue(defaultValue) {
A Context stores the complete state of a simulation.
Definition: Context.h:67
This class implements bonded interactions between pairs of particles.
Definition: CustomBondForce.h:73
int getNumGlobalParameters() const
Get the number of global parameters that the interaction depends on.
Definition: CustomBondForce.h:97
Force objects apply forces to the particles in a System, or alter their behavior in other ways...
Definition: Force.h:65
int getNumBonds() const
Get the number of bonds for which force field parameters have been defined.
Definition: CustomBondForce.h:85
bool usesPeriodicBoundaryConditions() const
Returns whether or not this force makes use of periodic boundary conditions.
Definition: CustomBondForce.h:209
int getNumPerBondParameters() const
Get the number of per-bond parameters that the interaction depends on.
Definition: CustomBondForce.h:91
Definition: AndersenThermostat.h:40