Made mdrun exit with a fatal error for EM or NM with -rerun
authorMark Abraham <Mark.J.Abraham@gmail.com>
Sun, 7 Nov 2010 01:36:37 +0000 (12:36 +1100)
committerMark Abraham <Mark.J.Abraham@gmail.com>
Sun, 7 Nov 2010 01:36:37 +0000 (12:36 +1100)
src/kernel/runner.c

index a3a8fdea51094c3fea3a154d0e86d8bfc5a0b131..888fe31b7435a760707686e15abc155c356c040d 100644 (file)
@@ -446,6 +446,12 @@ int mdrunner(int nthreads_requested, FILE *fplog,t_commrec *cr,int nfile,
             );
     }
 
+    if ((Flags & MD_RERUN) &&
+        (EI_ENERGY_MINIMIZATION(inputrec->eI) || eiNM == inputrec->eI))
+    {
+        gmx_fatal(FARGS, "The .mdp file specified an energy mininization or normal mode algorithm, and these are not compatible with mdrun -rerun");
+    }
+
     if (can_use_allvsall(inputrec,mtop,TRUE,cr,fplog))
     {
         /* All-vs-all loops do not work with domain decomposition */