OpenMM
|
This class implements a buffered 14-7 potential used to model van der Waals forces. More...
#include <AmoebaVdwForce.h>
Public Types | |
enum | NonbondedMethod { NoCutoff = 0, CutoffPeriodic = 1 } |
This is an enumeration of the different methods that may be used for handling long range nonbonded forces. More... | |
Public Member Functions | |
AmoebaVdwForce () | |
Create an Amoeba VdwForce. More... | |
int | getNumParticles () const |
Get the number of particles. More... | |
void | setParticleParameters (int particleIndex, int parentIndex, double sigma, double epsilon, double reductionFactor) |
Set the force field parameters for a vdw particle. More... | |
void | getParticleParameters (int particleIndex, int &parentIndex, double &sigma, double &epsilon, double &reductionFactor) const |
Get the force field parameters for a vdw particle. More... | |
int | addParticle (int parentIndex, double sigma, double epsilon, double reductionFactor) |
Add the force field parameters for a vdw particle. More... | |
void | setSigmaCombiningRule (const std::string &sigmaCombiningRule) |
Set sigma combining rule. More... | |
const std::string & | getSigmaCombiningRule (void) const |
Get sigma combining rule. More... | |
void | setEpsilonCombiningRule (const std::string &epsilonCombiningRule) |
Set epsilon combining rule. More... | |
const std::string & | getEpsilonCombiningRule (void) const |
Get epsilon combining rule. More... | |
bool | getUseDispersionCorrection () const |
Get whether to add a contribution to the energy that approximately represents the effect of VdW interactions beyond the cutoff distance. More... | |
void | setUseDispersionCorrection (bool useCorrection) |
Set whether to add a contribution to the energy that approximately represents the effect of VdW interactions beyond the cutoff distance. More... | |
void | setParticleExclusions (int particleIndex, const std::vector< int > &exclusions) |
Set exclusions for specified particle. More... | |
void | getParticleExclusions (int particleIndex, std::vector< int > &exclusions) const |
Get exclusions for specified particle. More... | |
void | setCutoff (double cutoff) |
Set the cutoff distance. More... | |
double | getCutoff () const |
Get the cutoff distance. More... | |
NonbondedMethod | getNonbondedMethod () const |
Get the method used for handling long range nonbonded interactions. More... | |
void | setNonbondedMethod (NonbondedMethod method) |
Set the method used for handling long range nonbonded interactions. More... | |
void | updateParametersInContext (Context &context) |
Update the per-particle parameters in a Context to match those stored in this Force object. More... | |
Public Member Functions inherited from Force | |
Force () | |
virtual | ~Force () |
int | getForceGroup () const |
Get the force group this Force belongs to. More... | |
void | setForceGroup (int group) |
Set the force group this Force belongs to. More... | |
Protected Member Functions | |
ForceImpl * | createImpl () const |
When a Context is created, it invokes this method on each Force in the System. More... | |
Protected Member Functions inherited from Force | |
ForceImpl & | getImplInContext (Context &context) |
Get the ForceImpl corresponding to this Force in a Context. More... | |
ContextImpl & | getContextImpl (Context &context) |
Get the ContextImpl corresponding to a Context. More... | |
This class implements a buffered 14-7 potential used to model van der Waals forces.
To use it, create an AmoebaVdwForce object then call addParticle() once for each particle. After a particle has been added, you can modify its force field parameters by calling setParticleParameters(). This will have no effect on Contexts that already exist unless you call updateParametersInContext().
A unique feature of this class is that the interaction site for a particle does not need to be exactly at the particle's location. Instead, it can be placed a fraction of the distance from that particle to another one. This is typically done for hydrogens to place the interaction site slightly closer to the parent atom. The fraction is known as the "reduction factor", since it reduces the distance from the parent atom to the interaction site.
enum NonbondedMethod |
This is an enumeration of the different methods that may be used for handling long range nonbonded forces.
AmoebaVdwForce | ( | ) |
Create an Amoeba VdwForce.
int addParticle | ( | int | parentIndex, |
double | sigma, | ||
double | epsilon, | ||
double | reductionFactor | ||
) |
Add the force field parameters for a vdw particle.
parentIndex | the index of the parent particle |
sigma | vdw sigma |
epsilon | vdw epsilon |
reductionFactor | the fraction of the distance along the line from the parent particle to this particle at which the interaction site should be placed |
|
protectedvirtual |
double getCutoff | ( | ) | const |
Get the cutoff distance.
const std::string& getEpsilonCombiningRule | ( | void | ) | const |
Get epsilon combining rule.
NonbondedMethod getNonbondedMethod | ( | ) | const |
Get the method used for handling long range nonbonded interactions.
|
inline |
Get the number of particles.
void getParticleExclusions | ( | int | particleIndex, |
std::vector< int > & | exclusions | ||
) | const |
Get exclusions for specified particle.
particleIndex | particle index |
exclusions | vector of exclusions |
void getParticleParameters | ( | int | particleIndex, |
int & | parentIndex, | ||
double & | sigma, | ||
double & | epsilon, | ||
double & | reductionFactor | ||
) | const |
Get the force field parameters for a vdw particle.
particleIndex | the particle index |
parentIndex | the index of the parent particle |
sigma | vdw sigma |
epsilon | vdw epsilon |
reductionFactor | the fraction of the distance along the line from the parent particle to this particle at which the interaction site should be placed |
const std::string& getSigmaCombiningRule | ( | void | ) | const |
Get sigma combining rule.
|
inline |
Get whether to add a contribution to the energy that approximately represents the effect of VdW interactions beyond the cutoff distance.
The energy depends on the volume of the periodic box, and is only applicable when periodic boundary conditions are used. When running simulations at constant pressure, adding this contribution can improve the quality of results.
void setCutoff | ( | double | cutoff | ) |
Set the cutoff distance.
void setEpsilonCombiningRule | ( | const std::string & | epsilonCombiningRule | ) |
Set epsilon combining rule.
epsilonCombiningRule | epsilon combining rule: 'ARITHMETIC', 'GEOMETRIC'. 'HARMONIC', 'HHG' |
void setNonbondedMethod | ( | NonbondedMethod | method | ) |
Set the method used for handling long range nonbonded interactions.
void setParticleExclusions | ( | int | particleIndex, |
const std::vector< int > & | exclusions | ||
) |
Set exclusions for specified particle.
particleIndex | particle index |
exclusions | vector of exclusions |
void setParticleParameters | ( | int | particleIndex, |
int | parentIndex, | ||
double | sigma, | ||
double | epsilon, | ||
double | reductionFactor | ||
) |
Set the force field parameters for a vdw particle.
particleIndex | the particle index |
parentIndex | the index of the parent particle |
sigma | vdw sigma |
epsilon | vdw epsilon |
reductionFactor | the fraction of the distance along the line from the parent particle to this particle at which the interaction site should be placed |
void setSigmaCombiningRule | ( | const std::string & | sigmaCombiningRule | ) |
Set sigma combining rule.
sigmaCombiningRule | sigma combining rule: 'ARITHMETIC', 'GEOMETRIC'. 'CUBIC-MEAN' |
|
inline |
Set whether to add a contribution to the energy that approximately represents the effect of VdW interactions beyond the cutoff distance.
The energy depends on the volume of the periodic box, and is only applicable when periodic boundary conditions are used. When running simulations at constant pressure, adding this contribution can improve the quality of results.
void updateParametersInContext | ( | Context & | context | ) |
Update the per-particle parameters in a Context to match those stored in this Force object.
This method provides an efficient method to update certain parameters in an existing Context without needing to reinitialize it. Simply call setParticleParameters() to modify this object's parameters, then call updateParametersInState() to copy them over to the Context.
The only information this method updates is the values of per-particle parameters. All other aspects of the Force (the nonbonded method, the cutoff distance, etc.) are unaffected and can only be changed by reinitializing the Context.