Skip to content

Commit

Permalink
Expose missing timeout kwarg in dynamics.minimise(). [closes #253]
Browse files Browse the repository at this point in the history
  • Loading branch information
lohedges committed Oct 29, 2024
1 parent 146632e commit a5d704f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ organisation on `GitHub <https://github.com/openbiosim/sire>`__.
* Please add an item to this CHANGELOG for any new features or bug fixes when creating a PR.
* Fixed instantiaton of ``QByteArray`` in ``Sire::Mol::Frame::toByteArray`` and count bytes with ``QByteArray::size``.
* Increase timeout before terminating ``QThread`` objects during ``PageCache`` cleanup.
* Expose missing ``timeout`` kwarg in :meth:`dynamics.minimise()` method.

`2024.3.0 <https://github.com/openbiosim/sire/compare/2024.2.0...2024.3.0>`__ - October 2024
--------------------------------------------------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions src/sire/mol/_dynamics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1257,6 +1257,7 @@ def minimise(
starting_k: float = 100.0,
ratchet_scale: float = 2.0,
max_constraint_error: float = 0.001,
timeout: str = "300s",
):
"""
Internal method that runs minimisation on the molecules.
Expand Down Expand Up @@ -1290,6 +1291,8 @@ def minimise(
- starting_k (float): The starting value of k for the minimisation
- ratchet_scale (float): The amount to scale k at each ratchet
- max_constraint_error (float): The maximum error in the constraints in nm
- timeout (float): The maximum time to run the minimisation for in seconds.
A value of <=0 will disable the timeout.
"""
if not self._d.is_null():
self._d.run_minimisation(
Expand All @@ -1301,6 +1304,7 @@ def minimise(
starting_k=starting_k,
ratchet_scale=ratchet_scale,
max_constraint_error=max_constraint_error,
timeout=timeout,
)

return self
Expand Down

0 comments on commit a5d704f

Please sign in to comment.