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 [138] 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

UNITSNATURAL( default=off ) use natural unitsfcc:FCCUBIC ...SPECIES=1-96000this keyword is used for colvars such as coordination number.SWITCH={CUBIC D_0=1.2 D_MAX=1.5}This keyword is used if you want to employ an alternative to the continuous switching function defined above.ALPHA=27compulsory keyword ( default=3.0 )The alpha parameter of the angular functionPHI=0.0compulsory keyword ( default=0.0 )The Euler rotational angle phiTHETA=-1.5708compulsory keyword ( default=0.0 )The Euler rotational angle thetaPSI=-2.35619 ...compulsory keyword ( default=0.0 )The Euler rotational angle psidens2:MULTICOLVARDENSDATA=compulsory keywordthe multicolvar which you would like to calculate the density profile forfccORIGIN=1we will use the position of this atom as the origin.DIR=xyzcompulsory keywordthe direction in which to calculate the density profileNBINS=14,14,50the number of bins to use to represent the density profileZREDUCED( default=off ) limit the calculation of the density/average to a portion of the z-axis onlyZLOWER=6.0this is required if you are using ZREDUCED.ZUPPER=11.0this is required if you are using ZREDUCED.BANDWIDTH=1.0,1.0,1.0compulsory keywordthe bandwidths for kernel density estimationCLEAR=1compulsory keyword ( default=0 )the frequency with which to clear all the accumulated data.ss2:FIND_CONTOUR_SURFACEGRID=compulsory keywordthe action that creates the input grid you would like to usedens2CONTOUR=0.42compulsory keywordthe value we would like to draw the contour at in the spaceSEARCHDIR=zcompulsory keywordIn which directions do you wish to search for the contour.STRIDE=1compulsory keyword ( default=1 )the frequency with which the data should be collected and added to the quantity being averagedCLEAR=1 DUMPGRIDcompulsory keyword ( default=0 )the frequency with which to clear all the accumulated data.GRID=compulsory keywordthe action that creates the grid you would like to outputss2FILE=contour2.datcompulsory keyword ( default=density )the file on which to write the grid.FMT=%8.4fthe format that should be used to output real numbersSTRIDE=1compulsory keyword ( default=0 )the frequency with which the grid should be output to the file.

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