Fix Ewald 3DC dipole with Verlet scheme
authorBerk Hess <hess@kth.se>
Wed, 9 Mar 2016 22:09:51 +0000 (23:09 +0100)
committerBerk Hess <hess@kth.se>
Wed, 9 Mar 2016 22:09:51 +0000 (23:09 +0100)
With the Verlet scheme, the dipole for the Ewald 3DC correction was
summed twice over the PP-ranks at non-NS steps, leads to a correction
that was a factor #PP-ranks too high.

Fixes #1916.

Change-Id: Iefda70ea42f1b6a4c6bd4cbc7c0982114282c15c

src/gromacs/mdlib/sim_util.c

index bd46585d14b42387db61fc3f17fd09b57d9d2751..13b8fc7a9a81dc5e5b800c4231fd68ffa7756040 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,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.
@@ -1112,12 +1112,6 @@ void do_force_cutsVERLET(FILE *fplog, t_commrec *cr,
         {
             wallcycle_start(wcycle, ewcMOVEX);
             dd_move_x(cr->dd, box, x);
-
-            /* When we don't need the total dipole we sum it in global_stat */
-            if (bStateChanged && NEED_MUTOT(*inputrec))
-            {
-                gmx_sumd(2*DIM, mu, cr);
-            }
             wallcycle_stop(wcycle, ewcMOVEX);
 
             wallcycle_start(wcycle, ewcNB_XF_BUF_OPS);