PyBEL geometry solver

I’m working on developing a python file which intakes user defined molecule information and then writes each molecule in open babel, converts it to a pybel object, and then optimizes the geometry to record the coordinates of each atom. I’ve run in to the issue where each of the geometry solvers (mmff94, gaff, uff, and ghemical) return vastly different coordinate sets for the same molecule. Utilizing the avogadro ui returns accurate structures, so I was wondering if anyone knew what class is called during that geometry optimization step that enables the program to determine which solver to use on the drawn molecule.

First off, PyBEL is something different.

Different force fields (e.g., MMFF94 or UFF) will certainly return different geometries, although I’m not sure I’d consider them “vastly different” coordinate sets if you’re starting from the same geometry.

Avogadro’s default is MMFF94 if the elements are supported and UFF otherwise.

MMFF94, UFF, etc. are not geometry solvers in the same simple sense that you solve a single simple mathematical equation. Instead, they offer an educated guess how the molecule’s 3D shape is going to look like with some assumptions derived from already known structures. The youtube channel TMP Chem Computational Chemistry sheds some light on how these geometry optimizations work.

There are at least two limitations to bear in mind when requesting Avogadro (or any other program of similar scope) to perform a geometry optimization by MMFF94, or other force fields:

  • they yield one conformation of low inner energy of the molecule. This local minimum may, but need not to be the conformation of lowest energy possible. But you may access them, e.g., by a conformational analysis. Since Avogadro accesses the power of OpenBabel, you might find the entries in its documentation about how to identify a single conformer as well as the systematic generation of multiple conformers a suitable entry into the topic. (Folding large proteins is beyond the scope of OpenBabel, though.)

  • defining a single molecule, and performing an optimization is about this isolated molecule. The conformation suggested may differ from the one preferentially encountered in solution/solid state/a crystal where the interaction of the molecule with its neighbors may yield a conformation representing an energetic minimum for this ensemble.