LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] How to decide the number of atoms in each bins forthe 1d bin style

# Re: [lammps-users] How to decide the number of atoms in each bins forthe 1d bin style

 From: Steve Plimpton Date: Wed, 13 Sep 2017 13:50:08 -0600

If you are doing no time averaging (just instantaneous output)
for fix ave/chunk, you should be able to reproduce what fix
ave/chunk is doing for counting atoms in an bin, via your
own post-processing of a dump file.

Steve

On Wed, Sep 13, 2017 at 5:07 AM, 1185201182 wrote:
Hi Steve
Sorry for the mistake. I did use the ave/chunk command. Now I figured out a method to restore information of atoms. I have looked at the source code of lammps. It seems that the coordinate of the bin reported by this command is the center of the bin,if so I am able to get the top boundary and bottom boundary of the bin, then select the atoms according to the coordinates in dump file within the bin, then do time averaging. Will I get same result (the number of the atoms) as reported by the command?

------------------ 原始邮件 ------------------

That isn't the output from the compute chunk/atom command.
Possibly you mean from the fix ave/chunk command?

In which case it may do time averaging, depending on how
you used it.  Which could lead to fractional counts.

Steve

On Mon, Sep 11, 2017 at 1:55 PM, 1185201182 wrote:
Hi lammps users
I used the following command
compute chunk/atom bin/1d z

to divide the simulation domain into number of bins. I have to use the coordinates of atoms in the dump file to calculate the structure factor for each bins,so I have to divide the atoms in the dump file into bins exactly as the bins I got from the "compute chunk/atom". I noticed that the coordinates of each bin is output. Take the following output from compute chunk/atom command, I have 2 questions
##################################
Chunk Coord1 Ncount
6 10.4338 13.7893
7 12.3338 284.269
8 14.2338 218.935
9 16.1338 253.056
10 18.0338 236.243
.
.
.
###################################
(1)The number of atoms is 13.7893 in Chunk 6. Does it mean the number of atoms whose z coordinates are between
10.4338 (Chunk 6) and 12.3338 (Chunk 7) is 13.7893.
(2)Why the number of atoms has fractional part?

Thanks

Fan Li

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most