Unverified Commit 58404946 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

add timer timeout support to temper commands

parent 4011f665
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -103,12 +103,14 @@ void Temper::command(int narg, char **arg)
      (!utils::strmatch(modify->fix[whichfix]->style,"^langevin")) &&
      (!utils::strmatch(modify->fix[whichfix]->style,"^gl[de]$")) &&
      (!utils::strmatch(modify->fix[whichfix]->style,"^rigid/nvt")) &&
      (!utils::strcmp(modify->fix[whichfix]->style,"^temp/"))
      (!utils::strcmp(modify->fix[whichfix]->style,"^temp/")))
    error->universe_all(FLERR,"Tempering temperature fix is not supported");

  // setup for long tempering run

  update->whichflag = 1;
  timer->init_timeout();

  update->nsteps = nsteps;
  update->beginstep = update->firststep = update->ntimestep;
  update->endstep = update->laststep = update->firststep + nsteps;
@@ -213,6 +215,9 @@ 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

    update->integrate->run(nevery);
+5 −0
Original line number Diff line number Diff line
@@ -130,6 +130,8 @@ void TemperGrem::command(int narg, char **arg)
  // setup for long tempering run

  update->whichflag = 1;
  timer->init_timeout();

  update->nsteps = nsteps;
  update->beginstep = update->firststep = update->ntimestep;
  update->endstep = update->laststep = update->firststep + nsteps;
@@ -235,6 +237,9 @@ 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

    update->integrate->run(nevery);
+5 −0
Original line number Diff line number Diff line
@@ -109,6 +109,8 @@ void TemperNPT::command(int narg, char **arg)
  // setup for long tempering run

  update->whichflag = 1;
  timer->init_timeout();

  update->nsteps = nsteps;
  update->beginstep = update->firststep = update->ntimestep;
  update->endstep = update->laststep = update->firststep + nsteps;
@@ -214,6 +216,9 @@ 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

    update->integrate->run(nevery);