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

Support pymbar 4 #1173

Merged
merged 17 commits into from
Jul 19, 2023
Merged

Support pymbar 4 #1173

merged 17 commits into from
Jul 19, 2023

Conversation

mikemhenry
Copy link
Contributor

Description

Motivation and context

Resolves #???

How has this been tested?

Change log

Added support for pymbar 4 (pymbar 3 is also still supported)

@mikemhenry
Copy link
Contributor Author

I will re-run this with pymbar 4 to make sure it still works

@codecov
Copy link

codecov bot commented Mar 28, 2023

Codecov Report

Merging #1173 (1b3f9bd) into 0.10.x (a46516c) will decrease coverage by 2.67%.
The diff coverage is 37.93%.

@mikemhenry mikemhenry added this to the 0.10.2 Bugfix release milestone Mar 28, 2023
@ijpulidos
Copy link
Contributor

This is looking great, this is the way we should be using pymbar in perses, just through openmmtools. Let me know when you run the tests for pymbar 4 and I'll make the review.

@mikemhenry
Copy link
Contributor Author

Pretty sure that the tests we expect to pass are, and the ones we expect to fail are

@mikemhenry
Copy link
Contributor Author

So ready for review @ijpulidos

@mikemhenry mikemhenry changed the base branch from main to 0.10.x July 11, 2023 21:08
Copy link
Contributor

@ijpulidos ijpulidos left a comment

Choose a reason for hiding this comment

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

As far as I can tell, there is still one place where we want to change the import

import pymbar

After changing that it seems that this should be ready to go.

@mikemhenry
Copy link
Contributor Author

mikemhenry commented Jul 18, 2023

@ijpulidos good catch! ready for re-review

Copy link
Contributor

@ijpulidos ijpulidos left a comment

Choose a reason for hiding this comment

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

We need to change test_repex.py back to how it was, sorry!

@@ -416,7 +416,7 @@ def test_RESTCapableHybridTopologyFactory_repex_charge_transformation():
# Extract uncorrelated energy matrix (u_ln) and samples from states (N_l)
energy_matrix, samples_per_state = analyzer._compute_mbar_decorrelated_energies()
# Compute free energies with boostrapping using pymbar
mbar = pymbar.MBAR(energy_matrix, samples_per_state, nbootstraps=200)
mbar = _pymbar_bar(energy_matrix, samples_per_state, nbootstraps=200)
Copy link
Contributor

Choose a reason for hiding this comment

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

Wait, this is MBAR, I think you had it right from the beginning, this hasn't change in pymbar 4 so we should be using it as we had it before without problems! Apologies for the confusion,

Copy link
Contributor

@ijpulidos ijpulidos 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 need to remove pip install of openmmtools

Comment on lines 50 to 51
- pip:
- git+https://github.com/choderalab/openmmtools.git
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need to install openmmtools from pip anymore, do we? Latest openmmtools release should have what we need.

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this was something temporary at the time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes good catch!

Copy link
Contributor

@ijpulidos ijpulidos left a comment

Choose a reason for hiding this comment

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

LGTM!

@mikemhenry mikemhenry added this pull request to the merge queue Jul 19, 2023
Merged via the queue into 0.10.x with commit 2d19c20 Jul 19, 2023
@mikemhenry mikemhenry deleted the feat/support_pymbar_4 branch July 19, 2023 21:19
github-merge-queue bot pushed a commit that referenced this pull request Sep 14, 2023
* run CI on new 0.10.x branch (#1212)

* run CI on new 0.10.x branch

* Update .github/workflows/CI.yaml

Co-authored-by: Iván Pulido <[email protected]>

---------

Co-authored-by: Iván Pulido <[email protected]>

* print perses version on startup (#1176)

* Update comments in `RESTCapableHybridTopologyFactory` (#1189)

* update comments

* bump ci

---------

Co-authored-by: Iván Pulido <[email protected]>
Co-authored-by: Mike Henry <[email protected]>

* use python executable from env (#1174)

* use python executable from env

* run tests using the shell

* parmed 4 seems to be giving us some issues

* actually I think we want the newer parmed

* pin pymbar for now

* ooof, parmed != pymbar

* add some more debugging to figure out how we are getting old parmed

* Update devtools/conda-envs/test_env.yaml

* see if shell=True fixes it

* removed parmed by mistake

* Support pymbar 4 (#1173)

* switch to using pymbar 3 & 4 support from openmmtools

* fix typo on import

* fix yaml

* switch to using pymbar 4

* missed a pymbar import

* missed another one

* bump ci

* missed a import

* go back to how it was

* Update devtools/conda-envs/test_env.yaml

---------

Co-authored-by: Iván Pulido <[email protected]>

* Remove example testing (#1214)

* Store initial and final topologies for all phases -- small molecule pipeline (#1210)

* Initial and final topologies serialized per phase.

* Using properties instead of private attrs.

* Fix test

* Remove uneeded code/attributes

* bump ci

* Store phase topologies separately

* Fix tests. vacuum topologies expected.

* Better docstring.

---------

Co-authored-by: Mike Henry <[email protected]>

* Improve docker building (#1200)

* Added note about example for adding oe license

* make docker file much simpler

* build images in CI

* forgot to add conda-forge

* fix permissions on a step

* get oe_license file mounted in docker container

* mount path must be absolute

* setup singulairty to test + fix testing on docker image

* add some testing deps to the image

* add -v for tests, fix envar

* tests are failing, want to test rest of pipeline

* use latest openmm version

* hardcode perses version for now

* bump ci

* make sure we can make openeye dir

* support a dev build as well

* don't hardcode value

* fix name clash

* forgot to add conda-forge

* bump ci

* test docker image and fix missing deps

* install ps

* also push latest tag

* don't build on tag since the conda-forge package won't exist yet

* don't test the examples

* Remove docker deb build, we can do these ourselves

* better document container use

* build a latest version for apptainer

* build with 11.2 to make things more compatable

* skip docker test to see if other bits build okay

* see if I can get the step to fail if there is an error

* skip docker tests to make sure apptainer builds okay

* Add mpiplus and mpi4py to docker image

* give correct path to oe license

* add mpi stuff to docker

* clean up diskspace before build

* skip tests for singularity now that the only failures come from a package bug

* Clean examples -- CLI protein-ligand example for Tyk2 (#1223)

* Improving examples dir structure and readme

* Adding Tyk2 CLI example

* removing new-cli/ripk2 example (deprecated)

* fix typo for link

* Clarify tyk2 cli example docs

* Realtime analysis interval to default to checkpoint interval (#1227)

* CI miscellaneous fixes (#1217)

* CI minor fixes. Allow codecov to fail.

* bump ci

---------

Co-authored-by: Mike Henry <[email protected]>

* Changing offline freq default to checkpoint interval

* Fixing input yaml for example

* commenting offline-freq param

---------

Co-authored-by: Mike Henry <[email protected]>

* MPI example with dipeptide mutation (#1228)

* peptide mutation MPI example added

* better documentation of motivation

* Fix/issue 1194 (#1230)

* set cutoff distance in sterics_custom_nonbonded_force

* matching cutoff for custom forces. Improving logic.

* test for HTF nonbonded cutoff

---------

Co-authored-by: Iván Pulido <[email protected]>

* Fix/issue 1196 (#1229)

* CI miscellaneous fixes (#1217)

* CI minor fixes. Allow codecov to fail.

* bump ci

---------

Co-authored-by: Mike Henry <[email protected]>

* added dels to contexts

* Update perses/app/setup_relative_calculation.py

---------

Co-authored-by: Iván Pulido <[email protected]>

* Fix spectator support (#1233)

* fix spectator support. Enabling test.

* Test to run on GPU CI.

* pin <4 for pymbar on GPU

---------

Co-authored-by: Iván Pulido <[email protected]>
Co-authored-by: Ivy Zhang <[email protected]>
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.

2 participants