Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / fileio / trajectory_writing.c
index 813c5b80369f2de45ee2f62d60787b583d9d51e7..01b83b7de14a6aba03bb4fcfe95f21185761284a 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 "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,
@@ -61,14 +59,11 @@ do_md_trajectory_writing(FILE           *fplog,
                          t_state        *state_global,
                          gmx_mtop_t     *top_global,
                          t_forcerec     *fr,
-                         gmx_update_t    upd,
                          gmx_mdoutf_t    outf,
                          t_mdebin       *mdebin,
                          gmx_ekindata_t *ekind,
                          rvec           *f,
                          rvec           *f_global,
-                         gmx_wallcycle_t wcycle,
-                         gmx_rng_t       mcrng,
                          int            *nchkpt,
                          gmx_bool        bCPT,
                          gmx_bool        bRerunMD,
@@ -128,17 +123,9 @@ do_md_trajectory_writing(FILE           *fplog,
 
     if (mdof_flags != 0)
     {
-        wallcycle_start(wcycle, ewcTRAJ);
+        wallcycle_start(mdoutf_get_wcycle(outf), ewcTRAJ);
         if (bCPT)
         {
-            if (state->flags & (1<<estLD_RNG))
-            {
-                get_stochd_state(upd, state);
-            }
-            if (state->flags  & (1<<estMC_RNG))
-            {
-                get_mc_state(mcrng, state);
-            }
             if (MASTER(cr))
             {
                 if (bSumEkinhOld)
@@ -158,7 +145,6 @@ do_md_trajectory_writing(FILE           *fplog,
         if (bCPT)
         {
             (*nchkpt)++;
-            bCPT = FALSE;
         }
         debug_gmx();
         if (bLastStep && step_rel == ir->nsteps &&
@@ -181,6 +167,6 @@ do_md_trajectory_writing(FILE           *fplog,
                                 ir->ePBC, state->box);
             debug_gmx();
         }
-        wallcycle_stop(wcycle, ewcTRAJ);
+        wallcycle_stop(mdoutf_get_wcycle(outf), ewcTRAJ);
     }
 }