Merge branch release-2019 into release-2020
authorMark Abraham <mark.j.abraham@gmail.com>
Fri, 29 Nov 2019 12:52:13 +0000 (13:52 +0100)
committerMark Abraham <mark.j.abraham@gmail.com>
Fri, 29 Nov 2019 12:56:44 +0000 (13:56 +0100)
Change-Id: I138d910b0d5cb8555460f87345c4e312e528a3ce

docs/release-notes/2019/2019.5.rst
docs/user-guide/mdp-options.rst
src/gromacs/awh/biasparams.h
src/gromacs/awh/read_params.cpp
src/gromacs/fileio/pdbio.cpp
src/gromacs/pulling/pull.cpp

index 38398497955ea69294609cfb1518db351e36f557..7a757cc08eba888fd77e4b8f8ea464c89ab81e70 100644 (file)
@@ -61,6 +61,22 @@ about missing interactions.
 
 :issue:`3204`
 
+Fix issues with AWH with pull-geometry 'direction' to be periodic
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+Removed fatal error with AWH with periodic pull-geometry 'direction'
+when the distance was within 2% of half the box size.
+Changed an assertion failure when the AWH interval was larger than
+the box size to a fatal error.
+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
 ^^^^^^^^^^^^^^^^^^^^^^^
 
@@ -83,3 +99,12 @@ is unchanged. Existing parsers that conform to the documentation
 and expect whitespace separation will continue to work in all cases.
 
 :issue:`3176`
+
+Fix duplicate PDB CONECT record output
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+PDB "CONECT" record output was duplicated in some instances. Since |Gromacs| does
+not use these anywhere, analysis was not affected. The behavior is now fixed.
+
+:issue:`3206`
+
index 35d391bffa722c1376324991f845e29d4131706e..b9901f7b70b1eb1c670721119422b0759ce157bd 100644 (file)
@@ -1672,10 +1672,13 @@ pull-coord2-vec, pull-coord2-k, and so on.
 
    .. mdp-value:: direction-periodic
 
-      As :mdp-value:`pull-coord1-geometry=direction`, but allows the distance to be larger
-      than half the box size. With this geometry the box should not be
+      As :mdp-value:`pull-coord1-geometry=direction`, but does not apply
+      periodic box vector corrections to keep the distance within half
+      the box length. This is (only) useful for pushing groups apart
+      by more than half the box length by continuously changing the reference
+      location using a pull rate. With this geometry the box should not be
       dynamic (*e.g.* no pressure scaling) in the pull dimensions and
-      the pull force is not added to virial.
+      the pull force is not added to the virial.
 
    .. mdp-value:: direction-relative
 
index 938eefce1eb8a542432b220176a4e504007ece69..812963c27a508386a9cc4dd1713d223adcd4c0ac 100644 (file)
@@ -145,7 +145,10 @@ public:
      * \returns true at steps where checks should be performed.
      * \note  Only returns true at free energy update steps.
      */
-    bool isCheckCoveringStep(int64_t step) const { return step % numStepsCheckCovering_ == 0; }
+    bool isCheckCoveringStep(int64_t step) const
+    {
+        return step > 0 && (step % numStepsCheckCovering_ == 0);
+    }
 
     /*! \brief
      * Returns if to perform checks for anomalies in the histogram.
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;
index fa4be6e34b02ec4b5c147b66021151052b5bd6fd..3466d8d4f1114644918dbe3c9fba228062ccc701 100644 (file)
@@ -765,9 +765,7 @@ static void gmx_conect_addline(gmx_conect_t* con, char* line)
             n      = sscanf(line, format.c_str(), &aj);
             if (n == 1)
             {
-                srenew(con->conect, ++con->nconect);
-                con->conect[con->nconect - 1].ai = ai - 1;
-                con->conect[con->nconect - 1].aj = aj - 1;
+                gmx_conect_add(con, ai - 1, aj - 1); /* to prevent duplicated records */
             }
         } while (n == 1);
     }
index 4e159aa7606a9e68e05966f421ee30a7586e9fe1..c20deec924102628ce1a33e4c3a6cfa4709c0e39 100644 (file)
@@ -516,7 +516,11 @@ static void get_pull_coord_dr(struct pull_t* pull, int coord_ind, const t_pbc* p
     PullCoordSpatialData& spatialData = pcrd->spatialData;
 
     double md2;
-    if (pcrd->params.eGeom == epullgDIRPBC)
+    /* With AWH pulling we allow for periodic pulling with geometry=direction.
+     * TODO: Store a periodicity flag instead of checking for external pull provider.
+     */
+    if (pcrd->params.eGeom == epullgDIRPBC
+        || (pcrd->params.eGeom == epullgDIR && pcrd->params.eType == epullEXTERNAL))
     {
         md2 = -1;
     }