Align NA-MPNN model card with OFoldX
Browse files
README.md
CHANGED
|
@@ -16,21 +16,24 @@ Pre-trained model for joint protein, DNA, and RNA sequence design and scoring fr
|
|
| 16 |
|
| 17 |
## Disclaimer
|
| 18 |
|
| 19 |
-
This is an
|
| 20 |
-
|
| 21 |
-
|
|
|
|
|
|
|
| 22 |
|
| 23 |
## Model Details
|
| 24 |
|
| 25 |
-
NA-MPNN extends fixed-backbone inverse folding to protein, DNA, RNA, and mixed
|
| 26 |
-
polymer
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
|
| 31 |
### Variants
|
| 32 |
|
| 33 |
-
- **[oteam/nampnn](https://huggingface.co/oteam/nampnn)**: Sequence-design model for protein and nucleic-acid
|
|
|
|
| 34 |
- **[oteam/nampnn-specificity](https://huggingface.co/oteam/nampnn-specificity)**: Protein-DNA specificity model.
|
| 35 |
|
| 36 |
### Model Specification
|
|
@@ -45,93 +48,92 @@ scoring, and protein-DNA specificity prediction.
|
|
| 45 |
- **Upstream license**: [MIT and BSD-3-Clause notices](LICENSE)
|
| 46 |
- **Upstream source revision**: `aafa32c87b65046a02db152f6e6235a7078e5fef`
|
| 47 |
- **Code**: [ofoldx.models.nampnn](https://github.com/OTeam-AI4S/OFoldX/tree/main/ofoldx/models/nampnn)
|
| 48 |
-
- **Paper**:
|
| 49 |
-
-
|
|
|
|
|
|
|
| 50 |
- **Model type**: Autoregressive message-passing neural network for protein and nucleic-acid sequence design
|
| 51 |
- **Original Repository**: [baker-laboratory/NA-MPNN](https://github.com/baker-laboratory/NA-MPNN)
|
| 52 |
|
| 53 |
## Usage
|
| 54 |
|
| 55 |
-
The model depends on the [`ofoldx`](https://
|
| 56 |
-
library. Install it with pip:
|
| 57 |
|
| 58 |
```bash
|
| 59 |
pip install ofoldx
|
| 60 |
```
|
| 61 |
|
| 62 |
-
###
|
| 63 |
|
| 64 |
-
|
|
|
|
|
|
|
| 65 |
|
| 66 |
```python
|
| 67 |
import ofoldx
|
| 68 |
from ofoldx.io import read_structure
|
| 69 |
|
| 70 |
-
structure,
|
| 71 |
pipeline = ofoldx.pipeline("design", model="oteam/nampnn")
|
| 72 |
-
|
| 73 |
```
|
| 74 |
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
`-inf`; a residue whose class is outside that vocabulary is read as its type's
|
| 78 |
-
unknown (`X`, `DNA_X`, `RNA_X`), as upstream. With shared nucleic tokens (the
|
| 79 |
-
released default) an RNA residue is read and sampled as the DNA class of its
|
| 80 |
-
base and designed as the RNA residue. `global_omit_tokens` takes canonical class
|
| 81 |
-
names (`"C"`, `"DNA_T"`); under shared nucleic tokens an RNA base is omitted by
|
| 82 |
-
its DNA class (`"DNA_T"` omits U from RNA rows and T from DNA rows) and an
|
| 83 |
-
`RNA_` name is refused.
|
| 84 |
-
Each candidate's final target is built by the shared design producer, and
|
| 85 |
-
`output.records` holds its design record.
|
| 86 |
|
| 87 |
-
|
|
|
|
|
|
|
| 88 |
|
| 89 |
-
|
| 90 |
-
as its explicit stages:
|
| 91 |
|
| 92 |
-
|
| 93 |
-
prepared = pipeline.prepare(structure)
|
| 94 |
-
raw = pipeline.forward(prepared.input, seed=7)
|
| 95 |
-
result = pipeline.postprocess(prepared, raw)
|
| 96 |
-
result = pipeline(structure, seed=7)
|
| 97 |
-
```
|
| 98 |
-
|
| 99 |
-
Scoring has its own task Pipeline and reuses the same converted weights:
|
| 100 |
|
| 101 |
```python
|
| 102 |
-
|
| 103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
```
|
| 105 |
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
the
|
| 109 |
|
| 110 |
## Training Details
|
| 111 |
|
|
|
|
|
|
|
| 112 |
### Training Data
|
| 113 |
|
| 114 |
-
NA-MPNN was trained on protein, DNA, RNA, and mixed-polymer structures. The
|
| 115 |
-
|
| 116 |
-
specificity, respectively.
|
| 117 |
|
| 118 |
### Training Procedure
|
| 119 |
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
`
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
masking and reduction remain caller-owned. This covers masked polymer
|
| 126 |
-
sequence recovery; it does not reproduce the upstream specificity-training
|
| 127 |
-
dataset or its complete training orchestration.
|
| 128 |
|
| 129 |
## Citation
|
| 130 |
|
| 131 |
-
|
| 132 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
|
| 134 |
-
|
|
|
|
|
|
|
| 135 |
|
| 136 |
```bibtex
|
| 137 |
@software{chen2026ofoldx,
|
|
@@ -144,8 +146,9 @@ If OFoldX supports your research, also cite the OFoldX software:
|
|
| 144 |
|
| 145 |
## Contact
|
| 146 |
|
| 147 |
-
Please use
|
| 148 |
-
|
|
|
|
| 149 |
|
| 150 |
## License
|
| 151 |
|
|
@@ -158,3 +161,4 @@ For additional terms and clarifications, please refer to our [License FAQ](licen
|
|
| 158 |
SPDX-License-Identifier: AGPL-3.0-or-later
|
| 159 |
```
|
| 160 |
|
|
|
|
|
|
| 16 |
|
| 17 |
## Disclaimer
|
| 18 |
|
| 19 |
+
This is an UNOFFICIAL implementation of the [RNA sequence design and protein-DNA specificity prediction with NA-MPNN](https://www.biorxiv.org/content/10.1101/2025.10.03.679414v2) by Andrew Kubaney, et al.
|
| 20 |
+
|
| 21 |
+
The OFFICIAL repository of NA-MPNN is at [baker-laboratory/NA-MPNN](https://github.com/baker-laboratory/NA-MPNN).
|
| 22 |
+
|
| 23 |
+
**The team releasing NA-MPNN did not write this model card for this model so this model card has been written by the OFoldX team.**
|
| 24 |
|
| 25 |
## Model Details
|
| 26 |
|
| 27 |
+
NA-MPNN extends fixed-backbone inverse folding to protein, DNA, RNA, and mixed-polymer assemblies. A geometric
|
| 28 |
+
message-passing graph represents polymer residues, and generation restricts identities to the residue's polymer type.
|
| 29 |
+
Separate checkpoints support joint sequence design and protein-DNA specificity prediction.
|
| 30 |
+
|
| 31 |
+
Please refer to the [Training Details](#training-details) section for more information on the training process.
|
| 32 |
|
| 33 |
### Variants
|
| 34 |
|
| 35 |
+
- **[oteam/nampnn](https://huggingface.co/oteam/nampnn)**: Sequence-design model for protein and nucleic-acid
|
| 36 |
+
assemblies.
|
| 37 |
- **[oteam/nampnn-specificity](https://huggingface.co/oteam/nampnn-specificity)**: Protein-DNA specificity model.
|
| 38 |
|
| 39 |
### Model Specification
|
|
|
|
| 48 |
- **Upstream license**: [MIT and BSD-3-Clause notices](LICENSE)
|
| 49 |
- **Upstream source revision**: `aafa32c87b65046a02db152f6e6235a7078e5fef`
|
| 50 |
- **Code**: [ofoldx.models.nampnn](https://github.com/OTeam-AI4S/OFoldX/tree/main/ofoldx/models/nampnn)
|
| 51 |
+
- **Paper**:
|
| 52 |
+
[RNA sequence design and protein-DNA specificity prediction with NA-MPNN](https://www.biorxiv.org/content/10.1101/2025.10.03.679414v2)
|
| 53 |
+
- **Developed by**: Andrew Kubaney, Andrew Favor, Lilian McHugh, Raktim Mitra, Robert Pecoraro, Justas Dauparas,
|
| 54 |
+
Cameron Glasscock, and David Baker
|
| 55 |
- **Model type**: Autoregressive message-passing neural network for protein and nucleic-acid sequence design
|
| 56 |
- **Original Repository**: [baker-laboratory/NA-MPNN](https://github.com/baker-laboratory/NA-MPNN)
|
| 57 |
|
| 58 |
## Usage
|
| 59 |
|
| 60 |
+
The model file depends on the [`ofoldx`](https://ofoldx.valhalla.technology/) library. You can install it using pip:
|
|
|
|
| 61 |
|
| 62 |
```bash
|
| 63 |
pip install ofoldx
|
| 64 |
```
|
| 65 |
|
| 66 |
+
### Direct Use
|
| 67 |
|
| 68 |
+
#### Sequence Design
|
| 69 |
+
|
| 70 |
+
You can use this model directly with a pipeline for joint protein and nucleic-acid sequence design:
|
| 71 |
|
| 72 |
```python
|
| 73 |
import ofoldx
|
| 74 |
from ofoldx.io import read_structure
|
| 75 |
|
| 76 |
+
structure, _ = read_structure("complex.cif")
|
| 77 |
pipeline = ofoldx.pipeline("design", model="oteam/nampnn")
|
| 78 |
+
result = pipeline(structure)
|
| 79 |
```
|
| 80 |
|
| 81 |
+
Each candidate contains the designed molecular target and named sequence scores. Shared nucleic tokens are the released
|
| 82 |
+
default: RNA bases use DNA output classes during prediction and are reconstructed as RNA residues.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
|
| 84 |
+
> [!NOTE]
|
| 85 |
+
> With shared nucleic tokens, `global_omit_tokens` uses DNA class names for both DNA and RNA: `"DNA_T"` excludes T and U,
|
| 86 |
+
> respectively. `RNA_` names are rejected in this mode.
|
| 87 |
|
| 88 |
+
#### Sequence Scoring
|
|
|
|
| 89 |
|
| 90 |
+
You can use this model directly with a pipeline for sequence scoring on a mixed-polymer backbone:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
|
| 92 |
```python
|
| 93 |
+
import ofoldx
|
| 94 |
+
from ofoldx.io import read_structure
|
| 95 |
+
|
| 96 |
+
structure, _ = read_structure("complex.cif")
|
| 97 |
+
pipeline = ofoldx.pipeline("score", model="oteam/nampnn")
|
| 98 |
+
result = pipeline(structure, num_decoding_orders=8, seed=7)
|
| 99 |
```
|
| 100 |
|
| 101 |
+
The result contains designed and global sequence NLL in nats per residue.
|
| 102 |
+
|
| 103 |
+
See the [pipeline guide](https://github.com/OTeam-AI4S/OFoldX/blob/main/ofoldx/pipelines/README.md) for staged execution with `prepare`, `forward`, and `postprocess`.
|
| 104 |
|
| 105 |
## Training Details
|
| 106 |
|
| 107 |
+
NA-MPNN is trained for structure-conditioned recovery of protein and nucleic-acid sequences.
|
| 108 |
+
|
| 109 |
### Training Data
|
| 110 |
|
| 111 |
+
NA-MPNN was trained on protein, DNA, RNA, and mixed-polymer structures. The design and specificity variants target
|
| 112 |
+
sequence recovery and protein-DNA specificity, respectively.
|
|
|
|
| 113 |
|
| 114 |
### Training Procedure
|
| 115 |
|
| 116 |
+
NA-MPNN uses polymer-conditioned sequence recovery, with coordinate noise and optional protein-first decoding.
|
| 117 |
+
|
| 118 |
+
OFoldX exposes differentiable `forward` and the polymer-specific [`smoothed_loss`][ofoldx.models.nampnn.smoothed_loss]
|
| 119 |
+
for masked sequence recovery. Dataset construction, the upstream specificity-training dataset, and complete training
|
| 120 |
+
orchestration remain the training application's responsibility.
|
|
|
|
|
|
|
|
|
|
| 121 |
|
| 122 |
## Citation
|
| 123 |
|
| 124 |
+
```bibtex
|
| 125 |
+
@article{kubaney2025nampnn,
|
| 126 |
+
author = {Kubaney, Andrew and Favor, Andrew and McHugh, Lilian and Mitra, Raktim and Pecoraro, Robert and Dauparas, Justas and Glasscock, Cameron and Baker, David},
|
| 127 |
+
title = {RNA sequence design and protein-DNA specificity prediction with NA-MPNN},
|
| 128 |
+
journal = {bioRxiv},
|
| 129 |
+
year = {2025},
|
| 130 |
+
doi = {10.1101/2025.10.03.679414},
|
| 131 |
+
}
|
| 132 |
+
```
|
| 133 |
|
| 134 |
+
> [!NOTE]
|
| 135 |
+
> The artifacts distributed in this repository are part of the OFoldX project.
|
| 136 |
+
> If OFoldX supports your research, please cite the OFoldX project as follows:
|
| 137 |
|
| 138 |
```bibtex
|
| 139 |
@software{chen2026ofoldx,
|
|
|
|
| 146 |
|
| 147 |
## Contact
|
| 148 |
|
| 149 |
+
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.
|
| 150 |
+
|
| 151 |
+
Please contact the authors of the [NA-MPNN paper](https://www.biorxiv.org/content/10.1101/2025.10.03.679414v2) for questions or comments on the paper/model.
|
| 152 |
|
| 153 |
## License
|
| 154 |
|
|
|
|
| 161 |
SPDX-License-Identifier: AGPL-3.0-or-later
|
| 162 |
```
|
| 163 |
|
| 164 |
+
[ofoldx.models.nampnn.smoothed_loss]: https://ofoldx.valhalla.technology/models/nampnn/#ofoldx.models.nampnn.smoothed_loss
|