Added grompp warning
authorMark Abraham <mark.j.abraham@gmail.com>
Wed, 5 Sep 2012 01:40:05 +0000 (11:40 +1000)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Fri, 16 Nov 2012 23:27:26 +0000 (00:27 +0100)
Don't silently allow the user to combine velocity generation and an
unconstrained start.

Change-Id: I62f9f917fe583dfccdddfb5f9fad82a17e15ca25

src/kernel/grompp.c

index 40caa60a70ad27d2c98f89cd92e2f6402a9a9b38..7f92ab12a9a5b8a220b01d16425e31b843fc507f 100644 (file)
@@ -1395,6 +1395,14 @@ int main (int argc, char *argv[])
 
   bNeedVel = EI_STATE_VELOCITY(ir->eI);
   bGenVel  = (bNeedVel && opts->bGenVel);
+  if (bGenVel && ir->bContinuation)
+  {
+      sprintf(warn_buf,
+              "Generating velocities is inconsistent with attempting "
+              "to continue a previous run. Choose only one of "
+              "gen-vel = yes and continuation = yes.");
+      warning_error(wi, warn_buf);
+  }
 
   snew(plist,F_NRE);
   init_plist(plist);