Initialize inputrec better in genbox
authorMark Abraham <mark.j.abraham@gmail.com>
Thu, 6 Feb 2014 17:23:49 +0000 (18:23 +0100)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Fri, 7 Feb 2014 22:07:17 +0000 (23:07 +0100)
Incoming NBNXN patches change the behaviour if you just leave the VDW
modifier set to zero. The modifier is not supposed to be zero, because
grompp is supposed to change eintmodPOTSHIFT_VERLET to something
non-zero, but since we don't have a vanilla constructor for an
inputrec and use it outside grompp, we have a horrible flow-on effect.

So we set both the modifiers explicitly, to avoid these problems.

Change-Id: I2f8381e81104e673fb1a602b2d9cac1ccd81fff0

src/gromacs/gmxpreprocess/genbox-addconf.c

index e5c65836fca4b3ecb84c431881bc7f20f8266e87..c8f63ea24f37e1a50c0ecf3ceb44743134f0c3da 100644 (file)
@@ -254,11 +254,13 @@ static void do_nsgrid(FILE *fp, gmx_bool bVerbose,
 
     /* inputrec structure */
     snew(ir, 1);
-    ir->cutoff_scheme = ecutsGROUP;
-    ir->coulombtype   = eelCUT;
-    ir->vdwtype       = evdwCUT;
-    ir->ndelta        = 2;
-    ir->ns_type       = ensGRID;
+    ir->cutoff_scheme    = ecutsGROUP;
+    ir->coulomb_modifier = eintmodNONE;
+    ir->vdw_modifier     = eintmodNONE;
+    ir->coulombtype      = eelCUT;
+    ir->vdwtype          = evdwCUT;
+    ir->ndelta           = 2;
+    ir->ns_type          = ensGRID;
     snew(ir->opts.egp_flags, 1);
 
     top = gmx_mtop_generate_local_top(mtop, ir);