Regarding count of atoms in LAMMPS

Dear Lammps users,

I want to find out the number of atoms in a particular region of a block. What commands of LAMMPS should I use? Also, I want to draw a atomic distribution curve like the number of atoms vs distance to observe how the one type of atoms spreads over a surface of another type of atoms. How to extract the data in MATLAB to plot this kind of curve? Does anyone have the code of this kind of work?

Thank you.

Best regards,
Hasan

For your second question, you need a “dump” file which contains the coordinates at each timestep. You need a command like this in your input script:

dump my dump all custom 5000 dump.atoms id type x y z vx vy vz​

This command is well documented: https://lammps.sandia.gov/doc/dump.html

If you are looking for code to parse this file so you get a distribution, there is an open source toolkit called pizza.py on GitHub. src/dump.py might help you

https://github.com/lammps/pizza

-Keith

Dear Lammps users,

I want to find out the number of atoms in a particular region of a block. What commands of LAMMPS should I use?

region and variable.

axel.