proteinmpnn-nim
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseProteinMPNN NIM
ProteinMPNN NIM
Design protein sequences for a supplied backbone PDB. Use this for
first-pass hosted/local usage; load supplemental files only when needed:
SKILL.md- : exact endpoints, schemas, Docker flags, response fields.
references/api.md - : inverse-folding uses, limits, and validation.
references/science.md - : design controls, fixed positions, sampling.
references/parameters.md - : FASTA, score, and structure checks.
references/validation.md - : compact hosted/local request patterns.
references/examples.md
为提供的骨架PDB设计蛋白质序列。使用本进行首次托管/本地部署使用;仅在需要时加载补充文件:
SKILL.md- :精确的端点、模式、Docker参数、响应字段。
references/api.md - :反向折叠的用途、限制与验证方法。
references/science.md - :设计控制、固定位置、采样设置。
references/parameters.md - :FASTA、评分与结构检查规则。
references/validation.md - :简洁的托管/本地请求示例。
references/examples.md
Choose Mode
选择运行模式
Honor an explicitly configured runtime before asking. selects
the local service at ; the URL defaults to
for a NIM running in the same host or container. Ask only
when neither the environment nor the user's request makes the mode clear:
NIM_API_MODE=localPROTEINMPNN_NIM_URLhttp://localhost:8000Hosted NVIDIA API or local Docker NIM?
- Hosted:
https://health.api.nvidia.com/v1/biology/ipd/proteinmpnn/predict - Local:
${PROTEINMPNN_NIM_URL:-http://localhost:8000}/biology/ipd/proteinmpnn/predict
Local inference paths do not include . 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/Authorization: Bearer $NGC_API_KEYNGC_API_KEYNVIDIA_API_KEY-e NGC_API_KEY优先使用明确配置的运行时环境,若未明确则询问用户。设置将选择指向的本地服务;若未指定该URL,默认使用同一主机或容器中运行的NIM地址。仅当环境配置和用户请求均未明确运行模式时,才询问用户:
NIM_API_MODE=localPROTEINMPNN_NIM_URLhttp://localhost:8000使用托管式NVIDIA API还是本地Docker NIM?
- 托管式:
https://health.api.nvidia.com/v1/biology/ipd/proteinmpnn/predict - 本地:
${PROTEINMPNN_NIM_URL:-http://localhost:8000}/biology/ipd/proteinmpnn/predict
本地推理路径不包含。托管式请求需使用头信息。本地Docker启动时,需使用(或通过预检查使用)进行镜像仓库登录、权限验证和首次模型下载;通过将其传入容器。本地推理服务就绪后,请求无需携带认证头。无密钥的预热缓存启动方式因镜像版本而异,请勿默认依赖该方式。
/v1/Authorization: Bearer $NGC_API_KEYNGC_API_KEYNVIDIA_API_KEY-e NGC_API_KEYLocal Docker
本地Docker部署
For local setup, run the full sequence — env preflight, ,
, readiness loop, then the no-auth localhost request; do not answer
with only a localhost Python request. For the exact preflight ( sourcing,
/ handling, and the for
), copy the command block in
under Docker Reference verbatim.
This NIM's cache mount is , not .
When is supplied, the service is already managed elsewhere;
use that URL and do not start another Docker container.
docker logindocker run.envNGC_API_KEYNVIDIA_API_KEYdocker runnvcr.io/nim/ipd/proteinmpnn:latestreferences/api.md/home/nvs/.cache/nim/opt/nim/.cachePROTEINMPNN_NIM_URLReadiness:
bash
proteinmpnn_nim_url="${PROTEINMPNN_NIM_URL:-http://localhost:8000}"
until curl -sf "${proteinmpnn_nim_url%/}/v1/health/ready"; do sleep 5; done本地部署需执行完整流程——环境预检查、、、就绪状态轮询,然后发起无认证的本地请求;请勿仅返回本地Python请求代码。关于精确的预检查步骤(文件加载、/处理,以及的命令),请直接复制中Docker参考下的命令块。本NIM的缓存挂载路径为,而非。若已提供,说明服务已在其他位置管理;直接使用该URL,无需启动新的Docker容器。
docker logindocker run.envNGC_API_KEYNVIDIA_API_KEYnvcr.io/nim/ipd/proteinmpnn:latestdocker runreferences/api.md/home/nvs/.cache/nim/opt/nim/.cachePROTEINMPNN_NIM_URL就绪状态检查:
bash
proteinmpnn_nim_url="${PROTEINMPNN_NIM_URL:-http://localhost:8000}"
until curl -sf "${proteinmpnn_nim_url%/}/v1/health/ready"; do sleep 5; doneRequest Pattern
请求模式
Read PDB content inline; do not send only a file path.
python
import os
from pathlib import Path
import requests
HOSTED = os.getenv("NIM_API_MODE", "hosted").strip().lower() != "local"
pdb_content = Path("1R42.pdb").read_text()
nim_url = os.getenv("PROTEINMPNN_NIM_URL", "http://localhost:8000").rstrip("/")
url = (
"https://health.api.nvidia.com/v1/biology/ipd/proteinmpnn/predict"
if HOSTED else f"{nim_url}/biology/ipd/proteinmpnn/predict"
)
headers = {"Content-Type": "application/json"}
if HOSTED:
headers["Authorization"] = f"Bearer {os.environ['NGC_API_KEY']}"
payload = {
"input_pdb": pdb_content,
"num_seq_per_target": 10,
"sampling_temp": [0.1],
"use_soluble_model": False,
"ca_only": False,
}
response = requests.post(url, headers=headers, json=payload, timeout=300)
response.raise_for_status()
result = response.json()Common controls:
- Redesign only chain A: .
"input_pdb_chains": ["A"] - Exclude amino acids: or
"omit_AAs": ["C"]."omit_AAs": ["M"] - Diversity: (always a list).
"sampling_temp": [0.1, 0.3, 0.5] - Solubility bias: .
"use_soluble_model": True - Candidate count: is 1-100.
num_seq_per_target
直接读取PDB内容嵌入请求;请勿仅发送文件路径。
python
import os
from pathlib import Path
import requests
HOSTED = os.getenv("NIM_API_MODE", "hosted").strip().lower() != "local"
pdb_content = Path("1R42.pdb").read_text()
nim_url = os.getenv("PROTEINMPNN_NIM_URL", "http://localhost:8000").rstrip("/")
url = (
"https://health.api.nvidia.com/v1/biology/ipd/proteinmpnn/predict"
if HOSTED else f"{nim_url}/biology/ipd/proteinmpnn/predict"
)
headers = {"Content-Type": "application/json"}
if HOSTED:
headers["Authorization"] = f"Bearer {os.environ['NGC_API_KEY']}"
payload = {
"input_pdb": pdb_content,
"num_seq_per_target": 10,
"sampling_temp": [0.1],
"use_soluble_model": False,
"ca_only": False,
}
response = requests.post(url, headers=headers, json=payload, timeout=300)
response.raise_for_status()
result = response.json()常用控制参数:
- 仅重设计A链:。
"input_pdb_chains": ["A"] - 排除特定氨基酸:或
"omit_AAs": ["C"]。"omit_AAs": ["M"] - 多样性设置:(必须为列表格式)。
"sampling_temp": [0.1, 0.3, 0.5] - 可溶性偏好:。
"use_soluble_model": True - 候选序列数量:取值范围为1-100。
num_seq_per_target
Save And Report Output
保存并报告输出结果
Save the returned and pair scores only with designed (non-native/WT)
rows, using the snippet in
under Save Multi-FASTA. Validate promising designs by predicting structures
with Boltz2 or OpenFold3 and comparing them to the target backbone. For
FASTA/score sanity checks, read .
mfastareferences/examples.mdreferences/validation.md保存返回的文件,并仅将评分与设计的(非天然/野生型)序列行配对,可使用中保存多FASTA下的代码片段。通过Boltz2或OpenFold3预测候选设计的结构,并与目标骨架对比,以此验证设计的可行性。关于FASTA/评分的合理性检查,请参考。
mfastareferences/examples.mdreferences/validation.mdLimits And Troubleshooting
限制与故障排查
- Minimum GPU VRAM: about 3 GB.
- must be a list, even for one value.
sampling_temp - Empty : check non-empty
mfastaandinput_pdb.num_seq_per_target >= 1 - PDB parse errors: use valid PDB ATOM records.
- Local URL 404 usually means an accidental prefix.
/v1/ - Cache mount error: use inside the container.
/home/nvs/.cache/nim
- 最低GPU显存要求:约3GB。
- 必须为列表格式,即使仅设置一个值。
sampling_temp - 为空:检查
mfasta是否非空,且input_pdb。num_seq_per_target >= 1 - PDB解析错误:确保使用有效的PDB ATOM记录。
- 本地URL返回404:通常是意外添加了前缀。
/v1/ - 缓存挂载错误:容器内使用路径。
/home/nvs/.cache/nim