-
Notifications
You must be signed in to change notification settings - Fork 21
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
Use MBAR bootstrap error #1077
Open
jthorton
wants to merge
6
commits into
main
Choose a base branch
from
bootstrap_error
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Use MBAR bootstrap error #1077
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
abb001b
use bootstrap errors from mbar for pymbar3/4
jthorton 3885dda
Merge branch 'main' into bootstrap_error
jthorton e1dc248
support pymbar4 only
jthorton 57a5114
support pymbar4 only
jthorton 9b8d3ad
fix doc strings
jthorton d87744c
pin perses to see what breaks
jthorton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -255,7 +255,8 @@ def test_free_energies(self, analyzer): | |
ret_dict = analyzer.unit_results_dict | ||
assert len(ret_dict.items()) == 7 | ||
assert pytest.approx(ret_dict['unit_estimate'].m) == -47.9606 | ||
assert pytest.approx(ret_dict['unit_estimate_error'].m) == 0.02396789 | ||
# more variation when using bootstrap errors so we need a loser tolerance | ||
assert pytest.approx(ret_dict['unit_estimate_error'].m, rel=1e4) == 0.0251 | ||
# forward and reverse (since we do this ourselves) | ||
assert_allclose( | ||
ret_dict['forward_and_reverse_energies']['fractions'], | ||
|
@@ -269,23 +270,25 @@ def test_free_energies(self, analyzer): | |
-48.025258, -48.006349, -47.986304, -47.972138, -47.960623]), | ||
rtol=1e-04, | ||
) | ||
# results generated using pymbar3 with 1000 bootstrap iterations | ||
assert_allclose( | ||
ret_dict['forward_and_reverse_energies']['forward_dDGs'].m, | ||
np.array([0.07471 , 0.052914, 0.041508, 0.036613, 0.032827, 0.030489, | ||
0.028154, 0.026529, 0.025284, 0.023968]), | ||
rtol=1e-04, | ||
np.array([0.077645, 0.054695, 0.044680, 0.03947, 0.034822, | ||
0.033443, 0.030793, 0.028777, 0.026683, 0.026199]), | ||
rtol=1e-01, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a little bit loose as a tolerance, but I guess it's fine given the bootstraps are stochastic. |
||
) | ||
assert_allclose( | ||
ret_dict['forward_and_reverse_energies']['reverse_DGs'].m, | ||
np.array([-47.823839, -47.833107, -47.845866, -47.858173, -47.883887, | ||
-47.915963, -47.93319, -47.939125, -47.949016, -47.960623]), | ||
rtol=1e-04, | ||
) | ||
# results generated using pymbar3 with 1000 bootstrap iterations | ||
assert_allclose( | ||
ret_dict['forward_and_reverse_energies']['reverse_dDGs'].m, | ||
np.array([0.081209, 0.055975, 0.044693, 0.038691, 0.034603, 0.031894, | ||
0.029417, 0.027082, 0.025316, 0.023968]), | ||
rtol=1e-04, | ||
np.array([0.088335, 0.059483, 0.046254, 0.041504, 0.03877, | ||
0.035495, 0.031981, 0.029707, 0.027095, 0.026296]), | ||
rtol=1e-01, | ||
) | ||
|
||
def test_plots(self, analyzer, tmpdir): | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating these - the new error values are expected to be different, so we should update things where we can.