### Author Topic: Calculating atomic density  (Read 193 times)

• Newbie
• Posts: 4
##### Calculating atomic density
« on: May 04, 2018, 07:15:19 AM »
Hello ovito users,
Is it possible to calculate atomic density along the z-axis of the cell ?  if yes how i can do it with help of ovito , I have dump file of lammps.

Thanks and regards,
Digvijay

#### Alexander Stukowski

• Sr. Member
• Posts: 434
##### Re: Calculating atomic density
« Reply #1 on: May 04, 2018, 05:27:31 PM »
Hi,

Dividing the simulation box into bins along the z-axis and counting the atoms in each bin can be done with the Bin and Reduce modifier of OVITO. Note, however, that this modifier cannot actually "count" atoms. It rather sums up the values of a selected property for all particles in a bin. Thus, you might first have to use the Compute Property modifier to create a new property with the uniform value of 1 and assign it to each particle. You can then select this property as input for the Bin and Reduce modifier to sum over.

-Alex

• Newbie
• Posts: 4
##### Re: Calculating atomic density
« Reply #2 on: May 10, 2018, 03:52:04 PM »
Hi,
I have read compute property command but I didn't understand how I can make property with uniform value 1 and assign it to each particle ? as  you have mentioned in the post.
Can you elaborate on this .

Thanks and Regards,
Digvijay

#### Alexander Stukowski

• Sr. Member
• Posts: 434
##### Re: Calculating atomic density
« Reply #3 on: May 11, 2018, 10:14:07 AM »
What I meant was to use the Compute property modifier and simply enter "1" as math expression. You can pick any name for the particle property to be generated, but not one of the standard names from the drop-down list.
What this modifier will do is to assign a new property with the given name to each particle with the value 1.