1 #ifndef OPENMM_CUSTOMHBONDFORCE_H_
2 #define OPENMM_CUSTOMHBONDFORCE_H_
35 #include "TabulatedFunction.h"
42 #include "internal/windowsExport.h"
114 CutoffNonPeriodic = 1,
134 return donors.size();
140 return acceptors.size();
146 return exclusions.size();
152 return donorParameters.size();
158 return acceptorParameters.size();
164 return globalParameters.size();
170 return functions.size();
178 return functions.size();
183 const std::string& getEnergyFunction()
const;
187 void setEnergyFunction(
const std::string& energy);
191 NonbondedMethod getNonbondedMethod()
const;
195 void setNonbondedMethod(NonbondedMethod method);
202 double getCutoffDistance()
const;
209 void setCutoffDistance(
double distance);
216 int addPerDonorParameter(
const std::string& name);
223 const std::string& getPerDonorParameterName(
int index)
const;
230 void setPerDonorParameterName(
int index,
const std::string& name);
237 int addPerAcceptorParameter(
const std::string& name);
244 const std::string& getPerAcceptorParameterName(
int index)
const;
251 void setPerAcceptorParameterName(
int index,
const std::string& name);
259 int addGlobalParameter(
const std::string& name,
double defaultValue);
266 const std::string& getGlobalParameterName(
int index)
const;
273 void setGlobalParameterName(
int index,
const std::string& name);
280 double getGlobalParameterDefaultValue(
int index)
const;
287 void setGlobalParameterDefaultValue(
int index,
double defaultValue);
299 int addDonor(
int d1,
int d2,
int d3,
const std::vector<double>& parameters);
311 void getDonorParameters(
int index,
int& d1,
int& d2,
int& d3, std::vector<double>& parameters)
const;
323 void setDonorParameters(
int index,
int d1,
int d2,
int d3,
const std::vector<double>& parameters);
335 int addAcceptor(
int a1,
int a2,
int a3,
const std::vector<double>& parameters);
347 void getAcceptorParameters(
int index,
int& a1,
int& a2,
int& a3, std::vector<double>& parameters)
const;
359 void setAcceptorParameters(
int index,
int a1,
int a2,
int a3,
const std::vector<double>& parameters);
367 int addExclusion(
int donor,
int acceptor);
375 void getExclusionParticles(
int index,
int& donor,
int& acceptor)
const;
383 void setExclusionParticles(
int index,
int donor,
int acceptor);
414 const std::string& getTabulatedFunctionName(
int index)
const;
420 int addFunction(
const std::string& name,
const std::vector<double>& values,
double min,
double max);
427 void getFunctionParameters(
int index, std::string& name, std::vector<double>& values,
double& min,
double& max)
const;
434 void setFunctionParameters(
int index,
const std::string& name,
const std::vector<double>& values,
double min,
double max);
446 void updateParametersInContext(
Context& context);
457 ForceImpl* createImpl()
const;
460 class PerPairParameterInfo;
461 class GlobalParameterInfo;
464 NonbondedMethod nonbondedMethod;
465 double cutoffDistance;
466 std::string energyExpression;
467 std::vector<PerPairParameterInfo> donorParameters;
468 std::vector<PerPairParameterInfo> acceptorParameters;
469 std::vector<GlobalParameterInfo> globalParameters;
470 std::vector<GroupInfo> donors;
471 std::vector<GroupInfo> acceptors;
472 std::vector<ExclusionInfo> exclusions;
473 std::vector<FunctionInfo> functions;
480 class CustomHbondForce::GroupInfo {
482 std::vector<double> parameters;
484 GroupInfo() : p1(-1), p2(-1), p3(-1) {
486 GroupInfo(
int p1,
int p2,
int p3,
const std::vector<double>& parameters) :
487 parameters(parameters), p1(p1), p2(p2), p3(p3) {
495 class CustomHbondForce::PerPairParameterInfo {
498 PerPairParameterInfo() {
500 PerPairParameterInfo(
const std::string& name) : name(name) {
508 class CustomHbondForce::GlobalParameterInfo {
512 GlobalParameterInfo() {
514 GlobalParameterInfo(
const std::string& name,
double defaultValue) : name(name), defaultValue(defaultValue) {
522 class CustomHbondForce::ExclusionInfo {
526 donor = acceptor = -1;
528 ExclusionInfo(
int donor,
int acceptor) :
529 donor(donor), acceptor(acceptor) {
537 class CustomHbondForce::FunctionInfo {
540 TabulatedFunction*
function;
543 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:139
int getNumPerDonorParameters() const
Get the number of per-donor parameters that the interaction depends on.
Definition: CustomHbondForce.h:151
int getNumFunctions() const
Get the number of tabulated functions that have been defined.
Definition: CustomHbondForce.h:177
This class supports a wide variety of energy functions used to represent hydrogen bonding...
Definition: CustomHbondForce.h:100
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:145
bool usesPeriodicBoundaryConditions() const
Returns whether or not this force makes use of periodic boundary conditions.
Definition: CustomHbondForce.h:453
int getNumPerAcceptorParameters() const
Get the number of per-acceptor parameters that the interaction depends on.
Definition: CustomHbondForce.h:157
NonbondedMethod
This is an enumeration of the different methods that may be used for handling long range nonbonded fo...
Definition: CustomHbondForce.h:105
Periodic boundary conditions are used, so that each particle interacts only with the nearest periodic...
Definition: CustomHbondForce.h:119
Definition: AndersenThermostat.h:40
int getNumDonors() const
Get the number of donors for which force field parameters have been defined.
Definition: CustomHbondForce.h:133
int getNumTabulatedFunctions() const
Get the number of tabulated functions that have been defined.
Definition: CustomHbondForce.h:169
int getNumGlobalParameters() const
Get the number of global parameters that the interaction depends on.
Definition: CustomHbondForce.h:163