DUMPATOMS
This is part of the generic module

Dump selected atoms on a file.

This command can be used to output the positions of a particular set of atoms. The atoms required are output in a xyz or gro formatted file. If PLUMED has been compiled with xdrfile support, then also xtc and trr files can be written. To this aim one should install xdrfile library (http://www.gromacs.org/Developer_Zone/Programming_Guide/XTC_Library). If the xdrfile library is installed properly the PLUMED configure script should be able to detect it and enable it. The type of file is automatically detected from the file extension, but can be also enforced with TYPE. Importantly, if your input file contains actions that edit the atoms position (e.g. WHOLEMOLECULES) and the DUMPATOMS command appears after this instruction, then the edited atom positions are output. You can control the buffering of output using the FLUSH keyword on a separate line.

Units of the printed file can be controlled with the UNITS keyword. By default PLUMED units as controlled in the UNITS command are used, but one can override it e.g. with UNITS=A. Notice that gro/xtc/trr files can only contain coordinates in nm.

Examples

The following input instructs plumed to print out the positions of atoms 1-10 together with the position of the center of mass of atoms 11-20 every 10 steps to a file called file.xyz.

Click on the labels of the actions for more information on what each action computes
tested on master
c1: COM 
ATOMS
the list of atoms which are involved the virtual atom's definition.
=11-20

Notice that the coordinates in the xyz file will be expressed in nm, since these are the defaults units in PLUMED. If you want the xyz file to be expressed in A, you should use the following input

Click on the labels of the actions for more information on what each action computes
tested on master
c1: COM 
ATOMS
the list of atoms which are involved the virtual atom's definition.
=11-20

As an alternative, you might want to set all the length used by PLUMED to Angstrom using the UNITS action. However, this latter choice will affect all your input and output.

The following input is very similar but dumps a .gro (gromacs) file, which also contains atom and residue names.

Click on the labels of the actions for more information on what each action computes
tested on master
#SETTINGS MOLFILE=regtest/basic/rt32/helix.pdb
# this is required to have proper atom names:

The file.gro will contain coordinates expressed in nm, since this is the convention for gro files.

In case you have compiled PLUMED with xdrfile library, you might even write xtc or trr files as follows

Click on the labels of the actions for more information on what each action computes
tested on master
c1: COM 
ATOMS
the list of atoms which are involved the virtual atom's definition.
=11-20

Notice that xtc files are significantly smaller than gro and xyz files.

Finally, consider that gro and xtc file store coordinates with limited precision set by the PRECISION keyword. Default value is 3, which means "3 digits after dot" in nm (1/1000 of a nm). The following will write a larger xtc file with high resolution coordinates:

Click on the labels of the actions for more information on what each action computes
tested on master
c1: COM 
ATOMS
the list of atoms which are involved the virtual atom's definition.
=11-20
Glossary of keywords and components
The atoms involved can be specified using
ATOMS the atom indices whose positions you would like to print out. For more information on how to specify lists of atoms see Groups and Virtual Atoms
Compulsory keywords
STRIDE ( default=1 ) the frequency with which the atoms should be output
FILE file on which to output coordinates; extension is automatically detected
UNITS ( default=PLUMED ) the units in which to print out the coordinates. PLUMED means internal PLUMED units
Options
ARG the input for this action is the scalar output from one or more other actions. The particular scalars that you will use are referenced using the label of the action. If the label appears on its own then it is assumed that the Action calculates a single scalar value. The value of this scalar is thus used as the input to this new action. If * or *.* appears the scalars calculated by all the proceeding actions in the input file are taken. Some actions have multi-component outputs and each component of the output has a specific label. For example a DISTANCE action labelled dist may have three components x, y and z. To take just the x component you should use dist.x, if you wish to take all three components then use dist.*.More information on the referencing of Actions can be found in the section of the manual on the PLUMED Getting Started. Scalar values can also be referenced using POSIX regular expressions as detailed in the section on Regular Expressions. To use this feature you you must compile PLUMED with the appropriate flag.. You can use multiple instances of this keyword i.e. ARG1, ARG2, ARG3...
PRECISION The number of digits in trajectory file
TYPE file type, either xyz, gro, xtc, or trr, can override an automatically detected file extension
LESS_THAN_OR_EQUAL when printing with arguments that are vectors only print components of vectors have a value less than or equal to this value
GREATER_THAN_OR_EQUAL when printing with arguments that are vectors only print components of vectors have a value greater than or equal to this value
RESTART allows per-action setting of restart (YES/NO/AUTO)
UPDATE_FROM Only update this action from this time
UPDATE_UNTIL Only update this action until this time