Invoking a compute between runs

Hi LAMMPS,

If a compute is referenced between runs (with update->whichflag == 0), abort is called unless the compute was invoked on the most recent timestep. Why is it a bad idea to invoke computes in this state? Shouldn’t the state of atom->x, v, and other things on which computes depend, persist? Is it safe to invoke a compute between runs from under the hood?

Anthony Frachioni

Hi LAMMPS,

If a compute is referenced between runs (with update->whichflag == 0), abort is called unless the compute was invoked on the most recent timestep. Why is it a bad idea to invoke computes in this state? Shouldn’t the state of atom->x, v, and other things on which computes depend, persist?

But that is not the only thing needed by computes.

Is it safe to invoke a compute between runs from under the hood?

Sometimes yes, sometimes no.

Two simple examples of “no” are the following.

a) you invoke compute pe, when the most recent timestep

did not calculate energies

b) you invoke a compute that uses a neighbor list

before any simulation is run, so no neighbor lists have
been formed

Steve