Fixed mdrun segv with QM/MM ONIOM scheme
authorBerk Hess <hess@kth.se>
Tue, 21 Aug 2018 08:07:22 +0000 (10:07 +0200)
committerBerk Hess <hess@kth.se>
Tue, 21 Aug 2018 08:07:22 +0000 (10:07 +0200)
Fixes #2617

Change-Id: I097d392ea53aeff589042df5074866e07a0ce5c5

docs/release-notes/2018/2018.3.rst
src/gromacs/mdlib/ns.cpp

index 43d9250fc2ca6db7fca933b5201175e7c63bbe34..c97856100d96d3c907711edc7c4c40e1d2dad103 100644 (file)
@@ -42,6 +42,11 @@ When this is not the case, grompp will issue a warning.
 
 :issue:`2397`
 
+Fixed segmentation fault in mdrun with QM/MM ONIOM scheme
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+:issue:`2617`
+
 Fixes for ``gmx`` tools
 ^^^^^^^^^^^^^^^^^^^^^^^
 
index acefed5c6a3ad87dcf966c62310904806e6b88a6..f48e4bd6b413ab52a217d7a6855d35da499461fb 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,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017,2018, 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.
@@ -312,6 +312,8 @@ void init_neighbor_list(FILE *log, t_forcerec *fr, int homenr)
 
 static void reset_nblist(t_nblist *nl)
 {
+    GMX_RELEASE_ASSERT(nl, "Should only reset valid nblists");
+
     nl->nri       = -1;
     nl->nrj       = 0;
     if (nl->jindex)
@@ -324,7 +326,7 @@ static void reset_neighbor_lists(t_forcerec *fr)
 {
     int n, i;
 
-    if (fr->bQMMM)
+    if (fr->bQMMM && fr->qr->QMMMscheme != eQMMMschemeoniom)
     {
         /* only reset the short-range nblist */
         reset_nblist(fr->QMMMlist);