PATH
This is part of the mapping module

Path collective variables with a more flexible framework for the distance metric being used.

The Path Collective Variables developed by Branduardi and co-workers [28] allow one to compute the progress along a high-dimensional path and the distance from the high-dimensional path. The progress along the path (s) is computed using:

\[ s = \frac{ \sum_{i=1}^N i \exp( -\lambda R[X - X_i] ) }{ \sum_{i=1}^N \exp( -\lambda R[X - X_i] ) } \]

while the distance from the path (z) is measured using:

\[ z = -\frac{1}{\lambda} \ln\left[ \sum_{i=1}^N \exp( -\lambda R[X - X_i] ) \right] \]

In these expressions \(N\) high-dimensional frames ( \(X_i\)) are used to describe the path in the high-dimensional space. The two expressions above are then functions of the distances from each of the high-dimensional frames \(R[X - X_i]\). Within PLUMED there are multiple ways to define the distance from a high-dimensional configuration. You could calculate the RMSD distance or you could calculate the amount by which a set of collective variables change. As such this implementation of the path CV allows one to use all the difference distance metrics that are discussed in Distances from reference configurations. This is as opposed to the alternative implementation of path (PATHMSD) which is a bit faster but which only allows one to use the RMSD distance.

The \(s\) and \(z\) variables are calculated using the above formulas by default. However, there is an alternative method of calculating these collective variables, which is detailed in [51]. This alternative method uses the tools of geometry (as opposed to algebra, which is used in the equations above). In this alternative formula the progress along the path \(s\) is calculated using:

\[ s = i_2 + \textrm{sign}(i_2-i_1) \frac{ \sqrt{( \mathbf{v}_1\cdot\mathbf{v}_2 )^2 - |\mathbf{v}_3|^2(|\mathbf{v}_1|^2 - |\mathbf{v}_2|^2) } }{2|\mathbf{v}_3|^2} - \frac{\mathbf{v}_1\cdot\mathbf{v}_3 - |\mathbf{v}_3|^2}{2|\mathbf{v}_3|^2} \]

where \(\mathbf{v}_1\) and \(\mathbf{v}_3\) are the vectors connecting the current position to the closest and second closest node of the path, respectfully and \(i_1\) and \(i_2\) are the projections of the closest and second closest frames of the path. \(\mathbf{v}_2\), meanwhile, is the vector connecting the closest frame to the second closest frame. The distance from the path, \(z\) is calculated using:

\[ z = \sqrt{ \left[ |\mathbf{v}_1|^2 - |\mathbf{v}_2| \left( \frac{ \sqrt{( \mathbf{v}_1\cdot\mathbf{v}_2 )^2 - |\mathbf{v}_3|^2(|\mathbf{v}_1|^2 - |\mathbf{v}_2|^2) } }{2|\mathbf{v}_3|^2} - \frac{\mathbf{v}_1\cdot\mathbf{v}_3 - |\mathbf{v}_3|^2}{2|\mathbf{v}_3|^2} \right) \right]^2 } \]

The symbols here are as they were for \(s\). If you would like to use these equations to calculate \(s\) and \(z\) then you should use the GPATH flag. The values of \(s\) and \(z\) can then be referenced using the gspath and gzpath labels.

Examples

In the example below the path is defined using RMSD distance from frames.

Click on the labels of the actions for more information on what each action computes
tested on v2.9
p1: PATH 
REFERENCE
compulsory keyword a pdb file containing the set of reference configurations
=file.pdb
TYPE
compulsory keyword ( default=OPTIMAL-FAST ) the manner in which distances are calculated.
=OPTIMAL
LAMBDA
compulsory keyword ( default=0 ) the value of the lambda parameter for paths
=500.0 PRINT
ARG
the input for this action is the scalar output from one or more other actions.
=p1.spath,p1.zpath
STRIDE
compulsory keyword ( default=1 ) the frequency with which the quantities of interest should be output
=1
FILE
the name of the file on which to output these quantities
=colvar
FMT
the format that should be used to output real numbers
=%8.4f

The reference frames in the path are defined in the pdb file shown below. In this frame each configuration in the path is separated by a line containing just the word END.

ATOM      1  CL  ALA     1      -3.171   0.295   2.045  1.00  1.00
ATOM      5  CLP ALA     1      -1.819  -0.143   1.679  1.00  1.00
ATOM      6  OL  ALA     1      -1.177  -0.889   2.401  1.00  1.00
ATOM      7  NL  ALA     1      -1.313   0.341   0.529  1.00  1.00
END
ATOM      1  CL  ALA     1      -3.175   0.365   2.024  1.00  1.00
ATOM      5  CLP ALA     1      -1.814  -0.106   1.685  1.00  1.00
ATOM      6  OL  ALA     1      -1.201  -0.849   2.425  1.00  1.00
ATOM      7  NL  ALA     1      -1.296   0.337   0.534  1.00  1.00
END
ATOM      1  CL  ALA     1      -2.990   0.383   2.277  1.00  1.00
ATOM      5  CLP ALA     1      -1.664  -0.085   1.831  1.00  1.00
ATOM      6  OL  ALA     1      -0.987  -0.835   2.533  1.00  1.00
ATOM      7  NL  ALA     1      -1.227   0.364   0.646  1.00  1.00
END

In the example below the path is defined using the values of two torsional angles (t1 and t2). In addition, the \(s\) and \(z\) are calculated using the geometric expressions described above rather than the algebraic expressions that are used by default.

Click on the labels of the actions for more information on what each action computes
tested on v2.9
t1: TORSION 
ATOMS
the four atoms involved in the torsional angle
=5,7,9,15 t2: TORSION
ATOMS
the four atoms involved in the torsional angle
=7,9,15,17 pp: PATH
TYPE
compulsory keyword ( default=OPTIMAL-FAST ) the manner in which distances are calculated.
=EUCLIDEAN
REFERENCE
compulsory keyword a pdb file containing the set of reference configurations
=epath.pdb
GPATH
calculate the position on the path using trigonometry The final value can be referenced using label.gpath.
NOSPATH
( default=off ) do not calculate the spath position
NOZPATH
( default=off ) do not calculate the zpath position
PRINT
ARG
the input for this action is the scalar output from one or more other actions.
=pp.*
FILE
the name of the file on which to output these quantities
=colvar

Notice that the LAMBDA parameter is not required here as we are not calculating \(s\) and \(s\) using the algebraic formulas defined earlier. The positions of the frames in the path are defined in the file epath.pdb. An extract from this file looks as shown below.

REMARK ARG=t1,t2 t1=-4.25053  t2=3.88053
END
REMARK ARG=t1,t2 t1=-4.11     t2=3.75
END
REMARK ARG=t1,t2 t1=-3.96947  t2=3.61947
END

The remarks in this pdb file tell PLUMED the labels that are being used to define the position in the high dimensional space and the values that these arguments have at each point on the path.

Glossary of keywords and components
Description of components

By default the value of the calculated quantity can be referenced elsewhere in the input file by using the label of the action. Alternatively this Action can be used to calculate the following quantities by employing the keywords listed below. These quantities can be referenced elsewhere in the input by using this Action's label followed by a dot and the name of the quantity required from the list below.

Quantity Keyword Description
gspath GPATH the position on the path calculated using trigonometry
gzpath GPATH the distance from the path calculated using trigonometry
Compulsory keywords
REFERENCE a pdb file containing the set of reference configurations
TYPE ( default=OPTIMAL-FAST ) the manner in which distances are calculated. More information on the different metrics that are available in PLUMED can be found in the section of the manual on Distances from reference configurations
LAMBDA ( default=0 ) the value of the lambda parameter for paths
Options
NUMERICAL_DERIVATIVES ( default=off ) calculate the derivatives for these quantities numerically
SERIAL ( default=off ) do the calculation in serial. Do not use MPI
TIMINGS ( default=off ) output information on the timings of the various parts of the calculation
DISABLE_CHECKS ( default=off ) disable checks on reference input structures.
NOZPATH ( default=off ) do not calculate the zpath position
NOSPATH

( default=off ) do not calculate the spath position

GPATH calculate the position on the path using trigonometry The final value can be referenced using label.gpath. You can use multiple instances of this keyword i.e. GPATH1, GPATH2, GPATH3... The corresponding values are then referenced using label.gpath-1, label.gpath-2, label.gpath-3...