Announcing our Series F. Learn more
biology

NVIDIA logoBioNeMo RFdiffusion

NVIDIA NIM for RFdiffusion de novo protein backbone design.

Model details

View repository

Example usage

Call BioNeMo RFdiffusion on Baseten using the NIM protein design route.

Note: You need to procure your own NVAIE licenses to access this NIM. The NIM requires an ngc_api_key secret in your Baseten workspace — add your NVIDIA NGC API key (the nvapi-… value) as a secret named ngc_api_key before deploying.

Input
1import os
2import requests
3
4MODEL_ID = os.environ["BASETEN_MODEL_ID"]
5BASETEN_API_KEY = os.environ["BASETEN_API_KEY"]
6BASETEN_URL = (
7    f"https://model-{MODEL_ID}.api.baseten.co/environments/production/sync"
8    "/biology/ipd/rfdiffusion/generate"
9)
10
11pdb_text = requests.get("https://files.rcsb.org/download/1R42.pdb", timeout=30).text
12atom_lines = [line for line in pdb_text.splitlines() if line.startswith("ATOM")][:400]
13input_pdb = "\n".join(atom_lines)
14
15payload = {
16    "input_pdb": input_pdb,
17    "contigs": "A20-60/0 50-100",
18    "hotspot_res": ["A50", "A51", "A52", "A53", "A54"],
19    "diffusion_steps": 15,
20}
21
22response = requests.post(
23    BASETEN_URL,
24    headers={
25        "Authorization": f"Bearer {BASETEN_API_KEY}",
26        "Content-Type": "application/json",
27    },
28    json=payload,
29    timeout=300,
30)
31response.raise_for_status()
32result = response.json()
33print(result)
34
JSON output
1{
2    "output_pdb": "<generated protein backbone PDB>",
3    "elapsed_ms": 123
4}

🔥 Trending models