Transformation#
- class openfe.setup.Transformation(stateA: ChemicalSystem, stateB: ChemicalSystem, protocol: Protocol, mapping: dict[str, gufe.mapping.componentmapping.ComponentMapping] | None = None, name: str | None = None)#
Bases:
GufeTokenizableAn edge of an alchemical network.
Connects two
ChemicalSystemobjects, with directionality.Methods
Returns a
ProtocolDAGexecuting thisTransformation.protocol.Dump this Transformation to a JSON file.
Gather multiple
ProtocolDAGResultinto a singleProtocolResult.Create a Transformation from a JSON file.
Attributes
Mapping of e.g.
Optional identifier for the transformation; used as part of its hash.
The protocol used to perform the transformation.
The starting
ChemicalSystemfor the transformation.The ending
ChemicalSystemfor the transformation.- create(*, extends: ProtocolDAGResult | None = None, name: str | None = None) ProtocolDAG#
Returns a
ProtocolDAGexecuting thisTransformation.protocol.
- dump(file)#
Dump this Transformation to a JSON file.
Note that this is not space-efficient: for example, any
Componentwhich is used in bothChemicalSystemobjects will be represented twice in the JSON output.- Parameters:
file (Union[PathLike, FileLike]) – a pathlike of filelike to save this transformation to.
- gather(protocol_dag_results: Iterable[ProtocolDAGResult]) ProtocolResult#
Gather multiple
ProtocolDAGResultinto a singleProtocolResult.- Parameters:
protocol_dag_results (Iterable[ProtocolDAGResult]) – The
ProtocolDAGResultobjects to assemble aggregate quantities from.- Returns:
Aggregated results from many
ProtocolDAGResultobjects, all from a givenProtocol.- Return type:
- classmethod load(file)#
Create a Transformation from a JSON file.
- Parameters:
file (Union[PathLike, FileLike]) – a pathlike or filelike to read this transformation from
- property mapping: dict[str, gufe.mapping.componentmapping.ComponentMapping] | None#
Mapping of e.g. atoms between
stateAandstateB.
- property name: str | None#
Optional identifier for the transformation; used as part of its hash.
Set this to a unique value if adding multiple, otherwise identical transformations to the same
AlchemicalNetworkto avoid deduplication.
- property protocol: Protocol#
The protocol used to perform the transformation.
This protocol derives free energy differences between
stateAandstateBChemicalSystemobjects. It includes all details needed to perform required simulations/calculations and encodes the alchemical pathway used. May also correspond to an experimental result.
- property stateA: ChemicalSystem#
The starting
ChemicalSystemfor the transformation.
- property stateB: ChemicalSystem#
The ending
ChemicalSystemfor the transformation.