Bond Angle Distribution (BAD)?

Dear OVITO Support Team,

I hope this message finds you well.

I am a doctoral student using OVITO to analyze molecular dynamics simulation data of a Ni-Nb.

To characterize the local atomic structure, I need to calculate the Bond Angle Distribution (BAD) and the Bond Length Distribution (BLD). I am looking for a way to do this programmatically using a Python script modifier, as I need to process a large number of simulation files.

Could you please guide me to any example scripts or relevant functions in the OVITO Python API that can be used for these calculations? Any assistance or examples you could provide would be greatly appreciated.

Thank you for your time and for developing such a powerful tool.

Best regards,

As you correctly identified, you can use the Coordination Analysis modifier to obtain the particle-particle distance distribution.

If your system already contains chemical bonds, or if you can infer reliable bonds with the Create Bonds modifier, you can use the Bond Analysis modifier to obtain both bond-angle and bond-length distributions simultaneously.

I’ve linked the Python documentation for these modifiers.

1 Like

Thank you so much, @utt Daniel, for your kind help and for always guiding me with patience and clarity.

I truly appreciate your continuous support
I’ll always be grateful to you, my brother Daniel. Your explanations make everything much clearer and truly help me move forward in my research.

Please, if possible, could you kindly send me this script in a private message?

With sincere gratitude,
Ab_do

Please understand that we can’t provide custom scripts or complete solutions to individual research questions. We’re a small team of two, and we simply don’t have the capacity. We encourage you to experiment with the Python API and develop solutions suited to your research needs.

1 Like

Dear @utt Daniel,
Thank you very much for your help and for taking the time to guide me.
I’ve followed these steps to obtain the BAD:

Added the Coordination Analysis modifier
Created the bond pairs and set the cutoff values
Added the Bond Analysis

Could you please confirm if these steps are correct?
I really appreciate your support and your time.

Best regards,
Ab_Do

Yes this ordering is correct.