Class QIFrame

java.lang.Object
ffx.numerics.multipole.QIFrame

public class QIFrame extends Object
The QIFrame class defines a quasi-internal frame between two atoms.

The Z-axis of the QI frame is defined as the vector between the two atoms. The X- and Y-axes are then defined to create a right-handed coordinate system.

A rotation matrix from the global frame to the QI frame is constructed, and vice versa. Using the rotation matrices, methods are provided to rotate vectors and multipoles between the two frames.

Since:
1.0
Author:
Michael J. Schnieders
  • Constructor Details

    • QIFrame

      public QIFrame()
      QIFrame constructor

      (dx = 0, dy = 0, dz = 1).

    • QIFrame

      public QIFrame(double dx, double dy, double dz)
      QIFrame constructor.
      Parameters:
      dx - Separation along the x-axis.
      dy - Separation along the y-axis.
      dz - Separation along the z-axis.
    • QIFrame

      public QIFrame(double[] r)
      QIFrame constructor.
      Parameters:
      r - Separation along each axis.
  • Method Details

    • setQIVector

      public void setQIVector(double[] r)
      Update the QIFrame rotation matrix.
      Parameters:
      r - Separation along each axis.
    • setQIVector

      public final void setQIVector(double dx, double dy, double dz)
      Update the QIFrame rotation matrix.
      Parameters:
      dx - Separation along the x-axis.
      dy - Separation along the y-axis.
      dz - Separation along the z-axis.
    • setAndRotate

      public void setAndRotate(double[] r, PolarizableMultipole mI, PolarizableMultipole mK)
      Update the QIFrame rotation matrix and rotate the multipoles.
      Parameters:
      r - Separation along each axis.
      mI - PolarizableMultipole for site I.
      mK - PolarizableMultipole for site K.
    • setAndRotate

      public void setAndRotate(double dx, double dy, double dz, PolarizableMultipole mI, PolarizableMultipole mK)
      Update the QIFrame rotation matrix and rotate the multipoles.
      Parameters:
      dx - Separation along the x-axis.
      dy - Separation along the y-axis.
      dz - Separation along the z-axis.
      mI - PolarizableMultipole for site I.
      mK - PolarizableMultipole for site K.
    • rotatePolarizableMultipole

      public void rotatePolarizableMultipole(PolarizableMultipole m)
      Rotate the permanent multipole and induced dipole.
      Parameters:
      m - PolarizableMultipole to rotate.
    • rotatePermanentMultipole

      public void rotatePermanentMultipole(PolarizableMultipole m)
      Rotate the permanent multipole.
      Parameters:
      m - PolarizableMultipole to rotate.
    • rotateInducedDipoles

      public void rotateInducedDipoles(PolarizableMultipole m)
      Rotate the induced dipoles components.
      Parameters:
      m - PolarizableMultipole to rotate.
    • toGlobal

      public void toGlobal(double[] v)
      Rotate a vector in the QI frame into the global frame.
      Parameters:
      v - The vector to rotate (in-place).