Action: CLUSTER_WEIGHTS

Module clusters
Description Usage
Setup 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. used in 1 tutorialsused in 0 eggs
output value type
vector with elements that are one if the atom of interest is part of the required cluster and zero otherwise vector

Input

The arguments that serve as the input for this action are specified using one or more of the keywords in the following table.

Keyword Type Description
CLUSTERS vector the label of the action that does the clustering

Further details and examples

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

This method is designed to be used in tandem with the DFSCLUSTERING action. An example input that uses this action and that calculates the average coordination number for the atoms in the largest cluster in the system 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}
# Evaluate the coordination numbers of the 100 atoms with themselves
ones: ONESCreate a constant vector with all elements equal to one This action is a shortcut. More details SIZEthe number of ones that you would like to create=100
coord: MATRIX_VECTOR_PRODUCTCalculate the product of the matrix and the vector More details ARGthe label for the matrix and the vector/scalar that are being multiplied=cm,ones
# 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
c1: 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
# Now evaluate the sum of the coordination numbers of the atoms in the larget cluster
numerv: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=c1,coord FUNCthe function you wish to evaluate=x*y PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
numer: SUMCalculate the sum of the arguments More details ARGthe values input to this function=numerv PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
# Evaluate the total number of atoms in the largest cluster
denom: SUMCalculate the sum of the arguments More details ARGthe values input to this function=c1 PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
# And finally calculate the average coordination number for the atoms in the largest cluster
f: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=numer,denom FUNCthe function you wish to evaluate=x/y PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=f FILEthe name of the file on which to output these quantities=colvar

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
CLUSTERS input none the label of the action that does the clustering
CLUSTER compulsory 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
LOWMEM optional false this flag does nothing and is present only to ensure back-compatibility