Shortcut: HEXACTIC_PARAMETER
| Module | symfunc |
|---|---|
| Description | Usage |
| Calculate the hexatic order parameter | |
| output value | type |
| the value of the cylindrical harmonic for each bond vector specified | matrix |
Details and examples
Calculate the hexatic order parameter
This symmetry function can be used to understand phase transitions in two dimensional systems. The symmetry function for atom is calculated using:
In this expression, the sum run over all the atoms of interest and is the distance between atom and atom and is a switching function that acts upon this distance. is the angle between either the , or axis and the bond connecting atom and atom . This angle is multiplied by the imaginary number - the square root of minus one. In the code, we thus calculate as follows:
We then take the 6th power of this complex number directly before compupting the magnitude by multiplying the result by its complex conjugate. Notice, furthermore, that we can replace or with by using PLANE=xz or PLANE=yz in place of PLANE=xy.
An example that shows how you can use this shortcut is shown below:
hex: HEXACTIC_PARAMETERCalculate the hexatic order parameter 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-400 PLANEthe plane to use when calculating the value of the order parameter should be xy, xz or yz=xy R_0The r_0 parameter of the switching function=0.2 D_0 The d_0 parameter of the switching function=1.4 NN The n parameter of the switching function =6 MM The m parameter of the switching function; 0 implies 2*NN=12 hex_mean: MEANCalculate the arithmetic mean of the elements in a vector More details ARGthe vector/matrix/grid whose elements shuld be added together=hex_norm PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=hex_mean FILEthe name of the file on which to output these quantities=colvar
As you can see if you expand the shortcut above, this input calculates the quantity defined in the equation above for the 400 atoms in the simulated system and stores them in a vector. The elements of this vector are then added together so the mean value can be computed.
In the input above we use a rational switching function with the parameters above. We would recommend using SWITCH syntax rather than the syntax above when giving the parameters for the switching function as you can then use any of the switching functions described in the documentation for LESS_THAN. More importantly, however, using this syntax allows you to set the D_MAX parameter for the switching function as demonstrated below:
hex: HEXACTIC_PARAMETERCalculate the hexatic order parameter 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-400 PLANEthe plane to use when calculating the value of the order parameter should be xy, xz or yz=xy 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 D_0=1.4 R_0=0.2 D_MAX=3.0} hex_mean: MEANCalculate the arithmetic mean of the elements in a vector More details ARGthe vector/matrix/grid whose elements shuld be added together=hex_norm PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=hex_mean FILEthe name of the file on which to output these quantities=colvar
Setting the D_MAX can substantially improve PLUMED performance as it turns on the linked list algorithm that is discussed in the optimisation details part
of the documentation for CONTACT_MATRIX.
The VMEAN and VSUM options
If you expand the inputs in the previous section you will see that the value hex_norm that we are calculating the average of is a vector that contains the magnitude of the
complex number defined in the equation above. If you would like to add up the vector of complex numbers directly (or take an average of the vector) before computing the
magnitude of the complex number you can use the VSUM and VMEAN flags as sillstrated below:
hex: HEXACTIC_PARAMETERCalculate the hexatic order parameter 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-400 PLANEthe plane to use when calculating the value of the order parameter should be xy, xz or yz=xy 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 D_0=1.4 R_0=0.2} VMEAN calculate the norm of the mean vector VSUM calculate the norm of the sum of all the vectors PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=hex_vmean,hex_vsum FILEthe name of the file on which to output these quantities=colvar
If you expand the shortcut in the input above you will see that this input adds the complex numbers together directly before calculating the modulus. This contrasts with the approach in the inputs above, which computes a vector that contains the square moduli for each of the individual hexatic order parameters and then computes the average from this vector.
Using two types of atom
If you would like to calculate the hexatic parameters using the directors of the bonds connecting the atoms in GROUPA to the atoms in GROUPB you can use an input like the one shown below:
hex: HEXACTIC_PARAMETERCalculate the hexatic order parameter This action is a shortcut. More details SPECIESAthe list of atoms for which the symmetry function is being calculated=1-200 SPECIESBthe list of atoms that can be in the environments of each of the atoms for which the symmetry function is being calculated=201-400 PLANEthe plane to use when calculating the value of the order parameter should be xy, xz or yz=xy 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 D_0=1.4 R_0=0.2 D_MAX=3.0} hex_mean: MEANCalculate the arithmetic mean of the elements in a vector More details ARGthe vector/matrix/grid whose elements shuld be added together=hex_norm PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=hex_mean FILEthe name of the file on which to output these quantities=colvar
The MASK keyword
You can use the MASK keyword with this action in the same way that it is used with COORDINATIONNUMBER. This keyword thus expects a vector in input, which tells PLUMED the atoms for which you do not need to calculate the function. As illustrated below, this is useful if you are using functionality from the volumes module to calculate the average value of the hexatic parameter for only those atoms that lie in a certain part of the simulation box.
# Fixed virtual atom which serves as the probe volume's center (pos. in nm) center: FIXEDATOMAdd a virtual atom in a fixed position. This action has hidden defaults. More details ATcoordinates of the virtual atom=2.5,2.5,2.5 # Vector in which element i is one if atom i is in sphere of interest and zero otherwise sphere: INSPHEREThis quantity can be used to calculate functions of the distribution of collective variables for the atoms that lie in a particular, user-specified part of of the cell. More details ATOMSthe group of atoms that you would like to investigate=1-400 CENTERthe atom whose vicinity we are interested in examining=center RADIUSthe switching function that tells us the extent of the sphereical region of interest. Options for this keyword are explained in the documentation for LESS_THAN.={GAUSSIAN D_0=0.5 R_0=0.01 D_MAX=0.52} # Calculate the tetrahedral parameter of the atoms hex: HEXACTIC_PARAMETERCalculate the hexatic order parameter 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-400 MASKthe label for a vector that is used to determine which rows of the matrix are computed=sphere PLANEthe plane to use when calculating the value of the order parameter should be xy, xz or yz=xy 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 D_0=3.0 R_0=1.5 D_MAX=6.0} ... # Multiply hexatic parameters by sphere vector prod_rm: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=hex_rm,sphere 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 prod_im: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=hex_im,sphere 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 # Sum of coordination numbers for atoms that are in the sphere of interest numer_rm: SUMCalculate the sum of the arguments More details ARGthe vector/matrix/grid whose elements shuld be added together=prod_rm PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO numer_im: SUMCalculate the sum of the arguments More details ARGthe vector/matrix/grid whose elements shuld be added together=prod_im PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO # Number of atoms that are in sphere of interest denom: SUMCalculate the sum of the arguments More details ARGthe vector/matrix/grid whose elements shuld be added together=sphere PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO # Average coordination number for atoms in sphere of interest av_rm: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=numer_rm,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 av_im: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=numer_im,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 # Take the square modulus av: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=av_rm,av_im FUNCthe function you wish to evaluate=x*x+y*y PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO # And print out final CV to a file PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=av FILEthe name of the file on which to output these quantities=colvar STRIDE the frequency with which the quantities of interest should be output=1
This input calculate the average value of the (complex) hexatic parameter for only those atoms that are within a spherical region that is centered on the point . The square modulus of this average is then output.
Using nearest neighbours
In papers where symmetry functions similar to this one have been used a switching function is not employed. The sums over in the expression above are replaced by sums over the six nearest neighbours to each atom. If you would like to calculate this quantity using PLUMED you can use an input like this:
dmat: DISTANCE_MATRIXCalculate a matrix of distances between atoms. This action has hidden defaults. More details GROUPthe atoms for which you would like to calculate the adjacency matrix=1-400 CUTOFF ignore distances that have a value larger than this cutoff=3.0 COMPONENTS also calculate the components of the vector connecting the atoms in the contact matrix neigh: NEIGHBORSBuild a matrix with ones in for the N nearest neighbours of an atom This action has hidden defaults. More details ARGthe label of an adjacency/distance matrix that will be used to find the nearest neighbors=dmat.w NLOWEST in each row of the output matrix set the elements that correspond to the n lowest elements in each row of the input matrix equal to one=6 harm: CYLINDRICAL_HARMONICCalculate the cylindrical harmonic function More details DEGREEthe value of the n parameter in the equation above=6 ARGthe values input to this function=dmat.x,dmat.y rprod: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=neigh,harm.rm 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 iprod: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=neigh,harm.im 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 hex2_ones: ONESCreate a constant vector with all elements equal to one This action is a shortcut. More details SIZEthe number of ones that you would like to create=400 hex2_denom: 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=neigh,hex2_ones harm_rm: 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=rprod,hex2_ones harm_im: 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=iprod,hex2_ones hex2_rmn: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=harm_rm,hex2_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 hex2_imn: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=harm_im,hex2_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 DUMPATOMSDump selected atoms on a file. More details ATOMSthe atom indices whose positions you would like to print out=1-400 ARGthe labels of vectors that should be output in the xyz file=hex2_rmn,hex2_imn,hex2_denom FILEfile on which to output coordinates; extension is automatically detected=hexparam.xyz
This input outputs the values of the order parameters for all the atoms to an extended xyz file .
Broken virial
Virial is not working currently
Input
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 |
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 |
| _vmean | scalar | VMEAN | the norm of the mean vector |
| _vsum | scalar | VSUM | the norm of the mean vector |
Full list of keywords
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 |
| PLANE | compulsory | none | the plane to use when calculating the value of the order parameter should be xy, xz or yz |
| 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. |
| MASK | optional | not used | the label for a vector that is used to determine which rows of the matrix are computed |
| VMEAN | optional | false | calculate the norm of the mean vector |
| VSUM | optional | false | calculate the norm of the sum of all the vectors |
deprecated keywords
The keywords in the following table can still be used with this action but have been deprecated
| Keyword | Description |
|---|---|
| LESS_THAN | calculate the number of variables that are less than a certain target value |
| MORE_THAN | calculate the number of variables that are more than a certain target value |
| ALT_MIN | calculate the minimum value |
| MIN | calculate the minimum value |
| MAX | calculate the maximum value |
| BETWEEN | calculate the number of values that are within a certain range |
| HIGHEST | this flag allows you to recover the highest of these variables |
| HISTOGRAM | calculate a discretized histogram of the distribution of values |
| LOWEST | this flag allows you to recover the lowest of these variables |
| SUM | calculate the sum of all the quantities |
| MEAN | calculate the mean of all the quantities |
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)
- T. Kawasaki, T. Araki, H. Tanaka, Correlation between Dynamic Heterogeneity and Medium-Range Order in Two-Dimensional Glass-Forming Liquids. Physical Review Letters. 99 (2007)