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

Refactor RBFE code and fix various bugs #775

Merged
merged 3 commits into from
Jul 29, 2022
Merged

Refactor RBFE code and fix various bugs #775

merged 3 commits into from
Jul 29, 2022

Conversation

proteneer
Copy link
Owner

@proteneer proteneer commented Jul 25, 2022

This PR

  1. disables the chiral restraints until we've validated them some more (temporary)
  2. cleans up the 20ns and 5ns edge lists in the example hif2a directory
  3. refactors free energy setup code to fe/rbfe.py to be more modular
  4. implements delta_U decomposition

@proteneer proteneer requested review from maxentile, mcwitt and jkausrelay and removed request for maxentile July 27, 2022 22:48
all_fwd_delta_us.append(fwd_delta_u)
all_rev_delta_us.append(rev_delta_u)

# sanity check - I don't think the dG calculation commutes with its components, so we have to re-estimate
Copy link
Owner Author

Choose a reason for hiding this comment

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

@maxentile this is where the delta_U decomposition is done, I've added a comment here for future readers

timemachine/fe/rbfe.py Outdated Show resolved Hide resolved
timemachine/fe/rbfe.py Outdated Show resolved Hide resolved
timemachine/fe/rbfe.py Outdated Show resolved Hide resolved
timemachine/fe/rbfe.py Outdated Show resolved Hide resolved
rev_delta_u = beta * (prev_U_fn(cur_frames, cur_boxes) - cur_U_fn(cur_frames, cur_boxes))

dG, dG_err = pymbar.BAR(fwd_delta_u, rev_delta_u)
dG /= beta
Copy link
Collaborator

Choose a reason for hiding this comment

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

dg /= beta converts to kJ/mol (so update plot_BAR title units or convert after passing to plot_BAR)

Copy link
Owner Author

Choose a reason for hiding this comment

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

willfix

Configuration for the host system.

n_frames: int
number of samples to generate for each lambda windows
Copy link
Collaborator

@jkausrelay jkausrelay Jul 28, 2022

Choose a reason for hiding this comment

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

"generate for endstate lambda windows"

Since you filter the intermediates below

Copy link
Collaborator

Choose a reason for hiding this comment

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

... where each sample is after 750 steps of MD.

Copy link
Owner Author

Choose a reason for hiding this comment

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

willfix

Copy link
Owner Author

Choose a reason for hiding this comment

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

to clarify, this is saying that each window runs for n_frames*1000 steps of MD. It's independent of how many frames we store etc. I'll add a note in the return type that only first and last windows are currently returned.

timemachine/fe/rbfe.py Outdated Show resolved Hide resolved
examples/rbfe_edge_list.py Outdated Show resolved Hide resolved
examples/rbfe_edge_list.py Outdated Show resolved Hide resolved
examples/relative_free_energy.py Outdated Show resolved Hide resolved
examples/rbfe_edge_list.py Outdated Show resolved Hide resolved
examples/relative_free_energy.py Outdated Show resolved Hide resolved
examples/relative_free_energy.py Outdated Show resolved Hide resolved
timemachine/fe/rbfe.py Outdated Show resolved Hide resolved
timemachine/fe/system.py Show resolved Hide resolved
timemachine/fe/rbfe.py Show resolved Hide resolved
timemachine/fe/rbfe.py Show resolved Hide resolved
timemachine/fe/rbfe.py Outdated Show resolved Hide resolved
timemachine/fe/rbfe.py Show resolved Hide resolved
timemachine/fe/rbfe.py Show resolved Hide resolved
timemachine/fe/rbfe.py Outdated Show resolved Hide resolved
tests/test_relative_free_energy.py Outdated Show resolved Hide resolved
WIP

WIP

WIP

fat finger

WIP

WIP

WIP

labels

Typing

write less

units

label units

Disable chiral terms in combine function

Better schedule

Oops

Clean-up

Add docstrings

WIP

Add more bins

Update per jkaus comments

Add a nightly test

Improve plotting and address mcwiit and jfass comments

Add matplotlib as a dependency
@mcwitt mcwitt self-requested a review July 29, 2022 16:40
@jkausrelay
Copy link
Collaborator

lgtm!

@proteneer proteneer enabled auto-merge (squash) July 29, 2022 17:06
@proteneer proteneer merged commit da4b784 into master Jul 29, 2022
@proteneer proteneer deleted the all_pairs branch November 8, 2022 01:18
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.

None yet

4 participants