forked from lijiext/lammps
simplify code
This commit is contained in:
parent
7d098bff90
commit
789e62388f
|
@ -343,10 +343,10 @@ void DihedralNHarmonic::read_restart(FILE *fp)
|
|||
void DihedralNHarmonic::write_data(FILE *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, (j < nterms[i] - 1) ? "%f " : "%f", a[i][j]);
|
||||
}
|
||||
fprintf(fp, "%d %d", i, nterms[i]);
|
||||
for (int j = 0; j < nterms[i]; j++ )
|
||||
fprintf(fp, " %g", a[i][j]);
|
||||
|
||||
fprintf(fp, "\n");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue