--- tags: - biology - protein-design - inverse-folding license: agpl-3.0 library_name: ofoldx pipeline_tag: other --- # ProteinMPNN Pre-trained model for protein sequence design and scoring conditioned on a fixed backbone. ## Disclaimer This is an UNOFFICIAL implementation of the [Robust deep learning-based protein sequence design using ProteinMPNN](https://doi.org/10.1126/science.add2187) by Justas Dauparas, et al. The OFFICIAL repository of ProteinMPNN is at [dauparas/ProteinMPNN](https://github.com/dauparas/ProteinMPNN). **The team releasing ProteinMPNN did not write this model card for this model so this model card has been written by the OFoldX team.** ## Model Details ProteinMPNN is an autoregressive inverse-folding model that designs an amino-acid sequence for a fixed protein backbone. It represents residues as a spatial nearest-neighbor graph, encodes backbone geometry with message-passing blocks, and decodes residues in a sampled causal order. Generation supports fixed positions, tied identities, position-specific amino-acid constraints, and sequence profiles. Please refer to the [Training Details](#training-details) section for more information on the training process. ### Variants - **[oteam/proteinmpnn](https://huggingface.co/oteam/proteinmpnn)**: General-purpose ProteinMPNN using N, CA, C, and O backbone atoms. - **[oteam/solublempnn](https://huggingface.co/oteam/solublempnn)**: ProteinMPNN trained for soluble-protein sequence design. - **[oteam/proteinmpnn-ca-only](https://huggingface.co/oteam/proteinmpnn-ca-only)**: Reduced model for backbones represented only by CA atoms. ### Model Specification | Variant | Backbone Atoms | Hidden Size | Encoder Blocks | Decoder Blocks | Neighbors | Num Parameters (M) | | -------- | -------------- | ----------- | -------------- | -------------- | --------- | ------------------ | | Standard | N, CA, C, O | 128 | 3 | 3 | 48 | 1.660 | | Soluble | N, CA, C, O | 128 | 3 | 3 | 48 | 1.660 | | CA-only | CA | 128 | 3 | 3 | 48 | 1.629 | ### Links - **Checkpoint**: [`epoch_last.pt`](https://github.com/dauparas/ProteinMPNN/blob/8907e6671bfbfc92303b5f79c4b5e6ce47cdef57/training/exp_020/model_weights/epoch_last.pt) (official training example) - **Upstream license**: [LICENSE](LICENSE) - **Upstream source revision**: `8907e6671bfbfc92303b5f79c4b5e6ce47cdef57` - **Code**: [ofoldx.models.proteinmpnn](https://github.com/OTeam-AI4S/OFoldX/tree/main/ofoldx/models/proteinmpnn) - **Paper**: [Robust deep learning-based protein sequence design using ProteinMPNN](https://doi.org/10.1126/science.add2187) - **Developed by**: Justas Dauparas, Ivan Anishchenko, Nathaniel Bennett, Hua Bai, Robert J. Ragotte, Lukas F. Milles, Basile I. M. Wicky, Alexis Courbet, Rob J. de Haas, Neil Bethel, Philip J. Y. Leung, Timothy F. Huddy, Sam Pellock, Doug Tischer, Frederick Chan, Brian Koepnick, Hannah Nguyen, Alex Kang, Banumathi Sankaran, Asim K. Bera, Neil P. King, and David Baker - **Model type**: Autoregressive message-passing neural network for fixed-backbone protein sequence design - **Original Repository**: [dauparas/ProteinMPNN](https://github.com/dauparas/ProteinMPNN) ## Usage The model file depends on the [`ofoldx`](https://ofoldx.valhalla.technology/) library. You can install it using pip: ```bash pip install ofoldx ``` ### Direct Use #### Sequence Design You can use this model directly with a pipeline for fixed-backbone protein sequence design: ```python import ofoldx from ofoldx.io import read_structure structure, _ = read_structure("backbone.cif") pipeline = ofoldx.pipeline("design", model="oteam/proteinmpnn-training-example") result = pipeline(structure) ``` Each candidate contains the designed molecular target and named sequence scores. #### Sequence Scoring You can use this model directly with a pipeline for fixed-backbone protein sequence scoring: ```python import ofoldx from ofoldx.io import read_structure structure, _ = read_structure("backbone.cif") pipeline = ofoldx.pipeline("score", model="oteam/proteinmpnn-training-example") result = pipeline(structure, num_decoding_orders=8, seed=7) ``` The result contains designed and global sequence negative log likelihood (NLL) in nats per residue. ### Downstream Use #### Design and Packing Combine a designer and an independently loaded [MPNN Packer](https://github.com/OTeam-AI4S/OFoldX/blob/main/ofoldx/models/mpnn_packer/README.md) with [`ProteinMpnnDesignAndPackPipeline`][ofoldx.models.proteinmpnn.ProteinMpnnDesignAndPackPipeline] to generate side-chain coordinates after sequence design. Both operations use the coordinate-observation policy selected during preparation. See the [pipeline guide](https://github.com/OTeam-AI4S/OFoldX/blob/main/ofoldx/pipelines/README.md) for staged execution with `prepare`, `forward`, and `postprocess`. ## Training Details ProteinMPNN is trained to recover amino-acid identities from protein backbone geometry. ### Training Data ProteinMPNN was trained on fixed protein backbones paired with native amino-acid sequences. The soluble variant focuses on soluble proteins, while the CA-only variant uses reduced backbone geometry. ### Training Procedure ProteinMPNN uses autoregressive sequence recovery with coordinate perturbations for robustness. OFoldX exposes differentiable `encode` and `forward` operations and the masked, label-smoothed [`MpnnSequenceLoss`][ofoldx.modules.mpnn.MpnnSequenceLoss] for training and fine-tuning. Dataset construction, parsing, clustering, and complete upstream training orchestration remain the training application's responsibility. ## Citation ```bibtex @article{dauparas2022robust, author = {Dauparas, Justas and Anishchenko, Ivan and Bennett, Nathaniel and others}, title = {Robust deep learning-based protein sequence design using ProteinMPNN}, journal = {Science}, volume = {378}, number = {6615}, pages = {49--56}, year = {2022}, doi = {10.1126/science.add2187} } ``` > [!NOTE] > The artifacts distributed in this repository are part of the OFoldX project. > If OFoldX supports your research, please cite the OFoldX project as follows: ```bibtex @software{chen2026ofoldx, author = {Chen, Zhiyuan}, title = {OFoldX}, year = {2026}, url = {https://github.com/OTeam-AI4S/OFoldX}, } ``` ## Contact Please use GitHub issues of [OFoldX](https://github.com/OTeam-AI4S/OFoldX/issues) for any questions or comments on the model implementation or model card. Please contact the authors of the [ProteinMPNN paper](https://doi.org/10.1126/science.add2187) for questions or comments on the paper/model. ## License The model weights, implementation, configuration, and documentation distributed by OFoldX are licensed under the [GNU Affero General Public License](license.md). For additional terms and clarifications, please refer to our [License FAQ](license-faq.md). ```spdx SPDX-License-Identifier: AGPL-3.0-or-later ``` [ofoldx.models.proteinmpnn.ProteinMpnnDesignAndPackPipeline]: https://ofoldx.valhalla.technology/models/proteinmpnn/#ofoldx.models.proteinmpnn.ProteinMpnnDesignAndPackPipeline [ofoldx.modules.mpnn.MpnnSequenceLoss]: https://ofoldx.valhalla.technology/modules/mpnn/#ofoldx.modules.mpnn.MpnnSequenceLoss