fixed deadlock with replica exchange and -maxh
authorBerk Hess <hess@kth.se>
Mon, 3 Jun 2013 19:42:21 +0000 (21:42 +0200)
committerBerk Hess <hess@kth.se>
Mon, 3 Jun 2013 19:42:21 +0000 (21:42 +0200)
Fixes #1273

Change-Id: Ib93cce59adf60afe0971944ef41df3a7d9883edc

src/kernel/md.c

index 0ab2b9313fe62312153b4cdbc654c5592a1e16c2..4bf12a67d321324ae7fb22a25d2fb39f1aa35d53 100644 (file)
@@ -979,8 +979,8 @@ double do_md(FILE *fplog, t_commrec *cr, int nfile, const t_filenm fnm[],
         }
 
         /* < 0 means stop at next step, > 0 means stop at next NS step */
-        if ( (gs.set[eglsSTOPCOND] < 0 ) ||
-             ( (gs.set[eglsSTOPCOND] > 0 ) && ( bNS || ir->nstlist == 0)) )
+        if ( (gs.set[eglsSTOPCOND] < 0) ||
+             ( (gs.set[eglsSTOPCOND] > 0) && (bNStList || ir->nstlist == 0) ) )
         {
             bLastStep = TRUE;
         }