Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / gmxana / gmx_saltbr.c
index 7d4ca3338a21ccd59c7ca54ce67ed8ecc0ff142a..46fd1409e178e628c4414ecc238a010bec8d4790 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.
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
 #include <math.h>
 #include <string.h>
 
-#include "macros.h"
-#include "gromacs/math/vec.h"
-#include "typedefs.h"
+#include "gromacs/commandline/pargs.h"
 #include "gromacs/fileio/filenm.h"
 #include "gromacs/fileio/trxio.h"
-#include "gromacs/commandline/pargs.h"
-#include "gromacs/utility/futil.h"
-#include "gromacs/utility/fatalerror.h"
-#include "gromacs/utility/smalloc.h"
-#include "gromacs/pbcutil/pbc.h"
 #include "gromacs/fileio/xvgr.h"
-#include "gmx_ana.h"
-
+#include "gromacs/gmxana/gmx_ana.h"
+#include "gromacs/legacyheaders/macros.h"
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/pbcutil/pbc.h"
 #include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/futil.h"
+#include "gromacs/utility/smalloc.h"
 
 typedef struct {
     char *label;
@@ -88,7 +85,7 @@ static t_charge *mk_charge(t_atoms *atoms, t_block *cgs, int *nncg)
                     *(atoms->resinfo[resnr].name),
                     atoms->resinfo[resnr].nr,
                     anr+1);
-            cg[ncg].label = strdup(buf);
+            cg[ncg].label = gmx_strdup(buf);
             ncg++;
         }
     }
@@ -151,7 +148,7 @@ int gmx_saltbr(int argc, char *argv[])
     };
     t_filenm        fnm[] = {
         { efTRX, "-f",  NULL, ffREAD },
-        { efTPX, NULL,  NULL, ffREAD },
+        { efTPR, NULL,  NULL, ffREAD },
     };
 #define NFILE asize(fnm)
 
@@ -185,13 +182,13 @@ int gmx_saltbr(int argc, char *argv[])
     matrix             box;
     output_env_t       oenv;
 
-    if (!parse_common_args(&argc, argv, PCA_CAN_TIME | PCA_BE_NICE,
+    if (!parse_common_args(&argc, argv, PCA_CAN_TIME,
                            NFILE, fnm, asize(pa), pa, asize(desc), desc, 0, NULL, &oenv))
     {
         return 0;
     }
 
-    top = read_top(ftp2fn(efTPX, NFILE, fnm), &ePBC);
+    top = read_top(ftp2fn(efTPR, NFILE, fnm), &ePBC);
     cg  = mk_charge(&top->atoms, &(top->cgs), &ncg);
     snew(cgdist, ncg);
     snew(nWithin, ncg);