[lammps-users] bin/cylinder ave/chunk

Dear lammps users,

I am using the compute command in order to measure the radial density of a nanofiber:

compute DENSITY EPDM1 chunk/atom bin/cylinder z lower $(lz) 35 35 0 40 20 discard yes

and here is the box dimension in z direction:
-20.739977178902073 91.4548353089002 zlo zhi

Although I am choosing delta=lz but the center of spatial bins in dim as you can see in the results are 35.3574 and 147.552 which is larger than the lz.

Chunk Coord1 Coord2 Ncount density/mass

1 1 35.3574 68.89 1.13788

2 1 147.552 0 0
3 3 35.3574 208.19 1.13898
4 3 147.552 0 0
5 5 35.3574 350.13 1.14868
6 5 147.552 0 0
7 7 35.3574 452.72 1.0618

Is there something wrong here?

Not sure what you are asking. The 35 values for bins 1,3,5,etc is the
center of the bin in z, which is midway between zlo and zhi because your
binsize is the entire zbox length. The 147 values for bins 2,4,6 is the center
of the next bin in z, which may be added due to round-off. I think some epsilon of that
bin overlaps the zhi edge, hence it is included. Note that the count is 0 in those bins.

If what you are asking is how to only get one bin in the z dir (not 2), then I suggest
you use reduced the units reduced option, put the bin in the center (not lower) position
and make its delta = 1. Or possibly 1.0001.

Steve