-
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
Read chainID from PDBQT #4284
Read chainID from PDBQT #4284
Conversation
Linter Bot Results:Hi @pgbarletta! Thanks for making this PR. We linted your code and found the following: There are currently no issues detected! 🎉 |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #4284 +/- ##
==========================================
Coverage 93.40% 93.40%
==========================================
Files 170 184 +14
Lines 22255 23364 +1109
Branches 4071 4071
==========================================
+ Hits 20788 21824 +1036
- Misses 951 1024 +73
Partials 516 516
☔ 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 @pgbarletta for opening this PR! I assume the PDBQT format doesn't include a segment column, or else that would be preferenced for segids? I was worried about what the PDBQT writer would do if the chainIDs and segids conflict -- looks like it tries to write chainIDs first, and then uses the last (not first...) letter of the segids.
There's a test for the segid attribute:
mdanalysis/testsuite/MDAnalysisTests/coordinates/test_pdbqt.py
Lines 41 to 45 in 16647cb
def test_segid(self, universe): | |
sel = universe.select_atoms('segid A') | |
assert_equal(sel.n_atoms, 909, "failed to select segment A") | |
sel = universe.select_atoms('segid B') | |
assert_equal(sel.n_atoms, 896, "failed to select segment B") |
Would it be possible to add one for chainIDs too? Otherwise LGTM.
890aa8b
to
79b0bcf
Compare
PDBQT has the concept of
I've seen the
Done. Didn't add it at first since both |
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 @pgbarletta! Everything LGTM!
ALong the lines of MDAnalysis/UserGuide#312 — please (1) raise an issue to document in the User Guide and then (2) do the documenting. |
@lilyminium I tentatively assigned you to merge because you reviewed but please feel free to punt. |
Fixes #4207
The user also complained about lacking elements, but given that the PDBQT format replaced the
element
field from the PDBATOM
record, I guess is fair that we don't try to create the from theatomtype
. In any case, the solution given to the user could be made a FAQ (if it's indeed a FAQ).Changes made in this Pull Request:
chainIDs
attribute instead of just discarding them.PR Checklist
Developers certificate of origin
📚 Documentation preview 📚: https://mdanalysis--4284.org.readthedocs.build/en/4284/