OpenFreeEnergy / gufe

grand unified free energy by OpenFE
https://gufe.readthedocs.io
MIT License
28 stars 8 forks source link

Clarify `ProtocolDAG` docstrings #223

Closed Yoshanuikabundi closed 11 months ago

Yoshanuikabundi commented 1 year ago

ProtocolDag.result_graph and ProtocolDAG.protocol_unit_results both discuss a dependency order, but are unclear about what that ordering is - do the result graph edges point from source to dependency or the reverse? Is a dependency order uniquely defined? Does it go from root to leaf or leaf to root?

There are probably other similar issues in similar methods. See also https://github.com/OpenFreeEnergy/gufe/pull/220#pullrequestreview-1599093202

richardjgowers commented 1 year ago

@Yoshanuikabundi I think "root to leaf" doesn't make sense in this situation, you can define the graph as parent tasks pointing to children, or children tasks pointing to their parents, (i.e. either parents or children could be the root) and both are probably used in the codebase as both views are useful in different situations.