Please rotate your device

To continue exploring this website, please rotate your device to a vertical orientation

BioNeMo ProteinMPNN

NVIDIA/BioNeMo ProteinMPNN

NVIDIA NIM for ProteinMPNN inverse folding and protein sequence design.

biology

ProteinMPNN is a deep learning model for protein sequence design that predicts amino acid sequences likely to fold into a given 3D protein backbone structure. It takes a protein structure (PDB format) as input and outputs candidate amino acid sequences (FASTA format), offering both soluble and non-soluble model variants suited to different design needs, such as high-solubility requirements for biotechnology and pharmaceutical applications. It's often used as a downstream step after a structure-generation model like RFdiffusion — taking the generated backbone and determining a possible amino acid sequence that folds into it.

Call BioNeMo ProteinMPNN on Baseten using the NIM sequence design route.

Input

python
import os
import requests

MODEL_ID = os.environ["BASETEN_MODEL_ID"]
BASETEN_API_KEY = os.environ["BASETEN_API_KEY"]
BASETEN_URL = (
    f"https://model-{MODEL_ID}.api.baseten.co/environments/production/sync"
    "/biology/ipd/proteinmpnn/predict"
)

pdb_text = requests.get("https://files.rcsb.org/download/1R42.pdb", timeout=30).text
atom_lines = [line for line in pdb_text.splitlines() if line.startswith("ATOM")][:200]
input_pdb = "\n".join(atom_lines)

payload = {
    "input_pdb": input_pdb,
    "ca_only": False,
    "use_soluble_model": False,
    "num_seq_per_target": 3,
    "sampling_temp": [0.1, 0.3],
}

response = requests.post(
    BASETEN_URL,
    headers={
        "Authorization": f"Bearer {BASETEN_API_KEY}",
        "Content-Type": "application/json",
    },
    json=payload,
    timeout=300,
)
response.raise_for_status()
result = response.json()
print(result)

Output

json
{
  "mfasta": ">T=0.1, score=1.2345, seq=0\nMKTV...\n",
  "scores": [
    [
      1.2345
    ]
  ],
  "probs": [
    [
      "<probabilities>"
    ]
  ]
}