LCPOForce

class openmm.openmm.LCPOForce(*args)

This class implements the functional form of the potential used in the LCPO (linear combinations of pairwise overlaps) method for estimating solvent-accessible surface areas. Specifically, it implements the three-body potential described in Weiser, Shenkin, and Still, J. Comput. Chem. 20, 217 (1999).

To use this class, create an LCPOForce object, then call addParticle() once for each particle in the System to define its parameters. The number of particles for which you define parameters must be exactly equal to the number of particles in the System, or else an exception will be thrown when you try to create a Context. After a particle has been added, you can modify its parameters by calling setParticleParameters(). This will have no effect on Contexts that already exist unless you call updateParametersInContext().

To exclude a particle from the force entirely, set its radius to zero.

__init__(self) LCPOForce
__init__(self, other) LCPOForce

Create an LCPOForce.

Methods

__init__(-> LCPOForce)

Create an LCPOForce.

addParticle(self, radius, p1, p2, p3, p4)

Add parameters for a particle.

getForceGroup(self)

Get the force group this Force belongs to.

getName(self)

Get the name of this Force.

getNumParticles(self)

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

getParticleParameters(self, index)

Get the nonbonded force parameters for a particle.

getSurfaceTension(self)

Get the surface tension used to calculate the energy from the surface area.

setForceGroup(self, group)

Set the force group this Force belongs to.

setName(self, name)

Set the name of this Force.

setParticleParameters(self, index, radius, ...)

Set the nonbonded force parameters for a particle.

setSurfaceTension(self, surfaceTension)

Set the surface tension used to calculate the energy from the surface area.

setUsesPeriodicBoundaryConditions(self, periodic)

Set whether this force should apply periodic boundary conditions when calculating distances between particles.

updateParametersInContext(self, context)

Update the parameters in a Context to match those stored in this Force object.

usesPeriodicBoundaryConditions(self)

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

Attributes

thisown

The membership flag

property thisown

The membership flag

setUsesPeriodicBoundaryConditions(self, periodic)

Set whether this force should apply periodic boundary conditions when calculating distances between particles.

getSurfaceTension(self) float

Get the surface tension used to calculate the energy from the surface area.

Returns:

the surface tension, measured in kJ/mol/nm^2

Return type:

float

setSurfaceTension(self, surfaceTension)

Set the surface tension used to calculate the energy from the surface area.

Parameters:

surfaceTension (float) – the surface tension, measured in kJ/mol/nm^2

getNumParticles(self) int

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

addParticle(self, radius, p1, p2, p3, p4) int

Add parameters for a particle. This should be called once for each particle in the System. When it is called for the i’th time, it specifies the parameters for the i’th particle.

Parameters:
  • radius (float) – the radius of the particle for the LCPO method, including the solvent probe radius if applicable, measured in nm

  • p1 (float) – the value of the LCPO parameter P1 for the particle

  • p2 (float) – the value of the LCPO parameter P2 for the particle

  • p3 (float) – the value of the LCPO parameter P3 for the particle

  • p4 (float) – the value of the LCPO parameter P4 for the particle, measured in nm^-2

Returns:

the index of the particle that was added

Return type:

int

getParticleParameters(self, index)

Get the nonbonded force parameters for a particle.

Parameters:

index (int) – the index of the particle for which to get parameters

Returns:

  • radius (float) – the radius of the particle for the LCPO method, including the solvent probe radius if applicable, measured in nm

  • p1 (float) – the value of the LCPO parameter P1 for the particle

  • p2 (float) – the value of the LCPO parameter P2 for the particle

  • p3 (float) – the value of the LCPO parameter P3 for the particle

  • p4 (float) – the value of the LCPO parameter P4 for the particle, measured in nm^-2

setParticleParameters(self, index, radius, p1, p2, p3, p4)

Set the nonbonded force parameters for a particle.

Parameters:
  • index (int) – the index of the particle for which to set parameters

  • radius (float) – the radius of the particle for the LCPO method, including the solvent probe radius if applicable, measured in nm

  • p1 (float) – the value of the LCPO parameter P1 for the particle

  • p2 (float) – the value of the LCPO parameter P2 for the particle

  • p3 (float) – the value of the LCPO parameter P3 for the particle

  • p4 (float) – the value of the LCPO parameter P4 for the particle, measured in nm^-2

updateParametersInContext(self, context)

Update the 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. Only the surface tension and the values of particle parameters can be updated by this method; other changes made will not be reflected in the Context after calling it.

usesPeriodicBoundaryConditions(self) bool

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

Returns:

true if force uses PBC and false otherwise

Return type:

bool

getForceGroup(self) int

Get the force group this Force belongs to.

getName(self) str

Get the name of this Force. This is an arbitrary, user modifiable identifier. By default it equals the class name, but you can change it to anything useful.

setForceGroup(self, group)

Set the force group this Force belongs to.

Parameters:

group (int) – the group index. Legal values are between 0 and 31 (inclusive).

setName(self, name)

Set the name of this Force. This is an arbitrary, user modifiable identifier. By default it equals the class name, but you can change it to anything useful.