Remove some typedefs.h dependencies
authorTeemu Murtola <teemu.murtola@gmail.com>
Sun, 25 May 2014 04:28:31 +0000 (07:28 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Sun, 25 May 2014 04:34:53 +0000 (07:34 +0300)
- Replace several typedefs.h dependencies with either forward
  declarations or includes of the individual headers that are required.
- Some other cleanup in the selection code, removing stuff that is no
  longer necessary for C++.

Change-Id: I6b9b3fe5cbbcc8f6bac29c9306cc4c4c57e59479

43 files changed:
src/gromacs/fileio/enxio.c
src/gromacs/fileio/tngio.cpp
src/gromacs/fileio/tngio.h
src/gromacs/fileio/tngio_for_tools.h
src/gromacs/fileio/trx.h
src/gromacs/fileio/vmdio.c
src/gromacs/fileio/vmdio.h
src/gromacs/fileio/xdrf.h
src/gromacs/fileio/xtcio.h
src/gromacs/pbcutil/pbc.c
src/gromacs/pbcutil/rmpbc.c
src/gromacs/pbcutil/rmpbc.h
src/gromacs/selection/centerofmass.cpp
src/gromacs/selection/centerofmass.h
src/gromacs/selection/evaluate.h
src/gromacs/selection/indexutil.cpp
src/gromacs/selection/indexutil.h
src/gromacs/selection/nbsearch.cpp
src/gromacs/selection/nbsearch.h
src/gromacs/selection/poscalc.cpp
src/gromacs/selection/poscalc.h
src/gromacs/selection/position.cpp
src/gromacs/selection/scanner_internal.cpp
src/gromacs/selection/selection.cpp
src/gromacs/selection/selection.h
src/gromacs/selection/selectioncollection-impl.h
src/gromacs/selection/selectioncollection.cpp
src/gromacs/selection/selectioncollection.h
src/gromacs/selection/selmethod.h
src/gromacs/selection/sm_simple.cpp
src/gromacs/selection/tests/poscalc.cpp
src/gromacs/selection/tests/selectioncollection.cpp
src/gromacs/selection/tests/toputils.h
src/gromacs/trajectoryanalysis.h
src/gromacs/trajectoryanalysis/analysismodule.h
src/gromacs/trajectoryanalysis/analysissettings.h
src/gromacs/trajectoryanalysis/cmdlinerunner.cpp
src/gromacs/trajectoryanalysis/modules/angle.cpp
src/gromacs/trajectoryanalysis/modules/distance.cpp
src/gromacs/trajectoryanalysis/modules/freevolume.cpp
src/gromacs/trajectoryanalysis/modules/nsc.h
src/gromacs/trajectoryanalysis/modules/sasa.cpp
src/gromacs/trajectoryanalysis/runnercommon.h

index 4ba34963723b7ad8f102e8dd10ffb93cd4673481..0548c4673fef7a778e4387d76f9f708e81b64bd0 100644 (file)
 #include "gromacs/math/vec.h"
 #include "xdrf.h"
 #include "macros.h"
+#include "typedefs.h"
 
 #include "gromacs/pbcutil/pbc.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
 
index a4b72f9deeb0e4a5d1292553a32098852f8fe61d..7a2cb969dac3c8ac159bb30c71b7a8c406c70f18 100644 (file)
 #endif
 
 #include "gromacs/legacyheaders/copyrite.h"
+#include "gromacs/legacyheaders/types/ifunc.h"
 
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/utilities.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/basenetwork.h"
 #include "gromacs/utility/common.h"
 #include "gromacs/utility/fatalerror.h"
index e899a23373de1e49f85301120d087e60f1b3a962..375cd6c7c8eeb1a0baadad41c801d6072aed3040 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
 #ifndef GMX_FILEIO_TNGIO_H
 #define GMX_FILEIO_TNGIO_H
 
-#include "gromacs/legacyheaders/typedefs.h"
-#include "../../external/tng_io/include/tng_io_fwd.h"
+#include "external/tng_io/include/tng_io_fwd.h"
+
+#include "gromacs/legacyheaders/types/inputrec.h"
+#include "gromacs/math/vectypes.h"
+#include "gromacs/utility/real.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -46,6 +49,8 @@ extern "C" {
 }
 #endif
 
+struct gmx_mtop_t;
+
 /*! \brief Open a TNG trajectory file
  *
  * \param filename   Name of file to open
@@ -67,8 +72,8 @@ void gmx_tng_close(tng_trajectory_t *tng);
  * \param tng   Valid handle to a TNG trajectory
  * \param mtop  Pointer to a topology (can be NULL)
  */
-void gmx_tng_add_mtop(tng_trajectory_t  tng,
-                      const gmx_mtop_t *mtop);
+void gmx_tng_add_mtop(tng_trajectory_t         tng,
+                      const struct gmx_mtop_t *mtop);
 
 /*! \brief Do all TNG preparation for full-precision whole-system
  * trajectory writing during MD simulations.
@@ -77,9 +82,9 @@ void gmx_tng_add_mtop(tng_trajectory_t  tng,
  * \param mtop  Global topology
  * \param ir    Input settings (for writing frequencies)
  */
-void gmx_tng_prepare_md_writing(tng_trajectory_t  tng,
-                                const gmx_mtop_t *mtop,
-                                const t_inputrec *ir);
+void gmx_tng_prepare_md_writing(tng_trajectory_t         tng,
+                                const struct gmx_mtop_t *mtop,
+                                const t_inputrec        *ir);
 
 /*! \brief Set the default compression precision for TNG writing
  *
@@ -95,9 +100,9 @@ void gmx_tng_set_compression_precision(tng_trajectory_t tng,
  * \param mtop  Global topology
  * \param ir    Input settings (for writing frequencies)
  */
-void gmx_tng_prepare_low_prec_writing(tng_trajectory_t  tng,
-                                      const gmx_mtop_t *mtop,
-                                      const t_inputrec *ir);
+void gmx_tng_prepare_low_prec_writing(tng_trajectory_t         tng,
+                                      const struct gmx_mtop_t *mtop,
+                                      const t_inputrec        *ir);
 
 /*! \brief Write a frame to a TNG file
  *
index ed9cc84a67c19c87dcb8758db423658a0e5abe97..6dbfee17080b28fa1de5f743b32f74aac8d3a64c 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.
  */
-
 #ifndef GMX_FILEIO_TNGIO_FOR_TOOLS_H
 #define GMX_FILEIO_TNGIO_FOR_TOOLS_H
 
-#include "gromacs/legacyheaders/typedefs.h"
-#include "../../external/tng_io/include/tng_io_fwd.h"
+#include <stdio.h>
+
+#include "external/tng_io/include/tng_io_fwd.h"
+
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/utility/basedefinitions.h"
+#include "gromacs/utility/real.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -46,13 +50,16 @@ extern "C" {
 }
 #endif
 
+struct gmx_mtop_t;
+struct t_trxframe;
+
 /*! \brief Prepare to write TNG output from trajectory conversion tools */
 void gmx_prepare_tng_writing(const char              *filename,
                              char                     mode,
                              tng_trajectory_t        *in,
                              tng_trajectory_t        *out,
                              int                      nAtoms,
-                             const gmx_mtop_t        *mtop,
+                             const struct gmx_mtop_t *mtop,
                              const atom_id           *index,
                              const char              *indexGroupName);
 
@@ -67,7 +74,7 @@ void gmx_prepare_tng_writing(const char              *filename,
  * atoms.
  */
 void gmx_write_tng_from_trxframe(tng_trajectory_t        output,
-                                 t_trxframe             *frame,
+                                 struct t_trxframe      *frame,
                                  int                     natoms);
 
 /*! \brief Creates a molecule containing only the indexed atoms and sets
@@ -80,7 +87,7 @@ void gmx_tng_setup_atom_subgroup(tng_trajectory_t tng,
 
 /*! \brief Read the first/next TNG frame. */
 gmx_bool gmx_read_next_tng_frame(tng_trajectory_t            input,
-                                 t_trxframe                 *fr,
+                                 struct t_trxframe          *fr,
                                  gmx_int64_t                *requestedIds,
                                  int                         numRequestedIds);
 
index 70a32b9fd87e2965dee0887b07f631ddb1069e35..85b311473d396015379846941912432ed96ff30d 100644 (file)
@@ -43,9 +43,9 @@
 #ifndef GMX_FILEIO_TRX_H
 #define GMX_FILEIO_TRX_H
 
-#include "gromacs/math/vectypes.h"
-#include "gromacs/utility/basedefinitions.h"
-#include "gromacs/utility/real.h"
+#include "../math/vectypes.h"
+#include "../utility/basedefinitions.h"
+#include "../utility/real.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -55,7 +55,7 @@ struct t_atoms;
 
 typedef struct gmxvmdplugin t_gmxvmdplugin;
 
-typedef struct trxframe
+typedef struct t_trxframe
 {
     int      flags;            /* flags for read_first/next_frame  */
     int      not_ok;           /* integrity flags                  */
index 2ded1c884211d0eab7fdfd8d0994ce6c2319b16d..5fc17e8a320066a10d1cabfc37b8b7f412581ba6 100644 (file)
@@ -32,6 +32,7 @@
  * To help us fund GROMACS development, we humbly ask that you cite
  * the research papers on the package. Check out http://www.gromacs.org.
  */
+#include "vmdio.h"
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #include <shlobj.h>
 #endif
 
-#include "vmdio.h"
-
-#include "gmxfio.h"
-
+#include "gromacs/fileio/gmxfio.h"
+#include "gromacs/fileio/trx.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/utility/basedefinitions.h"
 #include "gromacs/utility/futil.h"
index 6e11d75d54d837b20e53387aecfd9b6c8184dbf5..ec4d1250ad99aef4071a00b66571327c19f0a61a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2009,2010,2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2012,2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
  * To help us fund GROMACS development, we humbly ask that you cite
  * the research papers on the package. Check out http://www.gromacs.org.
  */
-
-#ifndef GMX_FILEIO_VMDIO_H_
-#define GMX_FILEIO_VMDIO_H_
+#ifndef GMX_FILEIO_VMDIO_H
+#define GMX_FILEIO_VMDIO_H
 
 #include "external/vmd_molfile/molfile_plugin.h"
-#include "trx.h"
+
+#include "gromacs/utility/basedefinitions.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+struct t_trxframe;
+
 struct gmxvmdplugin
 {
     molfile_plugin_t *api;
@@ -51,11 +53,11 @@ struct gmxvmdplugin
     gmx_bool          bV;
 };
 
-int read_first_vmd_frame(const char *fn, struct trxframe *fr);
-gmx_bool read_next_vmd_frame(struct trxframe *fr);
+int read_first_vmd_frame(const char *fn, struct t_trxframe *fr);
+gmx_bool read_next_vmd_frame(struct t_trxframe *fr);
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* GMX_FILEIO_VMDIO_H_ */
+#endif
index 830867f72883f9b0edc4071d7ffac3959718ffc1..5563c58e86804fb0ee803b369d9c8b25329e92ef 100644 (file)
@@ -2,8 +2,8 @@
  * This file is part of the GROMACS molecular simulation package.
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2001-2004, The GROMACS development team.
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -38,7 +38,9 @@
 #define GMX_FILEIO_XDRF_H
 
 #include <stdio.h>
-#include "../legacyheaders/typedefs.h"
+
+#include "gromacs/utility/basedefinitions.h"
+#include "gromacs/utility/real.h"
 
 #ifdef __PGI    /*Portland group compiler*/
 #define int64_t long long
index 494cd863beb12afc577af0b1ae6c0b154a84fea9..18ebc044c983253956080f4865d1ccd83533ff95 100644 (file)
@@ -2,8 +2,8 @@
  * This file is part of the GROMACS molecular simulation package.
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2001-2004, The GROMACS development team.
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -38,7 +38,9 @@
 #ifndef GMX_FILEIO_XTCIO_H
 #define GMX_FILEIO_XTCIO_H
 
-#include "../legacyheaders/typedefs.h"
+#include "../math/vectypes.h"
+#include "../utility/basedefinitions.h"
+#include "../utility/real.h"
 #include "gmxfio.h"
 
 #ifdef __cplusplus
index d2ebf4f8f89c6dd83178b64c5d9ade06571805bc..91e92d9c13036f5c13d7353153d967b85fadb504 100644 (file)
@@ -43,7 +43,7 @@
 #include <assert.h>
 #include <math.h>
 
-#include "typedefs.h"
+#include "gromacs/legacyheaders/types/inputrec.h"
 #include "types/commrec.h"
 #include "txtdump.h"
 #include "names.h"
index 98d8d1204858ac58f95eea46cf883f48a643135d..8990a41a74e4ff283c12da3f2dd2a7ea7718e3a8 100644 (file)
@@ -40,6 +40,7 @@
 #include <config.h>
 #endif
 
+#include "gromacs/fileio/trx.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/pbcutil/mshift.h"
 #include "gromacs/pbcutil/pbc.h"
index 2fe50b0e6c547720e8f9d150977cc7450f781bd4..3f90bdb2655ea13dce24d8afcaa052359f6ad9a3 100644 (file)
@@ -37,7 +37,6 @@
 #ifndef GMX_PBCUTIL_RMPBC_H
 #define GMX_PBCUTIL_RMPBC_H
 
-#include "../fileio/trx.h"
 #include "../math/vectypes.h"
 
 #ifdef __cplusplus
@@ -46,6 +45,7 @@ extern "C" {
 
 struct t_atoms;
 struct t_idef;
+struct t_trxframe;
 
 typedef struct gmx_rmpbc *gmx_rmpbc_t;
 
@@ -65,7 +65,7 @@ void gmx_rmpbc_copy(gmx_rmpbc_t gpbc, int natoms, matrix box, rvec x[],
                     rvec x_s[]);
 /* As gmx_rmpbc, but outputs in x_s and does not modify x. */
 
-void gmx_rmpbc_trxfr(gmx_rmpbc_t gpbc, t_trxframe *fr);
+void gmx_rmpbc_trxfr(gmx_rmpbc_t gpbc, struct t_trxframe *fr);
 /* As gmx_rmpbc but operates on a t_trxframe data structure. */
 
 void rm_gropbc(struct t_atoms *atoms, rvec x[], matrix box);
index fdbd7852fcde4cb7ebf7e0205f6adbab1f216ec6..a50e15d6608bbdd6f1f7d387e6ea77d8fe732bcc 100644 (file)
 
 #include <errno.h>
 
-#include "gromacs/legacyheaders/typedefs.h"
-
 #include "gromacs/math/vec.h"
 #include "gromacs/pbcutil/pbc.h"
+#include "gromacs/topology/block.h"
+#include "gromacs/topology/topology.h"
 
 int
 gmx_calc_cog(t_topology * /* top */, rvec x[], int nrefat, atom_id index[], rvec xout)
index 7cefe1a02be3bc4be8dc2dbc449c73cd233a3e2b..494d39b26e0e703aeaed81156f5b5b72ebf03108 100644 (file)
 #ifndef GMX_SELECTION_CENTEROFMASS_H
 #define GMX_SELECTION_CENTEROFMASS_H
 
-#include "../legacyheaders/typedefs.h"
+#include "../legacyheaders/types/simple.h"
+#include "../math/vectypes.h"
+
+struct t_block;
+struct t_blocka;
+struct t_pbc;
+struct t_topology;
 
 /*! \brief
  * Calculate a single center of geometry.
index df0aefeb061e41420ec6e36501c56e6cfcda387b..337e9be336f59b3cbcfdff32d8319d34a29376d0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2009,2010,2011,2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2012,2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
 #ifndef GMX_SELECTION_EVALUATE_H
 #define GMX_SELECTION_EVALUATE_H
 
-#include "gromacs/legacyheaders/typedefs.h"
-
-#include "gromacs/selection/indexutil.h"
-
 #include "selelem.h"
 
+struct gmx_ana_index_t;
 struct gmx_sel_mempool_t;
+struct t_pbc;
+struct t_topology;
+struct t_trxframe;
 
 /*! \internal \brief
  * Data structure for passing information required during evaluation.
  */
-typedef struct gmx_sel_evaluate_t
+struct gmx_sel_evaluate_t
 {
     /** Memory pool for intermediate values. */
-    struct gmx_sel_mempool_t *mp;
+    gmx_sel_mempool_t        *mp;
     /** Index group that contains all the atoms. */
     gmx_ana_index_t          *gall;
     /** Topology information. */
@@ -72,7 +72,7 @@ typedef struct gmx_sel_evaluate_t
     t_trxframe               *fr;
     /** PBC data. */
     t_pbc                    *pbc;
-} gmx_sel_evaluate_t;
+};
 
 /*! \name Utility functions
  */
@@ -80,7 +80,7 @@ typedef struct gmx_sel_evaluate_t
 /** Initializes an evaluation data structure. */
 void
 _gmx_sel_evaluate_init(gmx_sel_evaluate_t *data,
-                       struct gmx_sel_mempool_t *mp, gmx_ana_index_t *gall,
+                       gmx_sel_mempool_t *mp, gmx_ana_index_t *gall,
                        t_topology *top, t_trxframe *fr, t_pbc *pbc);
 /** Evaluates the children of a general selection element. */
 void
index 3874cc8a5cd2761f573c27d1d8399006bcd51fe2..fcfe0b8f0a0b1add1e9a6be374f34875788c6e2d 100644 (file)
@@ -50,6 +50,7 @@
 #include "gromacs/legacyheaders/index.h"
 
 #include "gromacs/topology/block.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/gmxassert.h"
 #include "gromacs/utility/smalloc.h"
 
@@ -247,7 +248,7 @@ gmx_ana_indexgrps_find(gmx_ana_index_t *dest, std::string *destName,
     int n = find_group(const_cast<char *>(name), src->nr,
                        const_cast<char **>(names));
     sfree(names);
-    if (n == NOTSET)
+    if (n < 0)
     {
         dest->isize = 0;
         return false;
index 9092febb4a8754a628d34f35b4ae79dbcfad72a2..f9b4b3f46cae5af218cb55e3b825da0ec55eb0dc 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2009,2010,2011,2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2012,2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
 #ifndef GMX_SELECTION_INDEXUTIL_H
 #define GMX_SELECTION_INDEXUTIL_H
 
+#include <cstdio>
+
 #include <string>
 
-#include "../legacyheaders/typedefs.h"
+#include "../legacyheaders/types/simple.h"
+#include "../topology/block.h"
+
+struct t_topology;
 
 /** Stores a set of index groups. */
-typedef struct gmx_ana_indexgrps_t gmx_ana_indexgrps_t;
+struct gmx_ana_indexgrps_t;
 
 /*! \brief
  * Specifies the type of index partition or index mapping in several contexts.
@@ -85,7 +90,7 @@ typedef enum
 /*! \brief
  * Stores a single index group.
  */
-typedef struct gmx_ana_index_t
+struct gmx_ana_index_t
 {
     /** Number of atoms. */
     int                 isize;
@@ -93,12 +98,12 @@ typedef struct gmx_ana_index_t
     atom_id            *index;
     /** Number of items allocated for \p index. */
     int                 nalloc_index;
-} gmx_ana_index_t;
+};
 
 /*! \brief
  * Data structure for calculating index group mappings.
  */
-typedef struct gmx_ana_indexmap_t
+struct gmx_ana_indexmap_t
 {
     /** Type of the mapping. */
     e_index_t           type;
@@ -168,7 +173,7 @@ typedef struct gmx_ana_indexmap_t
      * actually static.
      */
     bool                bStatic;
-} gmx_ana_indexmap_t;
+};
 
 
 /*! \name Functions for handling gmx_ana_indexgrps_t
index 9df5687f34b564dfd4a80db2c2644e4260b0bf5e..32b2d330f7a280bc1b79c42490b4d72af0f26080 100644 (file)
@@ -64,8 +64,6 @@
 
 #include "thread_mpi/mutex.h"
 
-#include "gromacs/legacyheaders/typedefs.h"
-
 #include "gromacs/math/vec.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/selection/position.h"
index c3a299482433f3c011f0cd5ede6ada73b0303de0..4732ae0b31b24b86d633e724d51ac0044f082adf 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2009,2010,2011,2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2012,2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
 
 #include <boost/shared_ptr.hpp>
 
-#include "../legacyheaders/typedefs.h"
+#include "../math/vectypes.h"
 #include "../utility/common.h"
 #include "../utility/gmxassert.h"
+#include "../utility/real.h"
 
-#include "indexutil.h"
-
-struct gmx_ana_pos_t;
+struct t_pbc;
 
 namespace gmx
 {
index 5727a81a4f3201ca4056bed0ffc4919bb55c8e27..72f00e7756ec829cc93cbe8fd7aeb6631681b9ae 100644 (file)
@@ -61,8 +61,7 @@
  */
 #include <string.h>
 
-#include "gromacs/legacyheaders/typedefs.h"
-
+#include "gromacs/fileio/trx.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/selection/centerofmass.h"
 #include "gromacs/selection/indexutil.h"
@@ -187,11 +186,11 @@ struct gmx_ana_poscalc_t
      * already been calculated in \p sbase.
      * The structure pointed by \p sbase is always a static calculation.
      */
-    struct gmx_ana_poscalc_t                 *sbase;
+    gmx_ana_poscalc_t                        *sbase;
     /** Next structure in the linked list of calculations. */
-    struct gmx_ana_poscalc_t                 *next;
+    gmx_ana_poscalc_t                        *next;
     /** Previous structure in the linked list of calculations. */
-    struct gmx_ana_poscalc_t                 *prev;
+    gmx_ana_poscalc_t                        *prev;
     /** Number of references to this structure. */
     int                                       refcount;
     /** Collection this calculation belongs to. */
index 9ddc0fd46c327c4180daa3e9cc066a1bcc79db60..fead217d1b41d0be4fb72c5e45908bf4344f5c1d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2009,2010,2011,2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2012,2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -52,7 +52,7 @@
 #ifndef GMX_SELECTION_POSCALC_H
 #define GMX_SELECTION_POSCALC_H
 
-#include "../legacyheaders/typedefs.h"
+#include <cstdio>
 
 #include "../utility/common.h"
 
@@ -127,10 +127,13 @@ typedef enum
 } e_poscalc_t;
 
 /** Data structure for position calculation. */
-typedef struct gmx_ana_poscalc_t gmx_ana_poscalc_t;
+struct gmx_ana_poscalc_t;
 
 struct gmx_ana_index_t;
 struct gmx_ana_pos_t;
+struct t_pbc;
+struct t_topology;
+struct t_trxframe;
 
 namespace gmx
 {
@@ -323,10 +326,10 @@ void
 gmx_ana_poscalc_set_flags(gmx_ana_poscalc_t *pc, int flags);
 /** Sets the maximum possible input index group for position calculation. */
 void
-gmx_ana_poscalc_set_maxindex(gmx_ana_poscalc_t *pc, struct gmx_ana_index_t *g);
+gmx_ana_poscalc_set_maxindex(gmx_ana_poscalc_t *pc, gmx_ana_index_t *g);
 /** Initializes positions for position calculation output. */
 void
-gmx_ana_poscalc_init_pos(gmx_ana_poscalc_t *pc, struct gmx_ana_pos_t *p);
+gmx_ana_poscalc_init_pos(gmx_ana_poscalc_t *pc, gmx_ana_pos_t *p);
 /** Frees the memory allocated for position calculation. */
 void
 gmx_ana_poscalc_free(gmx_ana_poscalc_t *pc);
@@ -337,7 +340,7 @@ gmx_ana_poscalc_requires_top(gmx_ana_poscalc_t *pc);
 /** Updates a single COM/COG structure for a frame. */
 void
 gmx_ana_poscalc_update(gmx_ana_poscalc_t *pc,
-                       struct gmx_ana_pos_t *p, struct gmx_ana_index_t *g,
+                       gmx_ana_pos_t *p, gmx_ana_index_t *g,
                        t_trxframe *fr, t_pbc *pbc);
 
 #endif
index 795a08f3f669c6002e9a562ce98b7fb44d4fba6e..c33cdc3d86d41c034df0c4693e84cdafdf4807df 100644 (file)
@@ -43,8 +43,6 @@
 
 #include <string.h>
 
-#include "gromacs/legacyheaders/typedefs.h"
-
 #include "gromacs/math/vec.h"
 #include "gromacs/selection/indexutil.h"
 #include "gromacs/utility/gmxassert.h"
index 0f0457121a697243d84dfcba1205ca9d79b8fd8e..9fdebc7118f85cd49b27d4e1e349d8f4e7652079 100644 (file)
@@ -56,8 +56,6 @@
 
 #include <string>
 
-#include "gromacs/legacyheaders/typedefs.h"
-
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/exceptions.h"
 #include "gromacs/utility/gmxassert.h"
index 786fb9912a469b2c16b772edfef5324b93ab1367..795b08065e6f3f153558aa8f21ce19c19f3742a0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2009,2010,2011,2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2012,2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -41,6 +41,8 @@
  */
 #include "selection.h"
 
+#include "gromacs/topology/topology.h"
+
 #include "nbsearch.h"
 #include "position.h"
 #include "selelem.h"
index a09167d5a53875dc5d5ba89e1b2352c232046767..b027a5ed8a51573512cf0c08f24b3e7b3b10d83a 100644 (file)
 #include <string>
 #include <vector>
 
-#include "../legacyheaders/typedefs.h"
-
 #include "../utility/arrayref.h"
 #include "../utility/common.h"
 #include "../utility/gmxassert.h"
 
 #include "position.h"
-#include "indexutil.h"
 #include "selectionenums.h"
 
+struct t_topology;
+
 namespace gmx
 {
 
index d44f2124fe843e25de6bd62cd522c60633f3f8a9..a0af8d0659e689ab4514a3fdd7d75eb98d9bbe1e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2009,2010,2011,2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2012,2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -50,8 +50,6 @@
 
 #include <boost/scoped_ptr.hpp>
 
-#include "../legacyheaders/typedefs.h"
-
 #include "../onlinehelp/helptopicinterface.h"
 #include "../utility/uniqueptr.h"
 #include "indexutil.h"
 #include "selectioncollection.h"
 #include "selelem.h"
 
+struct gmx_sel_mempool_t;
+struct t_pbc;
+struct t_topology;
+struct t_trxframe;
+
 namespace gmx
 {
 
@@ -99,9 +102,9 @@ struct gmx_ana_selcollection_t
     /** Topology for the collection. */
     t_topology                                        *top;
     /** Index group that contains all the atoms. */
-    struct gmx_ana_index_t                             gall;
+    gmx_ana_index_t                                    gall;
     /** Memory pool used for selection evaluation. */
-    struct gmx_sel_mempool_t                          *mempool;
+    gmx_sel_mempool_t                                 *mempool;
     //! Parser symbol table.
     boost::scoped_ptr<gmx::SelectionParserSymbolTable> symtab;
     //! Root of help topic tree (NULL is no help yet requested).
index df91fe990ea54d644c3eaa25525717081d2c49e2..58c367b8a8af1bff70c64fc12d66467b336bf4df 100644 (file)
@@ -56,6 +56,7 @@
 #include "gromacs/options/basicoptions.h"
 #include "gromacs/options/options.h"
 #include "gromacs/selection/selection.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/exceptions.h"
 #include "gromacs/utility/file.h"
 #include "gromacs/utility/gmxassert.h"
index cf79b660bd60cffe3dd87f6d2b16c2dc9ecc6ad2..aac15039ee994f849516b4a22ce2ab7cfba9cea5 100644 (file)
 #ifndef GMX_SELECTION_SELECTIONCOLLECTION_H
 #define GMX_SELECTION_SELECTIONCOLLECTION_H
 
+#include <cstdio>
+
 #include <string>
 #include <vector>
 
-#include "../legacyheaders/typedefs.h"
+#include "../legacyheaders/types/oenv.h"
 
 #include "../onlinehelp/helptopicinterface.h"
 #include "../utility/common.h"
 #include "selection.h" // For gmx::SelectionList
 
 struct gmx_ana_indexgrps_t;
+struct t_pbc;
+struct t_topology;
+struct t_trxframe;
 
 namespace gmx
 {
index 5d80abe934ed2a22832ccc6f060208bc7b6d3db3..3a2167d797783e4e33d155d1656dee2467a87d53 100644 (file)
 #ifndef GMX_SELECTION_SELMETHOD_H
 #define GMX_SELECTION_SELMETHOD_H
 
-#include "../legacyheaders/typedefs.h"
-
-#include "indexutil.h"
 #include "selparam.h"
 #include "selvalue.h"
 
@@ -305,8 +302,12 @@ class PositionCalculationCollection;
 class SelectionParserSymbolTable;
 } // namespace gmx
 
+struct gmx_ana_index_t;
 struct gmx_ana_pos_t;
 struct gmx_ana_selcollection_t;
+struct t_pbc;
+struct t_topology;
+struct t_trxframe;
 
 /*! \name Selection method flags
  * \anchor selmethod_flags
@@ -573,8 +574,7 @@ typedef void  (*sel_updatefunc)(t_topology *top, t_trxframe *fr, t_pbc *pbc,
  * pointers that can be discarded without memory leaks.
  */
 typedef void  (*sel_updatefunc_pos)(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-                                    struct gmx_ana_pos_t *pos,
-                                    gmx_ana_selvalue_t *out,
+                                    gmx_ana_pos_t *pos, gmx_ana_selvalue_t *out,
                                     void *data);
 
 /*! \internal
@@ -584,7 +584,7 @@ typedef void  (*sel_updatefunc_pos)(t_topology *top, t_trxframe *fr, t_pbc *pbc,
  * If some information is not available, the corresponding field can be set to
  * 0/NULL.
  */
-typedef struct gmx_ana_selmethod_help_t
+struct gmx_ana_selmethod_help_t
 {
     /*! \brief
      * One-line description of the syntax of the method.
@@ -605,7 +605,7 @@ typedef struct gmx_ana_selmethod_help_t
      * to NULL.
      */
     const char        **help;
-} gmx_ana_selmethod_help_t;
+};
 
 /*! \internal
  * \brief
@@ -620,7 +620,7 @@ typedef struct gmx_ana_selmethod_help_t
  * More details on implementing new selection methods can be found on a
  * separate page: \ref page_module_selection_custom.
  */
-typedef struct gmx_ana_selmethod_t
+struct gmx_ana_selmethod_t
 {
     /** Name of the method. */
     const char         *name;
@@ -657,7 +657,7 @@ typedef struct gmx_ana_selmethod_t
 
     /** Help data for the method. */
     gmx_ana_selmethod_help_t help;
-} gmx_ana_selmethod_t;
+};
 
 /** Registers a selection method. */
 int
index cc61a684b73230694c26eac984dca209774de0b2..0f118367c1b9fb5d63fbc84463cf46005bbab991 100644 (file)
@@ -43,6 +43,7 @@
 
 #include "gromacs/legacyheaders/macros.h"
 
+#include "gromacs/topology/topology.h"
 #include "gromacs/selection/position.h"
 #include "gromacs/selection/selmethod.h"
 #include "gromacs/utility/exceptions.h"
index a5a8d9faa735289364324f930137eb67d0de7fdd..db01535ba19ef3640c7512e6cc8b6a602de9c233 100644 (file)
 
 #include <vector>
 
-#include "gromacs/legacyheaders/typedefs.h"
-
+#include "gromacs/fileio/trx.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/selection/indexutil.h"
 #include "gromacs/selection/poscalc.h"
 #include "gromacs/selection/position.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/smalloc.h"
 #include "gromacs/utility/uniqueptr.h"
 
index f106e2f4afd5c0fea9fb5ffcc2a8a4f0a50b66e9..4475798b5dfa12c9ed1ad1e6af98f908da29ba97 100644 (file)
@@ -46,6 +46,7 @@
 #include "gromacs/selection/indexutil.h"
 #include "gromacs/selection/selectioncollection.h"
 #include "gromacs/selection/selection.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/arrayref.h"
 #include "gromacs/utility/exceptions.h"
 #include "gromacs/utility/flags.h"
index 94ab8c3139b3497f23a6fba70105a4ce5a103b1e..c5dec1c429f6da0a36d654c2a9abb94dc7af0155 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -44,7 +44,8 @@
 
 #include <vector>
 
-#include "gromacs/legacyheaders/typedefs.h"
+struct t_topology;
+struct t_trxframe;
 
 namespace gmx
 {
index 2942a303a8ce7da30a95fdc6053af6ab19d957d7..3a33b0d2cbf5bb6d0c98ee7d89f7d29607b28067 100644 (file)
 #include "options.h"
 #include "selection.h"
 
+#include "fileio/trx.h"
 #include "selection/nbsearch.h"
+#include "topology/topology.h"
 #include "trajectoryanalysis/analysismodule.h"
 #include "trajectoryanalysis/analysissettings.h"
 #include "trajectoryanalysis/cmdlinerunner.h"
index 9ae568aebd6740d408e7e78769b1cff969f12782..0a26830726614c5640c7a714be197f3a4a34a4ba 100644 (file)
 #include <string>
 #include <vector>
 
-#include "../legacyheaders/typedefs.h"
-
 #include "../selection/selection.h" // For gmx::SelectionList
 #include "../utility/common.h"
 #include "../utility/uniqueptr.h"
 
+struct t_pbc;
+struct t_trxframe;
+
 namespace gmx
 {
 
index 391b3791d8407b163e8211025e6792d29b783288..7687fdf1784cf87ee887284669119eaae664cd89 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2010,2011,2012, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
 #ifndef GMX_TRAJECTORYANALYSIS_ANALYSISSETTINGS_H
 #define GMX_TRAJECTORYANALYSIS_ANALYSISSETTINGS_H
 
-#include "../legacyheaders/typedefs.h"
-
 #include "../options/timeunitmanager.h"
+#include "../math/vectypes.h"
 #include "../utility/common.h"
 
+struct t_topology;
+
 namespace gmx
 {
 
index cf213f109f28696ffba2c8470afa4366266f8768..b7165f94bf776076cbdf8a6f32d214f61a0a905c 100644 (file)
@@ -51,6 +51,7 @@
 #include "gromacs/commandline/cmdlinemodule.h"
 #include "gromacs/commandline/cmdlinemodulemanager.h"
 #include "gromacs/commandline/cmdlineparser.h"
+#include "gromacs/fileio/trx.h"
 #include "gromacs/options/options.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/selection/selectioncollection.h"
index 679a417bd4d9e944a6735b98522d5454ee276a08..977840e6faa3fe26edf134ee680492877d6fc5b9 100644 (file)
@@ -49,6 +49,7 @@
 #include "gromacs/analysisdata/modules/average.h"
 #include "gromacs/analysisdata/modules/histogram.h"
 #include "gromacs/analysisdata/modules/plot.h"
+#include "gromacs/fileio/trx.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/options/basicoptions.h"
 #include "gromacs/options/filenameoption.h"
index e1f2a390c962835a58fb4aab7685c883bd3691fb..fde8a4d7c6dc130041f789ebf068e367771aaca2 100644 (file)
@@ -47,6 +47,7 @@
 #include "gromacs/analysisdata/modules/average.h"
 #include "gromacs/analysisdata/modules/histogram.h"
 #include "gromacs/analysisdata/modules/plot.h"
+#include "gromacs/fileio/trx.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/options/basicoptions.h"
 #include "gromacs/options/filenameoption.h"
index ae72883416b8f7d30b21e7b51abe658d57264e46..5add6153909cf051ab6590ad84f34dbfbd228ffa 100644 (file)
@@ -49,6 +49,7 @@
 #include "gromacs/analysisdata/analysisdata.h"
 #include "gromacs/analysisdata/modules/average.h"
 #include "gromacs/analysisdata/modules/plot.h"
+#include "gromacs/fileio/trx.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/options/basicoptions.h"
 #include "gromacs/options/filenameoption.h"
@@ -58,6 +59,7 @@
 #include "gromacs/selection/nbsearch.h"
 #include "gromacs/selection/selection.h"
 #include "gromacs/selection/selectionoption.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/trajectoryanalysis/analysissettings.h"
 #include "gromacs/utility/arrayref.h"
 #include "gromacs/utility/exceptions.h"
index 6394c56a6b9ec2c77b4d44628e44279b7a411bf0..bb39b9f35053f8a8ee2eefa9a8fd41553f091905 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.
  */
-#include "typedefs.h"
+#ifndef GMX_TRAJECTORYANALYSIS_NSC_H
+#define GMX_TRAJECTORYANALYSIS_NSC_H
+
+#include "gromacs/legacyheaders/types/simple.h"
 
 #define FLAG_DOTS       01
 #define FLAG_VOLUME     02
@@ -142,3 +145,5 @@ int nsc_dclm_pbc(const rvec *coords, real *radius, int nat,
 #ifdef __cplusplus
 }
 #endif
+
+#endif
index ac14aa056789c5cb7b05ab48e58eacb419a0aa10..087a8eea33e23d03538a5a867076c3a50fb66a75 100644 (file)
@@ -55,6 +55,7 @@
 #include "gromacs/analysisdata/modules/plot.h"
 #include "gromacs/fileio/confio.h"
 #include "gromacs/fileio/pdbio.h"
+#include "gromacs/fileio/trx.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/options/basicoptions.h"
@@ -64,6 +65,7 @@
 #include "gromacs/selection/selection.h"
 #include "gromacs/selection/selectionoption.h"
 #include "gromacs/topology/symtab.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/trajectoryanalysis/analysismodule.h"
 #include "gromacs/trajectoryanalysis/analysissettings.h"
 #include "gromacs/utility/exceptions.h"
index 1ece73f6d547fc2b328f9d0977af2f39cea0705a..e8753db7756d6dba454a8a53cb2c627d6ba68871 100644 (file)
 #ifndef GMX_TRAJECTORYANALYSIS_RUNNERCOMMON_H
 #define GMX_TRAJECTORYANALYSIS_RUNNERCOMMON_H
 
-#include "gromacs/fileio/trx.h"
 #include "gromacs/utility/common.h"
 
+struct t_trxframe;
+
 namespace gmx
 {