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) {