Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Absolute solvation free energies + base things for ABFEs #573

Merged
merged 85 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
744121e
first pass at some draft code
IAlibay Jan 10, 2023
4889a84
Avoid numpy 1.24 issues for now
IAlibay Jan 10, 2023
b4cd06c
various fixes
IAlibay Jan 10, 2023
f59d011
more tests
IAlibay Jan 10, 2023
af91563
somewhere along the way
IAlibay Mar 17, 2023
ccfa700
Merge branch 'main' into ahfe-start
IAlibay Mar 17, 2023
71fe845
Working AFE protocol
IAlibay Apr 1, 2023
5fba962
Merge branch 'main' into ahfe-start
IAlibay Apr 1, 2023
a1fa702
fix mypy issues + start settings tests
IAlibay Apr 1, 2023
dc807cf
actually include mypy fixes
IAlibay Apr 1, 2023
d2af3a0
Does mypy like this?
IAlibay Apr 1, 2023
e2aced0
a few more tests
IAlibay Apr 1, 2023
45c82db
some setting changes
IAlibay Apr 1, 2023
c8d9986
more tests
IAlibay Apr 1, 2023
aed8a5a
update tests, and default settings
IAlibay Apr 2, 2023
8a502e7
Add no cover for extends branch
IAlibay Apr 2, 2023
9b06724
add gather and tagging from rbfe tests
IAlibay Apr 2, 2023
a965cde
More tests + some docs
IAlibay Apr 3, 2023
9e9255b
fix mc steps check
IAlibay Apr 3, 2023
f874064
clean up tests
IAlibay Apr 3, 2023
97e38ca
Add docs
IAlibay Apr 3, 2023
90db395
add some titles, see what sticks
IAlibay Apr 3, 2023
2f1f75f
Add protocols to toctree
IAlibay Apr 3, 2023
0066b12
add autodoc_pydantic deps and complete solvation free energy docs
IAlibay Apr 3, 2023
bed6d65
update environment
IAlibay Apr 3, 2023
4d4e65f
clashing installs?
IAlibay Apr 3, 2023
f6fcb3c
Merge branch 'main' into ahfe-start
IAlibay Apr 3, 2023
17708f7
Update conf.py
IAlibay Apr 3, 2023
c07c313
Add todo extension
IAlibay Apr 3, 2023
da2a054
Merge branch 'main' into ahfe-start
IAlibay Apr 3, 2023
50099a6
Update conf.py
IAlibay Apr 3, 2023
6ef216a
Merge branch 'main' into ahfe-start
IAlibay Apr 3, 2023
05a4174
Merge branch 'main' into ahfe-start
IAlibay Apr 4, 2023
54d7cf0
don't cover non-dry run
IAlibay Apr 4, 2023
686b658
Merge branch 'main' into ahfe-start
IAlibay Jun 27, 2023
bf1e700
Centralize settings
IAlibay Jun 27, 2023
98c3e67
continue refactor
IAlibay Jun 29, 2023
7d21932
base class refactor
IAlibay Jul 5, 2023
d0bdae5
partial changes - just so I can keep working from laptop
IAlibay Jul 12, 2023
af3b60f
some more interim changes
IAlibay Jul 13, 2023
8ef667f
Merge branch 'main' into ahfe-start
IAlibay Sep 5, 2023
12792e9
towards refactor
IAlibay Sep 9, 2023
a624477
more refactoring
IAlibay Oct 5, 2023
c0e1c57
Merge branch 'main' into ahfe-refactor
IAlibay Oct 5, 2023
f342a75
more refactor
IAlibay Oct 5, 2023
53cafc6
Various fixes
IAlibay Oct 5, 2023
fbe89a4
more changes
IAlibay Oct 6, 2023
b587d36
Add estimate return
IAlibay Oct 6, 2023
7142c7f
fix up tests
IAlibay Oct 6, 2023
4f1431c
couple of fixes
IAlibay Oct 6, 2023
f50ffe6
fix gather issues
IAlibay Oct 8, 2023
7316543
try to fix the docs
IAlibay Oct 8, 2023
67d9556
fix mypy complaint
IAlibay Oct 9, 2023
7097683
avoid using todo extensions for now
IAlibay Oct 9, 2023
77e67d9
Merge branch 'main' into ahfe-refactor
IAlibay Oct 11, 2023
ae4c0c5
towards all the results
IAlibay Oct 11, 2023
5160063
noindex on settings
IAlibay Oct 11, 2023
a920ddf
remove redundant settings test file
IAlibay Oct 11, 2023
f819573
fix pep8 issues
IAlibay Oct 11, 2023
7d554ac
fix typing issues
IAlibay Oct 11, 2023
34d533e
fix solvent->vacuum typo
IAlibay Oct 16, 2023
35b7735
Add solvation_afe to doc index
IAlibay Oct 16, 2023
0dea343
Make it so that gas phase is only stateA alchemical components
IAlibay Oct 16, 2023
192a35d
Add tokenization tests
IAlibay Oct 16, 2023
966de42
Add tokenization tests
IAlibay Oct 16, 2023
1c2cbff
simplify getting alchemical atom ids
IAlibay Oct 16, 2023
c6af8af
remove bad func pattern
IAlibay Oct 16, 2023
0404be7
cleanup comments
IAlibay Oct 16, 2023
49b6842
Merge branch 'main' into ahfe-refactor
IAlibay Oct 16, 2023
1aac5ec
Use abstractmethod instead of NotImplemented
IAlibay Oct 16, 2023
03aeaa1
Fixing up some docstrings
IAlibay Oct 16, 2023
85eee9b
Updates docs ready for PR 570
IAlibay Oct 16, 2023
c50bf90
Add in the remaining protocol unit result methods
IAlibay Oct 16, 2023
32af083
Fix typo
IAlibay Oct 16, 2023
91d32b9
bad indentation
IAlibay Oct 16, 2023
b6da3f1
fix mypy issues
IAlibay Oct 16, 2023
e1b44e5
first stab at results testing for solvation afe
IAlibay Oct 16, 2023
2523e6a
properly test reading results
IAlibay Oct 17, 2023
00a46d5
some docstring fixes
IAlibay Oct 17, 2023
1f9853a
fixup type ignore comment
IAlibay Oct 17, 2023
4ff4872
add results tokenization test
IAlibay Oct 17, 2023
f938430
cleanup docstring
IAlibay Oct 17, 2023
ebfa4fd
remove temp comments
IAlibay Oct 17, 2023
694e421
fixup docstring
IAlibay Oct 18, 2023
6231c00
Fix up naming of ProtocolUnit to something more unique + shorter
IAlibay Oct 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,5 +161,8 @@ cython_debug/
# vim
*.swp

# vscode
.vscode/

# Example notebooks
docs/ExampleNotebooks/
docs/ExampleNotebooks/
1 change: 1 addition & 0 deletions docs/reference/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ OpenFE API Reference
alchemical_network_planning
defining_and_executing_simulations
openmm_rfe
openmm_solvation_afe
146 changes: 146 additions & 0 deletions docs/reference/api/openmm_solvation_afe.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
OpenMM Absolute Solvation Free Energy Protocol
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be worth figuring out if we're documenting things in the rst or the py files. e.g. see #570 which I think leans heavily in favour of the rst just being stubs

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:/ that PR does a lot of changes, we probably should merge it first and then fix things here? (or the inverse)

==============================================

This section provides details about the OpenMM Absolute Solvation Free Energy Protocol
implemented in OpenFE.

Protocol API specification
--------------------------

.. module:: openfe.protocols.openmm_afe.equil_solvation_afe_method

.. autosummary::
:nosignatures:
:toctree: generated/

AbsoluteSolvationProtocol
AbsoluteSolvationProtocolResult

Protocol Settings
-----------------


Below are the settings which can be tweaked in the protocol. The default settings (accessed using :meth:`AbsoluteSolvationProtocol.default_settings`) will automatically populate settings which we have found to be useful for running solvation free energy calculations. There will however be some cases (such as when calculating difficult to converge systems) where you will need to tweak some of the following settings.

.. autopydantic_model:: AbsoluteSolvationSettings
:model-show-json: False
:model-show-field-summary: False
:model-show-config-member: False
:model-show-config-summary: False
:model-show-validator-members: False
:model-show-validator-summary: False
:field-list-validators: False
:inherited-members: SettingsBaseModel
:exclude-members: get_defaults
:member-order: bysource
:noindex:

.. module:: openfe.protocols.openmm_afe.equil_afe_settings

.. autopydantic_model:: OpenMMSystemGeneratorFFSettings
:model-show-json: False
:model-show-field-summary: False
:model-show-config-member: False
:model-show-config-summary: False
:model-show-validator-members: False
:model-show-validator-summary: False
:field-list-validators: False
:inherited-members: SettingsBaseModel
:member-order: bysource
:noindex:

.. autopydantic_model:: ThermoSettings
:model-show-json: False
:model-show-field-summary: False
:model-show-config-member: False
:model-show-config-summary: False
:model-show-validator-members: False
:model-show-validator-summary: False
:field-list-validators: False
:inherited-members: SettingsBaseModel
:member-order: bysource
:noindex:

.. autopydantic_model:: AlchemicalSamplerSettings
:model-show-json: False
:model-show-field-summary: False
:model-show-config-member: False
:model-show-config-summary: False
:model-show-validator-members: False
:model-show-validator-summary: False
:field-list-validators: False
:inherited-members: SettingsBaseModel
:member-order: bysource
:noindex:

.. autopydantic_model:: AlchemicalSettings
:model-show-json: False
:model-show-field-summary: False
:model-show-config-member: False
:model-show-config-summary: False
:model-show-validator-members: False
:model-show-validator-summary: False
:field-list-validators: False
:inherited-members: SettingsBaseModel
:member-order: bysource
:noindex:

.. autopydantic_model:: OpenMMEngineSettings
:model-show-json: False
:model-show-field-summary: False
:model-show-config-member: False
:model-show-config-summary: False
:model-show-validator-members: False
:model-show-validator-summary: False
:field-list-validators: False
:inherited-members: SettingsBaseModel
:member-order: bysource
:noindex:

.. autopydantic_model:: IntegratorSettings
:model-show-json: False
:model-show-field-summary: False
:model-show-config-member: False
:model-show-config-summary: False
:model-show-validator-members: False
:model-show-validator-summary: False
:field-list-validators: False
:inherited-members: SettingsBaseModel
:member-order: bysource
:noindex:

.. autopydantic_model:: SimulationSettings
:model-show-json: False
:model-show-field-summary: False
:model-show-config-member: False
:model-show-config-summary: False
:model-show-validator-members: False
:model-show-validator-summary: False
:field-list-validators: False
:inherited-members: SettingsBaseModel
:member-order: bysource
:noindex:

.. autopydantic_model:: SolvationSettings
:model-show-json: False
:model-show-field-summary: False
:model-show-config-member: False
:model-show-config-summary: False
:model-show-validator-members: False
:model-show-validator-summary: False
:field-list-validators: False
:inherited-members: SettingsBaseModel
:member-order: bysource
:noindex:

.. autopydantic_model:: SystemSettings
:model-show-json: False
:model-show-field-summary: False
:model-show-config-member: False
:model-show-config-summary: False
:model-show-validator-members: False
:model-show-validator-summary: False
:field-list-validators: False
:inherited-members: SettingsBaseModel
:member-order: bysource
:noindex:
22 changes: 22 additions & 0 deletions openfe/protocols/openmm_afe/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This code is part of OpenFE and is licensed under the MIT license.
# For details, see https://github.com/OpenFreeEnergy/openfe
"""
Run absolute free energy calculations using OpenMM and OpenMMTools.

"""

from .equil_solvation_afe_method import (
AbsoluteSolvationProtocol,
AbsoluteSolvationSettings,
AbsoluteSolvationProtocolResult,
AbsoluteSolvationVacuumUnit,
AbsoluteSolvationSolventUnit,
)

__all__ = [
"AbsoluteSolvationProtocol",
"AbsoluteSolvationSettings",
"AbsoluteSolvationProtocolResult",
"AbsoluteVacuumUnit",
"AbsoluteSolventUnit",
]
Loading