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);
536 ForceImpl* createImpl()
const;
539 class PerParticleParameterInfo;
540 class GlobalParameterInfo;
543 class ComputationInfo;
544 NonbondedMethod nonbondedMethod;
545 double cutoffDistance;
546 std::vector<PerParticleParameterInfo> parameters;
547 std::vector<GlobalParameterInfo> globalParameters;
548 std::vector<ParticleInfo> particles;
549 std::vector<ExclusionInfo> exclusions;
550 std::vector<FunctionInfo> functions;
551 std::vector<ComputationInfo> computedValues;
552 std::vector<ComputationInfo> energyTerms;
559 class CustomGBForce::ParticleInfo {
561 std::vector<double> parameters;
564 ParticleInfo(
const std::vector<double>& parameters) : parameters(parameters) {
572 class CustomGBForce::PerParticleParameterInfo {
575 PerParticleParameterInfo() {
577 PerParticleParameterInfo(
const std::string& name) : name(name) {
585 class CustomGBForce::GlobalParameterInfo {
589 GlobalParameterInfo() {
591 GlobalParameterInfo(
const std::string& name,
double defaultValue) : name(name), defaultValue(defaultValue) {
599 class CustomGBForce::ExclusionInfo {
601 int particle1, particle2;
603 particle1 = particle2 = -1;
605 ExclusionInfo(
int particle1,
int particle2) :
606 particle1(particle1), particle2(particle2) {
614 class CustomGBForce::FunctionInfo {
617 TabulatedFunction*
function;
620 FunctionInfo(
const std::string& name, TabulatedFunction*
function) : name(name), function(function) {
628 class CustomGBForce::ComputationInfo {
631 std::string expression;
636 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
bool usesPeriodicBoundaryConditions() const
Returns whether or not this force makes use of periodic boundary conditions.
Definition: CustomGBForce.h:532
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
Periodic boundary conditions are used, so that each particle interacts only with the nearest periodic...
Definition: CustomGBForce.h:161
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
Definition: AndersenThermostat.h:40
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