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

connection between voronoi cells

12

Hi,

in principle you can repeat this analysis for any type of Voronoi polyhedron, you just need to adapt your expression in the "Expression selection modifier". So instead of selecting the icosahedral atoms, you can use the particle property "Voronoi Index" to select the <0,2,8,1>  center atoms like this:

VoronoiIndex.4 == 2 && VoronoiIndex.5 == 8 && VoronoiIndex.6 == 1 && Coordination == 11

-Constanze

Quote from Constanze Kalcher on December 30, 2019, 12:12 pm

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

Dear Dr. Constanze,

I had some problem about the CutoffNeighborFinder unity class. When I want to list the neighbors' information of  particles, the program showed a error that "DataCollection does not have an attribute named 'particles", as seen in  the following. I don't know how to sovle this problem,  I am studying Python. Can you help me? Thank you in advance.

Uploaded files:
  • Error.jpg
  • code.png

Dear Saichao,

this script is meant to be executed with OVITO 3 and it seems to me that you're using the outdated 2.9 version.

Best,

Constanze

Dear Constanze,

Thank you. You are right, I am using the old version.  I have tried to run it on the 3.0 version, but still  encountered a problem.  As shown in the following picture, it is the result of running the code, the neighbor information of each particle are not obtained. I read the code again, can this program only output the neighbors of the specified particle? that is to say, a index must be specified in the find() function. what should I do if I want to get the neighbors of each particle?

Saichao

Uploaded files:
  • results.png

Since there seem to be no neighbors at all, this looks like the cutoff you are using in the CutoffNeighborFinder function might be too small for your problem setting?

Dear Constanze,

The input file  I used is the example “CuZr_metallic_glass.dump”, the cutoff is 5, it still did not show any result.

Sorry, I still don't understand what could go wrong. Since you are using the example data and example script we provided you should be able to reproduce the following terminal output (this is for a cutoff of 3.5).

Neighbors of particle 0:
18 2.78492040455254 (2.5660297869999997, 0.06837403819999999, -1.08009156224) (0, 0, 0)
14 2.664525264099226 (1.6236398220000003, 0.37316393820000004, 2.079480052) (0, 0, 0)
9 2.547283618016537 (1.0956299300000003, 2.2780640121999998, -0.31412297499999997) (0, 0, 0)
18357 2.8413118509788022 (-1.141350031, -2.529921412500002, 0.6081700320000001) (0, -1, 0)
8541 2.397615425186259 (-1.738310099, -0.8205710203000001, -1.4330041616999978) (0, 0, -1)
4 2.847800159219062 (-1.96942997, 1.9598839282, -0.6246329547) (0, 0, 0)
2 2.3709593338423742 (-1.321419954, -0.012143015899999998, 1.968540072) (0, 0, 0)
26866 2.592250017586638 (0.6288502219999996, -2.0589208125000056, -1.444005761699998) (0, -1, -1)
18362 2.6641164876352033 (1.461179972, -2.036925212500009, 0.9018899200000001) (0, -1, 0)
8537 3.022272951477517 (0.0070500369999999535, 0.8972439762, -2.8860071617000074) (0, 0, -1)
1 3.1241235435392656 (-0.2817099089999999, 2.5306339262, 1.8101600409999998) (0, 0, 0)
Neighbors of particle 1:
59 2.8178862323525036 (0.17007994599999998, 2.307879925, -1.6078699829999998) (0, 0, 0)
16 2.9780545742617597 (2.8698596949999997, 0.7951202390000001, -0.022320031999999657) (0, 0, 0)
4 3.0170136718995195 (-1.687720061, -0.5707499980000001, -2.4347929956999996) (0, 0, 0)
2 2.7516896244251257 (-1.039710045, -2.5427769421, 0.1583800310000001) (0, 0, 0)
6 2.943782158302438 (-0.36793017400000005, -1.4735698700000004, 2.5217201710000006) (0, 0, 0)
3 3.1293085700169736 (-2.9666740899, -0.6650500300000002, 0.7410299780000003) (0, 0, 0)
58 2.486154078509666 (-1.8982200630000001, 1.5918502810000001, -0.20913004899999965) (0, 0, 0)
5 2.728464223208686 (-1.162199974, 0.9675898549999999, 2.2710301870000005) (0, 0, 0)
14 2.890945799365241 (1.9053497310000003, -2.157469988, 0.269320011) (0, 0, 0)
9 2.544294583105614 (1.3773398390000002, -0.2525699140000004, -2.1242830159999997) (0, 0, 0)
0 3.1241235435392656 (0.2817099089999999, -2.5306339262, -1.8101600409999998) (0, 0, 0)
65 3.2611515094422825 (0.5733900069999995, 2.8592000009999996, 1.4599001409999999) (0, 0, 0)
10 2.6759951892055565 (1.3768301009999995, 0.2770099639999999, 2.2778398990000004) (0, 0, 0)
Neighbors of particle 2:
....

Did you modify the script in any way? I've uploaded the one that I have used for you, so you can compare.

 

Uploaded files:
12