class openfe.ProtocolDAG(*, protocol_units: list[gufe.protocols.protocolunit.ProtocolUnit], transformation_key: GufeKey | None, extends_key: GufeKey | None = None, name: str | None = None)#

An executable directed acyclic graph (DAG) of ProtocolUnit objects.

A ProtocolDAG is composed of ProtocolUnit objects as well as how they depend on each other. A single ProtocolDAG execution should yield sufficient information to calculate a free energy difference (though perhaps not converged) between two ChemicalSystem objects.

A ProtocolDAG yields a ProtocolDAGResult when executed.

name#

Optional identifier for this ProtocolDAGResult.

Type:

str

protocol_units#

ProtocolUnit`s (given in DAG-dependency order) used to compute this `ProtocolDAGResult. Tasks are always listed after their dependencies.

Type:

list[ProtocolUnit]

graph#

Graph of ProtocolUnit`s as nodes, with directed edges to each `ProtocolUnit’s dependencies.

Type:

nx.DiGraph

Create a new ProtocolDAG

Parameters:
  • protocol_units (Iterable[ProtocolUnit]) – The ProtocolUnit s that make up this ProtocolDAG, with dependencies included as inputs.

  • transformation_key (Optional[GufeKey]) – Key of the Transformation that this ProtocolDAG corresponds to, if applicable. This functions as a label for identifying the source of this ProtocolDAG. This label will be passed on to the ProtocolDAGResult resulting from execution of this ProtocolDAG.

  • extends_key (Optional[GufeKey]) – Key of the ProtocolDAGResult that this ProtocolDAG extends from. This functions as a label for identifying the source of this ProtocolDAG. This label will be passed on to the ProtocolDAGResult resulting from execution of this ProtocolDAG.

  • name (str) – Unique identifier for this ProtocolDAG.