principal

Calculate and optionally align system along principal axes.

principal [<mask>] [dorotation] [out <filename>] [name <dsname>]

[<mask>] Mask of atoms used to determine principal axes (default all).
[dorotation] Align coordinates along principal axes.
[out <filename>] Write resulting eigenvalues/eigenvectors to <filename>.
[name <dsname>] Data set name (3×3 matrices).

Data Sets Created (name keyword only):
<dsname>[evec] Eigenvectors (3×3 matrix, row-major).
<dsname>[eval] Eigenvalues (vector).

Determine principal axes of each frame determined by diagonalization of the inertial matrix from the coordinates of the specified atoms. At least one of dorotation, out, or name must be specified. The resulting eigenvectors are sorted from largest eigenvalue to smallest, and the corresponding axes labelled using the cpptraj convention of X > Y > Z (similar to ’vector principal’). If out is specified the eigenvectors and eigenvalues will be written for
each frame N with format:

<N> EIGENVALUES:   <EX> <EY> <EZ>
<N> EIGENVECTOR 0: <Xx> <Xy> <Xz>
<N> EIGENVECTOR 1: <Yx> <Yy> <Yz>
<N> EIGENVECTOR 2: <Zx> <Zy> <Zz>

NOTE: The eigenvector 3×3 matrix data set could subsequenetly be used e.g. with the rotate action.

Example: Align system (residues 1-76) along principle axes:

parm myparm.parm7
trajin protein.nc
principal :1-76 dorotation out principal.dat