1 #ifndef OPENMM_CUSTOMHBONDFORCE_H_
2 #define OPENMM_CUSTOMHBONDFORCE_H_
35 #include "TabulatedFunction.h"
42 #include "internal/windowsExport.h"
113 CutoffNonPeriodic = 1,
133 return donors.size();
139 return acceptors.size();
145 return exclusions.size();
151 return donorParameters.size();
157 return acceptorParameters.size();
163 return globalParameters.size();
169 return functions.size();
177 return functions.size();
182 const std::string& getEnergyFunction()
const;
186 void setEnergyFunction(
const std::string& energy);
190 NonbondedMethod getNonbondedMethod()
const;
194 void setNonbondedMethod(NonbondedMethod method);
201 double getCutoffDistance()
const;
208 void setCutoffDistance(
double distance);
215 int addPerDonorParameter(
const std::string& name);
222 const std::string& getPerDonorParameterName(
int index)
const;
229 void setPerDonorParameterName(
int index,
const std::string& name);
236 int addPerAcceptorParameter(
const std::string& name);
243 const std::string& getPerAcceptorParameterName(
int index)
const;
250 void setPerAcceptorParameterName(
int index,
const std::string& name);
258 int addGlobalParameter(
const std::string& name,
double defaultValue);
265 const std::string& getGlobalParameterName(
int index)
const;
272 void setGlobalParameterName(
int index,
const std::string& name);
279 double getGlobalParameterDefaultValue(
int index)
const;
286 void setGlobalParameterDefaultValue(
int index,
double defaultValue);
298 int addDonor(
int d1,
int d2,
int d3,
const std::vector<double>& parameters);
310 void getDonorParameters(
int index,
int& d1,
int& d2,
int& d3, std::vector<double>& parameters)
const;
322 void setDonorParameters(
int index,
int d1,
int d2,
int d3,
const std::vector<double>& parameters);
334 int addAcceptor(
int a1,
int a2,
int a3,
const std::vector<double>& parameters);
346 void getAcceptorParameters(
int index,
int& a1,
int& a2,
int& a3, std::vector<double>& parameters)
const;
358 void setAcceptorParameters(
int index,
int a1,
int a2,
int a3,
const std::vector<double>& parameters);
366 int addExclusion(
int donor,
int acceptor);
374 void getExclusionParticles(
int index,
int& donor,
int& acceptor)
const;
382 void setExclusionParticles(
int index,
int donor,
int acceptor);
413 const std::string& getTabulatedFunctionName(
int index)
const;
419 int addFunction(
const std::string& name,
const std::vector<double>& values,
double min,
double max);
426 void getFunctionParameters(
int index, std::string& name, std::vector<double>& values,
double& min,
double& max)
const;
433 void setFunctionParameters(
int index,
const std::string& name,
const std::vector<double>& values,
double min,
double max);
445 void updateParametersInContext(
Context& context);
450 class PerPairParameterInfo;
451 class GlobalParameterInfo;
454 NonbondedMethod nonbondedMethod;
455 double cutoffDistance;
456 std::string energyExpression;
457 std::vector<PerPairParameterInfo> donorParameters;
458 std::vector<PerPairParameterInfo> acceptorParameters;
459 std::vector<GlobalParameterInfo> globalParameters;
460 std::vector<GroupInfo> donors;
461 std::vector<GroupInfo> acceptors;
462 std::vector<ExclusionInfo> exclusions;
463 std::vector<FunctionInfo> functions;
470 class CustomHbondForce::GroupInfo {
472 std::vector<double> parameters;
474 GroupInfo() : p1(-1), p2(-1), p3(-1) {
476 GroupInfo(
int p1,
int p2,
int p3,
const std::vector<double>& parameters) :
477 p1(p1), p2(p2), p3(p3), parameters(parameters) {
485 class CustomHbondForce::PerPairParameterInfo {
488 PerPairParameterInfo() {
490 PerPairParameterInfo(
const std::string& name) : name(name) {
498 class CustomHbondForce::GlobalParameterInfo {
502 GlobalParameterInfo() {
504 GlobalParameterInfo(
const std::string& name,
double defaultValue) : name(name), defaultValue(defaultValue) {
512 class CustomHbondForce::ExclusionInfo {
516 donor = acceptor = -1;
518 ExclusionInfo(
int donor,
int acceptor) :
519 donor(donor), acceptor(acceptor) {
527 class CustomHbondForce::FunctionInfo {
530 TabulatedFunction*
function;
533 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 getNumAcceptors() const
Get the number of acceptors for which force field parameters have been defined.
Definition: CustomHbondForce.h:138
int getNumPerDonorParameters() const
Get the number of per-donor parameters that the interaction depends on.
Definition: CustomHbondForce.h:150
int getNumFunctions() const
Get the number of tabulated functions that have been defined.
Definition: CustomHbondForce.h:176
This class supports a wide variety of energy functions used to represent hydrogen bonding...
Definition: CustomHbondForce.h:99
Force objects apply forces to the particles in a System, or alter their behavior in other ways...
Definition: Force.h:65
int getNumExclusions() const
Get the number of donor-acceptor pairs whose interactions should be excluded.
Definition: CustomHbondForce.h:144
int getNumPerAcceptorParameters() const
Get the number of per-acceptor parameters that the interaction depends on.
Definition: CustomHbondForce.h:156
NonbondedMethod
This is an enumeration of the different methods that may be used for handling long range nonbonded fo...
Definition: CustomHbondForce.h:104
A ForceImpl provides the internal implementation of a Force.
Definition: ForceImpl.h:57
int getNumDonors() const
Get the number of donors for which force field parameters have been defined.
Definition: CustomHbondForce.h:132
int getNumTabulatedFunctions() const
Get the number of tabulated functions that have been defined.
Definition: CustomHbondForce.h:168
int getNumGlobalParameters() const
Get the number of global parameters that the interaction depends on.
Definition: CustomHbondForce.h:162