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.
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.
# compute distance: distance: DISTANCEATOMS=2,5 # compute total energy (potential) energy: ENERGY # print distance on a file PRINTthe pair of atom that we are calculating the distance between.ARG=distancecompulsory keyword the labels of the values that you would like to print to the fileSTRIDE=10compulsory keyword ( default=1 ) the frequency with which the quantities of interest should be outputFILE=COLVAR # print both variables on another file PRINTthe name of the file on which to output these quantitiesARG=distance,energycompulsory keyword the labels of the values that you would like to print to the fileSTRIDE=1000compulsory keyword ( default=1 ) the frequency with which the quantities of interest should be outputFILE=COLVAR_ALLthe name of the file on which to output these quantities
Notice that DISTANCE and ENERGY are computed respectively every 10 and 1000 steps, that is only when required.
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 |
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 |