Skip to content

deeporigin.drug_discovery.execution_helpers

Helpers shared by tool execution classes (for example Docking, PocketFinder, SystemPrep):

  • price_total_from_execution_dto(dto) — reads priceTotal from the first successful row in dto["quotationResult"]["successfulQuotations"], or returns None.

Shared helpers for tools-service execution DTOs.

Functions

price_total_from_execution_dto

price_total_from_execution_dto(
    dto: dict[str, Any],
) -> float | None

Return priceTotal from the first successful quotation in an execution DTO.

Parameters:

Name Type Description Default
dto dict[str, Any]

Raw execution dictionary from executions.create or get.

required

Returns:

Type Description
float | None

The total price, or None if no successful quotation row exists.