time control

Dear LAMMPS users,

I am trying to simulate a system for a determined time. I need to use a variable time-step. How can I control the simulation time, instead of controlling the number of steps? Is there any feature to control the time (not the CPU time) ?

Thank you for your time.

Ane Lasa

If you are using fix dt/reset then it stores
the total elapsed time. So you could do something like this:

fix 1 all dt/reset ...
variable s equal f_1[1]
run 100000 every 1000 "if '$s > 0.5' then exit"

When the elapsed real time exceeds 0.5, LAMMPS
will stop. This is b/c the "exit" command is bogus
and LAMMPS willl generate an error. Alternatively
you could test this in a loop (see the next and jump)
commands, and jump out of the loop when the condition
is met.