This is part of the crystallization module
It is only available if you configure PLUMED with ./configure –enable-modules=crystallization . Furthermore, this feature is still being developed so take care when using it and report any problems on the mailing list.

Find the connected components and determine the maximum size of the clusters in your system using a smooth function

This action uses the DFS clustering algorithm described in DFSCLUSTERING to find a set of connected components based on the configuration of the atoms in your system. Once again this can be used to find crystalline nuclei or bubble of atoms. Once these connected components have been identified this colvar attempts to determine the size of the largest cluster of atoms using a continuous function. This is done using the following formula

\[ z = \beta \ln \left[ \sum_j \exp\left( \frac{\sum_i \sigma(s_{ij} }{\beta} \right) \right] \]

Here the sum over \(j\) runs over the set of connected components that are identified through the DFS clustering. Meanwhile, the sum over \(i\) runs over the set of symmetry functions, \(s_{ij}\), that are contained within the \(j\)th connected component. The function \(\sigma\) is a switching function that is specified using the TRANSFORM keyword and used to convert all symmetry functions to values between 0 and 1. This is done in order to make it easier to interpret the final quantity as the size of the largest cluster in the system.

Compulsory keywords
DATA the labels of the action that calculates the multicolvars we are interested in
BETA the value of beta to be used in calculating the smooth maximum
WTOL if the base multicolvars have weights then you must define a hard cutoff on those you want to consider explicitally
TRANSFORM ( default=none ) the switching function to use to convert the crystallinity parameter to a number between zero and one
NOPBC ( default=off ) ignore the periodic boundary conditions when calculating distances
SERIAL ( default=off ) do the calculation in serial. Do not parallelize
TIMINGS ( default=off ) output information on the timings of the various parts of the calculation
USE_ORIENTATION ( default=off ) When computing whether two atoms/molecules are adjacent also take their orientations into account
HIGHMEM ( default=off ) use a more memory intensive version of this collective variable

( default=off ) when TRANSFORM appears alone the input symmetry functions, \(x\) are transformed used \(1-s(x)\) where \(s(x)\) is a switching function. When this option is used you instead transform using \(s(x)\) only.


This keyword is used if you want to employ an alternative to the continuous swiching function defined above. The following provides information on the switchingfunction that are available. When this keyword is present you no longer need the NN, MM, D_0 and R_0 keywords. You can use multiple instances of this keyword i.e. SWITCH1, SWITCH2, SWITCH3...


The following example calculates the size of the largest cluster of the system. FCCUBIC parameters, which don't necessarily have to be equal to numbers between zero and one, are converted to numbers between zero and one by virtue of the switching function specified using the TRANSFORM keyword.

cubic1: FCCUBIC SPECIES=1-1000 SWITCH={CUBIC D_0=0.4  D_MAX=0.5} TOL=0.03 
clust: DFSMAXCLUSTER DATA=cubic1 BETA=0.5 SWITCH={CUBIC D_0=0.4   D_MAX=0.5} TRANSFORM={CUBIC D_0=0.035 D_MAX=0.045}

As was described in the examples section of the page on the DFSCLUSTERING action we can also use filters when we use DFSMAXCLUSTER. Here again the filter ensures that clustering is only performed for those atoms that have a symmetry function greater than a certain parameter. As such the clustering will only be performed for a subset of the symmetry functions claculated by the action labelled cubic1.

cubic1: FCCUBIC SPECIES=1-1000 SWITCH={CUBIC D_0=0.4  D_MAX=0.5} TOL=0.03 
cf: MFILTER_MORE DATA=cubic1 SWITCH={CUBIC D_0=0.035 D_MAX=0.045}
clust: DFSMAXCLUSTER DATA=cf BETA=0.5 SWITCH={CUBIC D_0=0.4   D_MAX=0.5} TRANSFORM={CUBIC D_0=0.035 D_MAX=0.045} WTOL=0.01