| Module |
gridtools |
| Description |
Usage |
| Calculate the numerical integral of the function stored on the grid |
  |
| output value |
type |
| the numerical integral of the input function over its whole domain |
scalar |
Details and examples
Calculate the numerical integral of the function stored on the grid
This action takes a function, , that is stored on a grid of points between and . It then computes the following definite integral
numerically:
The approximate value of this integral would be computed using:
where is the number of points at which the grid has been computed.
The following example input demonstrates how this action can be used:
In this case, the KDE action is used to compute a histogram that shows the instanenous distribution for 10 coordination numbers. This distribution is
unormalised so that CUSTOM command here is used to normalise the distribution. The resulting integral that is computed here should thsu be one.
Notice also that the action can still be used if the function stored on the grid is a function of 2 or more variables. For example, the following input performs an integral
that is very similar to the one performed in the previous. Now, however, the input grid is two dimensional.
c1The COORDINATIONNUMBER action with label c1 calculates the following quantities:| Quantity | Type | Description |
| c1 | vector | the coordination numbers of the specified atoms |
: COORDINATIONNUMBERCalculate the coordination numbers of atoms so that you can then calculate functions of the distribution of This action is a shortcut. More details SPECIESAthe list of atoms for which the symmetry function is being calculated=1-10 SPECIESBthe list of atoms that can be in the environments of each of the atoms for which the symmetry function is being calculated=1-200 SWITCHthe switching function that it used in the construction of the contact matrix. Options for this keyword are explained in the documentation for LESS_THAN.={RATIONAL R_0=1.0}
# c1: COORDINATIONNUMBER SPECIESA=1-10 SPECIESB=1-200 SWITCH={RATIONAL R_0=1.0}
c1_grpThe GROUP action with label c1_grp calculates the following quantities:| Quantity | Type | Description |
| c1_grp | atoms | indices of atoms specified in GROUP |
: GROUPDefine a group of atoms so that a particular list of atoms can be referenced with a single label in definitions of CVs or virtual atoms. More details ATOMSthe numerical indexes for the set of atoms in the group=1-10
c1_matThe CONTACT_MATRIX action with label c1_mat calculates the following quantities:| Quantity | Type | Description |
| c1_mat | matrix | a matrix containing the weights for the bonds between each pair of atoms |
: CONTACT_MATRIXAdjacency matrix in which two atoms are adjacent if they are within a certain cutoff. More details GROUPAwhen you are calculating the adjacency matrix between two sets of atoms this keyword is used to specify the atoms along with the keyword GROUPB=1-10 GROUPBwhen you are calculating the adjacency matrix between two sets of atoms this keyword is used to specify the atoms along with the keyword GROUPA=1-200 SWITCHthe input for the switching function that acts upon the distance between each pair of atoms. Options for this keyword are explained in the documentation for LESS_THAN.={RATIONAL R_0=1.0}
c1_onesThe CONSTANT action with label c1_ones calculates the following quantities:| Quantity | Type | Description |
| c1_ones | vector | the constant value that was read from the plumed input |
: ONESCreate a constant vector with all elements equal to one More details SIZEthe number of ones that you would like to create=200
c1The MATRIX_VECTOR_PRODUCT action with label c1 calculates the following quantities:| Quantity | Type | Description |
| c1 | vector | the vector that is obtained by taking the product between the matrix and the vector that were input |
: MATRIX_VECTOR_PRODUCTCalculate the product of the matrix and the vector More details ARGthe label for the matrix and the vector/scalar that are being multiplied=c1_mat,c1_ones
# --- End of included input --- q6The Q6 action with label q6 calculates the following quantities:| Quantity | Type | Description |
| q6 | vector | the norms of the vectors of spherical harmonic coefficients |
: Q6Calculate sixth order Steinhardt parameters. This action is a shortcut. More details SPECIESAthe list of atoms for which the symmetry function is being calculated=1-10 SPECIESBthe list of atoms that can be in the environments of each of the atoms for which the symmetry function is being calculated=1-200 SWITCHthe switching function that it used in the construction of the contact matrix. Options for this keyword are explained in the documentation for LESS_THAN.={RATIONAL R_0=1.0}
# q6: Q6 SPECIESA=1-10 SPECIESB=1-200 SWITCH={RATIONAL R_0=1.0}
q6_grpThe GROUP action with label q6_grp calculates the following quantities:| Quantity | Type | Description |
| q6_grp | atoms | indices of atoms specified in GROUP |
: GROUPDefine a group of atoms so that a particular list of atoms can be referenced with a single label in definitions of CVs or virtual atoms. More details ATOMSthe numerical indexes for the set of atoms in the group=1-10
q6_matThe CONTACT_MATRIX action with label q6_mat calculates the following quantities:| Quantity | Type | Description |
| q6_mat.w | matrix | a matrix containing the weights for the bonds between each pair of atoms |
| q6_mat.x | matrix | the projection of the bond on the x axis |
| q6_mat.y | matrix | the projection of the bond on the y axis |
| q6_mat.z | matrix | the projection of the bond on the z axis |
: CONTACT_MATRIXAdjacency matrix in which two atoms are adjacent if they are within a certain cutoff. More details GROUPAwhen you are calculating the adjacency matrix between two sets of atoms this keyword is used to specify the atoms along with the keyword GROUPB=1-10 GROUPBwhen you are calculating the adjacency matrix between two sets of atoms this keyword is used to specify the atoms along with the keyword GROUPA=1-200 SWITCHthe input for the switching function that acts upon the distance between each pair of atoms. Options for this keyword are explained in the documentation for LESS_THAN.={RATIONAL R_0=1.0} COMPONENTS also calculate the components of the vector connecting the atoms in the contact matrix
q6_shThe SPHERICAL_HARMONIC action with label q6_sh calculates the following quantities:| Quantity | Type | Description |
| q6_sh.rm-n6 | matrix | the real parts of the spherical harmonic values with the m value given This is the n6th of these quantities |
| q6_sh.rm-n5 | matrix | the real parts of the spherical harmonic values with the m value given This is the n5th of these quantities |
| q6_sh.rm-n4 | matrix | the real parts of the spherical harmonic values with the m value given This is the n4th of these quantities |
| q6_sh.rm-n3 | matrix | the real parts of the spherical harmonic values with the m value given This is the n3th of these quantities |
| q6_sh.rm-n2 | matrix | the real parts of the spherical harmonic values with the m value given This is the n2th of these quantities |
| q6_sh.rm-n1 | matrix | the real parts of the spherical harmonic values with the m value given This is the n1th of these quantities |
| q6_sh.rm-0 | matrix | the real parts of the spherical harmonic values with the m value given This is the 0th of these quantities |
| q6_sh.rm-p1 | matrix | the real parts of the spherical harmonic values with the m value given This is the p1th of these quantities |
| q6_sh.rm-p2 | matrix | the real parts of the spherical harmonic values with the m value given This is the p2th of these quantities |
| q6_sh.rm-p3 | matrix | the real parts of the spherical harmonic values with the m value given This is the p3th of these quantities |
| q6_sh.rm-p4 | matrix | the real parts of the spherical harmonic values with the m value given This is the p4th of these quantities |
| q6_sh.rm-p5 | matrix | the real parts of the spherical harmonic values with the m value given This is the p5th of these quantities |
| q6_sh.rm-p6 | matrix | the real parts of the spherical harmonic values with the m value given This is the p6th of these quantities |
| q6_sh.im-n6 | matrix | the real parts of the spherical harmonic values with the m value given This is the n6th of these quantities |
| q6_sh.im-n5 | matrix | the real parts of the spherical harmonic values with the m value given This is the n5th of these quantities |
| q6_sh.im-n4 | matrix | the real parts of the spherical harmonic values with the m value given This is the n4th of these quantities |
| q6_sh.im-n3 | matrix | the real parts of the spherical harmonic values with the m value given This is the n3th of these quantities |
| q6_sh.im-n2 | matrix | the real parts of the spherical harmonic values with the m value given This is the n2th of these quantities |
| q6_sh.im-n1 | matrix | the real parts of the spherical harmonic values with the m value given This is the n1th of these quantities |
| q6_sh.im-0 | matrix | the real parts of the spherical harmonic values with the m value given This is the 0th of these quantities |
| q6_sh.im-p1 | matrix | the real parts of the spherical harmonic values with the m value given This is the p1th of these quantities |
| q6_sh.im-p2 | matrix | the real parts of the spherical harmonic values with the m value given This is the p2th of these quantities |
| q6_sh.im-p3 | matrix | the real parts of the spherical harmonic values with the m value given This is the p3th of these quantities |
| q6_sh.im-p4 | matrix | the real parts of the spherical harmonic values with the m value given This is the p4th of these quantities |
| q6_sh.im-p5 | matrix | the real parts of the spherical harmonic values with the m value given This is the p5th of these quantities |
| q6_sh.im-p6 | matrix | the real parts of the spherical harmonic values with the m value given This is the p6th of these quantities |
: SPHERICAL_HARMONICCalculate the values of all the spherical harmonic funtions for a particular value of l. More details ARGthe values input to this function=q6_mat.x,q6_mat.y,q6_mat.z,q6_mat.w Lthe value of the angular momentum=6
q6_denom_onesThe CONSTANT action with label q6_denom_ones calculates the following quantities:| Quantity | Type | Description |
| q6_denom_ones | vector | the constant value that was read from the plumed input |
: ONESCreate a constant vector with all elements equal to one More details SIZEthe number of ones that you would like to create=200
q6_denomThe MATRIX_VECTOR_PRODUCT action with label q6_denom calculates the following quantities:| Quantity | Type | Description |
| q6_denom | vector | the vector that is obtained by taking the product between the matrix and the vector that were input |
: MATRIX_VECTOR_PRODUCTCalculate the product of the matrix and the vector More details ARGthe label for the matrix and the vector/scalar that are being multiplied=q6_mat.w,q6_denom_ones
q6_spThe MATRIX_VECTOR_PRODUCT action with label q6_sp calculates the following quantities:| Quantity | Type | Description |
| q6_sp.rm-n6 | vector | the product of the matrix q6_sh.rm-n6 and the vector q6_denom_ones |
| q6_sp.rm-n5 | vector | the product of the matrix q6_sh.rm-n5 and the vector q6_denom_ones |
| q6_sp.rm-n4 | vector | the product of the matrix q6_sh.rm-n4 and the vector q6_denom_ones |
| q6_sp.rm-n3 | vector | the product of the matrix q6_sh.rm-n3 and the vector q6_denom_ones |
| q6_sp.rm-n2 | vector | the product of the matrix q6_sh.rm-n2 and the vector q6_denom_ones |
| q6_sp.rm-n1 | vector | the product of the matrix q6_sh.rm-n1 and the vector q6_denom_ones |
| q6_sp.rm-0 | vector | the product of the matrix q6_sh.rm-0 and the vector q6_denom_ones |
| q6_sp.rm-p1 | vector | the product of the matrix q6_sh.rm-p1 and the vector q6_denom_ones |
| q6_sp.rm-p2 | vector | the product of the matrix q6_sh.rm-p2 and the vector q6_denom_ones |
| q6_sp.rm-p3 | vector | the product of the matrix q6_sh.rm-p3 and the vector q6_denom_ones |
| q6_sp.rm-p4 | vector | the product of the matrix q6_sh.rm-p4 and the vector q6_denom_ones |
| q6_sp.rm-p5 | vector | the product of the matrix q6_sh.rm-p5 and the vector q6_denom_ones |
| q6_sp.rm-p6 | vector | the product of the matrix q6_sh.rm-p6 and the vector q6_denom_ones |
| q6_sp.im-n6 | vector | the product of the matrix q6_sh.im-n6 and the vector q6_denom_ones |
| q6_sp.im-n5 | vector | the product of the matrix q6_sh.im-n5 and the vector q6_denom_ones |
| q6_sp.im-n4 | vector | the product of the matrix q6_sh.im-n4 and the vector q6_denom_ones |
| q6_sp.im-n3 | vector | the product of the matrix q6_sh.im-n3 and the vector q6_denom_ones |
| q6_sp.im-n2 | vector | the product of the matrix q6_sh.im-n2 and the vector q6_denom_ones |
| q6_sp.im-n1 | vector | the product of the matrix q6_sh.im-n1 and the vector q6_denom_ones |
| q6_sp.im-0 | vector | the product of the matrix q6_sh.im-0 and the vector q6_denom_ones |
| q6_sp.im-p1 | vector | the product of the matrix q6_sh.im-p1 and the vector q6_denom_ones |
| q6_sp.im-p2 | vector | the product of the matrix q6_sh.im-p2 and the vector q6_denom_ones |
| q6_sp.im-p3 | vector | the product of the matrix q6_sh.im-p3 and the vector q6_denom_ones |
| q6_sp.im-p4 | vector | the product of the matrix q6_sh.im-p4 and the vector q6_denom_ones |
| q6_sp.im-p5 | vector | the product of the matrix q6_sh.im-p5 and the vector q6_denom_ones |
| q6_sp.im-p6 | vector | the product of the matrix q6_sh.im-p6 and the vector q6_denom_ones |
: MATRIX_VECTOR_PRODUCTCalculate the product of the matrix and the vector More details ARGthe label for the matrix and the vector/scalar that are being multiplied=q6_sh.*,q6_denom_ones
q6_norm2The COMBINE action with label q6_norm2 calculates the following quantities:| Quantity | Type | Description |
| q6_norm2 | vector | the vector obtained by doing an element-wise application of a linear combination to the input vectors |
: COMBINECalculate a polynomial combination of a set of other variables. More details PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO POWERS the powers to which you are raising each of the arguments in your function=2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 ARGthe values input to this function=q6_sp.rm-n6,q6_sp.im-n6,q6_sp.rm-n5,q6_sp.im-n5,q6_sp.rm-n4,q6_sp.im-n4,q6_sp.rm-n3,q6_sp.im-n3,q6_sp.rm-n2,q6_sp.im-n2,q6_sp.rm-n1,q6_sp.im-n1,q6_sp.rm-0,q6_sp.im-0,q6_sp.rm-p1,q6_sp.im-p1,q6_sp.rm-p2,q6_sp.im-p2,q6_sp.rm-p3,q6_sp.im-p3,q6_sp.rm-p4,q6_sp.im-p4,q6_sp.rm-p5,q6_sp.im-p5,q6_sp.rm-p6,q6_sp.im-p6
q6_normThe CUSTOM action with label q6_norm calculates the following quantities:| Quantity | Type | Description |
| q6_norm | vector | the vector obtained by doing an element-wise application of an arbitrary function to the input vectors |
: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=q6_norm2 FUNCthe function you wish to evaluate=sqrt(x) PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
q6The CUSTOM action with label q6 calculates the following quantities:| Quantity | Type | Description |
| q6 | vector | the vector obtained by doing an element-wise application of an arbitrary function to the input vectors |
: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=q6_norm,q6_denom FUNCthe function you wish to evaluate=x/y PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
# --- End of included input --- huThe KDE action with label hu calculates the following quantities:| Quantity | Type | Description |
| hu | grid | a function on a grid that was obtained by doing a Kernel Density Estimation using the input arguments |
: KDECreate a histogram from the input scalar/vector/matrix using KDE This action has hidden defaults. More details ARGthe label for the value that should be used to construct the histogram=c1,q6 GRID_BINthe number of bins for the grid=200,200 GRID_MIN the lower bounds for the grid=0,-0.5 GRID_MAX the upper bounds for the grid=10,2 BANDWIDTHthe bandwidths for kernel density esimtation=0.1,0.1
hu: KDECreate a histogram from the input scalar/vector/matrix using KDE This action uses the defaults shown here. More details ARGthe label for the value that should be used to construct the histogram=c1,q6 GRID_BINthe number of bins for the grid=200,200 GRID_MIN the lower bounds for the grid=0,-0.5 GRID_MAX the upper bounds for the grid=10,2 BANDWIDTHthe bandwidths for kernel density esimtation=0.1,0.1 KERNEL the kernel function you are using=GAUSSIAN
hThe CUSTOM action with label h calculates the following quantities:| Quantity | Type | Description |
| h | grid | the grid obtained by doing an element-wise application of an arbitrary function to the input grid |
: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=hu FUNCthe function you wish to evaluate=x/10 PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
ivThe INTEGRATE_GRID action with label iv calculates the following quantities:| Quantity | Type | Description |
| iv | scalar | the numerical integral of the input function over its whole domain |
: INTEGRATE_GRIDCalculate the numerical integral of the function stored on the grid This action is a shortcut. More details ARGthe label of the function on a grid that is being integrated=h PERIODICif the value of the output integral has a periodid domain then you use this keyword to specify the periodicity=NO
# iv: INTEGRATE_GRID ARG=h PERIODIC=NO
iv_volelemThe GET_VOLUME_ELEMENT action with label iv_volelem calculates the following quantities:| Quantity | Type | Description |
| iv_volelem | scalar | the volume element |
: GET_VOLUME_ELEMENTGet the volume element from the input grid More details ARGthe label for function on the grid that you need the volume element for=h
iv_sumThe SUM action with label iv_sum calculates the following quantities:| Quantity | Type | Description |
| iv_sum | scalar | the SUM of the elements in the input value |
: SUMCalculate the sum of the arguments More details ARGthe vector/matrix/grid whose elements shuld be added together=h PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
ivThe CUSTOM action with label iv calculates the following quantities:| Quantity | Type | Description |
| iv | scalar | an arbitrary function |
: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=iv_volelem,iv_sum FUNCthe function you wish to evaluate=x*y PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
# --- End of included 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 of the function on a grid that is being integrated |
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 of the function on a grid that is being integrated |
| PERIODIC |
compulsory |
none |
if the value of the output integral has a periodid domain then you use this keyword to specify the periodicity |