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. |
Gives the number of atoms in the connected component
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 to output the number of atoms that are connected together in a particular connected component. It is important to note that the quantity that is output by this action cannot be differentiated. As such it cannot be used as a collective variable in a biased simulation.
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 greater than 2.0 and if they are within 6.0 nm of each other. Depth first search clustering is used to find the connected components in this matrix and then the number of atoms in the largest cluster is found. This quantity is then output to a file called colvar
# Calculate coordination numbers c1: COORDINATIONNUMBERSPECIES=1-512this keyword is used for colvars such as coordination number.SWITCH={EXP D_0=4.0 R_0=0.5 D_MAX=6.0} # Select coordination numbers that are more than 2.0 cf: MFILTER_MOREThis 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={RATIONAL D_0=2.0 R_0=0.1}This keyword is used if you want to employ an alternative to the continuous switching function defined above.LOWMEM# Build a contact matrix mat: CONTACT_MATRIX( default=off ) lower the memory requirementsATOMS=cfThe list of atoms for which you would like to calculate the contact matrix.SWITCH={EXP D_0=4.0 R_0=0.5 D_MAX=6.0} # Find largest cluster dfs: DFSCLUSTERINGThis keyword is used if you want to employ an alternative to the continuous switching function defined above.MATRIX=mat clust1: CLUSTER_PROPERTIEScompulsory keyword the action that calculates the adjacency matrix vessel we would like to analyzeCLUSTERS=dfscompulsory keyword the label of the action that does the clusteringCLUSTER=1 nat: CLUSTER_NATOMScompulsory 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.CLUSTERS=dfscompulsory keyword the label of the action that does the clusteringCLUSTER=1 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=natthe input for this action is the scalar output from one or more other actions.FILE=COLVARthe name of the file on which to output these quantities
CLUSTERS | the label of the action that does the clustering |
CLUSTER | ( 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. |
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 |