Thank you so much for your reply.
I actually have my own clustering algorithm. I would like to add it as a user defined modifier in Ovito. For that, I need to do a coordination analysis on the atoms in each individual cluster. Since currently the Coordination analysis modifier performs calculation on all the atoms in the system, I would like to know whether is it possible to use the Coordination analysis modifier as a separate function so that it can be called with only certain atomic positions and get the coordination numbers based on only the input atoms.
Also, I am getting the following error with certain modifiers (Coordination analysis modifier, Delete Selected Modifier) when I try to use them in my script,
from ovito.data import *
from ovito.modifiers import CoordinationAnalysisModifier
import numpy as np
def modify(frame, input, output):
Input_data = (np.array([input.particle_properties[“Position”].array[:,0], input.particle_properties[“Position”].array[:,1], input.particle_properties[“Position”].array[:,2])).T
The Python script has exited with an error.
Traceback (most recent call last):
File “< string >”, line 2, in
ImportError: cannot import name ‘CoordinationAnalysisModifier’
BTW, I’m using Ovito 2.9.0 version