From 9283b607c18aa22923b950553a43e08ea861b574 Mon Sep 17 00:00:00 2001 From: Paul Bauer Date: Wed, 6 Dec 2017 14:02:08 +0100 Subject: [PATCH] Disallow combination of PME-user and verlet cutoff Fixes #2332 Change-Id: I127a5680a0a83b7e5f8163b99619a6cc3729a992 --- src/gromacs/gmxpreprocess/readir.cpp | 6 ++++++ src/gromacs/mdlib/forcerec.cpp | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/src/gromacs/gmxpreprocess/readir.cpp b/src/gromacs/gmxpreprocess/readir.cpp index 6a445c3aee..be62842c87 100644 --- a/src/gromacs/gmxpreprocess/readir.cpp +++ b/src/gromacs/gmxpreprocess/readir.cpp @@ -372,6 +372,12 @@ void check_ir(const char *mdparin, t_inputrec *ir, t_gromppopts *opts, warning_error(wi, "Implicit solvent is not (yet) supported with the with Verlet lists."); } + if (EEL_USER(ir->coulombtype)) + { + sprintf(warn_buf, "Coulomb type %s is not supported with the verlet scheme", eel_names[ir->coulombtype]); + warning_error(wi, warn_buf); + } + if (ir->nstlist <= 0) { warning_error(wi, "With Verlet lists nstlist should be larger than 0"); diff --git a/src/gromacs/mdlib/forcerec.cpp b/src/gromacs/mdlib/forcerec.cpp index 7c3a56e813..74efcf86fa 100644 --- a/src/gromacs/mdlib/forcerec.cpp +++ b/src/gromacs/mdlib/forcerec.cpp @@ -2750,6 +2750,15 @@ void init_forcerec(FILE *fp, { gmx_fatal(FARGS, "Cut-off scheme %S only supports LJ repulsion power 12", ecutscheme_names[ir->cutoff_scheme]); } + /* Older tpr files can contain Coulomb user tables with the Verlet cutoff-scheme, + * while mdrun does not (and never did) support this. + */ + if (EEL_USER(fr->eeltype)) + { + gmx_fatal(FARGS, "Combination of %s and cutoff scheme %s is not supported", + eel_names[ir->coulombtype], ecutscheme_names[ir->cutoff_scheme]); + } + fr->bvdwtab = FALSE; fr->bcoultab = FALSE; } -- 2.11.4.GIT