-
Notifications
You must be signed in to change notification settings - Fork 652
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
Convert "Quantity" to raw value for kinetic_energy and potential_energy in OpenMM reader #4548
Conversation
…gy in OpenMMSimulationReader.
Linter Bot Results:Hi @orionarcher! Thanks for making this PR. We linted your code and found the following: Some issues were found with the formatting of your code.
Please have a look at the Please note: The |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4548 +/- ##
===========================================
- Coverage 93.66% 93.64% -0.03%
===========================================
Files 168 180 +12
Lines 21248 22327 +1079
Branches 3917 3917
===========================================
+ Hits 19902 20908 +1006
- Misses 888 961 +73
Partials 458 458 ☔ View full report in Codecov by Sentry. |
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, just the one thing please.
@@ -125,10 +125,10 @@ def _mda_timestep_from_omm_context(self): | |||
ts.frame = 0 | |||
ts.data["time"] = state.getTime()._value | |||
ts.data["potential_energy"] = ( | |||
state.getPotentialEnergy().in_units_of(u.kilojoule/u.mole) | |||
state.getPotentialEnergy().in_units_of(u.kilojoule/u.mole)._value |
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.
Would it be possible to add a quick test for these?
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.
Done
Hello @orionarcher! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2024-03-31 02:35:28 UTC |
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.
lgtm!
Changes made in this Pull Request:
.value
to kinetic_energy and potential_energyThis is breaking the ability of a downstream MDAkit to write H5MD files. Issue here. I suspect it is more generally breaking the ability to take in OpenMM and output H5MD, but it is only in
openmm-reporter
that I came across it.PR Checklist
Developers certificate of origin
📚 Documentation preview 📚: https://mdanalysis--4548.org.readthedocs.build/en/4548/