Skip to content

deeporigin.drug_discovery.konnektor

Bases: Execution, SyncExecutableMixin

Generate a ligand network with Konnektor and return a :class:KonnektorResult.

Konnektor accepts at least two ligands. Each ligand is synced before execution so the platform can receive either a ligand entity ID or a remote SDF path. The synchronous :meth:run method returns resolved ligand pairs, connectivity, and inline visualization HTML suitable for :class:~deeporigin.drug_discovery.rbfe.RBFE.

Attributes:

Name Type Description
ligands LigandSet

Ligands to connect.

network_type KonnektorNetworkType

Network topology planner, one of "star", "mst", or "cyclic". Defaults to "mst".

Attributes

ligands property

ligands: LigandSet

Ligands to connect.

name instance-attribute

name = name

network_type property

network_type: KonnektorNetworkType

Network topology planner.

tool_key class-attribute instance-attribute

tool_key: str = TOOL_KEYS_AND_VERSIONS["konnektor"][
    "tool_key"
]

tool_version instance-attribute

tool_version = tool_version

Methods:

run

run(
    *,
    quote: bool = False,
    approve_amount: int | None = None
) -> KonnektorResult | None

Run Konnektor synchronously and return the network result.

Parameters:

Name Type Description Default
quote bool

Shorthand for approve_amount=0. Returns None when the platform returns a quotation.

False
approve_amount int | None

Spend cap forwarded to the platform as approveAmount.

None

Returns:

Name Type Description
A KonnektorResult | None

class:KonnektorResult, or None for quote-only responses.

Raises:

Type Description
DeepOriginException

If the execution does not succeed or the response does not contain a valid v0.5 ligand_network output.