Skip to content

MPNN

Message-passing neural network for inverse folding --- designs amino acid sequences that fold into a given protein backbone structure, with optional ligand and membrane awareness.

License: MIT · Molecules: protein, complex · Tasks: inverse_folding

Actions: generate · Variants: 6

At a glance

Use it when

  • Designing sequences for computationally generated backbones from BoltzGen or other backbone generators as part of a de novo protein design pipeline
  • Redesigning enzyme sequences around a bound substrate or cofactor using the LigandMPNN variant to preserve active-site geometry
  • Improving protein stability, expression, or solubility by redesigning surface residues with the SolubleMPNN variant while fixing the hydrophobic core
  • Designing membrane protein sequences using global-membrane or per-residue-membrane variants that account for the lipid bilayer environment
  • Generating diverse sequence libraries for experimental screening by sampling multiple sequences at varying temperatures from a single target backbone
  • Performing self-consistency validation: design sequences with MPNN, predict structures with ESMFold/Chai-1/AF2, and check agreement with the target backbone
  • Optimizing existing proteins for improved biophysical properties while preserving the overall fold, with catalytic or functional residues fixed
  • Antibody or nanobody CDR and framework redesign when a target backbone structure is available, especially using the LigandMPNN variant for antigen-aware design
Strengths
  • Highest experimental success rate of any inverse folding method: 70-100% of designs express as soluble monomers with sub-angstrom structural accuracy (Dauparas et al., Science 2022)
  • Six context-aware variants (protein, ligand, soluble, global-membrane, residue-membrane, hyper) cover virtually every protein design scenario without retraining
  • LigandMPNN variant designs sequences in the context of bound small molecules, metal ions, cofactors, and nucleic acids, enabling active-site-aware enzyme engineering
  • CPU-only inference (no GPU required) with a lightweight memory footprint makes it one of the most cost-effective inverse folding models available
  • Autoregressive sampling with temperature control enables generation of diverse sequence libraries from a single backbone, tunable from conservative (low T) to exploratory (high T)
  • Most experimentally validated deep-learning inverse folding model: tested across 8+ diverse topologies including beta-barrels, TIM barrels, NTF2-like folds, and de novo antibodies
  • Accepts multi-chain complexes and supports fixed-residue constraints, enabling selective redesign of specific positions while preserving catalytic or binding residues
  • De facto standard in the backbone-generation/ProteinMPNN/AlphaFold2 self-consistency pipeline used by the David Baker lab and the broader protein design community
Limitations
  • Maximum sequence length of 1024 residues; cannot design sequences for very large proteins or extended multi-domain assemblies
  • Optimizes for structural compatibility only, not for catalytic activity, binding affinity, or other functional properties directly
  • No awareness of protein dynamics or conformational flexibility; designs against a single static backbone snapshot
  • Performance degrades on intrinsically disordered regions where no stable backbone exists to design against
  • Does not model post-translational modifications (glycosylation, phosphorylation) or their effects on sequence preferences
  • Per-residue confidence scores do not directly translate to experimental success probability; high-confidence designs can still fail to express
  • Requires a high-quality input backbone structure (PDB format); noisy or low-resolution structures reduce design quality
  • No built-in mechanism for multi-objective optimization (e.g., simultaneously optimizing stability, solubility, and binding)
Reach for something else when
  • You need to design sequences from scratch without a target backbone structure (use ProGen2 or ZymCTRL for sequence-only generative design instead)
  • You need antibody-specific inverse folding with built-in knowledge of antibody numbering, germline usage, and humanization (use AntiFold instead)
  • You only need a quick sequence plausibility score for an existing structure-sequence pair without generating new sequences (use ESM-IF1 for lightweight scoring)
  • You need to predict or optimize a specific functional property like thermostability (use ThermoMPNN for direct Tm prediction and stabilizing mutation suggestions)
  • You need to generate novel backbone structures rather than sequences for existing backbones (use BoltzGen for structure generation)
  • Your target protein is intrinsically disordered or lacks a well-defined 3D structure; sequence-based models like ESM2 or ESMC are more appropriate
  • You need structure prediction from sequence rather than sequence design from structure (use ESMFold, Chai-1, or RF3 instead)

Alternatives

Model Better when Worse when
esm_if1 When you want a lightweight single-chain inverse-folding pass or need ESM pretrained representations for downstream work. When you need the highest experimental success rates, ligand/metal/nucleic-acid-aware design, membrane-aware variants, soluble redesign, or multi-chain complex handling — MPNN's six variants and validation are broader.
antifold When designing antibody or nanobody sequences specifically, with built-in IMGT numbering and CDR/framework region selection. When designing any non-antibody protein, or when you need ligand-aware, membrane-aware, or solubility-optimized inverse folding.

API & schema

Variants

Variant Endpoint slug GPU CPU Memory
protein protein-mpnn CPU 1.0 3 GB
ligand ligand-mpnn CPU 1.0 3 GB
soluble soluble-mpnn CPU 1.0 3 GB
global_label_membrane global-label-membrane-mpnn CPU 1.0 3 GB
per_residue_label_membrane per-residue-label-membrane-mpnn CPU 1.0 3 GB
hyper hyper-mpnn CPU 1.0 3 GB

Call an action with POST /api/v1/{slug}/{action} — the request envelope is {"items": [...], "params": {...}} and a success returns {"results": [...]}. See the HTTP API page for the base URL, error shape, and full contract.

generate

Call it

curl -X POST http://127.0.0.1:8000/api/v1/protein-mpnn/generate \
  -H "Content-Type: application/json" \
  -d '{
  "items": [
    {
      "pdb": "<contents of a .pdb file>"
    }
  ]
}'

RequestMPNNGenerateRequest

Field Type Required Constraints Description
params AllMPNNGenerateParams no Optional parameters controlling this action (defaults are used when omitted).
items list[MPNNGenerateRequestItem] yes items 1–1 Batch of inputs to process in a single request. Accepts exactly 1 PDB structure.
Nested types

AllMPNNGenerateParams

Field Type Required Constraints Description
seed integer | null no Random seed for reproducible sampling.
temperature number no default 0.1 Sampling temperature; higher values increase diversity.
fixed_residues list[string] no Residues to keep fixed (not redesigned), each as ChainId+Position (e.g., 'A10').
redesigned_residues list[string] no Residues to redesign; all others remain fixed. Each specified as ChainId+Position (e.g., 'A10').
bias_AA object no Global log-odds bias per amino acid letter; positive values favor, negative values disfavor that amino acid.
bias_AA_per_residue object no Per-residue log-odds biases keyed by residue spec (e.g., 'A10'), mapping amino acid letter to bias value.
omit_AA string no default `` Amino acid letters to globally exclude from all designed positions (e.g., 'CM' omits Cys and Met).
omit_AA_per_residue object no Per-residue amino acid exclusions keyed by residue spec (e.g., 'A10') with letters of amino acids to omit.
symmetry_residues list[list[string]] no Groups of residue specs that must receive the same amino acid identity for symmetric design.
symmetry_weights list[list[number]] no Log-odds weights for each symmetry group; each list must match the length of the corresponding symmetry_residues entry.
homo_oligomer boolean no default False If true, automatically links equivalent positions across all chains for homo-oligomeric symmetry.
chains_to_design list[string] no Chain identifiers to redesign; if empty, all chains in the structure are designed.
parse_these_chains_only list[string] no If set, only these chains are parsed from the PDB; all other chains are ignored.
parse_atoms_with_zero_occupancy boolean no default False If true, includes atoms with zero occupancy from the input PDB.
number_of_batches integer no ≥1; ≤48; default 1 Number of sampling batches to run; total sequences generated = batch_size × number_of_batches.
batch_size integer no ≥1; ≤1000; default 1 Number of sequences to generate per batch.
repack_everything boolean | null no default False If true, repacks all side chains (not just designed positions) when side-chain packing is enabled.
pack_side_chains boolean | null no default False If true, runs the side-chain packer to produce all-atom output alongside the backbone PDB.
number_of_packs_per_design integer | null no default 1 Number of side-chain packing attempts per design; results keyed by pack index in the response.
sc_num_samples integer | null no default 16 Number of diffusion samples per design used by the side-chain packer.
sc_num_denoising_steps integer | null no default 3 Number of denoising steps performed by the side-chain packer per sample.
force_hetatm boolean | null no default False If true, preserves the original HETATM record flags for non-protein (ligand/water) atoms in the packed output PDB.
pack_with_ligand_context boolean | null no default True If true, includes nearby ligand atoms when packing side chains.
ligand_mpnn_use_atom_context boolean | null no default True If true, conditions sequence design on non-protein atom context (ligands, metals, nucleic acids).
ligand_mpnn_cutoff_for_score number | null no default 8.0 Distance cutoff in Ångströms for including ligand atoms in the confidence score.
global_transmembrane_label string | null no default soluble Whole-protein membrane context label; 'membrane' for transmembrane proteins, 'soluble' otherwise.
transmembrane_buried list[string] | null no Residue specs for positions buried in the membrane core, used to guide membrane-aware design.
transmembrane_interface list[string] | null no Residue specs for positions at the membrane-water interface, used to guide membrane-aware design.

MPNNGenerateRequestItem

Field Type Required Constraints Description
pdb string yes len 1–2500000 Input structure in PDB format.
Raw JSON Schema
{
  "$defs": {
    "AllMPNNGenerateParams": {
      "additionalProperties": false,
      "properties": {
        "seed": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Random seed for reproducible sampling.",
          "title": "Seed"
        },
        "temperature": {
          "default": 0.1,
          "description": "Sampling temperature; higher values increase diversity.",
          "title": "Temperature",
          "type": "number"
        },
        "fixed_residues": {
          "description": "Residues to keep fixed (not redesigned), each as ChainId+Position (e.g., 'A10').",
          "items": {
            "type": "string"
          },
          "title": "Fixed Residues",
          "type": "array",
          "default": []
        },
        "redesigned_residues": {
          "description": "Residues to redesign; all others remain fixed. Each specified as ChainId+Position (e.g., 'A10').",
          "items": {
            "type": "string"
          },
          "title": "Redesigned Residues",
          "type": "array",
          "default": []
        },
        "bias_AA": {
          "additionalProperties": {
            "type": "number"
          },
          "description": "Global log-odds bias per amino acid letter; positive values favor, negative values disfavor that amino acid.",
          "title": "Bias Aa",
          "type": "object",
          "default": {}
        },
        "bias_AA_per_residue": {
          "additionalProperties": {
            "additionalProperties": {
              "type": "number"
            },
            "type": "object"
          },
          "description": "Per-residue log-odds biases keyed by residue spec (e.g., 'A10'), mapping amino acid letter to bias value.",
          "title": "Bias Aa Per Residue",
          "type": "object",
          "default": {}
        },
        "omit_AA": {
          "default": "",
          "description": "Amino acid letters to globally exclude from all designed positions (e.g., 'CM' omits Cys and Met).",
          "title": "Omit Aa",
          "type": "string"
        },
        "omit_AA_per_residue": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Per-residue amino acid exclusions keyed by residue spec (e.g., 'A10') with letters of amino acids to omit.",
          "title": "Omit Aa Per Residue",
          "type": "object",
          "default": {}
        },
        "symmetry_residues": {
          "description": "Groups of residue specs that must receive the same amino acid identity for symmetric design.",
          "items": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "title": "Symmetry Residues",
          "type": "array",
          "default": []
        },
        "symmetry_weights": {
          "description": "Log-odds weights for each symmetry group; each list must match the length of the corresponding symmetry_residues entry.",
          "items": {
            "items": {
              "type": "number"
            },
            "type": "array"
          },
          "title": "Symmetry Weights",
          "type": "array",
          "default": []
        },
        "homo_oligomer": {
          "default": false,
          "description": "If true, automatically links equivalent positions across all chains for homo-oligomeric symmetry.",
          "title": "Homo Oligomer",
          "type": "boolean"
        },
        "chains_to_design": {
          "description": "Chain identifiers to redesign; if empty, all chains in the structure are designed.",
          "items": {
            "type": "string"
          },
          "title": "Chains To Design",
          "type": "array",
          "default": []
        },
        "parse_these_chains_only": {
          "description": "If set, only these chains are parsed from the PDB; all other chains are ignored.",
          "items": {
            "type": "string"
          },
          "title": "Parse These Chains Only",
          "type": "array",
          "default": []
        },
        "parse_atoms_with_zero_occupancy": {
          "default": false,
          "description": "If true, includes atoms with zero occupancy from the input PDB.",
          "title": "Parse Atoms With Zero Occupancy",
          "type": "boolean"
        },
        "number_of_batches": {
          "default": 1,
          "description": "Number of sampling batches to run; total sequences generated = batch_size \u00d7 number_of_batches.",
          "maximum": 48,
          "minimum": 1,
          "title": "Number Of Batches",
          "type": "integer"
        },
        "batch_size": {
          "default": 1,
          "description": "Number of sequences to generate per batch.",
          "maximum": 1000,
          "minimum": 1,
          "title": "Batch Size",
          "type": "integer"
        },
        "repack_everything": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": false,
          "description": "If true, repacks all side chains (not just designed positions) when side-chain packing is enabled.",
          "title": "Repack Everything"
        },
        "pack_side_chains": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": false,
          "description": "If true, runs the side-chain packer to produce all-atom output alongside the backbone PDB.",
          "title": "Pack Side Chains"
        },
        "number_of_packs_per_design": {
          "anyOf": [
            {
              "maximum": 8,
              "minimum": 1,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": 1,
          "description": "Number of side-chain packing attempts per design; results keyed by pack index in the response.",
          "title": "Number Of Packs Per Design"
        },
        "sc_num_samples": {
          "anyOf": [
            {
              "maximum": 64,
              "minimum": 1,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": 16,
          "description": "Number of diffusion samples per design used by the side-chain packer.",
          "title": "Sc Num Samples"
        },
        "sc_num_denoising_steps": {
          "anyOf": [
            {
              "maximum": 10,
              "minimum": 1,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": 3,
          "description": "Number of denoising steps performed by the side-chain packer per sample.",
          "title": "Sc Num Denoising Steps"
        },
        "force_hetatm": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": false,
          "description": "If true, preserves the original HETATM record flags for non-protein (ligand/water) atoms in the packed output PDB.",
          "title": "Force Hetatm"
        },
        "pack_with_ligand_context": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": true,
          "description": "If true, includes nearby ligand atoms when packing side chains.",
          "title": "Pack With Ligand Context"
        },
        "ligand_mpnn_use_atom_context": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": true,
          "description": "If true, conditions sequence design on non-protein atom context (ligands, metals, nucleic acids).",
          "title": "Ligand Mpnn Use Atom Context"
        },
        "ligand_mpnn_cutoff_for_score": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": 8.0,
          "description": "Distance cutoff in \u00c5ngstr\u00f6ms for including ligand atoms in the confidence score.",
          "title": "Ligand Mpnn Cutoff For Score"
        },
        "global_transmembrane_label": {
          "anyOf": [
            {
              "enum": [
                "membrane",
                "soluble"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": "soluble",
          "description": "Whole-protein membrane context label; 'membrane' for transmembrane proteins, 'soluble' otherwise.",
          "title": "Global Transmembrane Label"
        },
        "transmembrane_buried": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Residue specs for positions buried in the membrane core, used to guide membrane-aware design.",
          "title": "Transmembrane Buried"
        },
        "transmembrane_interface": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Residue specs for positions at the membrane-water interface, used to guide membrane-aware design.",
          "title": "Transmembrane Interface"
        }
      },
      "title": "AllMPNNGenerateParams",
      "type": "object"
    },
    "MPNNGenerateRequestItem": {
      "additionalProperties": false,
      "properties": {
        "pdb": {
          "description": "Input structure in PDB format.",
          "maxLength": 2500000,
          "minLength": 1,
          "title": "Pdb",
          "type": "string"
        }
      },
      "required": [
        "pdb"
      ],
      "title": "MPNNGenerateRequestItem",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "params": {
      "$ref": "#/$defs/AllMPNNGenerateParams",
      "description": "Optional parameters controlling this action (defaults are used when omitted)."
    },
    "items": {
      "description": "Batch of inputs to process in a single request. Accepts exactly 1 PDB structure.",
      "items": {
        "$ref": "#/$defs/MPNNGenerateRequestItem"
      },
      "maxItems": 1,
      "minItems": 1,
      "title": "Items",
      "type": "array"
    }
  },
  "required": [
    "items"
  ],
  "title": "MPNNGenerateRequest",
  "type": "object"
}

ResponseMPNNGenerateResponse

Field Type Required Constraints Description
results list[MPNNSCGenerateResponseItem | MPNNGenerateResponseItem] yes Per-input results, returned in the same order as the request items.
Nested types

MPNNGenerateResponseItem

Field Type Required Constraints Description
sequence string yes Designed amino acid sequence; chains are separated by ':' when multiple chains are present.
pdb string yes Input backbone coordinates with the designed sequence threaded in, in PDB format.
overall_confidence number yes Overall design confidence (0–1); computed as exp of negative cross-entropy loss over designed positions.
ligand_confidence number yes Design confidence near ligand atoms (0–1); most informative for LigandMPNN variants.
seq_rec number yes Sequence recovery relative to the native sequence (0–1); fraction of positions matching native.
log_probs list[list[number]] yes Per-residue log probabilities over 21 amino acid types, in the model's canonical order.
sampling_probs list[list[number]] yes Per-residue sampling probabilities over 21 amino acid types, corresponding to log_probs.

MPNNSCGenerateResponseItem

Field Type Required Constraints Description
sequence string yes Designed amino acid sequence; chains are separated by ':' when multiple chains are present.
pdb string yes Input backbone coordinates with the designed sequence threaded in, in PDB format.
overall_confidence number yes Overall design confidence (0–1); computed as exp of negative cross-entropy loss over designed positions.
ligand_confidence number yes Design confidence near ligand atoms (0–1); most informative for LigandMPNN variants.
seq_rec number yes Sequence recovery relative to the native sequence (0–1); fraction of positions matching native.
log_probs list[list[number]] yes Per-residue log probabilities over 21 amino acid types, in the model's canonical order.
sampling_probs list[list[number]] yes Per-residue sampling probabilities over 21 amino acid types, corresponding to log_probs.
pdb_packed object yes All-atom packed PDB structures after side-chain placement, keyed by pack index (e.g., 'packed_1').
Raw JSON Schema
{
  "$defs": {
    "MPNNGenerateResponseItem": {
      "properties": {
        "sequence": {
          "description": "Designed amino acid sequence; chains are separated by ':' when multiple chains are present.",
          "title": "Sequence",
          "type": "string"
        },
        "pdb": {
          "description": "Input backbone coordinates with the designed sequence threaded in, in PDB format.",
          "title": "Pdb",
          "type": "string"
        },
        "overall_confidence": {
          "description": "Overall design confidence (0\u20131); computed as exp of negative cross-entropy loss over designed positions.",
          "title": "Overall Confidence",
          "type": "number"
        },
        "ligand_confidence": {
          "description": "Design confidence near ligand atoms (0\u20131); most informative for LigandMPNN variants.",
          "title": "Ligand Confidence",
          "type": "number"
        },
        "seq_rec": {
          "description": "Sequence recovery relative to the native sequence (0\u20131); fraction of positions matching native.",
          "title": "Seq Rec",
          "type": "number"
        },
        "log_probs": {
          "description": "Per-residue log probabilities over 21 amino acid types, in the model's canonical order.",
          "items": {
            "items": {
              "type": "number"
            },
            "type": "array"
          },
          "title": "Log Probs",
          "type": "array"
        },
        "sampling_probs": {
          "description": "Per-residue sampling probabilities over 21 amino acid types, corresponding to log_probs.",
          "items": {
            "items": {
              "type": "number"
            },
            "type": "array"
          },
          "title": "Sampling Probs",
          "type": "array"
        }
      },
      "required": [
        "sequence",
        "pdb",
        "overall_confidence",
        "ligand_confidence",
        "seq_rec",
        "log_probs",
        "sampling_probs"
      ],
      "title": "MPNNGenerateResponseItem",
      "type": "object"
    },
    "MPNNSCGenerateResponseItem": {
      "properties": {
        "sequence": {
          "description": "Designed amino acid sequence; chains are separated by ':' when multiple chains are present.",
          "title": "Sequence",
          "type": "string"
        },
        "pdb": {
          "description": "Input backbone coordinates with the designed sequence threaded in, in PDB format.",
          "title": "Pdb",
          "type": "string"
        },
        "overall_confidence": {
          "description": "Overall design confidence (0\u20131); computed as exp of negative cross-entropy loss over designed positions.",
          "title": "Overall Confidence",
          "type": "number"
        },
        "ligand_confidence": {
          "description": "Design confidence near ligand atoms (0\u20131); most informative for LigandMPNN variants.",
          "title": "Ligand Confidence",
          "type": "number"
        },
        "seq_rec": {
          "description": "Sequence recovery relative to the native sequence (0\u20131); fraction of positions matching native.",
          "title": "Seq Rec",
          "type": "number"
        },
        "log_probs": {
          "description": "Per-residue log probabilities over 21 amino acid types, in the model's canonical order.",
          "items": {
            "items": {
              "type": "number"
            },
            "type": "array"
          },
          "title": "Log Probs",
          "type": "array"
        },
        "sampling_probs": {
          "description": "Per-residue sampling probabilities over 21 amino acid types, corresponding to log_probs.",
          "items": {
            "items": {
              "type": "number"
            },
            "type": "array"
          },
          "title": "Sampling Probs",
          "type": "array"
        },
        "pdb_packed": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "All-atom packed PDB structures after side-chain placement, keyed by pack index (e.g., 'packed_1').",
          "title": "Pdb Packed",
          "type": "object"
        }
      },
      "required": [
        "sequence",
        "pdb",
        "overall_confidence",
        "ligand_confidence",
        "seq_rec",
        "log_probs",
        "sampling_probs",
        "pdb_packed"
      ],
      "title": "MPNNSCGenerateResponseItem",
      "type": "object"
    }
  },
  "properties": {
    "results": {
      "description": "Per-input results, returned in the same order as the request items.",
      "items": {
        "anyOf": [
          {
            "$ref": "#/$defs/MPNNSCGenerateResponseItem"
          },
          {
            "$ref": "#/$defs/MPNNGenerateResponseItem"
          }
        ]
      },
      "title": "Results",
      "type": "array"
    }
  },
  "required": [
    "results"
  ],
  "title": "MPNNGenerateResponse",
  "type": "object"
}

Usage

One-line summary: Message-passing neural network for inverse folding --- designs amino acid sequences that fold into a given protein backbone structure, with optional ligand and membrane awareness.

Overview

MPNN implements the ProteinMPNN and LigandMPNN family of models developed by Justas Dauparas and David Baker's group at the University of Washington. ProteinMPNN (Science, 2022) is a graph neural network that solves the inverse folding problem: given a protein backbone structure, it designs amino acid sequences predicted to fold into that structure. It achieves dramatically higher experimental success rates (~70-100%) compared to prior methods like Rosetta fixed-backbone design (~15-30%).

LigandMPNN extends ProteinMPNN to handle non-protein atoms including small-molecule ligands, metal ions, nucleic acids, and non-standard residues. Additional specialized variants handle membrane proteins (global and per-residue transmembrane labels) and soluble protein optimization.

Architecture

Property Value
Architecture Message-passing GNN (encoder-decoder)
Hidden dimensions 128
Encoder layers 3
Decoder layers 3
Graph type k-nearest neighbor on backbone CA atoms
Input PDB-format backbone coordinates
Output Amino acid sequences + confidence scores
Max sequence length recommended up to ~1024 residues

For detailed architecture specifications see MODEL.md.

Capabilities & Limitations

CAN be used for: - Designing amino acid sequences for a given protein backbone structure (inverse folding) - Multi-chain complex design with selective chain redesign - Ligand-aware design accounting for bound small molecules, metals, cofactors, nucleic acids (LigandMPNN) - Membrane protein design with transmembrane-aware constraints - Constrained design with fixed residues, redesigned residues, and amino acid biases - Symmetric/homo-oligomer design with linked positions - Side-chain packing to generate all-atom models from designed sequences - Batch sampling of multiple diverse sequences per backbone

CANNOT be used for: - Backbone structure generation or remodeling (use RFdiffusion or Chroma for that) - Sequences beyond the recommended ~1024 residues (advisory guidance, not a hard-enforced cap) - Predicting protein structure from sequence (use AlphaFold2, ESMFold, or Chai-1) - Directly predicting or optimizing catalytic activity - Handling non-PDB input formats (requires valid PDB string)

Other considerations: - Output is stochastic by default; provide a seed parameter for reproducible results - Lower temperature (e.g., 0.1) produces more conservative designs; higher temperature (e.g., 0.5-1.0) produces more diverse designs - Confidence scores indicate structural compatibility, not guaranteed foldability - Side-chain packing is optional and approximate; consider downstream refinement for high-accuracy applications

Usage Examples

from models.mpnn.schema import (
    MPNNGenerateRequest,
    AllMPNNGenerateParams,
    MPNNGenerateRequestItem,
)

# Basic sequence design
request = MPNNGenerateRequest(
    params=AllMPNNGenerateParams(
        temperature=0.1,
        batch_size=4,
        number_of_batches=1,
        seed=42,
    ),
    items=[
        MPNNGenerateRequestItem(pdb=pdb_string),
    ],
)

# Constrained design: fix active-site residues, redesign rest of chain A
request = MPNNGenerateRequest(
    params=AllMPNNGenerateParams(
        temperature=0.2,
        batch_size=8,
        number_of_batches=2,
        fixed_residues=["A45", "A72", "A103"],  # Catalytic triad
        chains_to_design=["A"],
    ),
    items=[
        MPNNGenerateRequestItem(pdb=pdb_string),
    ],
)

# Homo-oligomer design
request = MPNNGenerateRequest(
    params=AllMPNNGenerateParams(
        temperature=0.1,
        homo_oligomer=True,
        batch_size=4,
    ),
    items=[
        MPNNGenerateRequestItem(pdb=homo_trimer_pdb_string),
    ],
)

Confidence Metrics

Metric Range Interpretation
overall_confidence 0-1 Exp of negative cross-entropy loss over designed positions; higher = more structurally compatible
ligand_confidence 0-1 Same metric but weighted by proximity to ligand atoms; most relevant for LigandMPNN variant
seq_rec 0-1 Fraction of designed positions matching the native sequence; useful as a sanity check

Technical Glossary

Inverse folding: The computational problem of finding amino acid sequences compatible with a given backbone structure. The "inverse" of protein folding (sequence to structure).

Decoding order: The random permutation in which residues are generated during autoregressive sampling. Randomizing this order, combined with noise injection, prevents the model from copying spatial neighbors.

Temperature: Softmax temperature for amino acid sampling. T=0.1 is near-greedy (picks highest-probability amino acid); T=1.0 samples proportionally from the predicted distribution.

Sequence recovery: The fraction of positions where the designed sequence matches the original/native sequence. Typical ProteinMPNN recovery is ~52%, which is substantially higher than random (~5%) and higher than Rosetta (~33%).

Chain mask: Binary mask indicating which residues should be redesigned (1) vs. held fixed (0). Constructed from chains_to_design, fixed_residues, and redesigned_residues parameters.

Architecture & training

Architecture

Model Type & Innovation

MPNN is a message-passing neural network (GNN) for inverse folding: given a protein backbone structure (3D coordinates), it designs amino acid sequences predicted to fold into that structure. This is the inverse of the protein folding problem (sequence to structure).

The key innovation of ProteinMPNN (Dauparas et al., Science 2022) over prior inverse folding methods is a structured noise injection during autoregressive decoding that prevents the model from copying the native sequence from spatial neighbors already decoded. This, combined with an encoder-decoder GNN architecture operating on k-nearest-neighbor graphs of backbone atoms, achieves dramatically higher experimental success rates than previous methods like Rosetta fixed-backbone design.

LigandMPNN extends ProteinMPNN to be aware of non-protein atoms --- ligands, nucleic acids, metals, water molecules, and non-standard residues --- by incorporating atomic context from HETATM records in the PDB input. Additional specialized variants handle membrane proteins through global or per-residue transmembrane labels.

HyperMPNN is a ProteinMPNN variant retrained on protein structures from hyperthermophilic organisms to design sequences with improved thermostability. It uses the same ProteinMPNN architecture but with different checkpoint weights.

Parameters & Layers

Component Details
Architecture Message-passing GNN (encoder-decoder)
Node features 128 dimensions
Edge features 128 dimensions
Hidden dimensions 128
Encoder layers 3
Decoder layers 3
k-nearest neighbors Checkpoint-dependent (stored in checkpoint)
Atom context (LigandMPNN) Checkpoint-dependent (atom_context_num from checkpoint)
Atom context (other variants) 1

Side-Chain Packer (auxiliary model):

Component Details
Architecture Packer GNN
Node/Edge features 128 dimensions
Positional embeddings 16
Chain embeddings 16
RBF features 16
Encoder/Decoder layers 3 each
Atom context 16
Number of mixture components 3
Top-k neighbors 32

Checkpoint Variants

Variant Checkpoint Description
protein proteinmpnn_v_48_020.pt Standard ProteinMPNN for protein-only design
ligand ligandmpnn_v_32_010_25.pt Ligand-aware design (handles HETATM atoms)
soluble solublempnn_v_48_020.pt Optimized for soluble proteins
global_label_membrane global_label_membrane_mpnn_v_48_020.pt Membrane protein design with global label
per_residue_label_membrane per_residue_label_membrane_mpnn_v_48_020.pt Membrane design with per-residue labels
hyper v48_020_epoch300_hyper.pt HyperMPNN retrained variant (uses ProteinMPNN architecture)
side_chain ligandmpnn_sc_v_32_002_16.pt Side-chain packing model (loaded alongside all variants)

Training Data

Property Details
Dataset Protein Data Bank (PDB)
Filtering Clustered by structure similarity; high-resolution structures
Composition Protein backbone structures with associated sequences
Additional (LigandMPNN) Structures with bound ligands, nucleic acids, metals
Temporal cutoff Pre-2022 PDB structures

The model was trained to predict native sequences from backbone coordinates, learning the relationship between local structural environments and amino acid identity.

Loss Function & Objective

The model is trained with cross-entropy loss on native sequence recovery --- predicting the identity of each residue given its structural context. The autoregressive decoder generates one residue at a time, conditioned on the backbone structure (from the encoder) and previously generated residues. Structured random noise is added to the decoding order to prevent the model from simply copying neighbors.

Tokenization / Input Processing

  • Input: PDB-format structure files containing backbone atom coordinates (N, CA, C, O)
  • Graph construction: k-nearest-neighbor graph based on CA-CA distances
  • Node features: Local coordinate frames derived from backbone geometry
  • Edge features: Relative position and orientation between residue pairs
  • LigandMPNN additional: Non-protein atom coordinates and types from HETATM records
  • Membrane variants: Per-residue or global transmembrane labels (buried/interface/soluble)
  • Maximum sequence length: 1024 residues (from MPNNParams.max_sequence_len)

Performance & Benchmarks

Published Benchmarks

From Dauparas et al. (Science, 2022):

Method Sequence Recovery (%) Experimental Success Rate
ProteinMPNN ~52% ~70-100% of designs express and fold
Rosetta (fixed backbone) ~33% ~15-30%
StructGNN ~40% Not tested experimentally

Key result: ProteinMPNN-designed proteins had substantially higher experimental success rates across a diverse set of de novo protein structures, with many designs confirmed by X-ray crystallography to match intended structures with sub-angstrom accuracy.

Comparison to Alternatives

Model Approach Strengths When to Prefer
ProteinMPNN GNN, autoregressive Fast, high success rate, well-validated General protein design
LigandMPNN GNN with atomic context Handles ligands, metals, nucleic acids Protein-ligand complexes, enzyme design
ESM-IF Transformer, inverse folding Leverages ESM pretraining When ESM embeddings are also needed
ProteinSolver GNN Earlier method Generally prefer MPNN

Strengths & Limitations

Pros

  • Extremely well-validated experimentally --- many thousands of designs confirmed in the lab
  • Fast inference: runs on CPU, no GPU required
  • Supports diverse design scenarios: fixed residues, redesigned residues, symmetry constraints, homo-oligomer design
  • LigandMPNN variant handles complex molecular environments (ligands, metals, DNA/RNA)
  • Membrane-aware variants for transmembrane protein design
  • Side-chain packing capability for complete all-atom models
  • Stochastic sampling with temperature control enables diversity

Cons

  • Designs based on fixed backbone --- does not remodel backbone geometry
  • Sequence recovery (~52%) means many positions differ from native; not all designs will fold
  • No explicit modeling of long-range evolutionary constraints (unlike MSA-based methods)
  • Side-chain packing is approximate; may benefit from downstream refinement (e.g., Rosetta relax)
  • Maximum sequence length of 1024 residues

Known Failure Modes

  • Very small proteins (<30 residues) may have insufficient structural context for reliable design
  • Highly flexible or disordered regions produce unreliable designs (model assumes fixed backbone)
  • Unusual ligand types not represented in training data may not be properly handled by LigandMPNN
  • Homo-oligomer mode assumes symmetric chains --- asymmetric complexes need manual residue specification

Implementation Details

Inference Pipeline

Request
  |-- 1. Validate PDB input and parameters against variant-specific schema
  |-- 2. Write PDB to temporary file (/tmp_pdbs/)
  |-- 3. Parse PDB: extract backbone, chain letters, residue indices, ligand atoms
  |-- 4. Build k-NN graph and featurize (encode structural features)
  |-- 5. Apply constraints: fixed residues, redesigned residues, chain masks, symmetry
  |-- 6. Apply biases: per-AA bias, per-residue bias, omit AAs
  |-- 7. Autoregressive sampling (batch_size sequences x number_of_batches)
  |     |-- Random decoding order with structured noise
  |     |-- Temperature-scaled softmax sampling
  |     |-- Symmetry-linked positions sampled together
  |-- 8. Score designs: overall confidence, ligand confidence, sequence recovery
  |-- 9. [Optional] Pack side chains with Packer model
  |-- 10. Write output PDB files with designed sequences
  |-- 11. Return: sequences, PDBs, confidence scores, log_probs, sampling_probs

Memory & Compute Profile

Property Value
GPU None (CPU-only inference)
Memory 3 GB
CPU 1 core
Batch size limit Up to 1000 sequences per batch
Max batches Up to 48 batches per request

The model runs entirely on CPU with no GPU requirement.

Determinism & Reproducibility

  • User-provided seed: When seed is specified in the request, all RNG sources are seeded (Python random, NumPy, PyTorch CPU, PyTorch CUDA) for reproducible results
  • Default behavior: When no seed is provided, a time-based seed (time.time_ns() % 2^32) is used, producing different designs each call
  • Model loading: torch.manual_seed(42) is set during CPU snapshot loading for consistent initialization
  • Note: Inference runs entirely on CPU, so there is no GPU/cuDNN nondeterminism; results are reproducible for a given seed, though minor numerical differences may still occur across different CPU hardware

Caching Behavior

  • Response caching is handled at the serving layer, not inside the model container
  • Cache keys are composed from request parameters including PDB content and generation parameters
  • Given the stochastic nature of sequence design, caching is most useful when a fixed seed is provided

Versions & Changelog

Version Date Changes
v1 Initial ProteinMPNN, LigandMPNN, SolubleMPNN, Membrane variants
v1 Update Added HyperMPNN variant with GitHub fallback download
v1 Update Side-chain packing support via Packer model

Biology

Molecule Coverage

Primary Molecule Type(s)

MPNN operates on protein structures (backbone coordinates in PDB format) and designs amino acid sequences predicted to fold into those structures. It handles:

  • Single-chain proteins: Monomeric globular proteins, enzymes, binding proteins
  • Multi-chain complexes: Homo-oligomers and hetero-oligomers; can design specific chains while holding others fixed
  • Protein-ligand complexes (LigandMPNN): Proteins bound to small-molecule ligands, metal ions, cofactors, nucleic acids, and non-standard residues
  • Membrane proteins: Both global-label and per-residue membrane-aware variants account for the lipid bilayer environment

The model is trained on structures from the Protein Data Bank covering all domains of life. It performs best on well-resolved structures with clear electron density. Performance degrades for:

  • Intrinsically disordered regions (no stable backbone to design against)
  • Extremely large proteins (>1024 residues, the sequence length limit)
  • Structures with significant conformational flexibility or multiple states

Cross-Applicability

Molecule Type Applicability Evidence Caveats
Antibodies High LigandMPNN paper (Dauparas et al. 2024) demonstrated atomically accurate de novo antibody design CDR loops are flexible; consider using RFdiffusion for backbone generation first
Nanobodies High Single-domain antibody design follows same principles Same CDR flexibility caveats apply
Enzymes High Widely used for enzyme design; LigandMPNN handles active-site ligands Active-site residues should typically be fixed; catalytic geometry is not explicitly optimized
Peptides Moderate Works for structured peptides (helices, beta-hairpins) Very short peptides (<20 residues) may lack sufficient structural context
Membrane proteins High Dedicated membrane-aware variants available Requires knowledge of which residues are transmembrane-buried vs interface

Biological Problems Addressed

Inverse Folding (Structure-to-Sequence Design)

The core problem: Given a desired 3D protein backbone structure, what amino acid sequences will fold into that structure? This is the inverse of the protein folding problem and is fundamental to computational protein design.

Why it matters: Designing proteins with specific structures enables: - Creating novel proteins with desired functions (enzymes, binders, scaffolds) - Optimizing existing proteins for improved stability, solubility, or expression - Validating computationally generated backbone structures (e.g., from RFdiffusion or Chroma)

Traditional approaches: Rosetta energy-function-based fixed-backbone design, which is slower and achieves lower experimental success rates (~15-30% vs ~70-100% for ProteinMPNN).

How MPNN addresses it: The model encodes the backbone structure as a graph and autoregressively samples sequences residue-by-residue, conditioned on the local structural environment. Temperature controls the diversity-confidence tradeoff. Multiple sequences can be sampled and ranked by confidence scores.

Output interpretation: Each designed sequence comes with: - Overall confidence (exp of negative cross-entropy loss): higher values indicate the model is more confident the sequence is compatible with the structure - Sequence recovery: fraction of positions matching the native sequence (if applicable) - Per-residue log probabilities: identify which positions the model is most/least confident about

De Novo Protein Design

The problem: Creating entirely new proteins that do not exist in nature but fold into specified structures and perform desired functions.

Why it matters: De novo design enables creation of proteins for therapeutic, industrial, and research applications that evolution has not explored.

Typical pipeline: 1. Backbone generation: Use RFdiffusion, Chroma, or other generative models to create novel backbone structures 2. Sequence design: Use ProteinMPNN/LigandMPNN to design sequences for those backbones 3. Validation: Use AlphaFold2 or ESMFold to predict whether the designed sequences fold to the intended structure (self-consistency check) 4. Experimental testing: Express, purify, and characterize designed proteins

MPNN is the standard tool for step 2 in this pipeline, used extensively by the David Baker lab and the broader protein design community.

Enzyme Engineering

The problem: Designing or redesigning enzyme active sites to catalyze desired reactions, improve catalytic efficiency, or alter substrate specificity.

How MPNN addresses it: LigandMPNN can design sequences in the context of bound substrates, transition-state analogs, cofactors, and metal ions. Key workflow: 1. Provide structure with substrate/ligand bound in the active site 2. Fix catalytic residues that must be preserved 3. Let LigandMPNN redesign surrounding residues to optimize packing around the ligand 4. Sample multiple designs and filter by confidence scores

Caveats: MPNN optimizes for structural compatibility, not directly for catalytic activity. Transition-state stabilization and dynamic effects require additional computational or experimental screening.

Protein Stabilization and Solubility Optimization

The problem: Many proteins of interest are marginally stable or poorly soluble, limiting their practical utility.

How MPNN addresses it: The SolubleMPNN variant is specifically trained to bias designs toward soluble proteins. By redesigning surface residues while fixing the protein core, MPNN can suggest mutations that improve solubility and expression without disrupting the fold. The fixed_residues parameter enables selective redesign of only surface positions.

Membrane Protein Design

The problem: Designing proteins that function within lipid bilayer membranes, where the hydrophobic environment imposes distinct sequence constraints compared to soluble proteins.

How MPNN addresses it: Two specialized variants handle membrane context: - Global membrane MPNN: Applies a single label (membrane or soluble) to the entire protein, biasing the amino acid distribution accordingly - Per-residue membrane MPNN: Allows specifying which residues are transmembrane-buried vs. at the lipid-water interface, enabling fine-grained control over the hydrophobicity profile

Applied Use Cases

De Novo Protein Design with RFdiffusion

Source: Watson et al. "De novo design of protein structure and function with RFdiffusion." Nature (2023). DOI

ProteinMPNN is the standard sequence design step in the RFdiffusion pipeline. After RFdiffusion generates novel backbone structures, ProteinMPNN designs 8-48 sequences per backbone, which are then filtered using AlphaFold2 self-consistency. This pipeline has produced hundreds of experimentally validated de novo proteins, including binders, symmetric assemblies, and enzyme scaffolds.

Atomically Accurate Antibody Design

Source: Dauparas et al. "Atomically accurate de novo design of single-domain antibodies." bioRxiv (2024). DOI

The LigandMPNN paper demonstrated design of single-domain antibodies (nanobodies) with atomic accuracy, confirmed by X-ray crystallography. The model was used to design CDR loops and framework regions simultaneously, accounting for antigen contacts. This establishes LigandMPNN as a tool for therapeutic antibody design pipelines.

Broad Experimental Validation

Source: Dauparas et al. "Robust deep learning-based protein sequence design using ProteinMPNN." Science (2022). DOI

The original paper tested ProteinMPNN across 8 diverse protein topologies (including beta-barrels, TIM barrels, and NTF2-like folds). 70-100% of designs expressed as soluble monomers, and X-ray structures confirmed sub-angstrom agreement with design targets. This level of experimental validation is unmatched by prior sequence design methods.

Protein Expression, Stability, and Function Improvement

Source: (2024). "Improving Protein Expression, Stability, and Function with ProteinMPNN." Journal of the American Chemical Society. DOI: 10.1021/jacs.3c10941

ProteinMPNN was applied to redesign myoglobin and TEV protease, achieving improved expression levels, increased melting temperature (Tm), and enhanced catalytic activity. This study demonstrates ProteinMPNN's practical utility beyond de novo design -- as a tool for optimizing existing proteins for industrial and therapeutic applications.

Enzyme Stabilization for Directed Evolution

Source: (2025). "Computational Stabilization of a Non-Heme Iron Enzyme Enables Efficient Evolution of New Function." Angewandte Chemie International Edition. DOI: 10.1002/anie.202414705

ProteinMPNN was used to stabilize Fe(II)/alpha-ketoglutarate-dependent enzymes as a prerequisite for directed evolution, yielding an 80-fold activity increase for a new catalytic function. This work establishes a powerful workflow: use ProteinMPNN to create a thermostable scaffold, then apply directed evolution to evolve new activity on the stabilized background.

Property-Guided Sequence Generation

Source: (2025). "ProteinGuide: On-the-fly property guidance for protein sequence generative models." arXiv:2505.04823. arXiv

ProteinGuide demonstrated guiding ProteinMPNN generation conditioned on stability, enzyme class, and fold properties without retraining the model. This approach enables multi-objective protein design where ProteinMPNN's inverse folding is steered toward sequences satisfying additional property constraints beyond structural compatibility.

Predecessor Models

  • Rosetta fixed-backbone design: The dominant prior method for inverse folding, using physics-based energy functions. ProteinMPNN largely supersedes it for sequence design due to higher success rates and faster speed.
  • StructGNN / GraphTrans: Earlier GNN-based inverse folding methods that ProteinMPNN outperforms.

Complementary Models

  • RFdiffusion / Chroma / FrameDiff: Backbone generation models --- use MPNN downstream to design sequences for generated backbones
  • ESMFold / Chai-1 / AlphaFold2: Structure prediction models --- use as self-consistency validation (does the designed sequence fold back to the intended structure?)
  • ESM2: Protein language model --- embeddings can be used to filter/rank MPNN designs by evolutionary plausibility

Alternative Models

Alternative Advantage over MPNN Disadvantage
ESM-IF (Inverse Folding) Leverages ESM pretraining; handles partial structures Less experimentally validated; slower
Rosetta fixed-backbone Physics-based; explicit energy terms Much slower; lower success rates
ProteinSolver Graph-based Earlier method with less validation

Biological Background

Protein design is the challenge of creating amino acid sequences that fold into specific three-dimensional structures and perform desired functions. Proteins are linear chains of 20 standard amino acids that fold into complex 3D structures determined by their sequence. The relationship between sequence and structure is encoded by evolution and physics: hydrophobic residues pack into the protein core, polar residues face the solvent, and specific geometric arrangements enable catalysis and molecular recognition.

Inverse folding specifically refers to the problem of finding sequences compatible with a given backbone structure. This is distinct from (and complementary to) protein folding, which predicts structure from sequence. While many sequences can fold into the same backbone (the sequence-structure mapping is many-to-one), designing sequences that reliably fold into a target structure requires understanding the statistical patterns that evolution has encoded across millions of protein structures.

Key terminology: - Backbone: The repeating N-CA-C-O atoms in a protein chain; defines the overall fold - Side chains: The variable R-groups attached to each CA atom; determine amino acid identity - Sequence recovery: Fraction of designed positions matching the native/wild-type sequence - Self-consistency: When a structure prediction model (AlphaFold2) predicts the designed sequence folds to the target structure - Fixed residues: Positions held constant during design (e.g., catalytic residues) - Temperature: Sampling parameter controlling diversity; lower = more conservative (closer to most-likely), higher = more diverse


Sources & license

License: MIT (text)

Papers

  • Robust deep learning-based protein sequence design using ProteinMPNN — Science, 2022 · DOI
  • Atomically accurate de novo design of single-domain antibodies — bioRxiv preprint, 2024 · DOI

Source repositories

Cite

@article{dauparas2022robust,
  title={Robust deep learning-based protein sequence design using ProteinMPNN},
  author={Dauparas, Justas and Anishchenko, Ivan and Bennett, Nathaniel and Bai, Hua and Ragotte, Robert J and Milles, Lukas F and Wicky, Basile IM and Courbet, Alexis and de Haas, Rob J and Bethel, Neville and others},
  journal={Science},
  volume={378},
  number={6615},
  pages={49--56},
  year={2022},
  publisher={American Association for the Advancement of Science},
  doi={10.1126/science.add2187}
}