1 #ifndef OPENMM_CUSTOMGBFORCE_H_
2 #define OPENMM_CUSTOMGBFORCE_H_
35 #include "TabulatedFunction.h"
42 #include "internal/windowsExport.h"
156 CutoffNonPeriodic = 1,
179 ParticlePairNoExclusions = 2
190 return particles.size();
196 return exclusions.size();
202 return parameters.size();
208 return globalParameters.size();
214 return functions.size();
222 return functions.size();
228 return computedValues.size();
234 return energyTerms.size();
239 NonbondedMethod getNonbondedMethod()
const;
243 void setNonbondedMethod(NonbondedMethod method);
250 double getCutoffDistance()
const;
257 void setCutoffDistance(
double distance);
264 int addPerParticleParameter(
const std::string& name);
271 const std::string& getPerParticleParameterName(
int index)
const;
278 void setPerParticleParameterName(
int index,
const std::string& name);
286 int addGlobalParameter(
const std::string& name,
double defaultValue);
293 const std::string& getGlobalParameterName(
int index)
const;
300 void setGlobalParameterName(
int index,
const std::string& name);
307 double getGlobalParameterDefaultValue(
int index)
const;
314 void setGlobalParameterDefaultValue(
int index,
double defaultValue);
322 int addParticle(
const std::vector<double>& parameters);
329 void getParticleParameters(
int index, std::vector<double>& parameters)
const;
336 void setParticleParameters(
int index,
const std::vector<double>& parameters);
353 int addComputedValue(
const std::string& name,
const std::string& expression, ComputationType type);
371 void getComputedValueParameters(
int index, std::string& name, std::string& expression, ComputationType& type)
const;
389 void setComputedValueParameters(
int index,
const std::string& name,
const std::string& expression, ComputationType type);
405 int addEnergyTerm(
const std::string& expression, ComputationType type);
422 void getEnergyTermParameters(
int index, std::string& expression, ComputationType& type)
const;
439 void setEnergyTermParameters(
int index,
const std::string& expression, ComputationType type);
447 int addExclusion(
int particle1,
int particle2);
455 void getExclusionParticles(
int index,
int& particle1,
int& particle2)
const;
463 void setExclusionParticles(
int index,
int particle1,
int particle2);
494 const std::string& getTabulatedFunctionName(
int index)
const;
500 int addFunction(
const std::string& name,
const std::vector<double>& values,
double min,
double max);
507 void getFunctionParameters(
int index, std::string& name, std::vector<double>& values,
double& min,
double& max)
const;
514 void setFunctionParameters(
int index,
const std::string& name,
const std::vector<double>& values,
double min,
double max);
525 void updateParametersInContext(
Context& context);
530 class PerParticleParameterInfo;
531 class GlobalParameterInfo;
534 class ComputationInfo;
535 NonbondedMethod nonbondedMethod;
536 double cutoffDistance;
537 std::vector<PerParticleParameterInfo> parameters;
538 std::vector<GlobalParameterInfo> globalParameters;
539 std::vector<ParticleInfo> particles;
540 std::vector<ExclusionInfo> exclusions;
541 std::vector<FunctionInfo> functions;
542 std::vector<ComputationInfo> computedValues;
543 std::vector<ComputationInfo> energyTerms;
550 class CustomGBForce::ParticleInfo {
552 std::vector<double> parameters;
555 ParticleInfo(
const std::vector<double>& parameters) : parameters(parameters) {
563 class CustomGBForce::PerParticleParameterInfo {
566 PerParticleParameterInfo() {
568 PerParticleParameterInfo(
const std::string& name) : name(name) {
576 class CustomGBForce::GlobalParameterInfo {
580 GlobalParameterInfo() {
582 GlobalParameterInfo(
const std::string& name,
double defaultValue) : name(name), defaultValue(defaultValue) {
590 class CustomGBForce::ExclusionInfo {
592 int particle1, particle2;
594 particle1 = particle2 = -1;
596 ExclusionInfo(
int particle1,
int particle2) :
597 particle1(particle1), particle2(particle2) {
605 class CustomGBForce::FunctionInfo {
608 TabulatedFunction*
function;
611 FunctionInfo(
const std::string& name, TabulatedFunction*
function) : name(name), function(function) {
619 class CustomGBForce::ComputationInfo {
622 std::string expression;
627 name(name), expression(expression), type(type) {
int getNumFunctions() const
Get the number of tabulated functions that have been defined.
Definition: CustomGBForce.h:221
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
This class implements complex, multiple stage nonbonded interactions between particles.
Definition: CustomGBForce.h:142
Force objects apply forces to the particles in a System, or alter their behavior in other ways...
Definition: Force.h:65
int getNumTabulatedFunctions() const
Get the number of tabulated functions that have been defined.
Definition: CustomGBForce.h:213
int getNumEnergyTerms() const
Get the number of terms in the energy computation.
Definition: CustomGBForce.h:233
NonbondedMethod
This is an enumeration of the different methods that may be used for handling long range nonbonded fo...
Definition: CustomGBForce.h:147
int getNumExclusions() const
Get the number of particle pairs whose interactions should be excluded.
Definition: CustomGBForce.h:195
int getNumComputedValues() const
Get the number of per-particle computed values the interaction depends on.
Definition: CustomGBForce.h:227
int getNumParticles() const
Get the number of particles for which force field parameters have been defined.
Definition: CustomGBForce.h:189
int getNumPerParticleParameters() const
Get the number of per-particle parameters that the interaction depends on.
Definition: CustomGBForce.h:201
A ForceImpl provides the internal implementation of a Force.
Definition: ForceImpl.h:57
ComputationType
This is an enumeration of the different ways in which a computed value or energy term can be calculat...
Definition: CustomGBForce.h:166
int getNumGlobalParameters() const
Get the number of global parameters that the interaction depends on.
Definition: CustomGBForce.h:207