Time-averaged coordinates

Hello community,

I was trying to save the average coordinates of atoms in a dump file, using the ave/atom fix.
Below is a code example, I would expect that the average quantities were produced at step 1000, but I keep getting “ERROR: Dump custom and fix not computed at compatible times”.

What’s wrong?

Thank you in advance
Roberto

units           metal
dimension       3
boundary        p p p
timestep        1e-3
neighbor        2.0 bin
neigh_modify    every 1 delay 10 check yes

region          simbox     block 0 10 0 10 0 10 units box
create_box      1 simbox

mass            1 10

create_atoms    1 single 0 0 0
create_atoms    1 single 3 3 3
create_atoms    1 single 6 6 6

pair_style      lj/cut 10.0
pair_coeff      * * 0.1 2.0

fix             lan all langevin 300 300 1.0 4567
fix             nve all nve
fix             ave all ave/atom 1 1000 1000 x y z

run             1000

write_dump      all custom dump.dump  id type f_ave[1] f_ave[2] f_ave[3]

The underlying problem is difficult to address, but the following will work around it:

dump            out all custom 1000 dump.dump  id type f_ave[1] f_ave[2] f_ave[3]
run             1000

FYI, I think I have found a way to make this use case work. It required some more significant changes to the write_dump command and supporting code, but it will also simplify things a little bit and avoid a whole bunch of possible segfaults when people use write_dump with the “modify” option.

Thank you