Fix calculation of reciprocal terms in rerun
authorPascal Merz <pascal.merz@me.com>
Tue, 25 Feb 2020 23:58:02 +0000 (16:58 -0700)
committerPascal Merz <pascal.merz@me.com>
Wed, 26 Feb 2020 02:15:09 +0000 (19:15 -0700)
This at least temporarily fixes #3400.

Change-Id: I04d67d9bb3edbd66049573de71940e4bb7fa1ad4

docs/release-notes/2019/2019.6.rst
src/gromacs/mdrun/rerun.cpp

index 4a63f776d952b14878f2d7b0bac6c7f7b48f3fe2..8eb56ec75ea3cda2c9dced969bdf7b8f00819ced 100644 (file)
@@ -35,6 +35,15 @@ applied to them.
 
 :issue:`3375`
 
+Calculate Coulomb and LJ reciprocal terms in rerun
+""""""""""""""""""""""""""""""""""""""""""""""""""
+
+Reruns would not calculate Coulomb and LJ reciprocal terms, leading
+to wrong potential energies. This bug only showed up if GROMACS was
+compiled without GPU support.
+
+:issue:`3400`
+
 Fixes for ``gmx`` tools
 ^^^^^^^^^^^^^^^^^^^^^^^
 
index d3be42c82a89bfe5684bbf914079f8060b534c81..3a6469d0f5f92777f1edad686bfd0b9ea1789322 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2018,2019, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019,2020, 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.
@@ -41,8 +41,6 @@
  */
 #include "gmxpre.h"
 
-#include "config.h"
-
 #include <cinttypes>
 #include <cmath>
 #include <cstdio>
@@ -553,7 +551,7 @@ void gmx::Integrator::do_rerun()
         force_flags = (GMX_FORCE_STATECHANGED |
                        GMX_FORCE_DYNAMICBOX |
                        GMX_FORCE_ALLFORCES |
-                       (GMX_GPU ? GMX_FORCE_VIRIAL : 0) |  // TODO: Get rid of this once #2649 is solved
+                       GMX_FORCE_VIRIAL |  // TODO: Get rid of this once #2649 and #3400 are solved
                        GMX_FORCE_ENERGY |
                        (doFreeEnergyPerturbation ? GMX_FORCE_DHDL : 0));