-
Notifications
You must be signed in to change notification settings - Fork 9
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
[WIP] Fe setup structure remodelling #346
base: main
Are you sure you want to change the base?
Conversation
Hello @RiesBen! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2024-09-18 08:20:34 UTC |
there are few discussion points left.
@RiesBen please let me know when you'd like a review from me! Happy to help you get this into |
@@ -16,12 +16,6 @@ | |||
|
|||
from .chemicalsystem import ChemicalSystem | |||
|
|||
from .mapping import ( |
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.
We can't move all these imports, this will break the API
# This code is part of gufe and is licensed under the MIT license. | ||
# For details, see https://github.com/OpenFreeEnergy/gufe | ||
"""Defining the relationship between different components""" | ||
from .componentmapping import ComponentMapping |
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.
Similarly, this can't go away until 2.0
|
||
# Todo: connect to protocols - use this for labels? | ||
|
||
class RFEComponentLabels(str, Enum): |
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 needs more discusison, I don't remember this being in the plans for updating things, definitely using labels
for components seems like something we don't want to do.
@@ -27,4 +27,5 @@ def suggest_mappings(self, | |||
Suggests zero or more :class:`.AtomMapping` objects, which are possible | |||
atom mappings between two :class:`.Component` objects. | |||
""" | |||
... | |||
raise NotImplementedError("This function was not implemented.") |
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 believe this (...) is a pattern we use quite widely for our abcs?
@@ -37,22 +37,23 @@ def componentA_to_componentB(self) -> Mapping[int, int]: | |||
entity in the other component (e.g. the atom disappears), therefore | |||
resulting in a KeyError on query | |||
""" | |||
... | |||
raise NotImplementedError("This function was not implemented.") |
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.
as above
from .atom_mapping import AtomMapping | ||
|
||
|
||
class AtomMappingScorer(GufeTokenizable): |
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 is in line with what we discussed, so this feature I think it ok to include.
from .component_mapping import ComponentMapping | ||
|
||
|
||
class ComponentMapper(GufeTokenizable): |
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 is also in line with what was discussed.
|
||
from .component_mapping import ComponentMapping | ||
|
||
class NetworkPlan(GufeTokenizable): |
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.
Very briefly looking at class names, I don't think Plan
is the right word here. It's not immediately clear what it does.
This is a draft!
The idea of the draft is to make gufe future ready for future developments and to indictate the power of certain approaches as they are more general than currently indicated.
Example:
so network planners are not really dependent on LigandAtomMappings, but ComponentMappings, that could be any type of component.
_Note: _
Principles:
Thoughts:
ChemicalSystem
could be interpreted as a collection ofComponent
s and therefore this should be reflected in the definitions.