sprintf(histitle, "cumulative rotamer distribution for %s", dlist[i].name);
fprintf(stderr, " and %s ", hisfile);
fp = xvgropen(hisfile, histitle, "number", "", oenv);
- fprintf(fp, "@ xaxis tick on\n");
- fprintf(fp, "@ xaxis tick major 1\n");
- fprintf(fp, "@ type xy\n");
+ if(output_env_get_print_xvgr_codes(oenv))
+ {
+ fprintf(fp, "@ xaxis tick on\n");
+ fprintf(fp, "@ xaxis tick major 1\n");
+ fprintf(fp, "@ type xy\n");
+ }
for (k = 0; (k < nbin); k++)
{
if (bNormalize)
fprintf(fp, "%5d %10d\n", k, chi_prhist[k]);
}
}
- fprintf(fp, "&\n");
+ fprintf(fp, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
ffclose(fp);
}
{
if (bSplit && i > 0 && fabs(x[i]) < 1e-5)
{
- if (output_env_get_print_xvgr_codes(oenv))
- {
- fprintf(out, "&\n");
- }
+ fprintf(out, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
}
fprintf(out, "%10.4f %10.5f\n",
x[i]*scale_x, y ? y[g][i] : sy[g][s][i]);
}
- if (output_env_get_print_xvgr_codes(oenv))
- {
- fprintf(out, "&\n");
- }
+ fprintf(out, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
}
}
ffclose(out);
out = xvgropen(outfile, "Subspace overlap",
"Eigenvectors of trajectory 2", "Overlap", oenv);
- fprintf(out, "@ subtitle \"using %d eigenvectors of trajectory 1\"\n",
- noutvec);
+ if(output_env_get_print_xvgr_codes(oenv))
+ {
+ fprintf(out, "@ subtitle \"using %d eigenvectors of trajectory 1\"\n",noutvec);
+ }
overlap = 0;
for (x = 0; x < nvec2; x++)
{
{
if (bSplit && i > 0 && fabs(inprod[noutvec][i]) < 1e-5)
{
- fprintf(xvgrout, "&\n");
+ fprintf(xvgrout, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
}
fprintf(xvgrout, "%10.5f %10.5f\n", inprod[0][i], inprod[noutvec-1][i]);
}
}
if (s < nset-1)
{
- fprintf(fp, "&\n");
+ fprintf(fp, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
}
}
ffclose(fp);
}
fprintf(stdout, "Set %3d: err.est. %g a %g tau1 %g tau2 %g\n",
s+1, ee, a, tau1, tau2);
- fprintf(fp, "@ legend string %d \"av %f\"\n", 2*s, av[s]);
- fprintf(fp, "@ legend string %d \"ee %6g\"\n",
- 2*s+1, sig[s]*anal_ee_inf(fitparm, n*dt));
+ if(output_env_get_print_xvgr_codes(oenv))
+ {
+ fprintf(fp, "@ legend string %d \"av %f\"\n", 2*s, av[s]);
+ fprintf(fp, "@ legend string %d \"ee %6g\"\n",2*s+1, sig[s]*anal_ee_inf(fitparm, n*dt));
+ }
for (i = 0; i < nbs; i++)
{
fprintf(fp, "%g %g %g\n", tbs[i], sig[s]*sqrt(ybs[i]/(n*dt)),
s+1, sig[s]*anal_ee_inf(ac_fit, n*dt),
ac_fit[1], ac_fit[0], ac_fit[2]);
- fprintf(fp, "&\n");
+ fprintf(fp, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
for (i = 0; i < nbs; i++)
{
fprintf(fp, "%g %g\n", tbs[i],
}
if (s < nset-1)
{
- fprintf(fp, "&\n");
+ fprintf(fp, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
}
}
sfree(fitsig);
}
if (s < nset-1)
{
- fprintf(out, "&\n");
+ fprintf(out, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
}
}
ffclose(out);
{
maxstat = max(maxstat, angstat[i]*norm_fac);
}
- fprintf(out, "@with g0\n");
- fprintf(out, "@ world xmin -180\n");
- fprintf(out, "@ world xmax 180\n");
- fprintf(out, "@ world ymin 0\n");
- fprintf(out, "@ world ymax %g\n", maxstat*1.05);
- fprintf(out, "@ xaxis tick major 60\n");
- fprintf(out, "@ xaxis tick minor 30\n");
- fprintf(out, "@ yaxis tick major 0.005\n");
- fprintf(out, "@ yaxis tick minor 0.0025\n");
+ if (output_env_get_print_xvgr_codes(oenv))
+ {
+ fprintf(out, "@with g0\n");
+ fprintf(out, "@ world xmin -180\n");
+ fprintf(out, "@ world xmax 180\n");
+ fprintf(out, "@ world ymin 0\n");
+ fprintf(out, "@ world ymax %g\n", maxstat*1.05);
+ fprintf(out, "@ xaxis tick major 60\n");
+ fprintf(out, "@ xaxis tick minor 30\n");
+ fprintf(out, "@ yaxis tick major 0.005\n");
+ fprintf(out, "@ yaxis tick minor 0.0025\n");
+ }
}
for (i = first; (i <= last); i++)
{
strcpy(hhisfile, hisfile);
strcat(hhisfile, ".xvg");
fp = xvgropen(hhisfile, title, "Degrees", "", oenv);
- fprintf(fp, "@ with g0\n");
+ if (output_env_get_print_xvgr_codes(oenv))
+ {
+ fprintf(fp, "@ with g0\n");
+ }
xvgr_world(fp, -180, 0, 180, 0.1, oenv);
- fprintf(fp, "# this effort to set graph size fails unless you run with -autoscale none or -autoscale y flags\n");
- fprintf(fp, "@ xaxis tick on\n");
- fprintf(fp, "@ xaxis tick major 90\n");
- fprintf(fp, "@ xaxis tick minor 30\n");
- fprintf(fp, "@ xaxis ticklabel prec 0\n");
- fprintf(fp, "@ yaxis tick off\n");
- fprintf(fp, "@ yaxis ticklabel off\n");
- fprintf(fp, "@ type xy\n");
+ if (output_env_get_print_xvgr_codes(oenv))
+ {
+ fprintf(fp, "# this effort to set graph size fails unless you run with -autoscale none or -autoscale y flags\n");
+ fprintf(fp, "@ xaxis tick on\n");
+ fprintf(fp, "@ xaxis tick major 90\n");
+ fprintf(fp, "@ xaxis tick minor 30\n");
+ fprintf(fp, "@ xaxis ticklabel prec 0\n");
+ fprintf(fp, "@ yaxis tick off\n");
+ fprintf(fp, "@ yaxis ticklabel off\n");
+ fprintf(fp, "@ type xy\n");
+ }
if (bSSHisto)
{
for (k = 0; (k < 3); k++)
}
}
}
- fprintf(fp, "&\n");
+ fprintf(fp, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
ffclose(fp);
if (bSSHisto)
{
for (k = 0; (k < 3); k++)
{
- fprintf(ssfp[k], "&\n");
+ fprintf(ssfp[k], "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
ffclose(ssfp[k]);
}
}
FILE *fp;
fp = xvgropen(fn, title, xaxis, yaxis, oenv);
- fprintf(fp, "@ with g0\n");
+ if (output_env_get_print_xvgr_codes(oenv))
+ {
+ fprintf(fp, "@ with g0\n");
+ }
xvgr_world(fp, -180, -180, 180, 180, oenv);
- fprintf(fp, "@ xaxis tick on\n");
- fprintf(fp, "@ xaxis tick major 90\n");
- fprintf(fp, "@ xaxis tick minor 30\n");
- fprintf(fp, "@ xaxis ticklabel prec 0\n");
- fprintf(fp, "@ yaxis tick on\n");
- fprintf(fp, "@ yaxis tick major 90\n");
- fprintf(fp, "@ yaxis tick minor 30\n");
- fprintf(fp, "@ yaxis ticklabel prec 0\n");
- fprintf(fp, "@ s0 type xy\n");
- fprintf(fp, "@ s0 symbol 2\n");
- fprintf(fp, "@ s0 symbol size 0.410000\n");
- fprintf(fp, "@ s0 symbol fill 1\n");
- fprintf(fp, "@ s0 symbol color 1\n");
- fprintf(fp, "@ s0 symbol linewidth 1\n");
- fprintf(fp, "@ s0 symbol linestyle 1\n");
- fprintf(fp, "@ s0 symbol center false\n");
- fprintf(fp, "@ s0 symbol char 0\n");
- fprintf(fp, "@ s0 skip 0\n");
- fprintf(fp, "@ s0 linestyle 0\n");
- fprintf(fp, "@ s0 linewidth 1\n");
- fprintf(fp, "@ type xy\n");
-
+ if (output_env_get_print_xvgr_codes(oenv))
+ {
+ fprintf(fp, "@ xaxis tick on\n");
+ fprintf(fp, "@ xaxis tick major 90\n");
+ fprintf(fp, "@ xaxis tick minor 30\n");
+ fprintf(fp, "@ xaxis ticklabel prec 0\n");
+ fprintf(fp, "@ yaxis tick on\n");
+ fprintf(fp, "@ yaxis tick major 90\n");
+ fprintf(fp, "@ yaxis tick minor 30\n");
+ fprintf(fp, "@ yaxis ticklabel prec 0\n");
+ fprintf(fp, "@ s0 type xy\n");
+ fprintf(fp, "@ s0 symbol 2\n");
+ fprintf(fp, "@ s0 symbol size 0.410000\n");
+ fprintf(fp, "@ s0 symbol fill 1\n");
+ fprintf(fp, "@ s0 symbol color 1\n");
+ fprintf(fp, "@ s0 symbol linewidth 1\n");
+ fprintf(fp, "@ s0 symbol linestyle 1\n");
+ fprintf(fp, "@ s0 symbol center false\n");
+ fprintf(fp, "@ s0 symbol char 0\n");
+ fprintf(fp, "@ s0 skip 0\n");
+ fprintf(fp, "@ s0 linestyle 0\n");
+ fprintf(fp, "@ s0 linewidth 1\n");
+ fprintf(fp, "@ type xy\n");
+ }
return fp;
}
if (clustidfn)
{
fp = xvgropen(clustidfn, "Clusters", output_env_get_xvgr_tlabel(oenv), "Cluster #", oenv);
- fprintf(fp, "@ s0 symbol 2\n");
- fprintf(fp, "@ s0 symbol size 0.2\n");
- fprintf(fp, "@ s0 linestyle 0\n");
+ if(output_env_get_print_xvgr_codes(oenv))
+ {
+ fprintf(fp, "@ s0 symbol 2\n");
+ fprintf(fp, "@ s0 symbol size 0.2\n");
+ fprintf(fp, "@ s0 linestyle 0\n");
+ }
for (i = 0; i < nf; i++)
{
fprintf(fp, "%8g %8d\n", time[i], clust->cl[i]);
if (sizefn)
{
fp = xvgropen(sizefn, "Cluster Sizes", "Cluster #", "# Structures", oenv);
- fprintf(fp, "@g%d type %s\n", 0, "bar");
+ if(output_env_get_print_xvgr_codes(oenv))
+ {
+ fprintf(fp, "@g%d type %s\n", 0, "bar");
+ }
}
snew(structure, nf);
fprintf(log, "\n%3s | %3s %4s | %6s %4s | cluster members\n",
DD = pow(10.0, 0.125);
fp = xvgropen("fy.xvg", "Fig. 2, Lin2003a", "Delta", "y or fy", oenv);
xvgr_legend(fp, asize(leg), leg, oenv);
- fprintf(fp, "@ world 1e-05, 0, 1000, 1\n");
- fprintf(fp, "@ xaxes scale Logarithmic\n");
+ if (output_env_get_print_xvgr_codes(oenv))
+ {
+ fprintf(fp, "@ world 1e-05, 0, 1000, 1\n");
+ fprintf(fp, "@ xaxes scale Logarithmic\n");
+ }
for (Delta = 1e-5; (Delta <= 1000); Delta *= DD)
{
f = calc_fluidicity(Delta, toler);
oenv);
xvgr_legend(out, 0, NULL, oenv);
j = 0;
- for (m = 0; (m < egNR+egSP); m++)
+ if (output_env_get_print_xvgr_codes(oenv))
{
- if (egrp_use[m])
+ for (m = 0; (m < egNR+egSP); m++)
{
- fprintf(out, "@ legend string %d \"%s\"\n", j++, egrp_nm[m]);
+ if (egrp_use[m])
+ {
+ fprintf(out, "@ legend string %d \"%s\"\n", j++, egrp_nm[m]);
+ }
}
- }
- if (bFree)
- {
- fprintf(out, "@ legend string %d \"%s\"\n", j++, "Free");
- }
- if (bFree)
- {
- fprintf(out, "@ legend string %d \"%s\"\n", j++, "Diff");
- }
- fprintf(out, "@TYPE xy\n");
- fprintf(out, "#%3s", "grp");
- for (m = 0; (m < egNR+egSP); m++)
- {
- if (egrp_use[m])
+ if (bFree)
{
- fprintf(out, " %9s", egrp_nm[m]);
+ fprintf(out, "@ legend string %d \"%s\"\n", j++, "Free");
}
+ if (bFree)
+ {
+ fprintf(out, "@ legend string %d \"%s\"\n", j++, "Diff");
+ }
+ fprintf(out, "@TYPE xy\n");
+ fprintf(out, "#%3s", "grp");
+
+ for (m = 0; (m < egNR+egSP); m++)
+ {
+ if (egrp_use[m])
+ {
+ fprintf(out, " %9s", egrp_nm[m]);
+ }
+ }
+ if (bFree)
+ {
+ fprintf(out, " %9s", "Free");
+ }
+ if (bFree)
+ {
+ fprintf(out, " %9s", "Diff");
+ }
+ fprintf(out, "\n");
}
- if (bFree)
- {
- fprintf(out, " %9s", "Free");
- }
- if (bFree)
- {
- fprintf(out, " %9s", "Diff");
- }
- fprintf(out, "\n");
for (i = 0; (i < ngroups); i++)
{
fprintf(out, "%3.0f", groupnr[i]);
{
fort = xvgropen(opt2fn("-ort", NFILE, fnm), "Calculated orientations",
"Time (ps)", "", oenv);
- if (bOrinst)
+ if (bOrinst && output_env_get_print_xvgr_codes(oenv))
{
fprintf(fort, "%s", orinst_sub);
}
fodt = xvgropen(opt2fn("-odt", NFILE, fnm),
"Orientation restraint deviation",
"Time (ps)", "", oenv);
- if (bOrinst)
+ if (bOrinst && output_env_get_print_xvgr_codes(oenv))
{
fprintf(fodt, "%s", orinst_sub);
}
out = xvgropen(opt2fn("-ora", NFILE, fnm),
"Average calculated orientations",
"Restraint label", "", oenv);
- if (bOrinst)
+ if (bOrinst && output_env_get_print_xvgr_codes(oenv))
{
fprintf(out, "%s", orinst_sub);
}
out = xvgropen(opt2fn("-oda", NFILE, fnm),
"Average restraint deviation",
"Restraint label", "", oenv);
- if (bOrinst)
+ if (bOrinst && output_env_get_print_xvgr_codes(oenv))
{
fprintf(out, "%s", orinst_sub);
}
out = xvgropen(opt2fn("-odr", NFILE, fnm),
"RMS orientation restraint deviations",
"Restraint label", "", oenv);
- if (bOrinst)
+ if (bOrinst && output_env_get_print_xvgr_codes(oenv))
{
fprintf(out, "%s", orinst_sub);
}
for (j = 0; (j < d->nparams); j++)
{
/* Reset all parameters to optimized values */
- fprintf(hp, "@type xy\n");
+ if(output_env_get_print_xvgr_codes(oenv))
+ {
+ fprintf(hp, "@type xy\n");
+ }
for (i = 0; (i < d->nparams); i++)
{
d->params[i] = params[i];
fprintf(gp, "%s = %12g d2 = %12g\n", epnm(np, j), d->params[j], d2[i]);
fprintf(hp, "%12g %12g\n", fac[i], d2[i]);
}
- fprintf(hp, "&\n");
+ fprintf(hp, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
}
ffclose(hp);
for (i = 0; (i < d->nparams); i++)
tot_nmat(nres, natoms, nframes, totnmat, tot_n, mean_n);
fp = xvgropen(ftp2fn(efXVG, NFILE, fnm),
"Increase in number of contacts", "Residue", "Ratio", oenv);
- fprintf(fp, "@ legend on\n");
- fprintf(fp, "@ legend box on\n");
- fprintf(fp, "@ legend loctype view\n");
- fprintf(fp, "@ legend 0.75, 0.8\n");
- fprintf(fp, "@ legend string 0 \"Total/mean\"\n");
- fprintf(fp, "@ legend string 1 \"Total\"\n");
- fprintf(fp, "@ legend string 2 \"Mean\"\n");
- fprintf(fp, "@ legend string 3 \"# atoms\"\n");
- fprintf(fp, "@ legend string 4 \"Mean/# atoms\"\n");
- fprintf(fp, "#%3s %8s %3s %8s %3s %8s\n",
- "res", "ratio", "tot", "mean", "natm", "mean/atm");
+ if(output_env_get_print_xvgr_codes(oenv))
+ {
+ fprintf(fp, "@ legend on\n");
+ fprintf(fp, "@ legend box on\n");
+ fprintf(fp, "@ legend loctype view\n");
+ fprintf(fp, "@ legend 0.75, 0.8\n");
+ fprintf(fp, "@ legend string 0 \"Total/mean\"\n");
+ fprintf(fp, "@ legend string 1 \"Total\"\n");
+ fprintf(fp, "@ legend string 2 \"Mean\"\n");
+ fprintf(fp, "@ legend string 3 \"# atoms\"\n");
+ fprintf(fp, "@ legend string 4 \"Mean/# atoms\"\n");
+ fprintf(fp, "#%3s %8s %3s %8s %3s %8s\n",
+ "res", "ratio", "tot", "mean", "natm", "mean/atm");
+ }
for (i = 0; (i < nres); i++)
{
if (mean_n[i] == 0)
}
if (bSplit && !bFirst && fabs(t/output_env_get_time_factor(oenv)) < 1e-5)
{
- fprintf(out, "&\n");
+ fprintf(out, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
}
fprintf(out, "\t%g\t%6.3f %6.3f %6.3f %6.3f %6.3f\n",
output_env_conv_time(oenv, t), rmin, rmax, norm(box[0]), norm(box[1]), norm(box[2]));
{
if (bSplit && !bFirst && fabs(t/output_env_get_time_factor(oenv)) < 1e-5)
{
- fprintf(dist, "&\n");
+ fprintf(dist, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
if (num)
{
- fprintf(num, "&\n");
+ fprintf(num, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
}
if (atm)
{
- fprintf(atm, "&\n");
+ fprintf(atm, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
}
}
fprintf(dist, "%12e", output_env_conv_time(oenv, t));
/* Handle printing of internal distances. */
if (outi)
{
- fprintf(outi, "@ xaxes scale Logarithmic\n");
+ if(output_env_get_print_xvgr_codes(oenv))
+ {
+ fprintf(outi, "@ xaxes scale Logarithmic\n");
+ }
ymax = -1;
ymin = 1e300;
j = index[molind[1]-1] - index[molind[0]]; /* Polymer length -1. */
xvgr_line_props(out, 0, elNone, ecFrank, oenv);
xvgr_view(out, 0.2, 0.2, 0.8, 0.8, oenv);
xvgr_world(out, -180, -180, 180, 180, oenv);
- fprintf(out, "@ xaxis tick on\n@ xaxis tick major 60\n@ xaxis tick minor 30\n");
- fprintf(out, "@ yaxis tick on\n@ yaxis tick major 60\n@ yaxis tick minor 30\n");
- fprintf(out, "@ s0 symbol 2\n@ s0 symbol size 0.4\n@ s0 symbol fill 1\n");
-
+ if(output_env_get_print_xvgr_codes(oenv))
+ {
+ fprintf(out, "@ xaxis tick on\n@ xaxis tick major 60\n@ xaxis tick minor 30\n");
+ fprintf(out, "@ yaxis tick on\n@ yaxis tick major 60\n@ yaxis tick minor 30\n");
+ fprintf(out, "@ s0 symbol 2\n@ s0 symbol size 0.4\n@ s0 symbol fill 1\n");
+ }
j = 0;
do
{
if (bSplit && i > 0 &&
fabs(time[bPrev ? freq*i : i]/output_env_get_time_factor(oenv)) < 1e-5)
{
- fprintf(fp, "&\n");
+ fprintf(fp, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
}
fprintf(fp, "%12.7f", time[bPrev ? freq*i : i]);
for (j = 0; (j < nrms); j++)
{
if (bSplit && i > 0 && fabs(time[i]) < 1e-5)
{
- fprintf(fp, "&\n");
+ fprintf(fp, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
}
fprintf(fp, "%12.7f", time[i]);
for (j = 0; (j < nrms); j++)
tcafc[kc][i] /= tcafc[kc][0];
fprintf(fp_cub, "%g %g\n", i*dt, tcafc[kc][i]);
}
- fprintf(fp_cub, "&\n");
+ fprintf(fp_cub, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
tcafc[kc][0] = 1.0;
}
}
fp_vk = xvgropen(fn_vk, "Fits", "k (nm\\S-1\\N)",
"\\8h\\4 (10\\S-3\\N kg m\\S-1\\N s\\S-1\\N)", oenv);
- fprintf(fp_vk, "@ s0 symbol 2\n");
- fprintf(fp_vk, "@ s0 symbol color 1\n");
- fprintf(fp_vk, "@ s0 linestyle 0\n");
- if (fn_cub)
+ if(output_env_get_print_xvgr_codes(oenv))
{
- fprintf(fp_vk, "@ s1 symbol 3\n");
- fprintf(fp_vk, "@ s1 symbol color 2\n");
+ fprintf(fp_vk, "@ s0 symbol 2\n");
+ fprintf(fp_vk, "@ s0 symbol color 1\n");
+ fprintf(fp_vk, "@ s0 linestyle 0\n");
+ if (fn_cub)
+ {
+ fprintf(fp_vk, "@ s1 symbol 3\n");
+ fprintf(fp_vk, "@ s1 symbol color 2\n");
+ }
}
fp = xvgropen(fn_tcf, "TCAF Fits", "Time (ps)", "", oenv);
for (k = 0; k < nk; k++)
{
fprintf(fp, "%g %g\n", i*dt, fit_function(effnVAC, fitparms, i*dt));
}
- fprintf(fp, "&\n");
+ fprintf(fp, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
}
ffclose(fp);
do_view(oenv, fn_tcf, "-nxy");
if (fn_cub)
{
fprintf(stdout, "Averaged over k-vectors:\n");
- fprintf(fp_vk, "&\n");
+ fprintf(fp_vk, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
for (k = 0; k < nkc; k++)
{
tcafc[k][0] = 1.0;
{
fprintf(fp_cub, "%g %g\n", i*dt, fit_function(effnVAC, fitparms, i*dt));
}
- fprintf(fp_cub, "&\n");
+ fprintf(fp_cub, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
}
- fprintf(fp_vk, "&\n");
+ fprintf(fp_vk, "%s\n", output_env_get_print_xvgr_codes(oenv) ? "&" : "");
ffclose(fp_cub);
do_view(oenv, fn_cub, "-nxy");
}
if (orfile)
{
fp = xvgropen(orfile, "Van Hove function", "r (nm)", "G (nm\\S-1\\N)", oenv);
- fprintf(fp, "@ subtitle \"for particles in group %s\"\n", grpname);
+ if(output_env_get_print_xvgr_codes(oenv))
+ {
+ fprintf(fp, "@ subtitle \"for particles in group %s\"\n", grpname);
+ }
snew(legend, nr);
for (fbin = 0; fbin < nr; fbin++)
{
{
sprintf(buf, "Probability of moving less than %g nm", rint);
fp = xvgropen(otfile, buf, "t (ps)", "", oenv);
- fprintf(fp, "@ subtitle \"for particles in group %s\"\n", grpname);
+ if(output_env_get_print_xvgr_codes(oenv))
+ {
+ fprintf(fp, "@ subtitle \"for particles in group %s\"\n", grpname);
+ }
for (f = 0; f <= ftmax; f++)
{
fprintf(fp, "%g %g\n", f*dt, (real)pt[f]/(tcount[f]*isize));
bsProfiles_av2[i] += tmp*tmp;
fprintf(fp, "%e\t%e\n", (i+0.5)*opt->dz+opt->min, tmp);
}
- fprintf(fp, "&\n");
+ fprintf(fp, "%s\n", output_env_get_print_xvgr_codes(opt->oenv) ? "&" : "");
}
ffclose(fp);
/* write average and stddev */
fp = xvgropen(fnres, "Average and stddev from bootstrapping", "z", ylabel, opt->oenv);
- fprintf(fp, "@TYPE xydy\n");
+ if(output_env_get_print_xvgr_codes(opt->oenv))
+ {
+ fprintf(fp, "@TYPE xydy\n");
+ }
for (i = 0; i < opt->bins; i++)
{
bsProfiles_av [i] /= opt->nBootStrap;
{
fprintf(fpcorr, "%g %g\n", k*dt, corr[k]);
}
- fprintf(fpcorr, "&\n");
+ fprintf(fpcorr, "%s\n", output_env_get_print_xvgr_codes(opt->oenv) ? "&" : "");
}
/* esimate integrated correlation time, fitting is too unstable */
/* plot IACT along reaction coordinate */
fp = xvgropen(fn, "Integrated autocorrelation times", "z", "IACT [ps]", opt->oenv);
- fprintf(fp, "@ s0 symbol 1\n@ s0 symbol size 0.5\n@ s0 line linestyle 0\n");
- fprintf(fp, "# WIN tau(gr1) tau(gr2) ...\n");
- for (i = 0; i < nwins; i++)
+ if(output_env_get_print_xvgr_codes(opt->oenv))
{
- fprintf(fp, "# %3d ", i);
- for (ig = 0; ig < window[i].nPull; ig++)
+ fprintf(fp, "@ s0 symbol 1\n@ s0 symbol size 0.5\n@ s0 line linestyle 0\n");
+ fprintf(fp, "# WIN tau(gr1) tau(gr2) ...\n");
+ for (i = 0; i < nwins; i++)
{
- fprintf(fp, " %11g", window[i].tau[ig]);
+ fprintf(fp, "# %3d ", i);
+ for (ig = 0; ig < window[i].nPull; ig++)
+ {
+ fprintf(fp, " %11g", window[i].tau[ig]);
+ }
+ fprintf(fp, "\n");
}
- fprintf(fp, "\n");
}
for (i = 0; i < nwins; i++)
{
opt->sigSmoothIact);
/* smooth IACT along reaction coordinate and overwrite g=1+2tau */
smoothIact(window, nwins, opt);
- fprintf(fp, "&\n@ s1 symbol 1\n@ s1 symbol size 0.5\n@ s1 line linestyle 0\n");
- fprintf(fp, "@ s1 symbol color 2\n");
+ fprintf(fp, "%s\n", output_env_get_print_xvgr_codes(opt->oenv) ? "&" : "");
+ if(output_env_get_print_xvgr_codes(opt->oenv))
+ {
+ fprintf(fp, "@ s1 symbol 1\n@ s1 symbol size 0.5\n@ s1 line linestyle 0\n");
+ fprintf(fp, "@ s1 symbol color 2\n");
+ }
for (i = 0; i < nwins; i++)
{
for (ig = 0; ig < window[i].nPull; ig++)