ALIGNED_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 molecule are adjacent if they are within a certain cutoff and if they have the same orientation.

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 [115].

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

\[ a_{ij} = \sigma_1( |\mathbf{r}_{ij}| ) \sigma_2( \mathbf{v}_i . \mathbf{v}_j ) \]

This form of adjacency matrix can only be used if the input species are objects that lie at a point in space and that have an orientation, \(\mathbf{v}\). These orientations might represent the orientation of a molecule, which could be calculated using MOLECULES or PLANES, or it might be the complex vectors calculated using the Steinhardt parameters Q3, Q4 or Q6. In the expression above \(\mathbf{r}_{ij}\) is the vector connecting the points in space where objects \(i\) and \(j\) find themselves and \(\sigma_1\) is a switchingfunction that acts upon the magnitude of this vector. \(\sigma_2\) is a second switchingfunction that acts on the dot product of the directors of the vectors that define the orientations of objects \(i\) and \(j\).

Examples

The example input below is necessarily but gives you an idea of what can be achieved using this action. The orientations and positions of four molecules are defined using the MOLECULES action as the position of the centers of mass of the two atoms specified and the direction of the vector connecting the two atoms that were specified. A \(4 \times 4\) matrix is then computed using the formula above. The \(ij\)-element of this matrix tells us whether or not atoms \(i\) and \(j\) are within 0.1 nm of each other and whether or not the dot-product of their orientation vectors is greater than 0.5. The sum of the rows of this matrix are then computed. The sums of the \(i\)th row of this matrix tells us how many of the molecules that are within the first coordination sphere of molecule \(i\) have an orientation that is similar to that of molecule \(i\). We thus calculate the number of these "coordination numbers" that are greater than 1.0 and output this quantity to a file.

Click on the labels of the actions for more information on what each action computes
tested on v2.7
m1: MOLECULES 
MOL1
The numerical indices of the atoms in the molecule.
=1,2
MOL2
The numerical indices of the atoms in the molecule.
=3,4
MOL3
The numerical indices of the atoms in the molecule.
=5,6
MOL4
The numerical indices of the atoms in the molecule.
=7,8 mat: ALIGNED_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 R_0=0.1}
ORIENTATION_SWITCH
A switching function that transforms the dot product of the input vectors.
={RATIONAL R_0=0.1 D_MAX=0.5} row: ROWSUMS
MATRIX
compulsory keyword the action that calculates the adjacency matrix vessel we would like to analyze
=mat
MORE_THAN
calculate the number of variables more than a certain target value.
={RATIONAL D_0=1.0 R_0=0.1} PRINT
ARG
the input for this action is the scalar output from one or more other actions.
=row.*
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...
ORIENTATION_SWITCH A switching function that transforms the dot product of the input vectors. You can use multiple instances of this keyword i.e. ORIENTATION_SWITCH1, ORIENTATION_SWITCH2, ORIENTATION_SWITCH3...