Manually sort some includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / imd / imd.c
index dd7b3d77c3ec521cc3f07e5b6012047e4655e5f5..7c6585260e25f5c75927454e674357403846071a 100644 (file)
@@ -33,7 +33,7 @@
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-/*! \libinternal \file
+/*! \internal \file
  *
  * \brief
  * Implements functions of imd.h.
  *
  * \author Martin Hoefling, Carsten Kutzner <ckutzne@gwdg.de>
  *
- * \inlibraryapi
  * \ingroup module_imd
  */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
+#include "gmxpre.h"
 
 #include "imd.h"
-#include "imdsocket.h"
-#include "smalloc.h"
-#include "network.h"
-#include "mdrun.h"
-#include "sighandler.h"
-#include "gmx_ga2la.h"
-#include "xvgr.h"
-#include "gromacs/mdlib/groupcoord.h"
-#include "gromacs/fileio/confio.h"
-#include "mtop_util.h"
-#include "names.h"
-#include "gromacs/timing/wallcycle.h"
 
+#include <errno.h>
 #include <string.h>
 
+#include "config.h"
+
 #ifdef GMX_NATIVE_WINDOWS
-#include <Windows.h>
+#include <windows.h>
 #else
 #include <unistd.h>
 #endif
 
+#include "gromacs/fileio/confio.h"
+#include "gromacs/fileio/xvgr.h"
+#include "gromacs/imd/imdsocket.h"
+#include "gromacs/legacyheaders/gmx_ga2la.h"
+#include "gromacs/legacyheaders/mdrun.h"
+#include "gromacs/legacyheaders/names.h"
+#include "gromacs/legacyheaders/network.h"
+#include "gromacs/legacyheaders/sighandler.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/mdlib/groupcoord.h"
+#include "gromacs/pbcutil/pbc.h"
+#include "gromacs/timing/wallcycle.h"
+#include "gromacs/topology/mtop_util.h"
+#include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/smalloc.h"
+
 /*! \brief How long shall we wait in seconds until we check for a connection again? */
 #define IMDLOOPWAIT 1
 
 #define IMDVERSION 2
 
 /*! \brief Broadcast d to all nodes */
-#define  block_bc(cr,   d) gmx_bcast(     sizeof(d),     &(d), (cr))
+#define  block_bc(cr, d) gmx_bcast(sizeof(d), &(d), (cr))
 
 /*! \brief Broadcast nr elements of d to all nodes */
 #define  nblock_bc(cr, nr, d) gmx_bcast((nr)*sizeof((d)[0]), (d), (cr))
 
 
-/*! \libinternal
+/*! \internal
  * \brief
  * IMD (interactive molecular dynamics) energy record.
  *
@@ -116,7 +118,7 @@ typedef struct
 } IMDEnergyBlock;
 
 
-/*! \libinternal
+/*! \internal
  * \brief IMD (interactive molecular dynamics) communication structure.
  *
  * This structure defines the IMD communication message header & protocol version.
@@ -128,7 +130,7 @@ typedef struct
 } IMDHeader;
 
 
-/*! \libinternal
+/*! \internal
  * \brief IMD (interactive molecular dynamics) main data structure.
  *
  * Contains private IMD data
@@ -195,7 +197,7 @@ typedef struct gmx_IMD
 } t_gmx_IMD_setup;
 
 
-/*! \libinternal
+/*! \internal
  * \brief Enum for types of IMD messages.
  *
  * We use the same records as the NAMD/VMD IMD implementation.
@@ -216,7 +218,7 @@ typedef enum IMDType_t
 } IMDMessageType;
 
 
-/*! \libinternal
+/*! \internal
  * \brief Names of the IMDType for error messages.
  */
 const char *eIMDType_names[IMD_NR + 1] = {
@@ -752,7 +754,7 @@ static void keep_old_values(t_gmx_IMD_setup *IMDsetup)
 
 
 /*! \brief Returns TRUE if any component of the two rvecs differs. */
-static inline gmx_bool rvecs_differ(const rvec v1, const rvec v2)
+static gmx_inline gmx_bool rvecs_differ(const rvec v1, const rvec v2)
 {
     int i;
 
@@ -1361,9 +1363,11 @@ extern void init_IMD(
     imd_check_integrator_parallel(ir, cr);
 
 
-    /*******************************************************/
-    /** From here on we assume that IMD is turned on      **/
-    /*******************************************************/
+    /*
+     *****************************************************
+     * From here on we assume that IMD is turned on      *
+     *****************************************************
+     */
 
 #ifdef GMX_IMD
     nat_total = top_global->natoms;