Action: HBOND_MATRIX

Module adjmat
Description Usage
Adjacency matrix in which two atoms are adjacent if there is a hydrogen bond between them. used in 1 tutorialsused in 0 eggs
output value type
a matrix containing the weights for the bonds between each pair of atoms matrix

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
w matrix COMPONENTS a matrix containing the weights for the bonds between each pair of atoms
x matrix COMPONENTS the projection of the bond on the x axis
y matrix COMPONENTS the projection of the bond on the y axis
z matrix COMPONENTS the projection of the bond on the z axis

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
GROUP atoms the atoms for which you would like to calculate the adjacency matrix
GROUPA atoms when you are calculating the adjacency matrix between two sets of atoms this keyword is used to specify the atoms along with the keyword GROUPB
GROUPB atoms when you are calculating the adjacency matrix between two sets of atoms this keyword is used to specify the atoms along with the keyword GROUPA
ATOMS atoms the atoms for which you would like to calculate the adjacency matrix
DONORS atoms The list of atoms which can donate a hydrogen bond
ACCEPTORS atoms The list of atoms which can accept a hydrogen bond
HYDROGENS atoms The list of atoms that can form the bridge between the two interesting parts of the structure

Further details and examples

Adjacency matrix in which two atoms are adjacent if there is a hydrogen bond between them.

A useful tool for developing complex collective variables is the notion of the so called adjacency matrix. An adjacency matrix is an N×N matrix in which the ith, jth element tells you whether or not the ith and jth atoms/molecules from a set of N atoms/molecules are adjacent or not. As detailed in the documentation for CONTACT_MATRIX there are then a range of further analyses that you can perform on these matrices.

For this action the elements of the adjacency matrix are calculated using:

aij=σoo(|rij|)Nk=1σoh(|rik|)σθ(θkij)

This expression was derived by thinking about how to detect if there is a hydrogen bond between atoms i and j. The notion is that if the hydrogen bond is present atoms i and j should be within a certain cutoff distance. In addition, there should be a hydrogen within a certain cutoff distance of atom i and this hydrogen should lie on or close to the vector connecting atoms i and j. As such σoo(rij) is a switching function that acts on the modulus of the vector connecting atom i to atom j. The sum over k then runs over all the hydrogen atoms that are specified using using HYDROGEN keyword. σoh(rik) is a switching function that acts on the modulus of the vector connecting atom i to atom k and σθ(θkij) is a switching function that acts on the angle between the vector connecting atoms i and j and the vector connecting atoms i and k.

It is important to note that hydrogen bonds, unlike regular bonds, are asymmetric. In other words, the hydrogen atom does not sit at the mid point between the two other atoms in this three-center bond. As a result of this adjacency matrices calculated using HBOND_MATRIX are not symmetric like those calculated by CONTACT_MATRIX.

The following input can be used to analyze the number of hydrogen bonds each of the oxygen atoms in a box of water participates in. Each water molecule can participate in a hydrogen bond in one of two ways. It can either donate one of its hydrogen atom to the neighboring oxygen or it can accept a bond between the hydrogen of a neighboring water molecule and its own oxygen. The input below allows you to output information on the number of hydrogen bonds each of the water molecules donates and accepts. This information is output in two xyz files which each contain five columns of data. The first four of these columns are a label for the atom and the x, y and z position of the oxygen. The last column is then the number of accepted/donated hydrogen bonds.

Click on the labels of the actions for more information on what each action computes
tested on2.11
mat: HBOND_MATRIXAdjacency matrix in which two atoms are adjacent if there is a hydrogen bond between them. This action has hidden defaults. More details ATOMSthe atoms for which you would like to calculate the adjacency matrix=1-192:3 HYDROGENSThe list of atoms that can form the bridge between the two interesting parts of the structure=2-192:3,3-192:3 SWITCHThe switchingfunction that specifies how close a pair of atoms must be together for there to be a hydrogen bond between them. Options for this keyword are explained in the documentation for LESS_THAN.={RATIONAL R_0=3.20} HSWITCHThe switchingfunction that specifies how close the hydrogen must be to the donor atom of the hydrogen bond for it to be considered a hydrogen bond. Options for this keyword are explained in the documentation for LESS_THAN.={RATIONAL R_0=2.30} ASWITCHA switchingfunction that is used to specify what the angle between the vector connecting the donor atom to the acceptor atom and the vector connecting the donor atom to the hydrogen must be in order for it considered to be a hydrogen bond. Options for this keyword are explained in the documentation for LESS_THAN.={RATIONAL R_0=0.167pi}
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=64
rsums: 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=mat,ones
DUMPATOMSDump selected atoms on a file. More details ATOMSthe atom indices whose positions you would like to print out=1-192:3 ARGthe labels of vectors that should be output in the xyz file=rsums FILEfile on which to output coordinates; extension is automatically detected=donors.xyz

References

More information about how this action can be used is available in the following articles: - 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
GROUP input none the atoms for which you would like to calculate the adjacency matrix
GROUPA input none when you are calculating the adjacency matrix between two sets of atoms this keyword is used to specify the atoms along with the keyword GROUPB
GROUPB input none when you are calculating the adjacency matrix between two sets of atoms this keyword is used to specify the atoms along with the keyword GROUPA
ATOMS input none the atoms for which you would like to calculate the adjacency matrix
DONORS input none The list of atoms which can donate a hydrogen bond
ACCEPTORS input none The list of atoms which can accept a hydrogen bond
HYDROGENS input none The list of atoms that can form the bridge between the two interesting parts of the structure
NL_CUTOFF compulsory 0.0 The cutoff for the neighbor list
NL_STRIDE compulsory 1 The frequency with which we are updating the atoms in the neighbor list
SERIAL optional false do the calculation in serial
COMPONENTS optional false also calculate the components of the vectors connecting the atoms in the contact matrix
NOPBC optional false don't use pbc
SWITCH optional not used The switchingfunction that specifies how close a pair of atoms must be together for there to be a hydrogen bond between them. Options for this keyword are explained in the documentation for LESS_THAN.
HSWITCH optional not used The switchingfunction that specifies how close the hydrogen must be to the donor atom of the hydrogen bond for it to be considered a hydrogen bond. Options for this keyword are explained in the documentation for LESS_THAN.
ASWITCH optional not used A switchingfunction that is used to specify what the angle between the vector connecting the donor atom to the acceptor atom and the vector connecting the donor atom to the hydrogen must be in order for it considered to be a hydrogen bond. Options for this keyword are explained in the documentation for LESS_THAN.