HISTOGRAM
 This is part of the analysis module

Calculate the probability density as a function of a few CVs either using kernel density estimation, or a discrete histogram estimation.

In case a kernel density estimation is used the probability density is estimated as a continuos function on the grid with a BANDWIDTH defined by the user. In this case the normalisation is such that the INTEGRAL over the grid is 1. In case a discrete density estimation is used the probabilty density is estimated as a discrete function on the grid. In this case the normalisation is such that the SUM of over the grid is 1.

Additional material and examples can be also found in the tutorial Belfast tutorial: Analyzing CVs.

Compulsory keywords
 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 proceding 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 componets 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. STRIDE ( default=1 ) the frequency with which data should be stored for analysis RUN the frequency with which to run the analysis algorithm. This is not required if you specify USE_ALL_DATA GRID_MIN the lower bounds for the grid GRID_MAX the upper bounds for the grid KERNEL ( default=gaussian ) the kernel function you are using. Use discrete/DISCRETE if you want to accumulate a discrete histogram. More details on the kernels available in plumed can be found in kernelfunctions. GRID_WFILE ( default=histogram ) the file on which to write the grid
Options
 USE_ALL_DATA ( default=off ) use the data from the entire trajectory to perform the analysis REWEIGHT_BIAS ( default=off ) reweight the data using all the biases acting on the dynamics. For more information see reweighting. WRITE_CHECKPOINT ( default=off ) write out a checkpoint so that the analysis can be restarted in a later run SERIAL ( default=off ) do the calculation in serial. Do not parallelize LOWMEM ( default=off ) lower the memory requirements FREE-ENERGY ( default=off ) Set to TRUE if you want a FREE ENERGY instead of a probabilty density (you need to set TEMP). NOMEMORY ( default=off ) analyse each block of data separately
 FMT the format that should be used in analysis output files TEMP the system temperature. This is required if you are reweighting or doing free energies. REWEIGHT_TEMP reweight data from a trajectory at one temperature and output the probability distribution at a second temperature. For more information see reweighting. This is not possible during postprocessing. GRID_BIN the number of bins for the grid GRID_SPACING the approximate grid spacing (to be used as an alternative or together with GRID_BIN) BANDWIDTH the bandwdith for kernel density estimation
Examples

The following input monitors two torsional angles during a simulation and outputs a continuos histogram as a function of them at the end of the simulation.

TORSION ATOMS=1,2,3,4 LABEL=r1
TORSION ATOMS=2,3,4,5 LABEL=r2
HISTOGRAM ...
ARG=r1,r2
USE_ALL_DATA
GRID_MIN=-3.14,-3.14
GRID_MAX=3.14,3.14
GRID_BIN=200,200
BANDWIDTH=0.05,0.05
GRID_WFILE=histo
... HISTOGRAM


The following input monitors two torsional angles during a simulation and outputs a discrete histogram as a function of them at the end of the simulation.

TORSION ATOMS=1,2,3,4 LABEL=r1
TORSION ATOMS=2,3,4,5 LABEL=r2
HISTOGRAM ...
ARG=r1,r2
USE_ALL_DATA
KERNEL=discrete
GRID_MIN=-3.14,-3.14
GRID_MAX=3.14,3.14
GRID_BIN=200,200
GRID_WFILE=histo
... HISTOGRAM


The following input monitors two torsional angles during a simulation and outputs the histogram accumulated thus far every 100000 steps.

TORSION ATOMS=1,2,3,4 LABEL=r1
TORSION ATOMS=2,3,4,5 LABEL=r2
HISTOGRAM ...
ARG=r1,r2
RUN=100000
GRID_MIN=-3.14,-3.14
GRID_MAX=3.14,3.14
GRID_BIN=200,200
BANDWIDTH=0.05,0.05
GRID_WFILE=histo
... HISTOGRAM


The following input monitors two torsional angles during a simulation and outputs a separate histogram for each 100000 steps worth of trajectory.

TORSION ATOMS=1,2,3,4 LABEL=r1
TORSION ATOMS=2,3,4,5 LABEL=r2
HISTOGRAM ...
ARG=r1,r2
RUN=100000 NOMEMORY
GRID_MIN=-3.14,-3.14
GRID_MAX=3.14,3.14
GRID_BIN=200,200
BANDWIDTH=0.05,0.05
GRID_WFILE=histo
... HISTOGRAM

Bug:
Option FREE-ENERGY without USE_ALL_DATA is not working properly. See #175.