fix masses and charge bug in HOOMD-XML parser#2889
fix masses and charge bug in HOOMD-XML parser#2889orbeckst merged 12 commits intoMDAnalysis:developfrom
Conversation
|
Hello @CalCraven! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2020-08-12 16:24:27 UTC |
Codecov Report
@@ Coverage Diff @@
## develop #2889 +/- ##
===========================================
+ Coverage 87.20% 92.83% +5.63%
===========================================
Files 167 187 +20
Lines 21744 24520 +2776
Branches 3186 3192 +6
===========================================
+ Hits 18961 22764 +3803
+ Misses 2258 1710 -548
+ Partials 525 46 -479
Continue to review full report at Codecov.
|
orbeckst
left a comment
There was a problem hiding this comment.
Thank you for pinpointing the error and providing a solution. This looks pretty good but before merging please address the following
- add tests to testsuite/MDAnalysisTests/topology/test_hoodxml.py that shows that masses and charges are read correctly
- remove the
print()call - add an entry to CHANGELOG under "Fixes"
- add yourself to AUTHORS
| try: | ||
| val = configuration.find(attrname) | ||
| vals = [mapper(el) for el in val.text.strip().split()] | ||
| vals = [mapper(el) for el in val.text.strip().split('\n')] |
There was a problem hiding this comment.
Wow that fixed it? What was wrong with splitting on any white space? I thought the problem was not doing .split()[1:]
There was a problem hiding this comment.
That wasn't the issue. The issued ended up being with the plural vs singular terms for mass and charge being called at the wrong time.
orbeckst
left a comment
There was a problem hiding this comment.
looking good.. please see comments
|
Btw, the errors in your tests are due to #2890 . |
|
Your tests fail because you need to import |
|
See https://travis-ci.com/github/MDAnalysis/mdanalysis/jobs/370755668#L2255-L2257 |
* Fixes MDAnalysis#2901 * Changes made in this Pull Request: - Added call to rotateby (instead of rotate) - Removed () from atom group
* fix MDAnalysis#2890 * added H5PYPicklable class (works in serial but not with driver="mpio" and MPI comm) * mock h5py so that the docs build even in the absence of h5py * tests (anything related to mpi is excluded from coverage) * update CHANGELOG
…alysis into CalCraven-update_xml_parser
- import assert_almost_equal - removed asserts that were not needed (and used deprecated constructs)
|
I fixed the test and merged the develop branch. If all the tests pass I will approve and merge. |
|
Thank you for your fix @CalCraven , I also sent you an invitation to the MDAnaysis/contributors. |
|
Thanks for getting that to the finish line @orbeckst. This was my first PR so it was good to get that figured out. |
|
Sure, I hope you'll contribute more! |
* Fixes MDAnalysis#2888 * Fix the HoomdXMLParser.py so that it properly reads in masses and charges instead of overriding all of those values with 0.0. * add tests * update CHANGELOG * update AUTHORS
Fixes #2888
Changes made in this Pull Request:
PR Checklist