Hi Axel,
Thanks for sticking we me on this.
i have no problems for any value of ${nt} when i use the following
modified version of the melt input.
lattice fcc 0.8442
region box block 0 10 0 10 0 10
create_box 2 box
create_atoms 1 box
region half block 0 10 0 10 EDGE 4.9
mass * 1.0
set region half type 2
velocity all create 3.0 87287
pair_style lj/cut 2.5
pair_coeff * * 1.0 1.0
neighbor 0.3 bin
neigh_modify every 5 delay 5 check yes
compute gij all rdf 100 1 1 1 2 2 1 2 2
fix gofr all ave/time 1 \{nt\} {nt} c_gij[*] file rdf.dat mode vector
fix 1 all nve
thermo 500
run ${nt}
however, there i will get the header-only rdf.dat file you are
getting, if i insert:
run 100
*before* defining the compute and the fix ave/time.
this is because with the additional 100 steps, the fix ave/time will
start collecting data only on step \{nt\}, that is the {nt}-100 th
step in the second run.
so i suspect, you left out the crucial information, that you are not
starting your production simulation at step 0, but some other step.
and then because of the mismatch, averaging will start much later, as
it is based on the *time step number* and not the time step count in
the current run.
You nailed it -- I'm running off a restart file read in at the top of
the script. Didn't read the ave/time docs closely enough to realize
that it operates on the absolute time step.
to prove this, all you need to do is to replace
run ${nt}
with
run \{nt\}
run {nt}
and you should have some output in your rdf.dat
however, the clean solution would be to either put the command
reset_timestep 0
at some strategic location before the production run command.
Yep, both of these check out.
For any curious future readers, here's why I was getting the behavior I
was getting:
I was performing my runs by loading a restart from a 50000-time step
equilibration. When I run and average with 10000 time steps, I do get
output because of luck -- the starting time step (50000) is a multiple
of 10000, so I have a full averaging period (50000-60000). However,
with 15000 time steps of running/averaging, the ave/time fix doesn't
really start until step 60000 (the first multiple of 15000 after the
restart), and then when the run ends on step 65000, it hasn't completed
a full averaging period. Using 20000 time steps of running and
averaging fails for the same reason, but 25000 succeeds because 25000
is a multiple of 50000.
Cheers and thank you,
Nathaniel