1 #ifndef OPENMM_CUSTOMGBFORCE_H_
2 #define OPENMM_CUSTOMGBFORCE_H_
41 #include "internal/windowsExport.h"
155 CutoffNonPeriodic = 1,
178 ParticlePairNoExclusions = 2
188 return particles.size();
194 return exclusions.size();
200 return parameters.size();
206 return globalParameters.size();
212 return functions.size();
218 return computedValues.size();
224 return energyTerms.size();
229 NonbondedMethod getNonbondedMethod()
const;
233 void setNonbondedMethod(NonbondedMethod method);
240 double getCutoffDistance()
const;
247 void setCutoffDistance(
double distance);
254 int addPerParticleParameter(
const std::string& name);
261 const std::string& getPerParticleParameterName(
int index)
const;
268 void setPerParticleParameterName(
int index,
const std::string& name);
276 int addGlobalParameter(
const std::string& name,
double defaultValue);
283 const std::string& getGlobalParameterName(
int index)
const;
290 void setGlobalParameterName(
int index,
const std::string& name);
297 double getGlobalParameterDefaultValue(
int index)
const;
304 void setGlobalParameterDefaultValue(
int index,
double defaultValue);
312 int addParticle(
const std::vector<double>& parameters);
319 void getParticleParameters(
int index, std::vector<double>& parameters)
const;
326 void setParticleParameters(
int index,
const std::vector<double>& parameters);
343 int addComputedValue(
const std::string& name,
const std::string& expression, ComputationType type);
361 void getComputedValueParameters(
int index, std::string& name, std::string& expression, ComputationType& type)
const;
379 void setComputedValueParameters(
int index,
const std::string& name,
const std::string& expression, ComputationType type);
395 int addEnergyTerm(
const std::string& expression, ComputationType type);
412 void getEnergyTermParameters(
int index, std::string& expression, ComputationType& type)
const;
429 void setEnergyTermParameters(
int index,
const std::string& expression, ComputationType type);
437 int addExclusion(
int particle1,
int particle2);
445 void getExclusionParticles(
int index,
int& particle1,
int& particle2)
const;
453 void setExclusionParticles(
int index,
int particle1,
int particle2);
464 int addFunction(
const std::string& name,
const std::vector<double>& values,
double min,
double max);
475 void getFunctionParameters(
int index, std::string& name, std::vector<double>& values,
double& min,
double& max)
const;
486 void setFunctionParameters(
int index,
const std::string& name,
const std::vector<double>& values,
double min,
double max);
497 void updateParametersInContext(
Context& context);
502 class PerParticleParameterInfo;
503 class GlobalParameterInfo;
506 class ComputationInfo;
507 NonbondedMethod nonbondedMethod;
508 double cutoffDistance;
509 std::vector<PerParticleParameterInfo> parameters;
510 std::vector<GlobalParameterInfo> globalParameters;
511 std::vector<ParticleInfo> particles;
512 std::vector<ExclusionInfo> exclusions;
513 std::vector<FunctionInfo> functions;
514 std::vector<ComputationInfo> computedValues;
515 std::vector<ComputationInfo> energyTerms;
522 class CustomGBForce::ParticleInfo {
524 std::vector<double> parameters;
527 ParticleInfo(
const std::vector<double>& parameters) : parameters(parameters) {
535 class CustomGBForce::PerParticleParameterInfo {
538 PerParticleParameterInfo() {
540 PerParticleParameterInfo(
const std::string& name) : name(name) {
548 class CustomGBForce::GlobalParameterInfo {
552 GlobalParameterInfo() {
554 GlobalParameterInfo(
const std::string& name,
double defaultValue) : name(name), defaultValue(defaultValue) {
562 class CustomGBForce::ExclusionInfo {
564 int particle1, particle2;
566 particle1 = particle2 = -1;
568 ExclusionInfo(
int particle1,
int particle2) :
569 particle1(particle1), particle2(particle2) {
577 class CustomGBForce::FunctionInfo {
580 std::vector<double> values;
584 FunctionInfo(
const std::string& name,
const std::vector<double>& values,
double min,
double max) :
585 name(name), values(values), min(min), max(max) {
593 class CustomGBForce::ComputationInfo {
596 std::string expression;
601 name(name), expression(expression), type(type) {
int getNumFunctions() const
Get the number of tabulated functions that have been defined.
Definition: CustomGBForce.h:211
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:141
Force objects apply forces to the particles in a System, or alter their behavior in other ways...
Definition: Force.h:65
int getNumEnergyTerms() const
Get the number of terms in the energy computation.
Definition: CustomGBForce.h:223
NonbondedMethod
This is an enumeration of the different methods that may be used for handling long range nonbonded fo...
Definition: CustomGBForce.h:146
int getNumExclusions() const
Get the number of particle pairs whose interactions should be excluded.
Definition: CustomGBForce.h:193
int getNumComputedValues() const
Get the number of per-particle computed values the interaction depends on.
Definition: CustomGBForce.h:217
int getNumParticles() const
Get the number of particles for which force field parameters have been defined.
Definition: CustomGBForce.h:187
int getNumPerParticleParameters() const
Get the number of per-particle parameters that the interaction depends on.
Definition: CustomGBForce.h:199
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:165
int getNumGlobalParameters() const
Get the number of global parameters that the interaction depends on.
Definition: CustomGBForce.h:205