Defining groups

Gromacs knows about several standard groups that you can often select when you work with the Gromacs analysis tools. The standard groups are:

Group Description
System all atoms in the system
Protein all protein atoms
C-alpha Cα
Backbone protein backbone atoms: N, Cα and C
MainChain protein backbone atoms: N, Cα, C and O, including oxygens in C-terminus
MainChain+Cb protein main chain atoms including Cβ
MainChain+H protein main chain atoms including backbone amide hydrogens and hydrogens of the N-terminus
SideChain protein side chain, that is all protein atoms except N, Cα, C and O, backbone amide H and H at the N-terminus, O at the C-terminus
Prot-Masses needed in connection with virtual sites when one wants to excludes dummy masses (which are included in the "Protein" group)
Non-Protein all non-protein atoms
DNA all DNA atoms
RNA all RNA atoms
Water water molecues (names like SOL, WAT, HOH, etc.), see "residuestypes.dat" for full listing
non-Water anything not covered by the "Water" group
Ion any name maching an "Ion" entry in "residuestypes.dat"
Water_and_Ions combination of the "Water" and "Ions" groups
molecule for all residues/molecules which are not recognized as proteinm DNA or RNA, one group per residue/molecule is generated (for example: four HEME groups are generated if one simulates hemoglobin)
Other all atoms which are neither protein, DNA, nor RNA

Groups that do not belong to the default groups can be generated using make_ndx. For instance, if we are interested in how the distance between the Cα atoms of the N- and C-terminal residues evolves with time, Gromacs needs to now the indices of these atoms in the trajectory. You can create the corresponding group with

gmx make_ndx -f md_protein.tpr -o NC_distance.ndx

A selection text will be required from you. The selection language is quite cryptic, but simple things are simple to achieve. We want the Cα atoms of the N- and C-terminal residues. These residues have the indices 1 and 18. We can create a new group containing these atoms by selecting the intersection of the group that contains only Cα atoms (group 3) with the group that contains only atoms of residues 1 and 18. You must enter:

3 & ri 1 18

and as single groups:

3 & r 1

3 & r 18

Then type enter again to list the defined groups. The new group will appear at the end. You can write everything to the previously specified file NC_distance.ndx by entering q.

ri refers to the "residue index" and the tool will take the corresponding residue in order, while r corresponds to the residue numbering in the input file. With del one can delete groups, e.g., del 0-9 deletes the default groups 1-9, only leaving the newly defined groups in the example above. The resulting file NC_distance.ndx is a text file containing the groups. The name of each group is written between square brackets, followed by the atom numbers (which can be spread out over several lines) belonging to the group in question. All following gmx analysis commands can be invoked together with the -n flag and a user supplied index file, such as NC_distance.ndx. Without this flag, only the standard groups given above are available.