Dump_modify take no effect after reading restart file

Dear all,

I find an very interesting issue when I using variable s equal logfreq(10, 3, 10) after reading a restart file. Here is a snippet of my script:

read_restart  an.restart
# forcefield settings
variable s equal logfreq(1,3,10)
dump 1 all atom 1 isf.dump
dump_modify 1 every v_s first yes
run 10000

but it only output the first frame not 1, 2, 3, 10, 20, 30 etc. I copied the snippet to an very simple script and it DOES take effect. Finally, I convert restart file to data and it works. So I want to ask if the dump_modify command or variable have any conflict with restart file? Or just I omit some details in the manual.

My LAMMPS version is LAMMPS (22 Aug 2018)
Here is my script:

# a restart script

read_restart  3000000.restart

neighbor 1.0 bin
neigh_modify one 10000 delay 1

variable eps index 1.5
variable di index 80
variable        dstep equal logfreq(1,9,10)

dielectric      ${di}
print "dielectric ${di}"
print "eps ${eps}"

pair_style      lj/cut/coul/long 1.12246 10
pair_coeff * * 1.0 1.12
pair_coeff 2 2 ${eps} 1.0 2.5  # io-io
kspace_style    pppm 1.0e-4

fix		1 all nve
fix		2 all langevin 1.0 1.0 100.0 699483

timestep	0.002

compute 1 all displace/atom

thermo		1000
thermo_style custom step temp density
dump 1 all custom 100 isf.dump id type x y z c_1[4]
dump_modify 1 every v_dstep first yes
run		1000000

Jichen Li
University of Science & Technology of China

You overlooked how the logfreq() works.
When reading the restart file, you also import the timestep.
The logfreq() output is logarithmic and when your timestep number in the restart file is 3000000, then the next timestep with output will be 4000000. You can easily verify this by adding a line

print "next output: ${dstep}"

after the definition of the variable.

If you want the logfreq() sequence start over, you need to use the reset_timestep command to reset the timestep back to 0. This is what happens with read_data, since data files do not store the timestep.

Thanks for your kind reply!! That is very clear and helpful!