1 #ifndef OPENMM_CUSTOMTHREEBODYFORCE_H_
2 #define OPENMM_CUSTOMTHREEBODYFORCE_H_
36 #include "TabulatedFunction.h"
37 #include "internal/windowsExport.h"
176 CutoffNonPeriodic = 1,
194 SinglePermutation = 0,
201 UniqueCentralParticle = 1
216 return particlesPerSet;
222 return particles.size();
228 return exclusions.size();
234 return particleParameters.size();
240 return globalParameters.size();
246 return functions.size();
251 const std::string& getEnergyFunction()
const;
255 void setEnergyFunction(
const std::string& energy);
259 NonbondedMethod getNonbondedMethod()
const;
263 void setNonbondedMethod(NonbondedMethod method);
267 PermutationMode getPermutationMode()
const;
271 void setPermutationMode(PermutationMode mode);
278 double getCutoffDistance()
const;
285 void setCutoffDistance(
double distance);
292 int addPerParticleParameter(
const std::string& name);
299 const std::string& getPerParticleParameterName(
int index)
const;
306 void setPerParticleParameterName(
int index,
const std::string& name);
314 int addGlobalParameter(
const std::string& name,
double defaultValue);
321 const std::string& getGlobalParameterName(
int index)
const;
328 void setGlobalParameterName(
int index,
const std::string& name);
335 double getGlobalParameterDefaultValue(
int index)
const;
342 void setGlobalParameterDefaultValue(
int index,
double defaultValue);
351 int addParticle(
const std::vector<double>& parameters,
int type=0);
359 void getParticleParameters(
int index, std::vector<double>& parameters,
int& type)
const;
367 void setParticleParameters(
int index,
const std::vector<double>& parameters,
int type);
377 int addExclusion(
int particle1,
int particle2);
385 void getExclusionParticles(
int index,
int& particle1,
int& particle2)
const;
393 void setExclusionParticles(
int index,
int particle1,
int particle2);
402 void createExclusionsFromBonds(
const std::vector<std::pair<int, int> >& bonds,
int bondCutoff);
411 void getTypeFilter(
int index, std::set<int>& types)
const;
420 void setTypeFilter(
int index,
const std::set<int>& types);
451 const std::string& getTabulatedFunctionName(
int index)
const;
463 void updateParametersInContext(
Context& context);
474 ForceImpl* createImpl()
const;
477 class ParticleParameterInfo;
478 class GlobalParameterInfo;
482 NonbondedMethod nonbondedMethod;
483 PermutationMode permutationMode;
484 double cutoffDistance;
485 std::string energyExpression;
486 std::vector<ParticleParameterInfo> particleParameters;
487 std::vector<GlobalParameterInfo> globalParameters;
488 std::vector<ParticleInfo> particles;
489 std::vector<ExclusionInfo> exclusions;
490 std::vector<FunctionInfo> functions;
491 std::vector<std::set<int> > typeFilters;
499 class CustomManyParticleForce::ParticleInfo {
501 std::vector<double> parameters;
505 ParticleInfo(
const std::vector<double>& parameters,
int type) : parameters(parameters), type(type) {
513 class CustomManyParticleForce::ParticleParameterInfo {
516 ParticleParameterInfo() {
518 ParticleParameterInfo(
const std::string& name) : name(name) {
526 class CustomManyParticleForce::GlobalParameterInfo {
530 GlobalParameterInfo() {
532 GlobalParameterInfo(
const std::string& name,
double defaultValue) : name(name), defaultValue(defaultValue) {
540 class CustomManyParticleForce::ExclusionInfo {
542 int particle1, particle2;
544 particle1 = particle2 = -1;
546 ExclusionInfo(
int particle1,
int particle2) :
547 particle1(particle1), particle2(particle2) {
555 class CustomManyParticleForce::FunctionInfo {
558 TabulatedFunction*
function;
561 FunctionInfo(
const std::string& name, TabulatedFunction*
function) : name(name), function(function) {
int getNumParticles() const
Get the number of particles for which force field parameters have been defined.
Definition: CustomManyParticleForce.h:221
int getNumExclusions() const
Get the number of particle pairs whose interactions should be excluded.
Definition: CustomManyParticleForce.h:227
int getNumPerParticleParameters() const
Get the number of per-particle parameters that the interaction depends on.
Definition: CustomManyParticleForce.h:233
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
PermutationMode
This is an enumeration of the different modes for selecting which permutations of a set of particles ...
Definition: CustomManyParticleForce.h:187
int getNumTabulatedFunctions() const
Get the number of tabulated functions that have been defined.
Definition: CustomManyParticleForce.h:245
NonbondedMethod
This is an enumeration of the different methods that may be used for handling long range nonbonded fo...
Definition: CustomManyParticleForce.h:167
int getNumParticlesPerSet() const
Get the number of particles in each set for which the energy is evaluated.
Definition: CustomManyParticleForce.h:215
Force objects apply forces to the particles in a System, or alter their behavior in other ways...
Definition: Force.h:65
Periodic boundary conditions are used, so that each particle interacts only with the nearest periodic...
Definition: CustomManyParticleForce.h:181
bool usesPeriodicBoundaryConditions() const
Returns whether or not this force makes use of periodic boundary conditions.
Definition: CustomManyParticleForce.h:470
Definition: AndersenThermostat.h:40
This class supports a wide variety of nonbonded N-particle interactions, where N is user specified...
Definition: CustomManyParticleForce.h:162
int getNumGlobalParameters() const
Get the number of global parameters that the interaction depends on.
Definition: CustomManyParticleForce.h:239