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

Fix ring hybridization filter #65

Merged
merged 3 commits into from
Nov 18, 2024
Merged

Conversation

jthorton
Copy link
Contributor

Fixes #62.

Copy link

codecov bot commented Nov 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.60%. Comparing base (ca54878) to head (f670838).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #65   +/-   ##
=======================================
  Coverage   96.60%   96.60%           
=======================================
  Files          13       13           
  Lines         618      618           
=======================================
  Hits          597      597           
  Misses         21       21           

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

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.

Thanks lgtm!

We probably should add rever and add a news item at some point.

Copy link
Contributor

@hannahbaumann hannahbaumann left a comment

Choose a reason for hiding this comment

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

Thanks, @jthorton , this looks good to me!
I just have one general question to this filter:
Right now, this only removes / disallows mappings between an aromatic and aliphatic ring. Would we also want to disallow mapping e.g. two aliphatic rings with different hybridization of some atoms (e.g. cyclohexane and cyclohexene) or should those cases be handled in the atom hybridization change filter?

@jthorton
Copy link
Contributor Author

@hannahbaumann great point, I think the atomwise hybridization filter should handle those cases currently but it would be good to extend this filter also to do the same. I believe that using the atom hybridization and map_exact_ring_matches_only=True should do the same filtering as this filter on rings but handle non-ring cases as well so for users that only want to handle ring cases, we should make the behaviour consistent. I'll open another issue for that and look to do it in another PR though to keep this one simple.

@hannahbaumann
Copy link
Contributor

Thanks @jthorton , that sounds great!

@jthorton jthorton merged commit cd226b6 into main Nov 18, 2024
6 of 7 checks passed
@jthorton jthorton deleted the fix_hybridization_ring_filter branch November 18, 2024 14:43
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.

filter_hybridization_rings fails on non-ring atoms
3 participants