Skip to main content

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 GFN2-xTB (via tblite) as the energy/gradient backend:

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

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

To plug in a different backend, replace XTBSolver() 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

Release files for pyberny 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyberny 0.7.0
File Size Uploaded
pyberny-0.7.0.tar.gz 83.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyberny 0.7.0
File Interpreter ABI Platform
pyberny-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 185.7 kB

Release files / pyberny-0.7.0.tar.gz

Download URL pyberny-0.7.0.tar.gz
Size 83.5 kB
Tags Source
SHA-256 checksum
How to use checksums
54729005140f8b8d98db72d5fa635d994e1cb74666b15c02ff08e5312808abd5
BLAKE2b-256 checksum
How to use checksums
0edc630d6f87c2eae530b028f2e4d35ed1b8e2bf3442efe1bee5fd40943e0a72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.

Transparency log

Release files / pyberny-0.7.0-py3-none-any.whl

Download URL pyberny-0.7.0-py3-none-any.whl
Size 102.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9db1982ba2af45fc98f2d0578e56680b3fbb7e3213c672f7c27a05be922fd749
BLAKE2b-256 checksum
How to use checksums
b2e12b4d739ee7e3b9aa9f63875f37026d71634733ba320a6000b0c5839369fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 17, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page