SMAC_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 molecules are adjacent if they are within a certain cutoff and if the angle between them is within certain ranges.

In this case the elements of the adjacency matrix are calculated using:

\[ A_{ij} = \sigma(r_{ij}) \sum_n K_n(\theta_{ij}) \]

In this expression \(r_{ij}\) is the distance between molecule \(i\) and molecule \(j\) and \(\sigma(r_{ij}\) is a switchingfunction that acts on this distance. The $K_n functions are kernelfunctions that take the torsion angle, \(\theta_{ij}\), between the internal orientation vectors for molecules \(i\) and \(j\) as input. These kernel functions should be set so that they are equal to one when the relative orientation of the molecules are as they are in the solid and equal to zero otherwise. As the above matrix element is a product of functions it is only equal to one when the centers of mass of molecules \(i\) and \(j\) are with a certain distance of each other and when the molecules are aligned in some desirable way.

Examples

In the following example an adjacency matrix is constructed in which the \((i,j)\) element is equal to one if molecules \(i\) and \(j\) are within 6 angstroms of each other and if the torsional angle between the orientations of these molecules is close to 0 or \(\pi\). The various connected components of this matrix are determined using the DFSCLUSTERING algorithm and then the size of the largest cluster of connects molecules is output to a colvar file

Click on the labels of the actions for more information on what each action computes
tested on v2.9
UNITS 
LENGTH
the units of lengths.
=A m1: MOLECULES ...
MOL1
The numerical indices of the atoms in the molecule.
=1,2,1
MOL2
The numerical indices of the atoms in the molecule.
=5,6,5
MOL3
The numerical indices of the atoms in the molecule.
=9,10,9
MOL4
The numerical indices of the atoms in the molecule.
=13,14,13
MOL5
The numerical indices of the atoms in the molecule.
=17,18,17 ... smac: SMAC_MATRIX ...
ATOMS
The list of molecules for which you would like to calculate the contact matrix.
=m1
SWITCH
This keyword is used if you want to employ an alternative to the continuous switching function defined above.
={RATIONAL D_0=5.99 R_0=0.1 D_MAX=6.0}
KERNEL1
The various kernels that are used to determine whether or not the molecules are aligned.
={TRIANGULAR CENTER=0 SIGMA=1.0}
KERNEL2
The various kernels that are used to determine whether or not the molecules are aligned.
={TRIANGULAR CENTER=pi SIGMA=0.6} ... dfs1: DFSCLUSTERING
MATRIX
compulsory keyword the action that calculates the adjacency matrix vessel we would like to analyze
=smac cc2: CLUSTER_NATOMS
CLUSTERS
compulsory keyword the label of the action that does the clustering
=dfs1
CLUSTER
compulsory keyword ( default=1 ) which cluster would you like to look at 1 is the largest cluster, 2 is the second largest, 3 is the the third largest and so on.
=1 PRINT
ARG
the input for this action is the scalar output from one or more other actions.
=cc2
FILE
the name of the file on which to output these quantities
=colvar
Glossary of keywords and components
The atoms involved can be specified using
ATOMS The list of molecules for which you would like to calculate the contact matrix. The molecules involved must have an orientation so your list will be a list of the labels of MultiColvar or MultiColvar functions as PLUMED calculates the orientations of molecules within these operations. Please note also that the majority of MultiColvar and MultiColvar functions do not calculate a molecular orientation.. For more information on how to specify lists of atoms see Groups and Virtual Atoms
Or alternatively by using
ATOMSA The list of molecules that you would like to use for the rows of the contact matrix. The molecules involved must have an orientation so your list will be a list of the labels of MultiColvar or MultiColvar functions as PLUMED calculates the orientations of molecules within these operations. Please note also that the majority of MultiColvar and MultiColvar functions do not calculate a molecular orientation.
ATOMSB The list of molecules that you would like to use for the columns of the contact matrix. The molecules involved must have an orientation so your list will be a list of the labels of MultiColvar or MultiColvar functions as PLUMED calculates the orientations of molecules within these operations. Please note also that the majority of MultiColvar and MultiColvar functions do not calculate a molecular orientation.
Options
NUMERICAL_DERIVATIVES ( default=off ) calculate the derivatives for these quantities numerically
NOPBC ( default=off ) ignore the periodic boundary conditions when calculating distances
SERIAL ( default=off ) do the calculation in serial. Do not use MPI
TIMINGS ( default=off ) output information on the timings of the various parts of the calculation
HIGHMEM

( default=off ) use a more memory intensive version of this collective variable

SWITCH This keyword is used if you want to employ an alternative to the continuous switching function defined above. The following provides information on the switchingfunction that are available.. You can use multiple instances of this keyword i.e. SWITCH1, SWITCH2, SWITCH3...
KERNEL The various kernels that are used to determine whether or not the molecules are aligned. You can use multiple instances of this keyword i.e. KERNEL1, KERNEL2, KERNEL3...