OpenMM
 All Classes Namespaces Functions Variables Pages
DrudeForce Class Reference

This class implements forces that are specific to Drude oscillators. More...

+ Inheritance diagram for DrudeForce:

Public Member Functions

def getNumParticles
 getNumParticles(DrudeForce self) -> int More...
 
def getNumScreenedPairs
 getNumScreenedPairs(DrudeForce self) -> int More...
 
def addParticle
 addParticle(DrudeForce self, int particle, int particle1, int particle2, int particle3, int particle4, double charge, double polarizability, double aniso12, double aniso34) -> int More...
 
def getParticleParameters
 getParticleParameters(DrudeForce self, int index) More...
 
def setParticleParameters
 setParticleParameters(DrudeForce self, int index, int particle, int particle1, int particle2, int particle3, int particle4, double charge, double polarizability, double aniso12, double aniso34) More...
 
def addScreenedPair
 addScreenedPair(DrudeForce self, int particle1, int particle2, double thole) -> int More...
 
def getScreenedPairParameters
 getScreenedPairParameters(DrudeForce self, int index) More...
 
def setScreenedPairParameters
 setScreenedPairParameters(DrudeForce self, int index, int particle1, int particle2, double thole) More...
 
def updateParametersInContext
 updateParametersInContext(DrudeForce self, Context context) More...
 
def usesPeriodicBoundaryConditions
 usesPeriodicBoundaryConditions(DrudeForce self) -> bool More...
 
def __init__
 init(OpenMM::DrudeForce self) -> DrudeForce init(OpenMM::DrudeForce self, DrudeForce other) -> DrudeForce More...
 
def __del__
 del(OpenMM::DrudeForce self) More...
 
- Public Member Functions inherited from Force
def __init__
 
def __del__
 del(OpenMM::Force self) More...
 
def getForceGroup
 getForceGroup(Force self) -> int More...
 
def setForceGroup
 setForceGroup(Force self, int group) More...
 
def usesPeriodicBoundaryConditions
 usesPeriodicBoundaryConditions(Force self) -> bool More...
 
def __copy__
 
def __deepcopy__
 

Public Attributes

 this
 

Detailed Description

This class implements forces that are specific to Drude oscillators.

There are two distinct forces it applies: an anisotropic harmonic force connecting each Drude particle to its parent particle; and a screened Coulomb interaction between specific pairs of dipoles. The latter is typically used between closely bonded particles whose Coulomb interaction would otherwise be fully excluded.

To use this class, create a DrudeForce object, then call addParticle() once for each Drude particle in the System to define its parameters. 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(). Likewise, call addScreenedPair() for each pair of dipoles (each dipole consisting of a Drude particle and its parent) that should be computed.

Constructor & Destructor Documentation

def __init__ (   self,
  args 
)

init(OpenMM::DrudeForce self) -> DrudeForce init(OpenMM::DrudeForce self, DrudeForce other) -> DrudeForce

Create a DrudeForce.

References simtk.openmm.openmm.stripUnits().

def __del__ (   self)

del(OpenMM::DrudeForce self)

References simtk.openmm.openmm.stripUnits().

Member Function Documentation

def addParticle (   self,
  args 
)

addParticle(DrudeForce self, int particle, int particle1, int particle2, int particle3, int particle4, double charge, double polarizability, double aniso12, double aniso34) -> int

Add a Drude particle to which forces should be applied.

Parameters
particlethe index within the System of the Drude particle
particle1the index within the System of the particle to which the Drude particle is attached
particle2the index within the System of the second particle used for defining anisotropic polarizability. This may be set to -1, in which case aniso12 will be ignored.
particle3the index within the System of the third particle used for defining anisotropic polarizability. This may be set to -1, in which case aniso34 will be ignored.
particle4the index within the System of the fourth particle used for defining anisotropic polarizability. This may be set to -1, in which case aniso34 will be ignored.
chargeThe charge on the Drude particle
polarizabilityThe isotropic polarizability
aniso12The scale factor for the polarizability along the direction defined by particle1 and particle2
aniso34The scale factor for the polarizability along the direction defined by particle3 and particle4

References simtk.openmm.openmm.stripUnits().

Referenced by NonbondedForce.addParticle_usingRVdw().

def addScreenedPair (   self,
  args 
)

addScreenedPair(DrudeForce self, int particle1, int particle2, double thole) -> int

Add an interaction to the list of screened pairs.

Parameters
particle1the index within this Force of the first particle involved in the interaction
particle2the index within this Force of the second particle involved in the interaction
tholethe Thole screening factor

References simtk.openmm.openmm.stripUnits().

def getNumParticles (   self,
  args 
)

getNumParticles(DrudeForce self) -> int

Get the number of particles for which force field parameters have been defined.

References simtk.openmm.openmm.stripUnits().

def getNumScreenedPairs (   self,
  args 
)

getNumScreenedPairs(DrudeForce self) -> int

Get the number of special interactions that should be calculated differently from other interactions.

References simtk.openmm.openmm.stripUnits().

def getParticleParameters (   self,
  args 
)

getParticleParameters(DrudeForce self, int index)

Get the parameters for a Drude particle.

Parameters
indexthe index of the Drude particle for which to get parameters
particlethe index within the System of the Drude particle
particle1the index within the System of the particle to which the Drude particle is attached
particle2the index within the System of the second particle used for defining anisotropic polarizability. This may be set to -1, in which case aniso12 will be ignored.
particle3the index within the System of the third particle used for defining anisotropic polarizability. This may be set to -1, in which case aniso34 will be ignored.
particle4the index within the System of the fourth particle used for defining anisotropic polarizability. This may be set to -1, in which case aniso34 will be ignored.
chargeThe charge on the Drude particle
polarizabilityThe isotropic polarizability
aniso12The scale factor for the polarizability along the direction defined by particle1 and particle2
aniso34The scale factor for the polarizability along the direction defined by particle3 and particle4

References simtk.openmm.openmm.stripUnits().

def getScreenedPairParameters (   self,
  args 
)

getScreenedPairParameters(DrudeForce self, int index)

Get the force field parameters for screened pair.

Parameters
indexthe index of the pair for which to get parameters
particle1the index within this Force of the first particle involved in the interaction
particle2the index within this Force of the second particle involved in the interaction
tholethe Thole screening factor

References simtk.openmm.openmm.stripUnits().

def setParticleParameters (   self,
  args 
)

setParticleParameters(DrudeForce self, int index, int particle, int particle1, int particle2, int particle3, int particle4, double charge, double polarizability, double aniso12, double aniso34)

Set the parameters for a Drude particle.

Parameters
indexthe index of the Drude particle for which to set parameters
particlethe index within the System of the Drude particle
particle1the index within the System of the particle to which the Drude particle is attached
particle2the index within the System of the second particle used for defining anisotropic polarizability. This may be set to -1, in which case aniso12 will be ignored.
particle3the index within the System of the third particle used for defining anisotropic polarizability. This may be set to -1, in which case aniso34 will be ignored.
particle4the index within the System of the fourth particle used for defining anisotropic polarizability. This may be set to -1, in which case aniso34 will be ignored.
chargeThe charge on the Drude particle
polarizabilityThe isotropic polarizability
aniso12The scale factor for the polarizability along the direction defined by particle1 and particle2
aniso34The scale factor for the polarizability along the direction defined by particle3 and particle4

References simtk.openmm.openmm.stripUnits().

def setScreenedPairParameters (   self,
  args 
)

setScreenedPairParameters(DrudeForce self, int index, int particle1, int particle2, double thole)

Set the force field parameters for screened pair.

Parameters
indexthe index of the pair for which to get parameters
particle1the index within this Force of the first particle involved in the interaction
particle2the index within this Force of the second particle involved in the interaction
tholethe Thole screening factor

References simtk.openmm.openmm.stripUnits().

def updateParametersInContext (   self,
  args 
)

updateParametersInContext(DrudeForce self, Context context)

Update the particle and screened pair 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() and setScreenedPairParameters() to modify this object's parameters, then call updateParametersInContext() to copy them over to the Context.

This method has several limitations. It can be used to modify the numeric parameters associated with a particle or screened pair (polarizability, thole, etc.), but not the identities of the particles they involve. It also cannot be used to add new particles or screenedPairs, only to change the parameters of existing ones.

References simtk.openmm.openmm.stripUnits().

def usesPeriodicBoundaryConditions (   self,
  args 
)

usesPeriodicBoundaryConditions(DrudeForce self) -> bool

Returns whether or not this force makes use of periodic boundary conditions.

References simtk.openmm.openmm.stripUnits().

Member Data Documentation

this

Referenced by System.__init__().


The documentation for this class was generated from the following file: