Loading...
Loading...
Use 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.
npx skill4agent add nvidia-bionemo/bionemo-agent-toolkit boltz2-nimSKILL.mdreferences/api.mdreferences/science.mdreferences/parameters.mdreferences/validation.mdreferences/examples.mdHosted NVIDIA API or local Docker NIM?
https://health.api.nvidia.com/v1/biology/mit/boltz2/predicthttp://localhost:8000/biology/mit/boltz2/predictAuthorization: Bearer $NGC_API_KEYNGC_API_KEYNVIDIA_API_KEY-e NGC_API_KEYdocker logindocker run.envNVIDIA_API_KEYset -a
[ -f .env ] && . ./.env
set +a
if [ -z "${NGC_API_KEY:-}" ] && [ -n "${NVIDIA_API_KEY:-}" ]; then
export NGC_API_KEY="$NVIDIA_API_KEY"
fi
: "${NGC_API_KEY:?Set NGC_API_KEY or NVIDIA_API_KEY}"
: "${LOCAL_NIM_CACHE:?Set LOCAL_NIM_CACHE}"
echo "$NGC_API_KEY" | docker login nvcr.io --username '$oauthtoken' --password-stdin
mkdir -p "${LOCAL_NIM_CACHE}"
chmod 755 "${LOCAL_NIM_CACHE}"
docker run --rm --name boltz2 --gpus all \
--shm-size=16G \
-e NGC_API_KEY \
-v "${LOCAL_NIM_CACHE}:/opt/nim/.cache" \
-p 8000:8000 \
nvcr.io/nim/mit/boltz2:1.6.0until curl -sf http://localhost:8000/v1/health/ready; do sleep 5; doneimport os
import requests
HOSTED = True
url = (
"https://health.api.nvidia.com/v1/biology/mit/boltz2/predict"
if HOSTED else "http://localhost:8000/biology/mit/boltz2/predict"
)
headers = {"Content-Type": "application/json"}
if HOSTED:
headers["Authorization"] = f"Bearer {os.getenv('NGC_API_KEY')}"
payload = {
"polymers": [{
"id": "A",
"molecule_type": "protein",
"sequence": "MTEYKLVVVGACGVGKSALTIQLIQNHFVDEYDPT",
}],
"recycling_steps": 3,
"sampling_steps": 50,
"diffusion_samples": 1,
"step_scale": 1.638,
"output_format": "mmcif",
}
response = requests.post(url, headers=headers, json=payload, timeout=300)
response.raise_for_status()
result = response.json(){"molecule_type": "protein", "sequence": "..."}molecule_type"dna""rna"{"id": "L1", "smiles": "CC(=O)OC1=CC=CC=C1C(=O)O"}{"id": "L1", "ccd": "ATP"}"predict_affinity": Trueaffinity_pic50affinity_pred_valueaffinity_probability_binaryalignmentformatrankdataprotein_with_msa = {
"id": "A",
"molecule_type": "protein",
"sequence": "MTEYKLVVVGAGGVGKSALTIQLIQNHFVDEYDPT",
"msa": {"msa_search": {"a3m": {
"alignment": ">query\nMTEYKLVVVGAGGVGKSALTIQLIQNHFVDEYDPT",
"format": "a3m",
"rank": 0,
}}},
}.cifreferences/examples.mdreferences/validation.md422/v1/health/ready--gpus all--shm-size=16G/opt/nim/.cache