Skip to content

Action: DISTANCE_FROM_SPHERICAL_CONTOUR

Module contour
Description Usage
Calculate the perpendicular distance from a Willard-Chandler dividing surface. used in 0 tutorialsused in 0 eggs

Details and examples

Calculate the perpendicular distance from a Willard-Chandler dividing surface.

This action works similarly to DISTANCE_FROM_CONTOUR. Within this action a field is constructed that measures the density of the system at each point in space using:

In this expression and are bandwidth parameters and is one of a Gaussian kernel function. With that field in place we can define a Willard-Chandler surface is defined a surface of constant density in the above field . In other words, we can define a set of points, , in the box which have:

where is some target density. In DISTANCE_FROM_CONTOUR we assume that this set of points lie on a manifold that has the same topology as one or multiple planes. Here, by contrast, we assume that this set of points lie on a manifold that has the same topology as a sphere. This action then returns the distance between this spherical manifold and the position of a test particle. This distance is measured along a vector perpendicular to the manifold.

Examples

The following input calculates a CONTACT_MATRIX between a set of atoms in which element is only non-zero if atoms and are within 6 nm of each other. We then use this matrix as input for a DFSCLUSTERING action that finds the largest connected component in the matrix. The CENTER of this cluster is then identified and the location of an isocontour in:

is found using this action. In this expression is 1 if atom is part of the largest cluster and zero otherwise, is the coordination number of atom and is a swtiching function. The distance between this isocontour and position of atom 513 as well as the distance between com (the center of the largest cluster) and the isocontour is then output to a file called colvar.

Click on the labels of the actions for more information on what each action computes
tested on2.11
ones: ONESCreate a constant vector with all elements equal to one This action is a shortcut. More details SIZEthe number of ones that you would like to create=512
# Calculate contact matrix
c1_mat: CONTACT_MATRIXAdjacency matrix in which two atoms are adjacent if they are within a certain cutoff. More details GROUPspecifies the list of atoms that should be assumed indistinguishable=1-512 SWITCHthe input for the switching function that acts upon the distance between each pair of atoms. Options for this keyword are explained in the documentation for LESS_THAN.={EXP D_0=4.0 R_0=0.5 D_MAX=6.0}
# Calculate coordination numbers
c1: MATRIX_VECTOR_PRODUCTCalculate the product of the matrix and the vector More details ARGthe label for the matrix and the vector/scalar that are being multiplied=c1_mat,ones
# Select coordination numbers that are more than 2.0
cf: MORE_THANUse a switching function to determine how many of the input variables are more than a certain cutoff. More details ARGthe values input to this function=c1 SWITCHThis keyword is used if you want to employ an alternative to the continuous swiching function defined above={RATIONAL D_0=2.0 R_0=0.1}
# Find largest cluster
dfs: DFSCLUSTERINGFind the connected components of the matrix using the depth first search clustering algorithm. More details ARGthe input matrix=c1_mat
clust1: CLUSTER_WEIGHTSSetup a vector that has one for all the atoms that form part of the cluster of interest and that has zero for all other atoms. More details CLUSTERSthe label of the action that does the clustering=dfs CLUSTER which cluster would you like to look at 1 is the largest cluster, 2 is the second largest, 3 is the the third largest and so on=1
com: CENTERCalculate the center for a group of atoms, with arbitrary weights. This action is a shortcut. More details ATOMSthe group of atoms that appear in the definition of this center=1-512 WEIGHTSwhat weights should be used when calculating the center=clust1 PHASES use trigonometric phases when computing position of center
# Filtered coordination numbers for atoms in largest cluster
ff: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=clust1,cf FUNCthe function you wish to evaluate=x*y PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO
# Now do the multicolvar surface
dd: DISTANCE_FROM_SPHERICAL_CONTOURCalculate the perpendicular distance from a Willard-Chandler dividing surface. This action has hidden defaults. More details ARGthe label of the weights to use when constructing the density=ff POSITIONSthe positions of the atoms that we are calculating the contour from=1-512 ATOMThe atom whose perpendicular distance we are calculating from the contour=513 ORIGINThe position of the center of the region that the contour encloses=com BANDWIDTHthe bandwidths for kernel density esimtation=1.0,1.0,1.0 CONTOURthe value we would like for the contour=0.5
PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=dd.* FILEthe name of the file on which to output these quantities=colvar

Input

The arguments and atoms that serve as the input for this action are specified using one or more of the keywords in the following table.

Keyword Type Description
ARG vector the label of the weights to use when constructing the density
POSITIONS atoms the positions of the atoms that we are calculating the contour from
ATOM atoms The atom whose perpendicular distance we are calculating from the contour
ORIGIN atoms The position of the center of the region that the contour encloses

Output components

This action calculates the values in the following table. These values can be referenced elsewhere in the input by using this Action's label followed by a dot and the name of the value required from the list below.

Name Type Description
dist scalar the distance between the reference atom and the nearest contour
radius scalar the radial distance from the center of the contour to the edge

Full list of keywords

The following table describes the keywords and options that can be used with this action

Keyword Type Default Description
ARG input none the label of the weights to use when constructing the density
POSITIONS input none the positions of the atoms that we are calculating the contour from
ATOM input none The atom whose perpendicular distance we are calculating from the contour
ORIGIN input none The position of the center of the region that the contour encloses
BANDWIDTH compulsory none the bandwidths for kernel density esimtation
KERNEL compulsory GAUSSIAN the kernel function you are using
CUTOFF compulsory 6.25 the cutoff at which to stop evaluating the kernel functions is set equal to sqrt(2x)bandwidth in each direction where x is this number
CONTOUR compulsory none the value we would like for the contour

References

More information about how this action can be used is available in the following articles: