Home   Manual

Optimize tool from python shell

Dear Community,

I would like to use Avogadro’s extensions (optimize geometry, molecular mechanics) from the python shell (or any other terminal, without actually opening the viewer). However, even after importing avogadro and openbabel to python, I cannot really access those functions.

Is there any way to use the auto optimize tool from avogadro via the python shell?

Thanks for the feedback in advance!

All of the molecular mechanics, optimization, and conformer searching methods in Avogadro v1.x are directly from Open Babel.

You can access these via Python:
https://open-babel.readthedocs.io/en/latest/UseTheLibrary/Python.html

Here’s an example script: