| This is part of the clusters module |
| It is only available if you configure PLUMED with ./configure –enable-modules=clusters . Furthermore, this feature is still being developed so take care when using it and report any problems on the mailing list. |
Print out the diameter of one of the connected components
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 largest of the distances between the pairs 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.
- 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 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. The distance between every pair of atoms that are within the largest of the clusters found is then calculated and the largest of these distances is output to a file named colvar.
Click on the labels of the actions for more information on what each action computes
# Calculate coordination numbers
c1: COORDINATIONNUMBER =1-512 ={EXP D_0=4.0 R_0=0.5 D_MAX=6.0} You cannot view the components that are calculated by each action for this input file. Sorry
# Select coordination numbers that are more than 2.0
cf: MFILTER_MORE =c1 ={RATIONAL D_0=2.0 R_0=0.1} You cannot view the components that are calculated by each action for this input file. Sorry
# Build a contact matrix
mat: CONTACT_MATRIX =cf ={EXP D_0=4.0 R_0=0.5 D_MAX=6.0} You cannot view the components that are calculated by each action for this input file. Sorry
# Find largest cluster
dfs: DFSCLUSTERING =mat You cannot view the components that are calculated by each action for this input file. Sorry
clust1: CLUSTER_PROPERTIES =dfs =1 You cannot view the components that are calculated by each action for this input file. Sorry
dia: CLUSTER_DIAMETER =dfs =1 You cannot view the components that are calculated by each action for this input file. Sorry
PRINT =dia =colvar You cannot view the components that are calculated by each action for this input file. Sorry
- Glossary of keywords and components
- Description of components
Quantity | Description |
.#!value | the largest of all the distances between the pairs of atom in the cluster |
- Compulsory keywords
ATOMS | the atoms that were used to calculate the matrix that was clustered |
- Options
ARG | calculate ths radius of the cluster that are in this particular cluster |