CLUSTER_WITHSURFACE
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.

Take a connected component that was found using a clustering algorithm and create a new cluster that contains those atoms that are in the cluster together with those atoms that are within a certain cutoff of the cluster.

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. When analyzing these matrix we can treat them as a graph and find connected components using some clustering algorithm. This action is used in tandem with this form of analysis and takes one of the connected components that was found during this analysis and creates a new cluster that includes all the atoms within the connected component that was found together that were within a certain cutoff distance of the atoms in the connected component. This form of analysis has been used successfully in the forward flux sampling simulations described in this paper [118]

Examples

The following input uses PLUMED to calculate a adjacency matrix that connects a pair of atoms if they both have a coordination number that is less than 13.5 and if they are within 0.38 nm of each other. Depth first search clustering is used to find the connected components in this matrix. The number of atoms with indices that are between 1 and 1996 and that are either in the second largest cluster or that are within within 0.3 nm of one of the atoms within the the second largest cluster are then counted and this number of atoms is output to a file called size. In addition the indices of the atoms that were counted are output to a file called dfs2.dat.

Click on the labels of the actions for more information on what each action computes
tested on master
c1: COORDINATIONNUMBER 
SPECIES
this keyword is used for colvars such as coordination number.
=1-1996
SWITCH
This keyword is used if you want to employ an alternative to the continuous switching function defined above.
={CUBIC D_0=0.34 D_MAX=0.38} cf: MFILTER_LESS
DATA
compulsory keyword The multicolvar that calculates the set of base quantities that we are interested in
=c1
SWITCH
This keyword is used if you want to employ an alternative to the continuous switching function defined above.
={CUBIC D_0=13 D_MAX=13.5} mat: CONTACT_MATRIX
ATOMS
The list of atoms for which you would like to calculate the contact matrix.
=cf
SWITCH
This keyword is used if you want to employ an alternative to the continuous switching function defined above.
={CUBIC D_0=0.34 D_MAX=0.38} dfs: DFSCLUSTERING
MATRIX
compulsory keyword the action that calculates the adjacency matrix vessel we would like to analyze
=mat clust2a: CLUSTER_WITHSURFACE
CLUSTERS
compulsory keyword the label of the action that does the clustering
=dfs
RCUT_SURF
compulsory keyword you also have the option to find the atoms on the surface of the cluster.
=0.3 size2a: CLUSTER_NATOMS
CLUSTERS
compulsory keyword the label of the action that does the clustering
=clust2a
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.
=2 PRINT
ARG
the input for this action is the scalar output from one or more other actions.
=size2a
FILE
the name of the file on which to output these quantities
=size
FMT
the format that should be used to output real numbers
=%8.4f OUTPUT_CLUSTER
CLUSTERS
compulsory keyword the action that performed the clustering
=clust2a
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
=2
FILE
compulsory keyword the name of the file on which to output the details of the cluster
=dfs2.dat
Glossary of keywords and components
Compulsory keywords
CLUSTERS the label of the action that does the clustering
RCUT_SURF you also have the option to find the atoms on the surface of the cluster. An atom must be within this distance of one of the atoms of the cluster in order to be considered a surface atom
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
LOWMEM ( default=off ) lower the memory requirements
TIMINGS

( default=off ) output information on the timings of the various parts of the calculation