Please rotate your device

To continue exploring this website, please rotate your device to a vertical orientation

BioNeMo DiffDock

NVIDIA/BioNeMo DiffDock

NVIDIA NIM for DiffDock blind protein-ligand docking.

biology

DiffDock is a generative model for drug discovery that predicts the three-dimensional structure of a protein-ligand complex — a process known as molecular docking or pose prediction — and is an equivariant geometric model for blind docking pose estimation. It takes protein and small-molecule 3D structures as input, requiring no prior information about the binding pocket, and generates predicted binding poses along with confidence scores by running a learned reverse diffusion process that transforms a distribution of noisy prior poses into the model's learned distribution. It also supports batch-docking mode, letting a single request dock multiple ligand molecules against the same protein receptor for greater efficiency.

Call BioNeMo DiffDock on Baseten using the NIM molecular docking route.

Input

python
import os
import requests

MODEL_ID = os.environ["BASETEN_MODEL_ID"]
BASETEN_API_KEY = os.environ["BASETEN_API_KEY"]
BASETEN_URL = (
    f"https://model-{MODEL_ID}.api.baseten.co/environments/production/sync"
    "/molecular-docking/diffdock/generate"
)

pdb_text = requests.get("https://files.rcsb.org/download/8G43.pdb", timeout=30).text
protein = "\n".join(line for line in pdb_text.splitlines() if line.startswith("ATOM"))
ligand = requests.get(
    "https://files.rcsb.org/ligands/download/ZU6_ideal.sdf",
    timeout=30,
).text

payload = {
    "protein": protein,
    "ligand": ligand,
    "ligand_file_type": "sdf",
    "num_poses": 5,
    "time_divisions": 20,
    "steps": 18,
    "save_trajectory": False,
    "is_staged": False,
}

response = requests.post(
    BASETEN_URL,
    headers={
        "Authorization": f"Bearer {BASETEN_API_KEY}",
        "Content-Type": "application/json",
    },
    json=payload,
    timeout=300,
)
response.raise_for_status()
result = response.json()
print(result)

Output

json
{
  "ligand_positions": [
    "<ranked SDF pose>"
  ],
  "position_confidence": [
    0.82
  ]
}