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

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 psitfcc:MTRANSFORM_MOREDATA=compulsory keywordThe multicolvar that calculates the set of base quantities that we are interested infccLOWMEM( default=off ) lower the memory requirementsSWITCH={SMAP R_0=0.5 A=8 B=8}This keyword is used if you want to employ an alternative to the continuous switching function defined above.center:CENTER_OF_MULTICOLVARDATA=compulsory keywordfind the average value for a multicolvartfccdens:MULTICOLVARDENS ...DATA=compulsory keywordthe multicolvar which you would like to calculate the density profile fortfccORIGIN=we will use the position of this atom as the origin.centerDIR=xyzcompulsory keywordthe direction in which to calculate the density profileNBINS=80,80,80the number of bins to use to represent the density profileBANDWIDTH=1.0,1.0,1.0compulsory keywordthe bandwidths for kernel density estimationSTRIDE=1compulsory keyword ( default=1 )the frequency with which the data should be collected and added to the quantity being averagedCLEAR=1 ... FIND_CONTOURcompulsory keyword ( default=0 )the frequency with which to clear all the accumulated data.GRID=compulsory keywordthe action that creates the input grid you would like to usedensCONTOUR=0.5compulsory keywordthe value we would like to draw the contour at in the spaceFILE=mycontour.xyzcompulsory keywordfile on which to output coordinates

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