Remove .tpa, .tpb, .tpx, .trj files. Part of #1500.
[alexxy/gromacs.git] / src / gromacs / gmxana / gmx_potential.c
index 88fdfa31a1bb51fc1d45963ed539ce828688873e..ba223b01ccf4640dca81995783c3895e053576a2 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.
  * 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 <math.h>
 #include <ctype.h>
-
-#include "sysstuff.h"
+#include <math.h>
 #include <string.h>
-#include "typedefs.h"
-#include "smalloc.h"
-#include "macros.h"
+
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/utility/smalloc.h"
+#include "gromacs/legacyheaders/macros.h"
 #include "princ.h"
-#include "rmpbc.h"
-#include "vec.h"
-#include "xvgr.h"
-#include "pbc.h"
-#include "gromacs/fileio/futil.h"
+#include "gromacs/pbcutil/rmpbc.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/fileio/xvgr.h"
+#include "gromacs/legacyheaders/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 "string2.h"
+#include "gromacs/utility/cstringutil.h"
 #include "gromacs/fileio/trxio.h"
 
+#include "gromacs/utility/fatalerror.h"
+
 #define EPS0 8.85419E-12
 #define ELC 1.60219E-19
 
@@ -400,9 +399,9 @@ void plot_potential(double *potential[], double *charge[], double *field[],
         fprintf(fie, "\n");
     }
 
-    ffclose(pot);
-    ffclose(cha);
-    ffclose(fie);
+    gmx_ffclose(pot);
+    gmx_ffclose(cha);
+    gmx_ffclose(fie);
 }
 
 int gmx_potential(int argc, char *argv[])
@@ -460,7 +459,7 @@ int gmx_potential(int argc, char *argv[])
     t_filenm    fnm[] = {                      /* files for g_order       */
         { efTRX, "-f", NULL,  ffREAD },        /* trajectory file             */
         { efNDX, NULL, NULL,  ffREAD },        /* index file          */
-        { efTPX, NULL, NULL,  ffREAD },        /* topology file               */
+        { efTPR, NULL, NULL,  ffREAD },        /* topology file               */
         { efXVG, "-o", "potential", ffWRITE }, /* xvgr output file    */
         { efXVG, "-oc", "charge", ffWRITE },   /* xvgr output file    */
         { efXVG, "-of", "field", ffWRITE },    /* xvgr output file    */
@@ -468,7 +467,7 @@ int gmx_potential(int argc, char *argv[])
 
 #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, asize(pa), pa, asize(desc), desc, asize(bugs), bugs,
                            &oenv))
     {
@@ -478,7 +477,7 @@ int gmx_potential(int argc, char *argv[])
     /* Calculate axis */
     axis = toupper(axtitle[0]) - 'X';
 
-    top = read_top(ftp2fn(efTPX, NFILE, fnm), &ePBC); /* read topology file */
+    top = read_top(ftp2fn(efTPR, NFILE, fnm), &ePBC); /* read topology file */
 
     snew(grpname, ngrps);
     snew(index, ngrps);