Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
248 commits
Select commit Hold shift + click to select a range
4e6617e
Membrane support prototype start
hannahbaumann Oct 9, 2025
ac9862a
Merge branch 'main' into membrane_prototype
hannahbaumann Oct 9, 2025
8ea145a
Point to corresponding branch in gufe
hannahbaumann Oct 10, 2025
587a1bf
Merge branch 'membrane_prototype' of https://github.com/OpenFreeEnerg…
hannahbaumann Oct 10, 2025
b7c63d6
Merge branch 'main' into membrane_prototype
hannahbaumann Oct 13, 2025
24f3d58
Make plain md protocol membrane ready
hannahbaumann Oct 13, 2025
617ac8c
Merge branch 'membrane_prototype' of https://github.com/OpenFreeEnerg…
hannahbaumann Oct 13, 2025
7fd5ca9
Merge branch 'main' into membrane_prototype
hannahbaumann Oct 15, 2025
18db828
Dry run for membrane system for debugging
hannahbaumann Oct 17, 2025
1ee6fd7
Merge branch 'membrane_prototype' of https://github.com/OpenFreeEnerg…
hannahbaumann Oct 17, 2025
238b36b
Merge branch 'main' into membrane_prototype
hannahbaumann Oct 20, 2025
6945805
Merge branch 'main' into membrane_prototype
hannahbaumann Oct 20, 2025
646ebbe
Merge branch 'membrane_prototype' of https://github.com/OpenFreeEnerg…
hannahbaumann Oct 20, 2025
abf0007
Add box vectors to modeller
hannahbaumann Oct 20, 2025
96fa49a
Adapt htf to allow for membrane barostat
hannahbaumann Oct 20, 2025
b70e5b2
Fix test
hannahbaumann Oct 20, 2025
481ff35
Add test files membrane
hannahbaumann Oct 20, 2025
4d28281
Merge branch 'main' into membrane_prototype
hannahbaumann Oct 20, 2025
eff1958
Change test to cpu
hannahbaumann Oct 21, 2025
1456a99
Merge branch 'membrane_prototype' of https://github.com/OpenFreeEnerg…
hannahbaumann Oct 21, 2025
0cdde55
Merge branch 'main' into membrane_prototype
hannahbaumann Oct 21, 2025
5bfd1c9
Prints for debugging
hannahbaumann Oct 23, 2025
ce29130
Some more debugginh stuff, remove later
hannahbaumann Oct 24, 2025
c53fd60
Merge branch 'main' into membrane_prototype
hannahbaumann Oct 29, 2025
5c313b1
Small fix
hannahbaumann Oct 29, 2025
9dce0e0
Merge conflicts
hannahbaumann Oct 29, 2025
080d93e
Temporarily use branches for openmmtools and openmmforcefield
hannahbaumann Oct 29, 2025
48a7844
Small fixes
hannahbaumann Oct 29, 2025
b492de0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2025
2913994
support membrane in gather
hannahbaumann Oct 30, 2025
e654a4d
Merge branch 'main' into membrane_prototype
hannahbaumann Oct 31, 2025
1e707ba
Merge branch 'main' into membrane_prototype
hannahbaumann Nov 4, 2025
bf51b0c
First pass membrane support for SepTop protocol
hannahbaumann Nov 6, 2025
872c914
Change validation solvent
hannahbaumann Nov 6, 2025
27d15f7
Move changes in solvent validation to validate_solvent
hannahbaumann Nov 6, 2025
508fa62
Some small fixes
hannahbaumann Nov 6, 2025
a33d882
Merge branch 'main' into membrane_prototype
hannahbaumann Nov 6, 2025
7a640ce
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 6, 2025
44e3545
Add membrane test septop
hannahbaumann Nov 6, 2025
6e4023d
Change box vector units for handling membrane barostat
hannahbaumann Nov 10, 2025
339a9ed
Test box vectors SepTop more
hannahbaumann Nov 10, 2025
741e44c
First pass at ABFE membrane prototype
hannahbaumann Nov 12, 2025
e53512b
Merge branch 'main' into membrane_prototype
hannahbaumann Nov 12, 2025
e67ecd2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 12, 2025
1f408fc
Remove some prints
hannahbaumann Nov 12, 2025
19761df
Revert box changes
hannahbaumann Nov 12, 2025
5d5bc8e
Some fixes in SepTop to fix tests
hannahbaumann Nov 12, 2025
3e6b063
Apply suggestion from @hannahbaumann
hannahbaumann Nov 12, 2025
4d7da11
Add tests for system creation
hannahbaumann Nov 12, 2025
4c7cdd4
Merge branch 'membrane_prototype' of https://github.com/OpenFreeEnerg…
hannahbaumann Nov 12, 2025
0962f3c
FIx test
hannahbaumann Nov 12, 2025
00c606e
Add ABFE membrane tests
hannahbaumann Nov 13, 2025
b317cab
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 13, 2025
d97de53
More tests membrane septop and more dry outputs in septop
hannahbaumann Nov 13, 2025
2145f37
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 13, 2025
fc61675
Add validation for box vector in ProteinMembraneComponent
hannahbaumann Nov 25, 2025
b132806
Merge branch 'main' into membrane_prototype
hannahbaumann Nov 25, 2025
88c9179
Adapt gather for membranes
hannahbaumann Nov 25, 2025
379cdf6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 25, 2025
d79eb36
Merge branch 'main' into membrane_prototype
hannahbaumann Nov 27, 2025
207fe3c
small changes
hannahbaumann Dec 2, 2025
3504100
Merge branch 'main' into membrane_prototype
hannahbaumann Dec 2, 2025
af99e37
Merge branch 'main' into membrane_prototype
hannahbaumann Dec 2, 2025
c309957
Merge branch 'main' into membrane_prototype
hannahbaumann Dec 3, 2025
9ae0565
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 3, 2025
4156c55
Modify box vectors plain md
hannahbaumann Dec 4, 2025
4327ef1
Merge branch 'main' into membrane_prototype
hannahbaumann Dec 5, 2025
ff06372
Address review comments
hannahbaumann Dec 5, 2025
3cd7793
Merge branch 'membrane_prototype' of https://github.com/OpenFreeEnerg…
hannahbaumann Dec 5, 2025
8c00e32
Remove unnecessary prints
hannahbaumann Dec 5, 2025
5dd1758
Subclass membrane test
hannahbaumann Dec 5, 2025
11602f5
Small fix
hannahbaumann Dec 11, 2025
7ac6d32
Merge branch 'main' into membrane_prototype
hannahbaumann Dec 11, 2025
45c26de
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 11, 2025
7dc626c
remove unnecessary import
hannahbaumann Dec 11, 2025
621b0d7
Remove prints
hannahbaumann Dec 12, 2025
a42653e
Small fix
hannahbaumann Dec 12, 2025
825e8ae
Merge branch 'main' into membrane_prototype
hannahbaumann Dec 12, 2025
919cacf
Small fix
hannahbaumann Dec 16, 2025
683b47d
Merge branch 'membrane_prototype' of https://github.com/OpenFreeEnerg…
hannahbaumann Dec 16, 2025
21615c8
Larger change to checks for BaseSolventComponent, SolvatedPDBComponen…
hannahbaumann Jan 9, 2026
45f48e0
Merge branch 'main' into membrane_prototype
hannahbaumann Jan 9, 2026
d3c4711
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 9, 2026
efdb5f1
Some more changes
hannahbaumann Jan 9, 2026
5f6816c
Merge
hannahbaumann Jan 9, 2026
b7f021d
Small fix
hannahbaumann Jan 9, 2026
cfdaf04
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 9, 2026
e35690c
ABFE enforce timestep complex solvent the same
hannahbaumann Jan 12, 2026
5a9f873
Merge branch 'main' into membrane_prototype
hannahbaumann Jan 12, 2026
31f9227
Update test files
hannahbaumann Jan 13, 2026
a2ab353
Update environment.yaml with new openmmtools and openmmforcefield ver…
hannahbaumann Jan 13, 2026
8ff8d45
Remove unnecessary checks for box_vectors which are handled in gufe
hannahbaumann Jan 13, 2026
39e62ca
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 13, 2026
71c8a99
Update openfe/protocols/openmm_afe/equil_binding_afe_method.py
hannahbaumann Jan 14, 2026
edd0e5d
Attempt at rewriting validate_solvent
hannahbaumann Jan 15, 2026
e23d2a2
Move get barostat to self
hannahbaumann Jan 15, 2026
1936b83
Simplify mapping in test
hannahbaumann Jan 15, 2026
cafa04a
Add validator for surface_tension and membrane barostat
hannahbaumann Jan 15, 2026
ec2beaa
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 15, 2026
a0a2ad1
Add membrane barostat to adaptive settings rfe protocol
hannahbaumann Jan 15, 2026
6a3a5a3
Add validation/warning for barostat component mismatch
hannahbaumann Jan 15, 2026
0996c33
Fix tests (except CLI)
hannahbaumann Jan 15, 2026
df381f9
Address merge conflicts
hannahbaumann Jan 16, 2026
54986e8
More merge fixes
hannahbaumann Jan 16, 2026
14e162e
Remove unnecessary imports
hannahbaumann Jan 16, 2026
a0b3c91
Merge branch 'main' into membrane_prototype
hannahbaumann Jan 19, 2026
30218d2
Merge branch 'main' into membrane_prototype
hannahbaumann Jan 22, 2026
5273d43
Merge conflicts
hannahbaumann Jan 23, 2026
962dea5
Merge branch 'main' into membrane_prototype
hannahbaumann Feb 4, 2026
c9b75b9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 4, 2026
5eebbbc
Add test files
hannahbaumann Feb 4, 2026
8b53130
Update tests
hannahbaumann Feb 4, 2026
93b4cb7
Add lipid ff in adaptive settings
hannahbaumann Feb 6, 2026
481c0e9
Merge branch 'main' into membrane_prototype
hannahbaumann Feb 9, 2026
32c4a5e
remove commented out lines
hannahbaumann Feb 10, 2026
4586c5b
Update test abfe
hannahbaumann Feb 10, 2026
8b8529c
Merge branch 'main' into membrane_prototype
hannahbaumann Feb 11, 2026
ede10d3
Update ABFE results with new settings
hannahbaumann Feb 11, 2026
69d0986
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 11, 2026
40b87ec
Merge branch 'main' into membrane_prototype
hannahbaumann Feb 12, 2026
ff2fec9
Fix solvent validation
hannahbaumann Feb 13, 2026
d7e4255
Merge branch 'membrane_prototype' of https://github.com/OpenFreeEnerg…
hannahbaumann Feb 13, 2026
58a004d
Merge branch 'main' into membrane_prototype
hannahbaumann Feb 13, 2026
0039bbe
change env to gufe main
hannahbaumann Feb 13, 2026
5cfbc61
Apply suggestion from @hannahbaumann
hannahbaumann Feb 13, 2026
02ce210
Remove files from before src layout change
hannahbaumann Feb 13, 2026
3450d2c
Merge branch 'membrane_prototype' of https://github.com/OpenFreeEnerg…
hannahbaumann Feb 13, 2026
78b266c
Update tests
hannahbaumann Feb 13, 2026
24cb6d3
Small fix
hannahbaumann Feb 17, 2026
df4ca99
mark slow tests
hannahbaumann Feb 17, 2026
9f67fbf
Merge branch 'main' into membrane_prototype
hannahbaumann Feb 17, 2026
3ec132d
Update env file
hannahbaumann Feb 18, 2026
eddd3d2
Merge branch 'main' into membrane_prototype
hannahbaumann Feb 20, 2026
c2feb33
Small fix
hannahbaumann Feb 20, 2026
de778de
Update src/openfe/protocols/openmm_afe/equil_binding_afe_method.py
hannahbaumann Feb 23, 2026
39793ea
Update src/openfe/protocols/openmm_afe/equil_binding_afe_method.py
hannahbaumann Feb 23, 2026
db4ba21
Update src/openfe/protocols/openmm_rfe/_rfe_utils/relative.py
hannahbaumann Feb 23, 2026
2eaa4a1
Update src/openfe/protocols/openmm_utils/system_validation.py
hannahbaumann Feb 23, 2026
775b619
Address review comments 1
hannahbaumann Feb 23, 2026
949eaeb
Merge branch 'membrane_prototype' of https://github.com/OpenFreeEnerg…
hannahbaumann Feb 23, 2026
20fcd05
update doc string
hannahbaumann Feb 23, 2026
a31527c
Update src/openfe/tests/protocols/openmm_abfe/test_abfe_protocol.py
hannahbaumann Feb 23, 2026
d8d8051
Update src/openfe/tests/protocols/openmm_abfe/test_abfe_protocol.py
hannahbaumann Feb 23, 2026
33e2694
Update src/openfe/tests/protocols/openmm_abfe/test_abfe_protocol.py
hannahbaumann Feb 23, 2026
ff5c0c3
Update src/openfe/tests/protocols/openmm_abfe/test_abfe_protocol.py
hannahbaumann Feb 23, 2026
e9187fd
Address review comments 2
hannahbaumann Feb 23, 2026
93e9d54
Address review comments 3
hannahbaumann Feb 23, 2026
db0bc3e
fix mypy
hannahbaumann Feb 23, 2026
676f4c6
Fix system creation tests
hannahbaumann Feb 23, 2026
20dbdf9
Roundtrip box vectors to remove vec3 issues
hannahbaumann Feb 24, 2026
1720e00
Roundtrip box vectors to remove vec3 issues
hannahbaumann Feb 24, 2026
8652214
Remove unnecessary imports
hannahbaumann Feb 24, 2026
db33dd2
Apply suggestion from @hannahbaumann
hannahbaumann Feb 24, 2026
a148ae8
Test mypy failure
hannahbaumann Feb 24, 2026
201d9fa
Merge branch 'membrane_prototype' of https://github.com/OpenFreeEnerg…
hannahbaumann Feb 24, 2026
22bdbe4
Test mypy failure 2
hannahbaumann Feb 24, 2026
a9dae30
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 24, 2026
f30578e
some fixes
hannahbaumann Feb 24, 2026
f12d806
some fixes
hannahbaumann Feb 24, 2026
1af9cc6
small fixes
hannahbaumann Feb 24, 2026
7254ee7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 24, 2026
13786db
Update test files
hannahbaumann Feb 24, 2026
31e4d72
Merge branch 'membrane_prototype' of https://github.com/OpenFreeEnerg…
hannahbaumann Feb 24, 2026
d6f4fc4
Update SepTop results settings
hannahbaumann Feb 24, 2026
e8b1e29
add more tests for adaptive settings and others
hannahbaumann Feb 24, 2026
99d1258
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 24, 2026
eba6282
Merge branch 'main' into membrane_prototype
hannahbaumann Mar 3, 2026
d7468b6
Add news entry
hannahbaumann Mar 3, 2026
6e848d8
Fix for box vectors hybtop
hannahbaumann Mar 3, 2026
c228e52
Make test slow again
hannahbaumann Mar 3, 2026
d715d11
Make mypy happy
hannahbaumann Mar 3, 2026
c798e58
try to make mypy happy again
hannahbaumann Mar 3, 2026
c2a6467
Adapt gather RFE membrane component types
hannahbaumann Mar 6, 2026
375e26b
Merge branch 'main' into membrane_prototype
IAlibay Mar 9, 2026
028e442
Merge branch 'main' into membrane_prototype
atravitz Mar 9, 2026
a72e135
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 9, 2026
81daebb
use reference platform for the membrane energy test
jthorton Mar 20, 2026
aeec7f4
Merge branch 'main' into membrane_prototype
IAlibay Mar 23, 2026
5b0d76c
Add ChemicalSystem Component validation to Protocols
IAlibay Mar 23, 2026
83a7c21
Add test for chemicalsystem validation
IAlibay Mar 23, 2026
c281222
Apply suggestions from code review
IAlibay Mar 24, 2026
b3d2a0f
Update with slight variation to @jthorton 's suggestion
IAlibay Mar 24, 2026
a41644b
Merge branch 'main' into membrane_prototype
IAlibay Mar 24, 2026
61d0c7d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 24, 2026
d1f2be9
point gufe back at main
IAlibay Mar 24, 2026
5ccbfb6
Drop lipid17 from adaptive settings
IAlibay Mar 24, 2026
322955b
just a tiny nit change
IAlibay Mar 24, 2026
d893a2d
fix typo
IAlibay Mar 24, 2026
6b5c105
Merge branch 'main' into membrane_prototype
IAlibay Apr 2, 2026
b207607
Add extra class to openfecli check
IAlibay Apr 2, 2026
e9d8c0b
Add total particle checks to abfe protocol tests
IAlibay Apr 2, 2026
a1041fd
remove lipid17 check from adaptive settings
IAlibay Apr 2, 2026
6f7ff71
remove lipid17 check from adaptive settings
IAlibay Apr 2, 2026
d514dca
Add some checks for number of particles & residues
IAlibay Apr 2, 2026
e7ae164
Fix up some tests
IAlibay Apr 2, 2026
c34c1b6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 2, 2026
aaaef62
Minimized protein
hannahbaumann Apr 7, 2026
f680e54
Merge branch 'membrane_prototype' of https://github.com/OpenFreeEnerg…
hannahbaumann Apr 7, 2026
f5c2927
Update protein
hannahbaumann Apr 7, 2026
15bfcb6
Merge branch 'main' into membrane_prototype
hannahbaumann Apr 8, 2026
0222eb8
Revert back to old protein
hannahbaumann Apr 8, 2026
312268e
Merge branch 'membrane_prototype' of https://github.com/OpenFreeEnerg…
hannahbaumann Apr 8, 2026
0f953f3
Merge branch 'main' into membrane_prototype
hannahbaumann Apr 9, 2026
e393fda
Apply suggestion from @hannahbaumann
hannahbaumann Apr 9, 2026
72c7f89
Remove box roundtrip and fix solvent from get_components
hannahbaumann Apr 9, 2026
66bcb27
Merge branch 'main' into membrane_prototype
hannahbaumann Apr 9, 2026
d8177ac
Merge conflicts
hannahbaumann Apr 9, 2026
427ce2b
Update src/openfe/tests/protocols/openmm_abfe/test_abfe_protocol.py
hannahbaumann Apr 9, 2026
0662d60
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 9, 2026
0a0f29c
Fix merge conflict
hannahbaumann Apr 9, 2026
5943aed
Forgot another one
hannahbaumann Apr 9, 2026
d6bce0f
Move box roundtrip to _pre_equilibrate
hannahbaumann Apr 9, 2026
7ed71b0
First go at modifying the user guide for membranes and ABFE and SepTop
hannahbaumann Apr 9, 2026
002d321
some small fixes
hannahbaumann Apr 9, 2026
2411b5d
Add adaptive_settings to user guide
hannahbaumann Apr 10, 2026
87735e9
Add example code loading protein membrane
hannahbaumann Apr 10, 2026
d1b70a1
Add box vector explanation
hannahbaumann Apr 10, 2026
c54c699
Some smaller changes
hannahbaumann Apr 10, 2026
02e7a93
Make adaptive settings subheading
hannahbaumann Apr 10, 2026
4935166
Some more changes
hannahbaumann Apr 10, 2026
52b8e3c
Add warning adaptive settings
hannahbaumann Apr 10, 2026
eea1967
Update docs/guide/setup/defining_protocols.rst
hannahbaumann Apr 15, 2026
60678df
Addressing review comments
hannahbaumann Apr 16, 2026
7babe21
some more updates
hannahbaumann Apr 16, 2026
7d5750b
Test out subheadings
hannahbaumann Apr 16, 2026
de2e5e9
Restructure user guide
hannahbaumann Apr 17, 2026
4484d9d
merge conflicts
hannahbaumann Apr 17, 2026
c0fcc4e
Merge branch 'main' into user_guide_updates_membrane
hannahbaumann Apr 17, 2026
d4f2051
Small fix
hannahbaumann Apr 17, 2026
752784f
Merge branch 'user_guide_updates_membrane' of https://github.com/Open…
hannahbaumann Apr 17, 2026
3f2f50b
some small updates
hannahbaumann Apr 17, 2026
1463b97
addressing review comments
hannahbaumann Apr 20, 2026
cd998b9
Small fix
hannahbaumann Apr 20, 2026
5c7cdef
address review comments
hannahbaumann Apr 20, 2026
58453b0
small fix
hannahbaumann Apr 20, 2026
1e8fc68
Add news entry
hannahbaumann Apr 20, 2026
6fdebcc
Merge branch 'main' into user_guide_updates_membrane
atravitz Apr 21, 2026
ee1a729
Update docs/guide/setup/chemical_systems_and_thermodynamic_cycles.rst
hannahbaumann Apr 23, 2026
24405dd
Update docs/guide/setup/defining_protocols.rst
hannahbaumann Apr 23, 2026
eac871c
Update docs/guide/setup/chemical_systems_and_thermodynamic_cycles.rst
hannahbaumann Apr 23, 2026
5b64a84
Merge branch 'main' into user_guide_updates_membrane
hannahbaumann Apr 23, 2026
16aa5a8
Addres review comment
hannahbaumann Apr 23, 2026
acd0abb
Merge branch 'user_guide_updates_membrane' of https://github.com/Open…
hannahbaumann Apr 23, 2026
d1e2fe0
Update docs/guide/setup/chemical_systems_and_thermodynamic_cycles.rst
hannahbaumann Apr 23, 2026
9976c15
Update docs/guide/setup/chemical_systems_and_thermodynamic_cycles.rst
hannahbaumann Apr 23, 2026
27ca639
Address review comment
hannahbaumann Apr 23, 2026
108a86d
Merge branch 'main' into user_guide_updates_membrane
hannahbaumann Apr 24, 2026
f2ba207
Merge branch 'main' into user_guide_updates_membrane
hannahbaumann Apr 24, 2026
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
2 changes: 2 additions & 0 deletions docs/guide/protocols/absolutebinding.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _userguide_abfe_protocol:

Absolute Binding Protocol
=========================

Expand Down
2 changes: 2 additions & 0 deletions docs/guide/protocols/septop.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _userguide_septop_protocol:

Separated Topologies Protocol
=============================

Expand Down
225 changes: 193 additions & 32 deletions docs/guide/setup/chemical_systems_and_thermodynamic_cycles.rst
Original file line number Diff line number Diff line change
@@ -1,55 +1,201 @@
.. _userguide_chemicalsystems_and_components:

Chemical Systems, Components and Thermodynamic Cycles
Components, Chemical Systems and Thermodynamic Cycles
=====================================================

This page describes the core building blocks used to define simulation states in openfe:
:class:`.Component`\s, which describe what is physically present in a system;
:class:`.ChemicalSystem`\s, which combine components into a complete end state;
and thermodynamic cycles, which connect end states via alchemical transformations.

.. _userguide_components:

Components
----------

Components are the composable building blocks that define the chemical
composition of a simulated system. Splitting a system into components serves three purposes:

1. Alchemical transformations can be easily understood by comparing the differences in components.
2. Components can be reused to compose different systems.
3. :class:`.Protocol`\s can apply component-specific behaviour, e.g. different force fields per component.


Component types — overview
~~~~~~~~~~~~~~~~~~~~~~~~~~

.. list-table::
:header-rows: 1
:widths: 25 30 45

* - Component
- Role
- Key notes
* - :class:`.ProteinComponent`
- Biological assembly
- Typically the contents of a PDB file. May include crystallographic waters and ions (defined as HETATM entries),
and disulfide bonds (defined via CONECT records).
* - :class:`.SmallMoleculeComponent`
- Ligands and cofactors
- Can optionally contain atomic partial charges. If present, those will be used in the simulation.
* - :class:`.SolventComponent`
- Abstract solvent definition
- Defines solvent conditions and ion concentration. Does **not** include coordinates or box vectors. Solvent is added by the protocol at runtime.
* - :class:`.SolvatedPDBComponent`
- Explicitly solvated system
- Includes atomic coordinates and box vectors. Solvent is already present,
the protocol does not add any further solvation.
* - :class:`.ProteinMembraneComponent`
- Protein-membrane complex
- Subclass of :class:`.SolvatedPDBComponent`. Includes protein, membrane, solvent,
and box vectors. Replaces :class:`.ProteinComponent` in membrane systems.

.. _userguide_solvation_models:

Abstract vs explicit solvation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

These two approaches are **mutually exclusive**:

* **Abstract solvation** — use a :class:`.SolventComponent`. The protocol adds solvent
during system preparation.
* **Explicit solvation** — use a :class:`.SolvatedPDBComponent` or
:class:`.ProteinMembraneComponent`. Solvent molecule coordinates (waters and ions) are explicitly defined in the inputs.

Either define the solvent abstractly, or provide a fully solvated system — do not mix
both for the same leg of a transformation.

.. note::

Some protocols, such as :class:`.SepTopProtocol` and :class:`.AbsoluteBindingProtocol`,
use a single :class:`.ChemicalSystem` to represent both the complex and solvent legs.
In this case, a :class:`.ChemicalSystem` may contain both a :class:`.SolventComponent`
and a :class:`.ProteinMembraneComponent`. However, these apply to *different* legs: the
:class:`.SolventComponent` is used only for the solvent leg, and the
:class:`.ProteinMembraneComponent` (which is already explicitly solvated) is used only
for the complex leg. The mutual exclusivity rule still holds per leg.

Box vectors for explicitly solvated systems
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The components :class:`.SolvatedPDBComponent` and :class:`.ProteinMembraneComponent`
require periodic box vectors. These can be provided in three ways:

1. **CRYST record in the PDB file** — OpenMM reads box vectors automatically. No additional arguments are needed::

membrane_protein = openfe.ProteinMembraneComponent.from_pdb_file('./protein_membrane.pdb')

2. **Manual specification** — box vectors can be provided explicitly as numpy arrays with OpenFF units in OpenMM format via the ``box_vectors`` argument::

import numpy as np
import openff.units as offunit

box_vectors = np.array([
[6.9587, 0.0, 0.0],
[0.0, 5.9164, 0.0],
[0.0, 0.0, 9.2692]
]) * offunit.nanometer

membrane_protein = openfe.ProteinMembraneComponent.from_pdb_file(
'./protein_membrane.pdb', box_vectors=box_vectors
)

3. **Inference from atomic coordinates** — box vectors can be estimated from the atomic
positions by passing ``infer_box_vectors=True``::

membrane_protein = openfe.ProteinMembraneComponent.from_pdb_file(
'./protein_membrane.pdb', infer_box_vectors=True
)

.. warning::

Inferring box vectors from atomic positions can be inaccurate if the PDB originates
from a previous simulation where atoms may be distributed across periodic images.


.. _userguide_chemical_systems:

Chemical Systems
----------------
ChemicalSystem
--------------

A :class:`.ChemicalSystem` represents the end state of an alchemical transformation,
which can then be input to a :class:`.Protocol`.
A :class:`.ChemicalSystem` is composed of components that together describe a model of the system to be simulated.
simulated system. It represents the **end state** of an alchemical transformation
and is the primary input a :class:`.Protocol` consumes to define a simulation state.

A :class:`.ChemicalSystem` **does** contain the following information (when present):
**What a ChemicalSystem defines**

* exact atomic information (including protonation state) of protein, ligands, co-factors, and any crystallographic
waters
* atomic positions of all explicitly defined components such as ligands or proteins
* the abstract definition of the solvation environment, if present
* Exact atomic information (including protonation state) of protein, ligands,
cofactors, and any crystallographic waters.
* Atomic positions of all explicitly defined components such as ligands or proteins.
* The abstract or explicit definition of the solvent environment (SolventComponent).

A :class:`.ChemicalSystem` does **NOT** include the following:
**What a ChemicalSystem does NOT define**, and are instead handled by the Protocol:

* forcefield applied to any component, including details on water model or virtual particles
* thermodynamic conditions (e.g. temperature or pressure)
Any simulation parameters including:
* Forcefield applied to any component, including water model or virtual particles.
Comment thread
hannahbaumann marked this conversation as resolved.
* Thermodynamic conditions (e.g. temperature or pressure).
* These are handled by the :class:`.Protocol`.
Comment thread
hannahbaumann marked this conversation as resolved.

.. _userguide_components:
.. _userguide_system_composition:

System composition examples
---------------------------

The components that make up each :class:`.ChemicalSystem` depend on the protocol and
the nature of the system. The table below summarises the composition for each combination.

Components
----------

A :class:`.ChemicalSystem` is composed of many 'component' objects, which together define overall system.
.. note::

Examples of components include:
Protocol-specific behaviour:
For :class:`.SepTopProtocol` and :class:`.AbsoluteBindingProtocol`, a single
:class:`.ChemicalSystem` represents both legs of the thermodynamic cycle. The protocol
determines internally what is the complex leg and what is the solvent leg.
This differs from the :class:`.RelativeHybridTopologyProtocol`, where each leg (e.g. complex and solvent) is defined by
separate :class:`.ChemicalSystem`\s. This behaviour is expected to change in future versions.

* :class:`.ProteinComponent`: an entire biological assembly, typically the contents of a PDB file.
* :class:`.SmallMoleculeComponent`: typically ligands and cofactors
* :class:`.SolventComponent`: solvent conditions
.. list-table::
:header-rows: 1
:widths: 20 40 40

Splitting the total system into components serves three purposes:
* - System
- :ref:`RBFE <userguide_relative_hybrid_topology_protocol>` (:class:`.RelativeHybridTopologyProtocol`)
- :ref:`SepTop <userguide_septop_protocol>` / :ref:`ABFE <userguide_abfe_protocol>` (:class:`.SepTopProtocol`, :class:`.AbsoluteBindingProtocol`)
* - **Standard protein–ligand**
- | **Complex leg:**
| :class:`.ProteinComponent` + :class:`.SmallMoleculeComponent`\s + :class:`.SolventComponent`
|
| **Solvent leg:**
| :class:`.SmallMoleculeComponent`\s + :class:`.SolventComponent`
- | **Single ChemicalSystem (both legs):**
| :class:`.ProteinComponent` + :class:`.SmallMoleculeComponent`\s + :class:`.SolventComponent`
* - **Membrane system**
- | **Complex leg:**
| :class:`.ProteinMembraneComponent` + :class:`.SmallMoleculeComponent`\s
| *(no* :class:`.SolventComponent` *— already explicitly solvated)*
|
| **Solvent leg:**
| :class:`.SmallMoleculeComponent`\s + :class:`.SolventComponent`
- | **Single ChemicalSystem (both legs):**
| :class:`.ProteinMembraneComponent` + :class:`.SmallMoleculeComponent`\s + :class:`.SolventComponent`
| *(protocol applies* :class:`.SolventComponent` *only in the solvent leg)*

1. alchemical transformations can be easily understood by comparing the differences in components.
2. components can be reused to compose different systems.
3. :class:`.Protocol`\s can have component-specific behavior. E.g. different force fields for each component.

Thermodynamic Cycles
--------------------

We can now describe a thermodynamic cycle as a set of :class:`.ChemicalSystem`\s.
The exact end states to construct are detailed in the :ref:`pages for each specific Protocol <userguide_protocols>`.
A thermodynamic cycle can be described as a set of :class:`.ChemicalSystem`\s (nodes) connected by
alchemical transformations (edges). The :class:`.Protocol` defines how the
:class:`.ChemicalSystem`\s map onto the cycle and how they are used in practice.
Comment on lines +187 to +189
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this unclear regarding thermodynamic cycles and alchemical networks. Not blocking for this PR, but maybe we can follow up with a better explainer over in the alchemical network docs?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I ended up removing the reference to the alchemical networks here, because I think it would confuse users more, since a thermodynamic cycle is more linked to a Transformation. I think the reference to the protocols here is more helpful, since e.g. in the RBFE protocol we say how the ChemicalSystems are used to describe the thermodynamic cycle.

The same :class:`.ChemicalSystem` can be reused across multiple thermodynamic states
depending on the protocol. For details of which end states to construct, consult the
:ref:`pages for each specific Protocol <userguide_protocols>`.

As an example, we can construct the classic relative binding free energy cycle by defining four components: two ligands,
a protein, and a solvent:
Hybrid topology RBFE example
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

As an example, the relative binding free energy cycle requires four
:class:`.ChemicalSystem`\s — one for each node in the cycle:

.. figure:: ../protocols/img/rbfe_thermocycle.png
:scale: 40%
Expand All @@ -75,12 +221,27 @@ a protein, and a solvent:
ligand_B_complex = openfe.ChemicalSystem(components={'ligand': ligand_B, 'protein': protein, 'solvent': solvent})
# ligand_A + solvent
ligand_A_solvent = openfe.ChemicalSystem(components={'ligand': ligand_A, 'solvent': solvent})
# ligand_A + solvent
# ligand_B + solvent
ligand_B_solvent = openfe.ChemicalSystem(components={'ligand': ligand_B, 'solvent': solvent})

Explicitly solvated variant
~~~~~~~~~~~~~~~~~~~~~~~~~~~

When using a :class:`.SolvatedPDBComponent` or :class:`.ProteinMembraneComponent`, replace :class:`.ProteinComponent`
and :class:`.SolventComponent` for the complex leg. No separate :class:`.SolventComponent`
is required:

::

# explicitly solvated protein-membrane complex (box vectors read from CRYST1 record)
protein_membrane = openfe.ProteinMembraneComponent.from_pdb_file('./protein_membrane.pdb')

# ligand_A + explicitly solvated protein-membrane — no SolventComponent needed
ligand_A_complex = openfe.ChemicalSystem(components={'ligand': ligand_A, 'protein_membrane': protein_membrane})


See Also
--------

* To see how to construct a :class:`.ChemicalSystem` \s from your files, see :ref:`the cookbook entry on loading molecules <Loading Molecules>`
* For details of what thermodynamic cycles to construct, consult the :ref:`pages for each specific Protocol <userguide_protocols>`
* To see how to construct a :class:`.ChemicalSystem` from your files, see :ref:`the cookbook entry on loading molecules <Loading Molecules>`
* For details of which thermodynamic cycles to construct, consult the :ref:`pages for each specific Protocol <userguide_protocols>`
36 changes: 36 additions & 0 deletions docs/guide/setup/defining_protocols.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ there are multiple available ``Protocol``\s to choose from.

For example, included in the ``openfe`` package are the following:
* :class:`.RelativeHybridTopologyProtocol`
* :class:`.AbsoluteBindingProtocol`
* :class:`.SepTopProtocol`
* :class:`.AbsoluteSolvationProtocol`
* :class:`.PlainMDProtocol`

Expand Down Expand Up @@ -47,6 +49,40 @@ For example, to customise the production run length of the RFE Protocol::

protocol = openmm_rfe.RelativeHybridTopologyProtocol(settings)

Adaptive Settings
~~~~~~~~~~~~~~~~~

.. warning::

The ``_adaptive_settings()`` method is experimental and subject to change.

In addition to the ``.default_settings()`` method, some protocols
provide an ``_adaptive_settings`` method. This method generates recommended settings
based on properties of the input :class:`.ChemicalSystem`\s and, where required, the :class:`.AtomMapping`.

For example::

from openfe.protocols import openmm_rfe

settings = openmm_rfe.RelativeHybridTopologyProtocol._adaptive_settings(
stateA=stateA,
stateB=stateB,
mapping=mapping,
)

protocol = openmm_rfe.RelativeHybridTopologyProtocol(settings)

The adaptive settings may modify parameters based on properties of the input systems.
For example (:class:`.RelativeHybridTopologyProtocol`):

* Transformations involving a change in net charge use a larger number of lambda windows and longer production simulations.
* If both states contain a :class:`.ProteinComponent`, the solvation padding is set to 1 nm.

Optionally, you can pass a preexisting settings object to the ``_adaptive_settings`` method via the ``initial_settings`` argument. If provided, an adapted copy of these settings will be returned instead
of using the default settings.

In systems containing membrane-protein complexes (i.e. using a
:class:`.ProteinMembraneComponent`), adaptive settings select a membrane-appropriate barostat, the ``MonteCarloMembraneBarostat``.

Creating Transformations from Protocols
-----------------------------------------
Expand Down
23 changes: 23 additions & 0 deletions news/user_guide_membranes.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* Updated the chemical systems user guide and the defining protocols user guide to reflect recent protocol updates, including adding membrane support.

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>
Loading