Merge branch release-2019 into release-2020
[alexxy/gromacs.git] / src / gromacs / awh / read_params.cpp
index 55837e1f88bc2b17960323059d355a19a56354e5..2b277177316ea97859389c93c38f3608f505a144 100644 (file)
@@ -620,8 +620,14 @@ static double get_pull_coord_period(const t_pull_coord& pullCoordParams, const t
             const real innerProduct = iprod(pullCoordParams.vec, pbc.box[dim]);
             if (innerProduct >= (1 - margin) * boxLength && innerProduct <= (1 + margin) * boxLength)
             {
-                GMX_RELEASE_ASSERT(intervalLength < (1 + margin) * boxLength,
-                                   "We have checked before that interval <= period");
+                if (intervalLength > (1 + margin) * boxLength)
+                {
+                    gmx_fatal(FARGS,
+                              "The AWH interval (%f nm) for a pull coordinate is larger than the "
+                              "box size (%f nm)",
+                              intervalLength, boxLength);
+                }
+
                 if (intervalLength > periodicFraction * boxLength)
                 {
                     period = boxLength;