use compute_time() func in xyz output

This commit is contained in:
Steve Plimpton
2021-12-21 14:05:16 -07:00
parent cad9f6bf6e
commit 6a442e1df4
4 changed files with 11 additions and 18 deletions

View File

@ -131,14 +131,12 @@ void DumpXYZ::write_header(bigint n)
{
if (me == 0) {
fprintf(fp,BIGINT_FORMAT "\n",n);
if (time_flag) {
double tcurrent = update->atime +
(update->ntimestep-update->atimestep) + update->dt;
if (time_flag)
fprintf(fp,"Atoms. Timestep: " BIGINT_FORMAT " Time: %f\n",
update->ntimestep, tcurrent);
} else {
update->ntimestep, compute_time());
else
fprintf(fp,"Atoms. Timestep: " BIGINT_FORMAT "\n",update->ntimestep);
}
}
}
}