Voro++ customized output reference

The output files created by Voro++ can be fully customized to contain a variety of different statistics about the computed Voronoi cells. This is done by specifying a format string that contains text plus additional control sequences that begin with percentage signs. The output file contains a line for each particle, where the control sequences are expanded to different statistics.

The custom printing is done using the print_all_custom() routine in the container class. Customized output can also be carried out with the command-line utility using the “-c” option to specify the output format. See the customized output example code for several demonstrations.

Particle-related entries

%i
The particle ID number.
%x
The x coordinate of the particle.
%y
The y coordinate of the particle.
%z
The z coordinate of the particle.
%q
The position vector of the particle, short for “%x %y %z”.
%r
The radius of the particle (only printed if the polydisperse information is available).

Vertex-related entries

%w
The number of vertices in the Voronoi cell.
%p
A list of the vertices of the Voronoi cell in the format (x,y,z), relative to the particle center.
%P
A list of the vertices of the Voronoi cell in the format (x,y,z), relative to the global coordinate system.
%o
A list of the orders of each vertex.
%m
The maximum radius squared of a vertex position, relative to the particle center.

Edge-related entries

%g
The number of edges of the Voronoi cell.
%E
The total edge distance.
%e
A list of perimeters of each face.

Face-related entries

%s
The number of faces of the Voronoi cell.
%F
The total surface area of the Voronoi cell.
%A
A frequency table of the orders of the faces.
%a
A list of the orders of the faces, showing how many edges make up each face.
%f
A list of areas of each face.
%t
A list of bracketed sequences of vertices that make up each face.
%l
A list of normal vectors for each face.
%n
A list of the neighboring particle or wall IDs corresponding to each face. The list can contain negative numbers. For the non-periodic case these correspond to when the particles have faces created by the edges of the computational region. The numbers -1 to -6 correspond to the minimum x, maximum x, minimum y, maximum y, minimum z, and maximum z walls respectively. For periodic boundary conditions, negative numbers correspond to the cases when a face of the Voronoi cell is created by the periodic image of the current particle.

In general, the neighbor information will be symmetric, so that if particle A reports particle B as a neighbor, then particle B will report particle A as a neighbor. However, due to the fact that Voro++ computes each Voronoi cell individually, it does not provide an explicit guarantee that the neighbor information will always be symmetric. Suppose there is a very small Voronoi face connecting A to B – it may be the case that due to roundoff error, the Voronoi cell computed for particle A has a face connecting it to B, but the cell computed for particle B does not have a face connecting it to A. If the user requires perfectly symmetric neighbor information, this can be achieved by scanning the output for any one-sided connections, and either deleting them or adding in the reverse connections. The face areas output from “%f” can also be used to remove connections between particles that only have a very small face between them.

Volume-related entries

%v
The volume of the Voronoi cell.
%c
The centroid of the Voronoi cell, relative to the particle center.
%C
The centroid of the Voronoi cell, in the global coordinate system.