Merge "Added grompp warning" into release-4-6
authorDavid van der Spoel <davidvanderspoel@gmail.com>
Sat, 17 Nov 2012 07:12:14 +0000 (08:12 +0100)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Sat, 17 Nov 2012 07:12:14 +0000 (08:12 +0100)
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);