make created tables better suitable for human consumption

This commit is contained in:
Axel Kohlmeyer
2022-12-24 23:03:50 -05:00
parent 0df140876c
commit f2e3b22222
2 changed files with 2 additions and 2 deletions

View File

@ -420,7 +420,7 @@ void Bond::write_file(int narg, char **arg)
for (int i = 0; i < n; i++) {
r = inner + dr * static_cast<double>(i);
e = single(btype, r * r, itype, jtype, f);
fprintf(fp, "%d %.15g %.15g %.15g\n", i + 1, r, e, f * r);
fprintf(fp, "%8d %- 22.15g %- 22.15g %- 22.15g\n", i + 1, r, e, f * r);
}
fclose(fp);
}

View File

@ -1921,7 +1921,7 @@ void Pair::write_file(int narg, char **arg)
e = single(0,1,itype,jtype,rsq,1.0,1.0,f);
f *= r;
} else e = f = 0.0;
if (comm->me == 0) fprintf(fp,"%d %.15g %.15g %.15g\n",i+1,r,e,f);
if (comm->me == 0) fprintf(fp,"%8d %- 22.15g %- 22.15g %- 22.15g\n",i+1,r,e,f);
}
// restore original vecs that were swapped in for