Author Topic: How to visualize atoms in the specific bins divided by lammps  (Read 250 times)

fanli

  • Newbie
  • *
  • Posts: 5
Hi every one
I have finished a simulation and I divided the system in to different bins according to z coordinates. I have dumped the atom id,type, coordinates,  and mass. My questions are as follows:

(1)Is information in the dump enough to visualize the atoms according to bins? If not, what else does OVITO need to do so?
(2)If it is enough, How can I visualize the atoms in different bins in ovito?

Thanks

Fan Li

Alexander Stukowski

  • Administrator
  • Sr. Member
  • *****
  • Posts: 465
Re: How to visualize atoms in the specific bins divided by lammps
« Reply #1 on: March 21, 2018, 06:58:16 AM »
Dear Fan Li,

You wrote that you divided the system along the z axis into bins. How exactly did you do that? Are all atoms still contained in one file? I am wondering what the difference between the divided system and the original system is.

-Alex

fanli

  • Newbie
  • *
  • Posts: 5
Re: How to visualize atoms in the specific bins divided by lammps
« Reply #2 on: March 21, 2018, 11:06:24 AM »
Dear Alex
I used "compute chunk/atom" command with bin style 1d to divide the system and "fix ave/chunk" command to calculate the properties in each bin in lammps. So, the system is physically exactly same as the original one. And all the information aforementioned is the same dump file.

Fan Li

Alexander Stukowski

  • Administrator
  • Sr. Member
  • *****
  • Posts: 465
Re: How to visualize atoms in the specific bins divided by lammps
« Reply #3 on: March 21, 2018, 12:25:38 PM »
If you are using the compute chunk/atom, you can write the chunk IDs assigned by LAMMPS to each atom to the output dump file. OVITO will read this extra per-atom information and you can work with it in the program. For instance, you could use the Expression select modifier to select all atoms with a certain chunk ID, i.e. which belong to a certain bin.

Of course, this requires to re-run the simulation if you didn't dump the per-atom chunk IDs before. Alternatively, you can compute the bin number of each atom within OVITO. For that, I suggest you use the Compute Property modifier. Enter "Bin number" into the name field for the output property and enter the following formula into the expression field:

Code: [Select]
rint(ReducedPosition.Z * 10 + 0.5)

Replace "10" with the number of bins you want to create. This formula computes the bin each atom is in from its current Z coordinate.

OVITO has now assigned the "Bin number" property to each atom, and you can subsequently use this information to select atoms from certain bins or visualize the bin assignment using the Color Coding modifier.
« Last Edit: March 21, 2018, 12:27:21 PM by Alexander Stukowski »

fanli

  • Newbie
  • *
  • Posts: 5
Re: How to visualize atoms in the specific bins divided by lammps
« Reply #4 on: March 21, 2018, 04:36:22 PM »
Hi Alex
I managed to do it in ovito.
Thanks