From 186a4dee6840c7ea250fae244caa473b2e22b57b Mon Sep 17 00:00:00 2001
From: Carlo Camilloni <carlo.camilloni@gmail.com>
Date: Mon, 12 Sep 2016 19:36:45 +0200
Subject: [PATCH] belfast-nmr: updated to current syntax [makedoc]

---
 user-doc/tutorials/belfast-9a.txt             | 59 ++++++++-----------
 .../tutorials/belfast-9a/first/plumed.dat     |  3 +-
 .../tutorials/belfast-9a/second/plumed.dat    | 12 ++--
 .../tutorials/belfast-9a/third/plumed.dat     | 38 +++++++-----
 4 files changed, 56 insertions(+), 56 deletions(-)

diff --git a/user-doc/tutorials/belfast-9a.txt b/user-doc/tutorials/belfast-9a.txt
index d8107cfbb..f97fedd5e 100644
--- a/user-doc/tutorials/belfast-9a.txt
+++ b/user-doc/tutorials/belfast-9a.txt
@@ -18,7 +18,7 @@ The <a href="tutorial-resources/belfast-9a.tar.gz" download="belfast-9a.tar.gz">
 - system: the files use to generate the topol?.tpr files of the first and second example
 - first: an example on the use of chemical shifts as a collective variable
 - second: an example on the use of chemical shifts as replica-averaged restraints
-- third: an example on the use of RDCs (calculated with the theta-method) as replica-averaged restrains 
+- third: an example on the use of RDCs (calculated with the theta-method) as replica-averaged restraints 
 
 \section belfast-9-ins Instructions
 
@@ -27,20 +27,14 @@ The <a href="tutorial-resources/belfast-9a.tar.gz" download="belfast-9a.tar.gz">
 In the former tutorials it has been often discussed the possibility of measuring a distance with respect to a structure representing
 some kind of state for a system, i.e. \ref belfast-5. An alternative possibility is to use as a reference a set of experimental data
 that represent a state and measure the current deviation from the set. In plumed there are currently implemented the following NMR
-experimental observables: Chemical Shifts (only for proteins) \ref CS2BACKBONE and \ref CH3SHIFTS, \ref NOE distances and Residual Dipolar
-couplings \ref RDC. In addition \ref NOE collective variable can be also used for PRE distances and 3J Couplings can be implemented using
-\ref TORSION and \ref MATHEVAL. Among the above listed collective variables those based on chemical shifts make use of an external library, 
-ALMOST, that  must be downloaded and compiled separately. In addition plumed must be configured in such a way to link ALMOST. 
-Detailed instructions on how to compile PLUMED with ALMOST can be found in \ref CS2BACKBONE.
+experimental observables: Chemical Shifts (only for proteins) \ref CS2BACKBONE, \ref NOE distances, \ref JCOUPLING, \ref PRE intensities, 
+and Residual Dipolar couplings/pseudocontact shifts \ref RDC. 
 
-In the following we will write the CS2BACKBONE collective variable that has been used in Gratana et al. (2013).
+In the following we will write the \ref CS2BACKBONE collective variable that has been used in Gratana et al. (2013).
 
 \verbatim
 prot: GROUP ATOMS=1-862
-WHOLEMOLECULES ENTITY0=prot
-
-cs: CS2BACKBONE ATOMS=prot DATA=data FF=a03_gromacs.mdb NRES=56 FLAT=1.0 WRITE_CS=50 
-
+cs: CS2BACKBONE ATOMS=prot DATA=data NRES=56 CAMSHIFT 
 PRINT ARG=cs FILE=COLVAR STRIDE=100
 
 ENDPLUMED
@@ -52,7 +46,6 @@ folder (see first example in the resources tarball), one file for each nucleus.
 (i.e. CB of GLY) or where it has not been assigned. Additionally the data folder contains:
 
 - camshift.db: this file is a parameter file for camshift, it is a standard file needed to calculate the chemical shifts from a structure
-- a03_gromacs.mdb: this is a Amber force field in ALMOST format and it is used to map the atom names from plumed and almost (in this case we are using amber for our simulation)
 - template.pdb: this is a pdb file for the protein we are simulating (i.e. editconf -f conf.gro -o template.pdb) where atoms are ordered in the same way in which are included in the main code and again it is used to map the atom in plumed with those in almost.
 
 This example can be executed as
@@ -70,14 +63,12 @@ is already a fortunate outcome. In order to increase the accuracy of a force fie
 to add to the force-field an additional term based on the agreement with a set of experimental data. This agreement is not enforced
 as a simple restraint because this would mean to ask the system to be always in agreement with all the experimental data at the
 same time, instead the restraint is applied over an AVERAGED COLLECTIVE VARIABLE where the average is performed over multiple
-identical simulations. In this way the is not a single replica that must be in agreement with the experimental data but they should
-be in agreement on average. It has been shown that this approach is equivalent in solving the problem of finding a modified
+ independent simulations of the same system in the same conditions. 
+In this way the is not a single replica that must be in agreement with the experimental data but they should
+be in agreement on average. It has been shown that this approach is equivalent to solving the problem of finding a modified
 version of the force field that will reproduce the provided set of experimental data withouth any additional assumption on the
 data themselves.
 
-Currently ENSEMBLE AVERAGING of a collective variable can be performed only using the NMR variables (\ref CS2BACKBONE, \ref CH3SHIFTS,
-\ref NOE and \ref RDC).
-
 The second example included in the resources show how the amber force field can be improved in the case of protein domain GB3 using
 the native state chemical shifts a replica-averaged restraint. By the fact that replica-averaging needs the use of multiple replica
 simulated in parallel in the same conditions it is easily complemented with BIAS-EXCHANGE or MULTIPLE WALKER metadynamics to enhance
@@ -85,22 +76,24 @@ the sampling.
 
 \verbatim
 prot: GROUP ATOMS=1-862
-WHOLEMOLECULES ENTITY0=prot
-
-cs: CS2BACKBONE ATOMS=prot DATA=data FF=a03_gromacs.mdb NRES=56 FLAT=0.0 WRITE_CS=500 ENSEMBLE
-
-cse: RESTRAINT ARG=cs AT=0. KAPPA=0. SLOPE=24
+cs: CS2BACKBONE ATOMS=prot DATA=data NRES=56
+enscs: ENSEMBLE ARG=(cs\.hn_.*),(cs\.nh_.*),(cs\.ca_.*),(cs\.cb_.*),(cs\.co_.*),(cs\.ha_.*)
+stcs: STATS ARG=enscs.* SQDEVSUM PARARG=(cs\.exphn_.*),(cs\.expnh_.*),(cs\.expca_.*),(cs\.expcb_.*),(cs\.expco_.*),(cs\.expha_.*)
+res: RESTRAINT ARG=stcs.sqdevsum AT=0. KAPPA=0. SLOPE=12
 
-PRINT ARG=cs FILE=COLVAR STRIDE=10
+PRINT ARG=(cs\.hn_.*),(cs\.nh_.*),(cs\.ca_.*),(cs\.cb_.*),(cs\.co_.*),(cs\.ha_.*) FILE=CS STRIDE=1000
+PRINT ARG=res.bias FILE=COLVAR STRIDE=10
 
 ENDPLUMED
 \endverbatim
 
-with respect to the case in which chemical shifts are used to define a standard collective variable, in this case the keyword ENSEMBLE
-tells plumed to calculate all the chemical shifts from the replicas (i.e. 4 replicas) average them and only after the averaging calculate
-the difference with respect to the experimental ones. On this difference that is the AVERAGED Collective Variable it is possible to apply
-a linear \ref RESTRAINT (because the variable is already a sum of squared differences) that is the new term we are adding to the underlying
-force field.
+with respect to the case in which chemical shifts are used to define a standard collective variable, in this case \ref CS2BACKBONE
+is a collective variable with multiple components, that are all the backcalculated chemical shifts, plus all the relative experimental
+values. The keyword function \ref ENSEMBLE tells plumed to calculate the average of the arguments over the replicas (i.e. 4 replicas) 
+and the function \ref STATS compare the averaged back calculated chemical shifts with the experimental values and calculates the sum
+of the squared deviation.
+On this latter number it is possible to apply a linear \ref RESTRAINT (because the variable is already a sum of squared differences) 
+that is the new term we are adding to the underlying force field.
 
 This example can be executed as
 \verbatim
@@ -109,14 +102,14 @@ mpiexec -np 4 gmx_mpi mdrun -s topol -plumed plumed -multi 4
 
 The third example show how \ref RDC (calculated with the theta-methods) can be employed in the same way, in this case to describe the native state of Ubiquitin. In 
 particular it is possible to observe how the RDC averaged restraint applied on the correlation between the calculated and experimental 
-N-H and CA-HA RDCs result in the increase of the correlation of the RDCs for other bonds already on a very short time scale.
+N-H RDCs result in the increase of the correlation of the RDCs for other bonds already on a very short time scale.
 
 \verbatim
 RDC ...
-ENSEMBLE
-CORRELATION
 GYROM=-72.5388
-SCALE=0.001060 
+SCALE=0.001060
+ADDCOUPLINGS
+LABEL=nh 
 ATOMS1=20,21 COUPLING1=8.17
 ATOMS2=37,38 COUPLING2=-8.271
 ATOMS3=56,57 COUPLING3=-10.489
@@ -138,7 +131,7 @@ mpiexec -np 8 gmx_mpi mdrun -s topol -plumed plumed -multi 8
 3. Camilloni, C., Cavalli, A. & Vendruscolo, M. Replica-Averaged Metadynamics. Journal of Chemical Theory … 9, 5610–5617 (2013).
 4. Roux, B. & Weare, J. On the statistical equivalence of restrained-ensemble simulations with the maximum entropy method. J. Chem. Phys. 138, 084107 (2013).
 5. Boomsma, W., Lindorff-Larsen, K. & Ferkinghoff-Borg, J. Combining Experiments and Simulations Using the Maximum Entropy Principle. PLoS Comput. Biol. 10, e1003406 (2014).
-6. Camilloni, C. & Vendruscolo M. A Tensor-Free Method for the Structural and Dynamical Refinement of Proteins using Residual Dipolar Couplings. J. PHYS. CHEM. B XXX (2014).
+6. Camilloni, C. & Vendruscolo M. A Tensor-Free Method for the Structural and Dynamical Refinement of Proteins using Residual Dipolar Couplings. J. PHYS. CHEM. B 119, 653 (2015).
 
 */
 
diff --git a/user-doc/tutorials/belfast-9a/first/plumed.dat b/user-doc/tutorials/belfast-9a/first/plumed.dat
index 56cd466ac..469e05652 100644
--- a/user-doc/tutorials/belfast-9a/first/plumed.dat
+++ b/user-doc/tutorials/belfast-9a/first/plumed.dat
@@ -1,7 +1,6 @@
 prot: GROUP ATOMS=1-862
-WHOLEMOLECULES ENTITY0=prot
 
-cs: CS2BACKBONE ATOMS=prot DATA=data FF=a03_gromacs.mdb NRES=56 FLAT=1.0 WRITE_CS=500
+cs: CS2BACKBONE ATOMS=prot DATA=data NRES=56 CAMSHIFT
 
 PRINT ARG=cs FILE=COLVAR STRIDE=10
 
diff --git a/user-doc/tutorials/belfast-9a/second/plumed.dat b/user-doc/tutorials/belfast-9a/second/plumed.dat
index 7ae31fbb9..bb68ddd52 100644
--- a/user-doc/tutorials/belfast-9a/second/plumed.dat
+++ b/user-doc/tutorials/belfast-9a/second/plumed.dat
@@ -1,10 +1,10 @@
 prot: GROUP ATOMS=1-862
-WHOLEMOLECULES ENTITY0=prot
+cs: CS2BACKBONE ATOMS=prot DATA=data NRES=56
+enscs: ENSEMBLE ARG=(cs\.hn_.*),(cs\.nh_.*),(cs\.ca_.*),(cs\.cb_.*),(cs\.co_.*),(cs\.ha_.*)
+stcs: STATS ARG=enscs.* SQDEVSUM PARARG=(cs\.exphn_.*),(cs\.expnh_.*),(cs\.expca_.*),(cs\.expcb_.*),(cs\.expco_.*),(cs\.expha_.*)
+res: RESTRAINT ARG=stcs.sqdevsum AT=0. KAPPA=0. SLOPE=12
 
-cs: CS2BACKBONE ATOMS=prot DATA=data FF=a03_gromacs.mdb NRES=56 FLAT=0.0 WRITE_CS=500 ENSEMBLE
-
-cse: RESTRAINT ARG=cs AT=0. KAPPA=0. SLOPE=24
-
-PRINT ARG=cs FILE=COLVAR STRIDE=10
+PRINT ARG=(cs\.hn_.*),(cs\.nh_.*),(cs\.ca_.*),(cs\.cb_.*),(cs\.co_.*),(cs\.ha_.*) FILE=CS STRIDE=1000
+PRINT ARG=res.bias FILE=COLVAR STRIDE=10
 
 ENDPLUMED
diff --git a/user-doc/tutorials/belfast-9a/third/plumed.dat b/user-doc/tutorials/belfast-9a/third/plumed.dat
index ea42d93f8..de17ff543 100644
--- a/user-doc/tutorials/belfast-9a/third/plumed.dat
+++ b/user-doc/tutorials/belfast-9a/third/plumed.dat
@@ -1,8 +1,7 @@
 RDC ...
-ENSEMBLE
-CORRELATION
 GYROM=-72.5388
-SCALE=0.001060 
+SCALE=0.001060
+ADDCOUPLINGS 
 ATOMS1=20,21 COUPLING1=8.17
 ATOMS2=37,38 COUPLING2=-8.271
 ATOMS3=56,57 COUPLING3=-10.489
@@ -77,9 +76,8 @@ LABEL=nh
 
 RDC ...
 GYROM=179.9319
-ENSEMBLE
-CORRELATION
 SCALE=0.00125
+ADDCOUPLINGS
 ATOMS1=5,6 COUPLING1=-16.4200
 ATOMS2=22,23 COUPLING2=7.6090
 ATOMS3=39,40 COUPLING3=12.1850
@@ -148,8 +146,7 @@ LABEL=caha
 RDC ...
 GYROM=-18.2385
 SCALE=0.00117
-ENSEMBLE
-CORRELATION
+ADDCOUPLINGS
 ATOMS1=18,20 COUPLING1=-0.816
 ATOMS2=35,37 COUPLING2=2.106
 ATOMS3=54,56 COUPLING3=-0.142
@@ -223,8 +220,7 @@ LABEL=cn
 RDC ...
 GYROM=179.9319
 SCALE=0.00100
-ENSEMBLE
-CORRELATION
+ADDCOUPLINGS
 ATOMS1=18,21 COUPLING1=1.608
 ATOMS2=35,38 COUPLING2=-2.927
 ATOMS3=54,57 COUPLING3=2.066
@@ -295,10 +291,9 @@ LABEL=chn
 ... RDC
 
 RDC ...
-ENSEMBLE
-CORRELATION
 GYROM=45.2404
 SCALE=0.00115
+ADDCOUPLINGS
 ATOMS1=5,18 COUPLING1=-2.42
 ATOMS2=22,35 COUPLING2=0.613
 ATOMS3=39,54 COUPLING3=-1.055
@@ -367,10 +362,9 @@ LABEL=cac
 ... RDC
 
 RDC ...
-ENSEMBLE
-CORRELATION
 GYROM=45.2404
 SCALE=0.00105
+ADDCOUPLINGS
 ATOMS1=5,7 COUPLING1=1.6670
 ATOMS2=94,96 COUPLING2=2.0980
 ATOMS3=116,118 COUPLING3=1.5750
@@ -413,9 +407,23 @@ ATOMS39=1117,1119 COUPLING39=1.8100
 LABEL=cacb
 ... RDC
 
-rdce: RESTRAINT ARG=nh,caha KAPPA=0.,0. SLOPE=-5000.0,-5000 AT=1.,1.0
+enh: ENSEMBLE ARG=(nh\.rdc_.*)
+ecaha: ENSEMBLE ARG=(caha\.rdc_.*)
+ecn: ENSEMBLE ARG=(cn\.rdc_.*)
+echn: ENSEMBLE ARG=(chn\.rdc_.*)
+ecac: ENSEMBLE ARG=(cac\.rdc_.*)
+ecacb: ENSEMBLE ARG=(cacb\.rdc_.*)
 
-PRINT ARG=nh,caha,cn,chn,cac,cacb FILE=COLVAR STRIDE=20
+stnh: STATS ARG=enh.* PARARG=(nh\.exp_.*)
+stcaha: STATS ARG=ecaha.* PARARG=(caha\.exp_.*)
+stcn: STATS ARG=ecn.* PARARG=(cn\.exp_.*)
+stchn: STATS ARG=echn.* PARARG=(chn\.exp_.*)
+stcac: STATS ARG=ecac.* PARARG=(cac\.exp_.*)
+stcacb: STATS ARG=ecacb.* PARARG=(cacb\.exp_.*)
+
+rdce: RESTRAINT ARG=stnh.corr KAPPA=0. SLOPE=-500.0 AT=1.0
+
+PRINT ARG=stnh.corr,stcaha.corr,stcn.corr,stchn.corr,stcac.corr,stcacb.corr FILE=COLVAR STRIDE=20
 FLUSH STRIDE=40
 
 ENDPLUMED
-- 
GitLab