Dear Ovito members,
I am contacting you because I want to combine Python and Ovito to do Voronoi analysis on a configuration of 5000 polydisperse particles closed in a cubic simulation box with periodic boundary conditions. In particular, I would like to compute the Cavity Radius. However, I need help finding out how. At the moment, I am doing the following:
def assign_particle_radii(frame, data):
atom_types = data.particles_.particle_types_
atom_types.type_by_id_(1).radius = 0.42
atom_types.type_by_id_(2).radius = 0.475
atom_types.type_by_id_(3).radius = 0.50
atom_types.type_by_id_(4).radius = 0.56
pipeline = import_file(input)
celldata = pipeline.compute()
pipeline.source.data.cell_.pbc = (True,True,True)
pipeline.modifiers.append(assign_particle_radii)
voro = VoronoiAnalysisModifier(
compute_indices = True,
use_radii = True,
edge_threshold = 0.1,
)
pipeline.modifiers.append(voro)
data = pipeline.compute()
voro_volume = data.particles['Atomic Volume']
voro_cavity = data.particles['Cavity Radius']
However, it seems that ‘Cavity Radius’ is not contained in data.particles. Could you indicate or provide me with information about what I should introduce in data.particles to compute the cavity radius?
Thank you so much in advance for your time.
Regards,
Jose