FIND_CONTOUR_SURFACE

Find an isocontour by searching along either the x, y or z direction.

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 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 value. In other words, for the function \(f(x,y,z)\) this action would find a set of points \(\{x_c,y_c,z_c\}\) that have:

\[ f(x_c,y_c,z_c) - c = 0 \]

where \(c\) is some constant value that is specified by the user. The points on this contour are find by searching along lines that run parallel to the \(x\), \(y\) or \(z\) axis of the simulation cell. The result is, therefore, a two dimensional function evaluated on a grid that gives us the height of the interface as a function of two coordinates.

It is important to note that this action can only be used to detect contours in three dimensional functions. In addition, this action will fail to find the full set of contour points if the contour does not have the same topology as an infinite plane. If you are uncertain that the isocontours in your function have the appropriate topology you should use FIND_CONTOUR in place of FIND_CONTOUR_SURFACE.

Examples

The input shown below was used to analyze the results from a simulation of an interface between solid and molten Lennard Jones. The interface between the solid and the liquid was set up in the plane perpendicular to the \(z\) direction of the simulation cell. The input below calculates something akin to a Willard-Chandler dividing surface [142] between the solid phase and the liquid phase. There are two of these interfaces within the simulation box because of the periodic boundary conditions but we were able to determine that one of these two surfaces lies in a particular part of the simulation box. The input below detects the height profile of one of these two interfaces. It does so by computing a phase field average of the FCCUBIC symmetry function using the MULTICOLVARDENS action. Notice that we use the fact that we know roughly where the interface is when specifying how this phase field is to be calculated and specify the region over the \(z\)-axis in which we are going to search for the phase field in the line defining the MULTICOLVARDENS. Once we have calculated the phase field we search for contour points on the lines that run parallel to the \(z\)-direction of the cell box using the FIND_CONTOUR_SURFACE command. The final result is a \(14 \times 14\) grid of values for the height of the interface as a function of the \((x,y)\) position. This grid is then output to a file called contour2.dat.

Notice that the commands below calculate the instantaneous position of the surface separating the solid and liquid and that as such the accumulated average is cleared on every step.

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
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 ... dens2: MULTICOLVARDENS
DATA
compulsory keyword the multicolvar which you would like to calculate the density profile for
=fcc
ORIGIN
we will use the position of this atom as the origin.
=1
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
=14,14,50
ZREDUCED
( default=off ) limit the calculation of the density/average to a portion of the z-axis only
ZLOWER
this is required if you are using ZREDUCED.
=6.0
ZUPPER
this is required if you are using ZREDUCED.
=11.0
BANDWIDTH
compulsory keyword the bandwidths for kernel density estimation
=1.0,1.0,1.0
CLEAR
compulsory keyword ( default=0 ) the frequency with which to clear all the accumulated data.
=1 ss2: FIND_CONTOUR_SURFACE
GRID
compulsory keyword the action that creates the input grid you would like to use
=dens2
CONTOUR
compulsory keyword the value we would like to draw the contour at in the space
=0.42
SEARCHDIR
compulsory keyword In which directions do you wish to search for the contour.
=z
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 DUMPGRID
GRID
compulsory keyword the action that creates the grid you would like to output
=ss2
FILE
compulsory keyword ( default=density ) the file on which to write the grid.
=contour2.dat
FMT
the format that should be used to output real numbers
=%8.4f
STRIDE
compulsory keyword ( default=0 ) the frequency with which the grid should be output to the file.
=1
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
SEARCHDIR In which directions do you wish to search for the contour.
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 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