GROUP
 This is part of the generic module

Define a group of atoms so that a particular list of atoms can be referenced with a single label in definitions of CVs or virtual atoms.

Atoms can be listed as comma separated numbers (i.e. 1,2,3,10,45,7,9,..) , simple positive ranges (i.e. 20-40), ranges with a stride either positive or negative (i.e. 20-40:2 or 80-50:-2) or as combinations of all the former methods (1,2,4,5,10-20,21-40:2,80-50:-2).

Moreover, lists can be imported from ndx files (GROMACS format). Use NDX_FILE to set the name of the index file and NDX_GROUP to set the name of the group to be imported (default is first one).

It is also possible to remove atoms from a list and or sort them using keywords REMOVE, SORT, and UNIQUE. The flow is the following:

• If ATOMS is present take the ordered list of atoms from the ATOMS keyword.
• If NDX_FILE is present append the list from the the gromacs group.
• If REMOVE is present remove the first occurence of each of these atoms from the list. If one tries to remove an atom that was not listed plumed adds a notice in the output.
• If SORT is present resulting list is sorted.
• If UNIQUE is present the resuling list is sorted and duplicate elements are removed.

Notice that this command just creates a shortcut, and does not imply any real calculation. It is just convenient to better organize input files. Might be used in combination with the INCLUDE command so as to store long group definitions in a separate file.

The atoms involved can be specified using
 ATOMS the numerical indexes for the set of atoms in the group. For more information on how to specify lists of atoms see Groups and Virtual Atoms REMOVE remove these atoms from the list. For more information on how to specify lists of atoms see Groups and Virtual Atoms
Options
 SORT ( default=off ) sort the resulting list UNIQUE ( default=off ) sort atoms and remove duplicated ones
 NDX_FILE the name of index file (gromacs syntax) NDX_GROUP the name of the group to be imported (gromacs syntax) - first group found is used by default
Examples

This command create a group of atoms containing atoms 1,4,7,11 and 14 (labeled 'o'), and another containing atoms 2,3,5,6,8,9,12,13 (labeled 'h'):

o: GROUP ATOMS=1,4,7,11,14
h: GROUP ATOMS=2,3,5,6,8,9,12,13
# compute the coordination among the two groups
c: COORDINATION GROUPA=o GROUPB=h R_0=0.3
# same could have been obtained without GROUP, just writing:
# c: COORDINATION GROUPA=1,4,7,11,14 GROUPB=2,3,5,6,8,9,12,13

# print the coordination on file 'colvar'
PRINT ARG=c FILE=colvar


Groups can be conveniently stored in a separate file. E.g. one could create a file named 'groups.dat' which reads

o: GROUP ATOMS=1,4,7,11,14
h: GROUP ATOMS=2,3,5,6,8,9,12,13


and then include it in the main 'plumed.dat' file

INCLUDE FILE=groups.dat
# compute the coordination among the two groups
c: COORDINATION GROUPA=o GROUPB=h R_0=0.3
# print the coordination on file 'colvar'
PRINT ARG=c FILE=colvar


(see also INCLUDE, COORDINATION, and PRINT). The groups.dat file could be very long and include lists of thousand atoms without cluttering the main plumed.dat file.

A GROMACS index file can also be imported

# import group named 'protein' from file index.ndx
pro: GROUP NDX_FILE=index.ndx NDX_GROUP=protein
# dump all the atoms of the protein on a trajectory file
DUMPATOMS ATOMS=pro FILE=traj.gro


# take one atom every three