Package ffx.openmm.amoeba
Class WcaDispersionForce
java.lang.Object
ffx.openmm.Force
ffx.openmm.amoeba.WcaDispersionForce
- Direct Known Subclasses:
AmoebaWcaDispersionForce
This class implements a nonbonded interaction between pairs of particles typically used along with
AmoebaGeneralizedKirkwoodForce as part of an implicit solvent model.
To use it, create an AmoebaWcaDispersionForce 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().
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
addParticle
(double radius, double epsilon) Add a particle to the force field.void
destroy()
Destroy the force.double
Get the water density parameter.double
Get the dispersion offset.double
getEpsh()
Get the water hydrogen epsilon parameter.double
getEpso()
Get the water oxygen epsilon parameter.int
Get the number of particlesvoid
getParticleParameters
(int particleIndex, com.sun.jna.ptr.DoubleByReference radius, com.sun.jna.ptr.DoubleByReference epsilon) Get the force field parameters for a WCA dispersion particle.double
getRminh()
Get the water hydrogen radius parameter.double
getRmino()
Get the water oxygen radius parameter.double
getShctd()
Get the overlap factor.double
getSlevy()
Get the Levy parameter.void
setAwater
(double awater) Set the water density parameter.void
setDispoff
(double dispoff) Set the dispersion offset.void
setEpsh
(double epsh) Set the water hydrogen epsilon parameter.void
setEpso
(double epso) Set the water oxygen epsilon parameter.void
setParticleParameters
(int particleIndex, double radius, double epsilon) Set the force field parameters for a WCA dispersion particle.void
setRminh
(double rminh) Set the water hydrogen radius parameter.void
setRmino
(double rmino) Set the water oxygen radius parameter.void
setShctd
(double shctd) Set the overlap factor.void
setSlevy
(double slevy) Set the Levy parameter.void
updateParametersInContext
(Context context) Update the per-particle parameters in a Context to match those stored in this Force object.boolean
Returns whether or not this force makes use of periodic boundary conditions.Methods inherited from class ffx.openmm.Force
getForceGroup, getForceIndex, getName, getPointer, setForceGroup, setForceIndex, setName
-
Constructor Details
-
WcaDispersionForce
public WcaDispersionForce()Create an AmoebaWcaDispersionForce.
-
-
Method Details
-
addParticle
public int addParticle(double radius, double epsilon) Add a particle to the force field.- Parameters:
radius
- radiusepsilon
- epsilon- Returns:
- index of added particle
-
destroy
public void destroy()Destroy the force. -
getAwater
public double getAwater()Get the water density parameter.- Returns:
- The water density parameter.
-
getDispoff
public double getDispoff()Get the dispersion offset.- Returns:
- The dispersion offset.
-
getEpsh
public double getEpsh()Get the water hydrogen epsilon parameter.- Returns:
- The water hydrogen epsilon parameter.
-
getEpso
public double getEpso()Get the water oxygen epsilon parameter.- Returns:
- The water oxygen epsilon parameter.
-
getNumParticles
public int getNumParticles()Get the number of particles -
getParticleParameters
public void getParticleParameters(int particleIndex, com.sun.jna.ptr.DoubleByReference radius, com.sun.jna.ptr.DoubleByReference epsilon) Get the force field parameters for a WCA dispersion particle.- Parameters:
particleIndex
- the particle indexradius
- radiusepsilon
- epsilon
-
getRminh
public double getRminh()Get the water hydrogen radius parameter.- Returns:
- The water hydrogen radius parameter.
-
getRmino
public double getRmino()Get the water oxygen radius parameter.- Returns:
- The water oxygen radius parameter.
-
getShctd
public double getShctd()Get the overlap factor.- Returns:
- The overlap factor.
-
getSlevy
public double getSlevy()Get the Levy parameter.- Returns:
- The Levy parameter.
-
setAwater
public void setAwater(double awater) Set the water density parameter.- Parameters:
awater
- The water density parameter.
-
setDispoff
public void setDispoff(double dispoff) Set the dispersion offset.- Parameters:
dispoff
- The dispersion offset.
-
setEpsh
public void setEpsh(double epsh) Set the water hydrogen epsilon parameter.- Parameters:
epsh
- The water hydrogen epsilon parameter.
-
setEpso
public void setEpso(double epso) Set the water oxygen epsilon parameter.- Parameters:
epso
- The water oxygen epsilon parameter.
-
setParticleParameters
public void setParticleParameters(int particleIndex, double radius, double epsilon) Set the force field parameters for a WCA dispersion particle.- Parameters:
particleIndex
- the particle indexradius
- radiusepsilon
- epsilon
-
setRminh
public void setRminh(double rminh) Set the water hydrogen radius parameter.- Parameters:
rminh
- The water hydrogen radius parameter.
-
setRmino
public void setRmino(double rmino) Set the water oxygen radius parameter.- Parameters:
rmino
- The water oxygen radius parameter.
-
setShctd
public void setShctd(double shctd) Set the overlap factor.- Parameters:
shctd
- The overlap factor.
-
setSlevy
public void setSlevy(double slevy) Set the Levy parameter.- Parameters:
slevy
- The Levy parameter.
-
updateParametersInContext
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 updateParametersInContext() 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 are unaffected and can only be changed by reinitializing the Context.
-
usesPeriodicBoundaryConditions
public boolean usesPeriodicBoundaryConditions()Returns whether or not this force makes use of periodic boundary conditions.- Overrides:
usesPeriodicBoundaryConditions
in classForce
- Returns:
- true if nonbondedMethod uses PBC and false otherwise
-