ProtocolDAGResult#

class gufe.protocols.protocoldag.ProtocolDAGResult(*, protocol_units: list[ProtocolUnit], protocol_unit_results: list[ProtocolUnitResult], transformation_key: GufeKey | None, extends_key: GufeKey | None = None, name: str | None = None)#

Result for a single execution of an entire ProtocolDAG.

There may be many of these for a given Transformation. Data elements from these objects are combined by Protocol.gather into a ProtocolResult.

Methods

ok

result_to_unit

unit_to_all_results

Return all results (sucess and failure) for a given Unit.

unit_to_result

Return the successful result for a given Unit.

Attributes

protocol_unit_failures

A list of all failed units.

protocol_unit_results

ProtocolUnitResult`s for each `ProtocolUnit used to compute this object.

protocol_unit_successes

A list of only successful ProtocolUnit results.

result_graph

DAG of ProtocolUnitResult nodes with edges denoting dependencies.

terminal_protocol_unit_results

Get ProtocolUnitResults that terminate the DAG.

ok() bool#
property protocol_unit_failures: list[ProtocolUnitFailure]#

A list of all failed units.

Note

These are returned in DAG order, with tasks listed after their dependencies.

property protocol_unit_results: list[ProtocolUnitResult]#

ProtocolUnitResult`s for each `ProtocolUnit used to compute this object.

Results are given in DAG-dependency order. In this order, tasks are always listed after their dependencies.

property protocol_unit_successes: list[ProtocolUnitResult]#

A list of only successful ProtocolUnit results.

Note

These are returned in DAG order, with tasks listed after their dependencies.

property result_graph: networkx.DiGraph#

DAG of ProtocolUnitResult nodes with edges denoting dependencies.

Each edge is directed from a task towards its dependencies; for example, an edge between a production run and its equilibration would point towards the equilibration unit.

result_to_unit(protocol_unit_result: ProtocolUnitResult) ProtocolUnit#
property terminal_protocol_unit_results: list[ProtocolUnitResult]#

Get ProtocolUnitResults that terminate the DAG.

Returns:

All ProtocolUnitResults which do not have a ProtocolUnitResult that follows on (depends) on them.

Return type:

list[ProtocolUnitResult]

unit_to_all_results(protocol_unit: ProtocolUnit) list[ProtocolUnitResult]#

Return all results (sucess and failure) for a given Unit.

Returns:

results – results for a given unit

Return type:

list[ProtocolUnitResult]

Raises:

KeyError – if no results present for a given unit

unit_to_result(protocol_unit: ProtocolUnit) ProtocolUnitResult#

Return the successful result for a given Unit.

Returns:

success – the successful result for this Unit

Return type:

ProtocolUnitResult

Raises:

KeyError – if either there are no results, or only failures