-
Notifications
You must be signed in to change notification settings - Fork 20
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
Konnektor integration #927
base: main
Are you sure you want to change the base?
Conversation
This PR should be ready for review to merge after this merge happened: need to look into further other unit test failures. |
Please discuss with @atravitz and @hannahbaumann as part of the Konnektor handover plans. |
Needs follow-up discussion in a meeting planned for Oct. 28 |
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.
Mostly blocking on API breaks - I agree that the name change may make sense in some cases, but these are very much user facing methods and we cannot break the API for 1.x, especially without some kind of deprecation cycle.
@@ -160,7 +167,7 @@ def generate_maximal_network( | |||
---------- | |||
ligands : Iterable[SmallMoleculeComponent] | |||
the ligands to include in the LigandNetwork | |||
mappers : AtomMapper or Iterable[AtomMapper] | |||
mapper : AtomMapper or Iterable[AtomMapper] |
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.
This docstring rename doesn't match the current signature (note that we can't rename from mappers to mapper without causing an API break).
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.
@atravitz you marked this as resolved but the docstring still doesn't match - was this intentional?
@@ -4,6 +4,7 @@ channels: | |||
dependencies: | |||
- duecredit<0.10 | |||
- kartograf>=1.0.0 | |||
- konnektor |
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.
I think we need to make a Konnektor v0.2.0 release with this change, then pin this with konnektor>=v0.2.0
.
@@ -130,21 +130,7 @@ def test_radial_network_index_error(toluene_vs_others, lomap_old_mapper): | |||
ligands=ligands, central_ligand=2077, | |||
mappers=lomap_old_mapper, scorer=None, | |||
) | |||
|
|||
|
|||
def test_radial_network_self_central(toluene_vs_others, lomap_old_mapper): |
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.
This can not happen anymore with the current Konnektor and OpenFE implementation.
I propose removing the test.
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.
@IAlibay is there a concern about breaking backwards compatibility 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.
By "this cannot happen" do we mean that Konnektor just gracefully handles things such that the network cannot end up with a self edge?
If so, then my suggestion is to keep the code that throws a warning?
If it's more "if you try to do that Konnektor will error", then we should retain the behaviour that pops the ligand out and throws the warning, with a deprecation warning that this behaviour will go away in 2.0.
I went further through the current CI problems and hope I caught all problems for this PR (@atravitz):
|
1205c63
to
46986af
Compare
fix for tests
- fix removing the central ligand from list.
remove test for testing if a central component is part of the other component list. This can not happen anymore with the current Konnektor implementation, therefore I propose removing the test.
This reverts commit bf82085.
24a7abd
to
6d3e59a
Compare
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.
partial review
mappers: Union[AtomMapper, Iterable[AtomMapper]], | ||
central_ligand: Union[SmallMoleculeComponent, str, int, None], |
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.
I wouldn't change the order unless we really have to - i.e. it's technically API breaking in the case that someone just passes arguments without specifying them?
@@ -160,7 +167,7 @@ def generate_maximal_network( | |||
---------- | |||
ligands : Iterable[SmallMoleculeComponent] | |||
the ligands to include in the LigandNetwork | |||
mappers : AtomMapper or Iterable[AtomMapper] | |||
mapper : AtomMapper or Iterable[AtomMapper] |
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.
@atravitz you marked this as resolved but the docstring still doesn't match - was this intentional?
edges = [] | ||
|
||
for ligand in ligands: | ||
if ligand == central_ligand: |
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.
What happens in the new code if you pass in multiple copies of the same central ligand in the ligand list?
@@ -160,7 +171,7 @@ def generate_maximal_network( | |||
---------- | |||
ligands : Iterable[SmallMoleculeComponent] | |||
the ligands to include in the LigandNetwork | |||
mappers : AtomMapper or Iterable[AtomMapper] | |||
mapper : AtomMapper or Iterable[AtomMapper] |
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.
revert to mappers?
This PR is integrating Konnektor to openFE which will offer in the future a default parallelization for all Network building and more different network tools.
In this PR there is one paradigm change currently present, leading to only being able to pass one Atom mapper to the functions.
Checklist
replace code with Konnektor implementations
Test we are getting the same results
Developers certificate of origin