# connection between voronoi cells

**1**2

Quote from lee lion on December 25, 2019, 4:33 pmDeal all,

the ovito can determine which voronoi cells are connected to each other? and how many of them are connected together?

for example, the below picture show vertex-, edge-, face-sharing and the interconnected icosahedrons. the ovito can determine how many icosahedron are connected with vertex-sharing, etc?

thanks in advance for any help or hint.

Deal all,

the ovito can determine which voronoi cells are connected to each other? and how many of them are connected together?

for example, the below picture show vertex-, edge-, face-sharing and the interconnected icosahedrons. the ovito can determine how many icosahedron are connected with vertex-sharing, etc?

thanks in advance for any help or hint.

**Uploaded files:**

- You need to login to have access to uploads.

Quote from Constanze Kalcher on December 30, 2019, 12:12 pmDear Lee,

just to clarify: please note that what you are showing below are not the Voronoi cells itself, but only the coordination polyhedra.

However, what you're asking should be doable with a python script modifier. First you need to use the Voronoi analysis modifier to generate nearest neighbor bonds and Voronoi indices. Then, in second step, you could use the BondsEnumerator utility class to visit the neighbor particles of each central particle and also their neighbor particles and check their Voronoi indices.

https://www.ovito.org/docs/current/python/modules/ovito_data.php#ovito.data.BondsEnumerator-Constanze

Dear Lee,

just to clarify: please note that what you are showing below are not the Voronoi cells itself, but only the coordination polyhedra.

However, what you're asking should be doable with a python script modifier. First you need to use the Voronoi analysis modifier to generate nearest neighbor bonds and Voronoi indices. Then, in second step, you could use the BondsEnumerator utility class to visit the neighbor particles of each central particle and also their neighbor particles and check their Voronoi indices.

https://www.ovito.org/docs/current/python/modules/ovito_data.php#ovito.data.BondsEnumerator

-Constanze

Quote from lee lion on February 6, 2020, 12:28 pmDear Constanze,

In the following of my previous question, I used "Voronoi analysis" to Generate neighbor bonds. Could you help to obtain the longest line? (which is equal to the the longest connected Icosahedrons having a common face).

Thanks

Dear Constanze,

In the following of my previous question, I used "Voronoi analysis" to Generate neighbor bonds. Could you help to obtain the longest line? (which is equal to the the longest connected Icosahedrons having a common face).

Thanks

**Uploaded files:**

- You need to login to have access to uploads.

Quote from Constanze Kalcher on February 6, 2020, 4:41 pmJust to clarify, you now selected and deleted all atoms of a specific Voronoi type (I'm guessing <0,0,12,0> icosahedral atoms?) and would like to calculate how many of those center atoms are connected through direct bonds? So you're not interested in the actual length of those chains but rather the number of atoms that are part of it, am I right?

Then you could simply add aCluster Analysis modifierto your pipeline and choose the neighbor mode "Bonds", see the corresponding manual entry for a detailed explanation: https://www.ovito.org/docs/current/particles.modifiers.cluster_analysis.php

This modifier will not only give you the largest cluster but also a complete list of the sizes of all "clusters" (i.e. in your case chains) which you can easily export or further analyze with aHistogram modifiere.g..Let me know if you have questions.

Just to clarify, you now selected and deleted all atoms of a specific Voronoi type (I'm guessing <0,0,12,0> icosahedral atoms?) and would like to calculate how many of those center atoms are connected through direct bonds? So you're not interested in the actual length of those chains but rather the number of atoms that are part of it, am I right?

Then you could simply add a** Cluster Analysis modifier** to your pipeline and choose the neighbor mode "Bonds", see the corresponding manual entry for a detailed explanation: https://www.ovito.org/docs/current/particles.modifiers.cluster_analysis.php

This modifier will not only give you the largest cluster but also a complete list of the sizes of all "clusters" (i.e. in your case chains) which you can easily export or further analyze with a **Histogram modifier** e.g..

Let me know if you have questions.

Quote from lee lion on February 6, 2020, 7:48 pmDear Dr. Constanze,

First of all so many thanks for attention and fast and exact response, as well as how good you understood my mean. I attached some pictures showing the pipeline. I guess, but not ensure, my way to attain the largest cluster, which is the largest group of face-sharing icosahedrons, is right.

Could you please take a look on them and tell me whether my way is correct?

Regard

Dear Dr. Constanze,

First of all so many thanks for attention and fast and exact response, as well as how good you understood my mean. I attached some pictures showing the pipeline. I guess, but not ensure, my way to attain the largest cluster, which is the largest group of face-sharing icosahedrons, is right.

Could you please take a look on them and tell me whether my way is correct?

Regard

**Uploaded files:**

- You need to login to have access to uploads.

Quote from lee lion on February 7, 2020, 12:44 amDear Dr. Constanze,

I come across with a matter. Please read and give me your feedback.

According to the attached picture in my first post, if we have two Face-Sharing (FS) Icosahedrons, we will have 23 atoms. In other words, each Icosahedron has 13 atoms (the central atom + the neighbours), and when they are connected via Face-Sharing, the number of two connected Icosahedrons would be 23 (=13 + 13 -3) (the number 3 belongs to the red atoms). Is it right?

And when these two Icosahedron are connected via Intercross-Sharing (IS), the number of two connected Icosahedrons would be 19 (=13 + 13 - 7). Is it right?

On the other hand, when I read OVITO manual, I found while we use "Generate neighbor bonds", it will generate a bond for every pair of adjacent atoms that share a face of the Voronoi tessellation. Therefore, it might come to the mind, it holds for Face-Sharing Voronoi cells.

To investigate this matter, with "Generate neighbor bonds", I selected two neighbor atoms, then with the "Expand selection", I obtained 12 neighbor for each atom. What was of interest to me is that the whole number of atoms is 19. Thus, the connected atoms in my sample are IS. Generally speaking, it seems that the underlined line is more or less wrong. Is it right?

Thanks in advance

Regard

Dear Dr. Constanze,

I come across with a matter. Please read and give me your feedback.

According to the attached picture in my first post, if we have two Face-Sharing (FS) Icosahedrons, we will have 23 atoms. In other words, each Icosahedron has 13 atoms (the central atom + the neighbours), and when they are connected via Face-Sharing, the number of two connected Icosahedrons would be 23 (=13 + 13 -3) (the number 3 belongs to the red atoms). Is it right?

And when these two Icosahedron are connected via Intercross-Sharing (IS), the number of two connected Icosahedrons would be 19 (=13 + 13 - 7). Is it right?

On the other hand, when I read OVITO manual, I found while we use "Generate neighbor bonds", it will generate a bond for every pair of adjacent atoms that share a face of the Voronoi tessellation. Therefore, it might come to the mind, it holds for Face-Sharing Voronoi cells.

To investigate this matter, with "Generate neighbor bonds", I selected two neighbor atoms, then with the "Expand selection", I obtained 12 neighbor for each atom. What was of interest to me is that the whole number of atoms is 19. Thus, the connected atoms in my sample are IS. Generally speaking, it seems that the underlined line is more or less wrong. Is it right?

Thanks in advance

Regard

Quote from Constanze Kalcher on February 7, 2020, 2:38 pmDear Lee,

as far as I can see from everything you posted above there is nothing wrong with your analysis. Again, please be aware that the coordination polyhedra you showed in your first post are

notthe same as the Voronoi polyhedra. The coordination polyhedron of an atom with a <0,0,12,0> Voronoi index is an icosahedron, but the actual Voronoi polyhedron is a dodecahedron. Please have a look at the attached images. The second one shows that the Voronoi cells of two neighboring <0,0,12,0> atoms share a face. (In case you haven't seen this already: OVITO now has an option to plot the Voronoi cells.)That means that when you talk about a face-sharing coordination polyhedron (named FS in your picture), it does not mean that the Voronoi polyhedra of the two center atoms are actually face sharing. Furthermore, when you look at two <0,0,12,0> center atoms that share a direct bond, then you know that their Voronoi polyhedra share a face and their coordination polyhedra are what you call intercross sharing.

Hope that helps,

Constanze

Dear Lee,

as far as I can see from everything you posted above there is nothing wrong with your analysis. Again, please be aware that the coordination polyhedra you showed in your first post are **not** the same as the Voronoi polyhedra. The coordination polyhedron of an atom with a <0,0,12,0> Voronoi index is an icosahedron, but the actual Voronoi polyhedron is a dodecahedron. Please have a look at the attached images. The second one shows that the Voronoi cells of two neighboring <0,0,12,0> atoms share a face. (In case you haven't seen this already: OVITO now has an option to plot the Voronoi cells.)

That means that when you talk about a face-sharing coordination polyhedron (named FS in your picture), it does not mean that the Voronoi polyhedra of the two center atoms are actually face sharing. Furthermore, when you look at two <0,0,12,0> center atoms that share a direct bond, then you know that their Voronoi polyhedra share a face and their coordination polyhedra are what you call intercross sharing.

Hope that helps,

Constanze

**Uploaded files:**

- You need to login to have access to uploads.

Quote from lee lion on February 7, 2020, 11:14 pmDear Dr. Constanze,

First of all so many thanks for fully and clearly explanation about the discrepancy between the coordination polyhedra and the Voronoi polyhedra.

Now I have some raised questions.

1- According to the first and second uploaded pictures, after I apply "expand selection" (above all other modifiers), it doesn't show the first 12 neighbor, I think it is due to using "Delete selection" before that. Could you help me to tackle this problem?

2- I have to what extent the same problem in the use of "Generate Voronoi polyhedra". I showed in the third snapshot that I tried to make Voronoi polyhedra around the selected atoms, but I could not. It would be highly appreciated If you could help me.

3- When I use the "Generate neighbor bonds", it gives me the output like your last uploaded picture. Could you help me how I can create the Face-Sharing coordination polyhedra, i.e. the first image?

So many thanks for attention, complete answers

REGARD,

Lee

Dear Dr. Constanze,

First of all so many thanks for fully and clearly explanation about the discrepancy between the coordination polyhedra and the Voronoi polyhedra.

Now I have some raised questions.

1- According to the first and second uploaded pictures, after I apply "expand selection" (above all other modifiers), it doesn't show the first 12 neighbor, I think it is due to using "Delete selection" before that. Could you help me to tackle this problem?

2- I have to what extent the same problem in the use of "Generate Voronoi polyhedra". I showed in the third snapshot that I tried to make Voronoi polyhedra around the selected atoms, but I could not. It would be highly appreciated If you could help me.

3- When I use the "Generate neighbor bonds", it gives me the output like your last uploaded picture. Could you help me how I can create the Face-Sharing coordination polyhedra, i.e. the first image?

So many thanks for attention, complete answers

REGARD,

Lee

**Uploaded files:**

- You need to login to have access to uploads.

Quote from Constanze Kalcher on February 10, 2020, 10:15 am1- That's correct, once you delete all other atoms, you can't bring them back by using an Expand Selection modifier. You should move that Modifier further down your pipeline.

2- If you delete most of the atoms and then use the Voronoi analysis modifier, the Voronoi analysis will only be performed with the leftover atoms. So you will get a completely different result then and that's probably not what you meant to do.

To view only the Voronoi polyhedra around your selection of atoms, you can again use a combination of Expression Selection, Invert Selection and Delete Selection modifiers, but you need to make sure you change the "Operate on" option fromtoParticlesMesh Regions: Voronoi Polyhedra.3- Finding these face-sharing coordination polyhedra is not simply feasible with the out-of-the-box modifiers in the GUI. It would require you to develop a python script modifier. As I explained in my first post, the best option is probably to iterate over all icosahedral atoms and then look up their direct neighbors and check how many neighbors they share with a second-nearest-neigbhor icosahdral atom, so to say.

1- That's correct, once you delete all other atoms, you can't bring them back by using an Expand Selection modifier. You should move that Modifier further down your pipeline.

2- If you delete most of the atoms and then use the Voronoi analysis modifier, the Voronoi analysis will only be performed with the leftover atoms. So you will get a completely different result then and that's probably not what you meant to do.

To view only the Voronoi polyhedra around your selection of atoms, you can again use a combination of Expression Selection, Invert Selection and Delete Selection modifiers, but you need to make sure you change the "Operate on" option from ** Particles** to

**Mesh Regions: Voronoi Polyhedra**.3- Finding these face-sharing coordination polyhedra is not simply feasible with the out-of-the-box modifiers in the GUI. It would require you to develop a python script modifier. As I explained in my first post, the best option is probably to iterate over all icosahedral atoms and then look up their direct neighbors and check how many neighbors they share with a second-nearest-neigbhor icosahdral atom, so to say.

Quote from lee lion on March 29, 2020, 7:28 pmDear Dr. Constanze,

First of all, thank you to answer my questions. In the following the post #7, I have a question. As you showed in the second image, two voronoi polyhedra have a common face (i.e. two coordination polyhedra are interconnected). I have a home-made code which can calculate the ID of atoms which their voronoi polyhedron have a common face, but it was developed for Icosahedron. I compared my results with results obtained with OVITO, they were identical. Now, I want to know whether OVITO works for other voronoi indexes or not? In other words, can I obtain the biggest chain of atoms, whose voronoi indexes is <0 2 8 1>, and their voronoi polyhedra have a common face?

Best Regards,

Lee

Dear Dr. Constanze,

First of all, thank you to answer my questions. In the following the post #7, I have a question. As you showed in the second image, two voronoi polyhedra have a common face (i.e. two coordination polyhedra are interconnected). I have a home-made code which can calculate the ID of atoms which their voronoi polyhedron have a common face, but it was developed for Icosahedron. I compared my results with results obtained with OVITO, they were identical. Now, I want to know whether OVITO works for other voronoi indexes or not? In other words, can I obtain the biggest chain of atoms, whose voronoi indexes is <0 2 8 1>, and their voronoi polyhedra have a common face?

Best Regards,

Lee

**1**2