Using Voronoi analysis for particle neighbor analysis

Hello.
I noticed that OVITO has a Voronoi analysis modifier. Can this modifier output the neighbor particle ids obtained from the voronoi analysis? Also, can the voronoi analysis modifier output the sum of the areas of the faces that enclose a particle as a particle attribute?
Thanks in advance.

Yes, you can write a Python script modifier for the OVITO Pro desktop application that outputs this information.

  1. To find the particle identifiers of the Voronoi neighbors, you can use the BondEnumerator utility class as shown in the linked code example. Please make sure to activate the option “Generate neighbor bonds” in the preceding Voronoi analysis step.

  2. The surface area of each Voronoi polyhedra (and the particle identifier of the corresponding center particle) is stored in a separate Data Table called “Voronoi polyhedra”, which you can access by opening the Surfaces Tab of the Data inspector in the OVITO desktop application.


    Copying the Surface Area column to a particle property is possible with a couple of lines of Python code, see ovito.data.PropertyContainer.create_property.

@kalcher Hello, I would like to ask whether the Voronoi analysis in OVITO can calculate the Minkowski tensor for each cell. The eigenvalues of this tensor can be used to describe the shape of the cell, and I am curious to see if the cells are approximately isotropic. Thank you in advance.

It’s not something that OVITO does automatically, but it should be possible to implement this in the form of a Python modifier. The Voronoi polyhedra are OVITO Surface Mesh objects and all information on their vertices and faces (and consequently their normal vectors) are accessible through OVITO’s Python API.