Shortcut: CLUSTER_WITHSURFACE
Module |
clusters |
Description |
Usage |
Determine the atoms that are within a certain cutoff of the atoms in a cluster. |
  |
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
cmatThe CONTACT_MATRIX action with label cmat calculates the following quantities: Quantity | Type | Description |
cmat | matrix | a matrix containing the weights for the bonds between each pair of atoms |
: 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}
onesThe ONES action with label ones calculates the following quantities: Quantity | Type | Description |
ones | vector | a vector of ones with the required number of elements |
: 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
# ones: ONES SIZE=1996
onesThe CONSTANT action with label ones calculates the following quantities: Quantity | Type | Description |
ones | vector | the constant value that was read from the plumed input |
: CONSTANTCreate a constant value that can be passed to actions More details NOLOG do not report all the read in scalars in the log VALUESthe numbers that are in your constant value=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
# --- End of included input --- c1The MATRIX_VECTOR_PRODUCT action with label c1 calculates the following quantities: Quantity | Type | Description |
c1 | vector | the vector that is obtained by taking the product between the matrix and the vector that were input |
: 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
cfThe LESS_THAN action with label cf calculates the following quantities: Quantity | Type | Description |
cf | vector | the vector obtained by doing an element-wise application of a function that is one if the input is less than a threshold to the input vectors |
: 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}
cmat2The CONTACT_MATRIX action with label cmat2 calculates the following quantities: Quantity | Type | Description |
cmat2 | matrix | a matrix containing the weights for the bonds between each pair of atoms |
: 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}
dmatThe OUTER_PRODUCT action with label dmat calculates the following quantities: Quantity | Type | Description |
dmat | matrix | a matrix containing the outer product of the two input vectors that was obtained using the function that was input |
: 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
dmat: OUTER_PRODUCTCalculate the outer product matrix of two vectors This action uses the defaults shown here. More details ARGthe labels of the two vectors from which the outer product is being computed=cf,cf FUNC the function of the input vectors that should be put in the elements of the outer product=x*y
matThe CUSTOM action with label mat calculates the following quantities: Quantity | Type | Description |
mat | matrix | the matrix obtained by doing an element-wise application of an arbitrary function to the input matrix |
: 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
dfsThe DFSCLUSTERING action with label dfs calculates the following quantities: Quantity | Type | Description |
dfs | vector | vector with length that is equal to the number of rows in the input matrix. Elements of this vector are equal to the cluster that each node is a part of |
: DFSCLUSTERINGFind the connected components of the matrix using the depth first search clustering algorithm. More details ARGthe input matrix=mat
clust2aThe CLUSTER_WITHSURFACE action with label clust2a calculates the following quantities: Quantity | Type | Description |
clust2a | vector | 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 |
: 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}
# clust2a: CLUSTER_WITHSURFACE ATOMS=1-1996 CLUSTERS=dfs CLUSTER=1 RCUT_SURF={CUBIC D_0=0.34 D_MAX=0.38}
clust2a_wnosurfThe CLUSTER_WEIGHTS action with label clust2a_wnosurf calculates the following quantities: Quantity | Type | Description |
clust2a_wnosurf | vector | vector with elements that are one if the atom of interest is part of the required cluster and zero otherwise |
: 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
clust2a_cmatThe CONTACT_MATRIX action with label clust2a_cmat calculates the following quantities: Quantity | Type | Description |
clust2a_cmat | matrix | a matrix containing the weights for the bonds between each pair of atoms |
: 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}
clust2a_cwmatThe OUTER_PRODUCT action with label clust2a_cwmat calculates the following quantities: Quantity | Type | Description |
clust2a_cwmat | matrix | a matrix containing the outer product of the two input vectors that was obtained using the function that was input |
: OUTER_PRODUCTCalculate the outer product matrix of two vectors More details ARGthe labels of the two vectors from which the outer product is being computed=clust2a_wnosurf,clust2a_wnosurf FUNC the function of the input vectors that should be put in the elements of the outer product=max
clust2a_pmatThe CUSTOM action with label clust2a_pmat calculates the following quantities: Quantity | Type | Description |
clust2a_pmat | matrix | the matrix obtained by doing an element-wise application of an arbitrary function to the input matrix |
: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=clust2a_cmat,clust2a_cwmat 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
clust2a_clustThe DFSCLUSTERING action with label clust2a_clust calculates the following quantities: Quantity | Type | Description |
clust2a_clust | vector | vector with length that is equal to the number of rows in the input matrix. Elements of this vector are equal to the cluster that each node is a part of |
: DFSCLUSTERINGFind the connected components of the matrix using the depth first search clustering algorithm. More details ARGthe input matrix=clust2a_pmat
clust2aThe CLUSTER_WEIGHTS action with label clust2a calculates the following quantities: Quantity | Type | Description |
clust2a | vector | vector with elements that are one if the atom of interest is part of the required cluster and zero otherwise |
: 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=clust2a_clust 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
# --- End of included input --- size2aThe SUM action with label size2a calculates the following quantities: Quantity | Type | Description |
size2a | scalar | the sum of all the elements in the input vector |
: 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
dia2aThe CLUSTER_DIAMETER action with label dia2a calculates the following quantities: Quantity | Type | Description |
dia2a | scalar | the largest of all the distances between the pairs of atom in the cluster |
: 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
# dia2a: CLUSTER_DIAMETER ATOMS=1-1996 ARG=clust2a
dia2a_dmatThe DISTANCE_MATRIX action with label dia2a_dmat calculates the following quantities: Quantity | Type | Description |
dia2a_dmat | matrix | a matrix containing the weights for the bonds between each pair of atoms |
: DISTANCE_MATRIXCalculate a matrix of distances between atoms. More details GROUPthe atoms for which you would like to calculate the adjacency matrix=1-1996
dia2a_bmatThe OUTER_PRODUCT action with label dia2a_bmat calculates the following quantities: Quantity | Type | Description |
dia2a_bmat | matrix | a matrix containing the outer product of the two input vectors that was obtained using the function that was input |
: OUTER_PRODUCTCalculate the outer product matrix of two vectors More details FUNC the function of the input vectors that should be put in the elements of the outer product=x*y ARGthe labels of the two vectors from which the outer product is being computed=clust2a,clust2a
dia2a_dclsThe CUSTOM action with label dia2a_dcls calculates the following quantities: Quantity | Type | Description |
dia2a_dcls | matrix | the matrix obtained by doing an element-wise application of an arbitrary function to the input matrix |
: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=dia2a_dmat,dia2a_bmat 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
dia2a_vdclsThe FLATTEN action with label dia2a_vdcls calculates the following quantities: Quantity | Type | Description |
dia2a_vdcls | vector | a vector containing all the elements of the input matrix |
: FLATTENConvert a matrix into a vector More details ARGthe label for the matrix that you would like to flatten to a vector=dia2a_dcls
dia2aThe HIGHEST action with label dia2a calculates the following quantities: Quantity | Type | Description |
dia2a | scalar | the largest element of the input vector if one vector specified. If multiple vectors of the same size specified the largest elements of these vector computed elementwise. |
: HIGHESTThis function can be used to find the highest colvar by magnitude in a set. More details ARGthe values input to this function=dia2a_vdcls
# --- End of included input --- 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 |