Remove assertion failure in AWH without initial stage
authorBerk Hess <hess@kth.se>
Thu, 28 Nov 2019 10:58:48 +0000 (11:58 +0100)
committerBerk Hess <hess@kth.se>
Thu, 28 Nov 2019 10:58:48 +0000 (11:58 +0100)
When not using the initial stage in AWH, we should not check
for coverage and histogram anomalies at step 0.

Fixes #3217

Change-Id: Iee19c4740c02ce56c0b43ad89efb6e37f4ad1a0d

docs/release-notes/2019/2019.5.rst
src/gromacs/awh/biasparams.h

index 055e6682510f4611189f4f0b6c3869c818b116f6..7a757cc08eba888fd77e4b8f8ea464c89ab81e70 100644 (file)
@@ -72,6 +72,11 @@ Clarified the documentation for pull geometry 'direction-periodic'.
 
 :issue:`2946`
 
+Remove assertion failure with AWH when not using the initial stage
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+:issue:`3217`
+
 Fixes for ``gmx`` tools
 ^^^^^^^^^^^^^^^^^^^^^^^
 
index d8eb69c3178efbf774bd2beeccd9b38e52c13fe6..2cf134d224182d76aecc5038780c156af195c19f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2015,2016,2017,2018,2019, 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.
@@ -156,7 +156,7 @@ class BiasParams
          */
         bool isCheckCoveringStep(int64_t step) const
         {
-            return step % numStepsCheckCovering_ == 0;
+            return step > 0 && (step % numStepsCheckCovering_ == 0);
         }
 
         /*! \brief