Forum Navigation
You need to log in to create posts and topics.

Cluster analysis cut-off radius dependent on atom-type

Hi there,

I am wondering if it is possible to perform the cluster analysis with multiple cut-off radii, i.e. where the cut-off radius is dependent upon atom type instead of just one arbitrary distance.

For example, if I have 3 atom types in my system then:

I would like atom types 1 and 2 to be defined to the same cluster if they are within 3 A of each other.

I would also like atom types 2 and 3 to be defined to the same cluster if they are within 4 A of each other.

I feel like this might be possible with a python script but I'm unsure.

Thank you in advance for any help!

Hi Charlotte,

Python scripting is not needed in this case, I would say. You can first apply the Create Bonds modifier (select mode "Pair-wise Cutoffs" to set type-specific distance thresholds). Then apply the Cluster Analysis modifier and select the neighbor mode "Bonds".


Hi Alex,

Thank you for your speedy reply - that works perfectly!

Best Wishes,


New for our users in China: OVITO on WeChat 

Official OVITO WeChat channel operated by Foshan Diesi Technology Co., Ltd.