Skip to content

Action: MARGINAL

Module gridtools
Description Usage
Compute a marginal from the input multi-dimensional function used in 0 tutorialsused in 0 eggs
output value type
the function evaluated onto the interpolated grid grid

Details and examples

Compute a marginal from the input multi-dimensional function

The marginals of the function are defined as:

This action takes a function of two or more coordinates that is stored on a grid in input. The marginal of the input function is then computed via numerical integration. To see how this works in practice consider the following input:

Click on the labels of the actions for more information on what each action computes
tested on2.11
d1: DISTANCECalculate the distance/s between pairs of atoms. More details ATOMS1the pair of atom that we are calculating the distance between=1,3 ATOMS2the pair of atom that we are calculating the distance between=1,4 ATOMS3the pair of atom that we are calculating the distance between=1,5 ATOMS4the pair of atom that we are calculating the distance between=1,6 COMPONENTS calculate the x, y and z components of the distance separately and store them as label

k: KDECreate a histogram from the input scalar/vector/matrix using KDE More details ARGthe label for the value that should be used to construct the histogram=d1.x,d1.y BANDWIDTHthe bandwidths for kernel density esimtation=0.02,0.02 KERNEL the kernel function you are using=gaussian GRID_BINthe number of bins for the grid=50,50 GRID_MIN the lower bounds for the grid=0,0 GRID_MAX the upper bounds for the grid=1,1 DUMPGRIDOutput the function on the grid to a file with the PLUMED grid format. More details ARGthe label for the grid that you would like to output=k FILE the file on which to write the grid=func_xy.grid STRIDE the frequency with which the grid should be output to the file=1 m1: MARGINALCompute a marginal from the input multi-dimensional function More details ARGthe label for function on the grid that you would like to interpolate=k DIRthe direction along which the marginal is being computed=1 DUMPGRIDOutput the function on the grid to a file with the PLUMED grid format. More details ARGthe label for the grid that you would like to output=m1 FILE the file on which to write the grid=func_x.grid STRIDE the frequency with which the grid should be output to the file=1 m2: MARGINALCompute a marginal from the input multi-dimensional function More details ARGthe label for function on the grid that you would like to interpolate=k DIRthe direction along which the marginal is being computed=2 DUMPGRIDOutput the function on the grid to a file with the PLUMED grid format. More details ARGthe label for the grid that you would like to output=m1 FILE the file on which to write the grid=func_y.grid STRIDE the frequency with which the grid should be output to the file=1

This input uses the KDE action to compute a distribution from the x and y components of the distances that were computed using the DISTANCE command. We then output this two dimensional histogram and use the MARGINAL command to compute the distributions for the x and y components of the vector separately.

Input

The arguments that serve as the input for this action are specified using one or more of the keywords in the following table.

Keyword Type Description
ARG grid the label for function on the grid that you would like to interpolate

Full list of keywords

The following table describes the keywords and options that can be used with this action

Keyword Type Default Description
ARG input none the label for function on the grid that you would like to interpolate
DIR compulsory none the direction along which the marginal is being computed
SERIAL optional false do the calculation in serial. Further information about this flag can be found here.
USEGPU optional false run this calculation on the GPU. Further information about this flag can be found here.