MultiColvar Documentation

Oftentimes, when you do not need one of the collective variables described elsewhere in the manual, what you want instead is a function of a distribution of collective variables of a particular type. For instance you might need to calculate a minimum distance or the number of coordination numbers greater than a 3.0. To avoid dupilcating the code to calculate an angle or distance many times and to make it easier to implement very complex collective variables PLUMED provides these sort of collective variables using so-called MultiColvars. MultiColvars are named in this way because a single PLUMED action can be used to calculate a number of different collective variables. For instance the DISTANCES action can be used to calculate the minimum distance, the number of distances less than a certain value, the number of distances within a certain range... A more detailed introduction to multicolvars is provided in this 10-minute video. Descriptions of the various multicolvars that are implemented in PLUMED 2 are given below:

 ANGLES Calculate functions of the distribution of angles . BRIDGE Calculate the number of atoms that bridge two parts of a structure COORDINATIONNUMBER Calculate the coordination numbers of atoms so that you can then calculate functions of the distribution ofcoordination numbers such as the minimum, the number less than a certain quantity and so on. DENSITY Calculate functions of the density of atoms as a function of the box. This allows one to calculatethe number of atoms in half the box. DISTANCES Calculate the distances between one or many pairs of atoms. You can then calculate functions of the distribution ofdistances such as the minimum, the number less than a certain quantity and so on. FCCUBIC INPLANEDISTANCES Calculate distances in the plane perpendicular to an axis MOLECULES Calculate the vectors connecting a pair of atoms in order to represent the orientation of a molecule. PLANES Calculate the plane perpendicular to two vectors in order to represent the orientation of a planar molecule. Q3 Calculate 3rd order Steinhardt parameters. Q4 Calculate 4th order Steinhardt parameters. Q6 Calculate 6th order Steinhardt parameters. SIMPLECUBIC Calculate whether or not the coordination spheres of atoms are arranged as they would be in a simplecubic structure. TETRAHEDRAL Calculate the degree to which the environment about ions has a tetrahedral order. TORSIONS Calculate whether or not a set of torsional angles are within a particular range. XDISTANCES Calculate the x components of the vectors connecting one or many pairs of atoms. You can then calculate functions of the distribution ofvalues such as the minimum, the number less than a certain quantity and so on. XYDISTANCES Calculate distance between a pair of atoms neglecting the z-component. You can then calculate functions of the distribution ofvalues such as the minimum, the number less than a certain quantity and so on. XZDISTANCES Calculate distance between a pair of atoms neglecting the y-component. You can then calculate functions of the distribution ofvalues such as the minimum, the number less than a certain quantity and so on. YDISTANCES Calculate the y components of the vectors connecting one or many pairs of atoms. You can then calculate functions of the distribution ofvalues such as the minimum, the number less than a certain quantity and so on. YZDISTANCES Calculate distance between a pair of atoms neglecting the x-component. You can then calculate functions of the distribution ofvalues such as the minimum, the number less than a certain quantity and so on. ZDISTANCES Calculate the z components of the vectors connecting one or many pairs of atoms. You can then calculate functions of the distribution ofvalues such as the minimum, the number less than a certain quantity and so on.

To instruct PLUMED to calculate a multicolvar you give an instruction that looks something like this:

NAME <atoms involved> <parameters> <what am I calculating> TOL=0.001 LABEL=label


Oftentimes the simplest way to specify the atoms involved is to use multiple instances of the ATOMS keyword i.e. ATOMS1, ATOMS2, ATOMS3,... Separate instances of the quantity specified by NAME are then calculated for each of the sets of atoms. For example if the command issued contains the following:

DISTANCES ATOMS1=1,2 ATOMS2=3,4 ATOMS3=5,6


The distances between atoms 1 and 2, atoms 3 and 4, and atoms 5 and 6 are calculated. Obviously, generating this sort of input is rather tedious so short cuts are also available many of the collective variables. These are described on the manual pages for the actions.

After specifying the atoms involved you sometimes need to specify some parameters that required in the calculation. For instance, for COORDINATIONNUMBER - the number of atoms in the first coordination sphere of each of the atoms in the system - you need to specify the parameters for a switchingfunction that will tell us whether or not an atom is in the first coordination sphere. Details as to how to do this are provided on the manual pages.

One of the most important keywords for multicolvars is the TOL keyword. This specifies that terms in sums that contribute less than a certain value can be ignored. In addition, it is assumed that the derivative with respect to these terms are essentially zero. By increasing the TOL parameter you can increase the speed of the calculation. Be aware, however, that this increase in speed is only possible because you are lowering the accuracy with which you are computing the quantity of interest.

Once you have specified the base quanties that are to be calculated from the atoms involved and any parameters you need to specify what function of these base quanties is to be calculated. For most multicolvars you can calculate the minimum, the number less than a target value, the number within a certain range, the number more than a target value and the average value directly.

MultiColvar functions

As well as the relatively simple quantities described above more complex functions of the distribution of values for the base colvars can be computed by employing multicolvars in conjuction with the following actions:

 AROUND This quantity can be used to calculate functions of the distribution of collective variables for the atoms that lie in a particular, user-specified part of of the cell. CAVITY This quantity can be used to calculate functions of the distribution of collective variables for the atoms that lie in a box defined by the positions of four atoms. DFSCLUSTERDIAMETER Retrieve the size of a cluster. This quantity is NOT differentiable. DFSCLUSTERING Cluster atoms based on their proximities and find the average properties of those atomsin a cluster. DFSMAXCLUSTER Find the connected components and determine the maximum size of the clusters in your system using a smooth function DFSNUMEROFCLUSTERS Find the number of clusters that have a size larger than a certain cutoff INCYLINDER This quantity can be used to calculate functions of the distribution of collective variables for the atoms that lie in a particular, user-specified part of of the cell. LOCAL_AVERAGE Calculate averages over spherical regions centered on atoms LOCAL_Q3 Calculate the local degree of order around an atoms by taking the average dot product between the $$q_3$$ vector on the central atom and the $$q_3$$ vectoron the atoms in the first coordination sphere. LOCAL_Q4 Calculate the local degree of order around an atoms by taking the average dot product between the $$q_4$$ vector on the central atom and the $$q_4$$ vectoron the atoms in the first coordination sphere. LOCAL_Q6 Calculate the local degree of order around an atoms by taking the average dot product between the $$q_6$$ vector on the central atom and the $$q_6$$ vectoron the atoms in the first coordination sphere. MFILTER_BETWEEN This action can be used to filter the distribution of colvar values in a multicolvar so that one can compute the mean and so on for only those multicolvars within a certain range. MFILTER_LESS This action can be used to filter the distribution of colvar values in a multicolvar so that one can compute the mean and so on for only those multicolvars less than a tolerance. MFILTER_MORE This action can be used to filter the distribution of colvar values in a multicolvar so that one can compute the mean and so on for only those multicolvars more than a tolerance. NLINKS Calculate number of pairs of atoms/molecules that are "linked" SPRINT Calculate SPRINT topological variables. TETRAHEDRALPORE

MultiColvar bias

There may be occasitions when you want add restraints on many collective variables. For instance if you are studying a cluster you might want to add a wall on the distances between each of the atoms and the center of mass of the cluster in order to prevent the cluster subliming. Alternatively, you may wish to insist that a particular set of atoms in your system all have a coordination number greater than 2. You can add these sorts of restraints by employing the following biases, which all act on the set of collective variable values calculated by a multicolvar. So for example the following set of commands:

COM ATOMS=1-20 LABEL=c1
DISTANCES GROUPA=c1 GROUPB=1-20 LABEL=d1
UWALLS DATA=d1 AT=2.5 KAPPA=0.2 LABEL=sr


creates the aforementioned set of restraints on the distances between the 20 atoms in a cluster and the center of mass of the cluster.

The list of biases of this type are as follows:

 UWALLS Add UPPER_WALLS restraints on all the multicolvar values