-
Notifications
You must be signed in to change notification settings - Fork 0
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
[Cleanup] Gathering graph utilities around BasicGraph/MoleculeGraph #13
Conversation
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 @Yoric. Few comments from my side. Happy to approve once addressed.
if any(distance_from_center > device.max_radial_distance): | ||
return False | ||
|
||
# Check the distance between nodes. |
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.
Isn't it possible to reuse is_disk_graph
here ?
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.
How so?
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.
Well, in is_disk_graph
there is this distance check between nodes. Just wondering if that couldn't be reused here.
Before this change, we have many graph-related functions with various pre-requisites on graphs, plus lots of conversions from pyg to networkx. This change: - introduces two classes BasicGraph and MoleculeGraph, depending on which invariants hold on the graph; - attaches the relevant methods to BasicGraph/MoleculeGraph instead of pyg; - makes sure that we have only one single conversion from pyg to networkx.
Furthermore, we move some code from the notebook to the library, as our users are going to need it.
@Yoric Happy for you to merge once you've replied to the thread of discussion above. |
We have many graph-related functions with various pre-requisites on graphs, plus lots of conversions from pyg to networkx.
This change: