-
Notifications
You must be signed in to change notification settings - Fork 53
Use bar_intervall instead of ntpr for parsing AMBER MBAR timestamps #429
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
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #429 +/- ##
=======================================
Coverage 98.80% 98.80%
=======================================
Files 28 28
Lines 2008 2010 +2
Branches 356 356
=======================================
+ Hits 1984 1986 +2
Misses 2 2
Partials 22 22 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Thanks for the PR, do you mind
|
I assume the test file needs to be put in https://github.com/alchemistry/alchemtest. Could you help me with it? see the output attached! |
@@ -282,3 +282,13 @@ def test_concatenated_amber_dhdl(tmp_path): | |||
match="TI Energy detected after the TIMINGS section.", | |||
): | |||
extract(tmp_path / "amber.out", 298) | |||
|
|||
|
|||
def test_correct_timestamp_u_nk(testfiles): |
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.
@yuxuanzhuang Thanks for adding the test. I think it is fine to just adapt this test to use an existing file and check if the timestep is correct would be enough. No need to add a new file.
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. then I think test_u_nk_time_reading(single_u_nk)
is already checking it.
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.
Ok, so it was already checked, I was thinking something along the line of
def test_u_nk_time_reading_bar_intervall(single_u_nk, tmp_path):
"""Test if time information is read correctly when extracting u_nk"""
with bz2.open(single_u_nk, 'rt') as bz2_file:
content = bz2_file.read()
with open(tmp_path / 'amber.log', 'w') as text_file:
text_file.write(content.replace("bar_intervall = 1000", "bar_intervall = 100"))
u_nk = extract_u_nk(tmp_path / 'amber.log', T=298.0)
assert_allclose(u_nk.index.values[0][0], ??)
Then you show that changing the bar_intervall in the log file will change the time stamp in the generated dataframe.
AUTHORS
Outdated
@@ -59,3 +59,6 @@ Chronological list of authors | |||
|
|||
2024 | |||
- Jennifer A. Clark (@jaclark5) | |||
|
|||
2025 | |||
- Yuxuan Zhuang (@yuxuanzhuang) |
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.
blank line after this
Fix #428