1 #ifndef OPENMM_CUSTOMCOMPOUNDBONDFORCE_H_
2 #define OPENMM_CUSTOMCOMPOUNDBONDFORCE_H_
35 #include "TabulatedFunction.h"
39 #include "internal/windowsExport.h"
115 return particlesPerBond;
127 return bondParameters.size();
133 return globalParameters.size();
139 return functions.size();
147 return functions.size();
152 const std::string& getEnergyFunction()
const;
156 void setEnergyFunction(
const std::string& energy);
163 int addPerBondParameter(
const std::string& name);
170 const std::string& getPerBondParameterName(
int index)
const;
177 void setPerBondParameterName(
int index,
const std::string& name);
185 int addGlobalParameter(
const std::string& name,
double defaultValue);
192 const std::string& getGlobalParameterName(
int index)
const;
199 void setGlobalParameterName(
int index,
const std::string& name);
206 double getGlobalParameterDefaultValue(
int index)
const;
213 void setGlobalParameterDefaultValue(
int index,
double defaultValue);
221 int addBond(
const std::vector<int>& particles,
const std::vector<double>& parameters);
229 void getBondParameters(
int index, std::vector<int>& particles, std::vector<double>& parameters)
const;
237 void setBondParameters(
int index,
const std::vector<int>& particles,
const std::vector<double>& parameters);
268 const std::string& getTabulatedFunctionName(
int index)
const;
274 int addFunction(
const std::string& name,
const std::vector<double>& values,
double min,
double max);
281 void getFunctionParameters(
int index, std::string& name, std::vector<double>& values,
double& min,
double& max)
const;
288 void setFunctionParameters(
int index,
const std::string& name,
const std::vector<double>& values,
double min,
double max);
299 void updateParametersInContext(
Context& context);
304 class BondParameterInfo;
305 class GlobalParameterInfo;
307 int particlesPerBond;
308 std::string energyExpression;
309 std::vector<BondParameterInfo> bondParameters;
310 std::vector<GlobalParameterInfo> globalParameters;
311 std::vector<BondInfo> bonds;
312 std::vector<FunctionInfo> functions;
319 class CustomCompoundBondForce::BondInfo {
321 std::vector<int> particles;
322 std::vector<double> parameters;
325 BondInfo(
const std::vector<int>& particles,
const std::vector<double>& parameters) :
326 particles(particles), parameters(parameters) {
334 class CustomCompoundBondForce::BondParameterInfo {
337 BondParameterInfo() {
339 BondParameterInfo(
const std::string& name) : name(name) {
347 class CustomCompoundBondForce::GlobalParameterInfo {
351 GlobalParameterInfo() {
353 GlobalParameterInfo(
const std::string& name,
double defaultValue) : name(name), defaultValue(defaultValue) {
361 class CustomCompoundBondForce::FunctionInfo {
364 TabulatedFunction*
function;
367 FunctionInfo(
const std::string& name, TabulatedFunction*
function) : name(name), function(function) {
A TabulatedFunction uses a set of tabulated values to define a mathematical function.
Definition: TabulatedFunction.h:58
A Context stores the complete state of a simulation.
Definition: Context.h:67
int getNumPerBondParameters() const
Get the number of per-bond parameters that the interaction depends on.
Definition: CustomCompoundBondForce.h:126
int getNumTabulatedFunctions() const
Get the number of tabulated functions that have been defined.
Definition: CustomCompoundBondForce.h:138
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: CustomCompoundBondForce.h:120
int getNumParticlesPerBond() const
Get the number of particles used to define each bond.
Definition: CustomCompoundBondForce.h:114
int getNumFunctions() const
Get the number of tabulated functions that have been defined.
Definition: CustomCompoundBondForce.h:146
int getNumGlobalParameters() const
Get the number of global parameters that the interaction depends on.
Definition: CustomCompoundBondForce.h:132
A ForceImpl provides the internal implementation of a Force.
Definition: ForceImpl.h:57
This class supports a wide variety of bonded interactions.
Definition: CustomCompoundBondForce.h:99