Skip to content

Molecular Design Platform

Structure generation endpoints served by MDP services (STRUCTURE_UTILS_URL, STRUCTURE_GENERATION_URL).

genbio.toolkit.aido_models_apis.structure_generation

structure_generation(target_seq: str, gcp_output_dir: str, modality: Literal['antibody'] = 'antibody') -> dict[str, Any]

Generate 3D structures of molecules. Currently only supports antibody generation conditioned on a target sequence.

Notes

This function first searches for the closest PDB structure to the given target sequence using the AIDO structure utils service, then runs the structure diffusion generative model to design antibody chains that bind to that target. Generated structures are written to a GCS bucket and a summary is returned.

Currently only the "antibody" modality is supported.

Parameters:

Name Type Description Default
target_seq str

Amino acid sequence of the target protein to design an antibody against.

required
gcp_output_dir str

GCS path where generated structures will be written, e.g. "gs://my-bucket/outputs/run1".

required
modality str

Generation modality; currently only "antibody" is supported (default: "antibody").

'antibody'

Returns:

Type Description
dict[str, Any]

A dictionary with the following fields:

dict[str, Any]
  • "query_id": The identifier for this generation job.
dict[str, Any]
  • "cif_string" A list containing plain CIF strings of the generated structures.
dict[str, Any]
  • "output_path": Local path on the server where structures were written before upload.
dict[str, Any]
  • "gcp_output_dir": The GCS path where generated structures are stored.
dict[str, Any]
  • "target_id": The PDB ID of the conditioning target found by sequence search.
dict[str, Any]
  • "n_samples": Number of structures requested.
dict[str, Any]
  • "successful_samples": Number of structures successfully generated.