Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / gmxlib / mvdata.c
index 1e491b25aa2175b52999aefb8c15699114f9d580..41aeaeaf15e7267d1bbb475c44d016d6e6ddd7f0 100644 (file)
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 /* This file is completely threadsafe - keep it that way! */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "gromacs/legacyheaders/mvdata.h"
 
 #include <string.h>
 
-#include "typedefs.h"
-#include "main.h"
-#include "mvdata.h"
-#include "network.h"
-#include "smalloc.h"
-#include "gmx_fatal.h"
-#include "symtab.h"
-#include "vec.h"
-#include "tgroup.h"
+#include "gromacs/legacyheaders/main.h"
+#include "gromacs/legacyheaders/network.h"
+#include "gromacs/legacyheaders/tgroup.h"
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/legacyheaders/types/commrec.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/topology/symtab.h"
+#include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/smalloc.h"
 
 #define   block_bc(cr,   d) gmx_bcast(     sizeof(d),     &(d), (cr))
 /* Probably the test for (nr) > 0 in the next macro is only needed
@@ -554,6 +554,16 @@ static void bc_adress(const t_commrec *cr, t_adress *adress)
         nblock_bc(cr, adress->n_energy_grps, adress->group_explicit);
     }
 }
+
+static void bc_imd(const t_commrec *cr, t_IMD *imd)
+{
+    int g;
+
+    block_bc(cr, *imd);
+    snew_bc(cr, imd->ind, imd->nat);
+    nblock_bc(cr, imd->nat, imd->ind);
+}
+
 static void bc_fepvals(const t_commrec *cr, t_lambda *fep)
 {
     gmx_bool bAlloc = TRUE;
@@ -563,7 +573,7 @@ static void bc_fepvals(const t_commrec *cr, t_lambda *fep)
     block_bc(cr, fep->init_lambda);
     block_bc(cr, fep->init_fep_state);
     block_bc(cr, fep->delta_lambda);
-    block_bc(cr, fep->bPrintEnergy);
+    block_bc(cr, fep->edHdLPrintEnergy);
     block_bc(cr, fep->n_lambda);
     if (fep->n_lambda > 0)
     {
@@ -706,6 +716,11 @@ static void bc_inputrec(const t_commrec *cr, t_inputrec *inputrec)
         snew_bc(cr, inputrec->rot, 1);
         bc_rot(cr, inputrec->rot);
     }
+    if (inputrec->bIMD)
+    {
+        snew_bc(cr, inputrec->imd, 1);
+        bc_imd(cr, inputrec->imd);
+    }
     for (i = 0; (i < DIM); i++)
     {
         bc_cosines(cr, &(inputrec->ex[i]));