Package ffx.numerics.multipole
Class QIFrame
java.lang.Object
ffx.numerics.multipole.QIFrame
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Rotate the induced dipoles components.void
Rotate the permanent multipole.void
Rotate the permanent multipole and induced dipole.void
setAndRotate
(double[] r, PolarizableMultipole mI, PolarizableMultipole mK) Update the QIFrame rotation matrix and rotate the multipoles.void
setAndRotate
(double dx, double dy, double dz, PolarizableMultipole mI, PolarizableMultipole mK) Update the QIFrame rotation matrix and rotate the multipoles.void
setQIVector
(double[] r) Update the QIFrame rotation matrix.final void
setQIVector
(double dx, double dy, double dz) Update the QIFrame rotation matrix.void
toGlobal
(double[] v) Rotate a vector in the QI frame into the global frame.
-
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
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
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
public void toGlobal(double[] v) Rotate a vector in the QI frame into the global frame.- Parameters:
v
- The vector to rotate (in-place).
-