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 [114]
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.
c1: COORDINATIONNUMBERSPECIES=1-1996this keyword is used for colvars such as coordination number.SWITCH={CUBIC D_0=0.34 D_MAX=0.38} cf: MFILTER_LESSThis keyword is used if you want to employ an alternative to the continuous switching function defined above.DATA=c1compulsory keyword The multicolvar that calculates the set of base quantities that we are interested inSWITCH={CUBIC D_0=13 D_MAX=13.5} mat: CONTACT_MATRIXThis keyword is used if you want to employ an alternative to the continuous switching function defined above.ATOMS=cfThe list of atoms for which you would like to calculate the contact matrix.SWITCH={CUBIC D_0=0.34 D_MAX=0.38} dfs: DFSCLUSTERINGThis keyword is used if you want to employ an alternative to the continuous switching function defined above.MATRIX=mat clust2a: CLUSTER_WITHSURFACEcompulsory keyword the action that calculates the adjacency matrix vessel we would like to analyzeCLUSTERS=dfscompulsory keyword the label of the action that does the clusteringRCUT_SURF=0.3 size2a: CLUSTER_NATOMScompulsory keyword you also have the option to find the atoms on the surface of the cluster.CLUSTERS=clust2acompulsory keyword the label of the action that does the clusteringCLUSTER=2 PRINTcompulsory 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.ARG=size2athe input for this action is the scalar output from one or more other actions.FILE=sizethe name of the file on which to output these quantitiesFMT=%8.4f OUTPUT_CLUSTERthe format that should be used to output real numbersCLUSTERS=clust2acompulsory keyword the action that performed the clusteringCLUSTER=2compulsory 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 onFILE=dfs2.datcompulsory keyword the name of the file on which to output the details of the cluster
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 |
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 |