Package ffx.openmm

Class ThreeParticleAverageSite

java.lang.Object
ffx.openmm.VirtualSite
ffx.openmm.ThreeParticleAverageSite

public class ThreeParticleAverageSite extends VirtualSite
This is a VirtualSite that computes the particle location as a weighted average of three other particle's locations. This means the virtual site is in the plane of the three particles.
  • Constructor Details

    • ThreeParticleAverageSite

      public ThreeParticleAverageSite(int particle1, int particle2, int particle3, double weight1, double weight2, double weight3)
      Create a new ThreeParticleAverageSite virtual site. Normally the weights should add up to 1, although this is not strictly required.
      Parameters:
      particle1 - the index of the first particle
      particle2 - the index of the second particle
      particle3 - the index of the third particle
      weight1 - the weight factor (typically between 0 and 1) for the first particle
      weight2 - the weight factor (typically between 0 and 1) for the second particle
      weight3 - the weight factor (typically between 0 and 1) for the third particle
  • Method Details

    • destroy

      public void destroy()
      Destroy the virtual site.
      Specified by:
      destroy in class VirtualSite
    • getWeight

      public double getWeight(int particle)
      Get the weight factor used for a particle this virtual site depends on.
      Parameters:
      particle - the particle to get (between 0 and getNumParticles())
      Returns:
      the weight factor used for that particle