/nvidia-bionemo:drug-discovery-pipelinefrom NVIDIA BioNeMo Agent Toolkit
Orchestrates a three-step drug discovery pipeline using GenMol, DiffDock, and Boltz2 NIMs to generate drug-like molecules, dock them to a protein target, and rank binding affinity. Handles filtering, budgets, and missing-target handoffs.
Ships in NVIDIA BioNeMo Agent Toolkit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Screen drug candidates end-to-end using three BioNeMo NIMs in sequence:
Step 1: GenMol → Step 2: DiffDock → Step 3: Boltz2
(Generate mols) (Dock to target) (Predict affinity)
This pipeline is used for:
Hosted calls send molecule/target inputs and the bearer credential to the selected NVIDIA endpoints. Use local NIM containers for confidential data. For a plan or request-only task, prepare artifacts without calling services or reading credentials. Keep every user-specified generation count and docking or affinity cap; the example counts below are defaults only when none was supplied. Filtering shortfalls do not authorize additional generation. Record requested, returned, valid, unique, docked and affinity-scored counts separately.
For de novo generation without a supplied seed, select GenMol and do not add a seed-SMILES blocker or substitute a seeded MolMIM optimization workflow. Make validity filtering and canonical-SMILES deduplication explicit before selecting the capped docking shortlist, including in a plan-only deliverable.
Confirm with the user:
Use supplied answers without asking again. A missing receptor blocks docking, and a missing target sequence blocks the Boltz2 payload; finish the preceding preparation and identify the missing input. Do not invent a target or imply that a prepared request was executed.
For local Docker, do not assume all NIMs are running on localhost:8000 at the
same time. Either run one container at a time and hand files/results between
steps, or start each NIM on a distinct host port and set the per-step URLs.
GenMol requires SAFE notation input (not raw SMILES). Use the safe-mol package.
import requests, json, os
import safe as sf # pip install safe-mol
from pathlib import Path
NGC_API_KEY = os.getenv("NGC_API_KEY")
HOSTED = True
requested_count = 30 # Replace with the user's exact generation count.
docking_limit = 20 # Replace with the user's maximum docking count.
affinity_limit = 5 # Replace with the user's maximum affinity count.
if type(requested_count) is not int or not 1 <= requested_count <= 1000:
raise ValueError("Generation count must be an integer from 1 to 1000")
if any(type(cap) is not int or cap < 0 for cap in (docking_limit, affinity_limit)):
raise ValueError("Docking and affinity limits must be nonnegative integers")
if HOSTED:
genmol_url = "https://health.api.nvidia.com/v1/biology/nvidia/genmol/generate"
headers = {"Content-Type": "application/json",
"Authorization": f"Bearer {NGC_API_KEY}"}
else:
genmol_url = "http://localhost:8000/generate"
headers = {"Content-Type": "application/json"}
# De novo generation (no scaffold):
safe_input = "[*{20-30}]"
# Scaffold decoration (known core):
# scaffold_smiles = "c1ccccc1"
# safe_input = sf.encode(scaffold_smiles) + ".[*{5-10}]"
payload = {
"smiles": safe_input, # field is named 'smiles' but takes SAFE notation
"num_molecules": requested_count,
"scoring": "QED", # QED or LogP
"unique": True,
"temperature": "1.0", # NOTE: must be string, not float
"noise": "1.0", # NOTE: must be string, not float
}
r = requests.post(genmol_url, headers=headers, json=payload)
r.raise_for_status()
molecules = r.json()["molecules"]
# Parse SMILES and deduplicate before applying the docking budget.
from rdkit import Chem
valid_unique = {}
for molecule in molecules:
parsed = Chem.MolFromSmiles(molecule["smiles"])
if parsed is None:
continue
canonical = Chem.MolToSmiles(parsed)
previous = valid_unique.get(canonical)
if previous is None or molecule["score"] > previous["score"]:
valid_unique[canonical] = molecule
molecules_sorted = sorted(valid_unique.values(), key=lambda x: x["score"], reverse=True)
docking_candidates = molecules_sorted[:docking_limit]
print(f"Requested {requested_count}; returned {len(molecules)}; "
f"valid unique {len(valid_unique)}; selected for docking {len(docking_candidates)}")
print("Top 5 by QED score:")
for m in docking_candidates[:5]:
print(f" {m['smiles'][:50]} score={m['score']:.4f}")
Prepare the protein and dock each candidate:
# Load protein (ATOM records only)
receptor_pdb_raw = Path("target.pdb").read_text()
receptor_pdb = "\n".join(line for line in receptor_pdb_raw.splitlines()
if line.startswith("ATOM"))
if HOSTED:
diffdock_url = "https://health.api.nvidia.com/v1/biology/mit/diffdock"
else:
diffdock_url = "http://localhost:8000/molecular-docking/diffdock/generate"
docking_results = []
for i, mol in enumerate(docking_candidates):
payload = {
"protein": receptor_pdb,
"ligand": mol["smiles"],
"ligand_file_type": "txt", # "txt" for SMILES input
"num_poses": 5,
"time_divisions": 20,
"steps": 18,
"save_trajectory": False,
}
r = requests.post(diffdock_url, headers=headers, json=payload)
r.raise_for_status()
result = r.json()
best_conf = result["position_confidence"][0] # rank 1 pose
best_pose = result["ligand_positions"][0]
docking_results.append({
"smiles": mol["smiles"],
"qed_score": mol["score"],
"docking_confidence": best_conf,
"best_pose_sdf": best_pose,
})
print(f" Mol {i+1:2d}: QED={mol['score']:.3f} docking_conf={best_conf:.4f}")
# Rank by docking confidence
docking_results.sort(key=lambda x: x["docking_confidence"], reverse=True)
print(f"\nTop 3 by docking confidence:")
for d in docking_results[:3]:
print(f" {d['smiles'][:50]} conf={d['docking_confidence']:.4f}")
For the top docking candidates, predict structure-based binding affinity:
if HOSTED:
boltz_url = "https://health.api.nvidia.com/v1/biology/mit/boltz2/predict"
else:
boltz_url = "http://localhost:8000/biology/mit/boltz2/predict"
# Use the target protein sequence (not PDB)
target_sequence = "<YOUR_TARGET_PROTEIN_SEQUENCE>"
affinity_results = []
for d in docking_results[:affinity_limit]:
payload = {
"polymers": [
{"id": "A", "molecule_type": "protein", "sequence": target_sequence}
],
"ligands": [
{"id": "L1", "smiles": d["smiles"], "predict_affinity": True}
],
"recycling_steps": 3,
"sampling_steps": 50,
"diffusion_samples": 1,
"output_format": "mmcif",
}
r = requests.post(boltz_url, headers=headers, json=payload)
r.raise_for_status()
result = r.json()
aff = result["affinities"]["L1"]
pic50 = aff["affinity_pic50"][0]
prob_binding = aff["affinity_probability_binary"][0]
affinity_results.append({
**d,
"pic50": pic50,
"probability_binding": prob_binding,
})
print(f" {d['smiles'][:40]} pIC50={pic50:.2f} P(bind)={prob_binding:.3f}")
# Final ranking by pIC50
affinity_results.sort(key=lambda x: x["pic50"], reverse=True)
| Step | Skill | Key endpoint |
|---|---|---|
| Molecule generation | genmol-nim | /biology/nvidia/genmol/generate |
| Docking | diffdock-nim | /molecular-docking/diffdock/generate |
| Affinity prediction | boltz2-nim | /biology/mit/boltz2/predict |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub nvidia-bionemo/bionemo-agent-toolkit --plugin nvidia-bionemoOther plugins' skills for the same job
43 skills in this plugin
/boltz2-nimUse Boltz2 NIM for biomolecular structure prediction and binding affinity. Invoke for Boltz2, protein structures, protein-ligand/DNA/RNA complexes, SMILES or CCD ligands, pIC50/IC50 affinity scoring, mmCIF output, hosted NVIDIA API calls, or local Docker deployment.
/codonfm-embedValidate coding-sequence CSVs, extract public CodonFM/Encodon embeddings, and choose checkpoints for downstream property modeling./codonfm-finetuneFine-tune public CodonFM Encodon checkpoints on labeled coding-sequence or coding-variant data using LoRA, head-only, or full fine-tuning. Use when a user explicitly asks to fine-tune CodonFM or Encodon for regression or classification. Support generic public-v1 Encodon workflows only; reject Decodon, MissenseDataset, missense_synom_agg, and generation workflows.