CONTACT_MATRIX

This is part of the adjmat module | |

It is only available if you configure PLUMED with ./configure –enable-modules=adjmat . Furthermore, this feature is still being developed so take care when using it and report any problems on the mailing list. |

Adjacency matrix in which two atoms are adjacent if they are within a certain cutoff.

As discussed in the section of the manual on Exploiting contact matrices a useful tool for developing complex collective variables is the notion of the so called adjacency matrix. An adjacency matrix is an \(N \times N\) matrix in which the \(i\)th, \(j\)th element tells you whether or not the \(i\)th and \(j\)th atoms/molecules from a set of \(N\) atoms/molecules are adjacent or not. These matrices can then be further analyzed using a number of other algorithms as is detailed in [107].

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

\[ a_{ij} = \sigma( |\mathbf{r}_{ij}| ) \]

where \(|\mathbf{r}_{ij}|\) is the magnitude of the vector connecting atoms \(i\) and \(j\) and where \(\sigma\) is a switchingfunction.

- Examples

The input shown below calculates a \(6 \times 6\) matrix whose elements are equal to one if atom \(i\) and atom \(j\) are within 0.3 nm of each other and which is zero otherwise. The columns in this matrix are then summed so as to give the coordination number for each atom. The final quantity output in the colvar file is thus the average coordination number.

Click on the labels of the actions for more information on what each action computes

mat:CONTACT_MATRIXATOMS=1-6the atoms for which you would like to calculate the adjacency matrix.SWITCH={EXP D_0=0.2 R_0=0.1 D_MAX=0.66}specify the switching function to use between two sets of indistinguishable atoms.csums:COLUMNSUMSMATRIX=could not find this keywordmatMEANPRINTcould not find this keywordARG=compulsory keywordthe labels of the values that you would like to print to the filecsums.*FILE=colvarthe name of the file on which to output these quantities

- Glossary of keywords and components

- Description of components

By default the value of the calculated quantity can be referenced elsewhere in the input file by using the label of the action. Alternatively this Action can be used to calculate the following quantities by employing the keywords listed below. These quantities can be referenced elsewhere in the input by using this Action's label followed by a dot and the name of the quantity required from the list below.

Quantity | Description |

.#!value | a matrix containing the weights for the bonds between each pair of atoms |

In addition the following quantities can be calculated by employing the keywords listed below

Quantity | Keyword | Description |

w | COMPONENTS | a matrix containing the weights for the bonds between each pair of atoms |

x | COMPONENTS | the projection of the bond on the x axis |

y | COMPONENTS | the projection of the bond on the y axis |

z | COMPONENTS | the projection of the bond on the z axis |

- The atoms involved can be specified using

GROUPA | . For more information on how to specify lists of atoms see Groups and Virtual Atoms |

GROUPB | . For more information on how to specify lists of atoms see Groups and Virtual Atoms |

- Or alternatively by using

ATOMS | the atoms for which you would like to calculate the adjacency matrix. This is a depracated syntax that is equivalent to GROUP. You are strongly recommened to use GROUP instead of ATOMS. |

- Compulsory keywords

NL_CUTOFF | ( default=0.0 ) The cutoff for the neighbor list. A value of 0 means we are not using a neighbor list |

NL_STRIDE | ( default=1 ) The frequency with which we are updating the atoms in the neighbor list |

NN | ( default=6 ) The n parameter of the switching function |

MM | ( default=0 ) The m parameter of the switching function; 0 implies 2*NN |

D_0 | ( default=0.0 ) The d_0 parameter of the switching function |

R_0 | The r_0 parameter of the switching function |

- Options

SERIAL | ( default=off ) do the calculation in serial. Do not parallelize |

COMPONENTS | ( default=off ) also calculate the components of the vector connecting the atoms in the contact matrix |

NOPBC | ( default=off ) don't use pbc |

GROUP | specifies the list of atoms that should be assumed indistinguishable. You can use multiple instances of this keyword i.e. GROUP1, GROUP2, GROUP3... |

SWITCH | specify the switching function to use between two sets of indistinguishable atoms. You can use multiple instances of this keyword i.e. SWITCH1, SWITCH2, SWITCH3... |