Using Voronoi analysis for particle neighbor analysis

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 active the option “Generate neighbor bonds” in the preceding Voronoi analysis step.

  2. The surface area of each 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