LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] fix halt with condition on derivative?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] fix halt with condition on derivative?

From: Steve Plimpton <sjplimp@...24...>
Date: Tue, 18 Jul 2017 08:04:17 -0600

The variable doc page (at the bottom) explains how to store
the old value of one variable in another variable, e.g.

>If you want to store the initial volume of the system, you can do it this way:

>variable v equal vol
>variable v0 equal $v
If you put lines like that in a loop construct every 1000 steps,
then I think you could have two variables that have
values 1000 steps apart.  Your fix halt could compare the
2 values (every 1000 steps) and decide to exit if they
were sufficiently close to each other (time derivate nearly 0.0).

Note that for numeric fluctuating values like volume (in a NPT
simulation), you would not get a derivative exactly zero.


On Tue, Jul 18, 2017 at 2:07 AM, Christophe Ortiz <christophe.ortiz@...4080...> wrote:
Dear LAMMPS users,

I am trying to define a fix halt to stop a run when a certain condition is met. What would be useful is that the run stops when a variable (calculated with a compute eg) reaches a constant value (or derivative ~ 0).
I found in the manual that a time-averaged value can be calculated with fix ave/time but nothing about derivatives.
Is there a way to do that during a run? I did not find anything in the manual nor in the mailing list.

Many thanks in advance and best regards,

Check out the vibrant tech community on one of the world's most
engaging tech sites,!
lammps-users mailing list