Molecular/crystal structure optimizer
Project description
PyBerny
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
- Documentation: https://pyberny.nablapsi.science
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyberny-0.7.0.tar.gz.
File metadata
- Download URL: pyberny-0.7.0.tar.gz
- Upload date:
- Size: 83.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54729005140f8b8d98db72d5fa635d994e1cb74666b15c02ff08e5312808abd5
|
|
| MD5 |
bb6df5e22f96686d096361d6ebdd1bcb
|
|
| BLAKE2b-256 |
0edc630d6f87c2eae530b028f2e4d35ed1b8e2bf3442efe1bee5fd40943e0a72
|
Provenance
The following attestation bundles were made for pyberny-0.7.0.tar.gz:
Publisher:
publish.yaml on pyberny/pyberny
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyberny-0.7.0.tar.gz -
Subject digest:
54729005140f8b8d98db72d5fa635d994e1cb74666b15c02ff08e5312808abd5 - Sigstore transparency entry: 2189816454
- Sigstore integration time:
-
Permalink:
pyberny/pyberny@8f200b868b5b42247cbac7e2c5cec27811671fdd -
Branch / Tag:
refs/heads/master - Owner: https://github.com/pyberny
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@8f200b868b5b42247cbac7e2c5cec27811671fdd -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file pyberny-0.7.0-py3-none-any.whl.
File metadata
- Download URL: pyberny-0.7.0-py3-none-any.whl
- Upload date:
- Size: 102.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9db1982ba2af45fc98f2d0578e56680b3fbb7e3213c672f7c27a05be922fd749
|
|
| MD5 |
e87310096ac97e0feb2558f40203de94
|
|
| BLAKE2b-256 |
b2e12b4d739ee7e3b9aa9f63875f37026d71634733ba320a6000b0c5839369fe
|
Provenance
The following attestation bundles were made for pyberny-0.7.0-py3-none-any.whl:
Publisher:
publish.yaml on pyberny/pyberny
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyberny-0.7.0-py3-none-any.whl -
Subject digest:
9db1982ba2af45fc98f2d0578e56680b3fbb7e3213c672f7c27a05be922fd749 - Sigstore transparency entry: 2189816480
- Sigstore integration time:
-
Permalink:
pyberny/pyberny@8f200b868b5b42247cbac7e2c5cec27811671fdd -
Branch / Tag:
refs/heads/master - Owner: https://github.com/pyberny
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@8f200b868b5b42247cbac7e2c5cec27811671fdd -
Trigger Event:
workflow_run
-
Statement type: