Skip to content

RBFE Graph

RBFE graph workflow - build perturbation graphs for relative binding free energy calculations.

RelativeBindingFreeEnergyGraphEdge dataclass

RelativeBindingFreeEnergyGraphEdge(ligand_a: str, ligand_b: str, core: list[tuple[int, int]] | None = None, score: float | None = None, ddg: float | None = None, ddg_err: float | None = None, complex_dg: float | None = None, complex_dg_err: float | None = None, solvent_dg: float | None = None, solvent_dg_err: float | None = None, vacuum_dg: float | None = None, vacuum_dg_err: float | None = None, failed: bool = False, complex_lambda_values: list[float] | None = None, complex_overlap_matrix: list[list[float]] | None = None)

An edge in an RBFE perturbation graph.

RelativeBindingFreeEnergyGraphResult dataclass

RelativeBindingFreeEnergyGraphResult(workflow_data: dict[str, Any], workflow_type: str, workflow_uuid: str, complete: bool = True)

Bases: WorkflowResult

Result from an RBFE graph construction workflow.

ligands property

ligands: dict[str, Molecule]

Ligand molecules keyed by identifier.

graph property

graph: RBFEGraph | None

The constructed RBFE graph, or None if not yet computed.

edges property

edges: list[RelativeBindingFreeEnergyGraphEdge]

Graph edges. Empty list if graph is not yet built.

submit_relative_binding_free_energy_graph_workflow

submit_relative_binding_free_energy_graph_workflow(ligands: Mapping[str, StructureInput], mode: Literal['greedy', 'star_map'] = 'greedy', hub_compound_id: str | None = None, greedy_scoring: Literal['best', 'jaccard', 'dummy_atoms'] = 'best', greedy_k_min_cut: int = 3, refine_cutoff: float | None = None, seed_graph: RBFEGraph | None = None, generate_intermediate_ligands: bool = False, intermediate_max_dummy_atoms: int = 25, intermediate_min_dummy_atom_improvement: int = 5, name: str = 'RBFE Graph', folder_uuid: str | None = None, folder: Folder | None = None, max_credits: int | None = None, webhook_url: str | None = None, is_draft: bool = False) -> Workflow[RelativeBindingFreeEnergyGraphResult]

Submits an RBFE graph construction workflow to the API.

Builds a perturbation graph connecting ligands for relative binding free energy (RBFE) calculations.

Parameters:

Name Type Description Default
ligands Mapping[str, StructureInput]

dictionary mapping ligand identifiers to molecules

required
mode Literal['greedy', 'star_map']

graph construction strategy: "greedy" or "star_map"

'greedy'
hub_compound_id str | None

ligand identifier for the hub when mode="star_map"

None
greedy_scoring Literal['best', 'jaccard', 'dummy_atoms']

edge scoring heuristic for greedy mode: "best", "jaccard", or "dummy_atoms"

'best'
greedy_k_min_cut int

target edge-connectivity for greedy augmentation. Must be > 0

3
refine_cutoff float | None

optional MCS similarity cutoff for graph refinement

None
seed_graph RBFEGraph | None

RBFE graph from a prior run to extend, as returned by a completed result's graph. Its existing edges (and any computed results) are preserved, and only edges for newly added ligands are built

None
generate_intermediate_ligands bool

generate virtual intermediate ligands to make difficult edges easier

False
intermediate_max_dummy_atoms int

edge with more dummy atoms than this is split when a generated intermediate brings both resulting legs back to at most this value

25
intermediate_min_dummy_atom_improvement int

minimum reduction in the worst leg's dummy-atom count required for a generated intermediate to be accepted

5
name str

name of the workflow

'RBFE Graph'
folder_uuid str | None

UUID of the folder to place the workflow in

None
folder Folder | None

destination folder

None
max_credits int | None

maximum credits for the workflow

None
webhook_url str | None

URL that Rowan will POST to when the workflow completes

None
is_draft bool

save as a draft without starting execution

False

Returns:

Type Description
Workflow[RelativeBindingFreeEnergyGraphResult]

submitted workflow

Raises:

Type Description
ValueError

both folder and folder_uuid are provided, if any ligand has no defined charge, or if the ligands do not all share the same formal charge

HTTPStatusError

request to the API fails