diff --git a/src/bond.cpp b/src/bond.cpp index 1f72cbb2cb..f14cae1090 100644 --- a/src/bond.cpp +++ b/src/bond.cpp @@ -420,7 +420,7 @@ void Bond::write_file(int narg, char **arg) for (int i = 0; i < n; i++) { r = inner + dr * static_cast(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); } diff --git a/src/pair.cpp b/src/pair.cpp index fc7232d615..44a63f211b 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -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