Merge branch 'release-4-5-patches' into rotation-4-5
authorCarsten Kutzner <ckutzne@gwdg.de>
Mon, 8 Nov 2010 08:58:10 +0000 (09:58 +0100)
committerCarsten Kutzner <ckutzne@gwdg.de>
Mon, 8 Nov 2010 08:58:10 +0000 (09:58 +0100)
1  2 
src/kernel/runner.c

diff --combined src/kernel/runner.c
index fd0953c4229f3ae3be79df7c1b250a38ee9d48d0,888fe31b7435a760707686e15abc155c356c040d..557a467a473e8d80ff900716d7fae205ea32461f
@@@ -72,7 -72,7 +72,7 @@@
  #include "sighandler.h"
  #include "tpxio.h"
  #include "txtdump.h"
 -
 +#include "pull_rotation.h"
  #include "md_openmm.h"
  
  #ifdef GMX_LIB_MPI
@@@ -446,6 -446,12 +446,12 @@@ int mdrunner(int nthreads_requested, FI
              );
      }
  
+     if ((Flags & MD_RERUN) &&
+         (EI_ENERGY_MINIMIZATION(inputrec->eI) || eiNM == inputrec->eI))
+     {
+         gmx_fatal(FARGS, "The .mdp file specified an energy mininization or normal mode algorithm, and these are not compatible with mdrun -rerun");
+     }
      if (can_use_allvsall(inputrec,mtop,TRUE,cr,fplog))
      {
          /* All-vs-all loops do not work with domain decomposition */
              init_pull(fplog,inputrec,nfile,fnm,mtop,cr,oenv,
                        EI_DYNAMICS(inputrec->eI) && MASTER(cr),Flags);
          }
 +        
 +        if (inputrec->bRot)
 +        {
 +           /* Initialize enforced rotation code */
 +           init_rot(fplog,inputrec,nfile,fnm,cr,state->x,state->box,mtop,oenv,
 +                    bVerbose,Flags);
 +        }
  
          constr = init_constraints(fplog,mtop,inputrec,ed,state,cr);
  
          {
              finish_pull(fplog,inputrec->pull);
          }
 +        
 +        if (inputrec->bRot)
 +        {
 +            finish_rot(fplog,inputrec->rot);
 +        }
 +
      } 
      else 
      {