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 calculated 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:

https://en.wikipedia.org/wiki/Marching_squares https://en.wikipedia.org/wiki/Marching_cubes

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.

Examples

The input below allows you to calculate something akin to a Willard-Chandler dividing surface [138]. 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.

Click on the labels of the actions for more information on what each action computes
tested on v2.8
UNITS 
NATURAL
( default=off ) use natural units
fcc: FCCUBIC ...
SPECIES
this keyword is used for colvars such as coordination number.
=1-96000
SWITCH
This keyword is used if you want to employ an alternative to the continuous switching function defined above.
={CUBIC D_0=1.2 D_MAX=1.5}
ALPHA
compulsory keyword ( default=3.0 ) The alpha parameter of the angular function
=27
PHI
compulsory keyword ( default=0.0 ) The Euler rotational angle phi
=0.0
THETA
compulsory keyword ( default=0.0 ) The Euler rotational angle theta
=-1.5708
PSI
compulsory keyword ( default=0.0 ) The Euler rotational angle psi
=-2.35619 ... tfcc: MTRANSFORM_MORE
DATA
compulsory keyword The multicolvar that calculates the set of base quantities that we are interested in
=fcc
LOWMEM
( default=off ) lower the memory requirements
SWITCH
This keyword is used if you want to employ an alternative to the continuous switching function defined above.
={SMAP R_0=0.5 A=8 B=8} center: CENTER_OF_MULTICOLVAR
DATA
compulsory keyword find the average value for a multicolvar
=tfcc dens: MULTICOLVARDENS ...
DATA
compulsory keyword the multicolvar which you would like to calculate the density profile for
=tfcc
ORIGIN
we will use the position of this atom as the origin.
=center
DIR
compulsory keyword the direction in which to calculate the density profile
=xyz
NBINS
the number of bins to use to represent the density profile
=80,80,80
BANDWIDTH
compulsory keyword the bandwidths for kernel density estimation
=1.0,1.0,1.0
STRIDE
compulsory keyword ( default=1 ) the frequency with which the data should be collected and added to the quantity being averaged
=1
CLEAR
compulsory keyword ( default=0 ) the frequency with which to clear all the accumulated data.
=1 ... FIND_CONTOUR
GRID
compulsory keyword the action that creates the input grid you would like to use
=dens
CONTOUR
compulsory keyword the value we would like to draw the contour at in the space
=0.5
FILE
compulsory keyword file on which to output coordinates
=mycontour.xyz
Glossary of keywords and components
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
NORMALIZATION ( default=true ) This controls how the data is normalized it can be set equal to true, false or ndata. The differences between these options are explained in the manual page for HISTOGRAM
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
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
FILE file on which to output coordinates
UNITS ( default=PLUMED ) the units in which to print out the coordinates. PLUMED means internal PLUMED units
Options
SERIAL ( default=off ) do the calculation in serial. Do not use MPI
LOWMEM ( default=off ) lower the memory requirements
TIMINGS

( default=off ) output information on the timings of the various parts of the calculation

LOGWEIGHTS list of actions that calculates log weights that should be used to weight configurations when calculating averages
CONCENTRATION the concentration parameter for Von Mises-Fisher distributions
COMPONENT if your input is a vector field use this to specify the component of the input vector field for which you wish to use
PRECISION The number of digits in trajectory file