Merge release-5-0 into master
[alexxy/gromacs.git] / src / gromacs / fileio / trajectory_writing.c
index 1293b4ab20212f43877bffcbfee6a23ffcdc85c8..169d412d77283c3591f9c2c72bd35a49e29a6dfc 100644 (file)
  * To help us fund GROMACS development, we humbly ask that you cite
  * the research papers on the package. Check out http://www.gromacs.org.
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
 
-#include "typedefs.h"
-#include "gromacs/utility/smalloc.h"
-#include "sysstuff.h"
-#include "vec.h"
-#include "sim_util.h"
-#include "mdrun.h"
-#include "confio.h"
 #include "trajectory_writing.h"
-#include "mdoutf.h"
 
+#include "gromacs/fileio/confio.h"
+#include "gromacs/fileio/mdoutf.h"
+#include "gromacs/legacyheaders/mdrun.h"
+#include "gromacs/legacyheaders/sim_util.h"
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/legacyheaders/types/commrec.h"
+#include "gromacs/math/vec.h"
 #include "gromacs/timing/wallcycle.h"
+#include "gromacs/utility/smalloc.h"
 
 void
 do_md_trajectory_writing(FILE           *fplog,
@@ -100,14 +98,12 @@ do_md_trajectory_writing(FILE           *fplog,
     }
     ;
 
-#if defined(GMX_FAHCORE) || defined(GMX_WRITELASTSTEP)
+#if defined(GMX_FAHCORE)
     if (bLastStep)
     {
         /* Enforce writing positions and velocities at end of run */
         mdof_flags |= (MDOF_X | MDOF_V);
     }
-#endif
-#ifdef GMX_FAHCORE
     if (MASTER(cr))
     {
         fcReportProgress( ir->nsteps, step );
@@ -148,7 +144,6 @@ do_md_trajectory_writing(FILE           *fplog,
         if (bCPT)
         {
             (*nchkpt)++;
-            bCPT = FALSE;
         }
         debug_gmx();
         if (bLastStep && step_rel == ir->nsteps &&