# OVITO Forum

## OVITO => Support Forum => Topic started by: yadavdg on May 04, 2018, 07:15:19 AM

Title: Calculating atomic density
Post by: yadavdg 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
Title: Re: Calculating atomic density
Post by: Alexander Stukowski 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 (http://ovito.org/manual/particles.modifiers.bin_and_reduce.html) 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 (http://ovito.org/manual/particles.modifiers.compute_property.html) 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
Title: Re: Calculating atomic density
Post by: yadavdg 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
Title: Re: Calculating atomic density
Post by: Alexander Stukowski 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.
Title: Re: Calculating atomic density
Post by: yadavdg on May 14, 2018, 01:45:10 PM
Thanks

Digvijay