Inserting a particle at a Voronoi vertex at maximum distance from existing particles

Hi,

I am running a 2-D simulation and wish to occasionally insert particles. For the location of the insertion, I want to meet two criteria:

  1. The particle should be inserted within the convex hull of a defined dynamic group of particles in the simulation.

  2. The particle should be placed as far away as possible from any of the particles in the defined group.

My current thought on calculating the coordinates of insertion is to find the Voronoi vertices within the convex hull of the defined group of particles and then find which of those vertices has the maximum distance to a particle in the group.

Looking at the computes available, voronoi/atom seems to be a promising starting point, however there is not an option to output the coordinates of the vertices. Before going too far down the rabbit hole of modifying/creating a compute, is there any suggestion for a more simple method of calculating the desired insertion coordinates, preferably minimizing the editing or creation of source code?

Best,

Garrett

You could look at the docs for the Voro++ program (which compute voronoi/atom uses)
to see if it gives you the info you need. If it does, there might be a way
to add an option to compute voronoi/atom to extract more info from Voro++.

Since the compute returns per-atom values, you’d need to think about how to
calculate and return something like “coords of an open-space point near this atom” for each atom.

If Voro++ doesn’t do something like that, you could talk to the author, or you
could figure out how to compute it yourself from info Voro++ returns. You might
be able to write a compute that invokes compute voronoi/atom, then uses the result
to compute what you need and returns. Then use that result as input to
fix deposit or create_atom single to add a particle at the calculated coord.

Steve