Add fatal errors for VV and twin-range MTS
[alexxy/gromacs.git] / src / mdlib / md_support.c
index b1b73bab5992810ef85239c30e1a10975fd4f23e..ba800e56b6d24135bd43668edf8adaa253ce5951 100644 (file)
@@ -50,6 +50,7 @@
 #include "nrnb.h"
 #include "md_logging.h"
 #include "md_support.h"
+#include "names.h"
 
 /* Is the signal in one simulation independent of other simulations? */
 gmx_bool gs_simlocal[eglsNR] = { TRUE, FALSE, FALSE, TRUE };
@@ -741,6 +742,11 @@ void check_ir_old_tpx_versions(t_commrec *cr, FILE *fplog,
                             "nstdhdl", &ir->fepvals->nstdhdl);
         }
     }
+
+    if (EI_VV(ir->eI) && IR_TWINRANGE(*ir) && ir->nstlist > 1)
+    {
+        gmx_fatal(FARGS, "Twin-range multiple time stepping does not work with integrator %s.", ei_names[ir->eI]);
+    }
 }
 
 void rerun_parallel_comm(t_commrec *cr, t_trxframe *fr,