Shortcut: COORDINATIONNUMBER
Module |
symfunc |
Description |
Usage |
Calculate the coordination numbers of atoms so that you can then calculate functions of the distribution of |
  |
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 the coordination numbers of atoms so that you can then calculate functions of the distribution of
coordination numbers such as the minimum, the number less than a certain quantity and so on.
The coordination number of a atom i is the number of atoms that are within a certain cutoff distance of it.
This quantity can be calculated as follows:
si=∑jσ(rij)
where rij is the distance between atoms i and j and σ is a switching function. The typical switching
function that is used in metadynamics is this one:
s(r)=1−(r−d0r0)n1−(r−d0r0)m
The following example shows how you can use this shortcut action to calculate and print the coordination numbers of
one hundred atoms with themselves:
Click on the labels of the actions for more information on what each action computes
cThe COORDINATIONNUMBER action with label c calculates the following quantities: Quantity | Type | Description |
c | 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 and it has hidden defaults. More details SPECIESthe list of atoms for which the symmetry function is being calculated and the atoms that can be in the environments=1-100 R_0The r_0 parameter of the switching function=1.0
c: COORDINATIONNUMBERCalculate the coordination numbers of atoms so that you can then calculate functions of the distribution of This action is a shortcut and uses the defaults shown here. More details SPECIESthe list of atoms for which the symmetry function is being calculated and the atoms that can be in the environments=1-100 R_0The r_0 parameter of the switching function=1.0 D_0 The d_0 parameter of the switching function=0.0 NN The n parameter of the switching function =6 MM The m parameter of the switching function; 0 implies 2*NN=0
# c: COORDINATIONNUMBER SPECIES=1-100 R_0=1.0
c_grpThe GROUP action with label c_grp calculates the following quantities: Quantity | Type | Description |
c_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-100
c_matThe CONTACT_MATRIX action with label c_mat calculates the following quantities: Quantity | Type | Description |
c_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-100 R_0The r_0 parameter of the switching function=1.0 D_0 The d_0 parameter of the switching function=0.0 NN The n parameter of the switching function =6 MM The m parameter of the switching function; 0 implies 2*NN=0
c_onesThe CONSTANT action with label c_ones calculates the following quantities: Quantity | Type | Description |
c_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=100
cThe MATRIX_VECTOR_PRODUCT action with label c calculates the following quantities: Quantity | Type | Description |
c | 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=c_mat,c_ones
c_caverageThe MEAN action with label c_caverage calculates the following quantities: Quantity | Type | Description |
c_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=c PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
# --- End of included input --- DUMPATOMSDump selected atoms on a file. More details ATOMSthe atom indices whose positions you would like to print out=c ARGthe labels of vectors that should be output in the xyz file=c FILEfile on which to output coordinates; extension is automatically detected=coords.xyz
This input will produce an output file called coords that contains the coordination numbers of the 100 input atoms. The cutoff
that is used to calculate the coordination number in this case is 1.0.
The vectors that are output by the COORDINATIONNUMBER shortcut can be used in the input for many other functions that are within
PLUMED. In addition, in order to ensure compatibility with older versions of PLUMED you can add additional keywords on the input
line for COORDINATIONNUMBER in order to calculate various functions of the input. For example, the following input tells plumed
ato calculate the coordination numbers of atoms 1-100 with themselves. The minimum coordination number is then calculated.
Click on the labels of the actions for more information on what each action computes
cThe COORDINATIONNUMBER action with label c calculates the following quantities: Quantity | Type | Description |
c | vector | the coordination numbers of the specified atoms |
c_min | scalar | the minimum colvar |
: COORDINATIONNUMBERCalculate the coordination numbers of atoms so that you can then calculate functions of the distribution of This action is a shortcut and it has hidden defaults. More details SPECIESthe list of atoms for which the symmetry function is being calculated and the atoms that can be in the environments=1-100 R_0The r_0 parameter of the switching function=1.0 MINcalculate the minimum value={BETA=0.1}
c: COORDINATIONNUMBERCalculate the coordination numbers of atoms so that you can then calculate functions of the distribution of This action is a shortcut and uses the defaults shown here. More details SPECIESthe list of atoms for which the symmetry function is being calculated and the atoms that can be in the environments=1-100 R_0The r_0 parameter of the switching function=1.0 MINcalculate the minimum value={BETA=0.1} D_0 The d_0 parameter of the switching function=0.0 NN The n parameter of the switching function =6 MM The m parameter of the switching function; 0 implies 2*NN=0
# c: COORDINATIONNUMBER SPECIES=1-100 R_0=1.0 MIN={BETA=0.1}
c_grpThe GROUP action with label c_grp calculates the following quantities: Quantity | Type | Description |
c_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-100
c_matThe CONTACT_MATRIX action with label c_mat calculates the following quantities: Quantity | Type | Description |
c_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-100 R_0The r_0 parameter of the switching function=1.0 D_0 The d_0 parameter of the switching function=0.0 NN The n parameter of the switching function =6 MM The m parameter of the switching function; 0 implies 2*NN=0
c_onesThe CONSTANT action with label c_ones calculates the following quantities: Quantity | Type | Description |
c_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=100
cThe MATRIX_VECTOR_PRODUCT action with label c calculates the following quantities: Quantity | Type | Description |
c | 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=c_mat,c_ones
c_caverageThe MEAN action with label c_caverage calculates the following quantities: Quantity | Type | Description |
c_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=c PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
c_me_minThe CUSTOM action with label c_me_min calculates the following quantities: Quantity | Type | Description |
c_me_min | 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=c FUNCthe function you wish to evaluate=exp(0.1/x) PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
c_mec_minThe SUM action with label c_mec_min calculates the following quantities: Quantity | Type | Description |
c_mec_min | scalar | the sum of all the elements in the input vector |
: SUMCalculate the sum of the arguments More details ARGthe values input to this function=c_me_min PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
c_minThe CUSTOM action with label c_min calculates the following quantities: Quantity | Type | Description |
c_min | scalar | an arbitrary function |
: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=c_mec_min FUNCthe function you wish to evaluate=0.1/log(x) PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
# --- End of included input ---
By constrast, this input tells plumed to calculate how many atoms from 1-100 are within 3.0 of each of the atoms
from 101-110. In the first 101 is the central atom, in the second 102 is the central atom and so on. The
number of coordination numbers that are more than 6 is then computed.
Click on the labels of the actions for more information on what each action computes
cThe COORDINATIONNUMBER action with label c calculates the following quantities: Quantity | Type | Description |
c | vector | the coordination numbers of the specified atoms |
c_morethan | scalar | the number of colvars that have a value more than a threshold |
: COORDINATIONNUMBERCalculate the coordination numbers of atoms so that you can then calculate functions of the distribution of This action is a shortcut and it has hidden defaults. More details SPECIESAthe list of atoms for which the symmetry function is being calculated=101-110 SPECIESBthe list of atoms that can be in the environments of each of the atoms for which the symmetry function is being calculated=1-100 R_0The r_0 parameter of the switching function=3.0 MORE_THANcalculate the number of variables that are more than a certain target value. Options for this keyword are explained in the documentation for MORE_THAN.={RATIONAL R_0=6.0 NN=6 MM=12 D_0=0}
c: COORDINATIONNUMBERCalculate the coordination numbers of atoms so that you can then calculate functions of the distribution of This action is a shortcut and uses the defaults shown here. More details SPECIESAthe list of atoms for which the symmetry function is being calculated=101-110 SPECIESBthe list of atoms that can be in the environments of each of the atoms for which the symmetry function is being calculated=1-100 R_0The r_0 parameter of the switching function=3.0 MORE_THANcalculate the number of variables that are more than a certain target value. Options for this keyword are explained in the documentation for MORE_THAN.={RATIONAL R_0=6.0 NN=6 MM=12 D_0=0} D_0 The d_0 parameter of the switching function=0.0 NN The n parameter of the switching function =6 MM The m parameter of the switching function; 0 implies 2*NN=0
# c: COORDINATIONNUMBER SPECIESA=101-110 SPECIESB=1-100 R_0=3.0 MORE_THAN={RATIONAL R_0=6.0 NN=6 MM=12 D_0=0}
c_grpThe GROUP action with label c_grp calculates the following quantities: Quantity | Type | Description |
c_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=101-110
c_matThe CONTACT_MATRIX action with label c_mat calculates the following quantities: Quantity | Type | Description |
c_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=101-110 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-100 R_0The r_0 parameter of the switching function=3.0 D_0 The d_0 parameter of the switching function=0.0 NN The n parameter of the switching function =6 MM The m parameter of the switching function; 0 implies 2*NN=0
c_onesThe CONSTANT action with label c_ones calculates the following quantities: Quantity | Type | Description |
c_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=100
cThe MATRIX_VECTOR_PRODUCT action with label c calculates the following quantities: Quantity | Type | Description |
c | 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=c_mat,c_ones
c_caverageThe MEAN action with label c_caverage calculates the following quantities: Quantity | Type | Description |
c_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=c PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
c_mtThe MORE_THAN action with label c_mt calculates the following quantities: Quantity | Type | Description |
c_mt | vector | the vector obtained by doing an element-wise application of a function that is one if the if the input is more than a threshold to the input vectors |
: MORE_THANUse a switching function to determine how many of the input variables are more than a certain cutoff. More details ARGthe values input to this function=c SWITCHThis keyword is used if you want to employ an alternative to the continuous swiching function defined above={RATIONAL R_0=6.0 NN=6 MM=12 D_0=0}
c_morethanThe SUM action with label c_morethan calculates the following quantities: Quantity | Type | Description |
c_morethan | scalar | the sum of all the elements in the input vector |
: SUMCalculate the sum of the arguments More details ARGthe values input to this function=c_mt PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
# --- End of included input ---
Notice that these inputs both use shortcuts. If you expand the inputs above you can determine the set of actions
that are being used to calculate each of the quantities of interest.
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 |