FIND_CONTOUR

Find an isocontour in a smooth function.

As discussed in the part of the manual on Analysis PLUMED contains a number of tools that allow you to calculate a function on a grid. The function on this grid might be a HISTOGRAM as a function of a few collective variables or it might be a phase field that has been calcualted using MULTICOLVARDENS. If this function has one or two input arguments it is relatively straightforward to plot the function. If by contrast the data has a three or more dimensions it can be difficult to visualize.

This action provides one tool for visualizing these functions. It can be used to search for a set of points on a contour where the function takes a particular values. In other words, for the function $$f(x,y)$$ this action would find a set of points $$\{x_c,y_c\}$$ that have:

$f(x_c,y_c) - c = 0$

where $$c$$ is some constant value that is specified by the user. The points on this contour are detected using a variant on the marching squares or marching cubes algorithm, which you can find information on here:

As such, and unlike FIND_CONTOUR_SURFACE or FIND_SPHERICAL_CONTOUR, the function input to this action can have any dimension. Furthermore, the topology of the contour will be determined by the algorithm and does not need to be specified by the user.

Compulsory keywords
 STRIDE ( default=1 ) the frequency with which the data should be collected and added to the quantity being averaged CLEAR ( default=0 ) the frequency with which to clear all the accumulated data. The default value of 0 implies that all the data will be used and that the grid will never be cleared GRID the action that creates the input grid you would like to use CONTOUR the value we would like to draw the contour at in the space FILE file on which to output coordinates UNITS ( default=PLUMED ) the units in which to print out the coordinates. PLUMED means internal PLUMED units BUFFER ( default=0 ) number of buffer grid points around location where grid was found on last step. If this is zero the full grid is calculated on each step
Options
 SERIAL ( default=off ) do the calculation in serial. Do not parallelize LOWMEM ( default=off ) lower the memory requirements TIMINGS ( default=off ) output information on the timings of the various parts of the calculation UNORMALIZED ( default=off ) output the unaveraged quantity/quantities. LOGWEIGHTS list of actions that calculates log weights that should be used to weight configurations when calculating averages COMPONENT if your input is a vector field use this to specifiy the component of the input vector field for which you wish to use PRECISION The number of digits in trajectory file
Examples

The input below allows you to calculate something akin to a Willard-Chandler dividing surface [70]. The simulation cell in this case contains a solid phase and a liquid phase. The Willard-Chandler surface is the surface that separates the parts of the box containing the solid from the parts containing the liquid. To compute the position of this surface the FCCUBIC symmetry function is calculated for each of the atoms in the system from on the geometry of the atoms in the first coordination sphere of each of the atoms. These quantities are then transformed using a switching function. This procedure generates a single number for each atom in the system and this quantity has a value of one for atoms that are in parts of the box that resemble the solid structure and zero for atoms that are in parts of the box that resemble the liquid. The position of a virtual atom is then computed using CENTER_OF_MULTICOLVAR and a phase field model is constructed using MULTICOLVARDENS. These procedure ensures that we have a continuous function that gives a measure of the average degree of solidness at each point in the simulation cell. The Willard-Chandler dividing surface is calculated by finding a a set of points at which the value of this phase field is equal to 0.5. This set of points is output to file called mycontour.dat. A new contour is found on every single step for each frame that is read in.

UNITS NATURAL
FCCUBIC ...
SPECIES=1-96000 SWITCH={CUBIC D_0=1.2 D_MAX=1.5}
ALPHA=27 PHI=0.0 THETA=-1.5708 PSI=-2.35619 LABEL=fcc
... FCCUBIC

tfcc: MTRANSFORM_MORE DATA=fcc SWITCH={SMAP R_0=0.5 A=8 B=8}
center: CENTER_OF_MULTICOLVAR DATA=tfcc

MULTICOLVARDENS ...
DATA=tfcc ORIGIN=center DIR=xyz LABEL=dens
NBINS=80,80,80 BANDWIDTH=1.0,1.0,1.0 STRIDE=25
LABEL=dens STRIDE=1 CLEAR=1
... MULTICOLVARDENS

FIND_CONTOUR GRID=dens CONTOUR=0.5 FILE=mycontour.dat