Skip to content

Commit

Permalink
change convergence test to use internal gradient
Browse files Browse the repository at this point in the history
  • Loading branch information
jhrmnn committed Feb 20, 2020
1 parent 05c59ed commit 0e81865
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.masonry.api"

[tool.poetry]
name = "pyberny"
version = "0.6.0"
version = "0.6.1"
description = "Molecular/crystal structure optimizer"
readme = "README.md"
authors = ["Jan Hermann <[email protected]>"]
Expand Down
2 changes: 1 addition & 1 deletion src/berny/berny.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def send(self, energy_and_gradients): # noqa: D102
s.best = current
s.first = False
self._converged = is_converged(
gradients, s.future.q - current.q, on_sphere, s.params, log=log
current.g, s.future.q - current.q, on_sphere, s.params, log=log
)
if self._n == self._maxsteps:
log('Maximum number of steps reached')
Expand Down
4 changes: 2 additions & 2 deletions tests/test_optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ def ethanol():


def aniline():
return geomlib.readfile(resource_filename('tests', 'aniline.xyz')), 8
return geomlib.readfile(resource_filename('tests', 'aniline.xyz')), 11


def cyanogen():
return geomlib.readfile(resource_filename('tests', 'cyanogen.xyz')), 4


def water():
return geomlib.readfile(resource_filename('tests', 'water.xyz')), 6
return geomlib.readfile(resource_filename('tests', 'water.xyz')), 7


@pytest.mark.parametrize('test_case', [ethanol, aniline, cyanogen, water])
Expand Down

0 comments on commit 0e81865

Please sign in to comment.