Transformation contains procedures for performing various coordinate manipulations.
This module is discussed in chapter 3 of the book A Practical Introduction to the Simulation of Molecular Systems.
Most of the procedures in this module take as arguments a real coordinate array, that is essential, and an optional real weights array. The coordinate array is a two-dimensional array and must be of the form COORDINATES(1:3,:). The weights array is one-dimensional and must be of the same length as the second dimension of the coordinates array. The values in the array WEIGHTS are used to weight the coordinates in COORDINATES before calculation of the appropriate transformation. If WEIGHTS is not present, equal weights are used for all points.
Module | Variables |
---|---|
DEFINITIONS | DP |
DIAGONALIZATION | SYMMETRIC_UPPER |
IO_UNITS | OUTPUT |
LINEAR_ALGEBRA | DETERMINANT |
None.
There are two public functions and six public subroutines in this module.
Function | Type | Purpose |
---|---|---|
CENTER | Real(1:3) | Calculate the center of a group of atoms. |
INERTIA_MATRIX | Real(1:6) | Calculate the inertia matrix for a group of atoms. |
Subroutine | Purpose |
---|---|
MOMENTS_OF_INERTIA | Calculate the moments and axes of inertia for a group of atoms. |
MOMENTS_OF_INERTIA_AT_CENTER | Calculate the moments and axes of inertia for a group of atoms after translation to their center. |
ROTATE | Rotate a group of atoms. |
TRANSLATE | Translate a group of atoms. |
TRANSLATE_TO_CENTER | Translate a group of atoms to their center. |
TO_PRINCIPAL_AXES | Perform a principal axis transformation. |
Argument | Type | Intent | Optional | Purpose |
---|---|---|---|---|
COORDINATES | Real(:,:) | In | No | The coordinates of the atoms. |
WEIGHTS | Real(:) | In | Yes | Atom weights. |
Argument | Type | Intent | Optional | Purpose |
---|---|---|---|---|
COORDINATES | Real(:,:) | In | No | The coordinates of the atoms. |
WEIGHTS | Real(:) | In | Yes | Atom weights. |
Argument | Type | Intent | Optional | Purpose |
---|---|---|---|---|
COORDINATES | Real(:,:) | In | No | The coordinates of the atoms. |
MOMENTS | Real(1:3) | Out | No | The moments of inertia. |
AXES | Real(1:3,1:3) | Out | Yes | The axes of inertia. |
WEIGHTS | Real(:) | In | Yes | Atom weights. |
Argument | Type | Intent | Optional | Purpose |
---|---|---|---|---|
COORDINATES | Real(:,:) | InOut | No | The coordinates of the atoms. |
ROTATION | Real(1:3,1:3) | In | No | The rotation matrix. |
Argument | Type | Intent | Optional | Purpose |
---|---|---|---|---|
COORDINATES | Real(:,:) | InOut | No | The coordinates of the atoms. |
TRANSLATION | Real(1:3) | In | No | The translation vector. |
Argument | Type | Intent | Optional | Purpose |
---|---|---|---|---|
COORDINATES | Real(:,:) | InOut | No | The coordinates of the atoms. |
WEIGHTS | Real(:) | In | Yes | Atom weights. |
Argument | Type | Intent | Optional | Purpose |
---|---|---|---|---|
COORDINATES | Real(:,:) | InOut | No | The coordinates of the atoms. |
WEIGHTS | Real(:) | In | Yes | Atom weights. |
Logical | In | Yes | A print flag. |
Stable.