Hi all -
I'm trying to figure out if there is a way to determine if a global
variable has remained unchanged over the last N time steps or time
units (prefer the latter due to variable time step size) over the
course of a run, and set a flag if the variable has achieved "steady
state". I plan on doing a nested loop where on each iteration I run
for a given number of steps, then check the flag and break out of the
loop when steady state is detected.
Is this achievable with some clever averaging with fix ave/time? Or
maybe with fix vector? Fix vector might work if I could access the
vector using negative indexing like in python/matlab, but I didn't
think LAMMPS supports that.
I could possibly get away with simply checking if the variable was the
same as it was N steps/time ago, rather than checking if it has been
constant the whole time over the last N steps.
- Jesse