Package ffx.numerics.multipole
Class QIFrameSIMD
java.lang.Object
ffx.numerics.multipole.QIFrameSIMD
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 Summary
ConstructorDescriptionQIFrame constructorQIFrameSIMD
(DoubleVector[] r) QIFrame constructor.QIFrameSIMD
(DoubleVector dx, DoubleVector dy, DoubleVector dz) QIFrame constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic DoubleVector
dotVec
(DoubleVector[] a, DoubleVector[] b) Compute the dot product of two vectors.static DoubleVector[]
normalizeVec
(DoubleVector[] n, DoubleVector[] ret) Normalize a vector.void
Rotate the induced dipoles components.void
Rotate the permanent multipole.void
Rotate the permanent multipole and induced dipole.static DoubleVector[]
scaleVec
(DoubleVector[] a, DoubleVector scale, DoubleVector[] ret) Scale a vector by a scalar.void
Update the QIFrame rotation matrix and rotate the multipoles.void
setAndRotate
(DoubleVector dx, DoubleVector dy, DoubleVector dz, PolarizableMultipoleSIMD mI, PolarizableMultipoleSIMD mK) Update the QIFrame rotation matrix and rotate the multipoles.void
setQIVector
(DoubleVector[] r) Update the QIFrame rotation matrix.final void
setQIVector
(DoubleVector dx, DoubleVector dy, DoubleVector dz) Update the QIFrame rotation matrix.static DoubleVector[]
subVec
(DoubleVector[] a, DoubleVector[] b, DoubleVector[] ret) Subtract two vectors.void
toGlobal
(DoubleVector[] v) Rotate a vector in the QI frame into the global frame.
-
Constructor Details
-
QIFrameSIMD
public QIFrameSIMD()QIFrame constructor(dx = 0, dy = 0, dz = 1).
-
QIFrameSIMD
QIFrame constructor. -
QIFrameSIMD
QIFrame constructor.- Parameters:
r
- Separation along each axis.
-
-
Method Details
-
setQIVector
Update the QIFrame rotation matrix.- Parameters:
r
- Separation along each axis.
-
setQIVector
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
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
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
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
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
Rotate the permanent multipole and induced dipole.- Parameters:
m
- PolarizableMultipole to rotate.
-
rotatePermanentMultipole
Rotate the permanent multipole.- Parameters:
m
- PolarizableMultipole to rotate.
-
rotateInducedDipoles
Rotate the induced dipoles components.- Parameters:
m
- PolarizableMultipole to rotate.
-
toGlobal
Rotate a vector in the QI frame into the global frame.- Parameters:
v
- The vector to rotate (in-place).
-