Skip to content

Binding Affinity

Binding affinity workflow – SQM- and ML-based scoring of protein–ligand complexes.

BindingAffinityScore dataclass

BindingAffinityScore(binding_affinity: float)

Binding affinity score for a single protein-ligand input.

Attributes:

Name Type Description
binding_affinity float

binding affinity in kcal/mol for SQM settings, or log10(M) for GNINA, AEV-PLIG, and NESSO settings

BindingAffinityResult dataclass

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

Bases: WorkflowResult

Result from a binding affinity workflow.

scores property

scores: list[BindingAffinityScore | None]

Binding affinity scores in input order, with None for failed inputs.

messages property

messages: list[Message]

Any messages or warnings from the workflow.

submit_binding_affinity_workflow

submit_binding_affinity_workflow(protein: Protein | ProteinUUID | None = None, ligand_residue_name: str | None = None, ligand_structures: list[StructureInput] | None = None, protein_sequences: list[ProteinSequence] | list[str] | None = None, ligand_smiles: list[str] | None = None, binding_affinity_settings: BindingAffinitySettings | None = None, name: str = 'Binding Affinity Workflow', folder_uuid: str | None = None, folder: Folder | None = None, max_credits: int | None = None, webhook_url: str | None = None, is_draft: bool = False) -> Workflow[BindingAffinityResult]

Submits a binding affinity workflow to the API.

Scores protein-ligand inputs using SQM energies, GNINA, AEV-PLIG, or NESSO. Three input modes are supported:

Mode 1 – holo protein: protein already contains the bound ligand. Pass ligand_residue_name to identify which residue is the ligand vs. the receptor. Do not pass ligand_structures.

Mode 2 – apo protein + external poses: protein has no bound ligand. Pass ligand_structures with poses that are already in the protein's coordinate frame. Do not pass ligand_residue_name.

Mode 3 – NESSO sequence/SMILES input: NESSO-only (binding_affinity_settings must be NessoAffinitySettings); no PDB required. Pass protein_sequences instead of protein, and ligand_smiles instead of ligand_residue_name/ ligand_structures.

NESSO also accepts a protein PDB but uses only its protein sequence, not its 3D coordinates.

Parameters:

Name Type Description Default
protein Protein | ProteinUUID | None

protein structure. Can be input as a UUID or a Protein object. Required unless protein_sequences is set (mode 3)

None
ligand_residue_name str | None

residue name identifying the ligand in a holo protein PDB (mode 1 only)

None
ligand_structures list[StructureInput] | None

external ligand poses to score, already in the protein's coordinate frame. Must have 3D coordinates (mode 2 only)

None
protein_sequences list[ProteinSequence] | list[str] | None

protein sequences to score against, in place of protein (mode 3, NESSO only)

None
ligand_smiles list[str] | None

ligand SMILES to score, in place of ligand_residue_name/ ligand_structures (mode 3, NESSO only)

None
binding_affinity_settings BindingAffinitySettings | None

settings controlling how binding affinity is computed: SinglePointEnergySettings (SQM), GninaAffinitySettings, AEVPLIGAffinitySettings, or NessoAffinitySettings. Defaults to SinglePointEnergySettings (PM6-D3H4X/COSMO optimization followed by PM6-D3H4X/COSMO2 single-point in water)

None
name str

name of the workflow

'Binding Affinity Workflow'
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[BindingAffinityResult]

submitted workflow

Raises:

Type Description
ValueError

folder arguments conflict

ValidationError

protein/ligand input combination is invalid

HTTPStatusError

request to the API fails