From bd82af10fefa6b3c0717e216519d71861a9311e9 Mon Sep 17 00:00:00 2001
From: Giovanni Bussi <giovanni.bussi@gmail.com>
Date: Mon, 26 Jun 2017 10:13:20 +0200
Subject: [PATCH] Improved doc for ermsd

[makedoc]
---
 src/colvar/ERMSD.cpp  | 9 +++++++++
 src/setup/MolInfo.cpp | 6 ++++++
 2 files changed, 15 insertions(+)

diff --git a/src/colvar/ERMSD.cpp b/src/colvar/ERMSD.cpp
index 3602df086..b4148019d 100644
--- a/src/colvar/ERMSD.cpp
+++ b/src/colvar/ERMSD.cpp
@@ -73,6 +73,14 @@ eRMSD = \sqrt{\frac{1}{N} \sum_{j,k} \vert \vec{G}(\tilde{\vec{r}}_{jk}^{\alpha}
 
 Using the default cutoff, two structures with eRMSD of 0.7 or lower can be considered as significantly similar. A full description of the eRMSD can be found in \cite bott14
 
+ERMSD is computed using the position of three atoms on the 6-membered ring of each involved nucleobase. The atoms should be:
+- C2,C4,C6 for pyrimdines
+- C2,C6,C4 for purines
+
+The different order for purines and pyrimidines is fundamental and allows you to compute ERMSD between structures with different
+sequences as well! Notice that the simplest way to avoid mistakes in choosing these atoms is to use the `@lcs-#` strings
+as shown in the examples (see also \ref MOLINFO).
+
 \warning Notice that the ERMSD implemented here is not integrated with the other metrics in plumed. As a consequence, it is not (yet) possible
 to e.g. build path collective variables using ERMSD
 
@@ -85,6 +93,7 @@ Calculate the eRMSD from reference structure reference.pdb using the default cut
 considering residues 1,2,3,4,5,6.
 
 \verbatim
+MOLINFO STRUCTURE=reference.pdb
 eRMSD1: ERMSD REFERENCE=reference.pdb ATOMS=@lcs-1,@lcs-2,@lcs-3,@lcs-4,@lcs-5,@lcs-6
 \endverbatim
 
diff --git a/src/setup/MolInfo.cpp b/src/setup/MolInfo.cpp
index 33f0cffb2..8d1607164 100644
--- a/src/setup/MolInfo.cpp
+++ b/src/setup/MolInfo.cpp
@@ -90,6 +90,12 @@ For DNA or RNA residues, the following groups are available:
 @back-#
 @sugar-#
 @base-#
+
+# ordered triplets of atoms on the 6-membered ring of nucleobases
+# namely:
+#  C2/C4/C6 for pyrimidines
+#  C2/C6/C4 for purines
+@lcs-#
 \endverbatim
 
 Notice that `zeta` and `epsilon` groups should not be used on 3' end residue and `alpha` and `beta`
-- 
GitLab