Module |
symfunc |
Description |
Usage |
Calculate the SMAC order parameter for a set of molecules |
  |
output value |
type |
the value of the smac parameter for each of the input molecules |
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 |
Further details and examples
Calculate the SMAC order parameter for a set of molecules
This shortcut action provides a quantity that can be thought of as a symmetry function for molecules.
You can thus use it to detect whether the molecules in a sample are ordered in the way that they would expect to be ordered in the crystal. If you are using this CV you normally use
the COM command to define centers of mass for your molecules and the DISTANCE or PLANE command to define each molecules orientation. You can thus calculate
the relative orientation molecules i and j by calculating the torsional angle, θij, between the two molecular orientations around the vector rij connecting the centers of
mass of the two molecules. The value of the molecular order parameter for molecule i is thus calculated as:
si=frac1−γ(ci)ci∑jσ(|rij|)∑kK(θij−ϕkb)whereci=∑jσ(|rij|)
In this expression σ is a switching function that acts on the distance between the centers of mass of molecules i and j. ci is thus the number of molecules that are within
a certain cutoff of molecule i and γ is another switching function that acts upon this quantity. This switching function ensures that the symmetry function is zero for atoms that are
regions where the density of molecules are low. K is then a kernel function with bandwidth b that is centered at ϕk. The function above is thus only large if molecule i is surrounded
by molecules whose relative orientations are as the user has requested by specifying ϕk parameters.
The following example illustrates how the SMAC order parameter in PLUMED is used:
Click on the labels of the actions for more information on what each action computes
m3The DISTANCE action with label m3 calculates the following quantities: Quantity | Type | Description |
m3.x | vector | the x-component of the vector connecting the two atoms |
m3.y | vector | the y-component of the vector connecting the two atoms |
m3.z | vector | the z-component of the vector connecting the two atoms |
: DISTANCESCalculate the distances between multiple piars of atoms This action is a shortcut. More details ...
ATOMS1the pairs of atoms that you would like to calculate the angles for=9,10 LOCATION1the location at which the CV is assumed to be in space=9
ATOMS2the pairs of atoms that you would like to calculate the angles for=89,90 LOCATION2the location at which the CV is assumed to be in space=89
ATOMS3the pairs of atoms that you would like to calculate the angles for=473,474 LOCATION3the location at which the CV is assumed to be in space=473
ATOMS4the pairs of atoms that you would like to calculate the angles for=1161,1162 LOCATION4the location at which the CV is assumed to be in space=1161
ATOMS5the pairs of atoms that you would like to calculate the angles for=1521,1522 LOCATION5the location at which the CV is assumed to be in space=1521
ATOMS6the pairs of atoms that you would like to calculate the angles for=1593,1594 LOCATION6the location at which the CV is assumed to be in space=1593
ATOMS7the pairs of atoms that you would like to calculate the angles for=1601,1602 LOCATION7the location at which the CV is assumed to be in space=1601
ATOMS8the pairs of atoms that you would like to calculate the angles for=2201,2202 LOCATION8the location at which the CV is assumed to be in space=2201
COMPONENTS calculate the x, y and z components of the distance separately and store them as label
...
# m3: DISTANCES ...
m3_grpThe GROUP action with label m3_grp calculates the following quantities: Quantity | Type | Description |
m3_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=9,89,473,1161,1521,1593,1601,2201
m3: DISTANCECalculate the distance/s between pairs of atoms. More details COMPONENTS calculate the x, y and z components of the distance separately and store them as label ATOMS1the pair of atom that we are calculating the distance between=9,10 ATOMS2the pair of atom that we are calculating the distance between=89,90 ATOMS3the pair of atom that we are calculating the distance between=473,474 ATOMS4the pair of atom that we are calculating the distance between=1161,1162 ATOMS5the pair of atom that we are calculating the distance between=1521,1522
# --- End of included input ---
s2The SMAC action with label s2 calculates the following quantities: Quantity | Type | Description |
s2 | vector | the value of the smac parameter for each of the input molecules |
s2_morethan | scalar | the number of colvars that have a value more than a threshold |
: SMACCalculate the SMAC order parameter for a set of molecules This action is a shortcut. More details SPECIESthe label of the DISTANCES or PLANES action that computes the orientations of the molecules for which you would like to compute SMAC=m3 KERNEL1The kernels used in the function of the angle={GAUSSIAN CENTER=0 SIGMA=0.480} KERNEL2The kernels used in the function of the angle={GAUSSIAN CENTER=pi SIGMA=0.480} SWITCHThis keyword is used if you want to employ an alternative to the continuous swiching function defined above. Options for this keyword are explained in the documentation for LESS_THAN.={RATIONAL R_0=0.6} 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=0.7} SWITCH_COORDThis keyword is used to define the coordination switching function. Options for this keyword are explained in the documentation for LESS_THAN.={EXP R_0=4}
# s2: SMAC SPECIES=m3 KERNEL1={GAUSSIAN CENTER=0 SIGMA=0.480} KERNEL2={GAUSSIAN CENTER=pi SIGMA=0.480} SWITCH={RATIONAL R_0=0.6} MORE_THAN={RATIONAL R_0=0.7} SWITCH_COORD={EXP R_0=4}
s2_vecsThe VSTACK action with label s2_vecs calculates the following quantities: Quantity | Type | Description |
s2_vecs | matrix | a matrix that contains the input vectors in its columns |
: VSTACKCreate a matrix by stacking vectors together More details ARGthe values that you would like to stack together to construct the output matrix=m3.x,m3.y,m3.z
s2_vecsTThe TRANSPOSE action with label s2_vecsT calculates the following quantities: Quantity | Type | Description |
s2_vecsT | matrix | the transpose of the input matrix |
: TRANSPOSECalculate the transpose of a matrix More details ARGthe label of the vector or matrix that should be transposed=s2_vecs
s2_cmapThe CONTACT_MATRIX action with label s2_cmap calculates the following quantities: Quantity | Type | Description |
s2_cmap | 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=m3 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=0.6}
s2_tpmatThe TORSIONS_MATRIX action with label s2_tpmat calculates the following quantities: Quantity | Type | Description |
s2_tpmat | matrix | the matrix of torsions between the two vectors of input directors |
: TORSIONS_MATRIXCalculate the matrix of torsions between two vectors of molecules More details ARGan Nx3 and a 3xN matrix that contain the bond vectors that you would like to determine the torsion angles between=s2_vecs,s2_vecsT POSITIONS1the positions to use for the molecules specified using the first argument=m3 POSITIONS2the positions to use for the molecules specified using the second argument=m3
s2_kf1_r2The COMBINE action with label s2_kf1_r2 calculates the following quantities: Quantity | Type | Description |
s2_kf1_r2 | matrix | the matrix obtained by doing an element-wise application of a linear compbination to the input matrix |
: 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 ARGthe values input to this function=s2_tpmat COEFFICIENTS the coefficients of the arguments in your function=4.34028 PARAMETERS the parameters of the arguments in your function=0 POWERS the powers to which you are raising each of the arguments in your function=2
s2_kf1The CUSTOM action with label s2_kf1 calculates the following quantities: Quantity | Type | Description |
s2_kf1 | 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 PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO FUNCthe function you wish to evaluate=exp(-x/2) ARGthe values input to this function=s2_kf1_r2
s2_kf2_r2The COMBINE action with label s2_kf2_r2 calculates the following quantities: Quantity | Type | Description |
s2_kf2_r2 | matrix | the matrix obtained by doing an element-wise application of a linear compbination to the input matrix |
: 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 ARGthe values input to this function=s2_tpmat COEFFICIENTS the coefficients of the arguments in your function=4.34028 PARAMETERS the parameters of the arguments in your function=pi POWERS the powers to which you are raising each of the arguments in your function=2
s2_kf2The CUSTOM action with label s2_kf2 calculates the following quantities: Quantity | Type | Description |
s2_kf2 | 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 PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO FUNCthe function you wish to evaluate=exp(-x/2) ARGthe values input to this function=s2_kf2_r2
s2_ksumThe COMBINE action with label s2_ksum calculates the following quantities: Quantity | Type | Description |
s2_ksum | matrix | the matrix obtained by doing an element-wise application of a linear compbination to the input matrix |
: 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 ARGthe values input to this function=s2_kf1,s2_kf2
s2_prodThe CUSTOM action with label s2_prod calculates the following quantities: Quantity | Type | Description |
s2_prod | 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=s2_cmap,s2_ksum 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
s2_onesThe CONSTANT action with label s2_ones calculates the following quantities: Quantity | Type | Description |
s2_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=8
s2The MATRIX_VECTOR_PRODUCT action with label s2 calculates the following quantities: Quantity | Type | Description |
s2 | 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=s2_prod,s2_ones
s2_denomThe MATRIX_VECTOR_PRODUCT action with label s2_denom calculates the following quantities: Quantity | Type | Description |
s2_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=s2_cmap,s2_ones
s2_mtdenomThe MORE_THAN action with label s2_mtdenom calculates the following quantities: Quantity | Type | Description |
s2_mtdenom | 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=s2_denom SWITCHThis keyword is used if you want to employ an alternative to the continuous swiching function defined above={EXP R_0=4}
s2_smacThe CUSTOM action with label s2_smac calculates the following quantities: Quantity | Type | Description |
s2_smac | 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=s2,s2_mtdenom,s2_denom FUNCthe function you wish to evaluate=(x*y)/z PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
s2_mtThe MORE_THAN action with label s2_mt calculates the following quantities: Quantity | Type | Description |
s2_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=s2_smac SWITCHThis keyword is used if you want to employ an alternative to the continuous swiching function defined above={RATIONAL R_0=0.7}
s2_morethanThe SUM action with label s2_morethan calculates the following quantities: Quantity | Type | Description |
s2_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=s2_mt 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=s2_morethan FILEthe name of the file on which to output these quantities=colvar
Here the orientations of the molecules are specified by calculating the vectors connecting pairs of atoms in the molecules. The LOCATION keywords in the distance command are used to specify the
positions of the molecules from which the rij vectors in the above expression are calculated. The sum over k in the above expression has two terms corresponding to the two Gaussian kernels
that have been specified using KERNEL keywords. The SWITCH keyword has been used to specify the parameters of the switching function σ, while the SWITCH_COORD keyword has been used to specify
the parameters of the switching function γ.
A vector of 8 values for si is calculated. The elements of this vector are transformed by a switching function that is one if the si value is larger than 0.7. The eight elements of the resulting vector
of transformed si are then added together to determine the final quantity that is output to the colvar file.
Incidentally, the authors who designed the SMAC symmetry function have forgotten what the letters in this acronym stand for.
References
More information about how this action can be used is available in the following articles:
- F. Giberti, M. Salvalaglio, M. Mazzotti, M. Parrinello, Insight into the nucleation of urea crystals from the melt. Chemical Engineering Science. 121, 51–59 (2015)
- G. A. Tribello, F. Giberti, G. C. Sosso, M. Salvalaglio, M. Parrinello, Analyzing and Driving Cluster Formation in Atomistic Simulations. Journal of Chemical Theory and Computation. 13, 1317–1327 (2017)
Syntax
The following table describes the keywords and options that can be used with this action
Keyword |
Type |
Default |
Description |
SPECIES |
optional |
not used |
the label of the DISTANCES or PLANES action that computes the orientations of the molecules for which you would like to compute SMAC |
SPECIESA |
optional |
not used |
the label of the DISTANCES or PLANES action that computes the orientations of the molecules for which you would like to compute SMAC |
SPECIESB |
optional |
not used |
the label of the DISTANCES or PLANES action that computes the orientations of the molecules that should be considered as part of the coordination sphere |
SWITCH |
optional |
not used |
This keyword is used if you want to employ an alternative to the continuous swiching function defined above. Options for this keyword are explained in the documentation for LESS_THAN. |
KERNEL |
optional |
not used |
The kernels used in the function of the angle |
SWITCH_COORD |
optional |
not used |
This keyword is used to define the coordination switching function. 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 |