A contact 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. There are various ways of definining whether a pair of atoms/molecules are adjacent or not. For example we can say two atoms are adjacent if the distance between them is less than some cutoff. Alternatively, if we have a have a pair of molecules, we might state they are adjacent if their centre's of mass are within a certain cutoff and if the two molecules have the same orientation. Two electronegative atoms might be said to be adjacent if there is a hydrogen bond between them. For these reasons then PLUMED contains all of the following methods for calculating an adjacency matrix
| ALIGNED_MATRIX | Adjacency matrix in which two molecule are adjacent if they are within a certain cutoff and if they have the same orientation. |
| CONTACT_MATRIX | Adjacency matrix in which two atoms are adjacent if they are within a certain cutoff. |
| HBOND_MATRIX | Adjacency matrix in which two atoms are adjacent if there is a hydrogen bond between them. |
Once you have calculated an adjacency matrix you can then perform any one of the following operations on this object in order to reduce it to a scalar number.
| COLUMNSUMS | Sum the columns of a contact matrix |
| DFSCLUSTERDIAMETER | Find the connected components in an adjacency matrix and then output the maximum radius. |
| DFSCLUSTERING | Find the various connected components in an adjacency matrix and then output averageproperties of the atoms in those connected components. |
| DFSCLUSTERING_WITHSURFACE | Find the various connected components in an adjacency matrix and then output averageproperties of the atoms in those connected components. |
| DFSMAXCLUSTER | Find the connected components and determine the maximum size of the clusters in your system using a smooth function |
| DFSNUMEROFCLUSTERS | Find the number of connected components that have a size larger than a certain critical threshold. |
| DFSOUTPUT | |
| ROWSUMS | Sum the rows of a contact matrix |
| SPRINT | Calculate SPRINT topological variables from an adjacency matrix. |