From: Teemu Murtola Date: Mon, 2 Jun 2014 18:36:21 +0000 (+0300) Subject: Move index.* to topology/ X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=ffc891f7dc35856bf8575cdc6ef62e09f8bd2473;p=alexxy%2Fgromacs.git Move index.* to topology/ - Move index.h and index.c to topology/. - Remove some unused and duplicate includes. - Convert the source file to C++ (scanf issues suppressed for now). Change-Id: I99374f5d2e53b6c26bf6441b630234177c83affb --- diff --git a/src/contrib/do_multiprot.c b/src/contrib/do_multiprot.c index f5647c5aad..d7943a2659 100644 --- a/src/contrib/do_multiprot.c +++ b/src/contrib/do_multiprot.c @@ -47,7 +47,7 @@ #include "gromacs/fileio/pdbio.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/fileio/xvgr.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gstat.h" #include "gromacs/fileio/tpxio.h" #include "viewit.h" diff --git a/src/contrib/do_shift.c b/src/contrib/do_shift.c index c66a810c9d..fd20a5ada9 100644 --- a/src/contrib/do_shift.c +++ b/src/contrib/do_shift.c @@ -48,7 +48,7 @@ #include "gromacs/utility/fatalerror.h" #include "gromacs/fileio/xvgr.h" #include "gstat.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/fileio/pdbio.h" void cat(FILE *out,char *fn,real t) diff --git a/src/contrib/g_anavel.c b/src/contrib/g_anavel.c index 6cb062fe49..96da5c85bb 100644 --- a/src/contrib/g_anavel.c +++ b/src/contrib/g_anavel.c @@ -46,7 +46,6 @@ #include "gromacs/math/vec.h" #include "gromacs/utility/futil.h" #include "copyrite.h" -#include "index.h" #include "gromacs/fileio/tpxio.h" int main(int argc,char *argv[]) diff --git a/src/contrib/gmx_sdf.c b/src/contrib/gmx_sdf.c index 39cb0f5545..9e003626bd 100644 --- a/src/contrib/gmx_sdf.c +++ b/src/contrib/gmx_sdf.c @@ -29,7 +29,7 @@ #include "gromacs/utility/futil.h" #include "gromacs/commandline/pargs.h" #include "gromacs/fileio/tpxio.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/utility/smalloc.h" #include "nrnb.h" #include "gstat.h" diff --git a/src/contrib/hexamer.c b/src/contrib/hexamer.c index 22117c73a9..bd477eb91b 100644 --- a/src/contrib/hexamer.c +++ b/src/contrib/hexamer.c @@ -46,7 +46,6 @@ #include "macros.h" #include "copyrite.h" #include "gromacs/commandline/pargs.h" -#include "index.h" #include "gromacs/math/vec.h" #include "typedefs.h" #include "gbutil.h" diff --git a/src/gromacs/fileio/pdbio.c b/src/gromacs/fileio/pdbio.c index a4c1487d68..ecbfa7c75b 100644 --- a/src/gromacs/fileio/pdbio.c +++ b/src/gromacs/fileio/pdbio.c @@ -45,7 +45,6 @@ #include #include "gromacs/legacyheaders/copyrite.h" -#include "gromacs/legacyheaders/index.h" #include "gromacs/legacyheaders/types/ifunc.h" #include "gromacs/legacyheaders/typedefs.h" #include "gromacs/utility/futil.h" @@ -55,6 +54,7 @@ #include "gromacs/math/vec.h" #include "gromacs/pbcutil/pbc.h" #include "gromacs/topology/atomprop.h" +#include "gromacs/topology/index.h" #include "gromacs/topology/symtab.h" #include "gromacs/topology/topology.h" #include "gromacs/utility/cstringutil.h" diff --git a/src/gromacs/gmxana/dlist.c b/src/gromacs/gmxana/dlist.c index 3f86100cbe..f44fe45ec8 100644 --- a/src/gromacs/gmxana/dlist.c +++ b/src/gromacs/gmxana/dlist.c @@ -44,7 +44,7 @@ #include "gromacs/utility/smalloc.h" #include "gstat.h" #include "gromacs/utility/fatalerror.h" -#include "index.h" +#include "gromacs/topology/index.h" t_dlist *mk_dlist(FILE *log, t_atoms *atoms, int *nlist, diff --git a/src/gromacs/gmxana/expfit.c b/src/gromacs/gmxana/expfit.c index ee125c8b8e..d0731c210a 100644 --- a/src/gromacs/gmxana/expfit.c +++ b/src/gromacs/gmxana/expfit.c @@ -47,7 +47,6 @@ #include "gromacs/utility/futil.h" #include "gstat.h" #include "gromacs/math/vec.h" -#include "index.h" #include "gromacs/utility/fatalerror.h" diff --git a/src/gromacs/gmxana/gmx_anaeig.c b/src/gromacs/gmxana/gmx_anaeig.c index e0b4d1efe7..2c46a8f7ef 100644 --- a/src/gromacs/gmxana/gmx_anaeig.c +++ b/src/gromacs/gmxana/gmx_anaeig.c @@ -49,7 +49,7 @@ #include "gromacs/utility/fatalerror.h" #include "gromacs/math/vec.h" #include "gromacs/utility/futil.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/fileio/pdbio.h" #include "gromacs/fileio/confio.h" #include "gromacs/fileio/tpxio.h" diff --git a/src/gromacs/gmxana/gmx_angle.c b/src/gromacs/gmxana/gmx_angle.c index 2795b3d2f7..b5c3d7e1a3 100644 --- a/src/gromacs/gmxana/gmx_angle.c +++ b/src/gromacs/gmxana/gmx_angle.c @@ -47,7 +47,7 @@ #include "gromacs/commandline/pargs.h" #include "copyrite.h" #include "gromacs/math/vec.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "macros.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/fileio/xvgr.h" diff --git a/src/gromacs/gmxana/gmx_bundle.c b/src/gromacs/gmxana/gmx_bundle.c index 7947559761..c0ffc08d9a 100644 --- a/src/gromacs/gmxana/gmx_bundle.c +++ b/src/gromacs/gmxana/gmx_bundle.c @@ -46,7 +46,7 @@ #include "macros.h" #include "gromacs/math/vec.h" #include "gromacs/utility/futil.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/pbcutil/rmpbc.h" #include "gromacs/fileio/tpxio.h" diff --git a/src/gromacs/gmxana/gmx_chi.c b/src/gromacs/gmxana/gmx_chi.c index 5cb3c68f89..89882e96e9 100644 --- a/src/gromacs/gmxana/gmx_chi.c +++ b/src/gromacs/gmxana/gmx_chi.c @@ -50,7 +50,7 @@ #include "macros.h" #include "gromacs/math/utilities.h" #include "gromacs/math/units.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/utility/smalloc.h" #include "gromacs/commandline/pargs.h" #include "gromacs/fileio/tpxio.h" diff --git a/src/gromacs/gmxana/gmx_cluster.c b/src/gromacs/gmxana/gmx_cluster.c index 3d49a95dea..765105707b 100644 --- a/src/gromacs/gmxana/gmx_cluster.c +++ b/src/gromacs/gmxana/gmx_cluster.c @@ -51,7 +51,7 @@ #include "gromacs/utility/cstringutil.h" #include "gromacs/math/vec.h" #include "macros.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/random/random.h" #include "gromacs/pbcutil/pbc.h" #include "gromacs/pbcutil/rmpbc.h" diff --git a/src/gromacs/gmxana/gmx_clustsize.c b/src/gromacs/gmxana/gmx_clustsize.c index b3f770b86c..0ebf0826ea 100644 --- a/src/gromacs/gmxana/gmx_clustsize.c +++ b/src/gromacs/gmxana/gmx_clustsize.c @@ -49,7 +49,7 @@ #include "gromacs/utility/futil.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/utility/smalloc.h" #include "nrnb.h" #include "gromacs/math/units.h" diff --git a/src/gromacs/gmxana/gmx_confrms.c b/src/gromacs/gmxana/gmx_confrms.c index 1ffdeee686..da05a0157d 100644 --- a/src/gromacs/gmxana/gmx_confrms.c +++ b/src/gromacs/gmxana/gmx_confrms.c @@ -48,7 +48,7 @@ #include "gromacs/commandline/pargs.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/math/vec.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/utility/futil.h" #include "gromacs/fileio/confio.h" diff --git a/src/gromacs/gmxana/gmx_covar.c b/src/gromacs/gmxana/gmx_covar.c index bc77018c30..5b8c50f6c7 100644 --- a/src/gromacs/gmxana/gmx_covar.c +++ b/src/gromacs/gmxana/gmx_covar.c @@ -52,7 +52,7 @@ #include "macros.h" #include "gromacs/math/vec.h" #include "gromacs/utility/futil.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/fileio/confio.h" #include "gromacs/fileio/trnio.h" #include "gromacs/fileio/xvgr.h" diff --git a/src/gromacs/gmxana/gmx_current.c b/src/gromacs/gmxana/gmx_current.c index 39b9b1b706..5167a590c2 100644 --- a/src/gromacs/gmxana/gmx_current.c +++ b/src/gromacs/gmxana/gmx_current.c @@ -49,7 +49,7 @@ #include "gromacs/pbcutil/rmpbc.h" #include "gromacs/pbcutil/pbc.h" #include "gromacs/math/units.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/statistics/statistics.h" #include "gmx_ana.h" #include "macros.h" diff --git a/src/gromacs/gmxana/gmx_density.c b/src/gromacs/gmxana/gmx_density.c index 768d0f9082..1cbd6e8ce7 100644 --- a/src/gromacs/gmxana/gmx_density.c +++ b/src/gromacs/gmxana/gmx_density.c @@ -49,7 +49,7 @@ #include "gstat.h" #include "viewit.h" #include "gromacs/pbcutil/pbc.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/math/units.h" diff --git a/src/gromacs/gmxana/gmx_densmap.c b/src/gromacs/gmxana/gmx_densmap.c index e3205c6ce9..c17f540010 100644 --- a/src/gromacs/gmxana/gmx_densmap.c +++ b/src/gromacs/gmxana/gmx_densmap.c @@ -48,7 +48,7 @@ #include "gromacs/math/vec.h" #include "gromacs/pbcutil/pbc.h" #include "gromacs/utility/futil.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "txtdump.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" diff --git a/src/gromacs/gmxana/gmx_densorder.cpp b/src/gromacs/gmxana/gmx_densorder.cpp index 67acd98ed2..020c746947 100644 --- a/src/gromacs/gmxana/gmx_densorder.cpp +++ b/src/gromacs/gmxana/gmx_densorder.cpp @@ -46,7 +46,7 @@ #include "gstat.h" #include "gromacs/pbcutil/pbc.h" #include "gromacs/utility/futil.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/math/units.h" diff --git a/src/gromacs/gmxana/gmx_dipoles.cpp b/src/gromacs/gmxana/gmx_dipoles.cpp index 9e740d6c3b..2a0ef2cc07 100644 --- a/src/gromacs/gmxana/gmx_dipoles.cpp +++ b/src/gromacs/gmxana/gmx_dipoles.cpp @@ -50,7 +50,7 @@ #include "txtdump.h" #include "gromacs/statistics/statistics.h" #include "gstat.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/random/random.h" #include "names.h" #include "gromacs/math/units.h" diff --git a/src/gromacs/gmxana/gmx_disre.c b/src/gromacs/gmxana/gmx_disre.c index 1efdfb4170..046c51cf12 100644 --- a/src/gromacs/gmxana/gmx_disre.c +++ b/src/gromacs/gmxana/gmx_disre.c @@ -53,7 +53,7 @@ #include "gstat.h" #include "main.h" #include "gromacs/fileio/pdbio.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "mdatoms.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" diff --git a/src/gromacs/gmxana/gmx_do_dssp.c b/src/gromacs/gmxana/gmx_do_dssp.c index 7b0cd14213..346bfa03e6 100644 --- a/src/gromacs/gmxana/gmx_do_dssp.c +++ b/src/gromacs/gmxana/gmx_do_dssp.c @@ -43,7 +43,7 @@ #include "typedefs.h" #include "macros.h" #include "gromacs/fileio/pdbio.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gstat.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" diff --git a/src/gromacs/gmxana/gmx_dos.c b/src/gromacs/gmxana/gmx_dos.c index 104e42260d..c695cbe1fb 100644 --- a/src/gromacs/gmxana/gmx_dos.c +++ b/src/gromacs/gmxana/gmx_dos.c @@ -49,7 +49,6 @@ #include "macros.h" #include "gromacs/math/utilities.h" #include "gromacs/math/units.h" -#include "index.h" #include "gromacs/utility/smalloc.h" #include "gromacs/commandline/pargs.h" #include "txtdump.h" diff --git a/src/gromacs/gmxana/gmx_dyecoupl.c b/src/gromacs/gmxana/gmx_dyecoupl.c index cc492abd05..55db291afa 100644 --- a/src/gromacs/gmxana/gmx_dyecoupl.c +++ b/src/gromacs/gmxana/gmx_dyecoupl.c @@ -42,7 +42,7 @@ #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/pbcutil/pbc.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/utility/smalloc.h" diff --git a/src/gromacs/gmxana/gmx_dyndom.c b/src/gromacs/gmxana/gmx_dyndom.c index 9106fa66f4..27a157d521 100644 --- a/src/gromacs/gmxana/gmx_dyndom.c +++ b/src/gromacs/gmxana/gmx_dyndom.c @@ -38,7 +38,7 @@ #include #endif -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/fileio/confio.h" #include "gromacs/math/units.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_editconf.c b/src/gromacs/gmxana/gmx_editconf.c index 3bf14dbf76..1c1d18c702 100644 --- a/src/gromacs/gmxana/gmx_editconf.c +++ b/src/gromacs/gmxana/gmx_editconf.c @@ -45,7 +45,7 @@ #include "gromacs/fileio/confio.h" #include "macros.h" #include "gromacs/fileio/strdb.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "typedefs.h" #include "gromacs/gmxlib/conformation-utilities.h" #include "gromacs/math/units.h" diff --git a/src/gromacs/gmxana/gmx_filter.c b/src/gromacs/gmxana/gmx_filter.c index 51b2fad0d1..e51ceff061 100644 --- a/src/gromacs/gmxana/gmx_filter.c +++ b/src/gromacs/gmxana/gmx_filter.c @@ -45,7 +45,7 @@ #include "gromacs/utility/smalloc.h" #include "macros.h" #include "gromacs/math/vec.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "princ.h" diff --git a/src/gromacs/gmxana/gmx_genion.c b/src/gromacs/gmxana/gmx_genion.c index 909e855554..7699f36f8d 100644 --- a/src/gromacs/gmxana/gmx_genion.c +++ b/src/gromacs/gmxana/gmx_genion.c @@ -56,7 +56,7 @@ #include "gromacs/fileio/tpxio.h" #include "mdrun.h" #include "gromacs/random/random.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gmx_ana.h" static void insert_ion(int nsa, int *nwater, diff --git a/src/gromacs/gmxana/gmx_genpr.c b/src/gromacs/gmxana/gmx_genpr.c index 71d2a20772..4d2891cc13 100644 --- a/src/gromacs/gmxana/gmx_genpr.c +++ b/src/gromacs/gmxana/gmx_genpr.c @@ -48,7 +48,7 @@ #include "gromacs/utility/futil.h" #include "macros.h" #include "gromacs/math/vec.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/utility/cstringutil.h" #include "gromacs/utility/fatalerror.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_gyrate.c b/src/gromacs/gmxana/gmx_gyrate.c index 6ca8bbff71..0ffb34ead5 100644 --- a/src/gromacs/gmxana/gmx_gyrate.c +++ b/src/gromacs/gmxana/gmx_gyrate.c @@ -47,7 +47,7 @@ #include "macros.h" #include "gromacs/math/vec.h" #include "gromacs/utility/futil.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/fileio/xvgr.h" #include "viewit.h" #include "princ.h" diff --git a/src/gromacs/gmxana/gmx_h2order.c b/src/gromacs/gmxana/gmx_h2order.c index 7c23c3d9db..7a47f5c412 100644 --- a/src/gromacs/gmxana/gmx_h2order.c +++ b/src/gromacs/gmxana/gmx_h2order.c @@ -51,7 +51,7 @@ #include "viewit.h" #include "gromacs/utility/futil.h" #include "gromacs/commandline/pargs.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gmx_ana.h" #include "gromacs/fileio/trxio.h" diff --git a/src/gromacs/gmxana/gmx_hbond.c b/src/gromacs/gmxana/gmx_hbond.c index 79a46cb57b..5c28edf3d9 100644 --- a/src/gromacs/gmxana/gmx_hbond.c +++ b/src/gromacs/gmxana/gmx_hbond.c @@ -47,7 +47,7 @@ #include "gromacs/math/units.h" #include "macros.h" #include "gromacs/utility/fatalerror.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/utility/smalloc.h" #include "gromacs/math/vec.h" #include "gromacs/fileio/xvgr.h" diff --git a/src/gromacs/gmxana/gmx_helix.c b/src/gromacs/gmxana/gmx_helix.c index aa7fd92db9..21630d3526 100644 --- a/src/gromacs/gmxana/gmx_helix.c +++ b/src/gromacs/gmxana/gmx_helix.c @@ -50,7 +50,6 @@ #include "gromacs/math/utilities.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" -#include "index.h" #include "gromacs/utility/smalloc.h" #include "txtdump.h" #include "typedefs.h" diff --git a/src/gromacs/gmxana/gmx_helixorient.c b/src/gromacs/gmxana/gmx_helixorient.c index 503c2e7016..6481cd3ed0 100644 --- a/src/gromacs/gmxana/gmx_helixorient.c +++ b/src/gromacs/gmxana/gmx_helixorient.c @@ -43,7 +43,7 @@ #include "typedefs.h" #include "macros.h" #include "gromacs/math/vec.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gstat.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_hydorder.c b/src/gromacs/gmxana/gmx_hydorder.c index 165f388513..d57a40d998 100644 --- a/src/gromacs/gmxana/gmx_hydorder.c +++ b/src/gromacs/gmxana/gmx_hydorder.c @@ -46,7 +46,7 @@ #include "gromacs/math/vec.h" #include "gromacs/pbcutil/pbc.h" #include "gromacs/utility/futil.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "binsearch.h" diff --git a/src/gromacs/gmxana/gmx_make_edi.c b/src/gromacs/gmxana/gmx_make_edi.c index d376119b95..7340e853cb 100644 --- a/src/gromacs/gmxana/gmx_make_edi.c +++ b/src/gromacs/gmxana/gmx_make_edi.c @@ -58,7 +58,7 @@ #include "gromacs/fileio/xvgr.h" #include "txtdump.h" #include "eigio.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/utility/cstringutil.h" typedef struct diff --git a/src/gromacs/gmxana/gmx_make_ndx.c b/src/gromacs/gmxana/gmx_make_ndx.c index 9e3d47739d..3e48c99a26 100644 --- a/src/gromacs/gmxana/gmx_make_ndx.c +++ b/src/gromacs/gmxana/gmx_make_ndx.c @@ -45,9 +45,8 @@ #include "macros.h" #include "gromacs/fileio/confio.h" #include "typedefs.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/math/vec.h" -#include "index.h" #include "gromacs/commandline/pargs.h" #include "gromacs/topology/block.h" diff --git a/src/gromacs/gmxana/gmx_mdmat.c b/src/gromacs/gmxana/gmx_mdmat.c index 1d0473fdcc..46ea9a0a7a 100644 --- a/src/gromacs/gmxana/gmx_mdmat.c +++ b/src/gromacs/gmxana/gmx_mdmat.c @@ -51,7 +51,7 @@ #include "gromacs/utility/smalloc.h" #include "gromacs/fileio/matio.h" #include "gromacs/fileio/xvgr.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/pbcutil/rmpbc.h" diff --git a/src/gromacs/gmxana/gmx_mindist.c b/src/gromacs/gmxana/gmx_mindist.c index 787a6b0d09..c13e907598 100644 --- a/src/gromacs/gmxana/gmx_mindist.c +++ b/src/gromacs/gmxana/gmx_mindist.c @@ -51,7 +51,7 @@ #include "gromacs/pbcutil/pbc.h" #include "gromacs/utility/futil.h" #include "gromacs/commandline/pargs.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/pbcutil/rmpbc.h" diff --git a/src/gromacs/gmxana/gmx_morph.c b/src/gromacs/gmxana/gmx_morph.c index dadb1590f9..e36ebeab79 100644 --- a/src/gromacs/gmxana/gmx_morph.c +++ b/src/gromacs/gmxana/gmx_morph.c @@ -41,7 +41,7 @@ #include "macros.h" #include "gromacs/fileio/confio.h" #include "viewit.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gmx_ana.h" #include "gromacs/fileio/trxio.h" diff --git a/src/gromacs/gmxana/gmx_msd.c b/src/gromacs/gmxana/gmx_msd.c index bfdbac55ae..0692168a8b 100644 --- a/src/gromacs/gmxana/gmx_msd.c +++ b/src/gromacs/gmxana/gmx_msd.c @@ -44,7 +44,7 @@ #include "macros.h" #include "gromacs/math/utilities.h" #include "gromacs/utility/futil.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "typedefs.h" #include "viewit.h" #include "gstat.h" diff --git a/src/gromacs/gmxana/gmx_nmeig.c b/src/gromacs/gmxana/gmx_nmeig.c index 5497dfd098..7e2b5f8bde 100644 --- a/src/gromacs/gmxana/gmx_nmeig.c +++ b/src/gromacs/gmxana/gmx_nmeig.c @@ -45,7 +45,6 @@ #include "macros.h" #include "copyrite.h" #include "gromacs/utility/futil.h" -#include "index.h" #include "gstat.h" #include "txtdump.h" #include "eigio.h" diff --git a/src/gromacs/gmxana/gmx_nmens.c b/src/gromacs/gmxana/gmx_nmens.c index 4ddf1300ca..f496b4d4d0 100644 --- a/src/gromacs/gmxana/gmx_nmens.c +++ b/src/gromacs/gmxana/gmx_nmens.c @@ -48,7 +48,7 @@ #include "gromacs/utility/fatalerror.h" #include "gromacs/math/vec.h" #include "gromacs/utility/futil.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/fileio/pdbio.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" diff --git a/src/gromacs/gmxana/gmx_nmtraj.c b/src/gromacs/gmxana/gmx_nmtraj.c index b5edf8b564..4275f9cc87 100644 --- a/src/gromacs/gmxana/gmx_nmtraj.c +++ b/src/gromacs/gmxana/gmx_nmtraj.c @@ -49,7 +49,6 @@ #include "gromacs/utility/fatalerror.h" #include "gromacs/math/vec.h" #include "gromacs/utility/futil.h" -#include "index.h" #include "gromacs/fileio/pdbio.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" diff --git a/src/gromacs/gmxana/gmx_order.c b/src/gromacs/gmxana/gmx_order.c index 91f90383ae..b316179423 100644 --- a/src/gromacs/gmxana/gmx_order.c +++ b/src/gromacs/gmxana/gmx_order.c @@ -48,7 +48,7 @@ #include "viewit.h" #include "gromacs/pbcutil/pbc.h" #include "gromacs/utility/futil.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/confio.h" diff --git a/src/gromacs/gmxana/gmx_polystat.c b/src/gromacs/gmxana/gmx_polystat.c index 44fe45d299..7d6cacd7ae 100644 --- a/src/gromacs/gmxana/gmx_polystat.c +++ b/src/gromacs/gmxana/gmx_polystat.c @@ -46,7 +46,7 @@ #include "gromacs/utility/futil.h" #include "gromacs/commandline/pargs.h" #include "gromacs/math/vec.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "macros.h" #include "gromacs/fileio/xvgr.h" #include "viewit.h" diff --git a/src/gromacs/gmxana/gmx_potential.c b/src/gromacs/gmxana/gmx_potential.c index 163522eacd..4957f6eab4 100644 --- a/src/gromacs/gmxana/gmx_potential.c +++ b/src/gromacs/gmxana/gmx_potential.c @@ -52,7 +52,7 @@ #include "viewit.h" #include "gromacs/utility/futil.h" #include "gromacs/commandline/pargs.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gmx_ana.h" #include "gromacs/utility/cstringutil.h" #include "gromacs/fileio/trxio.h" diff --git a/src/gromacs/gmxana/gmx_principal.c b/src/gromacs/gmxana/gmx_principal.c index a46e1826a2..72db5d6ba5 100644 --- a/src/gromacs/gmxana/gmx_principal.c +++ b/src/gromacs/gmxana/gmx_principal.c @@ -47,7 +47,7 @@ #include "macros.h" #include "gromacs/math/vec.h" #include "gromacs/utility/futil.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "princ.h" #include "gromacs/pbcutil/rmpbc.h" #include "txtdump.h" diff --git a/src/gromacs/gmxana/gmx_rama.c b/src/gromacs/gmxana/gmx_rama.c index 6cfe0c4997..ab57c674cc 100644 --- a/src/gromacs/gmxana/gmx_rama.c +++ b/src/gromacs/gmxana/gmx_rama.c @@ -50,7 +50,6 @@ #include "gromacs/math/units.h" #include "gromacs/utility/futil.h" #include "gromacs/commandline/pargs.h" -#include "index.h" #include "nrama.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_rdf.c b/src/gromacs/gmxana/gmx_rdf.c index 58c755afa1..94f39ab1e0 100644 --- a/src/gromacs/gmxana/gmx_rdf.c +++ b/src/gromacs/gmxana/gmx_rdf.c @@ -49,7 +49,7 @@ #include "gromacs/utility/futil.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "nrnb.h" #include "coulomb.h" #include "gstat.h" diff --git a/src/gromacs/gmxana/gmx_rms.c b/src/gromacs/gmxana/gmx_rms.c index ca69a60ab5..9776ea4af5 100644 --- a/src/gromacs/gmxana/gmx_rms.c +++ b/src/gromacs/gmxana/gmx_rms.c @@ -48,7 +48,7 @@ #include "copyrite.h" #include "gromacs/commandline/pargs.h" #include "gromacs/math/vec.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/utility/futil.h" #include "princ.h" diff --git a/src/gromacs/gmxana/gmx_rmsdist.c b/src/gromacs/gmxana/gmx_rmsdist.c index 4c85111ffb..4c190b3bfc 100644 --- a/src/gromacs/gmxana/gmx_rmsdist.c +++ b/src/gromacs/gmxana/gmx_rmsdist.c @@ -50,7 +50,7 @@ #include "gromacs/fileio/strdb.h" #include "gromacs/math/vec.h" #include "macros.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/pbcutil/pbc.h" #include "gromacs/fileio/xvgr.h" #include "viewit.h" diff --git a/src/gromacs/gmxana/gmx_rmsf.c b/src/gromacs/gmxana/gmx_rmsf.c index 45e24b622c..d882951db3 100644 --- a/src/gromacs/gmxana/gmx_rmsf.c +++ b/src/gromacs/gmxana/gmx_rmsf.c @@ -47,7 +47,7 @@ #include "viewit.h" #include "gromacs/commandline/pargs.h" #include "gromacs/math/vec.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/fileio/pdbio.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" diff --git a/src/gromacs/gmxana/gmx_rotacf.c b/src/gromacs/gmxana/gmx_rotacf.c index 17c92c2c4c..17af340ff7 100644 --- a/src/gromacs/gmxana/gmx_rotacf.c +++ b/src/gromacs/gmxana/gmx_rotacf.c @@ -43,7 +43,7 @@ #include "typedefs.h" #include "gromacs/utility/futil.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "macros.h" #include "gstat.h" #include "gromacs/math/vec.h" diff --git a/src/gromacs/gmxana/gmx_rotmat.c b/src/gromacs/gmxana/gmx_rotmat.c index c1844bd62f..4fcbb79f2e 100644 --- a/src/gromacs/gmxana/gmx_rotmat.c +++ b/src/gromacs/gmxana/gmx_rotmat.c @@ -45,7 +45,7 @@ #include "macros.h" #include "gromacs/math/vec.h" #include "gromacs/utility/futil.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/fileio/xvgr.h" #include "viewit.h" #include "gromacs/pbcutil/rmpbc.h" diff --git a/src/gromacs/gmxana/gmx_sans.c b/src/gromacs/gmxana/gmx_sans.c index 75730a68f8..a41a8dd18a 100644 --- a/src/gromacs/gmxana/gmx_sans.c +++ b/src/gromacs/gmxana/gmx_sans.c @@ -41,7 +41,7 @@ #include "macros.h" #include "gromacs/math/vec.h" #include "copyrite.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gstat.h" #include "gmx_ana.h" #include "nsfactor.h" diff --git a/src/gromacs/gmxana/gmx_sorient.c b/src/gromacs/gmxana/gmx_sorient.c index 1e1f75cd8a..8f94c4175a 100644 --- a/src/gromacs/gmxana/gmx_sorient.c +++ b/src/gromacs/gmxana/gmx_sorient.c @@ -43,7 +43,7 @@ #include "gromacs/math/vec.h" #include "viewit.h" #include "gromacs/pbcutil/pbc.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_spatial.c b/src/gromacs/gmxana/gmx_spatial.c index 9293e30f6c..640541c090 100644 --- a/src/gromacs/gmxana/gmx_spatial.c +++ b/src/gromacs/gmxana/gmx_spatial.c @@ -45,7 +45,7 @@ #include "gromacs/math/vec.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/pbcutil/pbc.h" #include "gromacs/pbcutil/rmpbc.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_spol.c b/src/gromacs/gmxana/gmx_spol.c index afc8560e8e..e526dc1062 100644 --- a/src/gromacs/gmxana/gmx_spol.c +++ b/src/gromacs/gmxana/gmx_spol.c @@ -42,7 +42,7 @@ #include "gstat.h" #include "viewit.h" #include "gromacs/pbcutil/pbc.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "gromacs/math/units.h" diff --git a/src/gromacs/gmxana/gmx_tcaf.c b/src/gromacs/gmxana/gmx_tcaf.c index 2a000147f4..8435a86280 100644 --- a/src/gromacs/gmxana/gmx_tcaf.c +++ b/src/gromacs/gmxana/gmx_tcaf.c @@ -49,7 +49,7 @@ #include "macros.h" #include "gromacs/math/utilities.h" #include "gromacs/math/units.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/utility/smalloc.h" #include "gromacs/commandline/pargs.h" #include "txtdump.h" diff --git a/src/gromacs/gmxana/gmx_traj.c b/src/gromacs/gmxana/gmx_traj.c index 3f4a2e0e4d..b018260593 100644 --- a/src/gromacs/gmxana/gmx_traj.c +++ b/src/gromacs/gmxana/gmx_traj.c @@ -48,7 +48,7 @@ #include "macros.h" #include "gromacs/math/vec.h" #include "gromacs/utility/futil.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/fileio/xvgr.h" #include "viewit.h" #include "gromacs/fileio/tpxio.h" diff --git a/src/gromacs/gmxana/gmx_trjcat.c b/src/gromacs/gmxana/gmx_trjcat.c index ce279a078f..fee1ce8020 100644 --- a/src/gromacs/gmxana/gmx_trjcat.c +++ b/src/gromacs/gmxana/gmx_trjcat.c @@ -56,7 +56,7 @@ #include "gromacs/fileio/pdbio.h" #include "gromacs/fileio/confio.h" #include "names.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/math/vec.h" #include "gromacs/fileio/xtcio.h" #include "gromacs/fileio/xvgr.h" diff --git a/src/gromacs/gmxana/gmx_trjconv.c b/src/gromacs/gmxana/gmx_trjconv.c index 62726f169b..2c52f8e85e 100644 --- a/src/gromacs/gmxana/gmx_trjconv.c +++ b/src/gromacs/gmxana/gmx_trjconv.c @@ -54,7 +54,7 @@ #include "gromacs/fileio/pdbio.h" #include "gromacs/fileio/confio.h" #include "names.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/math/vec.h" #include "gromacs/fileio/xtcio.h" #include "viewit.h" diff --git a/src/gromacs/gmxana/gmx_trjorder.c b/src/gromacs/gmxana/gmx_trjorder.c index 9f17214b96..a9c2622785 100644 --- a/src/gromacs/gmxana/gmx_trjorder.c +++ b/src/gromacs/gmxana/gmx_trjorder.c @@ -49,7 +49,7 @@ #include "gromacs/math/vec.h" #include "gromacs/pbcutil/pbc.h" #include "gromacs/utility/futil.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/pbcutil/rmpbc.h" diff --git a/src/gromacs/gmxana/gmx_vanhove.c b/src/gromacs/gmxana/gmx_vanhove.c index 640d786db9..8d773d9109 100644 --- a/src/gromacs/gmxana/gmx_vanhove.c +++ b/src/gromacs/gmxana/gmx_vanhove.c @@ -48,7 +48,7 @@ #include "gromacs/commandline/pargs.h" #include "gromacs/math/utilities.h" #include "gromacs/utility/futil.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "typedefs.h" #include "gromacs/fileio/xvgr.h" #include "viewit.h" diff --git a/src/gromacs/gmxana/gmx_velacc.c b/src/gromacs/gmxana/gmx_velacc.c index 1a86e56b28..4103fc84f6 100644 --- a/src/gromacs/gmxana/gmx_velacc.c +++ b/src/gromacs/gmxana/gmx_velacc.c @@ -49,7 +49,7 @@ #include "macros.h" #include "gromacs/math/utilities.h" #include "gromacs/math/units.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/utility/smalloc.h" #include "gromacs/commandline/pargs.h" #include "txtdump.h" diff --git a/src/gromacs/gmxana/gmx_wheel.c b/src/gromacs/gmxana/gmx_wheel.c index 25768eff35..146756b7cd 100644 --- a/src/gromacs/gmxana/gmx_wheel.c +++ b/src/gromacs/gmxana/gmx_wheel.c @@ -47,7 +47,6 @@ #include "gromacs/utility/smalloc.h" #include "macros.h" #include "gromacs/math/vec.h" -#include "index.h" #include "gstat.h" #include "gromacs/utility/fatalerror.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gstat.h b/src/gromacs/gmxana/gstat.h index 959a86d937..8c9895a855 100644 --- a/src/gromacs/gmxana/gstat.h +++ b/src/gromacs/gmxana/gstat.h @@ -38,9 +38,9 @@ #define GMX_GMXANA_GSTAT_H #include "../legacyheaders/typedefs.h" -#include "../commandline/pargs.h" #include "../legacyheaders/oenv.h" -#include "../legacyheaders/index.h" +#include "../commandline/pargs.h" +#include "../topology/index.h" #ifdef __cplusplus extern "C" { diff --git a/src/gromacs/gmxana/hxprops.c b/src/gromacs/gmxana/hxprops.c index 5a999cec66..776b26ff44 100644 --- a/src/gromacs/gmxana/hxprops.c +++ b/src/gromacs/gmxana/hxprops.c @@ -45,7 +45,7 @@ #include "macros.h" #include "gromacs/math/units.h" #include "gromacs/math/vec.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "hxprops.h" #include "gromacs/utility/smalloc.h" #include "bondf.h" diff --git a/src/gromacs/gmxana/nsfactor.h b/src/gromacs/gmxana/nsfactor.h index ebe6b80874..c833a5521d 100644 --- a/src/gromacs/gmxana/nsfactor.h +++ b/src/gromacs/gmxana/nsfactor.h @@ -36,7 +36,6 @@ #ifndef _nsfactor_h #define _nsfactor_h -#include "gromacs/legacyheaders/index.h" #include "gromacs/legacyheaders/oenv.h" #include "gromacs/legacyheaders/types/simple.h" diff --git a/src/gromacs/gmxana/sfactor.c b/src/gromacs/gmxana/sfactor.c index fdc251882d..e6e5a35b34 100644 --- a/src/gromacs/gmxana/sfactor.c +++ b/src/gromacs/gmxana/sfactor.c @@ -44,7 +44,7 @@ #include "gromacs/utility/fatalerror.h" #include "gromacs/math/vec.h" #include "macros.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/fileio/strdb.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" diff --git a/src/gromacs/gmxana/sfactor.h b/src/gromacs/gmxana/sfactor.h index 6eae788116..d9099a8bd3 100644 --- a/src/gromacs/gmxana/sfactor.h +++ b/src/gromacs/gmxana/sfactor.h @@ -37,7 +37,6 @@ #ifndef _sfactor_h #define _sfactor_h -#include "index.h" #include "types/simple.h" #include "../math/gmxcomplex.h" #include "oenv.h" diff --git a/src/gromacs/gmxpreprocess/gen_vsite.c b/src/gromacs/gmxpreprocess/gen_vsite.c index f0a69ab6ff..3dfbaa48bd 100644 --- a/src/gromacs/gmxpreprocess/gen_vsite.c +++ b/src/gromacs/gmxpreprocess/gen_vsite.c @@ -49,7 +49,7 @@ #include "gromacs/math/vec.h" #include "toputil.h" #include "gromacs/math/units.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "names.h" #include "gromacs/utility/futil.h" #include "gpp_atomtype.h" diff --git a/src/gromacs/gmxpreprocess/grompp.c b/src/gromacs/gmxpreprocess/grompp.c index 1cfeba8e7b..2eef5b7b63 100644 --- a/src/gromacs/gmxpreprocess/grompp.c +++ b/src/gromacs/gmxpreprocess/grompp.c @@ -62,7 +62,6 @@ #include "gromacs/gmxpreprocess/sortwater.h" #include "convparm.h" #include "warninp.h" -#include "index.h" #include "gromacs/fileio/gmxfio.h" #include "gromacs/fileio/trnio.h" #include "gromacs/fileio/tpxio.h" diff --git a/src/gromacs/gmxpreprocess/pdb2gmx.c b/src/gromacs/gmxpreprocess/pdb2gmx.c index db0a541256..883d5b79c3 100644 --- a/src/gromacs/gmxpreprocess/pdb2gmx.c +++ b/src/gromacs/gmxpreprocess/pdb2gmx.c @@ -62,7 +62,7 @@ #include "gromacs/gmxlib/conformation-utilities.h" #include "genhydro.h" #include "readinp.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "fflibutil.h" #include "macros.h" @@ -70,6 +70,7 @@ #include "gromacs/fileio/strdb.h" #include "gromacs/topology/atomprop.h" #include "gromacs/topology/block.h" +#include "gromacs/topology/index.h" #include "gromacs/topology/symtab.h" #include "gromacs/utility/smalloc.h" #include "gromacs/utility/fatalerror.h" diff --git a/src/gromacs/gmxpreprocess/pdb2top.cpp b/src/gromacs/gmxpreprocess/pdb2top.cpp index f660c51f1f..a71f273c87 100644 --- a/src/gromacs/gmxpreprocess/pdb2top.cpp +++ b/src/gromacs/gmxpreprocess/pdb2top.cpp @@ -57,7 +57,7 @@ #include "gromacs/fileio/pdbio.h" #include "gen_ad.h" #include "gromacs/fileio/filenm.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gen_vsite.h" #include "add_par.h" #include "toputil.h" diff --git a/src/gromacs/gmxpreprocess/protonate.c b/src/gromacs/gmxpreprocess/protonate.c index 7f2970bb28..5f10cc499d 100644 --- a/src/gromacs/gmxpreprocess/protonate.c +++ b/src/gromacs/gmxpreprocess/protonate.c @@ -50,7 +50,7 @@ #include "genhydro.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/math/vec.h" #include "hackblock.h" diff --git a/src/gromacs/gmxpreprocess/readir.c b/src/gromacs/gmxpreprocess/readir.c index 3d560b9330..b8e9e6d9b8 100644 --- a/src/gromacs/gmxpreprocess/readir.c +++ b/src/gromacs/gmxpreprocess/readir.c @@ -46,13 +46,12 @@ #include "gromacs/math/units.h" #include "names.h" #include "macros.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "gromacs/utility/cstringutil.h" #include "readinp.h" #include "warninp.h" #include "readir.h" #include "toputil.h" -#include "index.h" #include "network.h" #include "gromacs/math/vec.h" #include "gromacs/pbcutil/pbc.h" diff --git a/src/gromacs/gmxpreprocess/readpull.c b/src/gromacs/gmxpreprocess/readpull.c index da3dedec03..0e9706a7ae 100644 --- a/src/gromacs/gmxpreprocess/readpull.c +++ b/src/gromacs/gmxpreprocess/readpull.c @@ -49,7 +49,6 @@ #include "names.h" #include "gromacs/utility/fatalerror.h" #include "macros.h" -#include "index.h" #include "readinp.h" #include "readir.h" #include "mdatoms.h" diff --git a/src/gromacs/gmxpreprocess/vsite_parm.c b/src/gromacs/gmxpreprocess/vsite_parm.c index 773266ae92..6b8daa9919 100644 --- a/src/gromacs/gmxpreprocess/vsite_parm.c +++ b/src/gromacs/gmxpreprocess/vsite_parm.c @@ -50,7 +50,6 @@ #include "gromacs/math/vec.h" #include "toputil.h" #include "gromacs/math/units.h" -#include "index.h" #include "names.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/utility/cstringutil.h" diff --git a/src/gromacs/gmxpreprocess/xlate.c b/src/gromacs/gmxpreprocess/xlate.c index f98cc2a09b..faf148c120 100644 --- a/src/gromacs/gmxpreprocess/xlate.c +++ b/src/gromacs/gmxpreprocess/xlate.c @@ -42,7 +42,7 @@ #include #include "typedefs.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "fflibutil.h" #include "hackblock.h" #include "xlate.h" diff --git a/src/gromacs/gmxpreprocess/xlate.h b/src/gromacs/gmxpreprocess/xlate.h index 892569fb6c..83d667b0b3 100644 --- a/src/gromacs/gmxpreprocess/xlate.h +++ b/src/gromacs/gmxpreprocess/xlate.h @@ -38,7 +38,7 @@ #ifndef GMX_GMXPREPROCESS_XLATE_H #define GMX_GMXPREPROCESS_XLATE_H -#include "index.h" +#include "gromacs/topology/index.h" #ifdef __cplusplus extern "C" { diff --git a/src/gromacs/pulling/pull.c b/src/gromacs/pulling/pull.c index 265749eeee..77a773c9e4 100644 --- a/src/gromacs/pulling/pull.c +++ b/src/gromacs/pulling/pull.c @@ -44,7 +44,6 @@ #include #include "gromacs/utility/futil.h" -#include "index.h" #include "typedefs.h" #include "types/commrec.h" #include "network.h" diff --git a/src/gromacs/pulling/pullutil.c b/src/gromacs/pulling/pullutil.c index 6cd0cef2ff..1b13d4eabc 100644 --- a/src/gromacs/pulling/pullutil.c +++ b/src/gromacs/pulling/pullutil.c @@ -48,7 +48,6 @@ #include "names.h" #include "gromacs/utility/fatalerror.h" #include "macros.h" -#include "index.h" #include "gromacs/fileio/confio.h" #include "network.h" #include "gromacs/pbcutil/pbc.h" diff --git a/src/gromacs/selection/indexutil.cpp b/src/gromacs/selection/indexutil.cpp index b2f5b053bf..f921caeaac 100644 --- a/src/gromacs/selection/indexutil.cpp +++ b/src/gromacs/selection/indexutil.cpp @@ -47,9 +47,8 @@ #include #include -#include "gromacs/legacyheaders/index.h" - #include "gromacs/topology/block.h" +#include "gromacs/topology/index.h" #include "gromacs/topology/topology.h" #include "gromacs/utility/gmxassert.h" #include "gromacs/utility/smalloc.h" diff --git a/src/gromacs/tools/check.c b/src/gromacs/tools/check.c index 47c703efa5..ce319bff89 100644 --- a/src/gromacs/tools/check.c +++ b/src/gromacs/tools/check.c @@ -46,7 +46,7 @@ #include "txtdump.h" #include "gromacs/math/vec.h" #include "gromacs/math/units.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "names.h" #include "gromacs/utility/futil.h" #include "gromacs/fileio/gmxfio.h" diff --git a/src/gromacs/tools/convert_tpr.c b/src/gromacs/tools/convert_tpr.c index 16becfb6c3..21204a11b7 100644 --- a/src/gromacs/tools/convert_tpr.c +++ b/src/gromacs/tools/convert_tpr.c @@ -43,7 +43,7 @@ #include "gromacs/legacyheaders/types/inputrec.h" #include "gromacs/legacyheaders/types/simple.h" #include "gromacs/legacyheaders/types/state.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "macros.h" #include "names.h" #include "gromacs/gmxpreprocess/readir.h" diff --git a/src/gromacs/topology/CMakeLists.txt b/src/gromacs/topology/CMakeLists.txt index fb900cfca0..ffc2379e83 100644 --- a/src/gromacs/topology/CMakeLists.txt +++ b/src/gromacs/topology/CMakeLists.txt @@ -40,6 +40,7 @@ set(TOPOLOGY_PUBLIC_HEADERS atoms.h block.h idef.h + index.h mtop_util.h symtab.h topology.h) diff --git a/src/gromacs/topology/atomprop.cpp b/src/gromacs/topology/atomprop.cpp index 519a5bb897..09cb30785b 100644 --- a/src/gromacs/topology/atomprop.cpp +++ b/src/gromacs/topology/atomprop.cpp @@ -45,8 +45,8 @@ #include "gromacs/fileio/strdb.h" #include "gromacs/legacyheaders/copyrite.h" -#include "gromacs/legacyheaders/index.h" #include "gromacs/math/utilities.h" +#include "gromacs/topology/index.h" #include "gromacs/utility/cstringutil.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/utility/futil.h" diff --git a/src/gromacs/gmxlib/index.c b/src/gromacs/topology/index.cpp similarity index 97% rename from src/gromacs/gmxlib/index.c rename to src/gromacs/topology/index.cpp index 3adb8aca29..60bbef46d1 100644 --- a/src/gromacs/gmxlib/index.c +++ b/src/gromacs/topology/index.cpp @@ -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 "gromacs/topology/index.h" + #ifdef HAVE_CONFIG_H #include #endif @@ -43,16 +45,17 @@ #include #include -#include "macros.h" -#include "names.h" -#include "typedefs.h" -#include "macros.h" -#include "index.h" -#include "txtdump.h" +#include + +#include "gromacs/legacyheaders/macros.h" +#include "gromacs/legacyheaders/txtdump.h" #include "gromacs/fileio/gmxfio.h" #include "gromacs/fileio/strdb.h" +#include "gromacs/topology/atoms.h" +#include "gromacs/topology/block.h" #include "gromacs/topology/invblock.h" +#include "gromacs/utility/common.h" #include "gromacs/utility/cstringutil.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/utility/futil.h" @@ -182,8 +185,6 @@ static void p_status(const char **restype, int nres, const char **typenames, int ntypes) { int i, j; - int found; - int * counter; snew(counter, ntypes); @@ -193,7 +194,6 @@ p_status(const char **restype, int nres, const char **typenames, int ntypes) } for (i = 0; i < nres; i++) { - found = 0; for (j = 0; j < ntypes; j++) { if (!gmx_strcasecmp(restype[i], typenames[j])) @@ -215,7 +215,7 @@ p_status(const char **restype, int nres, const char **typenames, int ntypes) } -atom_id * +static atom_id * mk_aid(t_atoms *atoms, const char ** restype, const char * typestring, int *nra, gmx_bool bMatch) /* Make an array of atom_ids for all atoms with residuetypes matching typestring, or the opposite if bMatch is false */ { @@ -371,7 +371,7 @@ typedef struct gmx_help_make_index_group /** The set of atom names that will be used to form this index group */ const char **defining_atomnames; /** Size of the defining_atomnames array */ - const int num_defining_atomnames; + int num_defining_atomnames; /** Name of this index group */ const char *group_name; /** Whether the above atom names name the atoms in the group, or @@ -422,7 +422,7 @@ static void analyse_prot(const char ** restype, t_atoms *atoms, int n, j; atom_id *aid; - int nra, nnpres, npres; + int nra, npres; gmx_bool match; char ndx_name[STRLEN], *atnm; int i; @@ -580,7 +580,6 @@ static void analyse_prot(const char ** restype, t_atoms *atoms, if (nra > 0) { add_grp(gb, gn, nra, aid, "SwapSC-CO"); - nra = 0; } } } @@ -612,7 +611,6 @@ gmx_residuetype_get_type(gmx_residuetype_t rt, const char * resname, const char int gmx_residuetype_add(gmx_residuetype_t rt, const char *newresname, const char *newrestype) { - int i; int found; const char * p_oldtype; @@ -643,8 +641,6 @@ gmx_residuetype_init(gmx_residuetype_t *prt) FILE * db; char line[STRLEN]; char resname[STRLEN], restype[STRLEN], dum[STRLEN]; - char * p; - int i; struct gmx_residuetype *rt; snew(rt, 1); @@ -699,24 +695,21 @@ gmx_residuetype_get_alltypes(gmx_residuetype_t rt, const char *** p_typenames, int * ntypes) { - int i, j, n; - int found; + int i, n; const char ** my_typename; - char * p; - - n = 0; + n = 0; my_typename = NULL; for (i = 0; i < rt->n; i++) { - p = rt->restype[i]; - found = 0; - for (j = 0; j < n && !found; j++) + const char *const p = rt->restype[i]; + bool bFound = false; + for (int j = 0; j < n && !bFound; j++) { - found = !gmx_strcasecmp(p, my_typename[j]); + assert(my_typename != NULL); + bFound = !gmx_strcasecmp(p, my_typename[j]); } - - if (!found) + if (!bFound) { srenew(my_typename, n+1); my_typename[n] = p; @@ -835,9 +828,7 @@ void analyse(t_atoms *atoms, t_blocka *gb, char ***gn, gmx_bool bASK, gmx_bool b const char ** restype; int nra; int i, k; - size_t j; int ntypes; - char * p; const char ** p_typename; int iwater, iion; int nwater, nion; @@ -874,6 +865,7 @@ void analyse(t_atoms *atoms, t_blocka *gb, char ***gn, gmx_bool bASK, gmx_bool b found = 0; for (k = 0; k < ntypes && !found; k++) { + assert(p_typename != NULL); found = !strcmp(restype[i], p_typename[k]); } if (!found) @@ -1008,7 +1000,7 @@ t_blocka *init_index(const char *gfile, char ***grpname) FILE *in; t_blocka *b; int a, maxentries; - int i, j, ng, nread; + int i, j, ng; char line[STRLEN], *pt, str[STRLEN]; in = gmx_fio_fopen(gfile, "r"); @@ -1071,7 +1063,7 @@ t_blocka *init_index(const char *gfile, char ***grpname) snew(b->a, b->nra); for (i = 0; (i < b->nr); i++) { - nread = fscanf(in, "%s%d", str, &ng); + GMX_IGNORE_RETURN_VALUE(fscanf(in, "%s%d", str, &ng)); (*grpname)[i] = strdup(str); b->index[i+1] = b->index[i]+ng; if (b->index[i+1] > b->nra) @@ -1080,7 +1072,7 @@ t_blocka *init_index(const char *gfile, char ***grpname) } for (j = 0; (j < ng); j++) { - nread = fscanf(in, "%d", &a); + GMX_IGNORE_RETURN_VALUE(fscanf(in, "%d", &a)); b->a[b->index[i]+j] = a; } } @@ -1329,7 +1321,7 @@ t_cluster_ndx *cluster_index(FILE *fplog, const char *ndx) c->maxframe = -1; for (i = 0; (i < c->clust->nra); i++) { - c->maxframe = max(c->maxframe, c->clust->a[i]); + c->maxframe = std::max(c->maxframe, c->clust->a[i]); } fprintf(fplog ? fplog : stdout, "There are %d clusters containing %d structures, highest framenr is %d\n", diff --git a/src/gromacs/legacyheaders/index.h b/src/gromacs/topology/index.h similarity index 96% rename from src/gromacs/legacyheaders/index.h rename to src/gromacs/topology/index.h index 940dc0820b..91ec2ce8e1 100644 --- a/src/gromacs/legacyheaders/index.h +++ b/src/gromacs/topology/index.h @@ -34,13 +34,12 @@ * 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 _index_h -#define _index_h +#ifndef GMX_TOPOLOGY_INDEX_H +#define GMX_TOPOLOGY_INDEX_H #include -#include "types/simple.h" +#include "../legacyheaders/types/simple.h" #ifdef __cplusplus extern "C" { @@ -96,13 +95,7 @@ typedef struct { t_cluster_ndx *cluster_index(FILE *fplog, const char *ndx); -typedef struct { - int n; - char **name; -} t_names; - -typedef struct gmx_residuetype * - gmx_residuetype_t; +typedef struct gmx_residuetype *gmx_residuetype_t; int gmx_residuetype_init(gmx_residuetype_t *rt); @@ -163,4 +156,4 @@ int find_group(char s[], int ngrps, char **grpname); } #endif -#endif /* _index_h */ +#endif diff --git a/src/programs/mdrun/md.cpp b/src/programs/mdrun/md.cpp index e320584225..f461964003 100644 --- a/src/programs/mdrun/md.cpp +++ b/src/programs/mdrun/md.cpp @@ -46,7 +46,6 @@ #include "mdebin.h" #include "nrnb.h" #include "calcmu.h" -#include "index.h" #include "vsite.h" #include "update.h" #include "ns.h" diff --git a/src/programs/mdrun/membed.c b/src/programs/mdrun/membed.c index 04ebc2a94d..0bd722ab1f 100644 --- a/src/programs/mdrun/membed.c +++ b/src/programs/mdrun/membed.c @@ -45,7 +45,7 @@ #include "macros.h" #include "gromacs/utility/futil.h" #include "gromacs/essentialdynamics/edsam.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "names.h" #include "gromacs/topology/mtop_util.h" #include "gromacs/fileio/tpxio.h" diff --git a/src/programs/view/filter.cpp b/src/programs/view/filter.cpp index 8534a3a765..a888854618 100644 --- a/src/programs/view/filter.cpp +++ b/src/programs/view/filter.cpp @@ -45,10 +45,9 @@ #include "gromacs/utility/futil.h" #include "gromacs/utility/smalloc.h" #include "macros.h" -#include "index.h" +#include "gromacs/topology/index.h" #include "xdlghi.h" #include "dialogs.h" -#include "index.h" #include "gromacs/utility/fatalerror.h" t_filter *init_filter(t_atoms *atoms, const char *fn, int natom_trx) diff --git a/tests/CppCheck.cmake b/tests/CppCheck.cmake index cedcc1dfe6..8ca224cb9d 100644 --- a/tests/CppCheck.cmake +++ b/tests/CppCheck.cmake @@ -98,6 +98,7 @@ if (CPPCHECK_EXECUTABLE AND UNIX) --suppress=unnecessaryForwardDeclaration --suppress=invalidscanf:src/gromacs/fileio/matio.cpp --suppress=invalidscanf:src/gromacs/fileio/xvgr.cpp + --suppress=invalidscanf:src/gromacs/topology/index.cpp --suppress=invalidscanf:src/gromacs/gmxpreprocess/pdb2top.cpp) # This list will hold the list of all files with cppcheck errors