Forum Navigation
You need to log in to create posts and topics.

Voronoi Index

Dear Constanze Kalcher

Can you tell me how to connect  the same Voronoi clusters with bonds, as shown below.I have seen OVITO in many papers and it is really a powerful tool.

Thanks

Uploaded files:
  • figure.png

Dear Saichao,

one possibility would be to create a particle property "Particle Type" based on the Voronoi geometries of each particle and then use the Create bonds modifier with a pair-wise cutoff.

-Constanze

Dear Constanze

Can this be implemented in the OVITO user interface? Do I need to write a script?

Thanks

Saichao

Saichao,

in order to answer this I would need some more information about how you want to categorize the different particles. In your screenshot above there are "groups" mentioned. What are these groups based on - same Voronoi indices e.g., or same coordination number?

In general, in the GUI you can create or overwrite existing particle properties using either a Compute property modifier or a Python script modifier.
Also see https://www.ovito.org/tutorials-2/create-custom-particle-properties/.

-Constanze

Dear Constanze

Those groups are based same Voronoi index. I don't know how to create particle type with Vironoi index in Neighbor expression? No such option in Properties. Can you give me an example? if I want to connect the same Icosahedral clusters (Voronoi index=0,0,12,0) with bonds in a cutoff .

Thanks a lot.

Saichao

Analogous to the example picture you showed above: Let's say you initially have a dataset with two particle types but you rather want to color the atoms based on different groups that they belong to, e.g. if they are center atoms of <0,0,12,0> and <0,0,12,4> Voronoi polyhedra (i.e. <n3, n4, n5, n6>, where n_i is the number of the i-edged facets).  The goal is to connect all atoms belonging to these groups through bonds.

Then you could follow these steps:

  1. First insert a Voronoi analysis modifier into your pipeline and activate the option "Compute Voronoi indices".
  2. Now insert a Compute property modifier, edit the field "Expression" to (MaxFaceOrder == 5 && VoronoiIndex.1 == 0 && VoronoiIndex.2 == 0 && VoronoiIndex.3 == 0 && VoronoiIndex.4 == 0 && VoronoiIndex.5 == 12) ? 3 : ParticleType to change the Particle Type of all <0,0,12,0> center atoms to 3 - all other Particle Types remain unchanged. Leave the "Neighbor Expression" field empty.
  3. Repeat the step for <0,0,12,4> : (MaxFaceOrder == 6 && VoronoiIndex.1 == 0 && VoronoiIndex.2 == 0 && VoronoiIndex.3 == 0 && VoronoiIndex.4 == 0 && VoronoiIndex.5 == 12 && VoronoiIndex.6 == 4) ? 4 : ParticleType to generate a new particle type with numeric id 4.
  4. Currently, the easiest is to then export the modified Dataset, open another instance of OVITO and import it as a new Dataset.
  5. Insert a Create bonds modifier and create bonds between particle types 3 and 4, by editing the partial cutoff values between for all pairs of types 3-3, 4-4 and 3-4.

This is just an example, you can of course use other particle type id's (depending on if you want to keep the initial types or not).  Let me know if you have further questions.

Dear Constanze

 It's very nice. I have done it according to your method.  You really helped me a lot, I also have a better understanding of the use of Ovito.  And  the two methods of bond angle distribution,  the final results are same, I got an error during processing.

Thank you very much.

Saichao

Uploaded files:
  • figure.png

That's great to hear!

Dear Constanze

I have another question. Knowing the position of an atom and the Voronoi index are (0, 0, 12, 0), if I want to get the position information of its nearest atom, that is, the other 12 atoms, what should I do ? Can you give me some ideas?

Thanks.

Saichao

Dear Saichao,

for that you need to write a short python script modifier in the GUI. Have a look at the BondsEnumerator utility class,
https://www.ovito.org/docs/current/python/modules/ovito_data.php#ovito.data.BondsEnumerator,
which allows you to iterate of the bonds of individual particles. Once you know the particle index of a neighbor particle, you can use it to look up its position as well.

-Constanze