Added checks for TPI + Verlet scheme
authorBerk Hess <hess@kth.se>
Wed, 30 Jul 2014 12:59:17 +0000 (14:59 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Sun, 10 Aug 2014 12:57:54 +0000 (14:57 +0200)
Change-Id: I040f4cc9dbb8ff25ed97d18cca0b4a2c1e7014b0

src/gromacs/gmxpreprocess/readir.c
src/gromacs/mdlib/tpi.c

index 9e2dbf0311905cf816cebef8f7ff9cf722e966a0..9d28fe0252d09912669d8dc38bc8bcd40a4f5382 100644 (file)
@@ -575,6 +575,8 @@ void check_ir(const char *mdparin, t_inputrec *ir, t_gromppopts *opts,
         CHECK(ir->nstlist <= 0);
         sprintf(err_buf, "TPI does not work with full electrostatics other than PME");
         CHECK(EEL_FULL(ir->coulombtype) && !EEL_PME(ir->coulombtype));
+        sprintf(err_buf, "TPI does not work (yet) with the Verlet cut-off scheme");
+        CHECK(ir->cutoff_scheme == ecutsVERLET);
     }
 
     /* SHAKE / LINCS */
index 72a6901f9e221778df7c9781305f0ddf1b7bf3d0..8eaa88b740e1f3fd82bbb54c96ecbd1f41723d8e 100644 (file)
@@ -167,6 +167,11 @@ double do_tpi(FILE *fplog, t_commrec *cr,
     real bU_bin_limit      = 50;
     real bU_logV_bin_limit = bU_bin_limit + 10;
 
+    if (inputrec->cutoff_scheme == ecutsVERLET)
+    {
+        gmx_fatal(FARGS, "TPI does not work (yet) with the Verlet cut-off scheme");
+    }
+
     nnodes = cr->nnodes;
 
     top = gmx_mtop_generate_local_top(top_global, inputrec);