1 #ifndef OPENMM_CUSTOMCOMPOUNDBONDFORCE_H_
2 #define OPENMM_CUSTOMCOMPOUNDBONDFORCE_H_
35 #include "TabulatedFunction.h"
39 #include "internal/windowsExport.h"
116 return particlesPerBond;
128 return bondParameters.size();
134 return globalParameters.size();
140 return functions.size();
148 return functions.size();
153 const std::string& getEnergyFunction()
const;
157 void setEnergyFunction(
const std::string& energy);
164 int addPerBondParameter(
const std::string& name);
171 const std::string& getPerBondParameterName(
int index)
const;
178 void setPerBondParameterName(
int index,
const std::string& name);
186 int addGlobalParameter(
const std::string& name,
double defaultValue);
193 const std::string& getGlobalParameterName(
int index)
const;
200 void setGlobalParameterName(
int index,
const std::string& name);
207 double getGlobalParameterDefaultValue(
int index)
const;
214 void setGlobalParameterDefaultValue(
int index,
double defaultValue);
222 int addBond(
const std::vector<int>& particles,
const std::vector<double>& parameters);
230 void getBondParameters(
int index, std::vector<int>& particles, std::vector<double>& parameters)
const;
238 void setBondParameters(
int index,
const std::vector<int>& particles,
const std::vector<double>& parameters);
269 const std::string& getTabulatedFunctionName(
int index)
const;
275 int addFunction(
const std::string& name,
const std::vector<double>& values,
double min,
double max);
282 void getFunctionParameters(
int index, std::string& name, std::vector<double>& values,
double& min,
double& max)
const;
289 void setFunctionParameters(
int index,
const std::string& name,
const std::vector<double>& values,
double min,
double max);
300 void updateParametersInContext(
Context& context);
311 ForceImpl* createImpl()
const;
314 class BondParameterInfo;
315 class GlobalParameterInfo;
317 int particlesPerBond;
318 std::string energyExpression;
319 std::vector<BondParameterInfo> bondParameters;
320 std::vector<GlobalParameterInfo> globalParameters;
321 std::vector<BondInfo> bonds;
322 std::vector<FunctionInfo> functions;
329 class CustomCompoundBondForce::BondInfo {
331 std::vector<int> particles;
332 std::vector<double> parameters;
335 BondInfo(
const std::vector<int>& particles,
const std::vector<double>& parameters) :
336 particles(particles), parameters(parameters) {
344 class CustomCompoundBondForce::BondParameterInfo {
347 BondParameterInfo() {
349 BondParameterInfo(
const std::string& name) : name(name) {
357 class CustomCompoundBondForce::GlobalParameterInfo {
361 GlobalParameterInfo() {
363 GlobalParameterInfo(
const std::string& name,
double defaultValue) : name(name), defaultValue(defaultValue) {
371 class CustomCompoundBondForce::FunctionInfo {
374 TabulatedFunction*
function;
377 FunctionInfo(
const std::string& name, TabulatedFunction*
function) : name(name), function(function) {
bool usesPeriodicBoundaryConditions() const
Returns whether or not this force makes use of periodic boundary conditions.
Definition: CustomCompoundBondForce.h:307
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:127
int getNumTabulatedFunctions() const
Get the number of tabulated functions that have been defined.
Definition: CustomCompoundBondForce.h:139
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:121
int getNumParticlesPerBond() const
Get the number of particles used to define each bond.
Definition: CustomCompoundBondForce.h:115
int getNumFunctions() const
Get the number of tabulated functions that have been defined.
Definition: CustomCompoundBondForce.h:147
int getNumGlobalParameters() const
Get the number of global parameters that the interaction depends on.
Definition: CustomCompoundBondForce.h:133
This class supports a wide variety of bonded interactions.
Definition: CustomCompoundBondForce.h:100
Definition: AndersenThermostat.h:40