NVIDIA
Explore
Models
Blueprints
GPUs
Docs
⌘KCtrl+K
Terms of Use
Privacy Policy
Your Privacy Choices
Contact

Copyright © 2025 NVIDIA Corporation

deepmind

alphafold2

Run Anywhere

Predicts the 3D structure of a protein from its amino acid sequence.

BiologyBionemonimprotein foldingDrug Discovery
Get API Key
API Reference
Accelerated by DGX Cloud
Deploying your application in production? Get started with a 90-day evaluation of NVIDIA AI Enterprise

Follow the steps below to download and run the NVIDIA NIM inference microservice for this model on your infrastructure of choice.

Step 1
Generate API Key

Step 2
Start NIM

  1. Export NGC_API_KEY variable.
export NGC_API_KEY=<your personal NGC key>
  1. The NIM container automatically downloads any required models. To save time and bandwidth it is recommended to provide a local cache directory. This way the NIM will be able to reuse any already downloaded models. Execute the following command to setup the cache directory:
export LOCAL_NIM_CACHE=~/.cache/nim
mkdir -p $LOCAL_NIM_CACHE
  1. Run the NIM container with the following commands.
docker run -it \
    --runtime=nvidia \
    -p 8000:8000 \
    -e NGC_API_KEY \
    -v $LOCAL_NIM_CACHE:/opt/nim/.cache \
    nvcr.io/nim/deepmind/alphafold2:latest

This command will start the NIM container and expose port 8000 for the user to interact with the NIM.

  1. Open a new terminal, leaving the terminal open with the just launched service. In the new terminal, wait until the health check end point returns {"status":"ready"} before proceeding. This may take a couple of minutes. You can use the following command to query the health check.
curl http://localhost:8000/v1/health/ready

Step 3
Test the NIM

Python client example

  1. Save following Python example to a file named nim_client.py.
import requests
import json

url = "http://localhost:8000/protein-structure/alphafold2/predict-structure-from-sequence"  # Replace with the actual URL
sequence = "MNVIDIAIAMAI"  # Replace with the actual sequence value

headers = {
    "content-type": "application/json"
}

data = {
    "sequence": sequence,
    "databases": ["small_bfd"],
    "e_value": 0.000001,
    "algorithm": "mmseqs2",
    "relax_prediction": False,
}

response = requests.post(url, headers=headers, data=json.dumps(data))

# Check if the request was successful
if response.ok:
    with open("output.pdb", "w") as ofi:
        ofi.write(json.dumps(response.json()))
    print("Request succeeded:", response.json())
else:
    print("Request failed:", response.status_code, response.text)
  1. Execute the example.
python nim_client.py
  1. The resulting PDB structure will be returned and written to output.pdb.
cat output.pdb

Shell client example

  1. Save the following Shell example to a file named nim_client.sh.
#!/usr/bin/env bash
set -e

URL=http://localhost:8000/protein-structure/alphafold2/predict-structure-from-sequence

request='{
 "sequence": "MNVIDIAIAMAI"
}'
curl -H 'Content-Type: application/json' \
     -d "$request" "$URL"
  1. Execute the example.
chmod +x nim_client.sh

./nim_client.sh
  1. Results will be printed on the terminal in JSON format. You will be able to see the PDB formatted output; you can also use curl to save the output directly to file.