1c97ea602c6df8e894a90ec7360674e96dd9bca0
[alexxy/gromacs.git] / docs / reference-manual / algorithms / group-concept.rst
1 .. _groupconcept:
2
3 The group concept
4 -----------------
5
6 The |Gromacs| MD and analysis programs use user-defined *groups* of atoms
7 to perform certain actions on. The maximum number of groups is 256, but
8 each atom can only belong to six different groups, one each of the
9 following:
10
11 temperature-coupling group
12     The temperature coupling parameters (reference temperature, time
13     constant, number of degrees of freedom, see :ref:`update`) can be
14     defined for each T-coupling group separately. For example, in a
15     solvated macromolecule the solvent (that tends to generate more
16     heating by force and integration errors) can be coupled with a
17     shorter time constant to a bath than is a macromolecule, or a
18     surface can be kept cooler than an adsorbing molecule. Many
19     different T-coupling groups may be defined. See also center of mass
20     groups below.
21
22 freeze group
23
24     Atoms that belong to a freeze group are kept stationary in the
25     dynamics. This is useful during equilibration, *e.g.* to avoid badly
26     placed solvent molecules giving unreasonable kicks to protein atoms,
27     although the same effect can also be obtained by putting a
28     restraining potential on the atoms that must be protected. The
29     freeze option can be used, if desired, on just one or two
30     coordinates of an atom, thereby freezing the atoms in a plane or on
31     a line. When an atom is partially frozen, constraints will still be
32     able to move it, even in a frozen direction. A fully frozen atom can
33     not be moved by constraints. Many freeze groups can be defined.
34     Frozen coordinates are unaffected by pressure scaling; in some cases
35     this can produce unwanted results, particularly when constraints are
36     also used (in this case you will get very large pressures).
37     Accordingly, it is recommended to avoid combining freeze groups with
38     constraints and pressure coupling. For the sake of equilibration it
39     could suffice to start with freezing in a constant volume
40     simulation, and afterward use position restraints in conjunction
41     with constant pressure.
42
43 energy-monitor group
44
45     Mutual interactions between all energy-monitor groups are compiled
46     during the simulation. This is done separately for Lennard-Jones and
47     Coulomb terms. In principle up to 256 groups could be defined, but
48     that would lead to 256\ :math:`\times`\ 256 items! Better use this
49     concept sparingly.
50
51     All non-bonded interactions between pairs of energy-monitor groups
52     can be excluded (see details in the User Guide). Pairs of particles
53     from excluded pairs of energy-monitor groups are not put into the
54     pair list. This can result in a significant speedup for simulations
55     where interactions within or between parts of the system are not
56     required.
57
58 center of mass group
59
60     In |Gromacs|, the center of mass (COM) motion can be removed, for
61     either the complete system or for groups of atoms. The latter is
62     useful, *e.g.* for systems where there is limited friction (*e.g.*
63     gas systems) to prevent center of mass motion to occur. It makes
64     sense to use the same groups for temperature coupling and center of
65     mass motion removal.
66
67 Compressed position output group
68
69     In order to further reduce the size of the compressed trajectory
70     file (:ref:`xtc` or :ref:`tng`), it is possible to
71     store only a subset of all particles. All x-compression groups that
72     are specified are saved, the rest are not. If no such groups are
73     specified, than all atoms are saved to the compressed trajectory
74     file.
75
76 The use of groups in |Gromacs| tools is described in
77 sec. :ref:`usinggroups`.