Berny is an optimizer of molecular and crystal geometries with respect to the total energy, using nuclear gradient information.
In each step, it takes energy and Cartesian gradients as an input, and returns a new equilibrium structure estimate.
The algorithm is an amalgam of several techniques, comprising redundant internal coordinates, iterative Hessian estimate, trust region, line search, and coordinate weighing, mostly inspired by the optimizer in the Gaussian program.
Install and update using Pip:
pip install -U pyberny
from berny import Berny, geomlib
optimizer = Berny(geomlib.readfile('geom.xyz'))
for geom in optimizer:
# get energy and gradients for geom
optimizer.send((energy, gradients))
- Documentation: https://azag0.github.io/pyberny