Rerun command for RDF computation

Dear Lammps Users,

I am using ‘rerun’ command for RDF computation at longer cutoff distance. My purpose is to output a file ‘ave_Rerun.rdf’ containing RDF data at timesteps 0, 50, 100 and 150. So I used the command ‘rerun Dump.atom first 0 every 50 last 150 dump x y z box yes scaled yes’.

The problem is no data was output into the file except for the header. If I change the ‘last’ keyword in the rerun command to 250 (equal to the simulation time in the initial run), there will be data output, but only for RDF at 250 timestep. So basically the file is empty for any ‘last’ value other than 250. Why is it happening?

The input script is attached. For simplicity, the setup and ‘run’ part is taken from the Example ‘melt’, only the ‘rerun’ part is written by me.

Suggestions and comments are welcomed. Thanks very much!

I think you need to comment out the dump command in your rerun script.
Else you are overwriting the dump file you are trying to read.

The attached script works for me (from bench/in.lj). The first
time run it as is. The 2nd time, comment out the dump, first fix 2, run commands

and un-comment the other fix 2, rerun commands.

Steve

3d Lennard-Jones melt

units lj
atom_style atomic

lattice fcc 0.8442
region box block 0 10 0 10 0 10
create_box 1 box
create_atoms 1 box
mass 1 1.0

velocity all create 1.44 87287 loop geom

pair_style lj/cut 2.5
pair_coeff 1 1 1.0 1.0 2.5

neighbor 0.3 bin
neigh_modify delay 0 every 20 check no

fix 1 all nve

dump 1 all atom 50 tmp.dump

compute 2 all rdf 20 1 1
fix 2 all ave/time 1 1 50 c_2 file tmp.rdf mode vector
#fix 2 all ave/time 1 1 50 c_2 file tmp2.rdf mode vector

run 250
#rerun tmp.dump first 0 every 50 last 150 dump x y z box yes scaled yes

I think you need to comment out the dump command in your rerun script.
Else you are overwriting the dump file you are trying to read.

The attached script works for me (from bench/in.lj). The first
time run it as is. The 2nd time, comment out the dump, fix 2, run commands

and un-comment the other fix 2, rerun commands.

Steve

3d Lennard-Jones melt

units lj
atom_style atomic

lattice fcc 0.8442
region box block 0 10 0 10 0 10
create_box 1 box
create_atoms 1 box
mass 1 1.0

velocity all create 1.44 87287 loop geom

pair_style lj/cut 2.5
pair_coeff 1 1 1.0 1.0 2.5

neighbor 0.3 bin
neigh_modify delay 0 every 20 check no

fix 1 all nve

dump 1 all atom 50 tmp.dump

compute 2 all rdf 20 1 1
fix 2 all ave/time 1 1 50 c_2 file tmp.rdf mode vector
#fix 2 all ave/time 1 1 50 c_2 file tmp2.rdf mode vector

run 250
#rerun tmp.dump first 0 every 50 last 150 dump x y z box yes scaled yes