Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / gmxana / gmx_rdf.c
index b00b69bcf9c398e01ac1750929e44474e351ef22..47c4bc0c6fdb45e6165e0ec4884ac8738768c99e 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
 
 #include <math.h>
-#include <ctype.h>
-#include "string2.h"
-#include "sysstuff.h"
-#include "typedefs.h"
-#include "macros.h"
-#include "vec.h"
-#include "pbc.h"
-#include "xvgr.h"
-#include "gromacs/fileio/futil.h"
+
 #include "gromacs/commandline/pargs.h"
 #include "gromacs/fileio/tpxio.h"
 #include "gromacs/fileio/trxio.h"
-#include "physics.h"
-#include "index.h"
-#include "smalloc.h"
-#include "calcgrid.h"
-#include "nrnb.h"
-#include "coulomb.h"
-#include "gstat.h"
-#include "gromacs/fileio/matio.h"
-#include "gmx_ana.h"
-#include "names.h"
+#include "gromacs/fileio/xvgr.h"
+#include "gromacs/gmxana/gmx_ana.h"
+#include "gromacs/gmxana/gstat.h"
+#include "gromacs/legacyheaders/coulomb.h"
+#include "gromacs/legacyheaders/macros.h"
+#include "gromacs/legacyheaders/names.h"
+#include "gromacs/legacyheaders/nrnb.h"
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/legacyheaders/viewit.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/pbcutil/pbc.h"
+#include "gromacs/pbcutil/rmpbc.h"
+#include "gromacs/topology/index.h"
+#include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/futil.h"
+#include "gromacs/utility/smalloc.h"
 
 static void check_box_c(matrix box)
 {
@@ -191,11 +187,7 @@ static void do_rdf(const char *fnNDX, const char *fnTPS, const char *fnTRX,
     char         **grpname;
     int           *isize, isize_cm = 0, nrdf = 0, max_i, isize0, isize_g;
     atom_id      **index, *index_cm = NULL;
-#if (defined SIZEOF_LONG_LONG_INT) && (SIZEOF_LONG_LONG_INT >= 8)
-    long long int *sum;
-#else
-    double        *sum;
-#endif
+    gmx_int64_t   *sum;
     real           t, rmax2, cut2, r, r2, r2ii, invhbinw, normfac;
     real           segvol, spherevol, prev_spherevol, **rdf;
     rvec          *x, dx, *x0 = NULL, *x_i1, xi;
@@ -746,7 +738,7 @@ static void do_rdf(const char *fnNDX, const char *fnTPS, const char *fnTRX,
         }
         fprintf(fp, "\n");
     }
-    ffclose(fp);
+    gmx_ffclose(fp);
 
     do_view(oenv, fnRDF, NULL);
 
@@ -777,7 +769,7 @@ static void do_rdf(const char *fnNDX, const char *fnTPS, const char *fnTRX,
         {
             fprintf(fp, "%10g %10g\n", i*0.5, hq[i]);
         }
-        ffclose(fp);
+        gmx_ffclose(fp);
         do_view(oenv, fnHQ, NULL);
         sfree(hq);
         sfree(integrand);
@@ -816,7 +808,7 @@ static void do_rdf(const char *fnNDX, const char *fnTPS, const char *fnTRX,
             }
             fprintf(fp, "\n");
         }
-        ffclose(fp);
+        gmx_ffclose(fp);
         sfree(sum);
 
         do_view(oenv, fnCNRDF, NULL);
@@ -909,7 +901,7 @@ int gmx_rdf(int argc, char *argv[])
         { efXVG, "-hq", "hq",     ffOPTWR },
     };
 #define NFILE asize(fnm)
-    if (!parse_common_args(&argc, argv, PCA_CAN_VIEW | PCA_CAN_TIME | PCA_BE_NICE,
+    if (!parse_common_args(&argc, argv, PCA_CAN_VIEW | PCA_CAN_TIME,
                            NFILE, fnm, NPA, pa, asize(desc), desc, 0, NULL, &oenv))
     {
         return 0;