Energy Minimization with Open Babel: Practical Guide for Ligand Preparation

Jan 12, 2024·
Yassir Boulaamane
Yassir Boulaamane
· 3 min read

A ligand drawn by hand, or pulled from a 2D table, is often a bad start for docking. obminimize relaxes it with a small-molecule force field. It does not produce a protein-bound pose.

Steepest descent first, then conjugate gradientA strained ligand goes through steepest descent to clear clashes, then conjugate gradient to finish near the minimum. MMFF94 is the drug-like choice in this note. UFF is the choice when the element coverage has to be broader.Clear the clash, then convergeStartBad geometrySD-sd, robustCG-cg, defaultMMFF94 for drug-like ligandsUFF when metals or odd elements are in the file
Figure 1. Steepest descent is the first pass because it tolerates a bad start. Conjugate gradient is the default and is the right second pass once the worst clashes are gone. The force-field switch is separate: MMFF94, or MMFF94s, for ordinary organic ligands; UFF when the element set is the problem.

Downloaded or sketched ligands carry unrealistic bonds, angles, and overlaps. Docking those coordinates can bias the score or fail to converge. Minimization is the preprocessing step that makes the geometry a plausible gas-phase start. Commercial tools such as Chem3D do this too. Open Babel is the free command-line route.

The command

obminimize [options] input_file
  • -ff chooses the force field.
  • -sd is steepest descent.
  • -cg is conjugate gradient, and it is the default.
  • -h adds hydrogens.
  • -n sets the maximum number of steps. The default is 2500.
  • -o sets the output format, such as PDB, MOL2, or SDF.

Which force field

Force fieldTypical useStrengthWeakness
GAFFGeneral drug-like moleculesAMBER-compatibleLess aimed at a small ligand on its own
GhemicalTeaching, small moleculesLightLimited accuracy
MMFF94Small organic ligandsWell validatedA bit heavier
MMFF94sMMFF94 variantBetter torsionsSimilar cost to MMFF94
UFFOrganics, inorganics, metalsWide element coverageWeaker on ordinary organics

For a drug-like ligand, use MMFF94 or MMFF94s.

SD, then CG

Steepest descent walks the gradient. It is robust and it removes high-energy clashes. It is slow once the molecule is close to a minimum.

Conjugate gradient uses the gradient and the previous search direction. It takes fewer steps near the minimum. It can fail if the start is still far away.

So the order is SD first, CG second.

Two recorded commands

MMFF94 with steepest descent, hydrogens added, PDB out:

obminimize -sd -ff MMFF94 -h ligand.mol2 -o pdb ligand_min.pdb

UFF with conjugate gradient, for a metal complex, SDF out:

obminimize -cg -ff UFF metal_complex.mol2 -o sdf metal_min.sdf

A longer run is the same command with -n set above the default of 2500. This note does not record a specific step count, so there is no third command to copy.

The output is a ligand that is less likely to explode in docking or in the first steps of MD. It is still a force-field minimum of the free ligand, not a bound conformation and not a quantum geometry.