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

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 [116]. 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 master
UNITS 
NATURAL
( default=off ) use natural units
fcc: FCCUBIC ...
SPECIES
this keyword is used for colvars such as coordination number.
=1-96000
SWITCH
the switching function that it used in the construction of the contact matrix
={CUBIC D_0=1.2 D_MAX=1.5}
ALPHA
compulsory keyword ( default=3.0 ) The alpha parameter of the angular function that is used for FCCUBIC
=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
could not find this keyword
=fcc
LOWMEM
could not find this keyword
SWITCH
could not find this keyword
={SMAP R_0=0.5 A=8 B=8} center: CENTER_OF_MULTICOLVAR
DATA
could not find this keyword
=tfcc dens: MULTICOLVARDENS ...
DATA
the multicolvar which you would like to calculate the density profile for
=tfcc
ORIGIN
compulsory keyword 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 in each direction (alternative to GRID_NBIN)
=80,80,80
BANDWIDTH
the bandwidths for kernel density esimtation
=1.0,1.0,1.0
STRIDE
compulsory keyword ( default=1 ) the frequency with which to accumulate the densities
=1
CLEAR
compulsory keyword ( default=0 ) the frequency with which to clear the density
=1 ... FIND_CONTOUR
GRID
could not find this keyword
=dens
CONTOUR
compulsory keyword the value we would like to draw the contour at in the space
=0.5
FILE
could not find this keyword
=mycontour.xyz
Glossary of keywords and components
Compulsory keywords
CONTOUR the value we would like to draw the contour at in the space
INTERPOLATION_TYPE ( default=spline ) the method to use for interpolation. Can be spline, linear, ceiling or floor.
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
ZERO_OUTSIDE_GRID_RANGE

( default=off ) if we are asked to evaluate the function for a number that is outside the range of the grid set it to zero

ARG the input for this action is the scalar output from one or more other actions. The particular scalars that you will use are referenced using the label of the action. If the label appears on its own then it is assumed that the Action calculates a single scalar value. The value of this scalar is thus used as the input to this new action. If * or *.* appears the scalars calculated by all the proceeding actions in the input file are taken. Some actions have multi-component outputs and each component of the output has a specific label. For example a DISTANCE action labelled dist may have three components x, y and z. To take just the x component you should use dist.x, if you wish to take all three components then use dist.*.More information on the referencing of Actions can be found in the section of the manual on the PLUMED Getting Started. Scalar values can also be referenced using POSIX regular expressions as detailed in the section on Regular Expressions. To use this feature you you must compile PLUMED with the appropriate flag.. You can use multiple instances of this keyword i.e. ARG1, ARG2, ARG3...