Action: GSYMFUNC_THREEBODY

Module symfunc
Description Usage
Calculate functions of the coordinates of the coordinates of all pairs of bonds in the first coordination sphere of an atom used in 1 tutorialsused in 0 eggs

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 matrix three matrices containing the bond vectors of interest
WEIGHT matrix the matrix that contains the weights that should be used for each connection

Further details and examples

Calculate functions of the coordinates of the coordinates of all pairs of bonds in the first coordination sphere of an atom

This shortcut can be used to calculate symmetry function that are like those defined by Behler in the paper that is cited in the bibliography below. The particular symmetry functions that are computed by this shortcut are the angular ones that are functions of the set pairs of atoms in the coordination sphere of the central atom. One of the angular symmetry functions that Behler introduces is:

G5i=21ζj,ki(1+λcosθijk)ζeν(R2ij+R2ik)fc(Rij)fc(Rik)

In this expression ζ, ν and λ are all parameters. fc is a switching function which acts upon Rij, the distance between atom i and atom j, and Rik, the distance between atom i and atom k. θijk is then the angle between the vector that points from atom i to atom j and the vector that points from atom i to atom k. THe input below can be used to get PLUMED to calculate the 100 values for this symmetry function for the 100 atoms in a system.

Click on the labels of the actions for more information on what each action computes
tested on2.11
# Calculate the contact matrix and the x,y and z components of the bond vectors
# This action calculates 4 100x100 matrices
cmat: 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 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.={CUSTOM R_0=4.5 D_MAX=4.5 FUNC=0.5*(cos(pi*x)+1)} COMPONENTS also calculate the components of the vectors connecting the atoms in the contact matrix

# Compute the symmetry function for the 100 atoms from the 4 100x100 matrices output # by cmat. The output from this action is a vector with 100 elements beh3: GSYMFUNC_THREEBODYCalculate functions of the coordinates of the coordinates of all pairs of bonds in the first coordination sphere of an atom More details ... WEIGHTthe matrix that contains the weights that should be used for each connection=cmat.w ARGthree matrices containing the bond vectors of interest=cmat.x,cmat.y,cmat.z FUNCTION1the parameters of the function you would like to compute={FUNC=0.25*exp(-0.1*(rij+rik))*(1+3*cos(ajik))^3 LABEL=g5} ...
# Print the 100 symmetry function values to a file PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=beh3.g5 FILEthe name of the file on which to output these quantities=colvar

The GSYMFUNC_THREEBODY action sums over all the distinct triples of atoms that are identified in the contact matrix. This action uses the same functionality as CUSTOM and can thus compute any function of the following four quantities:

  • rij - the distance between atom i and atom j
  • rik - the distance between atom i and atom k
  • rjk - the distance between atom j and atom k
  • ajik - the angle between the vector connecting atom i to atom j and the vector connecting atom i to atom k.

Furthermore we can calculate more than one function of these four quantities at a time as illustrated by the input below:

Click on the labels of the actions for more information on what each action computes
tested on2.11
# Calculate the contact matrix and the x,y and z components of the bond vectors
# This action calculates 4 100x100 matrices
cmat: 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 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.={CUSTOM R_0=4.5 D_MAX=4.5 FUNC=0.5*(cos(pi*x)+1)} COMPONENTS also calculate the components of the vectors connecting the atoms in the contact matrix

# Compute the 4 symmetry function below for the 100 atoms from the 4 100x100 matrices output # by cmat. The output from this action is a vector with 100 elements beh3: GSYMFUNC_THREEBODYCalculate functions of the coordinates of the coordinates of all pairs of bonds in the first coordination sphere of an atom More details ... WEIGHTthe matrix that contains the weights that should be used for each connection=cmat.w ARGthree matrices containing the bond vectors of interest=cmat.x,cmat.y,cmat.z FUNCTION1the parameters of the function you would like to compute={FUNC=0.25*(cos(pi*sqrt(rjk)/4.5)+1)*exp(-0.1*(rij+rik+rjk))*(1+2*cos(ajik))^2 LABEL=g4} FUNCTION2the parameters of the function you would like to compute={FUNC=0.25*exp(-0.1*(rij+rik))*(1+3.5*cos(ajik))^3 LABEL=g5} FUNCTION3the parameters of the function you would like to compute={FUNC=0.125*(1+6.6*cos(ajik))^4 LABEL=g6} FUNCTION4the parameters of the function you would like to compute={FUNC=sin(3.0*(ajik-1)) LABEL=g7} ...
# Print the 4 sets of 100 symmetry function values to a file PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=beh3.g4,beh3.g5,beh3.g6,beh3.g7 FILEthe name of the file on which to output these quantities=colvar

You can read more about how to calculate more Behler-type symmetry functions here.

References

More information about how this action can be used is available in the following articles: - J. Behler, Atom-centered symmetry functions for constructing high-dimensional neural network potentials. The Journal of Chemical Physics. 134 (2011)

Syntax

The following table describes the keywords and options that can be used with this action

Keyword Type Default Description
ARG input none three matrices containing the bond vectors of interest
WEIGHT input none the matrix that contains the weights that should be used for each connection
SERIAL optional false do the calculation in serial
FUNCTION optional not used the parameters of the function you would like to compute