Reorganize files for reference manual
[alexxy/gromacs.git] / docs / reference-manual / analysis / bond-angle-dihedral.rst
1 .. _bad:
2
3 Bonds/distances, angles and dihedrals
4 -------------------------------------
5
6 | :ref:`gmx distance <gmx distance>`, :ref:`gmx angle <gmx angle>`, 
7   :ref:`gmx gangle <gmx gangle>`
8 | To monitor specific *bonds* in your modules, or more generally
9   distances between points, the program 
10   :ref:`gmx distance <gmx distance>` can calculate distances as a
11   function of time, as well as the distribution of the distance. With a
12   traditional index file, the groups should consist of pairs of atom
13   numbers, for example:
14
15 ::
16
17     [ bonds_1 ]
18      1     2
19      3     4
20      9    10
21
22     [ bonds_2 ]
23     12    13
24
25 Selections are also supported, with first two positions defining the
26 first distance, second pair of positions defining the second distance
27 and so on. You can calculate the distances between CA and CB atoms in
28 all your residues (assuming that every residue either has both atoms, or
29 neither) using a selection such as:
30
31 ::
32
33     name CA CB
34
35 The selections also allow more generic distances to be computed. For
36 example, to compute the distances between centers of mass of two
37 residues, you can use:
38
39 ::
40
41     com of resname AAA plus com of resname BBB
42
43 The program :ref:`gmx angle <gmx angle>`
44 calculates the distribution of *angles* and *dihedrals* in time. It also
45 gives the average angle or dihedral. The index file consists of triplets
46 or quadruples of atom numbers:
47
48 ::
49
50     [ angles ]
51      1     2     3
52      2     3     4
53      3     4     5
54
55     [ dihedrals ]
56      1     2     3     4
57      2     3     5     5
58
59 For the dihedral angles you can use either the “biochemical convention”
60 (:math:`\phi = 0 \equiv cis`) or “polymer convention”
61 (:math:`\phi = 0 \equiv trans`), see
62 :numref:`Fig. %s <fig-dihdef>`.
63
64 .. _fig-dihdef:
65
66 .. figure:: plots/dih-def.*
67     :width: 5.00000cm
68
69     Dihedral conventions: A. “Biochemical convention”. B. “Polymer
70     convention”.
71
72 The program :ref:`gmx gangle <gmx gangle>`
73 provides a selection-enabled version to compute angles. This tool can
74 also compute angles and dihedrals, but does not support all the options
75 of :ref:`gmx angle <gmx angle>`, such as autocorrelation or other time
76 series analyses. In addition, it supports angles between two vectors, a
77 vector and a plane, two planes (defined by 2 or 3 points, respectively),
78 a vector/plane and the :math:`z` axis, or a vector/plane and the normal
79 of a sphere (determined by a single position). Also the angle between a
80 vector/plane compared to its position in the first frame is supported.
81 For planes, :ref:`gmx gangle <gmx gangle>`
82 uses the normal vector perpendicular to the plane. See
83 :numref:`Fig. %s <fig-sgangle>` A, B, C) for the definitions.
84
85 .. _fig-sgangle:
86
87 .. figure:: plots/sgangle.*
88     :width: 3.50000cm
89
90     Angle options of :ref:`gmx gangle <gmx gangle>`: A. Angle between two
91     vectors. B. Angle between two planes. C. Angle between a vector and the
92     :math:`z` axis. D. Angle between a vector and the normal of a sphere.
93     Also other combinations are supported: planes and vectors can be used
94     interchangeably.
95
96