Skip to content

User guide updates membrane#1933

Open
hannahbaumann wants to merge 225 commits intomainfrom
user_guide_updates_membrane
Open

User guide updates membrane#1933
hannahbaumann wants to merge 225 commits intomainfrom
user_guide_updates_membrane

Conversation

@hannahbaumann
Copy link
Copy Markdown
Contributor

@hannahbaumann hannahbaumann commented Apr 9, 2026

  • Adds ProteinMembraneComponent explanation, including example code of creating a ChemicalSystem for the complex leg of protein-membrane simulations.
  • Adds _adaptive_settings to the user guide
  • Adds mentioning of the differences in defining ChemicalSystems in ABFE and SepTop vs HybTop protocols.
  • Update CLI user guide to add the --protein-membrane flag

Checklist

  • All new code is appropriately documented (user-facing code must have complete docstrings).
  • Added a news entry, or the changes are not user-facing.
  • Ran pre-commit: you can run pre-commit locally or comment on this PR with pre-commit.ci autofix.

Manual Tests: these are slow so don't need to be run every commit, only before merging and when relevant changes are made (generally at reviewer-discretion).

Developers certificate of origin

hannahbaumann and others added 30 commits October 9, 2025 16:36
@hannahbaumann hannahbaumann changed the base branch from main to membrane_prototype April 9, 2026 12:51
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

No API break detected ✅

@atravitz atravitz added this to the 1.11.0 milestone Apr 9, 2026
@hannahbaumann hannahbaumann changed the title [WIP] User guide updates membrane User guide updates membrane Apr 10, 2026
Copy link
Copy Markdown
Member

@IAlibay IAlibay left a comment

Choose a reason for hiding this comment

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

I think we've historically been missing some exposition here, so my question would be if it would be reasonable to add it or if it would end up being too much work (or if it should be elsewhere)?

Comment thread docs/guide/setup/defining_protocols.rst Outdated
Comment thread docs/guide/setup/defining_protocols.rst Outdated
Comment on lines +83 to +85
.. warning::

The ``_adaptive_settings()`` method is experimental and subject to change.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is great. As a small nit, it might be good to move that to the top so that it's the first thing folks read.

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.

Done!

Comment on lines +26 to +29
For some protocols, such as :class:`.SepTopProtocol` and :class:`.AbsoluteBindingProtocol`, a single
:class:`.ChemicalSystem` is used to represent both legs of the thermodynamic cycle (complex and solvent).
This is in contrast to the :class:`.RelativeHybridTopologyProtocol`, where each leg is defined by
separate :class:`.ChemicalSystem`\s.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe put this in a .. note: section? It would be good to say that this is subject to change too.

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.

Done!

# ligand_B + solvent
ligand_B_solvent = openfe.ChemicalSystem(components={'ligand': ligand_B, 'solvent': solvent})

For a protein-membrane complex, the `ligand_A_complex` would instead use a
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thinking about it a bit more - will the code changes work for just any ExplicitPDBComponent? I.e. could this be reduced to just "if you explicitly defined the system components, e.g. with a protein membrane" and then "here is an example using a ProteinMembraneComponent".

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.

Changed this!

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.

When dealing with membrane-protein systems, the protein is represented using an explicitly solvated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The content of what is being added looks good, but there's a "missing link".

What I think we've been missing (since before membrane support) is the idea that the Components are composable. What would you think about something like this:

  • These Components are additively added into a ChemicalSystem, which will define the chemical composition of the simulated system.
  • For a conventional protein-ligand complex in water, this would look like [add protein, small and solvent components]
    • Some mention that the protein component handles crystallographic waters and also can define SSBONDs via the CONECT records.
  • For membrane proteins: what you have here

Co-authored-by: Irfan Alibay <IAlibay@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (membrane_prototype@d6bce0f). Learn more about missing BASE report.

Additional details and impacted files
@@                  Coverage Diff                  @@
##             membrane_prototype    #1933   +/-   ##
=====================================================
  Coverage                      ?   90.57%           
=====================================================
  Files                         ?      206           
  Lines                         ?    18757           
  Branches                      ?        0           
=====================================================
  Hits                          ?    16990           
  Misses                        ?     1767           
  Partials                      ?        0           
Flag Coverage Δ
fast-tests 90.57% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


Examples of components include:

* :class:`.ProteinComponent`: an entire biological assembly, typically the contents of a PDB file.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we could hint here that the ProteinComponent can also contain crystal waters.

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.

Added this!


Box vectors can be estimated from the atomic coordinates in the PDB file.

Caveat: This approach can be inaccurate if the PDB comes from a previous simulation and some atoms are positioned in periodic images.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would use a warning box for this to make it clear this should be a last resort.

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.

Added a warning box.

Base automatically changed from membrane_prototype to main April 16, 2026 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants