Skip to content
Snippets Groups Projects
Commit 789e6238 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

simplify code

parent 7d098bff
No related branches found
No related tags found
No related merge requests found
...@@ -343,10 +343,10 @@ void DihedralNHarmonic::read_restart(FILE *fp) ...@@ -343,10 +343,10 @@ void DihedralNHarmonic::read_restart(FILE *fp)
void DihedralNHarmonic::write_data(FILE *fp) void DihedralNHarmonic::write_data(FILE *fp)
{ {
for (int i = 1; i <= atom->ndihedraltypes; i++) { for (int i = 1; i <= atom->ndihedraltypes; i++) {
fprintf(fp, "%d %d ", i, nterms[i]); fprintf(fp, "%d %d", i, nterms[i]);
for (int j = 0; j < nterms[i]; j++ ) { for (int j = 0; j < nterms[i]; j++ )
fprintf(fp, (j < nterms[i] - 1) ? "%f " : "%f", a[i][j]); fprintf(fp, " %g", a[i][j]);
}
fprintf(fp, "\n"); fprintf(fp, "\n");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment