Skip to content

[WIP] Protocol : Nonequilibrium Cycling#1066

Closed
dotsdl wants to merge 92 commits intomainfrom
protocol-neqcyc
Closed

[WIP] Protocol : Nonequilibrium Cycling#1066
dotsdl wants to merge 92 commits intomainfrom
protocol-neqcyc

Conversation

@dotsdl
Copy link
Copy Markdown
Member

@dotsdl dotsdl commented Jul 6, 2022

Description

A nonequilibrium cycling protocol supporting execution with OpenMM, using the protocol structure defined in gufe.

Motivation and context

This is one of the first protocols to be developed using the gufe structure, and is intended to surface deficiencies in that structure. The end result will be a protocol that can be executed locally (with Protocol.execute()) as well as on cluster resources using a suitable Scheduler (e.g. an HPC scheduler like that being developed by OpenFE).

Immediate needs

  • docstrings on all methods required or defined

How has this been tested?

  • unit tests of protocol units
  • unit tests of NonEquilibriumCyclingProtocol
  • unit tests of NonEquilibriumCyclingResult

Change log

New features
^^^^^^^^^^^^
- `perses.protocols` submodule added; features `NonEquilibriumCyclingProtocol`

dotsdl added 2 commits July 6, 2022 10:38
Skeleton of nonequilibrium cycling protocol, using the protocol
structure defined in `gufe`.
@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 6, 2022

Codecov Report

Merging #1066 (71a94ba) into main (c96e655) will decrease coverage by 0.15%.
The diff coverage is 8.92%.

❗ Current head 71a94ba differs from pull request most recent head faac030. Consider uploading reports for the commit faac030 to get more accurate results

@dotsdl dotsdl self-assigned this Jul 6, 2022
@dotsdl dotsdl changed the title Protocol : Nonequilibrium Cycling [WIP] Protocol : Nonequilibrium Cycling Jul 6, 2022
@zhang-ivy
Copy link
Copy Markdown
Contributor

Suggestions for names other than Protocol: experiment, runner, workflow, pipeline

@dotsdl
Copy link
Copy Markdown
Member Author

dotsdl commented Aug 22, 2022

Ah, I think I'm still inclined to call this Protocol, since in the context of gufe this defines the procedure by which we execute the simulations necessary to calculate a \Delta G. A Protocol produces a ProtocolDAG from a set of input ChemicalSystems, an atom mapping (if necessary), and potentially any previous result that should be used as a starting point.

The ProtocolDAG is more akin to an individual experiment or workflow in this sense, while the Protocol it comes from is more akin to the instructions for performing it.

@zhang-ivy
Copy link
Copy Markdown
Contributor

zhang-ivy commented Aug 22, 2022

Thanks for the clarification! I still think it would be better to rename Protocol (i.e. to Procedure or InstructionSet) because if gufe is going to replace the perses API, "protocol" means something different in the context of free energy calculations, so its going to be confusing for perses users. However, it seems like I may be the only one that has a problem with the name, so I think its ok if we keep it as is and just make sure the class/name choice is well documented (which I'm sure you are planning to do anyway).

@ijpulidos
Copy link
Copy Markdown
Contributor

I don't have a strong opinion here, there are valid points from all sides. I guess that as long as we make this clear from the docstrings and existing documentation, this should be fine. We may even want to put something like "Not to be confused with... " as a first line in the docstring.

I wonder if aliasing the gufe classes names is a sane option for perses codebase. I don't really know enough about design patterns around this.

@dotsdl
Copy link
Copy Markdown
Member Author

dotsdl commented Aug 22, 2022

...because if gufe is going to replace the perses API, "protocol" means something different in the context of free energy calculations, so its going to be confusing for perses users.

@zhang-ivy can you define here what "protocol" means in the context of free energy calculations? I don't know that there's a universally-accepted definition in the field, but if there is strong consensus I'd like to know what it is so we can act accordingly.

@zhang-ivy
Copy link
Copy Markdown
Contributor

zhang-ivy commented Aug 22, 2022

When I hear "protocol" in the context of alchemical free energy calculations, I think of the alchemical protocol, which tells us how we should transform the WT (or lambda = 0 endstate) into the mutant (or lambda = 1 endstate) residue. In practice, this can be thought of as a list of lambda values. The protocols I've been using are linear (e.g. if there are 4 alchemical states, the protocol would be [0, 0.25, 0.5, 1.0] and 0 would be mean that the WT residue's nonbonded interactions are fully on and the mutant residue's nonbonded interactions are fully off, 0.25 would mean that the WT residue's nonbonded interactions are turned 75% on and the mutant nonbonded interactions are turned 25% on, and so on), but they can be non-linear with a varying number of alchemical states.

The alchemical protocol used is critical to the calculation because it determines how well the alchemical states overlap, which in turn affects the bias and error of the calculation.

@dotsdl dotsdl assigned ijpulidos and unassigned dotsdl Aug 23, 2022
@dotsdl dotsdl requested review from jchodera and mikemhenry August 23, 2022 18:12
Comment thread perses/protocols/nonequilibrium_cycling.py Outdated
@dotsdl
Copy link
Copy Markdown
Member Author

dotsdl commented Nov 6, 2022

@ijpulidos can we sync up on this early this week? I'd like to be in a position to run this protocol locally, ideally by 11/08. Is there anything blocking this for you?

@mikemhenry
Copy link
Copy Markdown
Contributor

Now that we are doing the refactor, we can merge this in once tests pass (feel free to remove tests that don't make sense anymore, but I do what the new stuff tested)

@ijpulidos
Copy link
Copy Markdown
Contributor

Tests will fail with this one, I don't really know why they aren't being run. But I expect we would need to refactor some of the tests since the API for the RelativeFEPSetup object has changed.

Does it make sense that we try to merge this one as it is (after we resolve the merging conflicts) and work on fixing/refactoring the tests for it in a separate PR? Such that we can review these changes independently and it doesn't get too overwhelming (this is already a huge PR).

@ijpulidos
Copy link
Copy Markdown
Contributor

Oh right, I think tests are not running because of the merge conflict, @mikemhenry already mentioned that in the past.

@ijpulidos
Copy link
Copy Markdown
Contributor

We could just mark the failing tests to be skiped as old_api or similar. And fix the tests when we work on the refactor.

@ijpulidos
Copy link
Copy Markdown
Contributor

The activity on this protocol has been migrated to https://github.com/choderalab/feflow. Closing.

@ijpulidos ijpulidos closed this Mar 29, 2024
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.

6 participants