Rename ffopen and ffclose to gmx_ff*.
[alexxy/gromacs.git] / src / gromacs / gmxana / gmx_chi.c
index b26b6aef53f4ba5aea3a2bb39fc9c20e67a522e0..62c14cbe6c83b55bff337a8202d653580ea098a9 100644 (file)
@@ -487,7 +487,7 @@ static void histogramming(FILE *log, int nbin, gmx_residuetype_t rt,
     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);
@@ -499,7 +499,7 @@ static void histogramming(FILE *log, int nbin, gmx_residuetype_t rt,
             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++)
@@ -708,7 +708,7 @@ static void histogramming(FILE *log, int nbin, gmx_residuetype_t rt,
             }
             fprintf(fp, "\n");
         }
-        ffclose(fp);
+        gmx_ffclose(fp);
         for (i = 0; (i < NJC); i++)
         {
             sfree(leg[i]);
@@ -778,7 +778,7 @@ static void histogramming(FILE *log, int nbin, gmx_residuetype_t rt,
                     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++)
@@ -802,13 +802,13 @@ static void histogramming(FILE *log, int nbin, gmx_residuetype_t rt,
                     }
                 }
                 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]);
                     }
                 }
             }
@@ -904,7 +904,7 @@ static void do_rama(int nf, int nlist, t_dlist dlist[], real **dih,
             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];
@@ -926,13 +926,13 @@ static void do_rama(int nf, int nlist, t_dlist dlist[], real **dih,
             }
             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++)
                 {
@@ -965,7 +965,7 @@ static void do_rama(int nf, int nlist, t_dlist dlist[], real **dih,
                 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]);
@@ -985,7 +985,7 @@ static void do_rama(int nf, int nlist, t_dlist dlist[], real **dih,
             {
                 fprintf(fp, "%10g  %10g\n", RAD2DEG*dih[Xi1][j], RAD2DEG*dih[Xi2][j]);
             }
-            ffclose(fp);
+            gmx_ffclose(fp);
         }
         else
         {
@@ -1046,7 +1046,7 @@ static void print_transitions(const char *fn, int maxchi, int nlist,
         /* fprintf(fp,"%12s\n",dlist[i].name);  this confuses xmgrace */
         fprintf(fp, "\n");
     }
-    ffclose(fp);
+    gmx_ffclose(fp);
 }
 
 static void order_params(FILE *log,
@@ -1125,7 +1125,7 @@ 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)
     {
@@ -1155,7 +1155,7 @@ static void order_params(FILE *log,
             }
         }
 
-        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");
@@ -1176,7 +1176,7 @@ static void order_params(FILE *log,
             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");
@@ -1392,7 +1392,7 @@ int gmx_chi(int argc, char *argv[])
     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)
     {
@@ -1537,7 +1537,7 @@ int gmx_chi(int argc, char *argv[])
     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)
     {