Shortcut: CLUSTER_DIAMETER

Module clusters
Description Usage
Print out the diameter of one of the connected components. used in 0 tutorialsused in 0 eggs
output value type
the largest of all the distances between the pairs of atom in the cluster scalar

Further details and examples

Print out the diameter of one of the connected components.

An example input that determines the diameter of the second largest cluster that is identified by analysing the connected components of a CONTACT_MATRIX using DFSCLUSTERING is shown below:

Click on the labels of the actions for more information on what each action computes
tested on2.11
# Calculate a contact matrix between the first 100 atoms in the configuration
cm: CONTACT_MATRIXAdjacency matrix in which two atoms are adjacent if they are within a certain cutoff. More details GROUPspecifies the list of atoms that should be assumed indistinguishable=1-100 SWITCHthe input for the switching function that acts upon the distance between each pair of atoms. Options for this keyword are explained in the documentation for LESS_THAN.={CUBIC D_0=0.45  D_MAX=0.55}
# Find the connected components from the contact matrix
dfs: DFSCLUSTERINGFind the connected components of the matrix using the depth first search clustering algorithm. More details ARGthe input matrix=cm
# Returns a 100-dimensional vector that is 1 if the correpsonding atom index is in the largest cluster and is zero otherwise
clust: CLUSTER_WEIGHTSSetup a vector that has one for all the atoms that form part of the cluster of interest and that has zero for all other atoms. More details CLUSTERSthe label of the action that does the clustering=dfs CLUSTER 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=1
# And determine the size of the largest cluster that was identified
c1: CLUSTER_DIAMETERPrint out the diameter of one of the connected components. This action is a shortcut. More details ARGcalculate ths radius of the cluster that are in this particular cluster=clust ATOMSthe atoms that were used to calculate the matrix that was clustered=1-100
PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=c1 FILEthe name of the file on which to output these quantities=colvar

The diameter here is defined as the largest of all the distances between the pairs of atom in the cluster

The output from this action is NOT differentiable

References

More information about how this action can be used is available in the following articles: - G. A. Tribello, F. Giberti, G. C. Sosso, M. Salvalaglio, M. Parrinello, Analyzing and Driving Cluster Formation in Atomistic Simulations. Journal of Chemical Theory and Computation. 13, 1317–1327 (2017)

Syntax

The following table describes the keywords and options that can be used with this action

Keyword Type Default Description
ATOMS compulsory none the atoms that were used to calculate the matrix that was clustered
ARG optional not used calculate ths radius of the cluster that are in this particular cluster