From b6e6f022bcf85c96ca21adf004dbf0af919f36f3 Mon Sep 17 00:00:00 2001
From: Gareth Tribello <gareth.tribello@gmail.com>
Date: Fri, 15 Mar 2019 18:10:59 +0000
Subject: [PATCH] Fixed multiple spelling mistakes in manual

---
 CHANGES/v2.3.md                               |  2 +-
 CHANGES/v2.4.md                               |  2 +-
 CHANGES/v2.5.md                               | 12 +++----
 src/crystallization/Q3.cpp                    |  3 +-
 src/crystallization/Q4.cpp                    |  3 +-
 src/crystallization/Q6.cpp                    |  3 +-
 src/crystallization/SimpleCubic.cpp           |  3 +-
 src/drr/DynamicReferenceRestraining.cpp       |  4 +--
 src/function/FuncSumHills.cpp                 |  5 +--
 src/function/Piecewise.cpp                    |  3 +-
 src/function/Stats.cpp                        |  3 +-
 src/generic/Group.cpp                         |  3 +-
 src/generic/WholeMolecules.cpp                |  3 +-
 src/gridtools/GridVessel.cpp                  |  6 +++-
 src/logmfd/LogMFD.cpp                         | 34 +++++++++----------
 src/multicolvar/VolumeAround.cpp              |  3 +-
 src/multicolvar/VolumeBetweenContours.cpp     |  3 +-
 src/multicolvar/VolumeCavity.cpp              |  3 +-
 src/multicolvar/VolumeInCylinder.cpp          |  3 +-
 src/multicolvar/VolumeInSphere.cpp            |  3 +-
 src/multicolvar/VolumeTetrapore.cpp           |  3 +-
 src/multicolvar/XDistances.cpp                |  9 ++---
 src/multicolvar/XYDistances.cpp               |  6 ++--
 src/setup/Units.cpp                           |  4 ++-
 src/vatom/Ghost.cpp                           |  3 +-
 src/ves/TD_ProductDistribution.cpp            |  3 +-
 user-doc/LOGMFDMOD.md                         |  2 +-
 user-doc/Performances.md                      |  6 ++--
 user-doc/spelling_words.dict                  | 33 ++++++++++++++++++
 user-doc/tutorials/others/isdb-2.txt          |  2 +-
 .../tutorials/performance-optimization.txt    |  6 ++--
 31 files changed, 101 insertions(+), 80 deletions(-)

diff --git a/CHANGES/v2.3.md b/CHANGES/v2.3.md
index 996580b31..7b8160a88 100644
--- a/CHANGES/v2.3.md
+++ b/CHANGES/v2.3.md
@@ -262,7 +262,7 @@ For users:
 - Fixed some openMP regression (some related to the whole codes and some specifics for Coordination and Multicolvar), this were compiler dependent so not all users may have experienced them
 - Fixed an issue with \ref CS2BACKBONE when more than 2 chains were used
 - Fixed memory leak in \ref RDC.
-- Fixed segmentation fault with more than two CVs in reweighting \ref METAD (see \issue{399}, thanks to fiskissimo).
+- Fixed segmentation fault with more than two CVs in reweighting \ref METAD (see \issue{399}, thanks to Fiskissimo).
 
 For developers:
 - Small fix in LDFLAGS when enabling coverage.
diff --git a/CHANGES/v2.4.md b/CHANGES/v2.4.md
index 284ebf66d..77f1d8ff5 100644
--- a/CHANGES/v2.4.md
+++ b/CHANGES/v2.4.md
@@ -207,7 +207,7 @@ For users:
   - Fixed some performances regression issue with OpenMP
   - Updated NAMD patches to version 2.12 and 2.13. Old patches have been removed.
   - GROMACS patch for gromacs-2018.4.
-  - Fixed a threadsafety issue using forces on \ref HISTOGRAM 
+  - Fixed a thread safety issue using forces on \ref HISTOGRAM 
   - Fixed error message suggesting wrong actions (see \issue{421}).
 
 For developers:
diff --git a/CHANGES/v2.5.md b/CHANGES/v2.5.md
index 56d24a974..1242e0867 100644
--- a/CHANGES/v2.5.md
+++ b/CHANGES/v2.5.md
@@ -13,8 +13,8 @@ Changes from version 2.4 which are relevant for users:
     to set correctly the `LD_LIBRARY_PATH` variable for the linux executable to work correctly. The procedure has been tested well on OSX and Linux,
     but could give problems on other platform. Please report possible problems on the mailing list.
   - \ref driver now stops correctly when using \ref COMMITTOR. If you want to continue the analysis, use the `NOSTOP` flag in \ref COMMITTOR.
-  - \ref METAD the calculation of the reweigthing factor is now activated by CALC_RCT instead of REWEIGHTING_NGRID and REWEIGHTING_NHILLS, the frequency of update can be set 
-    by RCT_USTRIDE, the default value is 1 and should be ok for most of the cases
+  - \ref METAD the calculation of the reweighting factor is now activated by CALC_RCT instead of REWEIGHTING_NGRID and REWEIGHTING_NHILLS, the frequency of update can be set 
+    by RCT_USTRIDE, the default value is 1 and should be OK for most of the cases
   - Fixed sign in Cartesian components of \ref PUCKERING with 6 membered rings (thanks to Carol Simoes and Javi Iglesias).
 
 - New actions:
@@ -62,7 +62,7 @@ Changes from version 2.4 which are relevant for users:
   - \ref SAXS has an additional implementation based on Bessel functions that can be faster for large systems (new keyword BESSEL)
   - \ref SAXS keyword SCEXP has been renamed into SCALEINT
   - \ref SAXS includes the MARTINI bead structure factors for Proteins and Nucleic Acids
-  - \ref SAXS includes a GPU implementation based on arrayfire (need to be linked at compile time) that can be activated with GPU
+  - \ref SAXS includes a GPU implementation based on ArrayFire (need to be linked at compile time) that can be activated with GPU
   - \ref METAINFERENCE and all related methods has a new keyword REGRES_ZERO to scale data using a linear scale fit
   - \ref CALIBER new bias to perform Maximum Caliber replica-averaged restrained simulations 
 
@@ -94,8 +94,8 @@ Changes from version 2.4 which are relevant for users:
   - Implemented bash autocompletion, see \ref BashAutocompletion.
   - \ref MOLINFO now allows selecting atoms from chains with a numeric ID (see \issue{320}).
   - Removed the patch for GMX 5.1.4
-  - LAMMPS patch has been finally removed. Notice that LAMMPS natively supports PLUMED now.
-  - AMBER patch has been finally removed. Notice that AMBER (sander module) natively supports PLUMED starting with version 15.
+  - LAMMPS patch has been finally removed. Notice that LAMMPS has native support for PLUMED now.
+  - AMBER patch has been finally removed. Notice that AMBER (sander module) has native support for PLUMED starting from version 15.
   - \ref RMSD calculation has been optimized. This should positively affect the performances of CVs where
      many RMSD values are computed on small groups of atoms, such as secondary structure variables.
   - In \ref METAD, when using a bias factor equal to one (no bias) the `rct` component is set to zero rather than to one.
@@ -152,7 +152,7 @@ Changes from version 2.4 which are relevant for developers:
   for testing, the default choice is the typical one used on the respective operating system.
 - On OSX, `plumed` and `libplumed.dylib` will find `libplumedKernel.dylib` using `@loader_path`.
 - Using CXX compiler to link the main program.
-- plumed can be compiled with arrayfire to enable for gpu code. \ref SAXS collective variable is available as part of the isdb module to provide an example of a gpu implementation for a CV
+- plumed can be compiled with ArrayFire to enable for gpu code. \ref SAXS collective variable is available as part of the isdb module to provide an example of a gpu implementation for a CV
 
 
 ## Version 2.5.1 (to be released)
diff --git a/src/crystallization/Q3.cpp b/src/crystallization/Q3.cpp
index 3d40f6173..0e182fb6d 100644
--- a/src/crystallization/Q3.cpp
+++ b/src/crystallization/Q3.cpp
@@ -88,8 +88,7 @@ PRINT ARG=q3.mean FILE=colvar
 
 //+PLUMEDOC MCOLVARF LOCAL_Q3
 /*
-Calculate the local degree of order around an atoms by taking the average dot product between the \f$q_3\f$ vector on the central atom and the \f$q_3\f$ vector
-on the atoms in the first coordination sphere.
+Calculate the local degree of order around an atoms by taking the average dot product between the \f$q_3\f$ vector on the central atom and the \f$q_3\f$ vector on the atoms in the first coordination sphere.
 
 The \ref Q3 command allows one to calculate one complex vectors for each of the atoms in your system that describe the degree of order in the coordination sphere
 around a particular atom. The difficulty with these vectors comes when combining the order parameters from all of the individual atoms/molecules so as to get a
diff --git a/src/crystallization/Q4.cpp b/src/crystallization/Q4.cpp
index 8f5213e34..79565db20 100644
--- a/src/crystallization/Q4.cpp
+++ b/src/crystallization/Q4.cpp
@@ -88,8 +88,7 @@ PRINT ARG=q4.mean FILE=colvar
 
 //+PLUMEDOC MCOLVARF LOCAL_Q4
 /*
-Calculate the local degree of order around an atoms by taking the average dot product between the \f$q_4\f$ vector on the central atom and the \f$q_4\f$ vector
-on the atoms in the first coordination sphere.
+Calculate the local degree of order around an atoms by taking the average dot product between the \f$q_4\f$ vector on the central atom and the \f$q_4\f$ vector on the atoms in the first coordination sphere.
 
 The \ref Q4 command allows one to calculate one complex vectors for each of the atoms in your system that describe the degree of order in the coordination sphere
 around a particular atom. The difficulty with these vectors comes when combining the order parameters from all of the individual atoms/molecules so as to get a
diff --git a/src/crystallization/Q6.cpp b/src/crystallization/Q6.cpp
index 23882bd44..a784607b1 100644
--- a/src/crystallization/Q6.cpp
+++ b/src/crystallization/Q6.cpp
@@ -88,8 +88,7 @@ PRINT ARG=q6.mean FILE=colvar
 
 //+PLUMEDOC MCOLVARF LOCAL_Q6
 /*
-Calculate the local degree of order around an atoms by taking the average dot product between the \f$q_6\f$ vector on the central atom and the \f$q_6\f$ vector
-on the atoms in the first coordination sphere.
+Calculate the local degree of order around an atoms by taking the average dot product between the \f$q_6\f$ vector on the central atom and the \f$q_6\f$ vector on the atoms in the first coordination sphere.
 
 The \ref Q6 command allows one to calculate one complex vectors for each of the atoms in your system that describe the degree of order in the coordination sphere
 around a particular atom. The difficulty with these vectors comes when combining the order parameters from all of the individual atoms/molecules so as to get a
diff --git a/src/crystallization/SimpleCubic.cpp b/src/crystallization/SimpleCubic.cpp
index 484c00e7b..ef3253e34 100644
--- a/src/crystallization/SimpleCubic.cpp
+++ b/src/crystallization/SimpleCubic.cpp
@@ -32,8 +32,7 @@ namespace crystallization {
 
 //+PLUMEDOC MCOLVAR SIMPLECUBIC
 /*
-Calculate whether or not the coordination spheres of atoms are arranged as they would be in a simple
-cubic structure.
+Calculate whether or not the coordination spheres of atoms are arranged as they would be in a simple cubic structure.
 
 We can measure how similar the environment around atom \f$i\f$ is to a simple cubic structure is by evaluating
 the following quantity:
diff --git a/src/drr/DynamicReferenceRestraining.cpp b/src/drr/DynamicReferenceRestraining.cpp
index 3ba641e36..7d732933c 100644
--- a/src/drr/DynamicReferenceRestraining.cpp
+++ b/src/drr/DynamicReferenceRestraining.cpp
@@ -46,8 +46,8 @@ namespace drr {
 //+PLUMEDOC EABFMOD_BIAS DRR
 /*
 Used to performed extended-system adaptive biasing force(eABF) \cite Lelievre2007 method
-on one or more collective variables. This method is also
-called dynamic reference restraining(DRR) \cite Zheng2012 .
+ on one or more collective variables. This method is also
+ called dynamic reference restraining(DRR) \cite Zheng2012 .
 
 For each collective variable \f$\xi_i\f$, a fictitious variable \f$\lambda_i\f$
 is attached through a spring. The fictitious variable \f$\lambda_i\f$ undergoes
diff --git a/src/function/FuncSumHills.cpp b/src/function/FuncSumHills.cpp
index eefe498a4..ce5d2ce4b 100644
--- a/src/function/FuncSumHills.cpp
+++ b/src/function/FuncSumHills.cpp
@@ -40,10 +40,7 @@ namespace function {
 
 //+PLUMEDOC FUNCTION FUNCSUMHILLS
 /*
-This function is intended to be called by the command line tool sum_hills
-and it is meant to integrate a HILLS file or an HILLS file interpreted as
-a histogram i a variety of ways. Therefore it is not expected that you use this
-during your dynamics (it will crash!)
+This function is intended to be called by the command line tool sum_hills.  It is meant to integrate a HILLS file or an HILLS file interpreted as a histogram in a variety of ways. It is, therefore, not expected that you use this during your dynamics (it will crash!)
 
 In the future one could implement periodic integration during the metadynamics
 or straightforward MD as a tool to check convergence
diff --git a/src/function/Piecewise.cpp b/src/function/Piecewise.cpp
index b5ee68b96..3615f47c0 100644
--- a/src/function/Piecewise.cpp
+++ b/src/function/Piecewise.cpp
@@ -31,8 +31,7 @@ namespace function {
 
 //+PLUMEDOC FUNCTION PIECEWISE
 /*
-Compute a piece wise straight line through its arguments that passes through
-a set of ordered control points.
+Compute a piece wise straight line through its arguments that passes through a set of ordered control points.
 
 For variables less than the first
 (greater than the last) point, the value of the first (last) point is used.
diff --git a/src/function/Stats.cpp b/src/function/Stats.cpp
index 26101a302..0834226f2 100644
--- a/src/function/Stats.cpp
+++ b/src/function/Stats.cpp
@@ -30,7 +30,8 @@ namespace function {
 //+PLUMEDOC FUNCTION STATS
 /*
 Calculates statistical properties of a set of collective variables with respect to a set of reference values.
-In particular it calculates and store as components the sum of the squared deviations, the correlation, the
+
+In particular it calculates and stores as components the sum of the squared deviations, the correlation, the
 slope and the intercept of a linear fit.
 
 The reference values can be either provided as values using PARAMETERS or using value without derivatives
diff --git a/src/generic/Group.cpp b/src/generic/Group.cpp
index 69e9d3cd4..936f6709d 100644
--- a/src/generic/Group.cpp
+++ b/src/generic/Group.cpp
@@ -36,8 +36,7 @@ namespace generic {
 
 //+PLUMEDOC GENERIC GROUP
 /*
-Define a group of atoms so that a particular list of atoms can be referenced with a single label
-in definitions of CVs or virtual atoms.
+Define a group of atoms so that a particular list of atoms can be referenced with a single label in definitions of CVs or virtual atoms.
 
 Atoms can be listed as comma separated numbers (i.e. `1,2,3,10,45,7,9`) , simple positive ranges
 (i.e. `20-40`), ranges with a stride either positive or negative (i.e. `20-40:2` or `80-50:-2`) or as
diff --git a/src/generic/WholeMolecules.cpp b/src/generic/WholeMolecules.cpp
index c224e9a72..1ead3d791 100644
--- a/src/generic/WholeMolecules.cpp
+++ b/src/generic/WholeMolecules.cpp
@@ -40,8 +40,7 @@ namespace generic {
 
 //+PLUMEDOC GENERIC WHOLEMOLECULES
 /*
-This action is used to rebuild molecules that can become split by the periodic
-boundary conditions.
+This action is used to rebuild molecules that can become split by the periodic boundary conditions.
 
 It is similar to the ALIGN_ATOMS keyword of plumed1, and is needed since some
 MD dynamics code (e.g. GROMACS) can break molecules during the calculation.
diff --git a/src/gridtools/GridVessel.cpp b/src/gridtools/GridVessel.cpp
index 6f0d00cf2..c351c7aec 100644
--- a/src/gridtools/GridVessel.cpp
+++ b/src/gridtools/GridVessel.cpp
@@ -200,7 +200,11 @@ void GridVessel::getIndices( const std::vector<double>& point, std::vector<unsig
   for(unsigned i=0; i<dimension; ++i) {
     indices[i]=std::floor( (point[i] - min[i])/dx[i] );
     if( pbc[i] ) indices[i]=indices[i]%nbin[i];
-    else if( indices[i]>nbin[i] ) plumed_merror("point is outside grid range");
+    else if( indices[i]>nbin[i] ) {
+      std::string pp, num; Tools::convert( point[0], pp );
+      for(unsigned j=1;j<point.size();++j) { Tools::convert( point[j], num ); pp += ", " + num; } 
+      plumed_merror("point (" + pp + ")  is outside grid range");
+    }
   }
 }
 
diff --git a/src/logmfd/LogMFD.cpp b/src/logmfd/LogMFD.cpp
index cff9631ad..433eb739b 100644
--- a/src/logmfd/LogMFD.cpp
+++ b/src/logmfd/LogMFD.cpp
@@ -30,7 +30,7 @@ Consider a physical system of \f$N_q\f$ particles, for which the Hamiltonian is
   {H_{\rm MD}}\left( {\bf{\Gamma}} \right) = \sum\limits_{j = 1}^{{N_q}} {\frac{{{\bf{p}}_j^2}}{{2{m_j}}}}  + \Phi \left( {\bf{q}} \right)
 \f]
 
-where \f${\bf q}_j\f$, \f${\bf p}_j\f$ (\f$\bf{\Gamma}={\bf q},{\bf p}\f$), and \f$m_j\f$ are the position, momentum, and mass of the \f$j\f$th particle, respectively,
+where \f${\bf q}_j\f$, \f${\bf p}_j\f$ (\f$\bf{\Gamma}={\bf q},{\bf p}\f$), and \f$m_j\f$ are the position, momentum, and mass of particle \f$j\f$ respectively,
 and \f$\Phi\f$ is the potential energy function for \f${\bf q}\f$.
 The free energy \f$F({\bf X})\f$ as a function of a set of \f$N\f$ collective variables (CVs) is given as
 
@@ -46,7 +46,7 @@ and \f$K_i\f$ is the spring constant which is large enough to invoke
  \delta \left( x \right) = \lim_{k \to \infty } \sqrt {\beta k/2\pi} \exp \left( -\beta kx^2/2 \right)
 \f]
 
-In mean-force dynamics (MFD), \f${\bf X}\f$ are treated as fictitious dynamical variables, which are associated with the following Hamiltonian,
+In mean-force dynamics, \f${\bf X}\f$ are treated as fictitious dynamical variables, which are associated with the following Hamiltonian,
 
 \f[
  {H_{\rm log}} = \sum\limits_{i = 1}^N {\frac{{P_{{X_i}}^2}}{{2{M_i}}} + \Psi \left( {{\bf X}} \right)}
@@ -64,7 +64,7 @@ which corresponds to TAMD/d-AFED \cite AbramsJ2008, \cite Maragliano2006 (or the
 
 where \f$\alpha\f$ (ALPHA) and \f$\gamma\f$ (GAMMA) are positive parameters. The logarithmic form of \f$\Psi_{\rm log}\f$ ensures the dynamics of \f${\bf X}\f$ on a much smoother energy surface [i.e., \f$\Psi_{\rm log}({\bf X})\f$] than \f$F({\bf X})\f$, thus enhancing the sampling in the \f${\bf X}\f$-space. The parameters \f$\alpha\f$ and \f$\gamma\f$ determine the degree of flatness of \f$\Psi_{\rm log}\f$, but adjusting only \f$\alpha\f$ is normally sufficient to have a relatively flat surface (with keeping the relation \f$\gamma=1/\alpha\f$).
 
-The equation of motion (EOM) for \f$X_i\f$ in LogMFD (no thermostat) is
+The equation of motion for \f$X_i\f$ in LogMFD (no thermostat) is
 
 \f[
  {M_i}{\ddot X_i} =  - \left( {\frac{{\alpha \gamma }}{{\alpha F + 1}}} \right)\frac{{\partial F}}{{\partial {X_i}}}
@@ -83,7 +83,7 @@ where
  Z = \int {\exp \left[ { - \beta \left\{ {{H_{\rm MD}} + \sum\limits_i^N {\frac{{{K_i}}}{2}{{\left( {{s_i}\left( {{\bf q}} \right) - {X_i}} \right)}^2}} } \right\}} \right]} d{\bf{\Gamma }}
 \f]
 
-The mean-force (MF) is practically evaluated by performing a shot-time canonical MD run each time \f${\bf X}\f$ is updated according to the EOM for \f${\bf X}\f$.
+The mean-force (MF) is practically evaluated by performing a shot-time canonical MD run each time \f${\bf X}\f$ is updated according to the equation of motion for \f${\bf X}\f$.
 
 If the canonical average for the MF is effectively converged, the dynamical variables \f${\bf q}\f$ and \f${\bf X}\f$ are decoupled and they evolve adiabatically, which can be exploited for the on-the-fly evaluation of \f$F({\bf X})\f$. I.e., \f$H_{\rm log}\f$ should be a constant of motion in this case, thus \f$F({\bf X})\f$ can be evaluated each time \f${\bf X}\f$ is updated as
 
@@ -94,7 +94,7 @@ If the canonical average for the MF is effectively converged, the dynamical vari
 \f]
 
 
-This means that \f$F({\bf X})\f$ can be constructed without postprocessing (on-the-fly free energy reconstruction). Note that the on-the-fly free energy reconstruction is also possible in TAMD/d-AFED if the Hamiltonian-like conserved quantity is available (e.g., the Nose-Hoover type dynamics).
+This means that \f$F({\bf X})\f$ can be constructed without post processing (on-the-fly free energy reconstruction). Note that the on-the-fly free energy reconstruction is also possible in TAMD/d-AFED if the Hamiltonian-like conserved quantity is available (e.g., the Nose-Hoover type dynamics).
 
 
 
@@ -104,7 +104,7 @@ This means that \f$F({\bf X})\f$ can be constructed without postprocessing (on-t
 The accuracy in the MF is critical to the on-the-fly free energy reconstruction. To improve the evaluation of the MF, parallel-dynamics (PD) is incorporated into LogMFD, leading to logarithmic parallel-dynamics (LogPD) \cite MorishitaLogPD.
 
 
-In PD, the MF is evaluated by a nonequilibrium path-ensemble based on the Crooks-Jarzynski nonequilibrium work relation. To this end, multiple replicas of the MD system which run in parallel are introduced. The CVs [\f${\bf s}({\bf q})\f$] in each replica is restrained to the same value of \f${\bf X}(t)\f$. A canonical MD run with \f$N_m\f$ steps is performed in each replica, then the MF on \f$X_i\f$ is evaluated using the MD trajectories from all replicas.
+In PD, the MF is evaluated by a non-equilibrium path-ensemble based on the Crooks-Jarzynski non-equilibrium work relation. To this end, multiple replicas of the MD system which run in parallel are introduced. The CVs [\f${\bf s}({\bf q})\f$] in each replica is restrained to the same value of \f${\bf X}(t)\f$. A canonical MD run with \f$N_m\f$ steps is performed in each replica, then the MF on \f$X_i\f$ is evaluated using the MD trajectories from all replicas.
 The MF is practically calculated as
 
 
@@ -132,9 +132,9 @@ where
  H_{\rm MD}^k\left( {{\bf{\Gamma }},{{\bf X}}} \right) = {H_{\rm MD}}\left( {{{\bf{\Gamma }}^k}} \right) + \sum\limits_{i = 1}^N {\frac{{{K_i}}}{2}{{\left( {s_i^k - {X_i}} \right)}^2}}
 \f]
 
-and \f$s^k_i\f$ is the \f$i\f$ th CV in the \f$k\f$th replica.
+and \f$s^k_i\f$ is the \f$i\f$th CV in the \f$k\f$th replica.
 
-\f$W_k\f$ comes from the Crooks-Jarzynski nonequilibrium work relation by which we can evaluate an equilibrium ensemble average from a set of nonequilibrium trajectories. Note that, to avoid possible numerical errors in the exponential function, the following form of \f$W_k\f$ is instead used in PLUMED,
+\f$W_k\f$ comes from the Crooks-Jarzynski non-equilibrium work relation by which we can evaluate an equilibrium ensemble average from a set of non-equilibrium trajectories. Note that, to avoid possible numerical errors in the exponential function, the following form of \f$W_k\f$ is instead used in PLUMED,
 
 \f[
  {W_k}\left( t \right) = \frac{{\exp \left[ { - \beta \left\{ {{w_k}\left( t \right) - {w_{\min }}\left( t \right)} \right\}} \right]}}{{\sum\nolimits_k {\exp \left[ { - \beta \left\{ {{w_k}\left( t \right) - {w_{\min }}\left( t \right)} \right\}} \right]} }}
@@ -149,21 +149,21 @@ where
 
 With the MF evaluated using the PD approach, reconstructing free energy profiles can be performed more efficiently (requiring less elapsed computing time) in LogPD than with a single MD system in LogMFD. In the case that there exists more than one stable state separated by high energy barriers in the hidden subspace orthogonal to the CV-subspace, LogPD is particularly of use to incorporate all the contributions from such hidden states with appropriate weights (in the limit \f$N_r\to\infty\f$ ).
 
-Note that LogPD calculations should always be initiated with an equilibrium \f${\bf q}\f$-configuration in each replica, because the Crooks-Jarzynski nonequilibrium work relation is invoked. Also note that LogPD is currently available only with Gromacs, while LogMFD can be performed with Lammps, Gromacs, and NAMD.
+Note that LogPD calculations should always be initiated with an equilibrium \f${\bf q}\f$-configuration in each replica, because the Crooks-Jarzynski non-equilibrium work relation is invoked. Also note that LogPD is currently available only with Gromacs, while LogMFD can be performed with LAMMPS, Gromacs, and NAMD.
 
-\section Thermostatted Thermostatted LogMFD/PD
+\section Thermostat Using LogMFD with a thermostat /PD
 
-Thermostatting of \f${\bf X}\f$ is often recommended in LogMFD/PD to maintain the adiabatic decoupling between \f${\bf q}\f$ and \f${\bf X}\f$. In the framework of the LogMFD approach, the Nose-Hoover type thermostat and the Gaussian isokinetic (velocity scaling) thermostat can be used to control the kinetic energy of \f${\bf X}\f$.
+Introducing a thermostat on \f${\bf X}\f$ is often recommended in LogMFD/PD to maintain the adiabatic decoupling between \f${\bf q}\f$ and \f${\bf X}\f$. In the framework of the LogMFD approach, the Nose-Hoover type thermostat and the Gaussian isokinetic (velocity scaling) thermostat can be used to control the kinetic energy of \f${\bf X}\f$.
 
 \subsection Nose-Hoover Nose-Hoover LogMFD/PD
 
-The EOM for \f$X_i\f$ coupled to a Nose-Hoover thermostat variable \f$\eta\f$ (single heat bath) is
+The equation of motion for \f$X_i\f$ coupled to a Nose-Hoover thermostat variable \f$\eta\f$ (single heat bath) is
 
 \f[
  {M_i}{\ddot X_i} =  - \left( {\frac{{\alpha \gamma }}{{\alpha F + 1}}} \right)\frac{{\partial F}}{{\partial {X_i}}} - {M_i}{\dot X_i}\dot \eta
 \f]
 
-The EOM for \f$\eta\f$ is
+The equation of motion for \f$\eta\f$ is
 
 \f[
  Q\ddot \eta  = \sum\limits_{i = 1}^N {\frac{{P_{{X_i}}^2}}{{{M_i}}} - N{k_B}T}
@@ -439,7 +439,7 @@ void LogMFD::registerKeywords(Keywords& keys) {
   keys.add("compulsory","THERMOSTAT",
            "Type of thermostat for the fictitious dynamical variables. NVE, NVT, VS are available." );
   keys.add("optional","TEMP",
-           "Temperature of the fictitious dynamical variables in thermostatted LogMFD/PD. "
+           "Temperature of the fictitious dynamical variables in LogMFD/PD thermostat. "
            "If not provided or provided as 0, it will be taken from the temperature of the MD system." );
 
   keys.add("optional","TAMD",
@@ -457,9 +457,9 @@ void LogMFD::registerKeywords(Keywords& keys) {
            "Spring constant of the harmonic restraining potential for the fictitious dynamical variables." );
 
   keys.add("compulsory","FICT_MAX",
-           "Maximam values reachable for the fictitious dynamical variables. The variables will elastically bounce back at the boundary (mirror boundary)." );
+           "Maximum values reachable for the fictitious dynamical variables. The variables will elastically bounce back at the boundary (mirror boundary)." );
   keys.add("compulsory","FICT_MIN",
-           "Minimam values reachable for the fictitious dynamical variables. The variables will elastically bounce back at the boundary (mirror boundary)." );
+           "Minimum values reachable for the fictitious dynamical variables. The variables will elastically bounce back at the boundary (mirror boundary)." );
 
   keys.add("optional","FICT",
            "The initial values of the fictitious dynamical variables. "
@@ -480,7 +480,7 @@ void LogMFD::registerKeywords(Keywords& keys) {
            "If not provided, it will be taken as 0." );
   keys.add("optional","META",
            "Mass of eta variable. "
-           "If not provided, it will be taken as N*kb*T*100*100." );
+           "If not provided, it will be taken as \\f$N*kb*T*100*100\\f$." );
 
   keys.add("compulsory","FLOG",
            "The initial free energy value in the LogMFD/PD run."
diff --git a/src/multicolvar/VolumeAround.cpp b/src/multicolvar/VolumeAround.cpp
index 06bd7632f..bddef4b2e 100644
--- a/src/multicolvar/VolumeAround.cpp
+++ b/src/multicolvar/VolumeAround.cpp
@@ -25,8 +25,7 @@
 
 //+PLUMEDOC VOLUMES AROUND
 /*
-This quantity can be used to calculate functions of the distribution of collective
-variables for the atoms that lie in a particular, user-specified part of of the cell.
+This quantity can be used to calculate functions of the distribution of collective variables for the atoms that lie in a particular, user-specified part of of the cell.
 
 Each of the base quantities calculated by a multicolvar can can be assigned to a particular point in three
 dimensional space. For example, if we have the coordination numbers for all the atoms in the
diff --git a/src/multicolvar/VolumeBetweenContours.cpp b/src/multicolvar/VolumeBetweenContours.cpp
index ed00be25a..edd3d3ef5 100644
--- a/src/multicolvar/VolumeBetweenContours.cpp
+++ b/src/multicolvar/VolumeBetweenContours.cpp
@@ -28,8 +28,7 @@
 
 //+PLUMEDOC VOLUMES INENVELOPE
 /*
-This quantity can be used to calculate functions of the distribution of collective
-variables for the atoms that lie in a region where the density of a certain type of atom is high.
+This quantity can be used to calculate functions of the distribution of collective variables for the atoms that lie in a region where the density of a certain type of atom is high.
 
 This collective variable can be used to determine whether colvars are within region where the density
 of a particular atom is high.  This is achieved by calculating the following function at the point where
diff --git a/src/multicolvar/VolumeCavity.cpp b/src/multicolvar/VolumeCavity.cpp
index f745e2bc3..65aaed7ec 100644
--- a/src/multicolvar/VolumeCavity.cpp
+++ b/src/multicolvar/VolumeCavity.cpp
@@ -28,8 +28,7 @@
 
 //+PLUMEDOC VOLUMES CAVITY
 /*
-This quantity can be used to calculate functions of the distribution of collective
-variables for the atoms that lie in a box defined by the positions of four atoms.
+This quantity can be used to calculate functions of the distribution of collective variables for the atoms that lie in a box defined by the positions of four atoms.
 
 Each of the base quantities calculated by a multicolvar can can be assigned to a particular point in three
 dimensional space. For example, if we have the coordination numbers for all the atoms in the
diff --git a/src/multicolvar/VolumeInCylinder.cpp b/src/multicolvar/VolumeInCylinder.cpp
index d56e61002..3c18c238f 100644
--- a/src/multicolvar/VolumeInCylinder.cpp
+++ b/src/multicolvar/VolumeInCylinder.cpp
@@ -26,8 +26,7 @@
 
 //+PLUMEDOC VOLUMES INCYLINDER
 /*
-This quantity can be used to calculate functions of the distribution of collective
-variables for the atoms that lie in a particular, user-specified part of of the cell.
+This quantity can be used to calculate functions of the distribution of collective variables for the atoms that lie in a particular, user-specified part of of the cell.
 
 Each of the base quantities calculated by a multicolvar can can be assigned to a particular point in three
 dimensional space. For example, if we have the coordination numbers for all the atoms in the
diff --git a/src/multicolvar/VolumeInSphere.cpp b/src/multicolvar/VolumeInSphere.cpp
index db6b12667..4f47e8ccd 100644
--- a/src/multicolvar/VolumeInSphere.cpp
+++ b/src/multicolvar/VolumeInSphere.cpp
@@ -26,8 +26,7 @@
 
 //+PLUMEDOC VOLUMES INSPHERE
 /*
-This quantity can be used to calculate functions of the distribution of collective
-variables for the atoms that lie in a particular, user-specified part of of the cell.
+This quantity can be used to calculate functions of the distribution of collective variables for the atoms that lie in a particular, user-specified part of of the cell.
 
 Each of the base quantities calculated by a multicolvar can can be assigned to a particular point in three
 dimensional space. For example, if we have the coordination numbers for all the atoms in the
diff --git a/src/multicolvar/VolumeTetrapore.cpp b/src/multicolvar/VolumeTetrapore.cpp
index 3346188ec..70793a583 100644
--- a/src/multicolvar/VolumeTetrapore.cpp
+++ b/src/multicolvar/VolumeTetrapore.cpp
@@ -28,8 +28,7 @@
 
 //+PLUMEDOC VOLUMES TETRAHEDRALPORE
 /*
-This quantity can be used to calculate functions of the distribution of collective variables
-for the atoms lie that lie in a box defined by the positions of four atoms at the corners of a tetrahedron.
+This quantity can be used to calculate functions of the distribution of collective variables for the atoms lie that lie in a box defined by the positions of four atoms at the corners of a tetrahedron.
 
 Each of the base quantities calculated by a multicolvar can can be assigned to a particular point in three
 dimensional space. For example, if we have the coordination numbers for all the atoms in the
diff --git a/src/multicolvar/XDistances.cpp b/src/multicolvar/XDistances.cpp
index 24e8da360..73c22269e 100644
--- a/src/multicolvar/XDistances.cpp
+++ b/src/multicolvar/XDistances.cpp
@@ -34,8 +34,7 @@ namespace multicolvar {
 //+PLUMEDOC MCOLVAR XDISTANCES
 /*
 Calculate the x components of the vectors connecting one or many pairs of atoms.
-You can then calculate functions of the distribution of
-values such as the minimum, the number less than a certain quantity and so on.
+You can then calculate functions of the distribution of values such as the minimum, the number less than a certain quantity and so on.
 
 \par Examples
 
@@ -81,8 +80,7 @@ PRINT ARG=d1.gt0.1
 //+PLUMEDOC MCOLVAR YDISTANCES
 /*
 Calculate the y components of the vectors connecting one or many pairs of atoms.
-You can then calculate functions of the distribution of
-values such as the minimum, the number less than a certain quantity and so on.
+You can then calculate functions of the distribution of values such as the minimum, the number less than a certain quantity and so on.
 
 \par Examples
 
@@ -129,8 +127,7 @@ PRINT ARG=d1.gt0.1
 //+PLUMEDOC MCOLVAR ZDISTANCES
 /*
 Calculate the z components of the vectors connecting one or many pairs of atoms.
-You can then calculate functions of the distribution of
-values such as the minimum, the number less than a certain quantity and so on.
+You can then calculate functions of the distribution of values such as the minimum, the number less than a certain quantity and so on.
 
 \par Examples
 
diff --git a/src/multicolvar/XYDistances.cpp b/src/multicolvar/XYDistances.cpp
index ec3800c6e..f41f4c4db 100644
--- a/src/multicolvar/XYDistances.cpp
+++ b/src/multicolvar/XYDistances.cpp
@@ -34,8 +34,8 @@ namespace multicolvar {
 //+PLUMEDOC MCOLVAR XYDISTANCES
 /*
 Calculate distance between a pair of atoms neglecting the z-component.
-You can then calculate functions of the distribution of
- values such as the minimum, the number less than a certain quantity and so on.
+
+You can then calculate functions of the distribution of values such as the minimum, the number less than a certain quantity and so on.
 
 \par Examples
 
@@ -55,6 +55,7 @@ PRINT ARG=d1.min
 //+PLUMEDOC MCOLVAR XZDISTANCES
 /*
 Calculate distance between a pair of atoms neglecting the y-component.
+
 You can then calculate functions of the distribution of
 values such as the minimum, the number less than a certain quantity and so on.
 
@@ -76,6 +77,7 @@ PRINT ARG=d1.min
 //+PLUMEDOC MCOLVAR YZDISTANCES
 /*
 Calculate distance between a pair of atoms neglecting the x-component.
+
 You can then calculate functions of the distribution of
 values such as the minimum, the number less than a certain quantity and so on.
 
diff --git a/src/setup/Units.cpp b/src/setup/Units.cpp
index d0f92226f..7790ea059 100644
--- a/src/setup/Units.cpp
+++ b/src/setup/Units.cpp
@@ -32,7 +32,9 @@ namespace setup {
 
 //+PLUMEDOC GENERIC UNITS
 /*
-This command sets the internal units for the code.  A new unit can be set by either
+This command sets the internal units for the code.  
+
+A new unit can be set by either
 specifying a conversion factor from the plumed default unit or by using a string
 corresponding to one of the defined units given below.  This directive MUST
 appear at the BEGINNING of the plumed.dat file.  The same units must be used
diff --git a/src/vatom/Ghost.cpp b/src/vatom/Ghost.cpp
index cf7b86651..27454a09e 100644
--- a/src/vatom/Ghost.cpp
+++ b/src/vatom/Ghost.cpp
@@ -31,8 +31,7 @@ namespace vatom {
 
 //+PLUMEDOC VATOM GHOST
 /*
-Calculate the absolute position of a ghost atom with fixed coordinates
-in the local reference frame formed by three atoms.
+Calculate the absolute position of a ghost atom with fixed coordinates in the local reference frame formed by three atoms.
 
 The computed ghost atom is stored as a virtual atom that can be accessed in
  an atom list through the the label for the GHOST action that creates it.
diff --git a/src/ves/TD_ProductDistribution.cpp b/src/ves/TD_ProductDistribution.cpp
index 48785831e..254b58173 100644
--- a/src/ves/TD_ProductDistribution.cpp
+++ b/src/ves/TD_ProductDistribution.cpp
@@ -33,8 +33,7 @@ namespace ves {
 
 //+PLUMEDOC VES_TARGETDIST TD_PRODUCT_DISTRIBUTION
 /*
-Target distribution given by a separable product
-of one-dimensional distributions (static or dynamic).
+Target distribution given by a separable product of one-dimensional distributions (static or dynamic).
 
 Employ a target distribution that is a separable product
 of one-dimensional distributions, defined as
diff --git a/user-doc/LOGMFDMOD.md b/user-doc/LOGMFDMOD.md
index 0f0934676..08eaefc77 100644
--- a/user-doc/LOGMFDMOD.md
+++ b/user-doc/LOGMFDMOD.md
@@ -8,7 +8,7 @@ reference: \cite MorishitaLogMFD \cite MorishitaLogPD \cite MorishitaVsLogMFD
 
 ## Overview
 
-The LOGMFD module contains the LogMFD/LogPD method for enhanced sampling in a CV space and for on-the-fly free energy reconstruction along the CVs. This module implements the multiple-replica algorithm (LogPD \cite MorishitaLogPD) as well as the single-replica algorithm (LogMFD \cite MorishitaLogMFD), the former invoking the Crooks-Jarzynski nonequilibrium work relation. In addition, TAMD/d-AFED \cite AbramsJ2008 can also be implemented by this module.
+The LOGMFD module contains the LogMFD/LogPD method for enhanced sampling in a CV space and for on-the-fly free energy reconstruction along the CVs. This module implements the multiple-replica algorithm (LogPD \cite MorishitaLogPD) as well as the single-replica algorithm (LogMFD \cite MorishitaLogMFD), the former invoking the Crooks-Jarzynski non-equilibrium work relation. In addition, TAMD/d-AFED \cite AbramsJ2008 can also be implemented by this module.
 
 ## Installation 
 This module is not installed by default. Add '\-\-enable-modules=logmfd' to your './configure' command when building PLUMED to enable these features.
diff --git a/user-doc/Performances.md b/user-doc/Performances.md
index 7dac6c286..20c0fb984 100644
--- a/user-doc/Performances.md
+++ b/user-doc/Performances.md
@@ -278,20 +278,20 @@ function. For instance, with an input like this one:
 \plumedfile
 ...
 c: COORDINATION GROUPA=1-108 GROUPB=1-108 R_0=1
-dfast: COORDINATION GROUPA=1-108 GROUPB=1-108 SWITCH={CUSTOM FUNC=1/(1+x2^3) R_0=1}
+d_fast: COORDINATION GROUPA=1-108 GROUPB=1-108 SWITCH={CUSTOM FUNC=1/(1+x2^3) R_0=1}
 ...
 \endplumedfile
 I (GB) obtained the following timings (on a Macbook laptop):
 \verbatim
 ...
 PLUMED: 4A  1 c                                          108     0.126592     0.001172     0.000701     0.002532
-PLUMED: 4A  2 dfast                                      108     0.135210     0.001252     0.000755     0.002623
+PLUMED: 4A  2 d_fast                                      108     0.135210     0.001252     0.000755     0.002623
 ...
 \endverbatim
 
 Notice the usage of `x2` as a variable for the switching function (see \ref switchingfunction), which
 avoids an unnecessary square root calculation (this is done automatically by the hard-coded switching functions
-when you use only even powers). The asmjit calculation (`dfast`) takes less than 10% more than the hard-coded
+when you use only even powers). The asmjit calculation (`d_fast`) takes less than 10% more than the hard-coded
 one (`c`).
 
 \page Time Time your Input
diff --git a/user-doc/spelling_words.dict b/user-doc/spelling_words.dict
index ceaa584fd..496ca1c66 100644
--- a/user-doc/spelling_words.dict
+++ b/user-doc/spelling_words.dict
@@ -893,3 +893,36 @@ fullerene
 fpt
 ECDF
 CDF
+Tetsuya
+Morishita
+Naoki
+Watanabe
+LogMFD
+AFED
+LogPD
+LOGMFDMOD
+PIVMOD
+logmfd
+MFD
+adiabatically
+isokinetic
+MFD
+NHILLS
+Fiskissimo
+Simoes
+Iglesias
+Javi
+Silvio
+Pipolo
+Fabio
+ArrayFire
+ESDW
+CECAM
+lyon
+Wallclock
+Ferrarotti
+cunha
+Paissoni
+samplextc
+SASDAB
+SASDB
diff --git a/user-doc/tutorials/others/isdb-2.txt b/user-doc/tutorials/others/isdb-2.txt
index aadf9f76e..9ec2a47c8 100644
--- a/user-doc/tutorials/others/isdb-2.txt
+++ b/user-doc/tutorials/others/isdb-2.txt
@@ -1,5 +1,5 @@
 /**
-\page isdb-2 ISDB: setting up a SAXS posprocessing and refinment calculation using MARTINI form factors 
+\page isdb-2 ISDB: setting up a SAXS post processing and refinement calculation using MARTINI form factors 
 
 \authors Cristina Paissoni 
 
diff --git a/user-doc/tutorials/performance-optimization.txt b/user-doc/tutorials/performance-optimization.txt
index 1b088838b..c6d42929b 100644
--- a/user-doc/tutorials/performance-optimization.txt
+++ b/user-doc/tutorials/performance-optimization.txt
@@ -4,7 +4,7 @@
 \authors Giovanni Bussi
 \date February 19, 2019
 
-This document describes the PLUMED tutorial held at CINECA, Feburary 2019.
+This document describes the PLUMED tutorial held at CINECA, February 2019.
 The aim of this tutorial is to learn how to optimize simulations performed using PLUMED.
 Although the presented input files are correct,
 the users are invited to **refer to the literature to understand how the
@@ -105,7 +105,7 @@ Notice that running with DETAILED_TIMERS might slow down a bit more your simulat
 Each line tells you how expensive was the calculation of each collective variable.
 Find which is the most expensive! We will focus on it in the next points
 
-\subsection performance-optimization-2d Optmizing coordination numbers using neighbor lists
+\subsection performance-optimization-2d Optimizing coordination numbers using neighbor lists
 
 The \ref COORDINATION of multiple atoms can be very expensive for a number of reasons:
 - It might require the calculation of a large number of distances
@@ -164,7 +164,7 @@ You will probably see that using neighbor lists is usually inconvenient unless y
 So far we have used PLUMED to analyze a CV on the fly. In principle, when you analyze CVs you typically only print them with a given
 stride (say, every 100 steps). This of course moderates significantly their cost. However, when you bias a CV you typically need to
 compute it at every step.
-Let's say that you want to use a restraint to make sure that the Mg ion is always hexacoordinated with water.
+Let's say that you want to use a restraint to make sure that the Mg ion is always six coordinated with water.
 This can be obtained using a \ref RESTRAINT located AT=6. Remove the \ref PRINT action from your input file
 and replace it with the following actions:
 \plumedfile
-- 
GitLab