diff --git a/src/COMPRESS/dump_xyz_zstd.cpp b/src/COMPRESS/dump_xyz_zstd.cpp index 0138e89e01..19e521ba38 100644 --- a/src/COMPRESS/dump_xyz_zstd.cpp +++ b/src/COMPRESS/dump_xyz_zstd.cpp @@ -102,7 +102,7 @@ void DumpXYZZstd::write_header(bigint ndump) { if (me == 0) { auto header = fmt::format("{}\n", ndump); - if (time_flag && (update->whichflag == 1)) { + if (time_flag) { double tcurrent = update->atime + (update->ntimestep-update->atimestep) + update->dt; header += fmt::format("Atoms. Timestep: {} Time: {:.6f}\n", update->ntimestep, tcurrent); } else header += fmt::format("Atoms. Timestep: {}\n", update->ntimestep); diff --git a/src/dump.cpp b/src/dump.cpp index df39f3738d..0f338e99b5 100644 --- a/src/dump.cpp +++ b/src/dump.cpp @@ -1132,6 +1132,7 @@ double Dump::compute_time() { return update->atime + (update->ntimestep - update->atimestep)*update->dt; } + /* ---------------------------------------------------------------------- return # of bytes of allocated memory ------------------------------------------------------------------------- */ diff --git a/src/dump_xyz.cpp b/src/dump_xyz.cpp index c554593b69..e90243fd1f 100644 --- a/src/dump_xyz.cpp +++ b/src/dump_xyz.cpp @@ -130,7 +130,7 @@ int DumpXYZ::modify_param(int narg, char **arg) void DumpXYZ::write_header(bigint n) { if (me == 0) { - if (time_flag && (update->whichflag == 1)) { + if (time_flag) { double tcurrent = update->atime + (update->ntimestep-update->atimestep) + update->dt; fmt::print(fp,"{}\n Atoms. Timestep: {} Time: {:.6f}\n", n, update->ntimestep, tcurrent); } else fmt::print(fp,"{}\n Atoms. Timestep: {}\n", n, update->ntimestep);