Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / gmxana / gmx_anadock.c
index c3a91775b56f52659139605063e61eacf073d5dc..98675b56879fd89d976eff6c3b85c36b35add6f8 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2012, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
  * To help us fund GROMACS development, we humbly ask that you cite
  * the research papers on the package. Check out http://www.gromacs.org.
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
 
+#include <stdlib.h>
+#include <string.h>
+
+#include "gromacs/commandline/pargs.h"
 #include "gromacs/fileio/confio.h"
-#include "copyrite.h"
-#include "gromacs/fileio/futil.h"
-#include "gmx_fatal.h"
-#include "smalloc.h"
-#include "string2.h"
-#include "vec.h"
-#include "gmx_statistics.h"
-#include "statutil.h"
-#include "typedefs.h"
-#include "xvgr.h"
-#include "macros.h"
+#include "gromacs/fileio/xvgr.h"
+#include "gromacs/legacyheaders/copyrite.h"
+#include "gromacs/legacyheaders/macros.h"
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/statistics/statistics.h"
+#include "gromacs/utility/cstringutil.h"
+#include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/futil.h"
+#include "gromacs/utility/smalloc.h"
 
 static const char *etitles[] = { "E-docked", "Free Energy" };
 
@@ -75,7 +76,7 @@ static t_pdbfile *read_pdbf(const char *fn)
     init_t_atoms(&(pdbf->atoms), natoms, FALSE);
     snew(pdbf->x, natoms);
     read_stx_conf(fn, buf, &pdbf->atoms, pdbf->x, NULL, &pdbf->ePBC, pdbf->box);
-    fp = ffopen(fn, "r");
+    fp = gmx_ffopen(fn, "r");
     do
     {
         ptr = fgets2(buf, 255, fp);
@@ -96,7 +97,7 @@ static t_pdbfile *read_pdbf(const char *fn)
         }
     }
     while (ptr != NULL);
-    ffclose(fp);
+    gmx_ffclose(fp);
 
     return pdbf;
 }
@@ -195,7 +196,7 @@ static void analyse_em_all(int npdb, t_pdbfile *pdbf[], const char *edocked,
         {
             fprintf(fp, "%12lf\n", bFreeSort ? pdbf[i]->efree : pdbf[i]->edocked);
         }
-        ffclose(fp);
+        gmx_ffclose(fp);
     }
 }
 
@@ -342,12 +343,12 @@ static void cluster_em_all(FILE *fp, int npdb, t_pdbfile *pdbf[],
 int gmx_anadock(int argc, char *argv[])
 {
     const char     *desc[] = {
-        "[TT]g_anadock[tt] analyses the results of an Autodock run and clusters the",
+        "[THISMODULE] analyses the results of an Autodock run and clusters the",
         "structures together, based on distance or RMSD. The docked energy",
         "and free energy estimates are analysed, and for each cluster the",
         "energy statistics are printed.[PAR]",
         "An alternative approach to this is to cluster the structures first",
-        "using [TT]g_cluster[tt] and then sort the clusters on either lowest",
+        "using [gmx-cluster] and then sort the clusters on either lowest",
         "energy or average energy."
     };
     t_filenm        fnm[] = {
@@ -380,7 +381,7 @@ int gmx_anadock(int argc, char *argv[])
         return 0;
     }
 
-    fp = ffopen(opt2fn("-g", NFILE, fnm), "w");
+    fp = gmx_ffopen(opt2fn("-g", NFILE, fnm), "w");
     please_cite(stdout, "Hetenyi2002b");
     please_cite(fp, "Hetenyi2002b");
 
@@ -392,7 +393,7 @@ int gmx_anadock(int argc, char *argv[])
     cluster_em_all(fp, npdbf, pdbf, bFree, bRMS, cutoff);
 
     gmx_thanx(fp);
-    ffclose(fp);
+    gmx_ffclose(fp);
 
     return 0;
 }