Density Calculation

Dear Lammps users

I’d like to partition a simulation box into equal-sized bins and calculate the density of a molecule them.

Does anybody know if there is any command to do that?

Many thanks in advance

You can use a combination of compute chunk/atom and fix ave/chunk to achieve that.

Ray