MULTICOLVARDENS
This is part of the gridtools module

Evaluate the average value of a multicolvar on a grid.

This keyword allows one to construct a phase field representation for a symmetry function from an atomistic description. If each atom has an associated order parameter, \(\phi_i\) then a smooth phase field function \(\phi(r)\) can be computed using:

\[ \phi(\mathbf{r}) = \frac{\sum_i K(\mathbf{r}-\mathbf{r}_i) \phi_i }{ \sum_i K(\mathbf{r} - \mathbf{r}_i )} \]

where \(\mathbf{r}_i\) is the position of atom \(i\), the sums run over all the atoms input and \(K(\mathbf{r} - \mathbf{r}_i)\) is one of the kernelfunctions implemented in plumed. This action calculates the above function on a grid, which can then be used in the input to further actions.

Examples

The following example shows perhaps the simplest way in which this action can be used. The following input computes the density of atoms at each point on the grid and outputs this quantity to a file. In other words this input instructs plumed to calculate \(\rho(\mathbf{r}) = \sum_i K(\mathbf{r} - \mathbf{r}_i )\)

Click on the labels of the actions for more information on what each action computes
tested on master
dens: DENSITY 
SPECIES
compulsory keyword the atoms in the group
=1-100 grid: MULTICOLVARDENS
DATA
the multicolvar which you would like to calculate the density profile for
=dens
ORIGIN
compulsory keyword we will use the position of this atom as the origin
=1
DIR
compulsory keyword the direction in which to calculate the density profile
=xyz
NBINS
the number of bins to use in each direction (alternative to GRID_NBIN)
=100,100,100
BANDWIDTH
the bandwidths for kernel density esimtation
=0.05,0.05,0.05
STRIDE
compulsory keyword ( default=1 ) the frequency with which to accumulate the densities
=1 DUMPGRID
GRID
the grid you would like to print (can also use ARG for specifying what is being printed)
=grid
STRIDE
compulsory keyword ( default=0 ) the frequency with which the grid should be output to the file.
=500
FILE
compulsory keyword ( default=density ) the file on which to write the grid.
=density

In the above example density is added to the grid on every step. The PRINT_GRID instruction thus tells PLUMED to output the average density at each point on the grid every 500 steps of simulation. Notice that the that grid output on step 1000 is an average over all 1000 frames of the trajectory. If you would like to analyze these two blocks of data separately you must use the CLEAR flag.

This second example computes an order parameter (in this case FCCUBIC) and constructs a phase field model for this order parameter using the equation above.

Click on the labels of the actions for more information on what each action computes
tested on master