Shortcut: COORDINATION_MOMENTS
Module |
symfunc |
Description |
Usage |
Calculate moments of the distribution of distances in the first coordination sphere |
  |
output value |
type |
the coordination numbers of the specified atoms |
vector |
Output components
This action can calculate the values in the following table when the associated keyword is included in the input for the action. These values can be referenced elsewhere in the input by using this Action's label followed by a dot and the name of the value required from the list below.
Name |
Type |
Keyword |
Description |
lessthan |
scalar |
LESS_THAN |
the number of colvars that have a value less than a threshold |
morethan |
scalar |
MORE_THAN |
the number of colvars that have a value more than a threshold |
altmin |
scalar |
ALT_MIN |
the minimum value of the cv |
min |
scalar |
MIN |
the minimum colvar |
max |
scalar |
MAX |
the maximum colvar |
between |
scalar |
BETWEEN |
the number of colvars that have a value that lies in a particular interval |
highest |
scalar |
HIGHEST |
the largest of the colvars |
lowest |
scalar |
LOWEST |
the smallest of the colvars |
sum |
scalar |
SUM |
the sum of the colvars |
mean |
scalar |
MEAN |
the mean of the colvars |
moment |
scalar |
MOMENTS |
the moments of the distribution |
The atoms that serve as the input for this action are specified using one or more of the keywords in the following table.
Keyword |
Type |
Description |
SPECIES |
atoms |
the list of atoms for which the symmetry function is being calculated and the atoms that can be in the environments |
SPECIESA |
atoms |
the list of atoms for which the symmetry function is being calculated |
SPECIESB |
atoms |
the list of atoms that can be in the environments of each of the atoms for which the symmetry function is being calculated |
Further details and examples
Calculate moments of the distribution of distances in the first coordination sphere
This is the CV that was developed by White and Voth and is described in the paper in the bibliograhy below. This action provides a way of indirectly biasing radial distribution functions and computes the following function
si=∑jσ(rij)rkij
where k is the value that is input using the R_POWER keyword, rij is the distance between atoms i and j and σ is a switching function.
The following example shows how this action can be used.
Click on the labels of the actions for more information on what each action computes
cn0The COORDINATIONNUMBER action with label cn0 calculates the following quantities: Quantity | Type | Description |
cn0 | vector | the coordination numbers of the specified atoms |
cn0_mean | scalar | the mean of the colvars |
: COORDINATIONNUMBERCalculate the coordination numbers of atoms so that you can then calculate functions of the distribution of This action is a shortcut. More details SPECIESthe list of atoms for which the symmetry function is being calculated and the atoms that can be in the environments=1-10 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 D_MAX=8} MEAN calculate the mean of all the quantities
# cn0: COORDINATIONNUMBER SPECIES=1-10 SWITCH={RATIONAL R_0=1.0 D_MAX=8} MEAN
cn0_grpThe GROUP action with label cn0_grp calculates the following quantities: Quantity | Type | Description |
cn0_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
cn0_matThe CONTACT_MATRIX action with label cn0_mat calculates the following quantities: Quantity | Type | Description |
cn0_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 GROUPspecifies the list of atoms that should be assumed indistinguishable=1-10 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 D_MAX=8}
cn0_onesThe CONSTANT action with label cn0_ones calculates the following quantities: Quantity | Type | Description |
cn0_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=10
cn0The MATRIX_VECTOR_PRODUCT action with label cn0 calculates the following quantities: Quantity | Type | Description |
cn0 | 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=cn0_mat,cn0_ones
cn0_caverageThe MEAN action with label cn0_caverage calculates the following quantities: Quantity | Type | Description |
cn0_caverage | scalar | the mean of all the elements in the input vector |
: MEANCalculate the arithmetic mean of the elements in a vector More details ARGthe values input to this function=cn0 PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
cn0_meanThe MEAN action with label cn0_mean calculates the following quantities: Quantity | Type | Description |
cn0_mean | scalar | the mean of all the elements in the input vector |
: MEANCalculate the arithmetic mean of the elements in a vector More details ARGthe values input to this function=cn0 PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
# --- End of included input --- cn1The COORDINATION_MOMENTS action with label cn1 calculates the following quantities: Quantity | Type | Description |
cn1 | vector | the coordination numbers of the specified atoms |
cn1_mean | scalar | the mean of the colvars |
: COORDINATION_MOMENTSCalculate moments of the distribution of distances in the first coordination sphere This action is a shortcut. More details SPECIESthe list of atoms for which the symmetry function is being calculated and the atoms that can be in the environments=1-10 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 D_MAX=8} R_POWERthe power to which you want to raise the distance=1 MEAN calculate the mean of all the quantities
# cn1: COORDINATION_MOMENTS SPECIES=1-10 SWITCH={RATIONAL R_0=1.0 D_MAX=8} R_POWER=1 MEAN
cn1_grpThe GROUP action with label cn1_grp calculates the following quantities: Quantity | Type | Description |
cn1_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
cn1_matThe CONTACT_MATRIX action with label cn1_mat calculates the following quantities: Quantity | Type | Description |
cn1_mat.w | matrix | a matrix containing the weights for the bonds between each pair of atoms |
cn1_mat.x | matrix | the projection of the bond on the x axis |
cn1_mat.y | matrix | the projection of the bond on the y axis |
cn1_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 GROUPspecifies the list of atoms that should be assumed indistinguishable=1-10 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 D_MAX=8} COMPONENTS also calculate the components of the vectors connecting the atoms in the contact matrix
cn1_onesThe CONSTANT action with label cn1_ones calculates the following quantities: Quantity | Type | Description |
cn1_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=10
cn1_powThe CUSTOM action with label cn1_pow calculates the following quantities: Quantity | Type | Description |
cn1_pow | matrix | the matrix obtained by doing an element-wise application of an arbitrary function to the input matrix |
: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=cn1_mat.x,cn1_mat.y,cn1_mat.z,cn1_mat.w VARthe names to give each of the arguments in the function=x,y,z,w PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO FUNCthe function you wish to evaluate=w*(sqrt(x*x+y*y+z*z)^1)
cn1The MATRIX_VECTOR_PRODUCT action with label cn1 calculates the following quantities: Quantity | Type | Description |
cn1 | 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=cn1_pow,cn1_ones
cn1_caverageThe MEAN action with label cn1_caverage calculates the following quantities: Quantity | Type | Description |
cn1_caverage | scalar | the mean of all the elements in the input vector |
: MEANCalculate the arithmetic mean of the elements in a vector More details ARGthe values input to this function=cn1 PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
cn1_meanThe MEAN action with label cn1_mean calculates the following quantities: Quantity | Type | Description |
cn1_mean | scalar | the mean of all the elements in the input vector |
: MEANCalculate the arithmetic mean of the elements in a vector More details ARGthe values input to this function=cn1 PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
# --- End of included input --- cn2The COORDINATION_MOMENTS action with label cn2 calculates the following quantities: Quantity | Type | Description |
cn2 | vector | the coordination numbers of the specified atoms |
cn2_mean | scalar | the mean of the colvars |
: COORDINATION_MOMENTSCalculate moments of the distribution of distances in the first coordination sphere This action is a shortcut. More details SPECIESthe list of atoms for which the symmetry function is being calculated and the atoms that can be in the environments=1-10 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 D_MAX=8} R_POWERthe power to which you want to raise the distance=2 MEAN calculate the mean of all the quantities
# cn2: COORDINATION_MOMENTS SPECIES=1-10 SWITCH={RATIONAL R_0=1.0 D_MAX=8} R_POWER=2 MEAN
cn2_grpThe GROUP action with label cn2_grp calculates the following quantities: Quantity | Type | Description |
cn2_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
cn2_matThe CONTACT_MATRIX action with label cn2_mat calculates the following quantities: Quantity | Type | Description |
cn2_mat.w | matrix | a matrix containing the weights for the bonds between each pair of atoms |
cn2_mat.x | matrix | the projection of the bond on the x axis |
cn2_mat.y | matrix | the projection of the bond on the y axis |
cn2_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 GROUPspecifies the list of atoms that should be assumed indistinguishable=1-10 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 D_MAX=8} COMPONENTS also calculate the components of the vectors connecting the atoms in the contact matrix
cn2_onesThe CONSTANT action with label cn2_ones calculates the following quantities: Quantity | Type | Description |
cn2_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=10
cn2_powThe CUSTOM action with label cn2_pow calculates the following quantities: Quantity | Type | Description |
cn2_pow | matrix | the matrix obtained by doing an element-wise application of an arbitrary function to the input matrix |
: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=cn2_mat.x,cn2_mat.y,cn2_mat.z,cn2_mat.w VARthe names to give each of the arguments in the function=x,y,z,w PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO FUNCthe function you wish to evaluate=w*(sqrt(x*x+y*y+z*z)^2)
cn2The MATRIX_VECTOR_PRODUCT action with label cn2 calculates the following quantities: Quantity | Type | Description |
cn2 | 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=cn2_pow,cn2_ones
cn2_caverageThe MEAN action with label cn2_caverage calculates the following quantities: Quantity | Type | Description |
cn2_caverage | scalar | the mean of all the elements in the input vector |
: MEANCalculate the arithmetic mean of the elements in a vector More details ARGthe values input to this function=cn2 PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
cn2_meanThe MEAN action with label cn2_mean calculates the following quantities: Quantity | Type | Description |
cn2_mean | scalar | the mean of all the elements in the input vector |
: MEANCalculate the arithmetic mean of the elements in a vector More details ARGthe values input to this function=cn2 PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
# --- End of included input --- PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=cn0.mean,cn1.mean,cn2.mean STRIDE the frequency with which the quantities of interest should be output=1 FILEthe name of the file on which to output these quantities=cn_out
As you can see, it works similarlly to COORDINATIONNUMBER.
References
More information about how this action can be used is available in the following articles:
- A. D. White, G. A. Voth, Efficient and Minimal Method to Bias Molecular Simulations with Experimental Data. Journal of Chemical Theory and Computation. 10, 3023–3030 (2014)
Syntax
The following table describes the keywords and options that can be used with this action
Keyword |
Type |
Default |
Description |
SPECIES |
input |
none |
the list of atoms for which the symmetry function is being calculated and the atoms that can be in the environments |
SPECIESA |
input |
none |
the list of atoms for which the symmetry function is being calculated |
SPECIESB |
input |
none |
the list of atoms that can be in the environments of each of the atoms for which the symmetry function is being calculated |
NN |
compulsory |
6 |
The n parameter of the switching function |
MM |
compulsory |
0 |
The m parameter of the switching function; 0 implies 2*NN |
D_0 |
compulsory |
0.0 |
The d_0 parameter of the switching function |
R_0 |
compulsory |
none |
The r_0 parameter of the switching function |
R_POWER |
compulsory |
none |
the power to which you want to raise the distance |
SWITCH |
optional |
not used |
the switching function that it used in the construction of the contact matrix. Options for this keyword are explained in the documentation for LESS_THAN. |
LESS_THAN |
optional |
not used |
calculate the number of variables that are less than a certain target value. Options for this keyword are explained in the documentation for LESS_THAN. |
MORE_THAN |
optional |
not used |
calculate the number of variables that are more than a certain target value. Options for this keyword are explained in the documentation for MORE_THAN. |
ALT_MIN |
optional |
not used |
calculate the minimum value |
MIN |
optional |
not used |
calculate the minimum value |
MAX |
optional |
not used |
calculate the maximum value |
BETWEEN |
optional |
not used |
calculate the number of values that are within a certain range. Options for this keyword are explained in the documentation for BETWEEN. |
HIGHEST |
optional |
false |
this flag allows you to recover the highest of these variables |
HISTOGRAM |
optional |
not used |
calculate a discretized histogram of the distribution of values |
LOWEST |
optional |
false |
this flag allows you to recover the lowest of these variables |
SUM |
optional |
false |
calculate the sum of all the quantities |
MEAN |
optional |
false |
calculate the mean of all the quantities |
LOWMEM |
optional |
false |
this flag does nothing and is present only to ensure back-compatibility |
MOMENTS |
optional |
not used |
the list of moments that you would like to calculate |