Skip to content

Conversation

@andrrizzi
Copy link
Contributor

This removes the old implementation of exact PME that used updateParametersInContext in favor of using the parameter offset feature offered in OpenMM 7.3.

AlchemicalState now is a very short extension of GlobalParameterState that provides a general way to implement composable states controlling global parameters. I've also added GlobalParameterFunction, which is the general version of AlchemicalFunction.

I've also removed support for Python 2 here.

@andrrizzi andrrizzi closed this Oct 22, 2018
@andrrizzi andrrizzi reopened this Oct 22, 2018
Copy link
Member

@jchodera jchodera left a comment

Choose a reason for hiding this comment

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

This looks much cleaner, @andrrizzi!

A few considerations before merging:

  • Do we have to add the new classes (such as state.GlobalParameterFunction) to docs/states.rst for the API docs to be rendered?
  • Does the test_overlap() test pass locally?

@jchodera
Copy link
Member

After this is merged, we should cut 0.17.0!

@jchodera
Copy link
Member

Quick timing update for c-Met with 133 states (29 different electrostatic discharging states):

Old code:

Computing energy matrix took    2.485s

New code:

Computing energy matrix took    0.413s

Quite impressive!

@andrrizzi
Copy link
Contributor Author

Do we have to add the new classes (such as state.GlobalParameterFunction) to docs/states.rst for the API docs to be rendered?

I think you're right. I'll add them before merging.

Does the test_overlap() test pass locally?

I'll run all the alchemy.py tests on the cluster to make sure.

After this is merged, we should cut 0.17.0!

I'd wait for OpenMM 7.3 release before releasing this feature and test the dev openmmtools in the meantime. I'm back on debugging the NaNs today.

Also, I still would like to consider keeping the order of lambda consistent between different models with the addition of a sqrt_lambda_electrostatics parameter. I think the changes to the code would be minimal, just changing the name of the offset parameter and an addition to AlchemicalState like

class AlchemicalState:
    ...
    _sqrt_lambda_electrostatics = GlobalParameter('sqrt_lambda_electrostatics', expression='sqrt(lambda_electrostatics)')

@andrrizzi
Copy link
Contributor Author

I'd work on it on a separate PR in any case.

@jchodera
Copy link
Member

@andrrizzi : Can this be merged and a new release cut?

@andrrizzi
Copy link
Contributor Author

I still have to run the full test_alchemy.py suite before merging. Also, I'd wait for NaN issue on OpenMM 7.3 to be fixed before making a release since we'll have to pin the minimum openmm version. That's my first priority coding-wise.

@jchodera
Copy link
Member

Thanks for clarifying!

@andrrizzi
Copy link
Contributor Author

I've run all the tests in test_alchemy.py and they passed. AppVeyor is failing because of problems with the win build of openmm7.3rc, but I think we can merge this for now.

@jchodera
Copy link
Member

jchodera commented Nov 9, 2018

Hooray!

@jchodera
Copy link
Member

jchodera commented Nov 9, 2018

@andrrizzi : Maybe we should change the YANK default for alchemical_pme_treatment: to exact now?

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.

3 participants