Outputting actual time

Dear Lammps User,

I need to output the actual time in the lammps output (i.e. time_step*dt) but considering change in time step size in between different runs

Output provided in lammps manual are :
possible attributes = step, elapsed, elaplong, dt, cpu, tpcpu, spcpu,

http://lammps.sandia.gov/doc/thermo_style.html

Thanks

Prashant

Dear Lammps User,

I need to output the actual time in the lammps output (i.e. time_step*dt)
but considering change in time step size in between different runs

Output provided in lammps manual are :
possible attributes = step, elapsed, elaplong, dt, cpu, tpcpu, spcpu,

http://lammps.sandia.gov/doc/thermo_style.html

there is no question here?

axel.

Question is how to do it, i.e. outputting the actual time instead of time steps.

Question is how to do it, i.e. outputting the actual time instead of time
steps.

well, you already listed what information is available. *use* it.
where is the problem?

axel.

Axel,

Problem is the information I would like to output " total simulated time i.e. actual time " is not listed.

e.g. if I run 1000 steps with dt = 5e-4 and then 1000 runs with dt = 2000 runs then, I should out put 10005e-4 + 20005e-3 at the end.

Also at the thermo_style the output provided does not allow total simulation time.

I hope I have clearified the question ?

Prashant

Axel,

Problem is the information I would like to output " total simulated time
i.e. actual time " is not listed.
e.g. if I run 1000 steps with dt = 5e-4 and then 1000 runs with dt = 2000
runs then, I should out put 1000*5e-4 + 2000*5e-3 at the end.

since you already know this when you start the script, what keeps you
from computing it yourself?

Also at the thermo_style the output provided does not allow total simulation
time.

I hope I have clearified the question ?

not really. you didn't say what you have already tried and what didn't
work as expected?

also, what keeps you from accumulating this information using some
equal style variable and taking advantage of the fact that ${name} is
expanded when the variable is defined while v_name will be expanded
every time the variable is referenced.

axel.

Axel,

What I am trying to do (at the end) is to write a plot of energy vs time, but the problem is that I can have several runs with a change of timestep in between.
Eventually I would like to write the simulation time in the dump file instead of timestep, too.

For sure that I can do it manually, but is very difficult if you are modifying the number of runs or changing values in the script.
I have tried save in a variable the cumulative value of step*dt after each run

I’m just trying to do something similar to elaplong, but with the simulation time.

Prashant

e.g.
variable time equal 0
variable time equal (time+dt*step)
thermo_style time

23.05.2013, 15:28, “prashant gupta” <iitk.pgupta@…24…>:

LAMMPS doesn’t tally the “actual” time internally, and has no
memory of what the timestep size was at some earlier time.

Thus you would need to keep track of this yourself.

Steve

LAMMPS doesn't tally the "actual" time internally, and has no

It does in the dt/reset fix.

[1] http://lammps.sandia.gov/doc/fix_dt_reset.html

Just added a “time” keyword to thermo_style custom
which should do what you want. I realized this value is
easy to output without updating it internally every timestep.
Should work with fix dt/reset and resetting the timestep
as well.

Steve