Skip to content
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

Check for enpty coordinates in RDKit converter #4824

Merged
merged 3 commits into from
Dec 9, 2024

Conversation

RMeli
Copy link
Member

@RMeli RMeli commented Dec 6, 2024

Fixes #4813

Changes made in this Pull Request:

  • Embed molecule created from SMILES

PR Checklist

  • Tests?
  • Docs?
  • CHANGELOG updated?
  • Issue raised/referenced?

Developers certificate of origin


📚 Documentation preview 📚: https://mdanalysis--4824.org.readthedocs.build/en/4824/

@RMeli RMeli requested a review from cbouy December 6, 2024 16:41
@pep8speaks
Copy link

pep8speaks commented Dec 6, 2024

Hello @RMeli! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 369:80: E501 line too long (82 > 79 characters)
Line 370:80: E501 line too long (81 > 79 characters)

Comment last updated at 2024-12-08 12:57:28 UTC

Copy link

codecov bot commented Dec 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.66%. Comparing base (83f702f) to head (1c7ac6b).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4824      +/-   ##
===========================================
+ Coverage    86.08%   93.66%   +7.57%     
===========================================
  Files          177      189      +12     
  Lines        21743    22809    +1066     
  Branches      3055     3055              
===========================================
+ Hits         18718    21363    +2645     
+ Misses        2593     1000    -1593     
- Partials       432      446      +14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@RMeli RMeli requested a review from IAlibay December 6, 2024 17:53
@cbouy
Copy link
Member

cbouy commented Dec 6, 2024

Mmmh it might be relevant to extend the if np.isnan(ag.positions).any() check in the convert method to also handle the case where all atoms have coordinates 0, 0, 0 so that we don't try to assign these coordinates (and ultimately assign stereo from these dummy coordinates) when that happens?

@RMeli
Copy link
Member Author

RMeli commented Dec 6, 2024

Thanks @cbouy, good suggestion.

@RMeli RMeli mentioned this pull request Dec 6, 2024
5 tasks
Copy link
Member

@cbouy cbouy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you 🙌

@RMeli RMeli changed the title Embed RDKit molecule created from SMILES Check for enpty coordinates in RDKit converter Dec 8, 2024
Copy link
Member

@IAlibay IAlibay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm thanks!

@IAlibay
Copy link
Member

IAlibay commented Dec 9, 2024

CI failure is known, going ahead with merge.

@IAlibay IAlibay merged commit a27591c into MDAnalysis:develop Dec 9, 2024
23 of 24 checks passed
@RMeli RMeli deleted the rdkit-embed branch December 9, 2024 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RDKit test failure
4 participants