Skip to content

awvwgk/pyberny

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

197 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyBerny

checks coverage python pypi commits since last commit license code style doi

PyBerny is an optimizer of molecular 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 package implements a single optimization algorithm, which is an amalgam of several techniques, comprising the quasi-Newton method, redundant internal coordinates, an iterative Hessian approximation, a trust region scheme, linear search, and coordinate weighting. The algorithm is described in more detail in the documentation.

Several desirable features are missing or incomplete at the moment, some of them being actively worked on (help is always welcome): crystal geometries, coordinate constraints, coordinate weighting, transition state search.

PyBerny is available in PySCF and QCEngine.

Installing

Install and update using Pip:

pip install -U pyberny

Example

The snippet below optimizes a geometry from geom.xyz end-to-end using MOPAC as the energy/gradient backend:

from berny import Berny, geomlib, optimize
from berny.solvers import MopacSolver

optimizer = Berny(geomlib.readfile('geom.xyz'))
relaxed = optimize(optimizer, MopacSolver())

To plug in a different backend, replace MopacSolver() with any coroutine that follows the same interface (see the documentation for the manual generator pattern and the solver protocol).

Citing

If you use PyBerny in published work, please cite it via its Zenodo DOI: 10.5281/zenodo.3695037. The linked record resolves to the latest release and lists per-version DOIs for citing a specific version.

Links

About

Molecular structure optimizer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 98.3%
  • Shell 1.7%