Warn if using nsteps=0 without continuation=yes
authorErik Lindahl <erik@kth.se>
Sun, 22 Jun 2014 22:01:47 +0000 (00:01 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Mon, 23 Jun 2014 08:47:22 +0000 (10:47 +0200)
To achieve true single-point energy evaluations for a structure
we should not constrain the initial conformation. This is
typically done by settings nsteps=0, so grompp now warns if this
is used while keeping continuation = no (the default).

Fixes #1231.

Change-Id: I4e65b66f6535da4206e7dbd5f7769a33c94ec12d

src/gromacs/gmxpreprocess/readir.c

index 3c3b99f1728ca8ffb91c8e317a8d65c51ca51d20..4dbdf75e3e93a1875ae040aa849ff947b18d93aa 100644 (file)
@@ -552,6 +552,11 @@ void check_ir(const char *mdparin, t_inputrec *ir, t_gromppopts *opts,
         }
     }
 
+    if (ir->nsteps == 0 && !ir->bContinuation)
+    {
+        warning_note(wi, "For a correct single-point energy evaluation with nsteps = 0, use continuation = yes to avoid constraining the input coordinates.");
+    }
+
     /* LD STUFF */
     if ((EI_SD(ir->eI) || ir->eI == eiBD) &&
         ir->bContinuation && ir->ld_seed != -1)