*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2007, 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 "string2.h"
-#include "sysstuff.h"
-#include "typedefs.h"
-#include "macros.h"
-#include "vec.h"
-#include "pbc.h"
-#include "rmpbc.h"
+
#include "gromacs/commandline/pargs.h"
-#include "xvgr.h"
-#include "gromacs/fileio/futil.h"
+#include "gromacs/fileio/matio.h"
#include "gromacs/fileio/tpxio.h"
#include "gromacs/fileio/trxio.h"
-#include "index.h"
-#include "smalloc.h"
-#include "calcgrid.h"
-#include "nrnb.h"
-#include "physics.h"
-#include "coulomb.h"
-#include "pme.h"
-#include "gstat.h"
-#include "gromacs/fileio/matio.h"
-#include "mtop_util.h"
-#include "gmx_ana.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/nrnb.h"
+#include "gromacs/legacyheaders/pme.h"
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/math/units.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/pbcutil/pbc.h"
+#include "gromacs/topology/index.h"
+#include "gromacs/topology/mtop_util.h"
+#include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/futil.h"
+#include "gromacs/utility/smalloc.h"
static void clust_size(const char *ndx, const char *trx, const char *xpm,
const char *xpmw, const char *ncl, const char *acl,
read_tpxheader(tpr, &tpxh, TRUE, &version, &generation);
if (tpxh.natoms != natoms)
{
- gmx_fatal(FARGS, "tpr (%d atoms) and xtc (%d atoms) do not match!",
+ gmx_fatal(FARGS, "tpr (%d atoms) and trajectory (%d atoms) do not match!",
tpxh.natoms, natoms);
}
ePBC = read_tpx(tpr, NULL, NULL, &natoms, NULL, NULL, NULL, mtop);
{
index[i] = i;
}
- gname = strdup("mols");
+ gname = gmx_strdup("mols");
}
else
{
}
while (read_next_frame(oenv, status, &fr));
close_trx(status);
- ffclose(fp);
- ffclose(gp);
- ffclose(hp);
- ffclose(tp);
+ gmx_ffclose(fp);
+ gmx_ffclose(gp);
+ gmx_ffclose(hp);
+ gmx_ffclose(tp);
gmx_mtop_atomlookup_destroy(alook);
if (max_clust_ind >= 0)
{
- fp = ffopen(mcn, "w");
+ fp = gmx_ffopen(mcn, "w");
fprintf(fp, "[ max_clust ]\n");
for (i = 0; (i < nindex); i++)
{
}
}
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
/* Print the real distribution cluster-size/numer, averaged over the trajectory. */
nhisto += (int)((j+1)*nelem/n_x);
}
fprintf(fp, "%5d %8.3f\n", j+1, 0.0);
- ffclose(fp);
+ gmx_ffclose(fp);
fprintf(stderr, "Total number of atoms in clusters = %d\n", nhisto);
}
fprintf(stderr, "cmid: %g, cmax: %g, max_size: %d\n", cmid, cmax, max_size);
cmid = 1;
- fp = ffopen(xpm, "w");
+ fp = gmx_ffopen(xpm, "w");
write_xpm3(fp, 0, "Cluster size distribution", "# clusters", timebuf, "Size",
n_x, max_size, t_x, t_y, cs_dist, 0, cmid, cmax,
rlo, rmid, rhi, &nlevels);
- ffclose(fp);
+ gmx_ffclose(fp);
cmid = 100.0;
cmax = 0.0;
for (i = 0; (i < n_x); i++)
}
}
fprintf(stderr, "cmid: %g, cmax: %g, max_size: %d\n", cmid, cmax, max_size);
- fp = ffopen(xpmw, "w");
+ fp = gmx_ffopen(xpmw, "w");
write_xpm3(fp, 0, "Weighted cluster size distribution", "Fraction", timebuf,
"Size", n_x, max_size, t_x, t_y, cs_dist, 0, cmid, cmax,
rlo, rmid, rhi, &nlevels);
- ffclose(fp);
+ gmx_ffclose(fp);
sfree(clust_index);
sfree(clust_size);
#define NFILE asize(fnm)
if (!parse_common_args(&argc, argv,
- PCA_CAN_VIEW | PCA_CAN_TIME | PCA_TIME_UNIT | PCA_BE_NICE,
+ PCA_CAN_VIEW | PCA_CAN_TIME | PCA_TIME_UNIT,
NFILE, fnm, NPA, pa, asize(desc), desc, 0, NULL, &oenv))
{
return 0;