I use ovito python pachage to analyze cluster indetal. ClusterAnalysisModifier does not give atom ID in very cluster。How can get atom id of every cluster by means of python package.thanks a lot.
The different clusters identified by OVITO’s Cluster Analysis modifier are given numeric identifiers ranging from 1 to N , the total number of clusters. The algorithm assigns each input particle to one of these clusters and outputs this information as a new particle property named Cluster
.
Since particle properties behave very similar to numpy
arrays, you can use this information to look up the particle identifiers of all particles belonging to a specific cluster, e.g.
data.particles['Particle Identifier'][data.particles['Cluster'] == 1]
https://www.ovito.org/docs/current/reference/pipelines/modifiers/cluster_analysis.html