Skip to content

Commit

Permalink
add Berny.trust property
Browse files Browse the repository at this point in the history
  • Loading branch information
jhrmnn committed May 17, 2019
1 parent 99b1ba2 commit cd81995
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ In each step, it takes energy and Cartesian gradients as an input, and returns a

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, and linear search. The algorithm is described in more detailed in the [documentation](https://jhrmnn.github.io/pyberny/algorithm.html).

Several desirable features are missing at the moment but planned, some of them being actively worked on (help is always welcome): [crystal geometries](https://github.com/jhrmnn/pyberny/issues/5)[coordinate constraints](https://github.com/jhrmnn/pyberny/issues/14), [coordinate weighting](https://github.com/jhrmnn/pyberny/issues/32), [transition state search](https://github.com/jhrmnn/pyberny/issues/4).
Several desirable features are missing at the moment but planned, some of them being actively worked on (help is always welcome): [crystal geometries](https://github.com/jhrmnn/pyberny/issues/5)[coordinate constraints](https://github.com/jhrmnn/pyberny/issues/14), [coordinate weighting](https://github.com/jhrmnn/pyberny/issues/32), [transition state search](https://github.com/jhrmnn/pyberny/issues/4).

## Installing

Expand Down
7 changes: 6 additions & 1 deletion berny/berny.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
else:
from ._py2 import Generator # noqa

__version__ = '0.2.1'
__version__ = '0.2.2'
__all__ = ['Berny']

defaults = {
Expand Down Expand Up @@ -114,6 +114,11 @@ def __next__(self):
self._n += 1
return self._state.geom

@property
def trust(self):
"""Current trust radius."""
return self._state.trust

def send(self, energy_gradients): # noqa: D102
log = self._log
log.n = self._n
Expand Down
6 changes: 4 additions & 2 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ This covers all supported public API.

.. module:: berny

.. autofunction:: Berny
.. autoclass:: Berny
:members:
:exclude-members: Point, send, throw

.. autodata:: berny.berny.defaults

Expand All @@ -16,7 +18,7 @@ This covers all supported public API.
.. autofunction:: optimize

.. autoclass:: Logger
:members: __call__
:members:

Geometry operations
-------------------
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def __getattr__(cls, name):
'**': ['about.html', 'navigation.html', 'relations.html', 'searchbox.html']
}
htmlhelp_basename = f'{project}doc'
autodoc_default_options = {'special-members': '__call__'}


def skip_namedtuples(app, what, name, obj, skip, options):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ skip-string-normalization = true

[tool.poetry]
name = "pyberny"
version = "0.4.2"
version = "0.4.3"
description = "Molecular/crystal structure optimizer"
readme = "README.md"
authors = ["Jan Hermann <dev@jan.hermann.name>"]
Expand Down

0 comments on commit cd81995

Please sign in to comment.