Move index.* to topology/
authorTeemu Murtola <teemu.murtola@gmail.com>
Mon, 2 Jun 2014 18:36:21 +0000 (21:36 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Sat, 7 Jun 2014 06:58:30 +0000 (09:58 +0300)
- 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

96 files changed:
src/contrib/do_multiprot.c
src/contrib/do_shift.c
src/contrib/g_anavel.c
src/contrib/gmx_sdf.c
src/contrib/hexamer.c
src/gromacs/fileio/pdbio.c
src/gromacs/gmxana/dlist.c
src/gromacs/gmxana/expfit.c
src/gromacs/gmxana/gmx_anaeig.c
src/gromacs/gmxana/gmx_angle.c
src/gromacs/gmxana/gmx_bundle.c
src/gromacs/gmxana/gmx_chi.c
src/gromacs/gmxana/gmx_cluster.c
src/gromacs/gmxana/gmx_clustsize.c
src/gromacs/gmxana/gmx_confrms.c
src/gromacs/gmxana/gmx_covar.c
src/gromacs/gmxana/gmx_current.c
src/gromacs/gmxana/gmx_density.c
src/gromacs/gmxana/gmx_densmap.c
src/gromacs/gmxana/gmx_densorder.cpp
src/gromacs/gmxana/gmx_dipoles.cpp
src/gromacs/gmxana/gmx_disre.c
src/gromacs/gmxana/gmx_do_dssp.c
src/gromacs/gmxana/gmx_dos.c
src/gromacs/gmxana/gmx_dyecoupl.c
src/gromacs/gmxana/gmx_dyndom.c
src/gromacs/gmxana/gmx_editconf.c
src/gromacs/gmxana/gmx_filter.c
src/gromacs/gmxana/gmx_genion.c
src/gromacs/gmxana/gmx_genpr.c
src/gromacs/gmxana/gmx_gyrate.c
src/gromacs/gmxana/gmx_h2order.c
src/gromacs/gmxana/gmx_hbond.c
src/gromacs/gmxana/gmx_helix.c
src/gromacs/gmxana/gmx_helixorient.c
src/gromacs/gmxana/gmx_hydorder.c
src/gromacs/gmxana/gmx_make_edi.c
src/gromacs/gmxana/gmx_make_ndx.c
src/gromacs/gmxana/gmx_mdmat.c
src/gromacs/gmxana/gmx_mindist.c
src/gromacs/gmxana/gmx_morph.c
src/gromacs/gmxana/gmx_msd.c
src/gromacs/gmxana/gmx_nmeig.c
src/gromacs/gmxana/gmx_nmens.c
src/gromacs/gmxana/gmx_nmtraj.c
src/gromacs/gmxana/gmx_order.c
src/gromacs/gmxana/gmx_polystat.c
src/gromacs/gmxana/gmx_potential.c
src/gromacs/gmxana/gmx_principal.c
src/gromacs/gmxana/gmx_rama.c
src/gromacs/gmxana/gmx_rdf.c
src/gromacs/gmxana/gmx_rms.c
src/gromacs/gmxana/gmx_rmsdist.c
src/gromacs/gmxana/gmx_rmsf.c
src/gromacs/gmxana/gmx_rotacf.c
src/gromacs/gmxana/gmx_rotmat.c
src/gromacs/gmxana/gmx_sans.c
src/gromacs/gmxana/gmx_sorient.c
src/gromacs/gmxana/gmx_spatial.c
src/gromacs/gmxana/gmx_spol.c
src/gromacs/gmxana/gmx_tcaf.c
src/gromacs/gmxana/gmx_traj.c
src/gromacs/gmxana/gmx_trjcat.c
src/gromacs/gmxana/gmx_trjconv.c
src/gromacs/gmxana/gmx_trjorder.c
src/gromacs/gmxana/gmx_vanhove.c
src/gromacs/gmxana/gmx_velacc.c
src/gromacs/gmxana/gmx_wheel.c
src/gromacs/gmxana/gstat.h
src/gromacs/gmxana/hxprops.c
src/gromacs/gmxana/nsfactor.h
src/gromacs/gmxana/sfactor.c
src/gromacs/gmxana/sfactor.h
src/gromacs/gmxpreprocess/gen_vsite.c
src/gromacs/gmxpreprocess/grompp.c
src/gromacs/gmxpreprocess/pdb2gmx.c
src/gromacs/gmxpreprocess/pdb2top.cpp
src/gromacs/gmxpreprocess/protonate.c
src/gromacs/gmxpreprocess/readir.c
src/gromacs/gmxpreprocess/readpull.c
src/gromacs/gmxpreprocess/vsite_parm.c
src/gromacs/gmxpreprocess/xlate.c
src/gromacs/gmxpreprocess/xlate.h
src/gromacs/pulling/pull.c
src/gromacs/pulling/pullutil.c
src/gromacs/selection/indexutil.cpp
src/gromacs/tools/check.c
src/gromacs/tools/convert_tpr.c
src/gromacs/topology/CMakeLists.txt
src/gromacs/topology/atomprop.cpp
src/gromacs/topology/index.cpp [moved from src/gromacs/gmxlib/index.c with 97% similarity]
src/gromacs/topology/index.h [moved from src/gromacs/legacyheaders/index.h with 96% similarity]
src/programs/mdrun/md.cpp
src/programs/mdrun/membed.c
src/programs/view/filter.cpp
tests/CppCheck.cmake

index f5647c5aadfb01167663461ff0bf1b88f9a74a0c..d7943a265957f0b58f6fe593240bb6f6055545ee 100644 (file)
@@ -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"
index c66a810c9d8e9b924e49d2d63311122839ea1f7a..fd20a5ada9c29ecd67821986cc96676e6d8eb13f 100644 (file)
@@ -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)
index 6cb062fe49d5f7a18b08cf70f5f3a38509bd0d82..96da5c85bb9f0e0437ac0afa585377eca967c6cb 100644 (file)
@@ -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[])
index 39cb0f554514a60ec600b3b12204e3394fba4761..9e003626bd754cc94a8ef0b6d6c2c7b39f18719e 100644 (file)
@@ -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"
index 22117c73a93836fd0d78fa4e011c004d64149124..bd477eb91b52e89ae0e954da4e6acd82facfa5ab 100644 (file)
@@ -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"
index a4c1487d683282c0a829d33fcb70756bda773d0a..ecbfa7c75b6fc86b9ec04710d4cd79c5564d90b9 100644 (file)
@@ -45,7 +45,6 @@
 #include <string.h>
 
 #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"
index 3f86100cbe6562910a6498c5568b77d4e6ba0419..f44fe45ec853063ec2dbce74529ac76b82b72a1d 100644 (file)
@@ -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,
index ee125c8b8e3f95aa6faf2aded1ab51b113b83de1..d0731c210a524b0e1a910adae2c1960f0f4f0d10 100644 (file)
@@ -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"
 
index e0b4d1efe77ae268943e9e90e667579a6c089689..2c46a8f7efdc94c88c144b7dba5ec26d7148bc9d 100644 (file)
@@ -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"
index 2795b3d2f7b792ebfe344add7a8a2caf7c951df8..b5c3d7e1a3d7d5c10f46643ec08a1d8e536edc1a 100644 (file)
@@ -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"
index 7947559761a6a0ed114dfdfc758412eb4f1ab77b..c0ffc08d9a9ec4f70c474d4052b89a8d867fe117 100644 (file)
@@ -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"
index 5cb3c68f89ebaaec63cc531a10876267ae191c36..89882e96e9fd24593b44b7d5de522d1a2dc5c3bc 100644 (file)
@@ -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"
index 3d49a95dea8315bafd24889cb49b6d68ae2ba8f2..765105707b0ff118809a1227c7447aeb7a476a79 100644 (file)
@@ -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"
index b3f770b86ca31f3c0ebe3209c9f3d0230e58587a..0ebf0826eaa39a85e607c797b871d3a67f7c1b68 100644 (file)
@@ -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"
index 1ffdeee686c3d04e09b09bc526cb7b510b8e5520..da05a0157d516cfcb15277a727cf55444b9e9a81 100644 (file)
@@ -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"
index bc77018c309458cab2b539e8e688c5787e0644f1..5b8c50f6c74510cdee44ce3adeb6124baa664c1d 100644 (file)
@@ -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"
index 39b9b1b706bc1092c5b6f1e33110c9927b07e28d..5167a590c239bcee5e39d50cfc38f2d0bd641032 100644 (file)
@@ -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"
index 768d0f90825ab743e1fcbd254951a550929273e3..1cbd6e8ce7f433cba47bd358991fd877738b0b5a 100644 (file)
@@ -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"
index e3205c6ce925b4240b1b30c1be6528ad4b648cbf..c17f5400105a8fd4325499971abeb8e2978beda0 100644 (file)
@@ -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"
index 67acd98ed27b661a6046a72852a29aaaafa5a462..020c7469472cb18d58b9d6403421580c5f86f17e 100644 (file)
@@ -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"
index 9e740d6c3b998c5182348f0b669764c49818dc37..2a0ef2cc0757672aac3238b1dff9dd453ca536d9 100644 (file)
@@ -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"
index 1efdfb4170132a5591c837e6c6fdff9c69a2fef3..046c51cf121df3163c2ab011e9e6433237c019a8 100644 (file)
@@ -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"
index 7b0cd1421394b8fdd9f607f9cac73d2cb8ae9512..346bfa03e6cdcb832a6e02140b18b35e03b457f2 100644 (file)
@@ -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"
index 104e42260db6039f4affae23361687ecb1c9d111..c695cbe1fb9e042ae66852c8f4d04e62cc347602 100644 (file)
@@ -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"
index cc492abd05d1263dc2053b3f5ac3a825db307b9c..55db291afa4c0681e44d8f712158d9e40e065e8e 100644 (file)
@@ -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"
 
index 9106fa66f4ecdb31709bfa04130faf997e35938f..27a157d521203cdfa6e9e125d922077a16083b2c 100644 (file)
@@ -38,7 +38,7 @@
 #include <config.h>
 #endif
 
-#include "index.h"
+#include "gromacs/topology/index.h"
 #include "gromacs/fileio/confio.h"
 #include "gromacs/math/units.h"
 #include "gmx_ana.h"
index 3bf14dbf76ee24a1bdd494bbd84b1657dc5205fb..1c1d18c702266071ad63bb54904eeb84775e9162 100644 (file)
@@ -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"
index 51b2fad0d174bc1c236f3f60a8d5b01fad320c52..e51ceff0616594e74f1249f6b64d22b17da9e3c6 100644 (file)
@@ -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"
index 909e855554da4f569b58c1643c15cc0e62e7916b..7699f36f8dc407765fe905de618920452d8771a3 100644 (file)
@@ -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,
index 71d2a2077206d0ee21caba70803a4b50d821956e..4d2891cc13a7aaebb1ccd8f8b6f332a42955798b 100644 (file)
@@ -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"
index 6ca8bbff713c3665a2b341cf4c3a9846c6582a53..0ffb34ead55672e657bfb7970dde8088d296b422 100644 (file)
@@ -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"
index 7c23c3d9db3b464ce1e3d76634ed36b834dd6ee8..7a47f5c412a4a3833fad7d5040dd7ea7725dabc0 100644 (file)
@@ -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"
 
index 79a46cb57b9b5eec7bf1b7c3d383dfa2fc2313fb..5c28edf3d9c7a2d1d46d30bb3b294608e2e35eaa 100644 (file)
@@ -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"
index aa7fd92db96a0784dcbf1c28a421b1615262f1b0..21630d3526571c6da930f960e2548051ed774f56 100644 (file)
@@ -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"
index 503c2e7016d837bddc7f41c7dc179c1879d2f5e0..6481cd3ed09a71f99d2c068c64a213be7e70961c 100644 (file)
@@ -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"
 
index 165f388513109177a2f5ac93efd762efaf9938d5..d57a40d998213eb934159d454fea903d39f9da29 100644 (file)
@@ -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"
index d376119b95acb7cd8cd9c98bdfd4dd0122efddfa..7340e853cba14436c2144e39b56ab3bf4f3579cb 100644 (file)
@@ -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
index 9e3d47739dc2b70e797d30b75f12450aff937ec1..3e48c99a264628710de5ffb8ea09286ef045fbaa 100644 (file)
@@ -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"
index 1d0473fdcce40a1708effd84e5adf7f6978900fb..46ea9a0a7abe0aed39a2c68c43de3fa41c4e4d76 100644 (file)
@@ -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"
index 787a6b0d0948b042f1ada8a49bad14858438d866..c13e907598c98bf30bd0796a7bf1a2b901ae70fd 100644 (file)
@@ -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"
index dadb1590f966fd48fe08db1468ef713c6595a256..e36ebeab79594a18a527e0d047c973848075540e 100644 (file)
@@ -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"
 
index bfdbac55aee016782e8797f4b929365b94a61184..0692168a8b4fa6a2187e03aa7b72f6c8d1d212f3 100644 (file)
@@ -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"
index 5497dfd0985bf0478332cf84830c7dc637ca1532..7e2b5f8bde6e59e6407abc344cf4bb1ce86f3440 100644 (file)
@@ -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"
index 4ddf1300ca0ef69c802fa00ecec7dc67b1526157..f496b4d4d0d61603488240e36c0462acc3f46117 100644 (file)
@@ -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"
index b5edf8b564af9219d0dc9890761d08f30416c149..4275f9cc873f90f3a466e29b859cc729a886e167 100644 (file)
@@ -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"
index 91f90383ae486bdf4d37c0ad39e50b65f0ddb9c0..b316179423b032f89b02691039faec29bbc4945e 100644 (file)
@@ -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"
index 44fe45d299768a0b20ab1dd364781aa7190c3cfd..7d6cacd7aede7f285a943534165f871685af13b9 100644 (file)
@@ -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"
index 163522eacddac72e8a928dae4f0ef2addd0a72fa..4957f6eab48223b598a634ae4c1a3d28ab0313c4 100644 (file)
@@ -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"
index a46e1826a216e2bab7992bfaff74b8a9bc833155..72db5d6ba57262164977fc3bb4e252b85f49aa07 100644 (file)
@@ -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"
index 6cfe0c49977d86316837bbb827c9def11ffc74d1..ab57c674cc4b4d5b3857057d4b460ebb3e887fcc 100644 (file)
@@ -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"
 
index 58c755afa133ffc28b9afc7ff29e64d9bb4d5e76..94f39ab1e0e3a0a1624d13509c81d5ff2147e986 100644 (file)
@@ -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"
index ca69a60ab54ca715e43b8dfd083d530215c9824e..9776ea4af52cba557fd44923083b6bd688add3fb 100644 (file)
@@ -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"
index 4c85111ffb09ba306dcbad674bdf7f437646edbf..4c190b3bfc92afaed662531291845141c7427136 100644 (file)
@@ -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"
index 45e24b622c8244659bca2c98f46ca7214c101e1a..d882951db3843c9a24335b00055455a396b44922 100644 (file)
@@ -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"
index 17c92c2c4cd00fdd542220678b868b7a94439fb0..17af340ff78426db81d586b6de23086258f04146 100644 (file)
@@ -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"
index c1844bd62f36aaf4f3e7633a45ebe525dc3c56e9..4fcbb79f2e2a08dcde996dc0e3a43b45cc7fa60e 100644 (file)
@@ -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"
index 75730a68f8aa216300774c3ffbb9a4ddc0ad09e0..a41a8dd18abf1c944a8342a8cf48b3e7a894a109 100644 (file)
@@ -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"
index 1e1f75cd8a52c4a4da669b86fb8d3551f4b119cf..8f94c4175a4eaf6d2db6332bfa6fd27700faaed0 100644 (file)
@@ -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"
index 9293e30f6cbb9b5a50d3e5efbdae3761f5193617..640541c090ecc520db5599516a79ed0a1c208da6 100644 (file)
@@ -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"
index afc8560e8e71e1d2f64b000792798154a088ba9b..e526dc10627c8d8f9ef67fac2a6b886f6651d02c 100644 (file)
@@ -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"
index 2a000147f40aa4a37399f652ee3e8b92aab1291e..8435a86280b0a5272ed68afc4b92e49c47895d5a 100644 (file)
@@ -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"
index 3f4a2e0e4decd9fc9db99c2f540d6a65bac23c2e..b0182605931669faf01b0af86fc533db9c5607d2 100644 (file)
@@ -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"
index ce279a078f622dc86c7d02f0185252aca756883d..fee1ce8020c1e910d099f05b0e6eee0dc78a32aa 100644 (file)
@@ -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"
index 62726f169ba85cfa92a9639636435577b0fd046d..2c52f8e85efcb906681d831f5dd1087bca73d6f6 100644 (file)
@@ -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"
index 9f17214b9695395707261a7fcf15748159b5781f..a9c2622785bf3344763b587cff905d0a9fd0e9e2 100644 (file)
@@ -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"
index 640d786db9000a5dbbf731f11a837e29bf90b4de..8d773d91099e59ea2800426d2566e10da651e98c 100644 (file)
@@ -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"
index 1a86e56b282c91dc37a0ea815b5e324d4dc2a905..4103fc84f64a48847510ff39f35e8c30822ef3e5 100644 (file)
@@ -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"
index 25768eff358eebd594a3d6a279ec3e4562487afb..146756b7cd543940e603fdfc6ab781bb72b08857 100644 (file)
@@ -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"
index 959a86d937d65930dabee641731c9262ca040d5d..8c9895a8557b20c5aafdc09e45ae9ecdbfbf796e 100644 (file)
@@ -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" {
index 5a999cec6655af0c7cac25bfd6a7590f65be86dc..776b26ff440834bab5d6a69690cc249ea50674eb 100644 (file)
@@ -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"
index ebe6b808745dafe5cfc91273b72fea6382baaa32..c833a5521de8467d88d903b7d09d374d3e85c1c5 100644 (file)
@@ -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"
 
index fdc251882d5a175d1fce325a1d223cc0972d3048..e6e5a35b342633101408c29bcb5a4fbc4c2c214a 100644 (file)
@@ -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"
index 6eae7881167c3c42a25b9d14a904634554044fca..d9099a8bd3fd934cee350ad5d16a460c62e6d74f 100644 (file)
@@ -37,7 +37,6 @@
 #ifndef _sfactor_h
 #define _sfactor_h
 
-#include "index.h"
 #include "types/simple.h"
 #include "../math/gmxcomplex.h"
 #include "oenv.h"
index f0a69ab6ff78f99582d3de818eff44b0da8a2f8b..3dfbaa48bd50c9c48711f4fe77251ea960461b68 100644 (file)
@@ -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"
index 1cfeba8e7b2f82e448b3fed82f0d519dc01fd4c3..2eef5b7b63baf691e67e63330d927c7fda4ff653 100644 (file)
@@ -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"
index db0a5412560a6aec35b301cc68bc734de6b3f5a2..883d5b79c32f015c1fc11bba09a8de6cb54bc6d7 100644 (file)
@@ -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"
index f660c51f1f8b218b7b67a254855d13a33872210a..a71f273c870a3f19fb3d05debd29940caf499fd5 100644 (file)
@@ -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"
index 7f2970bb28f161174b04f3a75f9c104abf3ab0dd..5f10cc499d4050d38a135225d28eaddda7cb7a41 100644 (file)
@@ -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"
 
index 3d560b9330f5e02c7cedfe6bb9532652fc915ae2..b8e9e6d9b8bb623b11a16a5a12be482f2c834c3c 100644 (file)
 #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"
index da3dedec0306861eae1f6fd1c8a688d50854918d..0e9706a7aea58d90b1f12e3b280bfe377b2b3ee2 100644 (file)
@@ -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"
index 773266ae92c27676385bac16a503490cfe0d0acb..6b8daa9919fc53ee5887813510caa1e5aa5c931b 100644 (file)
@@ -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"
index f98cc2a09b0cc8b98a966045b247a23317614bc8..faf148c120bdacb9f762657e8053ef6ed8173484 100644 (file)
@@ -42,7 +42,7 @@
 #include <string.h>
 
 #include "typedefs.h"
-#include "index.h"
+#include "gromacs/topology/index.h"
 #include "fflibutil.h"
 #include "hackblock.h"
 #include "xlate.h"
index 892569fb6c4487eb388ba71da6a3c1e4ce1f0aa5..83d667b0b3402c4ca56455047e4d01ffece6ca07 100644 (file)
@@ -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" {
index 265749eeee20aab14b3bcee408136f9898d319fd..77a773c9e49cb252334b95c97a98a613aa36b71f 100644 (file)
@@ -44,7 +44,6 @@
 #include <string.h>
 
 #include "gromacs/utility/futil.h"
-#include "index.h"
 #include "typedefs.h"
 #include "types/commrec.h"
 #include "network.h"
index 6cd0cef2ff3d4608f34aa397a1d1555cfd8ae320..1b13d4eabc6dce991d08e7acaca37a95c2946644 100644 (file)
@@ -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"
index b2f5b053bff5b2a63f0e428e1329b5701df88556..f921caeaac856565f63e953a9df31505d35d9589 100644 (file)
@@ -47,9 +47,8 @@
 #include <string>
 #include <vector>
 
-#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"
index 47c703efa5aef4909c3f4aab19b83ff68d555891..ce319bff893fe140aed204f164a9a222e455b823 100644 (file)
@@ -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"
index 16becfb6c381144253113f9ad16ebcbd4c72b5e1..21204a11b76ff930332601628557c1bb567838fb 100644 (file)
@@ -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"
index fb900cfca091208dc068006c50d3cf4cfd5a65e5..ffc2379e839c32e2177ce1bbd747868e8e8457cf 100644 (file)
@@ -40,6 +40,7 @@ set(TOPOLOGY_PUBLIC_HEADERS
     atoms.h
     block.h
     idef.h
+    index.h
     mtop_util.h
     symtab.h
     topology.h)
index 519a5bb897a31e0fb03325db63ea60d5de839d6a..09cb30785b2251ae5d26bb2f1ecdc82e499cd652 100644 (file)
@@ -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"
similarity index 97%
rename from src/gromacs/gmxlib/index.c
rename to src/gromacs/topology/index.cpp
index 3adb8aca29e3e0c8351e8b28b206f3b608aa481d..60bbef46d1f531be7725cacce73700badbe66187 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 "gromacs/topology/index.h"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 #include <stdlib.h>
 #include <string.h>
 
-#include "macros.h"
-#include "names.h"
-#include "typedefs.h"
-#include "macros.h"
-#include "index.h"
-#include "txtdump.h"
+#include <algorithm>
+
+#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",
similarity index 96%
rename from src/gromacs/legacyheaders/index.h
rename to src/gromacs/topology/index.h
index 940dc0820b8c3b61ab7fa83847af1dc924e22c12..91ec2ce8e189299440714acbaf026f33ddbb1c30 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 _index_h
-#define _index_h
+#ifndef GMX_TOPOLOGY_INDEX_H
+#define GMX_TOPOLOGY_INDEX_H
 
 #include <stdio.h>
 
-#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
index e3205842252f15641343591e8809f092efdf12f7..f46196400351f2e01c8251bd330d85ccc28d443e 100644 (file)
@@ -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"
index 04ebc2a94d1b69c1b8c0266592c37fd9793ee495..0bd722ab1ffd04c72e902cc0bf82e2445859e384 100644 (file)
@@ -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"
index 8534a3a765f9d04ed6438728062ba324178c1cbc..a8888546185e75033231426d088679e4cf5a86e5 100644 (file)
 #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)
index cedcc1dfe6c7b650ef89e1f0b2260767409ed224..8ca224cb9d9250cd9627441b1e409d0c0456b68a 100644 (file)
@@ -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