diffdock-nim
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDiffDock NIM
DiffDock NIM
Predict protein-ligand binding poses with blind docking. Use this for
first-pass hosted/local usage; load supplemental files only when needed:
SKILL.md- : exact hosted/local endpoints, schemas, Docker flags.
references/api.md - : docking use cases, limits, and handoffs.
references/science.md - : ligand formats, pose counts, diffusion controls.
references/parameters.md - : receptor, ligand, pose, and confidence checks.
references/validation.md - : compact hosted/local and pose-saving patterns.
references/examples.md
通过盲对接预测蛋白-配体结合构象。本适用于首次使用托管/本地部署场景;仅在需要时加载补充文件:
SKILL.md- :托管/本地端点、数据结构、Docker参数的详细说明。
references/api.md - :对接使用场景、限制条件及交接说明。
references/science.md - :配体格式、构象数量、扩散控制参数。
references/parameters.md - :受体、配体、构象及置信度校验说明。
references/validation.md - :托管/本地部署及构象保存的简洁示例。
references/examples.md
Choose Mode
选择运行模式
Ask only when context is unclear:
Hosted NVIDIA API or local Docker NIM?
- Hosted:
https://health.api.nvidia.com/v1/biology/mit/diffdock - Local:
http://localhost:8000/molecular-docking/diffdock/generate
The hosted and local paths differ. Local has no prefix and uses the
route. Hosted requests use . Supported local Docker
startup uses (or via the preflight) for
registry login, entitlement checks, and first-run model downloads; pass it
into the container with . Local inference requests use no
auth header after readiness. Warm-cache key-free startup varies by
image/version and should not be assumed.
/v1//molecular-docking/Authorization: Bearer $NGC_API_KEYNGC_API_KEYNVIDIA_API_KEY-e NGC_API_KEY仅在上下文不明确时询问:
使用NVIDIA托管API还是本地Docker NIM?
- 托管版:
https://health.api.nvidia.com/v1/biology/mit/diffdock - 本地版:
http://localhost:8000/molecular-docking/diffdock/generate
托管版与本地版的路径不同。本地版没有前缀,使用路由。托管版请求需使用。本地Docker启动需使用(或通过预检流程使用)进行镜像仓库登录、权限校验及首次运行时的模型下载;需通过将其传入容器。本地推理请求在服务就绪后无需认证头。无密钥的预热缓存启动方式因镜像/版本而异,请勿默认依赖该方式。
/v1//molecular-docking/Authorization: Bearer $NGC_API_KEYNGC_API_KEYNVIDIA_API_KEY-e NGC_API_KEYLocal Docker
本地Docker部署
For the exact local preflight ( load, fallback,
, , , both
flags, , and the for ),
copy the command block in under
Docker Reference verbatim.
.envNVIDIA_API_KEYLOCAL_NIM_CACHENVIDIA_VISIBLE_DEVICES=0--shm-size=2G--ulimitdocker logindocker runnvcr.io/nim/mit/diffdock:2.2.0references/api.mdReadiness:
bash
until curl -sf http://localhost:8000/v1/health/ready; do sleep 5; done如需完整的本地预检流程(加载文件、 fallback、、、、两个参数、以及运行的命令),请直接复制中Docker参考下的命令块。
.envNVIDIA_API_KEYLOCAL_NIM_CACHENVIDIA_VISIBLE_DEVICES=0--shm-size=2G--ulimitdocker loginnvcr.io/nim/mit/diffdock:2.2.0docker runreferences/api.md服务就绪校验:
bash
until curl -sf http://localhost:8000/v1/health/ready; do sleep 5; donePrepare Inputs
准备输入数据
Protein receptor must be ATOM records only. Strip headers, water, and HETATM.
python
from pathlib import Path
raw_pdb = Path("protein.pdb").read_text()
protein = "\n".join(line for line in raw_pdb.splitlines() if line.startswith("ATOM"))
if not protein:
raise ValueError("protein.pdb has no ATOM records")Ligand options:
- SMILES: ;
ligand = "CC(=O)OC1=CC=CC=C1C(=O)O".ligand_file_type = "txt" - SDF: ;
ligand = Path("ligand.sdf").read_text().ligand_file_type = "sdf" - MOL2: .
ligand_file_type = "mol2"
Do not use as ; SMILES is .
"smiles"ligand_file_type"txt"蛋白受体必须仅包含ATOM记录。移除头部信息、水分子及HETATM记录。
python
from pathlib import Path
raw_pdb = Path("protein.pdb").read_text()
protein = "\n".join(line for line in raw_pdb.splitlines() if line.startswith("ATOM"))
if not protein:
raise ValueError("protein.pdb has no ATOM records")配体选项:
- SMILES格式:;
ligand = "CC(=O)OC1=CC=CC=C1C(=O)O"。ligand_file_type = "txt" - SDF格式:;
ligand = Path("ligand.sdf").read_text()。ligand_file_type = "sdf" - MOL2格式:。
ligand_file_type = "mol2"
请勿将作为的值;SMILES格式对应的是。
"smiles"ligand_file_type"txt"Request Pattern
请求示例
python
import os
import requests
HOSTED = True
url = (
"https://health.api.nvidia.com/v1/biology/mit/diffdock"
if HOSTED else "http://localhost:8000/molecular-docking/diffdock/generate"
)
headers = {"Content-Type": "application/json"}
if HOSTED:
headers["Authorization"] = f"Bearer {os.getenv('NGC_API_KEY')}"
payload = {
"protein": protein,
"ligand": ligand,
"ligand_file_type": ligand_file_type,
"num_poses": 10,
"time_divisions": 20,
"steps": 18,
"save_trajectory": False,
}
response = requests.post(url, headers=headers, json=payload, timeout=300)
response.raise_for_status()
result = response.json()python
import os
import requests
HOSTED = True
url = (
"https://health.api.nvidia.com/v1/biology/mit/diffdock"
if HOSTED else "http://localhost:8000/molecular-docking/diffdock/generate"
)
headers = {"Content-Type": "application/json"}
if HOSTED:
headers["Authorization"] = f"Bearer {os.getenv('NGC_API_KEY')}"
payload = {
"protein": protein,
"ligand": ligand,
"ligand_file_type": ligand_file_type,
"num_poses": 10,
"time_divisions": 20,
"steps": 18,
"save_trajectory": False,
}
response = requests.post(url, headers=headers, json=payload, timeout=300)
response.raise_for_status()
result = response.json()Save And Report Output
保存并报告输出结果
ligand_positionsposition_confidenceposition_confidence[0]Save the ranked pose SDFs using the snippet in
under Save Ranked Poses.
references/examples.mdView pose SDF files with the receptor in PyMOL, ChimeraX, or UCSF Chimera. For
pose sanity checks and confidence caveats, read .
references/validation.mdligand_positionsposition_confidenceposition_confidence[0]请使用中保存排序后构象下的代码片段保存排序后的构象SDF文件。
references/examples.md可在PyMOL、ChimeraX或UCSF Chimera中结合受体查看构象SDF文件。如需了解构象合理性校验及置信度相关注意事项,请阅读。
references/validation.mdLimits And Troubleshooting
限制条件与故障排查
- Max : 100. Max
num_poses: 20. Maxtime_divisions: 18.steps - Single GPU; local minimum is about 24 GB VRAM.
- : invalid
422, invalid SMILES/SDF, or no ATOM records.ligand_file_type - Empty poses: validate receptor ATOM records and ligand parseability.
- Local URL 404 usually means the wrong hosted path or an accidental .
/v1/
- 最大值:100。
num_poses最大值:20。time_divisions最大值:18。steps - 仅支持单GPU;本地部署最低需要约24GB显存。
- 返回错误:
422无效、SMILES/SDF格式无效或无ATOM记录。ligand_file_type - 构象为空:校验受体ATOM记录及配体可解析性。
- 本地URL返回404错误:通常是使用了错误的托管版路径或误加了前缀。
/v1/