Skip to content

deeporigin.drug_discovery.structure_report

Bases: Execution, SyncExecutableMixin

Grade a structure via the Structure Report platform tool.

Provide a :class:~deeporigin.drug_discovery.structures.protein.Protein (local/UFA file), a four-character pdb_id (remote RCSB metadata only), or both (local file with RCSB as experimental-metadata authority). Call :meth:run to execute synchronously and receive :class:StructureReportResult rows.

Attributes

name instance-attribute

name = name

pdb_id property

pdb_id: str | None

Four-character PDB ID, if configured.

protein property

protein: Protein | None

Input protein, if configured.

tool_key class-attribute instance-attribute

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

tool_version instance-attribute

tool_version = tool_version

Methods:

from_dto classmethod

from_dto(
    dto: dict[str, Any],
    *,
    client: DeepOriginClient | None = None
) -> Self

Construct a StructureReport from a tools execution DTO.

Restores protein and/or pdb_id from userInputs (falling back to inputs).

Parameters:

Name Type Description Default
dto dict[str, Any]

Execution payload (same shape as client.executions.get).

required
client DeepOriginClient | None

Optional API client.

None

Returns:

Type Description
Self

A StructureReport with id, pricing fields, and domain inputs.

Raises:

Type Description
ValueError

If stored inputs lack both protein and pdb_id.

run

run(
    *,
    quote: bool = False,
    approve_amount: int | None = None
) -> list[StructureReportResult] | None

Run Structure Report synchronously and return graded rows.

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 as approveAmount.

None

Returns:

Type Description
list[StructureReportResult] | None

One or more :class:StructureReportResult rows, or None for

list[StructureReportResult] | None

quote-only responses.

Raises:

Type Description
DeepOriginException

If the execution does not succeed or jobOutputs.structure_reports is missing/invalid.