PRINT
This is part of the generic module

Print quantities to a file.

This directive can be used multiple times in the input so you can print files with different strides or print different quantities to different files. You can control the buffering of output using the FLUSH keyword. Output file is either appended or backed up depending on the presence of the RESTART action. A per-action RESTART keyword can be used as well.

Notice that printing happens in the so-called "update" phase. This implies that printing is affected by the presence of UPDATE_IF actions. In addition, one might decide to start and stop printing at preassigned values of time using the UPDATE_FROM and UPDATE_UNTIL keywords. Keep into account that even on steps when the action is not updated (and thus the file is not printed) the argument will be activated. In other words, if you use UPDATE_FROM to start printing at a given time, the collective variables this PRINT statement depends on will be computed also before that time.

Examples

The following input instructs plumed to print the distance between atoms 3 and 5 on a file called COLVAR every 10 steps, and the distance and total energy on a file called COLVAR_ALL every 1000 steps.

Click on the labels of the actions for more information on what each action computes
tested on master
# compute distance:
distance: DISTANCE 
ATOMS
the pair of atom that we are calculating the distance between.
=2,5 # compute total energy (potential) energy: ENERGY # print distance on a file PRINT
ARG
compulsory keyword the labels of the values that you would like to print to the file
=distance
STRIDE
compulsory keyword ( default=1 ) the frequency with which the quantities of interest should be output
=10
FILE
the name of the file on which to output these quantities
=COLVAR # print both variables on another file PRINT
ARG
compulsory keyword the labels of the values that you would like to print to the file
=distance,energy
STRIDE
compulsory keyword ( default=1 ) the frequency with which the quantities of interest should be output
=1000
FILE
the name of the file on which to output these quantities
=COLVAR_ALL

Notice that DISTANCE and ENERGY are computed respectively every 10 and 1000 steps, that is only when required.

Glossary of keywords and components
Compulsory keywords
ARG the labels of the values that you would like to print to the file
STRIDE ( default=1 ) the frequency with which the quantities of interest should be output
Options
FILE the name of the file on which to output these quantities
FMT the format that should be used to output real numbers
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