TransformationBase
#
- class gufe.transformations.transformation.TransformationBase(protocol: Protocol, name: str | None = None)#
Transformation base class.
- Parameters:
protocol (Protocol) – The sampling method to use for the transformation.
name (str, optional) – A human-readable name for this transformation.
Methods
Returns a
ProtocolDAG
executing thisTransformation.protocol
.Dump this Transformation to a JSON file.
Gather multiple
ProtocolDAGResult
s into a singleProtocolResult
.Create a Transformation from a JSON file.
Attributes
Optional identifier for the transformation; used as part of its hash.
The
Protocol
used to perform the transformation.The starting
ChemicalSystem
for the transformation.The ending
ChemicalSystem
for the transformation.- abstract create(*, extends: ProtocolDAGResult | None = None, name: str | None = None) ProtocolDAG #
Returns a
ProtocolDAG
executing thisTransformation.protocol
.
- dump(file)#
Dump this Transformation to a JSON file.
Note that this is not space-efficient: for example, any
Component
which is used in bothChemicalSystem
objects 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
ProtocolDAGResult
s into a singleProtocolResult
.- Parameters:
protocol_dag_results (Iterable[ProtocolDAGResult]) – The
ProtocolDAGResult
objects to assemble aggregate quantities from.- Returns:
Aggregated results from many
ProtocolDAGResult
objects, 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 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
AlchemicalNetwork
to avoid deduplication.
- property protocol: Protocol#
The
Protocol
used to perform the transformation.The protocol estimates the free energy differences between
stateA
andstateB
ChemicalSystem
objects. It includes all details needed to perform required simulations/calculations and encodes the alchemical or non-alchemical pathway used.
- abstract property stateA: ChemicalSystem#
The starting
ChemicalSystem
for the transformation.
- abstract property stateB: ChemicalSystem#
The ending
ChemicalSystem
for the transformation.