From 4a292c78041be902f8050af31c2644b9a341d365 Mon Sep 17 00:00:00 2001
From: Gareth Tribello <gareth.tribello@gmail.com>
Date: Thu, 27 Mar 2014 23:00:25 +0000
Subject: [PATCH] Changed manual to include descriptions of distances

---
 src/colvar/DRMSD.cpp    |  2 +-
 src/colvar/RMSD.cpp     |  2 +-
 src/function/Target.cpp |  2 +-
 user-doc/Colvar.txt     | 23 ++++++++++++++++++++++-
 user-doc/extract        |  7 ++++++-
 5 files changed, 31 insertions(+), 5 deletions(-)

diff --git a/src/colvar/DRMSD.cpp b/src/colvar/DRMSD.cpp
index a2149d6bd..f21d6df0a 100644
--- a/src/colvar/DRMSD.cpp
+++ b/src/colvar/DRMSD.cpp
@@ -31,7 +31,7 @@ using namespace std;
 namespace PLMD{
 namespace colvar{
 
-//+PLUMEDOC COLVAR DRMSD
+//+PLUMEDOC DCOLVAR DRMSD
 /*
 Calculate the distance RMSD with respect to a reference structure. 
 
diff --git a/src/colvar/RMSD.cpp b/src/colvar/RMSD.cpp
index 217489716..b1fc452ac 100644
--- a/src/colvar/RMSD.cpp
+++ b/src/colvar/RMSD.cpp
@@ -48,7 +48,7 @@ public:
 
 using namespace std;
 
-//+PLUMEDOC COLVAR RMSD
+//+PLUMEDOC DCOLVAR RMSD
 /*
 Calculate the RMSD with respect to a reference structure.  
 
diff --git a/src/function/Target.cpp b/src/function/Target.cpp
index eca0cc604..819a8e9f7 100644
--- a/src/function/Target.cpp
+++ b/src/function/Target.cpp
@@ -32,7 +32,7 @@ using namespace std;
 namespace PLMD {
 namespace function{
 
-//+PLUMEDOC FUNCTION TARGET
+//+PLUMEDOC DCOLVAR TARGET
 /*
 This function measures the pythagorean distance from a particular structure measured in the space defined by some 
 set of collective variables.
diff --git a/user-doc/Colvar.txt b/user-doc/Colvar.txt
index e4fbd073a..f5628aef4 100644
--- a/user-doc/Colvar.txt
+++ b/user-doc/Colvar.txt
@@ -99,10 +99,31 @@ using the ALIGN_ATOMS keyword.  In PLUMED 2 the same effect can be acchieved usi
 
 \section cvavail CV Documentation
 
-The following list contains all the colvars that are currently implemented in PLUMED 2.
+The following list contains descriptions of a number of the colvars that are currently implemented in PLUMED 2.
 
 @COLVAR@
 
+\section dists Distances from reference configurations
+
+One colvar that has been shown to be very sucessful in studying protein folding is the distance between the instantaneous configuration
+and a reference configuration - often the structure of the folded state.  When the free energy of a protein is shown as a function
+of this collective variable there is a minima for low values of the CV, which is due to the folded state of the protein.  There is 
+then a second minima at higher values of the CV, which is the minima corresponding to the unfolded state.
+
+A slight problem with this sort of collective variable is that there are many different ways of calculating the distance from a 
+particular reference structure.  The simplest - adding together the distances by which each of the atoms has been translated in
+going from the reference configuration to the instantanous configuration - is not particularly sensible.  A distance calculated
+in this way does not neglect translation of the center of mass of the molecule and rotation of the frame of reference.  A common practise
+is thus to remove these components by calculating the \ref RMSD distance between the reference and instantaneous configurations.
+This is not the only way to calculate the distance, however.  One could also calculate the total ammount by which a large number 
+of collective variables change in moving from the reference to the instaneous configurations.  One could even combine RMSD distances
+with the ammount the collective variables change.  A full list of the ways distances can be measured in PLUMED is given below:
+
+@DCOLVAR@
+
+These options for calculating distances are re-used in a number of places in the code.  For instance they are used in some of the 
+analysis algorithms that are implemented in PLUMED and in \ref PATH collective variables. 
+
 \section mcolv MultiColvar Documentation
 
 Often you do not need one of the collective variables described in the previous section.  What you want instead is a 
diff --git a/user-doc/extract b/user-doc/extract
index d81af3cc6..d925a4c81 100755
--- a/user-doc/extract
+++ b/user-doc/extract
@@ -57,7 +57,7 @@ awk 'BEGIN{gfile="automatic/GLOSSARY1.list"; dfile="automatic/DICTIONARY1.list";
      if(inside==3){ printf "%s", $0 > dfile; }
   }
   if($1=="//+PLUMEDOC"){
-    if( $2=="TOPOLOGY" || $2=="COLVAR" || $2=="MCOLVAR" || $2=="MCOLVARF" || $2=="FUNCTION" || $2=="ANALYSIS" || $2=="BIAS" || $2=="GENERIC" || $2=="VATOM" || $2=="TOOLS" ){
+    if( $2=="TOPOLOGY" || $2=="COLVAR" || $2=="MCOLVAR" || $2=="DCOLVAR"|| $2=="MCOLVARF" || $2=="FUNCTION" || $2=="ANALYSIS" || $2=="BIAS" || $2=="GENERIC" || $2=="VATOM" || $2=="TOOLS" ){
       lfile="automatic/"$2".list"
       
       print "<tr> <td width=5%> \\subpage ", $3,"</td> <td>" > lfile
@@ -215,6 +215,11 @@ cat $file.txt |
     echo "<table align=center frame=void width=95%% cellpadding=5%%>"
     cat automatic/MCOLVAR.list
     echo "</table>"
+  elif [ "$LINE" = "@DCOLVAR@" ]
+  then
+    echo "<table align=center frame=void width=95%% cellpadding=5%%>"
+    cat automatic/DCOLVAR.list
+    echo "</table>"
   elif [ "$LINE" = "@MCOLVARF@" ]
   then
     echo "<table align=center frame=void width=95%% cellpadding=5%%>"
-- 
GitLab