1 Dihedral principal component analysis
2 -------------------------------------
4 | :ref:`gmx angle <gmx angle>`, :ref:`gmx covar <gmx covar>`,
5 :ref:`gmx anaeig <gmx anaeig>`
6 | Principal component analysis can be performed in dihedral
7 space \ :ref:`172 <refMu2005a>` using |Gromacs|. You start by defining the
8 dihedral angles of interest in an index file, either using
9 :ref:`gmx mk_angndx <gmx mk_angndx>` or otherwise. Then you use the
10 :ref:`gmx angle <gmx angle>` program with the ``-or`` flag to
11 produce a new :ref:`trr` file containing the cosine and sine
12 of each dihedral angle in two coordinates, respectively. That is, in
13 the :ref:`trr` file you will have a series of numbers
14 corresponding to: cos(\ :math:`\phi_1`), sin(\ :math:`\phi_1`),
15 cos(\ :math:`\phi_2`), sin(\ :math:`\phi_2`), ...,
16 cos(\ :math:`\phi_n`), sin(\ :math:`\phi_n`), and the array is padded
17 with zeros, if necessary. Then you can use this :ref:`trr`
18 file as input for the :ref:`gmx covar <gmx covar>` program and perform
19 principal component analysis as usual. For this to work you will need
20 to generate a reference file (:ref:`tpr`,
21 :ref:`gro`, :ref:`pdb` etc.) containing the same
22 number of “atoms” as the new :ref:`trr` file, that is for
23 :math:`n` dihedrals you need 2\ :math:`n`/3 atoms (rounded up if not
24 an integer number). You should use the ``-nofit`` option
25 for :ref:`gmx covar <gmx covar>` since the coordinates in the dummy
26 reference file do not correspond in any way to the information in the
27 :ref:`trr` file. Analysis of the results is done using
28 :ref:`gmx anaeig <gmx anaeig>`.