Remove more uses of typedefs.h
authorTeemu Murtola <teemu.murtola@gmail.com>
Thu, 29 May 2014 04:25:07 +0000 (07:25 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Thu, 29 May 2014 18:26:04 +0000 (21:26 +0300)
- Replace typedefs.h with individual headers and/or forward
  declarations, with focus on headers and code outside
  gmxlib/mdlib/gmxana/gmxpreprocess.
- Remove unused dlb.h.
- Fix some source files that were relying on transitive includes.

Change-Id: Icf32798d664f6753eb0c0cb2a88e178bc21c9d78

45 files changed:
src/gromacs/fileio/confio.c
src/gromacs/fileio/enxio.c
src/gromacs/fileio/mdoutf.h
src/gromacs/fileio/pdbio.c
src/gromacs/fileio/trxio.c
src/gromacs/fileio/trxio.h
src/gromacs/fileio/xdrd.c
src/gromacs/fileio/xtcio.c
src/gromacs/fileio/xvgr.cpp
src/gromacs/gmxana/gmx_clustsize.c
src/gromacs/gmxana/gmx_dyecoupl.c
src/gromacs/gmxana/gmx_dyndom.c
src/gromacs/gmxana/gmx_morph.c
src/gromacs/gmxana/gmx_rdf.c
src/gromacs/gmxana/gmx_saxs.c
src/gromacs/gmxana/sfactor.h
src/gromacs/gmxlib/conformation-utilities.h
src/gromacs/gmxlib/dlb.h [deleted file]
src/gromacs/gmxlib/splitter.c
src/gromacs/gmxlib/topsort.h
src/gromacs/legacyheaders/calcgrid.h
src/gromacs/legacyheaders/calcmu.h
src/gromacs/legacyheaders/chargegroup.h
src/gromacs/legacyheaders/ebin.h
src/gromacs/legacyheaders/gmx_ga2la.h
src/gromacs/legacyheaders/gmx_hash.h
src/gromacs/legacyheaders/gmx_omp_nthreads.h
src/gromacs/legacyheaders/gmx_thread_affinity.h
src/gromacs/legacyheaders/md_logging.h
src/gromacs/legacyheaders/mdatoms.h
src/gromacs/legacyheaders/mtop_util.h
src/gromacs/legacyheaders/mvdata.h
src/gromacs/legacyheaders/network.h
src/gromacs/legacyheaders/perf_est.h
src/gromacs/legacyheaders/rbin.h
src/gromacs/legacyheaders/readinp.h
src/gromacs/legacyheaders/sighandler.h
src/gromacs/legacyheaders/splitter.h
src/gromacs/legacyheaders/vcm.h
src/gromacs/legacyheaders/warninp.h
src/gromacs/mdlib/init.c
src/gromacs/selection/tests/toputils.cpp
src/gromacs/tools/convert_tpr.c
src/gromacs/trajectoryanalysis/modules/select.cpp
src/gromacs/trajectoryanalysis/runnercommon.cpp

index ee227624c15da45864682032add73cd4f785206b..8f3495b052ed681574bf4da53572ce8bbadf6e5b 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 "confio.h"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 
 #include <errno.h>
 #include <math.h>
+#include <stdio.h>
 
 #include "typedefs.h"
 #include "macros.h"
-#include "confio.h"
-#include "gromacs/math/vec.h"
 #include "gromacs/utility/futil.h"
 #include "xdrf.h"
 #include "filenm.h"
 #include "tpxio.h"
 #include "trxio.h"
 #include "copyrite.h"
-#include "gromacs/pbcutil/pbc.h"
 #include "mtop_util.h"
 #include "gmxfio.h"
 
+#include "gromacs/fileio/trx.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/pbcutil/pbc.h"
 #include "gromacs/topology/symtab.h"
 #include "gromacs/topology/topology.h"
 #include "gromacs/utility/cstringutil.h"
index 0548c4673fef7a778e4387d76f9f708e81b64bd0..46ef9eaa11446ff4010dc8a35094856e479d91f3 100644 (file)
@@ -34,6 +34,8 @@
  * 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 "enxio.h"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 #include <string.h>
 
 #include "gromacs/utility/futil.h"
-#include "gmxfio.h"
-#include "enxio.h"
-#include "gromacs/math/vec.h"
-#include "xdrf.h"
 #include "macros.h"
-#include "typedefs.h"
 
+#include "gromacs/fileio/gmxfio.h"
+#include "gromacs/fileio/xdrf.h"
+#include "gromacs/math/vec.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/topology/topology.h"
 #include "gromacs/utility/fatalerror.h"
@@ -925,7 +925,6 @@ gmx_bool do_enx(ener_file_t ef, t_enxframe *fr)
     int           i, b;
     gmx_bool      bRead, bOK, bOK1, bSane;
     real          tmp1, tmp2, rdum;
-    char          buf[22];
     /*int       d_size;*/
 
     bOK   = TRUE;
@@ -978,9 +977,9 @@ gmx_bool do_enx(ener_file_t ef, t_enxframe *fr)
     {
         fprintf(stderr, "\nWARNING: there may be something wrong with energy file %s\n",
                 gmx_fio_getname(ef->fio));
-        fprintf(stderr, "Found: step=%s, nre=%d, nblock=%d, time=%g.\n"
+        fprintf(stderr, "Found: step=%"GMX_PRId64 ", nre=%d, nblock=%d, time=%g.\n"
                 "Trying to skip frame expect a crash though\n",
-                gmx_step_str(fr->step, buf), fr->nre, fr->nblock, fr->t);
+                fr->step, fr->nre, fr->nblock, fr->t);
     }
     if (bRead && fr->nre > fr->e_alloc)
     {
index 243920ea90eaba1e6b40f07f05de6d5995a628b6..3372db38d9cf3c14912a74262192447b26ce58e7 100644 (file)
@@ -86,7 +86,7 @@ void done_mdoutf(gmx_mdoutf_t of);
 void mdoutf_write_to_trajectory_files(FILE *fplog, t_commrec *cr,
                                       gmx_mdoutf_t of,
                                       int mdof_flags,
-                                      gmx_mtop_t *top_global,
+                                      struct gmx_mtop_t *top_global,
                                       gmx_int64_t step, double t,
                                       t_state *state_local, t_state *state_global,
                                       rvec *f_local, rvec *f_global);
index 7c085a48bad539f43fe459fe99dd17d7944cfa46..58de0aaf67834adc23a42aef3a8dbb670933c31c 100644 (file)
@@ -34,6 +34,8 @@
  * 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 "pdbio.h"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 #include <stdlib.h>
 #include <string.h>
 
-#include "typedefs.h"
-#include "pdbio.h"
-#include "copyrite.h"
+#include "gromacs/legacyheaders/atomprop.h"
+#include "gromacs/legacyheaders/copyrite.h"
+#include "gromacs/legacyheaders/types/ifunc.h"
+#include "gromacs/legacyheaders/typedefs.h"
 #include "gromacs/utility/futil.h"
-#include "atomprop.h"
-#include "gromacs/math/units.h"
-#include "gromacs/pbcutil/pbc.h"
-#include "gmxfio.h"
 
+#include "gromacs/fileio/gmxfio.h"
+#include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/pbcutil/pbc.h"
 #include "gromacs/topology/symtab.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
index 25569abb44e5a9b08b813668dd926bae857b1289..4372e7edb182f87d0e31c6dbdc17c0de710f9e76 100644 (file)
 #include <assert.h>
 #include <math.h>
 
-#include "typedefs.h"
 #ifdef GMX_USE_PLUGINS
 #include "vmdio.h"
 #endif
-#include "gromacs/utility/smalloc.h"
 #include "gmxfio.h"
 #include "trxio.h"
 #include "tpxio.h"
 #include "xdrf.h"
 
 #include "gromacs/fileio/timecontrol.h"
+#include "gromacs/fileio/trx.h"
+#include "gromacs/topology/atoms.h"
 #include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/smalloc.h"
 
 /* defines for frame counter output */
 #define SKIP1   10
index 3f7305984c6d19e9e779a4421ad1366d6dfc09c6..dab739a34a2bbcddfb5fc2eb40f1181c548608c6 100644 (file)
@@ -54,6 +54,8 @@ extern "C" {
 
 struct gmx_mtop_t;
 struct t_atoms;
+struct t_topology;
+struct t_trxframe;
 
 /* a dedicated status type contains fp, etc. */
 typedef struct t_trxstatus t_trxstatus;
@@ -71,23 +73,23 @@ int prec2ndec(real prec);
  * 1/(nm) */
 real ndec2prec(int ndec);
 
-void clear_trxframe(t_trxframe *fr, gmx_bool bFirst);
+void clear_trxframe(struct t_trxframe *fr, gmx_bool bFirst);
 /* Set all content gmx_booleans to FALSE.
  * When bFirst = TRUE, set natoms=-1, all pointers to NULL
  *                     and all data to zero.
  */
 
-void set_trxframe_ePBC(t_trxframe *fr, int ePBC);
+void set_trxframe_ePBC(struct t_trxframe *fr, int ePBC);
 /* Set the type of periodic boundary conditions, ePBC=-1 is not set */
 
 int nframes_read(t_trxstatus *status);
 /* Returns the number of frames read from the trajectory */
 
-int write_trxframe_indexed(t_trxstatus *status, t_trxframe *fr, int nind,
+int write_trxframe_indexed(t_trxstatus *status, struct t_trxframe *fr, int nind,
                            const atom_id *ind, gmx_conect gc);
 /* Write an indexed frame to a TRX file, see write_trxframe. gc may be NULL */
 
-int write_trxframe(t_trxstatus *status, t_trxframe *fr, gmx_conect gc);
+int write_trxframe(t_trxstatus *status, struct t_trxframe *fr, gmx_conect gc);
 /* Write a frame to a TRX file.
  * Only entries for which the gmx_boolean is TRUE will be written,
  * except for step, time, lambda and/or box, which may not be
@@ -132,8 +134,8 @@ void trjtools_gmx_prepare_tng_writing(const char               *filename,
  * tng_trajectory_t are encapsulated, so client trajectory-writing
  * code with a t_trxstatus can't just call the TNG writing
  * function. */
-void write_tng_frame(t_trxstatus *status,
-                     t_trxframe  *fr);
+void write_tng_frame(t_trxstatus        *status,
+                     struct t_trxframe  *fr);
 
 void close_trx(t_trxstatus *status);
 /* Close trj file as opened with read_first_x, read_frist_frame
@@ -202,7 +204,7 @@ int check_times(real t);
 #define FRAME_NOT_OK  (HEADER_NOT_OK | DATA_NOT_OK)
 
 int read_first_frame(const output_env_t oenv, t_trxstatus **status,
-                     const char *fn, t_trxframe *fr, int flags);
+                     const char *fn, struct t_trxframe *fr, int flags);
 /* Read the first frame which is in accordance with flags, which are
  * defined further up in this file.
  * Returns natoms when succeeded, 0 otherwise.
@@ -212,7 +214,7 @@ int read_first_frame(const output_env_t oenv, t_trxstatus **status,
  */
 
 gmx_bool read_next_frame(const output_env_t oenv, t_trxstatus *status,
-                         t_trxframe *fr);
+                         struct t_trxframe *fr);
 /* Reads the next frame which is in accordance with fr->flags.
  * Returns TRUE when succeeded, FALSE otherwise.
  */
@@ -239,7 +241,7 @@ void close_trj(t_trxstatus *status);
 void rewind_trj(t_trxstatus *status);
 /* Rewind trj file as opened with read_first_x */
 
-t_topology *read_top(const char *fn, int *ePBC);
+struct t_topology *read_top(const char *fn, int *ePBC);
 /* Extract a topology data structure from a topology file.
  * If ePBC!=NULL *ePBC gives the pbc type.
  */
index 682e68cdd8e492a80e2019b3de24234b236b17a5..2dd1f39b91cf3bb61072f2ee98df4e6bee6be308 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 "xdrf.h"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 
-#include "typedefs.h"
-#include "xdrf.h"
+#include "gromacs/math/vectypes.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
 
index b1ebf54d1e61becbf061c5c414f24c3ece6b00ee..af57ca9da44c7e71ff01b871f7f5bb93f6b8275b 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 "xtcio.h"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 
 #include <string.h>
-#include "typedefs.h"
-#include "xdrf.h"
-#include "gmxfio.h"
-#include "xtcio.h"
-#include "gromacs/utility/smalloc.h"
+
+#include "gromacs/fileio/gmxfio.h"
+#include "gromacs/fileio/xdrf.h"
 #include "gromacs/math/vec.h"
-#include "gromacs/utility/futil.h"
 #include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/futil.h"
+#include "gromacs/utility/smalloc.h"
 
 #define XTC_MAGIC 1995
 
index 0027b30ccab5a119416f68cf60e362447b9c53e1..49081481faba437a3aa46fb7483e8211c691412c 100644 (file)
@@ -50,7 +50,6 @@
 
 #include "gromacs/legacyheaders/copyrite.h"
 #include "gromacs/legacyheaders/oenv.h"
-#include "gromacs/legacyheaders/typedefs.h"
 
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/math/vec.h"
index 0d7848b8b97e57300ddc82dd935db18d2eb9178a..990dd923f49e230647f561b3d344c8a816180a6a 100644 (file)
@@ -51,7 +51,6 @@
 #include "gromacs/fileio/trxio.h"
 #include "index.h"
 #include "gromacs/utility/smalloc.h"
-#include "calcgrid.h"
 #include "nrnb.h"
 #include "gromacs/math/units.h"
 #include "coulomb.h"
index 0268c879bee2357b598a173007e0246fa7cd6395..7e8934f6c6b43ebd82a1b8808558893ed3debe9f 100644 (file)
 #include "copyrite.h"
 #include "gromacs/fileio/filenm.h"
 #include "macros.h"
-#include "gromacs/pbcutil/pbc.h"
-#include "gromacs/utility/smalloc.h"
-#include "gromacs/commandline/pargs.h"
 #include "gromacs/math/vec.h"
-#include "gromacs/fileio/xvgr.h"
-#include "gromacs/fileio/trxio.h"
 
+#include "gromacs/commandline/pargs.h"
+#include "gromacs/fileio/trx.h"
+#include "gromacs/fileio/trxio.h"
+#include "gromacs/fileio/xvgr.h"
+#include "gromacs/pbcutil/pbc.h"
 #include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/smalloc.h"
 
 int gmx_dyecoupl(int argc, char *argv[])
 {
@@ -98,7 +99,6 @@ int gmx_dyecoupl(int argc, char *argv[])
     int          ndon, nacc;
     atom_id     *donindex, *accindex;
     char        *grpnm;
-    t_atoms     *atoms = NULL;
     t_trxstatus *status;
     t_trxframe   fr;
 
@@ -162,10 +162,10 @@ int gmx_dyecoupl(int argc, char *argv[])
     }
 
     printf("Select group with donor atom pairs defining the transition moment\n");
-    get_index(atoms, ftp2fn_null(efNDX, NFILE, fnm), 1, &ndon, &donindex, &grpnm);
+    get_index(NULL, ftp2fn_null(efNDX, NFILE, fnm), 1, &ndon, &donindex, &grpnm);
 
     printf("Select group with acceptor atom pairs defining the transition moment\n");
-    get_index(atoms, ftp2fn_null(efNDX, NFILE, fnm), 1, &nacc, &accindex, &grpnm);
+    get_index(NULL, ftp2fn_null(efNDX, NFILE, fnm), 1, &nacc, &accindex, &grpnm);
 
     /*check if groups are identical*/
     grident = TRUE;
index 52b6eb71349692bb1790fc508ce17e949499296b..9106fa66f4ecdb31709bfa04130faf997e35938f 100644 (file)
@@ -48,6 +48,7 @@
 #include "gromacs/commandline/pargs.h"
 #include "gromacs/math/3dtransforms.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/topology/atoms.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
 
index 6ad9c8fe793e2078212a27ed20e7799ddb3e8e57..dadb1590f966fd48fe08db1468ef713c6595a256 100644 (file)
 #include <config.h>
 #endif
 
-#include "gromacs/commandline/pargs.h"
-#include "gromacs/utility/smalloc.h"
 #include "macros.h"
 #include "gromacs/fileio/confio.h"
-#include "gromacs/fileio/xvgr.h"
 #include "viewit.h"
 #include "index.h"
 #include "gmx_ana.h"
-#include "gromacs/utility/fatalerror.h"
 #include "gromacs/fileio/trxio.h"
 
+#include "gromacs/commandline/pargs.h"
+#include "gromacs/fileio/xvgr.h"
 #include "gromacs/math/do_fit.h"
+#include "gromacs/topology/atoms.h"
+#include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/smalloc.h"
 
 static real dointerp(int n, rvec x1[], rvec x2[], rvec xx[],
                      int I, int N, real first, real last)
index 7da7f011aac9a398fc95386db9804150645f7619..58c755afa133ffc28b9afc7ff29e64d9bb4d5e76 100644 (file)
@@ -50,7 +50,6 @@
 #include "gromacs/fileio/tpxio.h"
 #include "gromacs/fileio/trxio.h"
 #include "index.h"
-#include "calcgrid.h"
 #include "nrnb.h"
 #include "coulomb.h"
 #include "gstat.h"
index e11f0974586f82c718fbee0f041a37edd70ff67b..91f2ede879046d1f54d49426305c02113dd734c6 100644 (file)
 
 #include <math.h>
 
-#include "typedefs.h"
 #include "macros.h"
-#include "gromacs/math/vec.h"
 #include "copyrite.h"
-#include "gromacs/utility/futil.h"
-#include "gromacs/commandline/pargs.h"
-#include "gromacs/fileio/tpxio.h"
-#include "index.h"
-#include "gromacs/utility/smalloc.h"
-#include "calcgrid.h"
-#include "nrnb.h"
-#include "coulomb.h"
-#include "gstat.h"
 #include "gmx_ana.h"
-#include "names.h"
 #include "sfactor.h"
 
+#include "gromacs/commandline/pargs.h"
+#include "gromacs/utility/smalloc.h"
+
 int gmx_saxs(int argc, char *argv[])
 {
     const char  *desc[] = {
index 8bdb91fa9304ee3ff40655c63abf27b099aaed56..6eae7881167c3c42a25b9d14a904634554044fca 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 _sfactor_h
 #define _sfactor_h
 
-
 #include "index.h"
 #include "types/simple.h"
 #include "../math/gmxcomplex.h"
 #include "oenv.h"
 
-
-
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+struct t_topology;
+struct t_trxframe;
 
 typedef struct gmx_structurefactors gmx_structurefactors_t;
 
@@ -79,8 +77,8 @@ double CMSF (gmx_structurefactors_t *gsf, int type, int nh, double lambda, doubl
 
 int return_atom_type (const char *name, gmx_structurefactors_t *gsf);
 
-void rearrange_atoms (reduced_atom_t * positions, t_trxframe *fr, atom_id * index,
-                      int isize, t_topology * top, gmx_bool flag, gmx_structurefactors_t *gsf);
+void rearrange_atoms (reduced_atom_t * positions, struct t_trxframe *fr, atom_id * index,
+                      int isize, struct t_topology * top, gmx_bool flag, gmx_structurefactors_t *gsf);
 
 int do_scattering_intensity (const char* fnTPS, const char* fnNDX,
                              const char* fnXVG, const char *fnTRX,
index 38024be62af72d851961d3c3534fc4d29fd2a58c..8aa337b69c0e3041566e14c6f0a57950e744d71c 100644 (file)
@@ -37,7 +37,9 @@
 #ifndef GMX_CONFORMATION_UTILITIES_H
 #define GMX_CONFORMATION_UTILITIES_H
 
-#include "typedefs.h"
+#include "../math/vectypes.h"
+#include "../utility/basedefinitions.h"
+#include "../utility/real.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/src/gromacs/gmxlib/dlb.h b/src/gromacs/gmxlib/dlb.h
deleted file mode 100644 (file)
index b730bd1..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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) 2010, 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.
- *
- * GROMACS is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1
- * of the License, or (at your option) any later version.
- *
- * GROMACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with GROMACS; if not, see
- * http://www.gnu.org/licenses, or write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
- *
- * If you want to redistribute modifications to GROMACS, please
- * consider that scientific software is very special. Version
- * control is crucial - bugs must be traceable. We will be happy to
- * consider code for inclusion in the official distribution, but
- * derived work must not be called official GROMACS. Details are found
- * in the README & COPYING files - if they are missing, get the
- * official version 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 _dlb_h
-#define _dlb_h
-
-#include "typedefs.h"
-
-extern void count_nb(t_commrec *cr, t_nsborder *nsb, t_block *cgs, int nns,
-                     int nlr, t_idef *idef, int ngner);
-
-#endif  /* _dlb_h */
index 8298cf954a37d96fc7512347315761bdcb00bfbc..a3797c49f4e3f2b719b171767e8ed1e67a57bb2e 100644 (file)
 #include <string.h>
 
 #include "macros.h"
-#include "gromacs/pbcutil/mshift.h"
 
+#include "gromacs/pbcutil/mshift.h"
+#include "gromacs/topology/block.h"
+#include "gromacs/topology/idef.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
 
index 890df3bde11a3c67143bbf88bfdfa29a71746fc6..74c287838bf86f366822244047115f406ff8585a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2008,2009,2010,2013, by the GROMACS development team, led by
+ * Copyright (c) 2008,2009,2010,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 _topsort_h
 #define _topsort_h
 
-
-#include "typedefs.h"
+#include "../utility/basedefinitions.h"
+#include "../utility/real.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+struct gmx_mtop_t;
+struct t_idef;
 
 /* Returns if there are perturbed bonded interactions */
-gmx_bool gmx_mtop_bondeds_free_energy(const gmx_mtop_t *mtop);
+gmx_bool gmx_mtop_bondeds_free_energy(const struct gmx_mtop_t *mtop);
 
 /* Sort all the bonded ilists in idef to have the perturbed ones at the end
  * and set nr_nr_nonperturbed in ilist.
  */
-void gmx_sort_ilist_fe(t_idef *idef, const real *qA, const real *qB);
+void gmx_sort_ilist_fe(struct t_idef *idef, const real *qA, const real *qB);
 
 #ifdef __cplusplus
 }
index 91ecbe659c5cce20aeba6ddb2d214d36b4b744e0..1c6450387ca5a5ce31cfa9be613c91a39bb899f7 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2010, by the GROMACS development team, led by
+ * Copyright (c) 2010,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_LEGACYHEADERS_CALCGRID_H
+#define GMX_LEGACYHEADERS_CALCGRID_H
 
-#include "typedefs.h"
+#include <stdio.h>
+
+#include "../math/vectypes.h"
+#include "../utility/real.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -52,3 +57,5 @@ real calc_grid(FILE *fp,
 #ifdef __cplusplus
 }
 #endif
+
+#endif
index 40f73b0b6b87147df77635dfaf92840f918f3a3e..f72bbfdb042ef2a8f8f8882e4d604224604438d2 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2010, by the GROMACS development team, led by
+ * Copyright (c) 2010,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 _calcmu_h
 #define _calcmu_h
 
+#include <stdio.h>
 
-#include "typedefs.h"
-#include "network.h"
+#include "../math/vectypes.h"
+#include "../utility/basedefinitions.h"
 
 #ifdef __cplusplus
 extern "C" {
index 44a429fe575f17ff13afa53aa4803fb9e84b24d0..417917fc6597d1799d51d4d9866ee7235e4d464d 100644 (file)
 
 #include <stdio.h>
 
-#include "typedefs.h"
+#include "../math/vectypes.h"
+#include "../utility/real.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-void calc_chargegroup_radii(const gmx_mtop_t *mtop, rvec *x,
+struct gmx_mtop_t;
+struct t_block;
+
+void calc_chargegroup_radii(const struct gmx_mtop_t *mtop, rvec *x,
                             real *rvdw1, real *rvdw2,
                             real *rcoul1, real *rcoul2);
 /* This routine calculates the two largest charge group radii in x,
  * separately for VdW and Coulomb interactions.
  */
 
-void calc_cgcm(FILE *log, int cg0, int cg1, t_block *cgs,
+void calc_cgcm(FILE *log, int cg0, int cg1, struct t_block *cgs,
                rvec pos[], rvec cg_cm[]);
 /* Routine to compute centers of geometry of charge groups. No periodicity
  * is used.
  */
 
 void put_charge_groups_in_box (FILE *log, int cg0, int cg1,
-                               int ePBC, matrix box, t_block *cgs,
+                               int ePBC, matrix box, struct t_block *cgs,
                                rvec pos[],
                                rvec cg_cm[]);
 /* This routine puts charge groups in the periodic box, keeping them
index 61a8db1de3340efde074a145c3158b8bca4965fc..3dd6f42a0537b2fa5d8144e68527a7b115f42cae 100644 (file)
@@ -40,8 +40,9 @@
 
 #include <stdio.h>
 
-#include "typedefs.h"
+#include "../legacyheaders/types/energy.h"
 #include "../fileio/enxio.h"
+#include "../utility/basedefinitions.h"
 
 #ifdef __cplusplus
 extern "C" {
index e5820421df81734d326c9e2e096b7fcbcbc8d9cb..b5ee2dc25c91ad1e6952606cb60cae2593029c74 100644 (file)
@@ -37,8 +37,8 @@
 #ifndef _gmx_ga2la_h
 #define _gmx_ga2la_h
 
-#include "typedefs.h"
 #include "types/commrec.h"
+#include "gromacs/utility/basedefinitions.h"
 #include "gromacs/utility/smalloc.h"
 
 #ifdef __cplusplus
index da399214daf57da218e4dc2c0f501bc54e160d31..2e15f38c673e65370d8fb66d72090a3509acf199 100644 (file)
 #ifndef _gmx_hash_h
 #define _gmx_hash_h
 
-#include "typedefs.h"
-#include "gromacs/utility/smalloc.h"
+#include <stdio.h>
+
+#include "types/commrec.h"
 #include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/smalloc.h"
 
 #ifdef __cplusplus
 extern "C" {
index 4c30d7e7d268a0d2c69d202edf6454c1142b1ecc..c5ceef442e2ba1221019c8ff194084abf951033c 100644 (file)
@@ -37,7 +37,8 @@
 #define GMX_OMP_NTHREADS_H
 
 #include <stdio.h>
-#include "typedefs.h"
+
+#include "../utility/basedefinitions.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -46,6 +47,8 @@ extern "C" {
 }
 #endif
 
+struct t_commrec;
+
 /** Enum values corresponding to multithreaded algorithmic modules. */
 typedef enum module_nth
 {
@@ -62,7 +65,7 @@ typedef enum module_nth
  * It is compatible with tMPI, thread-safety is ensured (for the features
  * available with tMPI).
  * This function should caled only once during the initialization of mdrun. */
-void gmx_omp_nthreads_init(FILE *fplog, t_commrec *cr,
+void gmx_omp_nthreads_init(FILE *fplog, struct t_commrec *cr,
                            int nthreads_hw_avail,
                            int omp_nthreads_req,
                            int omp_nthreads_pme_req,
index 5ac0bb54c5186b415e4afb31cf796e4e0e75fef5..b4abd5c2ab9aaa5800486da91141e06202da270b 100644 (file)
 #ifndef GMX_THREAD_AFFINITY_H_
 #define GMX_THREAD_AFFINITY_H_
 
-#include "typedefs.h"
+#include <stdio.h>
+
+#include "types/hw_info.h"
+#include "../utility/basedefinitions.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -44,14 +47,16 @@ extern "C" {
 } /* fixes auto-indentation problems */
 #endif
 
+struct t_commrec;
+
 /* Sets the thread affinity using the requested setting stored in hw_opt.
  * The hardware topologu is requested from hwinfo, when present.
  */
 void
-gmx_set_thread_affinity(FILE                *fplog,
-                        const t_commrec     *cr,
-                        gmx_hw_opt_t        *hw_opt,
-                        const gmx_hw_info_t *hwinfo);
+gmx_set_thread_affinity(FILE                       *fplog,
+                        const struct t_commrec     *cr,
+                        gmx_hw_opt_t               *hw_opt,
+                        const gmx_hw_info_t        *hwinfo);
 
 /* Check the process affinity mask and if it is found to be non-zero,
  * will honor it and disable mdrun internal affinity setting.
@@ -66,7 +71,7 @@ gmx_set_thread_affinity(FILE                *fplog,
  * variables for setting the affinity are set.
  */
 void
-gmx_check_thread_affinity_set(FILE *fplog, const t_commrec *cr,
+gmx_check_thread_affinity_set(FILE *fplog, const struct t_commrec *cr,
                               gmx_hw_opt_t *hw_opt, int ncpus,
                               gmx_bool bAfterOpenmpInit);
 
index 9a074b381fa89be3cb945f70e469a2aa1a3d5571..d610c3d573b919b56de2aa9039dd8776b9a7b1f3 100644 (file)
 #define _md_logging_h
 
 #include <stdio.h>
-#include "typedefs.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-void md_print_info(const t_commrec *cr, FILE *fplog,
+struct t_commrec;
+
+void md_print_info(const struct t_commrec *cr, FILE *fplog,
                    const char *fmt, ...);
 /* Print an general information message to stderr on the master node
  * and to fplog if fplog!=NULL.
@@ -53,7 +54,7 @@ void md_print_info(const t_commrec *cr, FILE *fplog,
  * the arguments after that contain the values to be printed, as in printf.
  */
 
-void md_print_warn(const t_commrec *cr, FILE *fplog,
+void md_print_warn(const struct t_commrec *cr, FILE *fplog,
                    const char *fmt, ...);
 /* As md_print_info above, but for important notices or warnings.
  * The only difference with md_print_info is that a newline is printed
index 748c04fe62028337bb64d96d7ce3e8e9700fa76f..21d176b85ee7858d022694ecc9ee9bc16836e383 100644 (file)
 #ifndef _mdatoms_h
 #define _mdatoms_h
 
-#include "typedefs.h"
+#include <stdio.h>
+
+#include "types/inputrec.h"
+#include "types/mdatom.h"
+#include "../utility/basedefinitions.h"
+#include "../utility/real.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-t_mdatoms *init_mdatoms(FILE *fp, gmx_mtop_t *mtop, gmx_bool bFreeEnergy);
+struct gmx_mtop_t;
+
+t_mdatoms *init_mdatoms(FILE *fp, struct gmx_mtop_t *mtop, gmx_bool bFreeEnergy);
 
-void atoms2md(gmx_mtop_t *mtop, t_inputrec *ir,
+void atoms2md(struct gmx_mtop_t *mtop, t_inputrec *ir,
               int nindex, int *index,
               int homenr,
               t_mdatoms *md);
index 7c5172c75ee015f5528c65bb2a81193dc79c6a39..a9b913f5216be0c928505416c63f337c9e760e63 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 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.
  */
-#include "typedefs.h"
+#ifndef GMX_LEGACYHEADERS_MTOP_UTIL_H
+#define GMX_LEGACYHEADERS_MTOP_UTIL_H
+
+#include "types/inputrec.h"
+#include "../utility/basedefinitions.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+struct gmx_localtop_t;
+struct gmx_moltype_t;
+struct gmx_mtop_t;
+struct t_atom;
+struct t_atoms;
+struct t_block;
+struct t_ilist;
+struct t_topology;
+
 /* Should be called after generating or reading mtop,
  * to set some compute intesive variables to avoid
  * N^2 operations later on.
  */
 void
-gmx_mtop_finalize(gmx_mtop_t *mtop);
+gmx_mtop_finalize(struct gmx_mtop_t *mtop);
 
 /* Counts the number of atoms of each type. State should be 0 for
  * state A and 1 for state B types.  typecount should have at
  * least mtop->ffparams.atnr elements.
  */
 void
-gmx_mtop_count_atomtypes(const gmx_mtop_t *mtop, int state, int typecount[]);
+gmx_mtop_count_atomtypes(const struct gmx_mtop_t *mtop, int state, int typecount[]);
 
 /* Returns the total number of charge groups in mtop */
 int
-ncg_mtop(const gmx_mtop_t *mtop);
+ncg_mtop(const struct gmx_mtop_t *mtop);
 
 /* Removes the charge groups, i.e. makes single atom charge groups, in mtop */
-void gmx_mtop_remove_chargegroups(gmx_mtop_t *mtop);
+void gmx_mtop_remove_chargegroups(struct gmx_mtop_t *mtop);
 
 
 /* Abstract data type for looking up atoms by global atom number */
@@ -67,11 +80,11 @@ typedef struct gmx_mtop_atomlookup *gmx_mtop_atomlookup_t;
 
 /* Initialize atom lookup by global atom number */
 gmx_mtop_atomlookup_t
-gmx_mtop_atomlookup_init(const gmx_mtop_t *mtop);
+gmx_mtop_atomlookup_init(const struct gmx_mtop_t *mtop);
 
 /* As gmx_mtop_atomlookup_init, but optimized for atoms involved in settle */
 gmx_mtop_atomlookup_t
-gmx_mtop_atomlookup_settle_init(const gmx_mtop_t *mtop);
+gmx_mtop_atomlookup_settle_init(const struct gmx_mtop_t *mtop);
 
 /* Destroy a gmx_mtop_atomlookup_t data structure */
 void
@@ -85,7 +98,7 @@ gmx_mtop_atomlookup_destroy(gmx_mtop_atomlookup_t alook);
 void
 gmx_mtop_atomnr_to_atom(const gmx_mtop_atomlookup_t alook,
                         int                         atnr_global,
-                        t_atom                    **atom);
+                        struct t_atom             **atom);
 
 
 /* Returns a pointer to the molecule interaction array ilist_mol[F_NRE]
@@ -94,7 +107,7 @@ gmx_mtop_atomnr_to_atom(const gmx_mtop_atomlookup_t alook,
 void
 gmx_mtop_atomnr_to_ilist(const gmx_mtop_atomlookup_t alook,
                          int atnr_global,
-                         t_ilist **ilist_mol, int *atnr_offset);
+                         struct t_ilist **ilist_mol, int *atnr_offset);
 
 
 /* Returns the molecule block index
@@ -110,7 +123,7 @@ gmx_mtop_atomnr_to_molblock_ind(const gmx_mtop_atomlookup_t alook,
 
 /* Returns atom name, global resnr and residue name  of atom atnr_global */
 void
-gmx_mtop_atominfo_global(const gmx_mtop_t *mtop, int atnr_global,
+gmx_mtop_atominfo_global(const struct gmx_mtop_t *mtop, int atnr_global,
                          char **atomname, int *resnr, char **resname);
 
 
@@ -124,7 +137,7 @@ typedef struct gmx_mtop_atomloop_all *gmx_mtop_atomloop_all_t;
  * otherwise use gmx_mtop_atomloop_block.
  */
 gmx_mtop_atomloop_all_t
-gmx_mtop_atomloop_all_init(const gmx_mtop_t *mtop);
+gmx_mtop_atomloop_all_init(const struct gmx_mtop_t *mtop);
 
 /* Loop to the next atom.
  * When not at the end:
@@ -141,7 +154,7 @@ gmx_mtop_atomloop_all_init(const gmx_mtop_t *mtop);
  */
 gmx_bool
 gmx_mtop_atomloop_all_next(gmx_mtop_atomloop_all_t aloop,
-                           int *at_global, t_atom **atom);
+                           int *at_global, struct t_atom **atom);
 
 /* Return the atomname, the residue number and residue name
  * of the current atom in the loop.
@@ -155,7 +168,7 @@ gmx_mtop_atomloop_all_names(gmx_mtop_atomloop_all_t aloop,
  */
 void
 gmx_mtop_atomloop_all_moltype(gmx_mtop_atomloop_all_t aloop,
-                              gmx_moltype_t **moltype, int *at_mol);
+                              struct gmx_moltype_t **moltype, int *at_mol);
 
 
 /* Abstract type for atom loop over atoms in all molecule blocks */
@@ -164,7 +177,7 @@ typedef struct gmx_mtop_atomloop_block *gmx_mtop_atomloop_block_t;
 /* Initialize an atom loop over atoms in all molecule blocks the system.
  */
 gmx_mtop_atomloop_block_t
-gmx_mtop_atomloop_block_init(const gmx_mtop_t *mtop);
+gmx_mtop_atomloop_block_init(const struct gmx_mtop_t *mtop);
 
 /* Loop to the next atom.
  * When not at the end:
@@ -181,7 +194,7 @@ gmx_mtop_atomloop_block_init(const gmx_mtop_t *mtop);
  */
 gmx_bool
 gmx_mtop_atomloop_block_next(gmx_mtop_atomloop_block_t aloop,
-                             t_atom **atom, int *nmol);
+                             struct t_atom **atom, int *nmol);
 
 
 /* Abstract type for ilist loop over all ilists */
@@ -189,7 +202,7 @@ typedef struct gmx_mtop_ilistloop *gmx_mtop_ilistloop_t;
 
 /* Initialize an ilist loop over all molecule types in the system. */
 gmx_mtop_ilistloop_t
-gmx_mtop_ilistloop_init(const gmx_mtop_t *mtop);
+gmx_mtop_ilistloop_init(const struct gmx_mtop_t *mtop);
 
 
 /* Loop to the next molecule,
@@ -200,7 +213,7 @@ gmx_mtop_ilistloop_init(const gmx_mtop_t *mtop);
  */
 gmx_bool
 gmx_mtop_ilistloop_next(gmx_mtop_ilistloop_t iloop,
-                        t_ilist **ilist_mol, int *nmol);
+                        struct t_ilist **ilist_mol, int *nmol);
 
 
 /* Abstract type for ilist loop over all ilists of all molecules */
@@ -212,7 +225,7 @@ typedef struct gmx_mtop_ilistloop_all *gmx_mtop_ilistloop_all_t;
  * otherwise use gmx_mtop_ilistloop.
  */
 gmx_mtop_ilistloop_all_t
-gmx_mtop_ilistloop_all_init(const gmx_mtop_t *mtop);
+gmx_mtop_ilistloop_all_init(const struct gmx_mtop_t *mtop);
 
 /* Loop to the next molecule,
  * When not at the end:
@@ -222,22 +235,22 @@ gmx_mtop_ilistloop_all_init(const gmx_mtop_t *mtop);
  */
 gmx_bool
 gmx_mtop_ilistloop_all_next(gmx_mtop_ilistloop_all_t iloop,
-                            t_ilist **ilist_mol, int *atnr_offset);
+                            struct t_ilist **ilist_mol, int *atnr_offset);
 
 
 /* Returns the total number of interactions in the system of type ftype */
 int
-gmx_mtop_ftype_count(const gmx_mtop_t *mtop, int ftype);
+gmx_mtop_ftype_count(const struct gmx_mtop_t *mtop, int ftype);
 
 
 /* Returns a charge group index for the whole system */
-t_block
-gmx_mtop_global_cgs(const gmx_mtop_t *mtop);
+struct t_block
+gmx_mtop_global_cgs(const struct gmx_mtop_t *mtop);
 
 
 /* Returns a single t_atoms struct for the whole system */
-t_atoms
-gmx_mtop_global_atoms(const gmx_mtop_t *mtop);
+struct t_atoms
+gmx_mtop_global_atoms(const struct gmx_mtop_t *mtop);
 
 
 /* Make all charge groups the size of one atom.
@@ -245,22 +258,24 @@ gmx_mtop_global_atoms(const gmx_mtop_t *mtop);
  * that consist of a single charge group.
  */
 void
-gmx_mtop_make_atomic_charge_groups(gmx_mtop_t *mtop, gmx_bool bKeepSingleMolCG);
+gmx_mtop_make_atomic_charge_groups(struct gmx_mtop_t *mtop, gmx_bool bKeepSingleMolCG);
 
 
 /* Generate a 'local' topology for the whole system.
  * When ir!=NULL the free energy interactions will be sorted to the end.
  */
-gmx_localtop_t *
-gmx_mtop_generate_local_top(const gmx_mtop_t *mtop, const t_inputrec *ir);
+struct gmx_localtop_t *
+gmx_mtop_generate_local_top(const struct gmx_mtop_t *mtop, const t_inputrec *ir);
 
 
 /* Converts a gmx_mtop_t struct to t_topology.
  * All memory relating only to mtop will be freed.
  */
-t_topology
-gmx_mtop_t_to_t_topology(gmx_mtop_t *mtop);
+struct t_topology
+gmx_mtop_t_to_t_topology(struct gmx_mtop_t *mtop);
 
 #ifdef __cplusplus
 }
 #endif
+
+#endif
index 083e4fc6bcec05dd5c1f6c4bebe3214583c58f18..b065b4fee44dc029dfe1c2dfa1b11e297cb3227e 100644 (file)
 #ifndef _mvdata_h
 #define _mvdata_h
 
-#include "typedefs.h"
+#include "types/inputrec.h"
+#include "types/state.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-void bcast_ir_mtop(const t_commrec *cr,
-                   t_inputrec *inputrec, gmx_mtop_t *mtop);
+struct gmx_mtop_t;
+struct t_commrec;
+
+void bcast_ir_mtop(const struct t_commrec *cr,
+                   t_inputrec *inputrec, struct gmx_mtop_t *mtop);
 /* Broadcasts ir and mtop from the master to all nodes in cr->mpi_comm_mygroup.
  */
 
-void bcast_state(const t_commrec *cr, t_state *state);
+void bcast_state(const struct t_commrec *cr, t_state *state);
 /* Broadcasts state from the master to all nodes in cr->mpi_comm_mygroup.
  */
 
index 42fe9ca74fdad8fd2f8e8ed5d30f63d06f6cabf1..f0ae524c17e90888af94adc4c77852e65d7df0d1 100644 (file)
 
 #include <stdio.h>
 
-#include "types/simple.h"
-#include "typedefs.h"
+#include "../utility/basedefinitions.h"
 #include "../utility/fatalerror.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-t_commrec *init_commrec(void);
+struct gmx_domdec_t;
+struct gmx_multisim_t;
+struct t_commrec;
+
+struct t_commrec *init_commrec(void);
 /* Allocate, initialize and return the commrec. */
 
-t_commrec *reinitialize_commrec_for_this_thread(const t_commrec *cro);
+struct t_commrec *reinitialize_commrec_for_this_thread(const struct t_commrec *cro);
 /* Initialize communication records for thread-parallel simulations.
    Must be called on all threads before any communication takes place by
    the individual threads. Copies the original commrec to
    thread-local versions (a small memory leak results because we don't
    deallocate the old shared version).  */
 
-void gmx_fill_commrec_from_mpi(t_commrec *cr);
+void gmx_fill_commrec_from_mpi(struct t_commrec *cr);
 /* Continues t_commrec construction */
 
-void gmx_setup_nodecomm(FILE *fplog, t_commrec *cr);
+void gmx_setup_nodecomm(FILE *fplog, struct t_commrec *cr);
 /* Sets up fast global communication for clusters with multi-core nodes */
 
-void gmx_init_intranode_counters(t_commrec *cr);
+void gmx_init_intranode_counters(struct t_commrec *cr);
 /* Initializes intra-physical-node MPI process/thread counts and ID. */
 
-void gmx_barrier(const t_commrec *cr);
+void gmx_barrier(const struct t_commrec *cr);
 /* Wait till all processes in cr->mpi_comm_mygroup have reached the barrier */
 
-void gmx_bcast(int nbytes, void *b, const t_commrec *cr);
+void gmx_bcast(int nbytes, void *b, const struct t_commrec *cr);
 /* Broadcast nbytes bytes from the master to cr->mpi_comm_mygroup */
 
-void gmx_bcast_sim(int nbytes, void *b, const t_commrec *cr);
+void gmx_bcast_sim(int nbytes, void *b, const struct t_commrec *cr);
 /* Broadcast nbytes bytes from the sim master to cr->mpi_comm_mysim */
 
-void gmx_sumi(int nr, int r[], const t_commrec *cr);
+void gmx_sumi(int nr, int r[], const struct t_commrec *cr);
 /* Calculate the global sum of an array of ints */
 
-void gmx_sumli(int nr, gmx_int64_t r[], const t_commrec *cr);
+void gmx_sumli(int nr, gmx_int64_t r[], const struct t_commrec *cr);
 /* Calculate the global sum of an array of large ints */
 
-void gmx_sumf(int nr, float r[], const t_commrec *cr);
+void gmx_sumf(int nr, float r[], const struct t_commrec *cr);
 /* Calculate the global sum of an array of floats */
 
-void gmx_sumd(int nr, double r[], const t_commrec *cr);
+void gmx_sumd(int nr, double r[], const struct t_commrec *cr);
 /* Calculate the global sum of an array of doubles */
 
-void gmx_sumi_sim(int nr, int r[], const gmx_multisim_t *ms);
+void gmx_sumi_sim(int nr, int r[], const struct gmx_multisim_t *ms);
 /* Calculate the sum over the simulations of an array of ints */
 
-void gmx_sumli_sim(int nr, gmx_int64_t r[], const gmx_multisim_t *ms);
+void gmx_sumli_sim(int nr, gmx_int64_t r[], const struct gmx_multisim_t *ms);
 /* Calculate the sum over the simulations of an array of large ints */
 
-void gmx_sumf_sim(int nr, float r[], const gmx_multisim_t *ms);
+void gmx_sumf_sim(int nr, float r[], const struct gmx_multisim_t *ms);
 /* Calculate the sum over the simulations of an array of floats */
 
-void gmx_sumd_sim(int nr, double r[], const gmx_multisim_t *ms);
+void gmx_sumd_sim(int nr, double r[], const struct gmx_multisim_t *ms);
 /* Calculate the sum over the simulations of an array of doubles */
 
 #ifdef GMX_DOUBLE
@@ -113,12 +116,12 @@ void gmx_sumd_sim(int nr, double r[], const gmx_multisim_t *ms);
 #define gmx_sum_sim   gmx_sumf_sim
 #endif
 
-gmx_bool gmx_fexist_master(const char *fname, t_commrec *cr);
+gmx_bool gmx_fexist_master(const char *fname, struct t_commrec *cr);
 /* Return TRUE when fname exists, FALSE otherwise, bcast from master to others */
 
 void
 gmx_fatal_collective(int f_errno, const char *file, int line,
-                     const t_commrec *cr, gmx_domdec_t *dd,
+                     const struct t_commrec *cr, struct gmx_domdec_t *dd,
                      const char *fmt, ...);
 /* As gmx_fatal declared in utility/fatalerror.h,
  * but only the master process prints the error message.
index 35d1ca3c7b8b0c27cbefe4c39cf57916e3a951ed..cb2c44e6e5d71b69071c93d7ba4ac06dbb341623 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2008, The GROMACS development team.
- * Copyright (c) 2010, by the GROMACS development team, led by
+ * Copyright (c) 2010,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 _perf_est_h
 #define _perf_est_h
 
-#include "typedefs.h"
+#include "types/inputrec.h"
+#include "../math/vectypes.h"
+#include "../utility/basedefinitions.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-int n_bonded_dx(gmx_mtop_t *mtop, gmx_bool bExcl);
+struct gmx_mtop_t;
+
+int n_bonded_dx(struct gmx_mtop_t *mtop, gmx_bool bExcl);
 /* Returns the number of pbc_rvec_sub calls required for bonded interactions.
  * This number is also roughly proportional to the computational cost.
  */
 
-float pme_load_estimate(gmx_mtop_t *mtop, t_inputrec *ir, matrix box);
+float pme_load_estimate(struct gmx_mtop_t *mtop, t_inputrec *ir, matrix box);
 /* Returns an estimate for the relative load of the PME mesh calculation
  * in the total force calculation.
  * This estimate is reasonable for recent Intel and AMD x86_64 CPUs.
index f8ff166fea35cf0eba8a462bd6cdf7c5f06dda96..ec2cd30dc6be5e0db5419d735d5dd8d3bf33c5bc 100644 (file)
 #ifndef _rbin_h
 #define _rbin_h
 
-#include "typedefs.h"
+#include "../utility/real.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+struct t_commrec;
+
 typedef struct {
     int     nreal;
     int     maxreal;
@@ -63,7 +65,7 @@ int add_binr(t_bin *b, int nr, real r[]);
 int add_bind(t_bin *b, int nr, double r[]);
 /* Add reals to the bin. Returns index */
 
-void sum_bin(t_bin *b, t_commrec *cr);
+void sum_bin(t_bin *b, struct t_commrec *cr);
 /* Globally sum the reals in the bin */
 
 void extract_binr(t_bin *b, int index, int nr, real r[]);
index 1c910ac01a9cba9706fede276e8d11998ec9f86e..7fed9636af0e8a77d69327e14c028884a690a266 100644 (file)
@@ -40,7 +40,7 @@
 
 #include <string.h>
 
-#include "typedefs.h"
+#include "../utility/basedefinitions.h"
 #include "warninp.h"
 
 #ifdef __cplusplus
index 03a6f6e9da5bddfd48b26d05a4bace15f668f763..78edc547a9cf1d6da18aecf65cb09a6ece2a99cd 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2010, by the GROMACS development team, led by
+ * Copyright (c) 2010,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.
@@ -40,7 +40,7 @@
 
 #include <signal.h>
 
-#include "typedefs.h"
+#include "../utility/basedefinitions.h"
 
 #ifdef __cplusplus
 extern "C" {
index 4453714bf5eb2fa28b344abafea5f4929f8b55e7..2e6bc8ec0f84f6594464f8effed65aeef64b45c9 100644 (file)
 #ifndef _splitter_h
 #define _splitter_h
 
-#include "typedefs.h"
-#include "types/inputrec.h"
+#include <stdio.h>
+
+#include "../utility/basedefinitions.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+struct t_blocka;
+struct t_idef;
+
 void gen_sblocks(FILE *fp, int at_start, int at_end,
-                 t_idef *idef, t_blocka *sblock,
+                 struct t_idef *idef, struct t_blocka *sblock,
                  gmx_bool bSettle);
 /* Generate shake blocks from the constraint list. Set bSettle to yes for shake
  * blocks including settles. You normally do not want this.
index c11f77c87aed5c74a36b1924f2cddf10bb0c0ff0..86649a101df753b509e059d3b4feb5fa9c93237e 100644 (file)
 
 #include <stdio.h>
 
-#include "typedefs.h"
+#include "types/inputrec.h"
+#include "types/mdatom.h"
+#include "../math/vectypes.h"
+#include "../utility/basedefinitions.h"
+#include "../utility/real.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+struct gmx_groups_t;
 
 typedef struct {
     int        nr;             /* Number of groups                    */
@@ -62,7 +67,7 @@ typedef struct {
     char     **group_name;     /* These two are copies to pointers in */
 } t_vcm;
 
-t_vcm *init_vcm(FILE *fp, gmx_groups_t *groups, t_inputrec *ir);
+t_vcm *init_vcm(FILE *fp, struct gmx_groups_t *groups, t_inputrec *ir);
 
 /* Do a per group center of mass things */
 void calc_vcm_grp(int start, int homenr, t_mdatoms *md,
index be7c8a71cfff6c2f43afd3e9fdf059f9aae107b8..da485eda87bdc9d2a8f76abe837be44b63823833 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2010, by the GROMACS development team, led by
+ * Copyright (c) 2010,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,7 @@
 #ifndef _warninp_h
 #define _warninp_h
 
-#include "typedefs.h"
+#include "../utility/basedefinitions.h"
 
 #ifdef __cplusplus
 extern "C" {
index 121a9c323bbe35e49ab8c223b14c9d067e727611..4537efc6620074b30460e89d3dcfd2c64ae1d6a0 100644 (file)
@@ -49,7 +49,6 @@
 #include "mdatoms.h"
 #include "mdrun.h"
 #include "names.h"
-#include "calcgrid.h"
 #include "update.h"
 #include "mdebin.h"
 
index 070f87d18ea3b85d002d699fa681493214ea4ed1..9a2f39e028a05cdaa10af69858fb4eb35fd5e683 100644 (file)
@@ -45,6 +45,7 @@
 
 #include "gromacs/math/vec.h"
 #include "gromacs/fileio/tpxio.h"
+#include "gromacs/fileio/trx.h"
 #include "gromacs/fileio/trxio.h"
 #include "gromacs/topology/atoms.h"
 #include "gromacs/topology/topology.h"
index 552b1d299f8d233414414cdee6eecf1c4cdd95d7..524d6d6f551fefa10f9e17c879918f92b167f60e 100644 (file)
 #endif
 
 #include <math.h>
+
+#include "gromacs/legacyheaders/types/inputrec.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/legacyheaders/types/state.h"
 #include "index.h"
-#include "gromacs/utility/fatalerror.h"
-#include "gromacs/utility/smalloc.h"
 #include "macros.h"
 #include "names.h"
-#include "typedefs.h"
 #include "gromacs/gmxpreprocess/readir.h"
-#include "gromacs/commandline/pargs.h"
-#include "gromacs/math/vec.h"
 #include "mtop_util.h"
 #include "checkpoint.h"
 #include "gromacs/fileio/tpxio.h"
 #include "gromacs/fileio/trnio.h"
 #include "gromacs/fileio/enxio.h"
 #include "gromacs/utility/futil.h"
+
+#include "gromacs/commandline/pargs.h"
+#include "gromacs/math/vec.h"
 #include "gromacs/random/random.h"
+#include "gromacs/topology/topology.h"
+#include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/smalloc.h"
 
 #define RANGECHK(i, n) if ((i) >= (n)) gmx_fatal(FARGS, "Your index file contains atomnumbers (e.g. %d)\nthat are larger than the number of atoms in the tpr file (%d)", (i), (n))
 
index fc8f592e93ebcd19a2a9773d47d53fd283222abe..9fe80ec551ae41deccf111b01ef5d5889d18e0b6 100644 (file)
 #include "gromacs/analysisdata/modules/lifetime.h"
 #include "gromacs/analysisdata/modules/plot.h"
 #include "gromacs/fileio/gmxfio.h"
+#include "gromacs/fileio/trx.h"
 #include "gromacs/fileio/trxio.h"
 #include "gromacs/options/basicoptions.h"
 #include "gromacs/options/filenameoption.h"
 #include "gromacs/options/options.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 bc97d3acc423358f257e5bcc05f78d2e3d64147c..643ed3e30a669ce815f3379426eb00b4357328a7 100644 (file)
@@ -51,6 +51,7 @@
 
 #include "gromacs/fileio/timecontrol.h"
 #include "gromacs/fileio/tpxio.h"
+#include "gromacs/fileio/trx.h"
 #include "gromacs/fileio/trxio.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/options/basicoptions.h"
@@ -60,6 +61,7 @@
 #include "gromacs/selection/indexutil.h"
 #include "gromacs/selection/selectioncollection.h"
 #include "gromacs/selection/selectionfileoption.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/trajectoryanalysis/analysissettings.h"
 #include "gromacs/utility/exceptions.h"
 #include "gromacs/utility/gmxassert.h"