There are name clashes with e.g. PathScale compiler.
Fixes #1250.
Change-Id: I3e5e85d9335f2695515483d59d440276823624f0
fun:bTimeSet
}
{
- ffclose/tMPI_Thread_mutex_init_once
+ gmx_ffclose/tMPI_Thread_mutex_init_once
Memcheck:Leak
...
fun:tMPI_Thread_mutex_init_once
fun:tMPI_Thread_mutex_lock
- fun:ffclose
+ fun:gmx_ffclose
}
{
(*rmsd)=-1;
(*nres)=0;
- mpoutput=ffopen (fn,"r");
+ mpoutput=gmx_ffopen (fn,"r");
if (bCountres) {
do {
(*nres) = atoi(string);
}
}
- ffclose(mpoutput);
+ gmx_ffclose(mpoutput);
}
int main(int argc,char *argv[])
}
}
else {
- ffclose(tmpf);
+ gmx_ffclose(tmpf);
}
if (ftp != efPDB) {
useatoms.nres=max(useatoms.nres,useatoms.atom[i].resind+1);
}
useatoms.nr=nout;
- out=ffopen(TrjoutFile,filemode);
+ out=gmx_ffopen(TrjoutFile,filemode);
break;
}
if (outftp == efG87)
do {
t = output_env_conv_time(oenv,fr.time);
gmx_rmpbc(gpbc,natoms,fr.box,fr.x);
- tapein=ffopen(pdbfile,"w");
+ tapein=gmx_ffopen(pdbfile,"w");
write_pdbfile_indexed(tapein,NULL,atoms,fr.x,ePBC,fr.box,' ',-1,gnx,index,NULL,TRUE);
- ffclose(tapein);
+ gmx_ffclose(tapein);
system(multiprot);
remove(pdbfile);
process_multiprot_output(fn, &rmsd, &nres2,rotangles,translation,bCountres,countres);
for (i=0;i<ratoms.nres;i++) {
fprintf(fres,"%10d %12d\n",countres[i].resnr,countres[i].count);
}
- ffclose(fres);
+ gmx_ffclose(fres);
}
- ffclose(fo);
- ffclose(frc);
+ gmx_ffclose(fo);
+ gmx_ffclose(frc);
fprintf(stderr,"\n");
close_trj(status);
if (trxout != NULL) {
close_trx(trxout);
}
else if (out != NULL) {
- ffclose(out);
+ gmx_ffclose(out);
}
view_all(oenv,NFILE, fnm);
sfree(xr);
char anm[24],rnm[24];
double f1,f2,f3,f4,f5,f6;
- in=ffopen(fn,"r");
+ in=gmx_ffopen(fn,"r");
while ((ptr=fgets2(buf,255,in)) != NULL) {
sscanf(buf,"%d%d%s%s%lf%lf%lf%lf%lf%lf",
&anr,&rnr,rnm,anm,&f1,&f2,&f3,&f4,&f5,&f6);
/*if ((int)strlen(buf) > 0)
fprintf(out,"%s\n",buf);*/
fflush(out);
- ffclose(in);
+ gmx_ffclose(in);
}
int main(int argc,char *argv[])
do {
if (t >= nt) {
rm_pbc(&(top->idef),top->atoms.nr,box,x,x_s);
- fp=ffopen(pdbfile,"w");
+ fp=gmx_ffopen(pdbfile,"w");
write_pdbfile_indexed(fp,"Generated by do_shift",
atoms,x_s,box,0,-1,gnx,index);
- ffclose(fp);
+ gmx_ffclose(fp);
if ((tot=popen(total,"w")) == NULL)
perror("opening pipe to total");
}
} while(read_next_x(status,&t,natoms,x,box));
close_trj(status);
- ffclose(out);
+ gmx_ffclose(out);
gmx_thanx(stderr);
gmx_fatal(FARGS,"Wrong value for enorm (%d)",enorm);
}
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
/*******************************************************************
sqrt(anal->d2_origin[i][YY]/nsim),
sqrt(anal->d2_origin[i][ZZ]/nsim));
}
- ffclose(hp);
- ffclose(gp);
- ffclose(fp);
- ffclose(kp);
+ gmx_ffclose(hp);
+ gmx_ffclose(gp);
+ gmx_ffclose(fp);
+ gmx_ffclose(kp);
}
void dump_as_pdb(char *pdb,t_ana_struct *anal)
int i,j;
real t;
- kp = ffopen(pdb,"w");
+ kp = gmx_ffopen(pdb,"w");
for(i=0; (i<anal->nstruct); i++) {
t = 1000*anal->t[i];
fprintf(kp,"MODEL %d time %g fs\n",i+1,t);
}
fprintf(kp,"ENDMDL\n");
}
- ffclose(kp);
+ gmx_ffclose(kp);
}
char *enms[eNR] = {
fprintf(fp," %8.3f\n",ae->e[i][eELECTRON]/(ELECTRONVOLT*total->nion[i]));
}
fprintf(fp,"&\n");
- ffclose(fp);
+ gmx_ffclose(fp);
}
double e,p,o;
fprintf(stdout,"Going to read %s\n",fn);
- fp = ffopen(fn,"r");
+ fp = gmx_ffopen(fn,"r");
/* Allocate memory and set constants */
snew(p2Ddata,1);
}
fprintf(stderr,"\n");
- ffclose(fp);
+ gmx_ffclose(fp);
return p2Ddata;
}
double e,p,o,t;
fprintf(stdout,"Going to read %s\n",fn);
- fp = ffopen(fn,"r");
+ fp = gmx_ffopen(fn,"r");
/* Allocate memory and set constants */
snew(pq,1);
}
fprintf(stderr,"\n");
- ffclose(fp);
+ gmx_ffclose(fp);
return pq;
}
helec = init_histo(500,0,500);
snew(ae,1);
- logfp = ffopen(ftp2fn(efLOG,NFILE,fnm),"w");
+ logfp = gmx_ffopen(ftp2fn(efLOG,NFILE,fnm),"w");
print_header(logfp,ehp);
for(i=0; (i<ehp->nsim); i++) {
fprintf(stderr,"\rSim: %d/%d",i+1,ehp->nsim);
}
fprintf(stderr,"\n");
- ffclose(logfp);
+ gmx_ffclose(logfp);
sfree(rptr);
sfree(pdbbuf);
((strcmp(atype[j],"OW") == 0) && (strcmp(atype[k],"HW") == 0)) ||
((strcmp(atype[j],"OW") == 0) && (strcmp(atype[k],"OW") == 0))) {
- fp = ffopen(buf,"w");
+ fp = gmx_ffopen(buf,"w");
imax = 3*pts_nm;
for(i=0; (i<=imax); i++) {
r,vc,fc,vd,fd,vr,fr);
}
- ffclose(fp);
+ gmx_ffclose(fp);
/* Guillot eqn 4 and 5 */
} else if (((strcmp(atype[j],"HWd") == 0) && (strcmp(atype[k],"HW") == 0)) ||
((strcmp(atype[j],"OWd") == 0) && (strcmp(atype[k],"HW") == 0)) ||
((strcmp(atype[j],"OWd") == 0) && (strcmp(atype[k],"OW") == 0))) {
- fp = ffopen(buf,"w");
+ fp = gmx_ffopen(buf,"w");
imax = 3*pts_nm;
for(i=0; (i<=imax); i++) {
r,vc,fc,vd,fd,vr,fr);
}
- ffclose(fp);
+ gmx_ffclose(fp);
/* Guillot2001a eqn 3 */
} else if (((strcmp(atype[j],"HWd") == 0) && (strcmp(atype[k],"HWd") == 0)) ||
((strcmp(atype[j],"OWd") == 0) && (strcmp(atype[k],"HWd") == 0)) ||
((strcmp(atype[j],"OWd") == 0) && (strcmp(atype[k],"OWd") == 0))) {
- fp = ffopen(buf,"w");
+ fp = gmx_ffopen(buf,"w");
imax = 3*pts_nm;
for(i=0; (i<=imax); i++) {
r,vc,fc,vd,fd,vr,fr);
}
- ffclose(fp);
+ gmx_ffclose(fp);
} else
gmx_fatal(FARGS,"Invalid atom type: %s %s", atype[j], atype[k]);
fn = opt2fn("-o",NFILE,fnm);
if ((m != mGuillot2001a))
- fp = ffopen(fn,"w");
+ fp = gmx_ffopen(fn,"w");
switch (m) {
case mGuillot2001a:
do_guillot2001a(fn,eel,pts_nm,rc,rtol,xi,xir);
gmx_fatal(FARGS,"Model %s not supported yet",model[0]);
}
if ((m != mGuillot2001a))
- ffclose(fp);
+ gmx_ffclose(fp);
gmx_thanx(stdout);
/* write the reference strcture*/
if ( bRef )
{
- fp=ffopen(fnREF,"w");
+ fp=gmx_ffopen(fnREF,"w");
fprintf(fp,"%s\n",title);
fprintf(fp," %d\n",isize[G_REFMOL]);
-1*x_refmol[i][XX],-1*x_refmol[i][YY],-1*x_refmol[i][ZZ]);
/* Inserted -1* on the line above three times */
fprintf(fp," 10.00000 10.00000 10.00000\n");
- ffclose(fp);
+ gmx_ffclose(fp);
fprintf(stderr,"\nWrote reference structure. (%d Atoms)\n",isize[G_REFMOL]);
}
/* normalize the SDF and write output */
/* see http://www.csc.fi/gopenmol/index.phtml for documentation */
- fp=ffopen(fnSDF,"wb");
+ fp=gmx_ffopen(fnSDF,"wb");
/* rank */
fprintf(stderr,"\nMin: %f Max: %f\n",min_sdf,max_sdf);
- ffclose(fp);
+ gmx_ffclose(fp);
/* Give back the mem */
if (bCenter)
prep_x(atoms.nr,xin,rDist,rAngleZ,rAngleX);
- fp = ffopen(outfile,"w");
+ fp = gmx_ffopen(outfile,"w");
for(i=0; (i<(bTrimer ? 3 : 6)); i++) {
rotate_x(atoms.nr,xin,i*(bTrimer ? 120.0 : 60.0),xout,TRUE,
bAlternate && ((i % 2) != 0),alterz*(((i % 2) == 0) ? 0 : 1));
sprintf(buf,"Rotated %d degrees",i*(bTrimer ? 120 : 60));
write_pdbfile(fp,buf,&atoms,xout,box,'A'+i,1+i);
}
- ffclose(fp);
+ gmx_ffclose(fp);
gmx_thanx(stderr);
else
fprintf(stderr,"Adding '%s' to href's\n",link_text);
- fp=ffopen(out,"w");
+ fp=gmx_ffopen(out,"w");
n_repl=0;
i_str=-1;
fprintf(fp,"%s\n",line);
}
- ffclose(fp);
+ gmx_ffclose(fp);
fprintf(stderr,"Added %d HTML references\n",n_repl);
fn = ftp2fn(efSTO,NFILE,fnm);
if (fn2ftp(fn) == efPDB) {
- fp = ffopen(fn,"w");
+ fp = gmx_ffopen(fn,"w");
if (bDiamond)
fprintf(fp,"HEADER This is a *diamond*\n");
else
nx,ny,nz,odist,hdist);
bromacs(quote,255);
write_pdbfile(fp,quote,pdba,xx,boxje,' ',-1);
- ffclose(fp);
+ gmx_ffclose(fp);
}
else {
bromacs(quote,255);
/* Finish I/O, close files */
if (MASTER(cr)) {
close_trx(status);
- ffclose(fp);
+ gmx_ffclose(fp);
}
}
oldx = x;
}
- ffclose(fp);
+ gmx_ffclose(fp);
do_view(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, 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.
sprintf(fn, "EDdump_node%d_edi%d", cr->nodeid, nr_edi);
- out = ffopen(fn, "w");
+ out = gmx_ffopen(fn, "w");
fprintf(out, "#NINI\n %d\n#FITMAS\n %d\n#ANALYSIS_MAS\n %d\n",
edpars->nini, edpars->fitmas, edpars->pcamas);
fprintf(out, "buf->do_edsam =%p\n", (void*)edpars->buf->do_edsam );
fprintf(out, "buf->do_radcon =%p\n", (void*)edpars->buf->do_radcon );
- ffclose(out);
+ gmx_ffclose(out);
}
/* Return the filenames belonging to cmd-line option opt, or NULL when
* no such option. */
-#define opt2FILE(opt, nfile, fnm, mode) ffopen(opt2fn(opt, nfile, fnm), mode)
+#define opt2FILE(opt, nfile, fnm, mode) gmx_ffopen(opt2fn(opt, nfile, fnm), mode)
/* Return a file pointer from the filename (see above) */
int fn2ftp(const char *fn);
/* Return the number of files for the first option with type ftp
and the files in **fns[] (will be allocated), or NULL when none found. */
-#define ftp2FILE(ftp, nfile, fnm, mode) ffopen(ftp2fn(ftp, nfile, fnm), mode)
+#define ftp2FILE(ftp, nfile, fnm, mode) gmx_ffopen(ftp2fn(ftp, nfile, fnm), mode)
/* Return a file pointer from the filename (see above) */
gmx_bool ftp2bSet(int ftp, int nfile, const t_filenm fnm[]);
#define pclose fah_fclose
#define SKIP_FFOPS 1
#else
-#ifdef ffclose
-#undef ffclose
+#ifdef gmx_ffclose
+#undef gmx_ffclose
#endif
#if (!defined(HAVE_PIPES) && !defined(__native_client__))
static FILE *popen(const char *nm, const char *mode)
#endif /* !defined(HAVE_PIPES) && !defined(__native_client__) */
#endif /* GMX_FAHCORE */
-int ffclose(FILE *fp)
+int gmx_ffclose(FILE *fp)
{
#ifdef SKIP_FFOPS
return fclose(fp);
#endif
}
-FILE *ffopen(const char *file, const char *mode)
+FILE *gmx_ffopen(const char *file, const char *mode)
{
#ifdef SKIP_FFOPS
return fopen(file, mode);
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2001-2004, The GROMACS development team.
+ * 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.
/* Return TRUE on end-of-file, FALSE otherwise */
gmx_bool is_pipe(FILE *fp);
-/* Check whether the file (opened by ffopen) is a pipe */
+/* Check whether the file (opened by gmx_ffopen) is a pipe */
/* Make a backup of file if necessary.
Return false if there was a problem.
*/
gmx_bool make_backup(const char * file);
-FILE *ffopen(const char *file, const char *mode);
+FILE *gmx_ffopen(const char *file, const char *mode);
/* Return a valid file pointer when successful, exits otherwise
* If the file is in compressed format, open a pipe which uncompresses
- * the file! Therefore, files must be closed with ffclose (see below)
+ * the file! Therefore, files must be closed with gmx_ffclose (see below)
*/
-int ffclose(FILE *fp);
+int gmx_ffclose(FILE *fp);
/* Close files or pipes */
gmx_incons("gmx_fio_open may not be used to open TNG files");
}
/* Open the file */
- fio->fp = ffopen(fn, newmode);
+ fio->fp = gmx_ffopen(fn, newmode);
/* determine the XDR direction */
if (newmode[0] == 'w' || newmode[0] == 'a')
else
{
/* If it is not, open it as a regular file */
- fio->fp = ffopen(fn, newmode);
+ fio->fp = gmx_ffopen(fn, newmode);
}
/* for appending seek to end of file to make sure ftell gives correct position
/* Don't close stdin and stdout! */
if (!fio->bStdio && fio->fp != NULL)
{
- rc = ffclose(fio->fp); /* fclose returns 0 if happy */
+ rc = gmx_ffclose(fio->fp); /* fclose returns 0 if happy */
}
fio->bOpen = FALSE;
gmx_fio_lock(fio);
if (!in_ftpset(fio->iFTP, asize(ftpXDR), ftpXDR) && !fio->bStdio)
{
- rc = ffclose(fio->fp); /* fclose returns 0 if happy */
+ rc = gmx_ffclose(fio->fp); /* fclose returns 0 if happy */
fio->fp = NULL;
}
gmx_fio_unlock(fio);
if (fscanf(in, "%d", &nstr) != 1)
{
gmx_warning("File %s is empty", db);
- ffclose(in);
+ gmx_ffclose(in);
return 0;
}
snew(ptr, nstr);
#endif
ptr[i] = strdup(buf);
}
- ffclose(in);
+ gmx_ffclose(in);
*strings = ptr;
if (pret == NULL || sscanf(buf, "%d", &nstr) != 1)
{
gmx_warning("File is empty");
- ffclose(in);
+ gmx_ffclose(in);
return 0;
}
in = libopen(db);
nstr = fget_lines(in, strings);
- ffclose(in);
+ gmx_ffclose(in);
return nstr;
}
i++;
}
nstr = i;
- ffclose(in);
+ gmx_ffclose(in);
srenew(ptr, nstr);
*strings = ptr;
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, 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.
{
fprintf(fp, "%10g %10g\n", time[k], data[k]);
}
- ffclose(fp);
+ gmx_ffclose(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]);
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
/* Compute histogram from # transitions per dihedral */
fprintf(fp, "%10.3f %10d\n", ttime/i, tr_f[i]);
}
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
sfree(tr_f);
}
}
fprintf(fp, "&\n");
- ffclose(fp);
+ gmx_ffclose(fp);
}
/* and finally print out occupancies to a single file */
}
sfree(chi_prtrj);
- ffclose(fpall);
+ gmx_ffclose(fpall);
fprintf(stderr, "\n");
}
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, 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.
FILE *fp;
int i;
- fp = ffopen(s, "w");
+ fp = gmx_ffopen(s, "w");
for (i = 0; (i < n); i++)
{
fprintf(fp, "%10d %10g\n", i, c[i]);
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
real print_and_integrate(FILE *fp, int n, real dt, real c[], real *fit, int nskip)
}
if (debug)
{
- ffclose(gp);
+ gmx_ffclose(gp);
}
if (nitem > 1)
{
}
if (fp)
{
- ffclose(fp);
+ gmx_ffclose(fp);
}
sfree(fit);
}
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, 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.
{
fprintf(fp, "%10g %10d\n", i/fac, histo[i]);
}
- ffclose(fp);
+ gmx_ffclose(fp);
sfree(histo);
}
init_t_atoms(&(pdbf->atoms), natoms, FALSE);
snew(pdbf->x, natoms);
read_stx_conf(fn, buf, &pdbf->atoms, pdbf->x, NULL, &pdbf->ePBC, pdbf->box);
- fp = ffopen(fn, "r");
+ fp = gmx_ffopen(fn, "r");
do
{
ptr = fgets2(buf, 255, fp);
}
}
while (ptr != NULL);
- ffclose(fp);
+ gmx_ffclose(fp);
return pdbf;
}
{
fprintf(fp, "%12lf\n", bFreeSort ? pdbf[i]->efree : pdbf[i]->edocked);
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
}
return 0;
}
- fp = ffopen(opt2fn("-g", NFILE, fnm), "w");
+ fp = gmx_ffopen(opt2fn("-g", NFILE, fnm), "w");
please_cite(stdout, "Hetenyi2002b");
please_cite(fp, "Hetenyi2002b");
cluster_em_all(fp, npdbf, pdbf, bFree, bRMS, cutoff);
gmx_thanx(fp);
- ffclose(fp);
+ gmx_ffclose(fp);
return 0;
}
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, 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.
int g, s, i;
real min, max, xsp, ysp;
- out = ffopen(file, "w");
+ out = gmx_ffopen(file, "w");
if (output_env_get_xvg_format(oenv) == exvgXMGRACE)
{
fprintf(out, "@ autoscale onread none\n");
}
}
}
- ffclose(out);
+ gmx_ffclose(out);
}
static void
rlo.r = 1; rlo.g = 1; rlo.b = 1;
rhi.r = 0; rhi.g = 0; rhi.b = 0;
nlevels = 41;
- out = ffopen(matfile, "w");
+ out = gmx_ffopen(matfile, "w");
write_xpm(out, 0, "Eigenvector inner-products", "in.prod.", "run 1", "run 2",
nx, ny, t_x, t_y, mat, 0.0, max, rlo, rhi, &nlevels);
- ffclose(out);
+ gmx_ffclose(out);
}
static void overlap(const char *outfile, int natoms,
fprintf(out, "%5d %5.3f\n", eignr2[x]+1, overlap/noutvec);
}
- ffclose(out);
+ gmx_ffclose(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]);
}
- ffclose(xvgrout);
+ gmx_ffclose(xvgrout);
}
if (threedplotfile)
strcpy(pdbform, get_pdbformat());
strcat(pdbform, "%8.4f%8.4f\n");
- out = ffopen(threedplotfile, "w");
+ out = gmx_ffopen(threedplotfile, "w");
fprintf(out, "HEADER %s\n", str);
if (b4D)
{
j++;
}
fprintf(out, "TER\n");
- ffclose(out);
+ gmx_ffclose(out);
}
else
{
}
fprintf(stdout, "\n");
- ffclose(fp);
+ gmx_ffclose(fp);
}
static void regression_analysis(int n, gmx_bool bXYdy,
fprintf(fp, "&\n");
}
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
static int real_comp(const void *a, const void *b)
double av, var, err;
real *tmp = NULL;
- fp = ffopen(avfile, "w");
+ fp = gmx_ffopen(avfile, "w");
if ((avbar_opt == avbarERROR) && (nset == 1))
{
avbar_opt = avbarNONE;
}
fprintf(fp, "\n");
}
- ffclose(fp);
+ gmx_ffclose(fp);
if (avbar_opt == avbar90)
{
sfree(fitsig);
sfree(ybs);
sfree(tbs);
- ffclose(fp);
+ gmx_ffclose(fp);
}
static void luzar_correl(int nn, real *time, int nset, real **val, real temp,
if (fitfile != NULL)
{
- out_fit = ffopen(fitfile, "w");
+ out_fit = gmx_ffopen(fitfile, "w");
if (bXYdy && nset >= 2)
{
do_fit(out_fit, 0, TRUE, n, t, val, npargs, ppa, oenv);
do_fit(out_fit, s, FALSE, n, t, val, npargs, ppa, oenv);
}
}
- ffclose(out_fit);
+ gmx_ffclose(out_fit);
}
printf(" std. dev. relative deviation of\n");
fprintf(out, "&\n");
}
}
- ffclose(out);
+ gmx_ffclose(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, 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.
}
fprintf(out, "\n");
}
- ffclose(out);
+ gmx_ffclose(out);
}
if (opt2bSet("-or", NFILE, fnm))
{
fprintf(out, "%10.5f %10.3f\n", time[i], trans_frac[i]);
tfrac += trans_frac[i];
}
- ffclose(out);
+ gmx_ffclose(out);
tfrac /= nframes;
fprintf(stderr, "Average trans fraction: %g\n", tfrac);
fprintf(out, "%10g %10f\n", 180.0, angstat[0]*norm_fac);
}
- ffclose(out);
+ gmx_ffclose(out);
do_view(oenv, opt2fn("-od", NFILE, fnm), "-nxy");
if (bAver)
{
lambda_vec_print_short(results[nresults-1].b->native_lambda, buf);
fprintf(fpi, xvg2format, buf, dg_tot);
- ffclose(fpi);
+ gmx_ffclose(fpi);
}
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, 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.
{
close_trx(fpdb);
}
- ffclose(flen);
- ffclose(fdist);
- ffclose(fz);
- ffclose(ftilt);
- ffclose(ftiltr);
- ffclose(ftiltl);
+ gmx_ffclose(flen);
+ gmx_ffclose(fdist);
+ gmx_ffclose(fz);
+ gmx_ffclose(ftilt);
+ gmx_ffclose(ftiltr);
+ gmx_ffclose(ftiltl);
if (bKink)
{
- ffclose(fkink);
- ffclose(fkinkr);
- ffclose(fkinkl);
+ gmx_ffclose(fkink);
+ gmx_ffclose(fkinkr);
+ gmx_ffclose(fkinkl);
}
return 0;
rt_size = gmx_residuetype_get_size(rt);
if (bSSHisto)
{
- fp = ffopen(ssdump, "r");
+ fp = gmx_ffopen(ssdump, "r");
if (1 != fscanf(fp, "%d", &nres))
{
gmx_fatal(FARGS, "Error reading from file %s", ssdump);
gmx_fatal(FARGS, "Error reading from file %s", ssdump);
}
- ffclose(fp);
+ gmx_ffclose(fp);
/* Four dimensional array... Very cool */
snew(his_aa_ss, 3);
for (i = 0; (i < 3); i++)
}
fprintf(fp, "\n");
}
- ffclose(fp);
+ gmx_ffclose(fp);
for (i = 0; (i < NJC); i++)
{
sfree(leg[i]);
for (k = 0; (k < 3); k++)
{
sprintf(sshisfile, "%s-%s.xvg", hisfile, sss[k]);
- ssfp[k] = ffopen(sshisfile, "w");
+ ssfp[k] = gmx_ffopen(sshisfile, "w");
}
}
for (j = 0; (j < nbin); j++)
}
}
fprintf(fp, "&\n");
- ffclose(fp);
+ gmx_ffclose(fp);
if (bSSHisto)
{
for (k = 0; (k < 3); k++)
{
fprintf(ssfp[k], "&\n");
- ffclose(ssfp[k]);
+ gmx_ffclose(ssfp[k]);
}
}
}
if (bViol)
{
sprintf(fn, "violPhiPsi%s.xvg", dlist[i].name);
- gp = ffopen(fn, "w");
+ gp = gmx_ffopen(fn, "w");
}
Phi = dlist[i].j0[edPhi];
Psi = dlist[i].j0[edPsi];
}
if (bViol)
{
- ffclose(gp);
+ gmx_ffclose(gp);
}
- ffclose(fp);
+ gmx_ffclose(fp);
if (bOm)
{
sprintf(fn, "ramomega%s.xpm", dlist[i].name);
- fp = ffopen(fn, "w");
+ fp = gmx_ffopen(fn, "w");
lo = hi = 0;
for (j = 0; (j < NMAT); j++)
{
nlevels = 20;
write_xpm3(fp, 0, "Omega/Ramachandran Plot", "Deg", "Phi", "Psi",
NMAT, NMAT, axis, axis, mat, lo, 180.0, hi, rlo, rmid, rhi, &nlevels);
- ffclose(fp);
+ gmx_ffclose(fp);
for (j = 0; (j < NMAT); j++)
{
sfree(mat[j]);
{
fprintf(fp, "%10g %10g\n", RAD2DEG*dih[Xi1][j], RAD2DEG*dih[Xi2][j]);
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
else
{
/* fprintf(fp,"%12s\n",dlist[i].name); this confuses xmgrace */
fprintf(fp, "\n");
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
static void order_params(FILE *log,
fprintf(fp, "\n");
/* fprintf(fp,"%12s\n",dlist[i].name); this confuses xmgrace */
}
- ffclose(fp);
+ gmx_ffclose(fp);
if (NULL != pdbfn)
{
}
}
- fp = ffopen(pdbfn, "w");
+ fp = gmx_ffopen(pdbfn, "w");
fprintf(fp, "REMARK generated by g_chi\n");
fprintf(fp, "REMARK "
"B-factor field contains negative of dihedral order parameters\n");
fprintf(fp, buf, "ATOM ", atoms->nr+1+i, "CA", "LEG", ' ',
atoms->nres+1, ' ', x0, y0, z0+(1.2*i), 0.0, -0.1*i);
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
fprintf(log, "Dihedrals with S2 > 0.8\n");
sscanf(maxchistr[0], "%d", &maxchi);
bChi = (maxchi > 0);
- log = ffopen(ftp2fn(efLOG, NFILE, fnm), "w");
+ log = gmx_ffopen(ftp2fn(efLOG, NFILE, fnm), "w");
if (bRamOmega)
{
traj_t_ns = 0.001 * (time[nf-1]-time[0]);
pr_dlist(log, nlist, dlist, traj_t_ns, edPrintST, bPhi, bPsi, bChi, bOmega, maxchi);
pr_dlist(log, nlist, dlist, traj_t_ns, edPrintRO, bPhi, bPsi, bChi, bOmega, maxchi);
- ffclose(log);
+ gmx_ffclose(log);
/* transitions to xvg */
if (bDo_rt)
{
"max %d between two specific clusters\n", ntranst, maxtrans);
if (transfn)
{
- fp = ffopen(transfn, "w");
+ fp = gmx_ffopen(transfn, "w");
i = min(maxtrans+1, 80);
write_xpm(fp, 0, "Cluster Transitions", "# transitions",
"from cluster", "to cluster",
clust->ncl, clust->ncl, axis, axis, trans,
0, maxtrans, rlo, rhi, &i);
- ffclose(fp);
+ gmx_ffclose(fp);
}
if (ntransfn)
{
{
fprintf(fp, "%5d %5d\n", i+1, ntrans[i]);
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
sfree(ntrans);
for (i = 0; i < clust->ncl; i++)
{
fprintf(fp, "%8g %8d\n", time[i], clust->cl[i]);
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
if (sizefn)
{
{
fprintf(fp, "%10d %10g\n", i, eigenvalues[i]);
}
- ffclose(fp);
+ gmx_ffclose(fp);
break;
case m_monte_carlo:
orig = init_mat(rms->nn, FALSE);
bAverage, write_ncl, write_nst, rmsmin, bFit, log,
rlo_bot, rhi_bot, oenv);
}
- ffclose(log);
+ gmx_ffclose(log);
if (bBinary && !bAnalyze)
{
}
}
fprintf(stderr, "\n");
- ffclose(fp);
+ gmx_ffclose(fp);
if (NULL != orig)
{
fp = opt2FILE("-om", NFILE, fnm, "w");
write_xpm(fp, 0, title, "RMSD (nm)", buf, buf,
nf, nf, time, time, orig->mat, 0.0, orig->maxrms,
rlo_top, rhi_top, &nlevels);
- ffclose(fp);
+ gmx_ffclose(fp);
done_mat(&orig);
sfree(orig);
}
*
* 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.
}
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);
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, 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.
find_matching_names(&isize1, index1, atoms1, &isize2, index2, atoms2);
if (matchndxfile)
{
- fp = ffopen(matchndxfile, "w");
+ fp = gmx_ffopen(matchndxfile, "w");
fprintf(fp, "; Matching atoms between %s from %s and %s from %s\n",
groupnames1, conf1file, groupnames2, conf2file);
fprintf(fp, "[ Match_%s_%s ]\n", conf1file, groupnames1);
/* atoms2->resinfo[atoms2->atom[index2[i]].resind].chain = 'B'; */
}
}
- fp = ffopen(outfile, "w");
+ fp = gmx_ffopen(outfile, "w");
if (!bOne)
{
write_pdbfile(fp, title1, atoms1, x1, ePBC1, box1, ' ', 1, NULL, TRUE);
}
write_pdbfile(fp, title2, atoms2, x2, ePBC2, box2, ' ', bOne ? -1 : 2, NULL, TRUE);
- ffclose(fp);
+ gmx_ffclose(fp);
break;
case efGRO:
if (bBfac)
{
fprintf(stderr, "WARNING: cannot write B-factor values to gro file\n");
}
- fp = ffopen(outfile, "w");
+ fp = gmx_ffopen(outfile, "w");
if (!bOne)
{
write_hconf_p(fp, title1, atoms1, 3, x1, v1, box1);
}
write_hconf_p(fp, title2, atoms2, 3, x2, v2, box2);
- ffclose(fp);
+ gmx_ffclose(fp);
break;
default:
if (bBfac)
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, 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.
if (asciifile)
{
- out = ffopen(asciifile, "w");
+ out = gmx_ffopen(asciifile, "w");
for (j = 0; j < ndim; j++)
{
for (i = 0; i < ndim; i += 3)
mat[ndim*j+i], mat[ndim*j+i+1], mat[ndim*j+i+2]);
}
}
- ffclose(out);
+ gmx_ffclose(out);
}
if (xpmfile)
rlo.r = 0; rlo.g = 0; rlo.b = 1;
rmi.r = 1; rmi.g = 1; rmi.b = 1;
rhi.r = 1; rhi.g = 0; rhi.b = 0;
- out = ffopen(xpmfile, "w");
+ out = gmx_ffopen(xpmfile, "w");
nlevels = 80;
write_xpm3(out, 0, "Covariance", bM ? "u nm^2" : "nm^2",
"dim", "dim", ndim, ndim, axis, axis,
mat2, min, 0.0, max, rlo, rmi, rhi, &nlevels);
- ffclose(out);
+ gmx_ffclose(out);
sfree(axis);
sfree(mat2);
}
rlo.r = 0; rlo.g = 0; rlo.b = 1;
rmi.r = 1; rmi.g = 1; rmi.b = 1;
rhi.r = 1; rhi.g = 0; rhi.b = 0;
- out = ffopen(xpmafile, "w");
+ out = gmx_ffopen(xpmafile, "w");
nlevels = 80;
write_xpm3(out, 0, "Covariance", bM ? "u nm^2" : "nm^2",
"atom", "atom", ndim/DIM, ndim/DIM, axis, axis,
mat2, min, 0.0, max, rlo, rmi, rhi, &nlevels);
- ffclose(out);
+ gmx_ffclose(out);
sfree(axis);
for (i = 0; i < ndim/DIM; i++)
{
{
fprintf (out, "%10d %g\n", (int)i+1, eigenvalues[ndim-1-i]);
}
- ffclose(out);
+ gmx_ffclose(out);
if (end == -1)
{
write_eigenvectors(eigvecfile, natoms, mat, TRUE, 1, end,
WriteXref, x, bDiffMass1, xproj, bM, eigenvalues);
- out = ffopen(logfile, "w");
+ out = gmx_ffopen(logfile, "w");
time(&now);
gmx_ctime_r(&now, timebuf, STRLEN);
fprintf(out, "Wrote average structure to %s and %s\n", averfile, eigvecfile);
fprintf(out, "Wrote eigenvectors %d to %d to %s\n", 1, end, eigvecfile);
- ffclose(out);
+ gmx_ffclose(out);
fprintf(stderr, "Wrote the log to %s\n", logfile);
temp, trust, bfit, efit, bvit, evit, status, isize, nmols, nshift,
index0, indexm, mass2, qmol, eps_rf, oenv);
- ffclose(fmj);
- ffclose(fmd);
- ffclose(fmjdsp);
+ gmx_ffclose(fmj);
+ gmx_ffclose(fmd);
+ gmx_ffclose(fmjdsp);
if (bACF)
{
- ffclose(outf);
+ gmx_ffclose(outf);
}
if (bINT)
{
- ffclose(mcor);
+ gmx_ffclose(mcor);
}
return 0;
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, 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.
int nr; /* number of atomstypes to read */
int i;
- if (!(in = ffopen(fn, "r")))
+ if (!(in = gmx_ffopen(fn, "r")))
{
gmx_fatal(FARGS, "Couldn't open %s. Exiting.\n", fn);
}
(*eltab)[i].nr_el = tempnr;
(*eltab)[i].atomname = strdup(tempname);
}
- ffclose(in);
+ gmx_ffclose(in);
/* sort the list */
fprintf(stderr, "Sorting list..\n");
fprintf(den, "\n");
}
- ffclose(den);
+ gmx_ffclose(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, 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.
}
if (ftp2bSet(efDAT, NFILE, fnm))
{
- fp = ffopen(ftp2fn(efDAT, NFILE, fnm), "w");
+ fp = gmx_ffopen(ftp2fn(efDAT, NFILE, fnm), "w");
/*optional text form output: first row is tickz; first col is tickx */
fprintf(fp, "0\t");
for (j = 0; j < n2; ++j)
}
fprintf(fp, "\n");
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
else
{
- fp = ffopen(ftp2fn(efXPM, NFILE, fnm), "w");
+ fp = gmx_ffopen(ftp2fn(efXPM, NFILE, fnm), "w");
write_xpm(fp, MAT_SPATIAL_X | MAT_SPATIAL_Y, buf, unit,
bRadial ? "axial (nm)" : label[c1], bRadial ? "r (nm)" : label[c2],
n1, n2, tickx, tickz, grid, dmin, maxgrid, rlo, rhi, &nlev);
- ffclose(fp);
+ gmx_ffclose(fp);
}
do_view(oenv, opt2fn("-o", NFILE, fnm), NULL);
dim[2] = yslices;
dim[3] = zslices;
- fldH = ffopen(fldfn, "w");
+ fldH = gmx_ffopen(fldfn, "w");
fwrite(dim, sizeof(int), 4, fldH);
for (n = 0; n < tdim; n++)
{
}
totdens /= (xslices*yslices*zslices*tdim);
fprintf(stderr, "Total density [kg/m^3] %8f", totdens);
- ffclose(fldH);
+ gmx_ffclose(fldH);
}
static void filterdensmap(real ****Densmap, int xslices, int yslices, int zslices, int tblocks, int ftsize)
yticks[j] += bw;
}
- xpmfile1 = ffopen(outfiles[0], "w");
- xpmfile2 = ffopen(outfiles[1], "w");
+ xpmfile1 = gmx_ffopen(outfiles[0], "w");
+ xpmfile2 = gmx_ffopen(outfiles[1], "w");
max1 = max2 = 0.0;
min1 = min2 = zbins*bwz;
write_xpm(xpmfile2, 3, numbuf, "Height", "x[nm]", "y[nm]", xbins, ybins, xticks, yticks, profile2, min2, max2, lo, hi, &maplevels);
}
- ffclose(xpmfile1);
- ffclose(xpmfile2);
+ gmx_ffclose(xpmfile1);
+ gmx_ffclose(xpmfile2);
sfree(profile1);
FILE *raw1, *raw2;
int i, j, n;
- raw1 = ffopen(fnms[0], "w");
- raw2 = ffopen(fnms[1], "w");
+ raw1 = gmx_ffopen(fnms[0], "w");
+ raw2 = gmx_ffopen(fnms[1], "w");
try
{
gmx::BinaryInformationSettings settings;
}
}
- ffclose(raw1);
- ffclose(raw2);
+ gmx_ffclose(raw1);
+ gmx_ffclose(raw2);
}
}
}
- tmpfp = ffopen("integral_smth.xvg", "w");
+ tmpfp = gmx_ffopen("integral_smth.xvg", "w");
integralSmth = print_and_integrate(tmpfp, nx, x[1]-x[0], combined, NULL, 1);
printf("SMOOTH integral = %10.5e\n", integralSmth);
}
printf("MAXEPS = %10.5e at frequency %10.5e GHz (tauD = %8.1f ps)\n",
maxeps, numax, 1000/(2*M_PI*numax));
- ffclose(fp);
- ffclose(cp);
+ gmx_ffclose(fp);
+ gmx_ffclose(cp);
sfree(tmp);
}
}
/*2.0*j/(gb->ny-1.0)-1.0;*/
}
- out = ffopen(cmap, "w");
+ out = gmx_ffopen(cmap, "w");
write_xpm(out, 0,
"Dipole Orientation Distribution", "Fraction", "r (nm)",
gb->bPhi ? "Phi" : "Alpha",
gb->nx, gb->ny, xaxis, yaxis,
gb->cmap, 0, hi, rlo, rhi, nlevels);
- ffclose(out);
+ gmx_ffclose(out);
sfree(xaxis);
sfree(yaxis);
}
/* Swap x0 and x1 */
x0 = x1;
}
- ffclose(fp);
+ gmx_ffclose(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);
}
- ffclose(fp);
+ gmx_ffclose(fp);
do_view(oenv, fn, "-autoscale xy -nxy");
}
snew(dipsp, gnx_tot);
/* we need a dummy file for gnuplot */
- dip3d = (FILE *)ffopen("dummy.dat", "w");
+ dip3d = (FILE *)gmx_ffopen("dummy.dat", "w");
fprintf(dip3d, "%f %f %f", 0.0, 0.0, 0.0);
- ffclose(dip3d);
+ gmx_ffclose(dip3d);
- dip3d = (FILE *)ffopen(fndip3d, "w");
+ dip3d = (FILE *)gmx_ffopen(fndip3d, "w");
try
{
gmx::BinaryInformationSettings settings;
close_trj(status);
}
- ffclose(outmtot);
- ffclose(outaver);
- ffclose(outeps);
+ gmx_ffclose(outmtot);
+ gmx_ffclose(outaver);
+ gmx_ffclose(outeps);
if (fnadip)
{
- ffclose(adip);
+ gmx_ffclose(adip);
}
if (cosaver)
{
- ffclose(caver);
+ gmx_ffclose(caver);
}
if (dip3d)
fprintf(dip3d, "set zrange [0.0:%4.2f]\n\n", box[ZZ][ZZ]);
fprintf(dip3d, "splot 'dummy.dat' using 1:2:3 w vec\n");
fprintf(dip3d, "pause -1 'Hit return to continue'\n");
- ffclose(dip3d);
+ gmx_ffclose(dip3d);
}
if (bSlab)
fprintf(outdd, "%10g %10f\n",
(i*mu_max)/ndipbin, dipole_bin[i]/(double)teller);
}
- ffclose(outdd);
+ gmx_ffclose(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, 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.
hi = max_dr;
}
printf("Highest level in the matrix will be %g\n", hi);
- fp = ffopen(fn, "w");
+ fp = gmx_ffopen(fn, "w");
write_xpm(fp, 0, "Distance Violations", "<V> (nm)", "Residue", "Residue",
n_res, n_res, t_res, t_res, matrix, 0, hi, rlo, rhi, &nlevels);
- ffclose(fp);
+ gmx_ffclose(fp);
}
int gmx_disre(int argc, char *argv[])
}
dump_disre_matrix(opt2fn_null("-x", NFILE, fnm), &dr, fcd.disres.nres,
j, &top->idef, &mtop, max_dr, nlevels, bThird);
- ffclose(out);
- ffclose(aver);
- ffclose(numv);
- ffclose(maxxv);
+ gmx_ffclose(out);
+ gmx_ffclose(aver);
+ gmx_ffclose(numv);
+ gmx_ffclose(maxxv);
if (isize > 0)
{
- ffclose(xvg);
+ gmx_ffclose(xvg);
do_view(oenv, opt2fn("-dr", NFILE, fnm), "-nxy");
}
do_view(oenv, opt2fn("-dn", NFILE, fnm), "-nxy");
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).
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);
}
}
}
fprintf(fp, "\n");
- ffclose(fp);
+ gmx_ffclose(fp);
sfree(leg);
sfree(count);
}
}
}
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);
}
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * 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.
if (bRKout)
{
- ffclose(rkfp);
+ gmx_ffclose(rkfp);
}
if (bDatout)
{
- ffclose(datfp);
+ gmx_ffclose(datfp);
}
if (bInstEffout)
{
- ffclose(iefp);
+ gmx_ffclose(iefp);
}
fprintf(rhfp, "%12.7f %12.7f\n", (i + 0.5) * rincr + rmin,
rhist[i]);
}
- ffclose(rhfp);
+ gmx_ffclose(rhfp);
}
if (bKhistout)
fprintf(khfp, "%12.7f %12.7f\n", (i + 0.5) * kincr + kmin,
khist[i]);
}
- ffclose(khfp);
+ gmx_ffclose(khfp);
}
printf("\nAverages:\n");
if (outftp == efPDB)
{
- out = ffopen(outfile, "w");
+ out = gmx_ffopen(outfile, "w");
write_pdbfile_indexed(out, title, &atoms, x, ePBC, box, ' ', 1, isize, index, conect, TRUE);
- ffclose(out);
+ gmx_ffclose(out);
}
else
{
if ((outftp == efPDB) || (outftp == efPQR))
{
- out = ffopen(outfile, "w");
+ out = gmx_ffopen(outfile, "w");
if (bMead)
{
set_pdb_wide_format(TRUE);
visualize_box(out, bLegend ? atoms.nr+12 : atoms.nr,
bLegend ? atoms.nres = 12 : atoms.nres, box, visbox);
}
- ffclose(out);
+ gmx_ffclose(out);
}
else
{
sprintf(fn, "%s%s", egrp_nm[m], ftp2fn(efXPM, NFILE, fnm));
sprintf(label, "%s Interaction Energies", egrp_nm[m]);
- out = ffopen(fn, "w");
+ out = gmx_ffopen(fn, "w");
if (emin >= emid)
{
write_xpm(out, 0, label, "Energy (kJ/mol)",
ngroups, ngroups, groupnr, groupnr, emat[m],
emin, emid, emax, rlo, rmid, rhi, &nlevels);
}
- ffclose(out);
+ gmx_ffclose(out);
}
}
}
}
fprintf(out, "\n");
}
- ffclose(out);
+ gmx_ffclose(out);
}
else
{
write_matrix(out,ngroups,1,ngroups,groupnr,emat,label,emin,emax,nlevels);
n++;
}
- ffclose(out);
+ gmx_ffclose(out);
*/
}
close_enx(in);
fprintf(vout, "%10d %10.5e\n", j, mypow(violaver[j]/nframes, minthird));
}
#endif
- ffclose(vout);
+ gmx_ffclose(vout);
fprintf(stdout, "\nSum of violations averaged over simulation: %g nm\n",
sumt);
}
fprintf(fp1, "\n");
}
- ffclose(fp0);
- ffclose(fp1);
+ gmx_ffclose(fp0);
+ gmx_ffclose(fp1);
}
typedef struct {
intBulk += 0.5*(eneset[11][i-1] + eneset[11][i])*factor;
fprintf(fp, "%10g %10g %10g\n", (i*Dt), integral, intBulk);
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
else if (bCorr)
{
}
if (fp)
{
- ffclose(fp);
+ gmx_ffclose(fp);
}
sfree(fr);
}
close_enx(fp);
if (out)
{
- ffclose(out);
+ gmx_ffclose(out);
}
if (bDRAll)
{
- ffclose(fp_pairs);
+ gmx_ffclose(fp_pairs);
}
if (bORT)
{
- ffclose(fort);
+ gmx_ffclose(fort);
}
if (bODT)
{
- ffclose(fodt);
+ gmx_ffclose(fodt);
}
if (bORA)
{
{
fprintf(out, "%5d %g\n", or_label[i], orient[i]/norfr);
}
- ffclose(out);
+ gmx_ffclose(out);
}
if (bODA)
{
{
fprintf(out, "%5d %g\n", or_label[i], orient[i]/norfr-oobs[i]);
}
- ffclose(out);
+ gmx_ffclose(out);
}
if (bODR)
{
{
fprintf(out, "%5d %g\n", or_label[i], sqrt(odrms[i]/norfr));
}
- ffclose(out);
+ gmx_ffclose(out);
}
if (bOTEN)
{
- ffclose(foten);
+ gmx_ffclose(foten);
}
if (bDisRe)
{
if (fp_dhdl)
{
- ffclose(fp_dhdl);
+ gmx_ffclose(fp_dhdl);
printf("\n\nWrote %d lambda values with %d samples as ",
dh_lambdas, dh_samples);
if (dh_hists > 0)
gmx_bool bMolecules;
printf("\nProcessing topology\n");
- fpin = ffopen(topinout, "r");
- fpout = ffopen(TEMP_FILENM, "w");
+ fpin = gmx_ffopen(topinout, "r");
+ fpout = gmx_ffopen(TEMP_FILENM, "w");
line = 0;
bMolecules = FALSE;
nmol_line++;
}
}
- ffclose(fpin);
+ gmx_ffclose(fpin);
if (sol_line == -1)
{
- ffclose(fpout);
+ gmx_ffclose(fpout);
gmx_fatal(FARGS, "No line with moleculetype '%s' found the [ molecules ] section of file '%s'", grpname, topinout);
}
if (nsol_last < p_num+n_num)
{
- ffclose(fpout);
+ gmx_ffclose(fpout);
gmx_fatal(FARGS, "The last entry for moleculetype '%s' in the [ molecules ] section of file '%s' has less solvent molecules (%d) than were replaced (%d)", grpname, topinout, nsol_last, p_num+n_num);
}
}
}
}
- ffclose(fpout);
- /* use ffopen to generate backup of topinout */
- fpout = ffopen(topinout, "w");
- ffclose(fpout);
+ gmx_ffclose(fpout);
+ /* use gmx_ffopen to generate backup of topinout */
+ fpout = gmx_ffopen(topinout, "w");
+ gmx_ffclose(fpout);
rename(TEMP_FILENM, topinout);
#undef TEMP_FILENM
}
fprintf(out, "%d\n", i+1);
}
}
- ffclose(out);
+ gmx_ffclose(out);
}
else if ((bDisre || bConstr) && x)
{
}
}
}
- ffclose(out);
+ gmx_ffclose(out);
}
else
{
fprintf(out, "%4d %4d %10g %10g %10g\n",
ind_grp[i]+1, 1, fc[XX], fc[YY], fc[ZZ]);
}
- ffclose(out);
+ gmx_ffclose(out);
}
if (xfn)
{
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, 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.
gmx_rmpbc_done(gpbc);
}
- ffclose(out);
+ gmx_ffclose(out);
if (bACF)
{
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, 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.
factor*dipole[slice][ZZ], order[slice]);
}
- ffclose(ord);
+ gmx_ffclose(ord);
}
int gmx_h2order(int argc, char *argv[])
integral += x1;
}
integral *= dt;
- ffclose(fp);
+ gmx_ffclose(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");
{
return;
}
- fp = ffopen("debug-ac.xvg", "w");
+ fp = gmx_ffopen("debug-ac.xvg", "w");
for (j = 0; (j < nframes); j++)
{
fprintf(fp, "%10.3f", hb->time[j]);
}
fprintf(fp, "\n");
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
static real calc_dg(real tau, real temp)
fprintf(fp, "%10g %10g %10g %10g %10g\n",
hb->time[j]-hb->time[0], ct[j], cct[j], ght[j], kt[j]);
}
- ffclose(fp);
+ gmx_ffclose(fp);
analyse_corr(nn, hb->time, ct, ght, kt, NULL, NULL, NULL,
fit_start, temp, smooth_tail_start, oenv);
fp = opt2FILE("-hbn", nfile, fnm, "w");
if (opt2bSet("-g", nfile, fnm))
{
- fplog = ffopen(opt2fn("-g", nfile, fnm), "w");
+ fplog = gmx_ffopen(opt2fn("-g", nfile, fnm), "w");
fprintf(fplog, "# %10s %12s %12s\n", "Donor", "Hydrogen", "Acceptor");
}
else
}
}
}
- ffclose(fp);
+ gmx_ffclose(fp);
if (fplog)
{
- ffclose(fplog);
+ gmx_ffclose(fplog);
}
}
close_trj(status);
if (fpnhb)
{
- ffclose(fpnhb);
+ gmx_ffclose(fpnhb);
}
/* Compute maximum possible number of different hbonds */
aver_nhb += hb->nhb[i];
aver_dist += hb->ndist[i];
}
- ffclose(fp);
+ gmx_ffclose(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));
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
/* Print HB angle distribution */
{
fprintf(fp, "%10g %10g\n", (i+0.5)*abin, adist[i]/(abin*(real)sum));
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
/* Print HB in alpha-helix */
}
fprintf(fp, "\n");
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
if (!bNN)
{
}
fp = opt2FILE("-hbm", NFILE, fnm, "w");
write_xpm_m(fp, mat);
- ffclose(fp);
+ gmx_ffclose(fp);
for (x = 0; x < mat.nx; x++)
{
sfree(mat.matrix[x]);
}
fprintf(fp, "\n");
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
return 0;
{
sprintf(buf, "%s.out", xf[i].filenm);
remove(buf);
- xf[i].fp2 = ffopen(buf, "w");
+ xf[i].fp2 = gmx_ffopen(buf, "w");
}
}
for (i = 0; (i < efhNR); i++)
{
- ffclose(xf[i].fp);
+ gmx_ffclose(xf[i].fp);
if (xf[i].bfp2)
{
- ffclose(xf[i].fp2);
+ gmx_ffclose(xf[i].fp2);
}
do_view(oenv, xf[i].filenm, "-nxy");
}
natoms = read_first_x(oenv, &status, ftp2fn(efTRX, NFILE, fnm), &t, &x, box);
- fpaxis = ffopen(opt2fn("-oaxis", NFILE, fnm), "w");
- fpcenter = ffopen(opt2fn("-ocenter", NFILE, fnm), "w");
- fprise = ffopen(opt2fn("-orise", NFILE, fnm), "w");
- fpradius = ffopen(opt2fn("-oradius", NFILE, fnm), "w");
- fptwist = ffopen(opt2fn("-otwist", NFILE, fnm), "w");
- fpbending = ffopen(opt2fn("-obending", NFILE, fnm), "w");
+ fpaxis = gmx_ffopen(opt2fn("-oaxis", NFILE, fnm), "w");
+ fpcenter = gmx_ffopen(opt2fn("-ocenter", NFILE, fnm), "w");
+ fprise = gmx_ffopen(opt2fn("-orise", NFILE, fnm), "w");
+ fpradius = gmx_ffopen(opt2fn("-oradius", NFILE, fnm), "w");
+ fptwist = gmx_ffopen(opt2fn("-otwist", NFILE, fnm), "w");
+ fpbending = gmx_ffopen(opt2fn("-obending", NFILE, fnm), "w");
- fptheta1 = ffopen("theta1.xvg", "w");
- fptheta2 = ffopen("theta2.xvg", "w");
- fptheta3 = ffopen("theta3.xvg", "w");
+ fptheta1 = gmx_ffopen("theta1.xvg", "w");
+ fptheta2 = gmx_ffopen("theta2.xvg", "w");
+ fptheta3 = gmx_ffopen("theta3.xvg", "w");
if (bIncremental)
{
gmx_rmpbc_done(gpbc);
- ffclose(fpaxis);
- ffclose(fpcenter);
- ffclose(fptilt);
- ffclose(fprotation);
- ffclose(fprise);
- ffclose(fpradius);
- ffclose(fptwist);
- ffclose(fpbending);
- ffclose(fptheta1);
- ffclose(fptheta2);
- ffclose(fptheta3);
+ gmx_ffclose(fpaxis);
+ gmx_ffclose(fpcenter);
+ gmx_ffclose(fptilt);
+ gmx_ffclose(fprotation);
+ gmx_ffclose(fprise);
+ gmx_ffclose(fpradius);
+ gmx_ffclose(fptwist);
+ gmx_ffclose(fpbending);
+ gmx_ffclose(fptheta1);
+ gmx_ffclose(fptheta2);
+ gmx_ffclose(fptheta3);
close_trj(status);
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2010,2011,2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,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.
yticks[j] += bw;
}
- xpmfile1 = ffopen(outfiles[0], "w");
- xpmfile2 = ffopen(outfiles[1], "w");
+ xpmfile1 = gmx_ffopen(outfiles[0], "w");
+ xpmfile2 = gmx_ffopen(outfiles[1], "w");
max1 = max2 = 0.0;
min1 = min2 = 1000.00;
write_xpm(xpmfile2, 3, numbuf, "Height", "x[nm]", "y[nm]", xbins, ybins, xticks, yticks, profile2, min2, max2, lo, hi, &maplevels);
}
- ffclose(xpmfile1);
- ffclose(xpmfile2);
+ gmx_ffclose(xpmfile1);
+ gmx_ffclose(xpmfile2);
FILE *raw1, *raw2;
int i, j, n;
- raw1 = ffopen(fnms[0], "w");
- raw2 = ffopen(fnms[1], "w");
+ raw1 = gmx_ffopen(fnms[0], "w");
+ raw2 = gmx_ffopen(fnms[1], "w");
fprintf(raw1, "#Legend\n#TBlock\n#Xbin Ybin Z t\n");
fprintf(raw2, "#Legend\n#TBlock\n#Xbin Ybin Z t\n");
for (n = 0; n < tblocks; n++)
}
}
- ffclose(raw1);
- ffclose(raw2);
+ gmx_ffclose(raw1);
+ gmx_ffclose(raw2);
}
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, 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.
(d->sumft[i]-d->sumfct[i])*norm);
}
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
if (!d->bSum && rfn)
{
fprintf(fp, "\n");
}
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
if (fn2 && (d->nstate > 2))
(d->sumit[i]-d->sumict[i])*norm);
}
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
if (mfn)
{
DG = BOLTZ*i*log(fff/(1-fff));
fprintf(fp, "%5d %8.3f %8.3f\n", i, fff, DG);
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
}
}
fprintf(hp, "&\n");
}
- ffclose(hp);
+ gmx_ffclose(hp);
for (i = 0; (i < d->nparams); i++)
{
d->params[i] = params[i];
dfile = opt2fn("-d", NFILE, fnm);
dfile2 = opt2fn_null("-d2", NFILE, fnm);
- fp = ffopen(opt2fn("-g", NFILE, fnm), "w");
+ fp = gmx_ffopen(opt2fn("-g", NFILE, fnm), "w");
remd.temp = read_xvg_time(tfile, bHaveT,
opt2parg_bSet("-b", NPA, pa), tb,
optimize_remd_parameters(&remd, maxiter, tol);
dump_remd_parameters(fp, &remd, "test1.xvg", NULL, NULL, NULL, NULL, skip, tref, oenv);
}
- ffclose(fp);
+ gmx_ffclose(fp);
view_all(oenv, NFILE, fnm);
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, 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.
}
}
close_enx(fp);
- ffclose(out);
+ gmx_ffclose(out);
fprintf(stderr, "\n");
if (nframes > 0)
/*
* This file is part of the GROMACS molecular simulation package.
*
- * 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.
}
/* Write edi-file */
- write_the_whole_thing(ffopen(EdiFile, "w"), &edi_params, eigvec1, nvec1, listen, evStepList);
+ write_the_whole_thing(gmx_ffopen(EdiFile, "w"), &edi_params, eigvec1, nvec1, listen, evStepList);
return 0;
}
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, 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.
gmx_rmpbc_done(gpbc);
if (bFrames)
{
- ffclose(out);
+ gmx_ffclose(out);
}
fprintf(stderr, "Processed %d frames\n", nframes);
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]);
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
return 0;
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, 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.
gmx_rmpbc_done(gpbc);
}
- ffclose(out);
+ gmx_ffclose(out);
fprintf(stdout,
"\nThe shortest periodic distance is %g (nm) at time %g (%s),\n"
dist = xvgropen(dfile, buf, output_env_get_time_label(oenv), "Distance (nm)", oenv);
sprintf(buf, "Number of Contacts %s %g nm", bMin ? "<" : ">", rcut);
num = nfile ? xvgropen(nfile, buf, output_env_get_time_label(oenv), "Number", oenv) : NULL;
- atm = afile ? ffopen(afile, "w") : NULL;
+ atm = afile ? gmx_ffopen(afile, "w") : NULL;
trxout = xfile ? open_trx(xfile, "w") : NULL;
if (bMat)
while (read_next_x(oenv, status, &t, x0, box));
close_trj(status);
- ffclose(dist);
+ gmx_ffclose(dist);
if (num)
{
- ffclose(num);
+ gmx_ffclose(num);
}
if (atm)
{
- ffclose(atm);
+ gmx_ffclose(atm);
}
if (trxout)
{
*
* 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.
fprintf(out, "\n");
}
}
- ffclose(out);
+ gmx_ffclose(out);
return 0;
}
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, 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.
if (bRMS)
{
- ffclose(fp);
+ gmx_ffclose(fp);
do_view(oenv, opt2fn("-or", NFILE, fnm), "-nxy");
}
}
fprintf(out, "\n");
}
- ffclose(out);
+ gmx_ffclose(out);
}
/* called from corr_loop, to do the main calculations */
}
}
}
- ffclose(out);
+ gmx_ffclose(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, 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.
{
fprintf (out, "%6d %15g\n", begin+i, eigenvalues[i]);
}
- ffclose(out);
+ gmx_ffclose(out);
if (opt2bSet("-qc", NFILE, fnm))
qutot += qu;
}
}
- ffclose(out);
+ gmx_ffclose(out);
if (NULL != spec)
{
for (j = 0; (j < maxspec); j++)
{
fprintf(spec, "%10g %10g\n", 1.0*j, spectrum[j]);
}
- ffclose(spec);
+ gmx_ffclose(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);
- ffclose(qc);
+ gmx_ffclose(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, 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.
sfree(index);
sfree(isize);
- ffclose(fpsg);
- ffclose(fpsk);
+ gmx_ffclose(fpsg);
+ gmx_ffclose(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);
}
- ffclose(fpsg);
- ffclose(fpsk);
+ gmx_ffclose(fpsg);
+ gmx_ffclose(fpsk);
}
0.333 * order[atom][YY]));
}
- ffclose(ord);
- ffclose(slOrd);
+ gmx_ffclose(ord);
+ gmx_ffclose(slOrd);
}
}
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, 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.
close_trx(status);
- ffclose(out);
+ gmx_ffclose(out);
if (outv)
{
- ffclose(outv);
+ gmx_ffclose(outv);
}
if (outp)
{
- ffclose(outp);
+ gmx_ffclose(outp);
}
sum_eed2_tot /= frame;
{
fprintf(outi, "%d %8.4f\n", i+1, intd[i]);
}
- ffclose(outi);
+ gmx_ffclose(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, 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.
fprintf(fie, "\n");
}
- ffclose(pot);
- ffclose(cha);
- ffclose(fie);
+ gmx_ffclose(pot);
+ gmx_ffclose(cha);
+ gmx_ffclose(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, 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.
return 0;
}
- axis1 = ffopen(opt2fn("-a1", NFILE, fnm), "w");
- axis2 = ffopen(opt2fn("-a2", NFILE, fnm), "w");
- axis3 = ffopen(opt2fn("-a3", NFILE, fnm), "w");
- fmoi = ffopen(opt2fn("-om", NFILE, fnm), "w");
+ axis1 = gmx_ffopen(opt2fn("-a1", NFILE, fnm), "w");
+ axis2 = gmx_ffopen(opt2fn("-a2", NFILE, fnm), "w");
+ axis3 = gmx_ffopen(opt2fn("-a3", NFILE, fnm), "w");
+ fmoi = gmx_ffopen(opt2fn("-om", NFILE, fnm), "w");
read_tps_conf(ftp2fn(efTPS, NFILE, fnm), title, &top, &ePBC, NULL, NULL, box, TRUE);
close_trj(status);
- ffclose(axis1);
- ffclose(axis2);
- ffclose(axis3);
- ffclose(fmoi);
+ gmx_ffclose(axis1);
+ gmx_ffclose(axis2);
+ gmx_ffclose(axis3);
+ gmx_ffclose(fmoi);
return 0;
}
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, 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.
}
while (new_data(xr));
fprintf(stderr, "\n");
- ffclose(out);
+ gmx_ffclose(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, 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.
}
fprintf(fp, "\n");
}
- ffclose(fp);
+ gmx_ffclose(fp);
do_view(oenv, fnRDF, NULL);
{
fprintf(fp, "%10g %10g\n", i*0.5, hq[i]);
}
- ffclose(fp);
+ gmx_ffclose(fp);
do_view(oenv, fnHQ, NULL);
sfree(hq);
sfree(integrand);
}
fprintf(fp, "\n");
}
- ffclose(fp);
+ gmx_ffclose(fp);
sfree(sum);
do_view(oenv, fnCNRDF, NULL);
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, 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.
del_yaxis[i] = delta_maxy*i/del_lev;
}
sprintf(buf, "%s %s vs. delta t", gn_rms[0], whatname[ewhat]);
- fp = ffopen("delta.xpm", "w");
+ fp = gmx_ffopen("delta.xpm", "w");
write_xpm(fp, 0, buf, "density", output_env_get_time_label(oenv), whatlabel[ewhat],
delta_xsize, del_lev+1, del_xaxis, del_yaxis,
delta, 0.0, delta_max, rlo, rhi, &nlevels);
- ffclose(fp);
+ gmx_ffclose(fp);
}
if (opt2bSet("-bin", NFILE, fnm))
{
gmx_fatal(FARGS, "Error writing to output file");
}
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
}
if (bBond)
}
fprintf(fp, "\n");
}
- ffclose(fp);
+ gmx_ffclose(fp);
if (bMirror)
{
}
fprintf(fp, "\n");
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
if (bAv)
{
fprintf(fp, "%10d %10g\n", j, rlstot/teller);
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
if (bNorm)
{
fprintf(fp, "%10d %10g\n", j, rlsnorm[j]/teller);
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
do_view(oenv, opt2fn_null("-a", NFILE, fnm), "-graphtype bar");
do_view(oenv, opt2fn("-o", NFILE, fnm), NULL);
int neq, na, n, resnr;
t_equiv **equiv;
- fp = ffopen(eq_fn, "r");
+ fp = gmx_ffopen(eq_fn, "r");
neq = 0;
equiv = NULL;
while (get_a_line(fp, line, STRLEN))
/* next */
neq++;
}
- ffclose(fp);
+ gmx_ffclose(fp);
*equivptr = equiv;
while (read_next_x(oenv, status, &t, x, box));
fprintf(stderr, "\n");
- ffclose(fp);
+ gmx_ffclose(fp);
teller = nframes_read(status);
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, 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.
}
}
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
static void average_residues(double f[], double **U, int uind,
{
fprintf(stdout, "\n");
print_dir(stdout, Uaver);
- fp = ffopen(dirfn, "w");
+ fp = gmx_ffopen(dirfn, "w");
print_dir(fp, Uaver);
- ffclose(fp);
+ gmx_ffclose(fp);
}
for (i = 0; i < isize; i++)
pdb_bfac);
}
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
else
{
bRes ? top.atoms.resinfo[top.atoms.atom[index[i]].resind].nr : index[i]+1, sqrt(rmsf[i]));
}
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
for (i = 0; i < isize; i++)
bRes ? top.atoms.resinfo[top.atoms.atom[index[i]].resind].nr : index[i]+1, sqrt(rmsf[i]));
}
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
if (opt2bSet("-oq", NFILE, fnm))
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2009,2010,2011,2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,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.
close_trj(status);
- ffclose(out);
+ gmx_ffclose(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, 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.
{
fprintf(fp, "%10g %10g\n", time[k], cgdist[i][j][k]);
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
}
}
}
for (m = 0; (m < 3); m++)
{
- ffclose(out[m]);
+ gmx_ffclose(out[m]);
if (nset[m] == 0)
{
remove(fn[m]);
*
* 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.
add_rec(c, j, i, d2);
}
}
- fp = ffopen(fn, "a");
+ fp = gmx_ffopen(fn, "a");
for (i = 0; (i < n); i++)
{
if ((c[i].aa == NO_ATID) || (c[i].ab == NO_ATID))
}
fprintf(fp, "CONECT%5d%5d%5d\n", i+1, c[i].aa+1, c[i].ab+1);
}
- ffclose(fp);
+ gmx_ffclose(fp);
sfree(c);
}
fprintf(stderr, "\n");
close_trj(status);
- ffclose(fp);
+ gmx_ffclose(fp);
if (vp)
{
- ffclose(vp);
+ gmx_ffclose(vp);
}
/* if necessary, print areas per atom to file too: */
}
if (bITP)
{
- ffclose(fp3);
+ gmx_ffclose(fp3);
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
/* Be a good citizen, keep our memory free! */
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, 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.
FILE * fp;
int z, i, j, n;
- fp = ffopen(file, "w");
+ fp = gmx_ffopen(file, "w");
/* The REMARKS part is the worst part of the XPLOR format
* and may cause problems with some programs
*/
}
}
fprintf(fp, " -9999\n");
- ffclose(fp);
+ gmx_ffclose(fp);
}
static void write_xplor(const char *file, real *data, int *ibox, real dmin[], real dmax[])
snew(mm, len);
nmin = 0;
- fp = ffopen(logfile, "w");
+ fp = gmx_ffopen(logfile, "w");
/* Loop over each element in the array of dimenion ndim seeking
* minima with respect to every dimension. Specialized loops for
* speed with ndim == 2 and ndim == 3. */
{
print_minimum(fp, i, &mm[i]);
}
- ffclose(fp);
+ gmx_ffclose(fp);
sfree(mm);
}
Smax = Emax-Smin;
Sinf = Smax+1;
/* Write out the free energy as a function of bin index */
- fp = ffopen(fn, "w");
+ fp = gmx_ffopen(fn, "w");
for (i = 0; (i < len); i++)
{
if (P[i] != 0)
S[i] = Sinf;
}
}
- ffclose(fp);
+ gmx_ffclose(fp);
/* Organize the structures in the bins */
snew(b, 1);
snew(b->index, len+1);
}
*/
/* Write the index file */
- fp = ffopen(ndx, "w");
+ fp = gmx_ffopen(ndx, "w");
for (i = 0; (i < len); i++)
{
if (nbin[i] > 0)
}
}
}
- ffclose(fp);
+ gmx_ffclose(fp);
snew(axis_x, ibox[0]+1);
snew(axis_y, ibox[1]+1);
snew(axis_z, ibox[2]+1);
EE[i] = &(E[i*ibox[1]]);
SS[i] = &(S[i*ibox[1]]);
}
- fp = ffopen(xpmP, "w");
+ fp = gmx_ffopen(xpmP, "w");
write_xpm(fp, flags, "Probability Distribution", "", "PC1", "PC2",
ibox[0], ibox[1], axis_x, axis_y, PP, 0, Pmax, rlo, rhi, &nlevels);
- ffclose(fp);
- fp = ffopen(xpm, "w");
+ gmx_ffclose(fp);
+ fp = gmx_ffopen(xpm, "w");
write_xpm(fp, flags, "Gibbs Energy Landscape", "G (kJ/mol)", "PC1", "PC2",
ibox[0], ibox[1], axis_x, axis_y, WW, 0, gmax, rlo, rhi, &nlevels);
- ffclose(fp);
- fp = ffopen(xpm2, "w");
+ gmx_ffclose(fp);
+ fp = gmx_ffopen(xpm2, "w");
write_xpm(fp, flags, "Enthalpy Landscape", "H (kJ/mol)", "PC1", "PC2",
ibox[0], ibox[1], axis_x, axis_y, EE,
emin ? *emin : Emin, emax ? *emax : Einf, rlo, rhi, &nlevels);
- ffclose(fp);
- fp = ffopen(xpm3, "w");
+ gmx_ffclose(fp);
+ fp = gmx_ffopen(xpm3, "w");
write_xpm(fp, flags, "Entropy Landscape", "TDS (kJ/mol)", "PC1", "PC2",
ibox[0], ibox[1], axis_x, axis_y, SS, 0, Sinf, rlo, rhi, &nlevels);
- ffclose(fp);
+ gmx_ffclose(fp);
if (map)
{
- fp = ffopen(xpm4, "w");
+ fp = gmx_ffopen(xpm4, "w");
write_xpm(fp, flags, "Custom Landscape", mname, "PC1", "PC2",
ibox[0], ibox[1], axis_x, axis_y, MM, 0, Minf, rlo, rhi, &nlevels);
- ffclose(fp);
+ gmx_ffclose(fp);
}
}
else if (neig == 3)
{
/* Dump to PDB file */
- fp = ffopen(pdb, "w");
+ fp = gmx_ffopen(pdb, "w");
for (i = 0; (i < ibox[0]); i++)
{
xxx[XX] = 3*(i+0.5-ibox[0]/2);
}
}
}
- ffclose(fp);
+ gmx_ffclose(fp);
write_xplor("out.xplor", W, ibox, min_eig, max_eig);
if (map)
{
snew(buf, strlen(xpm)+4);
sprintf(buf, "%s", xpm);
sprintf(&buf[strlen(xpm)-4], "12.xpm");
- fp = ffopen(buf, "w");
+ fp = gmx_ffopen(buf, "w");
write_xpm(fp, flags, "Gibbs Energy Landscape", "W (kJ/mol)", "PC1", "PC2",
ibox[0], ibox[1], axis_x, axis_y, WW, 0, gmax, rlo, rhi, &nlevels);
- ffclose(fp);
+ gmx_ffclose(fp);
for (i = 0; (i < ibox[0]); i++)
{
for (j = 0; (j < ibox[2]); j++)
}
}
sprintf(&buf[strlen(xpm)-4], "13.xpm");
- fp = ffopen(buf, "w");
+ fp = gmx_ffopen(buf, "w");
write_xpm(fp, flags, "SHAM Energy Landscape", "kJ/mol", "PC1", "PC3",
ibox[0], ibox[2], axis_x, axis_z, WW, 0, gmax, rlo, rhi, &nlevels);
- ffclose(fp);
+ gmx_ffclose(fp);
for (i = 0; (i < ibox[1]); i++)
{
for (j = 0; (j < ibox[2]); j++)
}
}
sprintf(&buf[strlen(xpm)-4], "23.xpm");
- fp = ffopen(buf, "w");
+ fp = gmx_ffopen(buf, "w");
write_xpm(fp, flags, "SHAM Energy Landscape", "kJ/mol", "PC2", "PC3",
ibox[1], ibox[2], axis_y, axis_z, WW, 0, gmax, rlo, rhi, &nlevels);
- ffclose(fp);
+ gmx_ffclose(fp);
sfree(buf);
}
if (map)
}
fprintf(fp, "\n");
}
- ffclose(fp);
+ gmx_ffclose(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, 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.
oldx = x;
}
- ffclose(fp);
+ gmx_ffclose(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, 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.
{
fprintf(fp, "%g %g\n", (i+0.5)*binwidth-1, 2*normfac*hist1[i]);
}
- ffclose(fp);
+ gmx_ffclose(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]);
}
- ffclose(fp);
+ gmx_ffclose(fp);
sprintf(str, "Solvent orientation");
histn[i] ? histi1[i]/histn[i] : 0,
histn[i] ? histi2[i]/histn[i] : 0);
}
- ffclose(fp);
+ gmx_ffclose(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);
}
- ffclose(fp);
+ gmx_ffclose(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);
}
- ffclose(fp);
+ gmx_ffclose(fp);
do_view(oenv, opt2fn("-o", NFILE, fnm), NULL);
do_view(oenv, opt2fn("-no", NFILE, fnm), NULL);
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2007,2008,2009,2010,2011,2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2007,2008,2009,2010,2011,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.
}
/* OUTPUT */
- flp = ffopen("grid.cube", "w");
+ flp = gmx_ffopen("grid.cube", "w");
fprintf(flp, "Spatial Distribution Function\n");
fprintf(flp, "test\n");
fprintf(flp, "%5d%12.6f%12.6f%12.6f\n", nidxp, (MINBIN[XX]+(minx+iIGNOREOUTER)*rBINWIDTH)*10./bohr, (MINBIN[YY]+(miny+iIGNOREOUTER)*rBINWIDTH)*10./bohr, (MINBIN[ZZ]+(minz+iIGNOREOUTER)*rBINWIDTH)*10./bohr);
}
fprintf(flp, "\n");
}
- ffclose(flp);
+ gmx_ffclose(flp);
/* printf("x=%d to %d\n",minx,maxx); */
/* printf("y=%d to %d\n",miny,maxy); */
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, 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.
nmol += hist[i];
fprintf(fp, "%g %g\n", i*bw, nmol/nf);
}
- ffclose(fp);
+ gmx_ffclose(fp);
do_view(oenv, opt2fn("-o", NFILE, fnm), NULL);
}
fprintf(fp, "\n");
}
- ffclose(fp);
+ gmx_ffclose(fp);
do_view(oenv, fn_trans, "-nxy");
}
}
fprintf(fp, "\n");
}
- ffclose(fp);
+ gmx_ffclose(fp);
do_view(oenv, fn_tc, "-nxy");
if (fn_cub)
}
fprintf(fp, "&\n");
}
- ffclose(fp);
+ gmx_ffclose(fp);
do_view(oenv, fn_tcf, "-nxy");
if (fn_cub)
fprintf(fp_cub, "&\n");
}
fprintf(fp_vk, "&\n");
- ffclose(fp_cub);
+ gmx_ffclose(fp_cub);
do_view(oenv, fn_cub, "-nxy");
}
- ffclose(fp_vk);
+ gmx_ffclose(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, 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.
fprintf(fp, "%-5d %10.3f %10.3f %10.3f\n", 1+i,
sum[index[i]][XX], sum[index[i]][YY], sum[index[i]][ZZ]);
}
- ffclose(fp);
+ gmx_ffclose(fp);
max = 0;
maxi = 0;
for (i = 0; i < isize; i++)
{
fprintf(fp, "%10.3e %10d\n", i*binwidth, histo[i]);
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
int gmx_traj(int argc, char *argv[])
if (bOX)
{
- ffclose(outx);
+ gmx_ffclose(outx);
}
if (bOXT)
{
}
if (bOV)
{
- ffclose(outv);
+ gmx_ffclose(outv);
}
if (bOF)
{
- ffclose(outf);
+ gmx_ffclose(outf);
}
if (bOB)
{
- ffclose(outb);
+ gmx_ffclose(outb);
}
if (bOT)
{
- ffclose(outt);
+ gmx_ffclose(outt);
}
if (bEKT)
{
- ffclose(outekt);
+ gmx_ffclose(outekt);
}
if (bEKR)
{
- ffclose(outekr);
+ gmx_ffclose(outekr);
}
if (bVD)
case efPDB:
if (( !bSeparate && !bSplit ) && !bSubTraj)
{
- out = ffopen(out_file, filemode);
+ out = gmx_ffopen(out_file, filemode);
}
break;
default:
top_title, fr.time);
if (bSeparate || bSplitHere)
{
- out = ffopen(out_file2, "w");
+ out = gmx_ffopen(out_file2, "w");
}
switch (ftp)
{
}
if (bSeparate)
{
- ffclose(out);
+ gmx_ffclose(out);
out = NULL;
}
break;
}
else if (out != NULL)
{
- ffclose(out);
+ gmx_ffclose(out);
}
if (bSubTraj)
{
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, 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.
}
if (fp)
{
- ffclose(fp);
+ gmx_ffclose(fp);
}
gmx_rmpbc_done(gpbc);
if (0 == repeats)
{
fprintf(fp, "\nNo benchmarks done since number of repeats (-r) is 0.\n");
- ffclose(fp);
+ gmx_ffclose(fp);
finalize(opt2fn("-p", nfile, fnm));
exit(0);
}
}
/* Open performance output file and write header info */
- fp = ffopen(opt2fn("-p", NFILE, fnm), "w");
+ fp = gmx_ffopen(opt2fn("-p", NFILE, fnm), "w");
/* Make a quick consistency check of command line parameters */
check_input(nnodes, repeats, &ntprs, &rmin, rcoulomb, &rmax,
launch_simulation(bLaunch, fp, bThreads, cmd_mpirun, cmd_np, cmd_mdrun,
cmd_args_launch, simulation_tpr, best_npme);
}
- ffclose(fp);
+ gmx_ffclose(fp);
/* ... or simply print the performance results to screen: */
if (!bLaunch)
{
ticky[i] = i*rbin;
}
- fp = ffopen(matfile, "w");
+ fp = gmx_ffopen(matfile, "w");
write_xpm(fp, MAT_SPATIAL_Y, "Van Hove function", "G (1/nm)",
sbin == 0 ? "time (ps)" : "sqrt(time) (ps^1/2)", "r (nm)",
mat_nx, nbin, tickx, ticky, mat, 0, matmax, rlo, rhi, &nlev);
- ffclose(fp);
+ gmx_ffclose(fp);
}
if (orfile)
}
fprintf(fp, "\n");
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
if (otfile)
{
fprintf(fp, "%g %g\n", f*dt, (real)pt[f]/(tcount[f]*isize));
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
do_view(oenv, matfile, NULL);
fprintf(fp, "\n");
}
printf("Wrote cumulative distribution functions to %s\n", fn);
- ffclose(fp);
+ gmx_ffclose(fp);
sfree(fn);
sfree(buf);
}
fprintf(fp, "\n");
}
- ffclose(fp);
+ gmx_ffclose(fp);
printf("Wrote %s\n", fn);
if (bs_index >= 0)
{
}
fprintf(fp, "&\n");
}
- ffclose(fp);
+ gmx_ffclose(fp);
/* write average and stddev */
fp = xvgropen(fnres, "Average and stddev from bootstrapping", "z", 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);
}
- ffclose(fp);
+ gmx_ffclose(fp);
printf("Wrote boot strap result to %s\n", fnres);
}
int nread, sizenow, i, block = 1;
FILE *fp;
- fp = ffopen(fn, "r");
+ fp = gmx_ffopen(fn, "r");
nread = 0;
sizenow = 0;
while (fgets(tmp, sizeof(tmp), fp) != NULL)
}
else
{
- pipe = ffopen(fn, "r");
+ pipe = gmx_ffopen(fn, "r");
*bPipeOpen = FALSE;
}
#ifdef HAVE_PIPES
pclose(fp);
#else
- ffclose(fp);
+ gmx_ffclose(fp);
#endif
}
}
else
{
- ffclose(file);
+ gmx_ffclose(file);
}
}
printf("\n");
}
else
{
- ffclose(file);
+ gmx_ffclose(file);
}
}
printf("\n");
printf(" done\n");
if (fpcorr)
{
- ffclose(fpcorr);
+ gmx_ffclose(fpcorr);
}
/* plot IACT along reaction coordinate */
}
}
}
- ffclose(fp);
+ gmx_ffclose(fp);
printf("Wrote %s\n", fn);
}
{
fprintf(fp, "%g %g\n", (j+0.5)*dz+opt->min, pot[j]);
}
- ffclose(fp);
+ gmx_ffclose(fp);
printf("verbose mode: wrote %s with PMF from interated forces\n", "pmfintegrated.xvg");
}
char fmt[1024], fmtign[1024];
int block = 1, sizenow;
- fp = ffopen(opt->fnGroupsel, "r");
+ fp = gmx_ffopen(opt->fnGroupsel, "r");
opt->groupsel = NULL;
snew(tmpbuf, len);
}
fprintf(histout, "\n");
}
- ffclose(histout);
+ gmx_ffclose(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]);
}
- ffclose(profout);
+ gmx_ffclose(profout);
printf("Wrote %s\n", opt2fn("-o", NFILE, fnm));
/* Bootstrap Method */
int nmap;
t_mapping *map = NULL;
- out = ffopen(outf, "w");
+ out = gmx_ffopen(outf, "w");
for (i = 0; i < nmat; i++)
{
write_xpm_m(out, mat[i]);
}
}
- ffclose(out);
+ gmx_ffclose(out);
}
static void tick_spacing(int n, real axis[], real offset, char axisnm,
real **rmat1, **rmat2;
real rhi, rlo;
- out = ffopen(fn, "w");
+ out = gmx_ffopen(fn, "w");
for (k = 0; k < nmat; k++)
{
if (mat2[k].nx != mat1[k].nx || mat2[k].ny != mat1[k].ny)
rmat1, rlo, rhi, white, black, &nlevels);
}
}
- ffclose(out);
+ gmx_ffclose(out);
}
void do_mat(int nmat, t_matrix *mat, t_matrix *mat2,
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2010,2011,2013, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,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.
}
/*Print out average energy-spectrum to outfiles[0] and outfiles[1];*/
- datfile1 = ffopen(outfiles[0], "w");
- datfile2 = ffopen(outfiles[1], "w");
+ datfile1 = gmx_ffopen(outfiles[0], "w");
+ datfile2 = gmx_ffopen(outfiles[1], "w");
/*Filling dat files with spectral data*/
fprintf(datfile1, "%s\n", "kx\t ky\t\tPower(kx,ky)");
fprintf(datfile1, "%d\t%d\t %8.6f\n", (n / fy), (n % fy), pspectavg1[n]);
fprintf(datfile2, "%d\t%d\t %8.6f\n", (n /fy), (n % fy), pspectavg2[n]);
}
- ffclose(datfile1);
- ffclose(datfile2);
+ gmx_ffclose(datfile1);
+ gmx_ffclose(datfile2);
free(ftspect1);
free(ftspect2);
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, 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.
}
}
sprintf(buf, "%s.xpm", fn);
- fp = ffopen(buf, "w");
+ fp = gmx_ffopen(buf, "w");
write_xpm(fp, 0, fn, fn, "Phi", "Psi", nnx, nny,
x_phi, y_psi, newdata, lo, hi, rlo, rhi, &nlevels);
for (i = 0; (i < nnx); i++)
}
sd->data[i][j] = sd->data[i][0];
}
- ffclose(fp);
+ gmx_ffclose(fp);
if (bDebugMode())
{
}
/* for libraries we can use the low-level close routines */
- ffclose(fp);
+ gmx_ffclose(fp);
ap->bSet = TRUE;
}
{
nhlp = fget_lines(fp, &help);
/* for libraries we can use the low-level close routines */
- ffclose(fp);
+ gmx_ffclose(fp);
rng = gmx_rng_init(gmx_rng_make_seed());
*cqnum = static_cast<int>(nhlp*gmx_rng_uniform_real(rng));
gmx_rng_destroy(rng);
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, 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.
fprintf(debug, "Reading MDP file %s\n", fn);
}
- in = ffopen(fn, "r");
+ in = gmx_ffopen(fn, "r");
nin = lc = 0;
do
}
while (ptr);
- ffclose(in);
+ gmx_ffclose(in);
if (debug)
{
}
}
- ffclose (fp);
+ gmx_ffclose (fp);
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2010,2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2010,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.
file_fullpath = gmxlibfn(file);
fprintf(stderr, "Opening force field file %s\n", file_fullpath);
- fp = ffopen(file_fullpath, "r");
+ fp = gmx_ffopen(file_fullpath, "r");
sfree(file_fullpath);
return fp;
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, 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.
*nvsiteconf = nvsite;
*nvsitetop = ntop;
- ffclose(ddb);
+ gmx_ffclose(ddb);
}
static int nitrogen_is_planar(t_vsiteconf vsiteconflist[], int nvsiteconf, char atomtype[])
}
nah++;
}
- ffclose(in);
+ gmx_ffclose(in);
/* Sort the list (necessary to be able to use bsearch */
qsort(aah, nah, (size_t)sizeof(**ah), compaddh);
}
}
while (bCont);
- ffclose(fp);
+ gmx_ffclose(fp);
*nnm = nnnm;
*nmp = nm2t;
{
fp = fflib_open(rrn[i]);
read_rtprename(rrn[i], fp, &nrtprename, &rtprename);
- ffclose(fp);
+ gmx_ffclose(fp);
sfree(rrn[i]);
}
sfree(rrn);
if (gmx_fexist(buf))
{
/* We don't use fflib_open, because we don't want printf's */
- fp = ffopen(buf, "r");
+ fp = gmx_ffopen(buf, "r");
snew(desc[i], STRLEN);
get_a_line(fp, desc[i], STRLEN);
- ffclose(fp);
+ gmx_ffclose(fp);
}
else
{
sfree(model[nwm]);
}
}
- ffclose(fp);
+ gmx_ffclose(fp);
fprintf(stderr, "%2d: %s\n", nwm+1, "None");
sel = -1;
fprintf(stderr, "\rAtomtype %d", nratt+1);
}
}
- ffclose(in);
+ gmx_ffclose(in);
sfree(file[f]);
}
fprintf(stderr, "\n");
}
}
}
- ffclose(in);
+ gmx_ffclose(in);
/* give back unused memory */
srenew(rrtp, nrtp);
if (ftp2bSet(efTOP, NFILE, fnm) )
{
fprintf(stderr, "Processing topology\n");
- fpin = ffopen(topinout, "r");
- fpout = ffopen(TEMP_FILENM, "w");
+ fpin = gmx_ffopen(topinout, "r");
+ fpout = gmx_ffopen(TEMP_FILENM, "w");
line = 0;
bSystem = bMolecules = FALSE;
while (fgets(buf, STRLEN, fpin))
fprintf(fpout, "%s", buf);
}
}
- ffclose(fpin);
+ gmx_ffclose(fpin);
if (nsol)
{
fprintf(stdout, "Adding line for %d solvent molecules to "
"topology file (%s)\n", nsol, topinout);
fprintf(fpout, "%-15s %5d\n", "SOL", nsol);
}
- ffclose(fpout);
- /* use ffopen to generate backup of topinout */
- fpout = ffopen(topinout, "w");
- ffclose(fpout);
+ gmx_ffclose(fpout);
+ /* use gmx_ffopen to generate backup of topinout */
+ fpout = gmx_ffopen(topinout, "w");
+ gmx_ffclose(fpout);
rename(TEMP_FILENM, topinout);
}
#undef TEMP_FILENM
nb++;
srenew(tb, nb);
- ffclose(in);
+ gmx_ffclose(in);
*ntbptr = nb;
*tbptr = tb;
/* If we did not read three items, quit reading */
}
while (nread == 3);
- ffclose(fp);
+ gmx_ffclose(fp);
/* Set the return values */
*n2morse = n2m;
cgnr, rtp_header_settings.nrexcl);
print_top_mols(fp, mymol.name, ffdir, NULL, 0, NULL, 1, &mymol);
- ffclose(fp);
+ gmx_ffclose(fp);
}
if (bRTP)
{
{
fp = fflib_open(f[i]);
get_xlatoms(f[i], fp, &nxlate, &xlatom);
- ffclose(fp);
+ gmx_ffclose(fp);
sfree(f[i]);
}
sfree(f);
char fn[STRLEN], format[STRLEN];
real val;
sprintf(fn, "pmegrid%d.pdb", pme->nodeid);
- fp = ffopen(fn, "w");
+ fp = gmx_ffopen(fn, "w");
sprintf(fn, "pmegrid%d.txt", pme->nodeid);
- fp2 = ffopen(fn, "w");
+ fp2 = gmx_ffopen(fn, "w");
sprintf(format, "%s%s\n", pdbformat, "%6.2f%6.2f");
#endif
}
}
#ifdef DEBUG_PME
- ffclose(fp);
- ffclose(fp2);
+ gmx_ffclose(fp);
+ gmx_ffclose(fp2);
#endif
}
return 0;
fprintf(fp, "%15.10e %15.10e %15.10e\n", x0, y0, yp);
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
done_tabledata(&(td[0]));
FILE *fp;
- fp = ffopen(fn, "w");
+ fp = gmx_ffopen(fn, "w");
fprintf(fp, "# Output of %s is written in intervals of %d time step%s.\n#\n",
what, steps, steps > 1 ? "s" : "");
/*
* This file is part of the GROMACS molecular simulation package.
*
- * 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.
{
GMX_RELEASE_ASSERT(impl_->fp_ == NULL,
"Attempted to open the same file object twice");
- // TODO: Port all necessary functionality from ffopen() here.
+ // TODO: Port all necessary functionality from gmx_ffopen() here.
impl_->fp_ = fopen(filename, mode);
if (impl_->fp_ == NULL)
{
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2010,2011,2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,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.
char buf[STRLEN], buf2[STRLEN], *temp;
int i, *nmol_rm, nmol, line;
- fpin = ffopen(topfile, "r");
- fpout = ffopen(TEMP_FILENM, "w");
+ fpin = gmx_ffopen(topfile, "r");
+ fpout = gmx_ffopen(TEMP_FILENM, "w");
snew(nmol_rm, mtop->nmoltype);
for (i = 0; i < rm_p->nr; i++)
}
}
- ffclose(fpout);
- /* use ffopen to generate backup of topinout */
- fpout = ffopen(topfile, "w");
- ffclose(fpout);
+ gmx_ffclose(fpout);
+ /* use gmx_ffopen to generate backup of topinout */
+ fpout = gmx_ffopen(topfile, "w");
+ gmx_ffclose(fpout);
rename(TEMP_FILENM, topfile);
#undef TEMP_FILENM
}
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2013, 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.
}
fscanf(in, "%15s", buf);
}
- ffclose(in);
+ gmx_ffclose(in);
return fgrid;
}