-
Notifications
You must be signed in to change notification settings - Fork 103
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
fix: allow ccd residues with missing coords #730
fix: allow ccd residues with missing coords #730
Conversation
Provides an exception so that residues with missing coords in the ccd can still be returned from the ideal coordinates.
CodSpeed Performance ReportMerging #730 will not alter performanceComparing Summary
|
Hi, from my perspective having a molecule without atom coordinates has barely a benefit. Consequently, getting an exception, that can be easily captured, is more clearer than checking for NaN coordinates in my opinion. However, I would be curious what your use case is. |
@padix-key Makes sense. My use case is that I'm identifying missing atoms in the experimental structure by constructing molecular templates from the CCD (essentially just the list of atom names per residue). So for that I use the CCD's AtomArray and I'm ignoring the coords anyway. I get your concern tho... what would you think about an optional arg for this in |
I agree with @davegrays that optionally exposing missing atoms in the builtin CCD is useful for building template residues of 'what should be there if all atoms were resolved' and thereby allows checking for missing atoms. I like the idea of exposing a flag in |
feat(pdbx): expose flag to allow missing coorindates in `get_component`
Thanks @Croydon-Brixton ! Merged your patch @padix-key I implemented the remaining fix to propagate the |
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.
Hi, sorry for the delay. I see the point now 👍.
The PR looks mostly good to me, what misses is only a test in tests/structure/test_info()
where residue()
loads a molecule with missing coordinates.
Apart from that I added some small code style suggestions to the review.
24adf6a
to
c519913
Compare
@padix-key thanks for your feedback! all the style changes are implemented and I've added test cases for a few different molecules |
also not sure exactly why but it seems like the ci/cd step that failed on this last commit was an intermittent network-related issue. i only changed the test itself and i can confirm the test still passes |
I just run it again, and check if it passes. But I agree, this should have nothing to do with your changes |
The CI now passes and everything looks good to me. Thank you! |
There are a number of ligands/residues in the CCD with missing coordinates that cannot be retrieved now with
structure.info.residue
due to a ValueError that is raised twice and not excepted the second time. Relative to v0, this is new behavior.This allows these residues to be returned from the second attempt with nans where missing.