LigandMPNN
This repository contains oteam/ligandmpnn, converted from ligandmpnn_v_32_010_25.pt.
LigandMPNN designs protein sequences on a fixed backbone using nearby non-protein atoms as structural context.
Disclaimer
This is an unofficial OFoldX implementation of LigandMPNN. The upstream authors did not write, review, or endorse this implementation or model card.
Model Details
LigandMPNN is an autoregressive inverse-folding model for protein sequence design with explicit atomic context. In addition to the protein backbone, it embeds nearby ligand, nucleic-acid, metal, and other non-protein atoms, allowing sequence generation to respond to the local chemical environment around an interface or binding site.
Variants
ligandmpnn_v_32_005_25.pt: trained with coordinate-noise level 0.05.ligandmpnn_v_32_010_25.pt: trained with coordinate-noise level 0.10.ligandmpnn_v_32_020_25.pt: trained with coordinate-noise level 0.20.ligandmpnn_v_32_030_25.pt: trained with coordinate-noise level 0.30.
Released weight variants differ in the coordinate perturbations used during
training but use the same architecture and public operations. The Pipeline
provides sequence design and four probability routes: sequence-conditioned and
sequence-free autoregressive evaluation, target-last conditional evaluation, and
target-first unconditional evaluation. Side-chain packing is provided separately
by MPNN Packer, with
LigandMpnnDesignAndPackPipeline as the explicit two-model composition.
Its prepare stage returns a LigandMpnnDesignAndPackPipelineInput containing
the original structure, design input and observation policy. A
filter_by_occupancy=False choice during preparation also applies to subsequent
packing; forward consumes that retained choice.
Model Specification
| Hidden Size | Encoder Blocks | Atom-Context Blocks | Context Blocks | Decoder Blocks | Neighbors | Context Atoms | Num Parameters (M) |
|---|---|---|---|---|---|---|---|
| 128 | 3 | 2 | 2 | 3 | 32 | 25 | 2.619 |
Links
- Code: ofoldx.models.ligandmpnn
- Paper: Atomic context-conditioned protein sequence design using LigandMPNN
- Developed by: Justas Dauparas, Gyu Rie Lee, Robert Pecoraro, Linna An, Ivan Anishchenko, Cameron Glasscock, and David Baker
- Model type: Atomic-context autoregressive message-passing neural network for protein sequence design
- Original Repository: dauparas/LigandMPNN
Usage
The model depends on the ofoldx
library. Install it with pip:
pip install ofoldx
Sequence Design
Load the concrete design Pipeline and design on a read structure:
import ofoldx
from ofoldx.io import read_structure
structure, report = read_structure("complex.cif")
pipeline = ofoldx.pipeline("design", model="oteam/ligandmpnn")
output = pipeline.design(structure)
Staged Execution and Scoring
The callable design Pipeline uses the same preparation, computation and decoding as its explicit stages:
prepared = pipeline.prepare(structure)
raw = pipeline.forward(prepared.input, seed=7)
result = pipeline.postprocess(prepared, raw)
result = pipeline(structure, seed=7)
Scoring has its own task Pipeline and reuses the same converted weights:
scorer = ofoldx.pipeline("score", model="oteam/ligandmpnn")
score = scorer(structure, num_decoding_orders=8, seed=7)
For an in-memory model, construct LigandMpnnScorePipeline with the designer's
model and processor. Its prepare, forward and postprocess stages evaluate
the structure's sequence without sampling new identities.
Training Details
Training Data
LigandMPNN was trained on protein structures with local atomic context from ligands, nucleic acids, metals, and other non-protein entities.
Training Procedure
LigandMPNN uses autoregressive sequence recovery with coordinate perturbations
for robustness. OFoldX exposes a differentiable teacher-forced
forward path and a typed criterion for training and fine-tuning on
caller-supplied structures. This does not reproduce the upstream data
curation, sampling, or training procedure; callers remain responsible for
selecting structures and for custom training behavior beyond the provided
model and typed objective.
Citation
@article{dauparas2025atomic,
author = {Dauparas, Justas and Lee, Gyu Rie and Pecoraro, Robert and others},
title = {Atomic context-conditioned protein sequence design using LigandMPNN},
journal = {Nature Methods},
year = {2025},
doi = {10.1038/s41592-025-02626-1}
}
If OFoldX supports your research, also cite the OFoldX software:
@software{chen2026ofoldx,
author = {Chen, Zhiyuan},
title = {OFoldX},
year = {2026},
url = {https://github.com/OTeam-AI4S/OFoldX},
}
Contact
Please use OFoldX GitHub issues for questions about this implementation or model card.
License
The original model parameters are distributed under the MIT license, retained in LICENSE.
The OFoldX implementation is separately licensed under AGPL-3.0-or-later; see license.md and license-faq.md.
These converted parameters use native OFoldX tensor names and the canonical vocabulary. Conversion changes the parameter representation and vocabulary axes; it does not change the upstream weight license.
Upstream source revision: 26ec57ac976ade5379920dbd43c7f97a91cf82de.