passing chunk/atom compute to fix ave/chunk


In trying to generate an example usage of fix ave/chunk and it seems like the compute id isn’t being processed correctly. Is the usage below in self-contained example the correct syntax for the command based on latest version? If it is, then it would seem like a couple tiny changes near the top of FixAveChunk constructor are needed to correctly process the compute id: position within command and trimming “c_”.

Thanks in advance for clarification,


The chunkID does not take a leading c_.
See the doc page. In general, args for
LAMMPS commands only take a leading
c_, f_, v_ when it’s ambiguous what might
be used. In this case it has to be a compute
ID (for compute chunk.atom), so the c_ is


OK, omission of an input value for fix ave/chunk was causing my confusion with id of compute chunk/atom and the “no values” error.

compute 2 all chunk/atom bin/2d x lower 1.0 y lower 1.0
fix 2 all ave/chunk 10 1 10 2 density/number file bin_2d.dat

Thanks for clarifying,