Merge branch release-5-0 into release-5-1
authorMark Abraham <mark.j.abraham@gmail.com>
Mon, 14 Mar 2016 14:32:27 +0000 (15:32 +0100)
committerMark Abraham <mark.j.abraham@gmail.com>
Tue, 15 Mar 2016 12:41:38 +0000 (13:41 +0100)
Change-Id: Ic214521c998b898175a3c9317534008faccef280

1  2 
src/gromacs/mdlib/wall.c

diff --combined src/gromacs/mdlib/wall.c
index bdc5c90e404b06e96cd38a06e86a28b205c7f669,882925ce03020f44c537a35cabbe25cce43ab31d..729c0f281e0edff29e5b36298492432c7700637c
@@@ -3,7 -3,7 +3,7 @@@
   *
   * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
   * Copyright (c) 2001-2008, The GROMACS development team.
-  * Copyright (c) 2013,2014, by the GROMACS development team, led by
+  * Copyright (c) 2013,2014,2016, by the GROMACS development team, led by
   * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
   * and including many others, as listed in the AUTHORS file in the
   * top-level source directory and at http://www.gromacs.org.
   * the research papers on the package. Check out http://www.gromacs.org.
   */
  
 -#ifdef HAVE_CONFIG_H
 -#include <config.h>
 -#endif
 +#include "gmxpre.h"
  
  #include <math.h>
  #include <string.h>
 +
 +#include "gromacs/fileio/filenm.h"
 +#include "gromacs/legacyheaders/force.h"
 +#include "gromacs/legacyheaders/macros.h"
 +#include "gromacs/legacyheaders/nrnb.h"
 +#include "gromacs/legacyheaders/typedefs.h"
  #include "gromacs/math/utilities.h"
 -#include "sysstuff.h"
 -#include "typedefs.h"
 -#include "macros.h"
 +#include "gromacs/math/vec.h"
 +#include "gromacs/utility/cstringutil.h"
  #include "gromacs/utility/smalloc.h"
 -#include "force.h"
 -#include "gromacs/fileio/filenm.h"
 -#include "nrnb.h"
 -#include "vec.h"
  
  void make_wall_tables(FILE *fplog, const output_env_t oenv,
                        const t_inputrec *ir, const char *tabfn,
@@@ -176,9 -177,9 +176,9 @@@ real do_walls(t_inputrec *ir, t_forcere
                  /* The wall energy groups are always at the end of the list */
                  ggid = gid[i]*ngid + ngid - nwall + w;
                  at   = type[i];
-                 /* nbfp now includes the 6.0/12.0 derivative prefactors */
-                 Cd = nbfp[ntw[w]+2*at]/6.0;
-                 Cr = nbfp[ntw[w]+2*at+1]/12.0;
+                 /* nbfp now includes the 6/12 derivative prefactors */
+                 Cd = nbfp[ntw[w]+2*at]/6;
+                 Cr = nbfp[ntw[w]+2*at+1]/12;
                  if (!((Cd == 0 && Cr == 0) || (egp_flags[ggid] & EGP_EXCL)))
                  {
                      if (w == 0)
                                  Fp    = Ft + Geps + Heps2;
                                  VV    = Yt + Fp*eps;
                                  FF    = Fp + Geps + 2.0*Heps2;
-                                 Vd    = Cd*VV;
-                                 Fd    = Cd*FF;
+                                 Vd    = 6*Cd*VV;
+                                 Fd    = 6*Cd*FF;
                                  /* Repulsion */
                                  nnn   = nnn + 4;
                                  Yt    = VFtab[nnn];
                                  Fp    = Ft + Geps + Heps2;
                                  VV    = Yt + Fp*eps;
                                  FF    = Fp + Geps + 2.0*Heps2;
-                                 Vr    = Cr*VV;
-                                 Fr    = Cr*FF;
+                                 Vr    = 12*Cr*VV;
+                                 Fr    = 12*Cr*FF;
                                  V     = Vd + Vr;
                                  F     = -lamfac*(Fd + Fr)*tabscale;
                              }