LCPOForce

class LCPOForce : public OpenMM::Force

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.

Public Functions

LCPOForce()

Create an LCPOForce.

void setUsesPeriodicBoundaryConditions(bool periodic)

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

double getSurfaceTension() const

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

Returns:

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

void setSurfaceTension(double surfaceTension)

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

Parameters:

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

int getNumParticles() const

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

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

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 – the radius of the particle for the LCPO method, including the solvent probe radius if applicable, measured in nm

  • p1 – the value of the LCPO parameter P1 for the particle

  • p2 – the value of the LCPO parameter P2 for the particle

  • p3 – the value of the LCPO parameter P3 for the particle

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

Returns:

the index of the particle that was added

void getParticleParameters(int index, double &radius, double &p1, double &p2, double &p3, double &p4) const

Get the nonbonded force parameters for a particle.

Parameters:
  • index – the index of the particle for which to get parameters

  • radius[out] the radius of the particle for the LCPO method, including the solvent probe radius if applicable, measured in nm

  • p1[out] the value of the LCPO parameter P1 for the particle

  • p2[out] the value of the LCPO parameter P2 for the particle

  • p3[out] the value of the LCPO parameter P3 for the particle

  • p4[out] the value of the LCPO parameter P4 for the particle, measured in nm^-2

void setParticleParameters(int index, double radius, double p1, double p2, double p3, double p4)

Set the nonbonded force parameters for a particle.

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

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

  • p1 – the value of the LCPO parameter P1 for the particle

  • p2 – the value of the LCPO parameter P2 for the particle

  • p3 – the value of the LCPO parameter P3 for the particle

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

void updateParametersInContext(Context &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.

virtual bool usesPeriodicBoundaryConditions() const

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

Returns:

true if force uses PBC and false otherwise