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

383 get connected subgraphs in an alchemicalnetwork #409

Merged
merged 9 commits into from
Nov 19, 2024

Conversation

atravitz
Copy link
Contributor

addresses #383

@atravitz atravitz linked an issue Nov 14, 2024 that may be closed by this pull request
@atravitz atravitz marked this pull request as draft November 14, 2024 19:40
Copy link

codecov bot commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.65%. Comparing base (d15ea96) to head (ba85863).
Report is 10 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #409   +/-   ##
=======================================
  Coverage   98.65%   98.65%           
=======================================
  Files          36       36           
  Lines        2075     2087   +12     
=======================================
+ Hits         2047     2059   +12     
  Misses         28       28           

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


🚨 Try these New Features:

@atravitz
Copy link
Contributor Author

I'm not convinced that connected_subgraphs is the clearest language here. Most technically accurate would be connected_components, but given that components has a different meaning in openfe-world than in network theory world, I don't like that either.

Maybe subgraphs really is the best option?

@atravitz atravitz force-pushed the 383-get-connected-subgraphs-in-an-alchemicalnetwork branch from e773c1a to aff2dfb Compare November 14, 2024 19:57
@atravitz atravitz marked this pull request as ready for review November 14, 2024 19:59
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.

Couple of small things, otherwise lgtm.

gufe/network.py Show resolved Hide resolved
gufe/network.py Show resolved Hide resolved
gufe/network.py Outdated Show resolved Hide resolved
@@ -47,3 +47,22 @@ def test_connectivity(self, benzene_variants_star_map):
else:
edges = alnet.graph.edges(node)
assert len(edges) == 0

def test_connected_subgraphs(self, benzene_variants_star_map):
Copy link
Member

Choose a reason for hiding this comment

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

could you add a brief test that checks that this works for fully connected graph? i.e. it just returns itself

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes good idea. I rearranged the fixtures a bit so we can access either one or both of the ligand and complex star networks for the benzene test case. I think this is the clearest way to do this without duplicating too much code.

@atravitz atravitz force-pushed the 383-get-connected-subgraphs-in-an-alchemicalnetwork branch from 5dda4c0 to 0c982ee Compare November 18, 2024 21:05
gufe/network.py Show resolved Hide resolved
@atravitz atravitz merged commit 82cb73d into main Nov 19, 2024
16 checks passed
@atravitz atravitz deleted the 383-get-connected-subgraphs-in-an-alchemicalnetwork branch November 19, 2024 18:09
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.

Get connected subgraphs in an AlchemicalNetwork
2 participants