Package ffx.openmm

Class LocalCoordinatesSite

java.lang.Object
ffx.openmm.VirtualSite
ffx.openmm.LocalCoordinatesSite

public class LocalCoordinatesSite extends VirtualSite
This is a VirtualSite that computes the particle location based on a local coordinate system. The site is placed at a fixed position relative to a local coordinate system defined by other particles. This is useful for representing sites like lone pairs or pi-electron centers that have well-defined positions relative to the molecular framework.

The local coordinate system is defined by an origin and two direction vectors (x and y axes). Each of these is specified as a weighted average of particle positions. The z axis is taken to be the cross product of the x and y axes.

  • Field Summary

    Fields inherited from class ffx.openmm.VirtualSite

    pointer
  • Constructor Summary

    Constructors
    Constructor
    Description
    LocalCoordinatesSite(int particle1, int particle2, int particle3, edu.uiowa.jopenmm.OpenMM_Vec3 originWeights, edu.uiowa.jopenmm.OpenMM_Vec3 xdir, edu.uiowa.jopenmm.OpenMM_Vec3 ydir, edu.uiowa.jopenmm.OpenMM_Vec3 localPosition)
    Create a LocalCoordinatesSite using specific particles and vectors to define the coordinate system.
    LocalCoordinatesSite(com.sun.jna.ptr.PointerByReference originWeights, com.sun.jna.ptr.PointerByReference xWeights, com.sun.jna.ptr.PointerByReference yWeights, com.sun.jna.ptr.PointerByReference zWeights, edu.uiowa.jopenmm.OpenMM_Vec3 localPosition)
    Create a LocalCoordinatesSite using weighted averages to define the coordinate system.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Destroy the virtual site.
    edu.uiowa.jopenmm.OpenMM_Vec3
    Get the position of the virtual site in the local coordinate system.
    void
    getOriginWeights(com.sun.jna.ptr.PointerByReference weights)
    Get the weights used for computing the origin of the local coordinate system.
    void
    getXWeights(com.sun.jna.ptr.PointerByReference weights)
    Get the weights used for computing the x direction of the local coordinate system.
    void
    getYWeights(com.sun.jna.ptr.PointerByReference weights)
    Get the weights used for computing the y direction of the local coordinate system.

    Methods inherited from class ffx.openmm.VirtualSite

    getNumParticles, getParticle, getPointer

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LocalCoordinatesSite

      public LocalCoordinatesSite(com.sun.jna.ptr.PointerByReference originWeights, com.sun.jna.ptr.PointerByReference xWeights, com.sun.jna.ptr.PointerByReference yWeights, com.sun.jna.ptr.PointerByReference zWeights, edu.uiowa.jopenmm.OpenMM_Vec3 localPosition)
      Create a LocalCoordinatesSite using weighted averages to define the coordinate system.
      Parameters:
      originWeights - The weights for computing the origin as a weighted average of particle positions.
      xWeights - The weights for computing the x direction as a weighted average of particle positions.
      yWeights - The weights for computing the y direction as a weighted average of particle positions.
      zWeights - The weights for computing the z direction as a weighted average of particle positions.
      localPosition - The position of the virtual site in the local coordinate system.
    • LocalCoordinatesSite

      public LocalCoordinatesSite(int particle1, int particle2, int particle3, edu.uiowa.jopenmm.OpenMM_Vec3 originWeights, edu.uiowa.jopenmm.OpenMM_Vec3 xdir, edu.uiowa.jopenmm.OpenMM_Vec3 ydir, edu.uiowa.jopenmm.OpenMM_Vec3 localPosition)
      Create a LocalCoordinatesSite using specific particles and vectors to define the coordinate system.
      Parameters:
      particle1 - The index of the first particle.
      particle2 - The index of the second particle.
      particle3 - The index of the third particle.
      originWeights - The weights for the origin calculation.
      xdir - The x direction vector.
      ydir - The y direction vector.
      localPosition - The position of the virtual site in the local coordinate system.
  • Method Details

    • destroy

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

      public edu.uiowa.jopenmm.OpenMM_Vec3 getLocalPosition()
      Get the position of the virtual site in the local coordinate system.
      Returns:
      The local position of the virtual site.
    • getOriginWeights

      public void getOriginWeights(com.sun.jna.ptr.PointerByReference weights)
      Get the weights used for computing the origin of the local coordinate system.
      Parameters:
      weights - The weights for the origin calculation (output).
    • getXWeights

      public void getXWeights(com.sun.jna.ptr.PointerByReference weights)
      Get the weights used for computing the x direction of the local coordinate system.
      Parameters:
      weights - The weights for the x direction calculation (output).
    • getYWeights

      public void getYWeights(com.sun.jna.ptr.PointerByReference weights)
      Get the weights used for computing the y direction of the local coordinate system.
      Parameters:
      weights - The weights for the y direction calculation (output).