This is part of the multicolvar 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.
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 )\)
dens: DENSITY SPECIESthis keyword is used for colvars such as coordination number. =1-100 grid: MULTICOLVARDENS DATAcompulsory keyword the multicolvar which you would like to calculate the density profile for =dens ORIGINwe will use the position of this atom as the origin. =1 DIRcompulsory keyword the direction in which to calculate the density profile =xyz NBINSthe number of bins to use to represent the density profile =100,100,100 BANDWIDTHcompulsory keyword the bandwidths for kernel density estimation =0.05,0.05,0.05 STRIDEcompulsory keyword ( default=1 ) the frequency with which the data should be collected and added to the quantity being averaged =1 DUMPGRID GRIDcompulsory keyword the action that creates the grid you would like to output =grid STRIDEcompulsory keyword ( default=0 ) the frequency with which the grid should be output to the file. =500 FILEcompulsory 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.
fcc: FCCUBIC SPECIESthis keyword is used for colvars such as coordination number. =1-5184 SWITCHThis keyword is used if you want to employ an alternative to the continuous switching function defined above. ={CUBIC D_0=1.2 D_MAX=1.5} ALPHAcompulsory keyword ( default=3.0 ) The alpha parameter of the angular function =27 dens: MULTICOLVARDENS DATAcompulsory keyword the multicolvar which you would like to calculate the density profile for =fcc ORIGINwe will use the position of this atom as the origin. =1 DIRcompulsory keyword the direction in which to calculate the density profile =xyz NBINSthe number of bins to use to represent the density profile =14,14,28 BANDWIDTHcompulsory keyword the bandwidths for kernel density estimation =1.0,1.0,1.0 STRIDEcompulsory keyword ( default=1 ) the frequency with which the data should be collected and added to the quantity being averaged =1 CLEARcompulsory keyword ( default=0 ) the frequency with which to clear all the accumulated data. =1 DUMPCUBE GRIDcompulsory keyword the action that creates the grid you would like to output =dens STRIDEcompulsory keyword ( default=0 ) the frequency with which the grid should be output to the file. =1 FILEcompulsory keyword ( default=density ) the file on which to write the grid. =dens.cube
In this example the phase field model is computed and output to a file on every step of the simulation. Furthermore, because the CLEAR=1 keyword is set on the MULTICOLVARDENS line each Gaussian cube file output is a phase field model for a particular trajectory frame. The average value accumulated thus far is cleared at the start of every single timestep and there is no averaging over trajectory frames in this case.
ORIGIN | we will use the position of this atom as the origin. For more information on how to specify lists of atoms see Groups and Virtual Atoms |
STRIDE | ( default=1 ) the frequency with which the data should be collected and added to the quantity being averaged |
CLEAR | ( default=0 ) the frequency with which to clear all the accumulated data. The default value of 0 implies that all the data will be used and that the grid will never be cleared |
NORMALIZATION | ( default=true ) This controls how the data is normalized it can be set equal to true, false or ndata. The differences between these options are explained in the manual page for HISTOGRAM |
BANDWIDTH | the bandwidths for kernel density estimation |
KERNEL | ( default=gaussian ) the kernel function you are using. More details on the kernels available in plumed plumed can be found in kernelfunctions. |
DATA | the multicolvar which you would like to calculate the density profile for |
DIR | the direction in which to calculate the density profile |
SERIAL | ( default=off ) do the calculation in serial. Do not use MPI |
LOWMEM | ( default=off ) lower the memory requirements |
TIMINGS | ( default=off ) output information on the timings of the various parts of the calculation |
FRACTIONAL | ( default=off ) use fractional coordinates for the various axes |
XREDUCED | ( default=off ) limit the calculation of the density/average to a portion of the z-axis only |
YREDUCED | ( default=off ) limit the calculation of the density/average to a portion of the y-axis only |
ZREDUCED | ( default=off ) limit the calculation of the density/average to a portion of the z-axis only |
LOGWEIGHTS | list of actions that calculates log weights that should be used to weight configurations when calculating averages |
CONCENTRATION | the concentration parameter for Von Mises-Fisher distributions |
NBINS | the number of bins to use to represent the density profile |
SPACING | the approximate grid spacing (to be used as an alternative or together with NBINS) |
XLOWER | this is required if you are using XREDUCED. It specifies the lower bound for the region of the x-axis that for which you are calculating the density/average |
XUPPER | this is required if you are using XREDUCED. It specifies the upper bound for the region of the x-axis that for which you are calculating the density/average |
YLOWER | this is required if you are using YREDUCED. It specifies the lower bound for the region of the y-axis that for which you are calculating the density/average |
YUPPER | this is required if you are using YREDUCED. It specifies the upper bound for the region of the y-axis that for which you are calculating the density/average |
ZLOWER | this is required if you are using ZREDUCED. It specifies the lower bound for the region of the z-axis that for which you are calculating the density/average |
ZUPPER | this is required if you are using ZREDUCED. It specifies the upper bound for the region of the z-axis that for which you are calculating the density/average |