update format

(cherry picked from commit 2597185afb)
This commit is contained in:
Jakub Krajniak 2016-11-29 12:47:19 +01:00 committed by Axel Kohlmeyer
parent 1d970d3cdf
commit 7d098bff90
1 changed files with 1 additions and 2 deletions

View File

@ -342,11 +342,10 @@ void DihedralNHarmonic::read_restart(FILE *fp)
void DihedralNHarmonic::write_data(FILE *fp)
{
fwrite(&nterms[1],sizeof(int),atom->ndihedraltypes,fp);
for (int i = 1; i <= atom->ndihedraltypes; i++) {
fprintf(fp, "%d %d ", i, nterms[i]);
for (int j = 0; j < nterms[i]; j++ ) {
fprintf(fp, "%f ", a[i][j]);
fprintf(fp, (j < nterms[i] - 1) ? "%f " : "%f", a[i][j]);
}
fprintf(fp, "\n");
}