Shortcut: CLUSTER_WITHSURFACE

Module clusters
Description Usage
Determine the atoms that are within a certain cutoff of the atoms in a cluster. used in 0 tutorialsused in 1 eggs
output value type
a vector that is one for those atoms that are within the cluster or that are within a cetain cutoff of one of the atoms in the cluster and zero otherwise vector

Further details and examples

Determine the atoms that are within a certain cutoff of the atoms in a cluster.

This shortcut action can be used to identify the atoms within the largest connected cluster in a system as well as the atoms around the cluster as shown in the example input below:

Click on the labels of the actions for more information on what each action computes
tested on2.11
# Calculate a matrix with elements that are non zero if the corresponding atoms are within 0.38 of each other
cmat: 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-1996 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.34 D_MAX=0.38}
# Calculate the coordination numbers of all the atoms
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=1996
c1: 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=cmat,ones
# Now identify those atoms that have a coordination number that is less than 13.5
cf: LESS_THANUse a switching function to determine how many of the input variables are less than a certain cutoff. More details ARGthe values input to this function=c1 SWITCHThis keyword is used if you want to employ an alternative to the continuous swiching function defined above={CUBIC D_0=13 D_MAX=13.5}

# Now construct an adjacency matrix with elements that are equal to one if atoms are within 0.38 of each other # and if they both have a coordination number that is less than 13.5 cmat2: 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-1996 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.34 D_MAX=0.38} dmat: OUTER_PRODUCTCalculate the outer product matrix of two vectors This action has hidden defaults. More details ARGthe labels of the two vectors from which the outer product is being computed=cf,cf mat: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=cmat2,dmat 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 # Find the connected componets of this matrix dfs: DFSCLUSTERINGFind the connected components of the matrix using the depth first search clustering algorithm. More details ARGthe input matrix=mat # Now identify the atoms that are within the largest cluster and the atoms that are within 0.38 nm of the # atoms that are within this cluster. Determine how many atoms in total satisfy this condition and the # distance betwen the two atoms in this set that are farthest appart. clust2a: CLUSTER_WITHSURFACEDetermine the atoms that are within a certain cutoff of the atoms in a cluster. This action is a shortcut. More details ATOMSthe atoms that were used to calculate the matrix that was clustered=1-1996 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 RCUT_SURFthe cutoff to use for determining which atoms are connected to the surface of the cluster={CUBIC D_0=0.34 D_MAX=0.38} size2a: SUMCalculate the sum of the arguments More details ARGthe values input to this function=clust2a PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO dia2a: CLUSTER_DIAMETERPrint out the diameter of one of the connected components. This action is a shortcut. More details ATOMSthe atoms that were used to calculate the matrix that was clustered=1-1996 ARGcalculate ths radius of the cluster that are in this particular cluster=clust2a PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=size2a,dia2a

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
CLUSTERS compulsory 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
RCUT_SURF optional not used the cutoff to use for determining which atoms are connected to the surface of the cluster