-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is the Neighbors List correct ? #842
Comments
Hi @Optimox , Can you give a script which details the box and points you are working with so we can look at this more in-depth? Based on the discussion in #839 , you are working with a 3D box, but I think displaying it on a 2D rectangle can create distortions which may be misleading as to which cell is a neighbor of which. |
Hello @tommy-waltmann, Thanks for your help. Indeed my original problem is 3D, however in order check my pipeline I started with 2D. So I work with a tiny slice of my 3D data and put everything in 2D before doing any computation. So there are no 3D -> 2D artefacts in the drawing above. You'll find bellow a complete code snippet which allow you to reproduce this exact drawing. It's a bit long sorry. I'm really curious to understand what's happening, I hope you'll be able to help me.
|
Upon closer inspection, it appears that the bonds that were thought to be missing are actually there, they just are in blue instead of red. This is a result of having a system which is short in the y-direction. In the script posted above, all neighbor points which are separated by less than 1/2 box length in both the x and y directions have their bonds appear in blue, not red. Sometimes those points are voronoi neighbors of each other because one of their polytopes extends across the box. We would instinctive think those bonds should appear in red in the above plot, but they don't because of how short your system is in the y-direction. Hope this clears everything up, let me know if there is any more confusion. |
@tommy-waltmann thanks for looking at it. So is there a better way of detecting "artificial" bonds (or red bonds)? I understand that it is a difficult problem, but I can't lower the box size since my lower points are not on the same y level. That's why I started to ask if it was possible to use a convex hull instead of a box. Do you see an effective way to discriminate between real and artificial bonds ? |
I think you have a few options going forward:
I would seriously recommend trying options 1 and 2 before going to option 3, but option 3 may still be doable if you play around with it long enough. If you tell me some more about what you are studying, I can be more helpful as far as recommending an option. |
@tommy-waltmann thanks for your help. Unfortunately 1 and 2 are not possible for me. However I ended up adding some fake points at top and bottom so that I just need to ignore connections from those fake points and end up with real connections only. Seems to be working ok. Thanks very much I'm closing this. |
Referring to the discussion on #839 I am looking at voronoi bonds given by
voro.nlist
.I'm interested in finding all the points which have a bond crossing on of the frontier of the box using:
I then plot in red the bonds that cross the frontier and in blue the one that don't.

It seems that the method to differentiate between red and blue bonds work well. However I feel like some red bonds are missing:

Do you agree with me on some red bonds missing? Or am I not understanding something?
How exactly is the neighbors list computed? Is it supposed to be exhaustive?
Thanks in advance for your help
The text was updated successfully, but these errors were encountered: