Class QIFrameSIMD

java.lang.Object
ffx.numerics.multipole.QIFrameSIMD

public class QIFrameSIMD 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

    • QIFrameSIMD

      public QIFrameSIMD()
      QIFrame constructor

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

    • QIFrameSIMD

      public QIFrameSIMD(DoubleVector dx, DoubleVector dy, DoubleVector dz)
      QIFrame constructor.
    • QIFrameSIMD

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

    • setQIVector

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

      public final void setQIVector(DoubleVector dx, DoubleVector dy, DoubleVector 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.
    • dotVec

      public static DoubleVector dotVec(DoubleVector[] a, DoubleVector[] b)
      Compute the dot product of two vectors.
      Parameters:
      a - The first vector.
      b - The second vector.
      Returns:
      The dot product of the two vectors.
    • scaleVec

      public static DoubleVector[] scaleVec(DoubleVector[] a, DoubleVector scale, DoubleVector[] ret)
      Scale a vector by a scalar.
      Parameters:
      a - The vector to scale.
      scale - The scalar to multiply the vector by.
      ret - The vector to store the result in.
      Returns:
      The scaled vector.
    • subVec

      public static DoubleVector[] subVec(DoubleVector[] a, DoubleVector[] b, DoubleVector[] ret)
      Subtract two vectors.
      Parameters:
      a - The first vector.
      b - The second vector.
      ret - The vector to store the result in.
      Returns:
      The difference of the two vectors.
    • normalizeVec

      public static DoubleVector[] normalizeVec(DoubleVector[] n, DoubleVector[] ret)
      Normalize a vector.
      Parameters:
      n - The vector to normalize.
      ret - The vector to store the result in.
      Returns:
      The normalized vector.
    • setAndRotate

      public void setAndRotate(DoubleVector[] r, PolarizableMultipoleSIMD mI, PolarizableMultipoleSIMD 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(DoubleVector dx, DoubleVector dy, DoubleVector dz, PolarizableMultipoleSIMD mI, PolarizableMultipoleSIMD 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(PolarizableMultipoleSIMD m)
      Rotate the permanent multipole and induced dipole.
      Parameters:
      m - PolarizableMultipole to rotate.
    • rotatePermanentMultipole

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

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

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