diff --git a/src/REPLICA/temper.cpp b/src/REPLICA/temper.cpp index cd14de9475..00ca062ecc 100644 --- a/src/REPLICA/temper.cpp +++ b/src/REPLICA/temper.cpp @@ -215,12 +215,11 @@ void Temper::command(int narg, char **arg) for (int iswap = 0; iswap < nswaps; iswap++) { - if (timer->is_timeout()) break; - timer->init_timeout(); - // run for nevery timesteps + timer->init_timeout(); update->integrate->run(nevery); + if (timer->is_timeout()) break; // compute PE // notify compute it will be called at next swap diff --git a/src/USER-MISC/temper_grem.cpp b/src/USER-MISC/temper_grem.cpp index e05a27bb14..692f78cf9f 100644 --- a/src/USER-MISC/temper_grem.cpp +++ b/src/USER-MISC/temper_grem.cpp @@ -237,12 +237,11 @@ void TemperGrem::command(int narg, char **arg) for (int iswap = 0; iswap < nswaps; iswap++) { - if (timer->is_timeout()) break; - timer->init_timeout(); - // run for nevery timesteps + timer->init_timeout(); update->integrate->run(nevery); + if (timer->is_timeout()) break; // compute PE // notify compute it will be called at next swap @@ -250,7 +249,6 @@ void TemperGrem::command(int narg, char **arg) pe = pe_compute->compute_scalar(); pe_compute->addstep(update->ntimestep + nevery); - // which = which of 2 kinds of swaps to do (0,1) if (!ranswap) which = iswap % 2; diff --git a/src/USER-MISC/temper_npt.cpp b/src/USER-MISC/temper_npt.cpp index d40ca3b707..55c9aadc6f 100644 --- a/src/USER-MISC/temper_npt.cpp +++ b/src/USER-MISC/temper_npt.cpp @@ -216,12 +216,11 @@ void TemperNPT::command(int narg, char **arg) for (int iswap = 0; iswap < nswaps; iswap++) { - if (timer->is_timeout()) break; - timer->init_timeout(); - // run for nevery timesteps + timer->init_timeout(); update->integrate->run(nevery); + if (timer->is_timeout()) break; // compute PE // notify compute it will be called at next swap