[lammps-users] Number of time steps

Dear All,
hello.

Is it possible to finish a simulation if a specified condition is satisfied? E.g if the total energy of system becomes less than a threshold. Actually, we aim not to use a given number of time steps in our code.

Kind regards,
Mehdi

You could put a series of short runs in a loop
and have an if test that will jump out of the loop
(and finish) is some condition is met.
See the doc page for the if command for
an example.

Steve