Skip to content
Snippets Groups Projects
Commit 8fce4e10 authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Moved tutorial on mindist

[makedoc]
parent 11f2a55f
No related branches found
No related tags found
No related merge requests found
/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ /* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Copyright (c) 2012-2014 The plumed team Copyright (c) 2012-2015 The plumed team
(see the PEOPLE file at the root of the distribution for a list of names) (see the PEOPLE file at the root of the distribution for a list of names)
See http://www.plumed-code.org for more information. See http://www.plumed-code.org for more information.
...@@ -70,6 +70,52 @@ DISTANCES GROUPA=1 GROUPB=2,3 MORE_THAN={RATIONAL R_0=0.1} ...@@ -70,6 +70,52 @@ DISTANCES GROUPA=1 GROUPB=2,3 MORE_THAN={RATIONAL R_0=0.1}
PRINT ARG=d1.gt0.1 PRINT ARG=d1.gt0.1
\endverbatim \endverbatim
(See also \ref PRINT \ref switchingfunction) (See also \ref PRINT \ref switchingfunction)
\par Calculating minimum distances
To calculate and print the minimum distance between two groups of atoms you use the following commands
\verbatim
d1: DISTANCES GROUPA=1-10 GROUPB=11-20 MIN={BETA=500.}
PRINT ARG=d1.min FILE=colvar STRIDE=10
\endverbatim
(see \ref DISTANCES and \ref PRINT)
In order to ensure differentiability the minimum is calculated using the following function:
\f[
s = \frac{\beta}{ \log \sum_i \exp\left( \frac{\beta}{s_i} \right) }
\f]
where \f$\beta\f$ is a user specified parameter.
This input is used rather than a separate MINDIST colvar so that the same routine and the same input style can be
used to calculate minimum coordinatetion numbers (see \ref COORDINATIONNUMBER), minimum
angles (see \ref ANGLES) and many other variables.
This new way of calculating mindist is part of plumed 2's multicolvar functionality. These special actions
allow you to calculate multiple functions of a distribution of simple collective variables. As an example you
can calculate the number of distances less than 1.0, the minimum distance, the number of distances more than
2.0 and the number of distances between 1.0 and 2.0 by using the following command:
\verbatim
DISTANCES ...
GROUPA=1-10 GROUPB=11-20
LESS_THAN={RATIONAL R_0=1.0}
MORE_THAN={RATIONAL R_0=2.0}
BETWEEN={GAUSSIAN LOWER=1.0 UPPER=2.0}
MIN={BETA=500.}
... DISTANCES
PRINT ARG=d1.lessthan,d1.morethan,d1.between,d1.min FILE=colvar STRIDE=10
\endverbatim
(see \ref DISTANCES and \ref PRINT)
A calculation performed this way is fast because the expensive part of the calculation - the calculation of all the distances - is only
done once per step. Furthermore, it can be made faster by using the TOL keyword to discard those distance that make only a small contributions
to the final values together with the NL_STRIDE keyword, which ensures that the distances that make only a small contribution to the final values aren't
calculated at every step.
*/ */
//+ENDPLUMEDOC //+ENDPLUMEDOC
......
/**
\page mindist Calculating a minimum distance
To calculate and print the minimum distance between two groups of atoms you use the following commands
\verbatim
d1: DISTANCES GROUPA=1-10 GROUPB=11-20 MIN={BETA=500.}
PRINT ARG=d1.min FILE=colvar STRIDE=10
\endverbatim
(see \ref DISTANCES and \ref PRINT)
In order to ensure differentiability the minimum is calculated using the following function:
\f[
s = \frac{\beta}{ \log \sum_i \exp\left( \frac{\beta}{s_i} \right) }
\f]
where \f$\beta\f$ is a user specified parameter.
This input is used rather than a separate MINDIST colvar so that the same routine and the same input style can be
used to calculate minimum coordinatetion numbers (see \ref COORDINATIONNUMBER), minimum
angles (see \ref ANGLES) and many other variables.
This new way of calculating mindist is part of plumed 2's multicolvar functionality. These special actions
allow you to calculate multiple functions of a distribution of simple collective variables. As an example you
can calculate the number of distances less than 1.0, the minimum distance, the number of distances more than
2.0 and the number of distances between 1.0 and 2.0 by using the following command:
\verbatim
DISTANCES ...
GROUPA=1-10 GROUPB=11-20
LESS_THAN={RATIONAL R_0=1.0}
MORE_THAN={RATIONAL R_0=2.0}
BETWEEN={GAUSSIAN LOWER=1.0 UPPER=2.0}
MIN={BETA=500.}
... DISTANCES
PRINT ARG=d1.lessthan,d1.morethan,d1.between,d1.min FILE=colvar STRIDE=10
\endverbatim
(see \ref DISTANCES and \ref PRINT)
A calculation performed this way is fast because the expensive part of the calculation - the calculation of all the distances - is only
done once per step. Furthermore, it can be made faster by using the TOL keyword to discard those distance that make only a small contributions
to the final values together with the NL_STRIDE keyword, which ensures that the distances that make only a small contribution to the final values aren't
calculated at every step.
*/
link: @subpage mindist
description: This tutorial explains how to calculate the minimum distance between groups of atoms and serves as an introduction to MultiColvars
...@@ -126,7 +126,7 @@ equivalent. You should read the documentation for the Plumed 2 Action. ...@@ -126,7 +126,7 @@ equivalent. You should read the documentation for the Plumed 2 Action.
</TR> </TR>
<TR> <TR>
<TD> MINDIST </TD> <TD> MINDIST </TD>
<TD> \ref DISTANCES with keyword MIN (See also \ref mindist) </TD> <TD> \ref DISTANCES with keyword MIN </TD>
</TR> </TR>
<TR> <TR>
<TD> ANGLE </TD> <TD> ANGLE </TD>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment