*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015, 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 "macros.h"
-#include "gromacs/utility/smalloc.h"
-#include "typedefs.h"
-#include "names.h"
#include "gromacs/commandline/pargs.h"
-#include "gromacs/fileio/tpxio.h"
-#include "gromacs/fileio/trxio.h"
-#include "gromacs/fileio/strdb.h"
-#include "vec.h"
-#include "macros.h"
-#include "index.h"
-#include "pbc.h"
-#include "xvgr.h"
-#include "gromacs/fileio/futil.h"
+#include "gromacs/fileio/confio.h"
#include "gromacs/fileio/matio.h"
-#include "gmx_ana.h"
+#include "gromacs/fileio/strdb.h"
+#include "gromacs/fileio/trxio.h"
+#include "gromacs/fileio/xvgr.h"
+#include "gromacs/gmxana/gmx_ana.h"
+#include "gromacs/legacyheaders/macros.h"
+#include "gromacs/legacyheaders/names.h"
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/legacyheaders/viewit.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/pbcutil/pbc.h"
+#include "gromacs/topology/index.h"
+#include "gromacs/utility/cstringutil.h"
+#include "gromacs/utility/futil.h"
+#include "gromacs/utility/smalloc.h"
static void calc_dist(int nind, atom_id index[], rvec x[], int ePBC, matrix box,
{
lp += n;
snew(equiv[neq], 1);
- equiv[neq][0].nname = strdup(atomname);
+ equiv[neq][0].nname = gmx_strdup(atomname);
while (sscanf(lp, "%d %s %s %n", &resnr, resname, atomname, &n) == 3)
{
/* this is not efficient, but I'm lazy (again) */
srenew(equiv[neq], na+1);
equiv[neq][na].rnr = resnr-1;
- equiv[neq][na].rname = strdup(resname);
- equiv[neq][na].aname = strdup(atomname);
+ equiv[neq][na].rname = gmx_strdup(resname);
+ equiv[neq][na].aname = gmx_strdup(atomname);
if (na > 0)
{
equiv[neq][na].nname = NULL;
}
if (bFound)
{
- *nname = strdup(equiv[i-1][0].nname);
+ *nname = gmx_strdup(equiv[i-1][0].nname);
}
return bFound;
rnrj, *atoms->resinfo[rnrj].name, *atoms->atomname[index[j]]);
if (nnm[i] && bEquiv)
{
- nnm[j] = strdup(nnm[i]);
+ nnm[j] = gmx_strdup(nnm[i]);
}
if (bEquiv)
{
noe_gr[gi].anr = index[i];
if (nnm[i])
{
- noe_gr[gi].aname = strdup(nnm[i]);
+ noe_gr[gi].aname = gmx_strdup(nnm[i]);
}
else
{
- noe_gr[gi].aname = strdup(*atoms->atomname[index[i]]);
+ noe_gr[gi].aname = gmx_strdup(*atoms->atomname[index[i]]);
if (noe_index[i] == noe_index[i+1])
{
noe_gr[gi].aname[strlen(noe_gr[gi].aname)-1] = '*';
}
}
noe_gr[gi].rnr = atoms->atom[index[i]].resind;
- noe_gr[gi].rname = strdup(*atoms->resinfo[noe_gr[gi].rnr].name);
+ noe_gr[gi].rname = gmx_strdup(*atoms->resinfo[noe_gr[gi].rnr].name);
/* dump group definitions */
if (debug)
{
"of atom pairs with 1/r^3 and 1/r^6 averaged distance below the",
"maximum distance ([TT]-max[tt], which will default to 0.6 in this case)",
"can be generated, by default averaging over equivalent hydrogens",
- "(all triplets of hydrogens named *[123]). Additionally a list of",
+ "(all triplets of hydrogens named \\*[123]). Additionally a list of",
"equivalent atoms can be supplied ([TT]-equiv[tt]), each line containing",
"a set of equivalent atoms specified as residue number and name and",
"atom name; e.g.:[PAR]",
};
#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, 0, NULL, &oenv))
{
return 0;
while (read_next_x(oenv, status, &t, x, box));
fprintf(stderr, "\n");
- gmx_ffclose(fp);
+ xvgrclose(fp);
close_trj(status);
- calc_rms(isize, teller, dtot, dtot2, mean, &meanmax, rms, &rmsmax, rmsc, &rmscmax);
+ calc_rms(isize, teller, dtot, dtot2, rms, &rmsmax, rmsc, &rmscmax, mean, &meanmax);
fprintf(stderr, "rmsmax = %g, rmscmax = %g\n", rmsmax, rmscmax);
if (bNMR)