LAMMPS version(s): 12Jun2025 and 11Feb2026 (same behaviour)
Hi,
I would like to compute the per-atom kinetic energy and output it to a .dump file, here’s (part of) my code:
fix df1 all property/atom mol
fix df2 all property/atom q
compute ckatom all ke/atom
fix akatom all ave/atom ${N1} ${N1} ${N3} c_ckatom
variable dummyMol atom "gmask(droplet)+2.0*gmask(surface)"
dump d1 all custom 500 ${out_traj} id v_dummyMol type q x y z vx vy vz f_akatom
dump_modify d1 element Co Fe Ni Co Fe Ni
Ignore mol, q and dummyMol, they are needed just for post-processing purposes.
I notices that if I set:
fix akatom all ave/atom 1 1 500 c_ckatom
or
fix akatom all ave/atom 500 1 500 c_ckatom
I get a non-zero output value in the .dump file:
ITEM: ATOMS id v_dummyMol type q x y z vx vy vz f_akatom
17971 2 4 0 2.21121 1.82077 32.0924 -3.03121 -10.5493 3.88055 0.414394
However, any other combination, like:
fix akatom all ave/atom 1 500 500 c_ckatom
or
fix akatom all ave/atom 1 2 500 c_ckatom
or
fix akatom all ave/atom 1 17 500 c_ckatom
always results in zero:
ITEM: ATOMS id v_dummyMol type q x y z vx vy vz f_akatom
17971 2 4 0 2.21121 1.82077 32.0924 -3.03121 -10.5493 3.88055 0
Could it be a mismatch between ave/atom frequency and dump frequency? Shouldn’t LAMMPS complain in that case? I have tried other output frequences, like:
ITEM: ATOMS id v_dummyMol type q x y z vx vy vz f_akatom
17971 2 4 0 2.21121 1.82077 32.0924 -3.03121 -10.5493 3.88055 0
and I still get zero.