Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / gmxana / gmx_dyecoupl.c
index cce60f90cdd61e5d891042f5c6d53b91c97c54d3..57f2e47dca8b9ede552df98a1397cd453f999249 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
  * To help us fund GROMACS development, we humbly ask that you cite
  * the research papers on the package. Check out http://www.gromacs.org.
  */
-#include "copyrite.h"
-#include "gromacs/fileio/filenm.h"
-#include "macros.h"
-#include "pbc.h"
-#include "smalloc.h"
+#include "gmxpre.h"
+
 #include "gromacs/commandline/pargs.h"
-#include "vec.h"
-#include "xvgr.h"
+#include "gromacs/fileio/filenm.h"
+#include "gromacs/fileio/trx.h"
 #include "gromacs/fileio/trxio.h"
-
+#include "gromacs/fileio/xvgr.h"
+#include "gromacs/legacyheaders/copyrite.h"
+#include "gromacs/legacyheaders/macros.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/pbcutil/pbc.h"
+#include "gromacs/topology/index.h"
+#include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/smalloc.h"
 
 int gmx_dyecoupl(int argc, char *argv[])
 {
@@ -97,7 +101,6 @@ int gmx_dyecoupl(int argc, char *argv[])
     int          ndon, nacc;
     atom_id     *donindex, *accindex;
     char        *grpnm;
-    t_atoms     *atoms = NULL;
     t_trxstatus *status;
     t_trxframe   fr;
 
@@ -125,7 +128,8 @@ int gmx_dyecoupl(int argc, char *argv[])
                 rrange, krange, rincr, kincr, Rfrac;
     int         rkcount = 0, rblocksallocated = 0, kblocksallocated = 0;
 
-    if (!parse_common_args(&argc, argv, PCA_CAN_BEGIN | PCA_CAN_END | PCA_CAN_VIEW | PCA_TIME_UNIT | PCA_BE_NICE, NFILE, fnm, NPA, pa, asize(desc), desc, 0, NULL, &oenv))
+    if (!parse_common_args(&argc, argv, PCA_CAN_BEGIN | PCA_CAN_END | PCA_CAN_VIEW | PCA_TIME_UNIT,
+                           NFILE, fnm, NPA, pa, asize(desc), desc, 0, NULL, &oenv))
     {
         return 0;
     }
@@ -161,10 +165,10 @@ int gmx_dyecoupl(int argc, char *argv[])
     }
 
     printf("Select group with donor atom pairs defining the transition moment\n");
-    get_index(atoms, ftp2fn_null(efNDX, NFILE, fnm), 1, &ndon, &donindex, &grpnm);
+    get_index(NULL, ftp2fn_null(efNDX, NFILE, fnm), 1, &ndon, &donindex, &grpnm);
 
     printf("Select group with acceptor atom pairs defining the transition moment\n");
-    get_index(atoms, ftp2fn_null(efNDX, NFILE, fnm), 1, &nacc, &accindex, &grpnm);
+    get_index(NULL, ftp2fn_null(efNDX, NFILE, fnm), 1, &nacc, &accindex, &grpnm);
 
     /*check if groups are identical*/
     grident = TRUE;
@@ -354,17 +358,17 @@ int gmx_dyecoupl(int argc, char *argv[])
 
             if (bRKout)
             {
-                ffclose(rkfp);
+                gmx_ffclose(rkfp);
             }
 
             if (bDatout)
             {
-                ffclose(datfp);
+                gmx_ffclose(datfp);
             }
 
             if (bInstEffout)
             {
-                ffclose(iefp);
+                gmx_ffclose(iefp);
             }
 
 
@@ -415,7 +419,7 @@ int gmx_dyecoupl(int argc, char *argv[])
                     fprintf(rhfp, "%12.7f %12.7f\n", (i + 0.5) * rincr + rmin,
                             rhist[i]);
                 }
-                ffclose(rhfp);
+                gmx_ffclose(rhfp);
             }
 
             if (bKhistout)
@@ -452,7 +456,7 @@ int gmx_dyecoupl(int argc, char *argv[])
                     fprintf(khfp, "%12.7f %12.7f\n", (i + 0.5) * kincr + kmin,
                             khist[i]);
                 }
-                ffclose(khfp);
+                gmx_ffclose(khfp);
             }
 
             printf("\nAverages:\n");