# Improved optimizer

**URL:** <https://discuss.avogadro.cc/t/improved-optimizer/7450>\
**Category:** Development\
**Created:** [May 22, 2026, 3:41pm UTC](https://discuss.avogadro.cc/t/improved-optimizer/7450 "2026-05-22T15:41:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghutchis](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/ghutchis/32/456_2.png) [@ghutchis](https://discuss.avogadro.cc/u/ghutchis)\
**Post date:** [May 22, 2026, 3:41pm UTC](https://discuss.avogadro.cc/t/improved-optimizer/7450/1 "2026-05-22T15:41:56Z")

</div>

I mentioned briefly in the [May 2026 Development Updates](https://discuss.avogadro.cc/t/may-2026-development-updates/7449) - I’ve implemented some improvements in the geometry optimizer:

- an updated version of the cppoptlib library, improving L-BFGS substantially
- an implementation of the FIRE / ABC-FIRE method inspired by ASE
  - this approaches geometry optimization like MD - “skiing downhill”
  - it only performs one gradient per step, so it’s much faster at rough geometries

- a “hybrid” approach (now the default) that uses ABC-FIRE in early steps, then switches to L-BFGS once the gradient is small

The result is pretty impressive. It’s **~6x faster** than geometry optimizations in 2.0 - the auto-opt snaps back maybe a bit too fast.

It’s also more reliable - sometimes the optimizer would quit in 2.0 and earlier versions because L-BFGS would try to take big steps. It’s now tuned better to chemical problems.

It also works better with plugins - fewer gradient evaluations means xtb and ML methods are more useful.

---

<div class="post-metadata">

**Author:** ![ghutchis](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/ghutchis/32/456_2.png) [@ghutchis](https://discuss.avogadro.cc/u/ghutchis)\
**Post date:** [May 22, 2026, 8:48pm UTC](https://discuss.avogadro.cc/t/improved-optimizer/7450/2 "2026-05-22T20:48:32Z")

</div>

For reference, the UFF optimization of `1MYK.pdb` on my M4 Mac laptop (single core) takes ~350 ms for 1000 steps. That’s a 780 atom protein.

I’ll look around for something really big, but interactive optimizations of polymers and proteins is definitely possible.

The code does some adaptive timing so “chunks” can happen ~30 fps. For small molecules that means some large chunks (e.g., 200 optimization steps). Caffeine optimizes in ~2 ms. That’s not a typo.

As I said, I almost wonder about slowing it down for AutoOpt. Right now if you distort an atom, it snaps back really really fast.
