*
* 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.
}
if (debug)
{
- gmx_ffclose(gp);
+ xvgrclose(gp);
}
if (nitem > 1)
{
}
if (fp)
{
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
sfree(fit);
}
*
* 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.
init_edsamstate(ed, EDstate);
/* The master opens the ED output file */
+ /* TODO This file is never closed... */
if (Flags & MD_APPENDFILES)
{
ed->edo = gmx_fio_fopen(opt2fn("-eo", nfile, fnm), "a+");
/*
* This file is part of the GROMACS molecular simulation package.
*
- * 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.
{
if (bAppendFiles)
{
- of->fp_dhdl = gmx_fio_fopen(opt2fn("-field", nfile, fnm),
- filemode);
+ of->fp_field = gmx_fio_fopen(opt2fn("-field", nfile, fnm),
+ filemode);
}
else
{
}
if (of->fp_field != NULL)
{
+ /* This is opened sometimes with xvgropen, sometimes with
+ * gmx_fio_fopen, so we use the least common denominator for closing.
+ */
gmx_fio_fclose(of->fp_field);
}
*
* 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.
{
fprintf(fp, "%10g %10g\n", time[k], data[k]);
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
static int calc_RBbin(real phi, int gmx_unused multiplicity, real gmx_unused core_frac)
{
fprintf(fp, "%10.3f %10d\n", time[j], tr_f[j]);
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
/* Compute histogram from # transitions per dihedral */
fprintf(fp, "%10.3f %10d\n", ttime/i, tr_f[i]);
}
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
sfree(tr_f);
}
}
fprintf(fp, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
/* and finally print out occupancies to a single file */
}
sfree(chi_prtrj);
- gmx_ffclose(fpall);
+ xvgrclose(fpall);
fprintf(stderr, "\n");
}
*
* 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.
{
fprintf(fp, "%10g %10d\n", i/fac, histo[i]);
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
sfree(histo);
}
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2012,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.
{
fprintf(fp, "%12lf\n", bFreeSort ? pdbf[i]->efree : pdbf[i]->edocked);
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
}
*
* 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.
fprintf(out, "%5d %5.3f\n", eignr2[x]+1, overlap/noutvec);
}
- gmx_ffclose(out);
+ xvgrclose(out);
}
static void project(const char *trajfile, t_topology *top, int ePBC, matrix topbox,
}
fprintf(xvgrout, "%10.5f %10.5f\n", inprod[0][i], inprod[noutvec-1][i]);
}
- gmx_ffclose(xvgrout);
+ xvgrclose(xvgrout);
}
if (threedplotfile)
*
* 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.
}
fprintf(stdout, "\n");
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
static void regression_analysis(int n, gmx_bool bXYdy,
fprintf(fp, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
}
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
static int real_comp(const void *a, const void *b)
sfree(fitsig);
sfree(ybs);
sfree(tbs);
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
static void luzar_correl(int nn, real *time, int nset, real **val, real temp,
}
sfree(ctd);
sfree(td);
+ xvgrclose(fp);
}
else
{
sfree(ctd);
sfree(ctdGem);
sfree(td);
+ xvgrclose(fp);
}
int gmx_analyze(int argc, char *argv[])
fprintf(out, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
}
}
- gmx_ffclose(out);
+ xvgrclose(out);
fprintf(stderr, "\r%d, time=%g\n", j-1, (j-1)*dt);
}
if (ccfile)
*
* 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.
}
fprintf(out, "\n");
}
- gmx_ffclose(out);
+ xvgrclose(out);
}
if (opt2bSet("-or", NFILE, fnm))
{
fprintf(out, "%10.5f %10.3f\n", time[i], trans_frac[i]);
tfrac += trans_frac[i];
}
- gmx_ffclose(out);
+ xvgrclose(out);
tfrac /= nframes;
fprintf(stderr, "Average trans fraction: %g\n", tfrac);
fprintf(out, "%10g %10f\n", 180.0, angstat[0]*norm_fac);
}
- gmx_ffclose(out);
+ xvgrclose(out);
do_view(oenv, opt2fn("-od", NFILE, fnm), "-nxy");
if (bAver)
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2010,2011,2012,2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,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.
{
lambda_vec_print_short(results[nresults-1].b->native_lambda, buf);
fprintf(fpi, xvg2format, buf, dg_tot);
- gmx_ffclose(fpi);
+ xvgrclose(fpi);
+ }
+ if (fpb != NULL)
+ {
+ xvgrclose(fpb);
}
do_view(oenv, opt2fn_null("-o", NFILE, fnm), "-xydy");
*
* 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.
{
close_trx(fpdb);
}
- gmx_ffclose(flen);
- gmx_ffclose(fdist);
- gmx_ffclose(fz);
- gmx_ffclose(ftilt);
- gmx_ffclose(ftiltr);
- gmx_ffclose(ftiltl);
+ xvgrclose(flen);
+ xvgrclose(fdist);
+ xvgrclose(fz);
+ xvgrclose(ftilt);
+ xvgrclose(ftiltr);
+ xvgrclose(ftiltl);
if (bKink)
{
- gmx_ffclose(fkink);
- gmx_ffclose(fkinkr);
- gmx_ffclose(fkinkl);
+ xvgrclose(fkink);
+ xvgrclose(fkinkr);
+ xvgrclose(fkinkl);
}
return 0;
*
* 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.
}
fprintf(fp, "\n");
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
for (i = 0; (i < NJC); i++)
{
sfree(leg[i]);
}
}
fprintf(fp, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
- gmx_ffclose(fp);
+ xvgrclose(fp);
if (bSSHisto)
{
for (k = 0; (k < 3); k++)
{
gmx_ffclose(gp);
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
if (bOm)
{
sprintf(fn, "ramomega%s.xpm", dlist[i].name);
{
fprintf(fp, "%10g %10g\n", RAD2DEG*dih[Xi1][j], RAD2DEG*dih[Xi2][j]);
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
else
{
/* fprintf(fp,"%12s\n",dlist[i].name); this confuses xmgrace */
fprintf(fp, "\n");
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
static void order_params(FILE *log,
fprintf(fp, "\n");
/* fprintf(fp,"%12s\n",dlist[i].name); this confuses xmgrace */
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
if (NULL != pdbfn)
{
*
* 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.
if (NULL != fp)
{
- fclose(fp);
+ xvgrclose(fp);
}
}
{
fprintf(fp, "%5d %5d\n", i+1, ntrans[i]);
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
sfree(ntrans);
for (i = 0; i < clust->ncl; i++)
{
fprintf(fp, "%8g %8d\n", time[i], clust->cl[i]);
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
if (sizefn)
{
+ /* FIXME: This file is never closed. */
fp = xvgropen(sizefn, "Cluster Sizes", "Cluster #", "# Structures", oenv);
if (output_env_get_print_xvgr_codes(oenv))
{
{
fprintf(fp, "%10d %10g\n", i, eigenvalues[i]);
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
break;
case m_monte_carlo:
orig = init_mat(rms->nn, FALSE);
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2007, 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.
}
while (read_next_frame(oenv, status, &fr));
close_trx(status);
- gmx_ffclose(fp);
- gmx_ffclose(gp);
- gmx_ffclose(hp);
- gmx_ffclose(tp);
+ xvgrclose(fp);
+ xvgrclose(gp);
+ xvgrclose(hp);
+ xvgrclose(tp);
gmx_mtop_atomlookup_destroy(alook);
nhisto += (int)((j+1)*nelem/n_x);
}
fprintf(fp, "%5d %8.3f\n", j+1, 0.0);
- gmx_ffclose(fp);
+ xvgrclose(fp);
fprintf(stderr, "Total number of atoms in clusters = %d\n", nhisto);
*
* 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.
{
fprintf (out, "%10d %g\n", (int)i+1, eigenvalues[ndim-1-i]);
}
- gmx_ffclose(out);
+ xvgrclose(out);
if (bFit)
{
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2008,2009,2010,2011,2012,2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2008,2009,2010,2011,2012,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.
temp, trust, bfit, efit, bvit, evit, status, isize, nmols, nshift,
index0, indexm, mass2, qmol, eps_rf, oenv);
- gmx_ffclose(fmj);
- gmx_ffclose(fmd);
- gmx_ffclose(fmjdsp);
- if (bACF)
- {
- gmx_ffclose(outf);
- }
- if (bINT)
+ xvgrclose(fmj);
+ xvgrclose(fmd);
+ xvgrclose(fmjdsp);
+ if (fr.bV)
{
- gmx_ffclose(mcor);
+ if (bACF)
+ {
+ xvgrclose(outf);
+ }
+ xvgrclose(fcur);
+ if (bINT)
+ {
+ xvgrclose(mcor);
+ }
}
return 0;
*
* 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.
fprintf(den, "\n");
}
- gmx_ffclose(den);
+ xvgrclose(den);
}
int gmx_density(int argc, char *argv[])
*
* 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.
}
printf("MAXEPS = %10.5e at frequency %10.5e GHz (tauD = %8.1f ps)\n",
maxeps, numax, 1000/(2*M_PI*numax));
- gmx_ffclose(fp);
- gmx_ffclose(cp);
+ xvgrclose(fp);
+ xvgrclose(cp);
sfree(tmp);
}
*
* 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.
/* Swap x0 and x1 */
x0 = x1;
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
gmx_bool read_mu_from_enx(ener_file_t fmu, int Vol, ivec iMu, rvec mu, real *vol,
slab_dipole[i][ZZ]/nframes,
mutot);
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
do_view(oenv, fn, "-autoscale xy -nxy");
}
close_trj(status);
}
- gmx_ffclose(outmtot);
- gmx_ffclose(outaver);
- gmx_ffclose(outeps);
+ xvgrclose(outmtot);
+ xvgrclose(outaver);
+ xvgrclose(outeps);
if (fnadip)
{
- gmx_ffclose(adip);
+ xvgrclose(adip);
}
if (cosaver)
{
- gmx_ffclose(caver);
+ xvgrclose(caver);
}
if (dip3d)
fprintf(outdd, "%10g %10f\n",
(i*mu_max)/ndipbin, dipole_bin[i]/(double)teller);
}
- gmx_ffclose(outdd);
+ xvgrclose(outdd);
sfree(dipole_bin);
}
if (bGkr)
*
* 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.
if (ftp2bSet(efNDX, NFILE, fnm))
{
+ /* TODO: Nothing is written to this file if -c is provided, but it is
+ * still opened... */
rd_index(ftp2fn(efNDX, NFILE, fnm), 1, &isize, &index, &grpname);
xvg = xvgropen(opt2fn("-dr", NFILE, fnm), "Individual Restraints", "Time (ps)",
"nm", oenv);
}
dump_disre_matrix(opt2fn_null("-x", NFILE, fnm), &dr, fcd.disres.nres,
j, &top->idef, &mtop, max_dr, nlevels, bThird);
- gmx_ffclose(out);
- gmx_ffclose(aver);
- gmx_ffclose(numv);
- gmx_ffclose(maxxv);
- if (isize > 0)
- {
- gmx_ffclose(xvg);
- do_view(oenv, opt2fn("-dr", NFILE, fnm), "-nxy");
- }
+ xvgrclose(out);
+ xvgrclose(aver);
+ xvgrclose(numv);
+ xvgrclose(maxxv);
do_view(oenv, opt2fn("-dn", NFILE, fnm), "-nxy");
do_view(oenv, opt2fn("-da", NFILE, fnm), "-nxy");
do_view(oenv, opt2fn("-ds", NFILE, fnm), "-nxy");
do_view(oenv, opt2fn("-dm", NFILE, fnm), "-nxy");
}
+ if (isize > 0)
+ {
+ xvgrclose(xvg);
+ if (!clust)
+ {
+ do_view(oenv, opt2fn("-dr", NFILE, fnm), "-nxy");
+ }
+ }
gmx_log_close(fplog);
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2012,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.
}
fprintf(fp, "\n");
- gmx_ffclose(fp);
+ xvgrclose(fp);
sfree(leg);
sfree(count);
}
close_trj(status);
if (fTArea)
{
- gmx_ffclose(fTArea);
+ xvgrclose(fTArea);
}
gmx_rmpbc_done(gpbc);
{
fprintf(acc, "%5d %10g %10g\n", i+1, av_area[i], norm_av_area[i]);
}
- gmx_ffclose(acc);
+ xvgrclose(acc);
}
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2012,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.
if (bRKout)
{
- gmx_ffclose(rkfp);
+ xvgrclose(rkfp);
}
if (bDatout)
if (bInstEffout)
{
- gmx_ffclose(iefp);
+ xvgrclose(iefp);
}
fprintf(rhfp, "%12.7f %12.7f\n", (i + 0.5) * rincr + rmin,
rhist[i]);
}
- gmx_ffclose(rhfp);
+ xvgrclose(rhfp);
}
if (bKhistout)
fprintf(khfp, "%12.7f %12.7f\n", (i + 0.5) * kincr + kmin,
khist[i]);
}
- gmx_ffclose(khfp);
+ xvgrclose(khfp);
}
printf("\nAverages:\n");
*
* 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.
}
fprintf(out, "\n");
}
- gmx_ffclose(out);
+ xvgrclose(out);
}
else
{
*
* 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.
fprintf(vout, "%10d %10.5e\n", j, mypow(violaver[j]/nframes, minthird));
}
#endif
- gmx_ffclose(vout);
+ xvgrclose(vout);
fprintf(stdout, "\nSum of violations averaged over simulation: %g nm\n",
sumt);
}
fprintf(fp1, "\n");
}
- gmx_ffclose(fp0);
- gmx_ffclose(fp1);
+ xvgrclose(fp0);
+ xvgrclose(fp1);
}
typedef struct {
intBulk += 0.5*(eneset[11][i-1] + eneset[11][i])*factor;
fprintf(fp, "%10g %10g %10g\n", (i*Dt), integral, intBulk);
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
for (i = 0; i < 12; i++)
{
}
if (fp)
{
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
sfree(fr);
}
close_enx(fp);
if (out)
{
- gmx_ffclose(out);
+ xvgrclose(out);
}
if (bDRAll)
{
- gmx_ffclose(fp_pairs);
+ xvgrclose(fp_pairs);
}
if (bORT)
{
- gmx_ffclose(fort);
+ xvgrclose(fort);
}
if (bODT)
{
- gmx_ffclose(fodt);
+ xvgrclose(fodt);
}
if (bORA)
{
{
fprintf(out, "%5d %g\n", or_label[i], orient[i]/norfr);
}
- gmx_ffclose(out);
+ xvgrclose(out);
}
if (bODA)
{
{
fprintf(out, "%5d %g\n", or_label[i], orient[i]/norfr-oobs[i]);
}
- gmx_ffclose(out);
+ xvgrclose(out);
}
if (bODR)
{
{
fprintf(out, "%5d %g\n", or_label[i], sqrt(odrms[i]/norfr));
}
- gmx_ffclose(out);
+ xvgrclose(out);
}
if (bOTEN)
{
- gmx_ffclose(foten);
+ xvgrclose(foten);
}
if (bDisRe)
{
if (fp_dhdl)
{
- gmx_ffclose(fp_dhdl);
+ gmx_fio_fclose(fp_dhdl);
printf("\n\nWrote %d lambda values with %d samples as ",
dh_lambdas, dh_samples);
if (dh_hists > 0)
*
* 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.
gmx_rmpbc_done(gpbc);
}
- gmx_ffclose(out);
+ xvgrclose(out);
if (bACF)
{
*
* 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.
factor*dipole[slice][ZZ], order[slice]);
}
- gmx_ffclose(ord);
+ xvgrclose(ord);
}
int gmx_h2order(int argc, char *argv[])
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2008, 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.
integral += x1;
}
integral *= dt;
- gmx_ffclose(fp);
+ xvgrclose(fp);
printf("%s lifetime = %.2f ps\n", bContact ? "Contact" : "HB", integral);
printf("Note that the lifetime obtained in this manner is close to useless\n");
printf("Use the -ac option instead and check the Forward lifetime\n");
fprintf(fp, "%10g %10g %10g %10g %10g\n",
hb->time[j]-hb->time[0], ct[j], cct[j], ght[j], kt[j]);
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
analyse_corr(nn, hb->time, ct, ght, kt, NULL, NULL, NULL,
fit_start, temp, smooth_tail_start, oenv);
}
if (!fp)
{
+ // TODO: This file is never closed...
fp = xvgropen(fn, "Donor properties", output_env_get_xvgr_tlabel(oenv), "Number", oenv);
xvgr_legend(fp, asize(leg), leg, oenv);
}
close_trj(status);
if (fpnhb)
{
- gmx_ffclose(fpnhb);
+ xvgrclose(fpnhb);
}
/* Compute maximum possible number of different hbonds */
aver_nhb += hb->nhb[i];
aver_dist += hb->ndist[i];
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
aver_nhb /= nframes;
aver_dist /= nframes;
/* Print HB distance distribution */
{
fprintf(fp, "%10g %10g\n", (i+0.5)*rbin, rdist[i]/(rbin*(real)sum));
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
/* Print HB angle distribution */
{
fprintf(fp, "%10g %10g\n", (i+0.5)*abin, adist[i]/(abin*(real)sum));
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
/* Print HB in alpha-helix */
}
fprintf(fp, "\n");
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
if (!bNN)
{
}
fprintf(fp, "\n");
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
return 0;
*
* 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.
for (i = 0; (i < efhNR); i++)
{
- gmx_ffclose(xf[i].fp);
+ xvgrclose(xf[i].fp);
if (xf[i].bfp2)
{
- gmx_ffclose(xf[i].fp2);
+ xvgrclose(xf[i].fp2);
}
do_view(oenv, xf[i].filenm, "-nxy");
}
*
* 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.
gmx_ffclose(fpaxis);
gmx_ffclose(fpcenter);
- gmx_ffclose(fptilt);
- gmx_ffclose(fprotation);
+ xvgrclose(fptilt);
+ xvgrclose(fprotation);
gmx_ffclose(fprise);
gmx_ffclose(fpradius);
gmx_ffclose(fptwist);
*
* 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.
}
}
close_enx(fp);
- gmx_ffclose(out);
+ xvgrclose(out);
fprintf(stderr, "\n");
if (nframes > 0)
*
* 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.
fprintf(fp, "%3d %8.3f %3d %8.3f %3d %8.3f\n",
i+1, ratio, tot_n[i], mean_n[i], natm[i], mean_n[i]/natm[i]);
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
return 0;
*
* 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.
gmx_rmpbc_done(gpbc);
}
- gmx_ffclose(out);
+ xvgrclose(out);
fprintf(stdout,
"\nThe shortest periodic distance is %g (nm) at time %g (%s),\n"
while (read_next_x(oenv, status, &t, x0, box));
close_trj(status);
- gmx_ffclose(dist);
+ xvgrclose(dist);
if (num)
{
- gmx_ffclose(num);
+ xvgrclose(num);
}
if (atm)
{
{
close_trx(trxout);
}
+ if (respertime)
+ {
+ xvgrclose(respertime);
+ }
if (nres && !bEachResEachTime)
{
}
fprintf(res, "\n");
}
+ xvgrclose(res);
}
sfree(x0);
*
* 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.
if (bRMS)
{
- gmx_ffclose(fp);
+ xvgrclose(fp);
do_view(oenv, opt2fn("-or", NFILE, fnm), "-nxy");
}
*
* 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.
}
fprintf(out, "\n");
}
- gmx_ffclose(out);
+ xvgrclose(out);
}
/* called from corr_loop, to do the main calculations */
}
}
}
- gmx_ffclose(out);
+ xvgrclose(out);
do_view(oenv, fn, "-graphtype bar");
/* Compute variance, stddev and error */
*
* 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.
{
fprintf (out, "%6d %15g\n", begin+i, eigenvalues[i]);
}
- gmx_ffclose(out);
+ xvgrclose(out);
if (opt2bSet("-qc", NFILE, fnm))
qutot += qu;
}
}
- gmx_ffclose(out);
+ xvgrclose(out);
if (NULL != spec)
{
for (j = 0; (j < maxspec); j++)
{
fprintf(spec, "%10g %10g\n", 1.0*j, spectrum[j]);
}
- gmx_ffclose(spec);
+ xvgrclose(spec);
}
if (NULL != qc)
{
nharm, nvsite);
printf("Total correction to cV = %g J/mol K\n", qcvtot);
printf("Total correction to H = %g kJ/mol\n", qutot);
- gmx_ffclose(qc);
+ xvgrclose(qc);
please_cite(stdout, "Caleman2011b");
}
/* Writing eigenvectors. Note that if mass scaling was used, the eigenvectors
*
* 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.
sfree(index);
sfree(isize);
- gmx_ffclose(fpsg);
- gmx_ffclose(fpsk);
+ xvgrclose(fpsg);
+ xvgrclose(fpsk);
fpsg = xvgropen(sgslfn,
"S\\sg\\N Angle Order Parameter / Slab", "(nm)", "S\\sg\\N",
fprintf(fpsk, "%10g %10g\n", (i+0.5)*box[slice_dim][slice_dim]/nslice,
sk_slice_tot[i]/nframes);
}
- gmx_ffclose(fpsg);
- gmx_ffclose(fpsk);
+ xvgrclose(fpsg);
+ xvgrclose(fpsk);
}
0.333 * order[atom][YY]));
}
- gmx_ffclose(ord);
- gmx_ffclose(slOrd);
}
+ xvgrclose(ord);
+ xvgrclose(slOrd);
}
void write_bfactors(t_filenm *fnm, int nfile, atom_id *index, atom_id *a, int nslices, int ngrps, real **order, t_topology *top, real **distvals, output_env_t oenv)
*
* 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.
close_trx(status);
- gmx_ffclose(out);
+ xvgrclose(out);
if (outv)
{
- gmx_ffclose(outv);
+ xvgrclose(outv);
}
if (outp)
{
- gmx_ffclose(outp);
+ xvgrclose(outp);
}
sum_eed2_tot /= frame;
{
fprintf(outi, "%d %8.4f\n", i+1, intd[i]);
}
- gmx_ffclose(outi);
+ xvgrclose(outi);
}
do_view(oenv, opt2fn("-o", NFILE, fnm), "-nxy");
*
* 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.
fprintf(fie, "\n");
}
- gmx_ffclose(pot);
- gmx_ffclose(cha);
- gmx_ffclose(fie);
+ xvgrclose(pot);
+ xvgrclose(cha);
+ xvgrclose(fie);
}
int gmx_potential(int argc, char *argv[])
*
* 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.
}
while (new_data(xr));
fprintf(stderr, "\n");
- gmx_ffclose(out);
+ xvgrclose(out);
do_view(oenv, ftp2fn(efXVG, NFILE, fnm), NULL);
*
* 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.
}
fprintf(fp, "\n");
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
if (bMirror)
{
}
fprintf(fp, "\n");
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
if (bAv)
{
fprintf(fp, "%10d %10g\n", j, rlstot/teller);
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
if (bNorm)
{
fprintf(fp, "%10d %10g\n", j, rlsnorm[j]/teller);
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
do_view(oenv, opt2fn_null("-a", NFILE, fnm), "-graphtype bar");
do_view(oenv, opt2fn("-o", NFILE, fnm), NULL);
*
* 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.
while (read_next_x(oenv, status, &t, x, box));
fprintf(stderr, "\n");
- gmx_ffclose(fp);
+ xvgrclose(fp);
close_trj(status);
*
* 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.
}
}
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
static void average_residues(double f[], double **U, int uind,
pdb_bfac);
}
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
else
{
bRes ? top.atoms.resinfo[top.atoms.atom[index[i]].resind].nr : index[i]+1, sqrt(rmsf[i]));
}
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
for (i = 0; i < isize; i++)
bRes ? top.atoms.resinfo[top.atoms.atom[index[i]].resind].nr : index[i]+1, sqrt(rmsf[i]));
}
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
if (opt2bSet("-oq", NFILE, fnm))
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2009,2010,2011,2012,2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2012,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.
close_trj(status);
- gmx_ffclose(out);
+ xvgrclose(out);
do_view(oenv, ftp2fn(efXVG, NFILE, fnm), "-nxy");
*
* 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.
{
fprintf(fp, "%10g %10g\n", time[k], cgdist[i][j][k]);
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
}
}
}
for (m = 0; (m < 3); m++)
{
- gmx_ffclose(out[m]);
+ xvgrclose(out[m]);
if (nset[m] == 0)
{
remove(fn[m]);
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2012,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.
fprintf(fp, "%10.6f%10.6f\n", prframecurrent->r[i], prframecurrent->gr[i]);
}
done_filenms(NFILE, fnmdup);
- fclose(fp);
+ xvgrclose(fp);
sfree(hdr);
sfree(suffix);
sfree(fnmdup);
fprintf(fp, "%10.6f%10.6f\n", sqframecurrent->q[i], sqframecurrent->s[i]);
}
done_filenms(NFILE, fnmdup);
- fclose(fp);
+ xvgrclose(fp);
sfree(hdr);
sfree(suffix);
sfree(fnmdup);
*
* 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.
}
fprintf(fp, "\n");
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
int gmx_sham(int argc, char *argv[])
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2012,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.
oldx = x;
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
do_view(oenv, ftp2fn(efXVG, NFILE, fnm), NULL);
*
* 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.
{
fprintf(fp, "%g %g\n", (i+0.5)*binwidth-1, 2*normfac*hist1[i]);
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
sprintf(str, "Solvent normal orientation between %g and %g nm", rmin, rmax);
fp = xvgropen(opt2fn("-no", NFILE, fnm), str, "cos(\\8q\\4\\s2\\N)", "", oenv);
{
fprintf(fp, "%g %g\n", (i+0.5)*binwidth, normfac*hist2[i]);
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
sprintf(str, "Solvent orientation");
histn[i] ? histi1[i]/histn[i] : 0,
histn[i] ? histi2[i]/histn[i] : 0);
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
sprintf(str, "Cumulative solvent orientation");
fp = xvgropen(opt2fn("-co", NFILE, fnm), str, "r (nm)", "", oenv);
c2 += histi2[i]*normfac;
fprintf(fp, "%g %g %g\n", (i+1)*rbinw, c1, c2);
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
sprintf(str, "Solvent distribution");
fp = xvgropen(opt2fn("-rc", NFILE, fnm), str, "r (nm)", "molecules/nm", oenv);
{
fprintf(fp, "%g %g\n", (i+0.5)*rbinw, histn[i]*normfac);
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
do_view(oenv, opt2fn("-o", NFILE, fnm), NULL);
do_view(oenv, opt2fn("-no", NFILE, fnm), NULL);
*
* 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.
nmol += hist[i];
fprintf(fp, "%g %g\n", i*bw, nmol/nf);
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
do_view(oenv, opt2fn("-o", NFILE, fnm), NULL);
*
* 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.
}
fprintf(fp, "\n");
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
do_view(oenv, fn_trans, "-nxy");
}
}
fprintf(fp, "\n");
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
do_view(oenv, fn_tc, "-nxy");
if (fn_cub)
}
fprintf(fp, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
do_view(oenv, fn_tcf, "-nxy");
if (fn_cub)
fprintf(fp_cub, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
}
fprintf(fp_vk, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
- gmx_ffclose(fp_cub);
+ xvgrclose(fp_cub);
do_view(oenv, fn_cub, "-nxy");
}
- gmx_ffclose(fp_vk);
+ xvgrclose(fp_vk);
do_view(oenv, fn_vk, "-nxy");
}
*
* 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.
fprintf(fp, "%-5d %10.3f %10.3f %10.3f\n", 1+i,
sum[index[i]][XX], sum[index[i]][YY], sum[index[i]][ZZ]);
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
max = 0;
maxi = 0;
for (i = 0; i < isize; i++)
{
fprintf(fp, "%10.3e %10d\n", i*binwidth, histo[i]);
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
int gmx_traj(int argc, char *argv[])
if (bOX)
{
- gmx_ffclose(outx);
+ xvgrclose(outx);
}
if (bOXT)
{
}
if (bOV)
{
- gmx_ffclose(outv);
+ xvgrclose(outv);
}
if (bOF)
{
- gmx_ffclose(outf);
+ xvgrclose(outf);
}
if (bOB)
{
- gmx_ffclose(outb);
+ xvgrclose(outb);
}
if (bOT)
{
- gmx_ffclose(outt);
+ xvgrclose(outt);
}
if (bEKT)
{
- gmx_ffclose(outekt);
+ xvgrclose(outekt);
}
if (bEKR)
{
- gmx_ffclose(outekr);
+ xvgrclose(outekr);
}
if (bVD)
*
* 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.
}
if (fp)
{
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
gmx_rmpbc_done(gpbc);
*
* 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.
}
fprintf(fp, "\n");
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
if (otfile)
{
fprintf(fp, "%g %g\n", f*dt, (real)pt[f]/(tcount[f]*isize));
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
do_view(oenv, matfile, NULL);
*
* 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.
fprintf(fp, "\n");
}
printf("Wrote cumulative distribution functions to %s\n", fn);
- gmx_ffclose(fp);
+ xvgrclose(fp);
sfree(fn);
sfree(buf);
}
fprintf(fp, "\n");
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
printf("Wrote %s\n", fn);
if (bs_index >= 0)
{
}
fprintf(fp, "%s\n", output_env_get_print_xvgr_codes(opt->oenv) ? "&" : "");
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
/* write average and stddev */
fp = xvgropen(fnres, "Average and stddev from bootstrapping", xlabel, ylabel, opt->oenv);
stddev = (tmp >= 0.) ? sqrt(tmp) : 0.; /* Catch rouding errors */
fprintf(fp, "%e\t%e\t%e\n", (i+0.5)*opt->dz+opt->min, bsProfiles_av [i], stddev);
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
printf("Wrote boot strap result to %s\n", fnres);
}
printf(" done\n");
if (fpcorr)
{
- gmx_ffclose(fpcorr);
+ xvgrclose(fpcorr);
}
/* plot IACT along reaction coordinate */
}
}
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
printf("Wrote %s\n", fn);
}
{
fprintf(fp, "%g %g\n", (j+0.5)*dz+opt->min, pot[j]);
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
printf("verbose mode: wrote %s with PMF from interated forces\n", "pmfintegrated.xvg");
}
}
fprintf(histout, "\n");
}
- gmx_ffclose(histout);
+ xvgrclose(histout);
printf("Wrote %s\n", opt2fn("-hist", NFILE, fnm));
if (opt.bHistOnly)
{
{
fprintf(profout, "%e\t%e\n", (double)(i+0.5)/opt.bins*(opt.max-opt.min)+opt.min, profile[i]);
}
- gmx_ffclose(profout);
+ xvgrclose(profout);
printf("Wrote %s\n", opt2fn("-o", NFILE, fnm));
/* Bootstrap Method */
*
* 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.
}
}
- gmx_ffclose (fp);
+ xvgrclose (fp);
}
*
* 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.
}
#ifdef DEBUG_SWITCH
- gmx_fio_fclose(fp);
+ xvgrclose(fp);
#endif
}
evaluate_table(table.data, 4*k, 12, table.scale, x0, &y0, &yp);
fprintf(fp, "%15.10e %15.10e %15.10e\n", x0, y0, yp);
}
- gmx_fio_fclose(fp);
+ xvgrclose(fp);
}
done_tabledata(&(td[k]));
}
fprintf(fp, "%15.10e %15.10e %15.10e\n", x0, y0, yp);
}
- gmx_fio_fclose(fp);
+ xvgrclose(fp);
}
/*
fprintf(fp, "%15.10e %15.10e %15.10e\n", x0, y0, yp);
}
- gmx_ffclose(fp);
+ xvgrclose(fp);
}
done_tabledata(&(td[0]));
*
* 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.
if (fp_tpi != NULL)
{
- gmx_fio_fclose(fp_tpi);
+ xvgrclose(fp_tpi);
}
if (fplog != NULL)
(int)(bin[i]+0.5),
bin[i]*exp(-bUlogV)*V_all/VembU_all);
}
- gmx_fio_fclose(fp_tpi);
+ xvgrclose(fp_tpi);
}
sfree(bin);