From 06c8e95774cc1d42a49d9ca2419cbbbaf42d3cac Mon Sep 17 00:00:00 2001
From: Emile Maras <maras@linux.suse>
Date: Tue, 6 Jun 2017 14:20:54 +0200
Subject: [PATCH] corrected the fix_neb documentation

---
 doc/src/fix_neb.txt | 98 +++++++++++++++++++++++----------------------
 1 file changed, 50 insertions(+), 48 deletions(-)

diff --git a/doc/src/fix_neb.txt b/doc/src/fix_neb.txt
index cd0fa23e85..94c6ee84fd 100644
--- a/doc/src/fix_neb.txt
+++ b/doc/src/fix_neb.txt
@@ -18,20 +18,19 @@ Kspring = parallel spring constant (force/distance units or force units) :l
 zero or more keyword/value pairs may be appended :l
 keyword = {nudg_style} or {perp} or {freend} or {freend_k_spring} :l
   {nudg_style} value = {neigh} or {idealpos}
-    {neigh} = the parallel nudging force is calculated from the distance to neighbouring replicas (in this case, Kspring is in force/distance units)
+    {neigh} = the parallel nudging force is calculated from the distances to neighbouring replicas (in this case, Kspring is in force/distance units)
     {idealpos} = the parallel nudging force is proportional to the distance between the replica and its interpolated ideal position (in this case Kspring is in force units)
   {perp} value {none} or kspring2
     {none} = no perpendicular spring force is applied
+    {kspring2} = spring constant for the perpendicular nudging force (in force/distance units)
   {freeend} value = {none} or {ini} or {final} or {finaleini} or {final2eini}
-    {none} = no nudging force is apply to the first and last replicas
+    {none} = no nudging force is applied to the first and last replicas
     {ini} = set the first replica to be a free end 
     {final} = set the last replica to be a free end
     {finaleini} = set the last replica to be a free end and set its target energy as that of the first replica
     {final2eini} = same as {finaleini} plus prevent intermediate replicas to have a lower energy than the first replica
-  {freeend_kspring}  value = kspring2
-    kspring2 = spring constant of the perpendicular spring force (per distance units)    
-flag = set behavior for the end points
-   flag = 
+  {freeend_kspring}  value = kspring3
+    kspring3 = spring constant of the perpendicular spring force (per distance units)    
    :pre
 
 [Examples:]
@@ -58,10 +57,10 @@ highest energy along the MEP).
 One purpose of the nudging forces is to keep the replicas equally
 spaced.  During the NEB, the 3N-length vector of interatomic force Fi
 = -Grad(V) of replicas i is altered. For all intermediate replicas
-(i.e. for 1<i<n) except for the climbing replica the force vector
+(i.e. for 1<i<n) but the climbing replica the force vector
 becomes:
 
-Fi = -Grad(V) + (Grad(V) dot That) That + Fspringparallel + Fspringperp :pre
+Fi = -Grad(V) + (Grad(V) dot That) That + Fnudgparallel + Fspringperp :pre
 
 That is the unit "tangent" vector for replica i and is a function of
 Ri, Ri-1, Ri+1, and the potential energy of the 3 replicas; it points
@@ -70,18 +69,51 @@ roughly in the direction of (Ri+i - Ri-1) (see the
 coordinates of replica i; Ri-1 and Ri+1 are the coordinates of its
 neighbor replicas.  The term (Grad(V) dot That) is used to remove the
 component of the gradient parallel to the path which would tend to
-distribute the replica unevenly along the path.  Fspringparallel is an
-artificial spring force which is applied only in the tangent direction
+distribute the replica unevenly along the path.  Fnudgparallel is an
+artificial nudging force which is applied only in the tangent direction
 and which maintains the replicas equally spaced (see below for more
 information).  Fspringperp is an optinal artificial spring which is
 applied only perpendicular to the tangent and which prevent the paths
 from forming too acute kinks (see below for more information).
 
+The keyword {nudg_style} allow to specify how to parallel
+nudging force is computed. With a value of idealpos, the spring 
+force is computed as suggested in "(E)"_#E :
+   
+Fnudgparallel=-{Kspring}* (RD-RDideal)/(2 meanDist) :pre
 
-In the second stage of the NEB, the interatomic force Fi for the
-climbing replica (which is the replica of highest energy) becomes:
+where RD is the "reaction coordinate" see "neb"_neb.html section, and
+RDideal is the ideal RD for which all the images are equally spaced
+(i.e. RDideal = (i-1)*meanDist when the climbing image is off, where i
+is the replica number). The meanDist is the average distance between
+replicas.
 
-Fi = -Grad(V) + 2 (Grad(V) dot That) That :pre
+When {nudg_style} has a value of neigh (or by default), the parallel 
+nudging force is computed as in "(Henkelman1)"_#Henkelman1 by 
+connecting each intermediate replica with the previous and the next 
+image:
+
+Fnudgparallel= {Kspring}* (|Ri+1 - Ri| - |Ri - Ri-1|) :pre
+
+The parallel nudging force associated with the key word idealpos should
+usually be more efficient at keeping the images equally spaced.
+
+:line
+
+The keyword {perp} allows to add a spring force perpendicular to the
+path in order to prevent the path from becoming too kinky. It can
+improve significantly the convergence of the NEB when the resolution
+is poor (i.e. when too few images are used) (see "(Maras)"_#Maras1).
+The perpendicular spring force is given by
+
+Fspringperp = {Kspringperp} * f(Ri-1,Ri,Ri+1) (Ri+1 + Ri-1 - 2 Ri) :pre
+
+f(Ri-1 Ri R+1) is a smooth scalar function of the angle Ri-1 Ri
+Ri+1. It is equal to 0 when the path is straight and is equal to 1
+when the angle Ri-1 Ri Ri+1 is accute. f(Ri-1 Ri R+1) is defined in
+"(Jonsson)"_#Jonsson
+
+:line
 
 By default, the force acting on the first and last replicas is not
 altered so that during the NEB relaxation, these ending replicas relax
@@ -90,8 +122,8 @@ toward local minima. However it is possible to use the key word
 toward a MEP while constraining its energy.  The interatomic force Fi
 for the free end image becomes :
 
-Fi = -Grad(V)+ (Grad(V) dot That + E-ETarget) That,  {when} Grad(V) dot That < 0
-Fi = -Grad(V)+ (Grad(V) dot That + ETarget- E) That, {when} Grad(V) dot That > 0
+Fi = -Grad(V)+ (Grad(V) dot That + (E-ETarget)*kspring3) That,  {when} Grad(V) dot That < 0
+Fi = -Grad(V)+ (Grad(V) dot That + (ETarget- E)*kspring3) That, {when} Grad(V) dot That > 0
 :pre
 
 where E is the energy of the free end replica and ETarget is the
@@ -120,44 +152,14 @@ replica, a free end neb calculation with the value {finaleini} or
 
 :line
 
-The keyword {nudg_style} allow to specify how to parallel
-nudging force is computed. With a value of idealpos, the spring 
-force is computed as suggested in "(E)"_#E :
-   
-Fnudgparallel=-{Kspring}* (RD-RDideal)/(2 meanDist) :pre
 
-where RD is the "reaction coordinate" see "neb"_neb.html section, and
-RDideal is the ideal RD for which all the images are equally spaced
-(i.e. RDideal = (i-1)*meanDist when the climbing image is off, where i
-is the replica number). The meanDist is the average distance between
-replicas.
 
-When {nudg_style} has a value of neigh (or by default), the parallel 
-nudging force is computed as in "(Henkelman1)"_#Henkelman1 by 
-connecting each intermediate replica with the previous and the next 
-image:
-
-Fnudgparallel= {Kspring}* (|Ri+1 - Ri| - |Ri - Ri-1|) :pre
-
-The parallel nudging force associated with the key word idealpos should
-usually be more efficient at keeping the images equally spaced.
-
-:line
-
-The keyword {perp} allows to add a spring force perpendicular to the
-path in order to prevent the path from becoming too kinky. It can
-improve significantly the convergence of the NEB when the resolution
-is poor (i.e. when too few images are used) (see "(Maras)"_#Maras1).
-The perpendicular spring force is given by
+In the second stage of the NEB, the interatomic force Fi for the
+climbing replica (which is the replica of highest energy) becomes:
 
-Fspringperp = {Kspringperp} * f(Ri-1,Ri,Ri+1) (Ri+1 + Ri-1 - 2 Ri) :pre
+Fi = -Grad(V) + 2 (Grad(V) dot That) That :pre
 
-f(Ri-1 Ri R+1) is a smooth scalar function of the angle Ri-1 Ri
-Ri+1. It is equal to 0 when the path is straight and is equal to 1
-when the angle Ri-1 Ri Ri+1 is accute. f(Ri-1 Ri R+1) is defined in
-"(Jonsson)"_#Jonsson
 
-:line
 
 [Restart, fix_modify, output, run start/stop, minimize info:]
 
-- 
GitLab