*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * 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.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
+
+#include <stdlib.h>
-#include "sysstuff.h"
-#include "typedefs.h"
-#include "string2.h"
-#include "strdb.h"
-#include "macros.h"
-#include "smalloc.h"
-#include "mshift.h"
#include "gromacs/commandline/pargs.h"
-#include "gromacs/fileio/pdbio.h"
-#include "gmx_fatal.h"
-#include "xvgr.h"
#include "gromacs/fileio/matio.h"
-#include "index.h"
-#include "gstat.h"
+#include "gromacs/fileio/pdbio.h"
+#include "gromacs/fileio/strdb.h"
#include "gromacs/fileio/tpxio.h"
#include "gromacs/fileio/trxio.h"
-#include "viewit.h"
-
+#include "gromacs/fileio/xvgr.h"
+#include "gromacs/gmxana/gstat.h"
+#include "gromacs/legacyheaders/macros.h"
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/legacyheaders/viewit.h"
+#include "gromacs/pbcutil/rmpbc.h"
+#include "gromacs/topology/index.h"
+#include "gromacs/utility/cstringutil.h"
+#include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/smalloc.h"
static int strip_dssp(char *dsspfile, int nres,
gmx_bool bPhobres[], real t,
real iaccf, iaccb;
t_xpmelmt c;
- tapeout = ffopen(dsspfile, "r");
+ tapeout = gmx_ffopen(dsspfile, "r");
/* Skip header */
do
{
fprintf(fTArea, "%10g %10g %10g\n", t, 0.01*iaccb, 0.01*iaccf);
}
- ffclose(tapeout);
+ gmx_ffclose(tapeout);
/* Return the number of lines found in the dssp file (i.e. number
* of redidues plus chain separator lines).
int i;
- OOO = strdup("O");
+ OOO = gmx_strdup("O");
for (i = 0; (i < atoms->nr); i++)
{
hi = max(hi, accr[i][j]);
}
}
- fp = ffopen(fn, "w");
+ fp = gmx_ffopen(fn, "w");
nlev = hi-lo+1;
write_xpm(fp, 0, "Solvent Accessible Surface", "Surface (A^2)",
"Time", "Residue Index", nframe, nres,
mat->axis_x, mat->axis_y, accr, lo, hi, rlo, rhi, &nlev);
- ffclose(fp);
+ gmx_ffclose(fp);
}
}
leg[0] = "Structure";
for (s = 0; s < (size_t)mat->nmap; s++)
{
- leg[s+1] = strdup(map[s].desc);
+ leg[s+1] = gmx_strdup(map[s].desc);
}
fp = xvgropen(outfile, "Secondary Structure",
}
fprintf(fp, "\n");
- ffclose(fp);
+ gmx_ffclose(fp);
sfree(leg);
sfree(count);
}
gmx_bool *bPhbres, bDoAccSurf;
real t;
int i, j, natoms, nframe = 0;
- matrix box;
+ matrix box = {{0}};
int gnx;
char *grpnm, *ss_str;
atom_id *index;
#define NFILE asize(fnm)
if (!parse_common_args(&argc, argv,
- PCA_CAN_TIME | PCA_CAN_VIEW | PCA_TIME_UNIT | PCA_BE_NICE,
+ PCA_CAN_TIME | PCA_CAN_VIEW | PCA_TIME_UNIT,
NFILE, fnm, asize(pa), pa, asize(desc), desc, 0, NULL, &oenv))
{
return 0;
}
mat.map = NULL;
- mat.nmap = getcmap(libopen(opt2fn("-map", NFILE, fnm)),
- opt2fn("-map", NFILE, fnm), &(mat.map));
+ mat.nmap = readcmap(opt2fn("-map", NFILE, fnm), &(mat.map));
natoms = read_first_x(oenv, &status, ftp2fn(efTRX, NFILE, fnm), &t, &x, box);
if (natoms > atoms->nr)
}
}
gmx_rmpbc(gpbc, natoms, box, x);
- tapein = ffopen(pdbfile, "w");
+ tapein = gmx_ffopen(pdbfile, "w");
write_pdbfile_indexed(tapein, NULL, atoms, x, ePBC, box, ' ', -1, gnx, index, NULL, TRUE);
- ffclose(tapein);
+ gmx_ffclose(tapein);
#ifdef GMX_NO_SYSTEM
printf("Warning-- No calls to system(3) supported on this platform.");
close_trj(status);
if (fTArea)
{
- ffclose(fTArea);
+ gmx_ffclose(fTArea);
}
gmx_rmpbc_done(gpbc);
ss = opt2FILE("-o", NFILE, fnm, "w");
mat.flags = 0;
write_xpm_m(ss, mat);
- ffclose(ss);
+ gmx_ffclose(ss);
if (opt2bSet("-ssdump", NFILE, fnm))
{
ss_str[i] = '\0';
fprintf(ss, "%s\n", ss_str);
}
- ffclose(ss);
+ gmx_ffclose(ss);
sfree(ss_str);
}
analyse_ss(fnSCount, &mat, ss_string, oenv);
{
fprintf(acc, "%5d %10g %10g\n", i+1, av_area[i], norm_av_area[i]);
}
- ffclose(acc);
+ gmx_ffclose(acc);
}
}