OneScience commited on
Commit
d7be1d1
·
verified ·
1 Parent(s): 3cca270

Upload folder using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +35 -10
  2. LICENSE +21 -0
  3. README.md +256 -0
  4. config/config.yaml +18 -0
  5. configuration.json +15 -0
  6. data/inputs/PDB_complexes/pdbs/3HTN.pdb +0 -0
  7. data/inputs/PDB_complexes/pdbs/4YOW.pdb +0 -0
  8. data/inputs/PDB_homooligomers/pdbs/4GYT.pdb +0 -0
  9. data/inputs/PDB_homooligomers/pdbs/6EHB.pdb +0 -0
  10. data/inputs/PDB_monomers/pdbs/5L33.pdb +0 -0
  11. data/inputs/PDB_monomers/pdbs/6MRR.pdb +0 -0
  12. data/inputs/PSSM_inputs/3HTN.npz +3 -0
  13. data/inputs/PSSM_inputs/4YOW.npz +3 -0
  14. data/pdb_2021aug02_sample/README +41 -0
  15. data/pdb_2021aug02_sample/list.csv +3 -0
  16. data/pdb_2021aug02_sample/pdb/l3/1l30.pt +3 -0
  17. data/pdb_2021aug02_sample/pdb/l3/1l30_A.pt +3 -0
  18. data/pdb_2021aug02_sample/pdb/l3/1l31.pt +3 -0
  19. data/pdb_2021aug02_sample/pdb/l3/1l31_A.pt +3 -0
  20. data/pdb_2021aug02_sample/pdb/l3/1l32.pt +3 -0
  21. data/pdb_2021aug02_sample/pdb/l3/1l32_A.pt +3 -0
  22. data/pdb_2021aug02_sample/pdb/l3/1l33.pt +3 -0
  23. data/pdb_2021aug02_sample/pdb/l3/1l33_A.pt +3 -0
  24. data/pdb_2021aug02_sample/pdb/l3/1l34.pt +3 -0
  25. data/pdb_2021aug02_sample/pdb/l3/1l34_A.pt +3 -0
  26. data/pdb_2021aug02_sample/pdb/l3/1l35.pt +3 -0
  27. data/pdb_2021aug02_sample/pdb/l3/1l35_A.pt +3 -0
  28. data/pdb_2021aug02_sample/pdb/l3/1l36.pt +3 -0
  29. data/pdb_2021aug02_sample/pdb/l3/1l36_A.pt +3 -0
  30. data/pdb_2021aug02_sample/pdb/l3/1l37.pt +3 -0
  31. data/pdb_2021aug02_sample/pdb/l3/1l37_A.pt +3 -0
  32. data/pdb_2021aug02_sample/pdb/l3/1l38.pt +3 -0
  33. data/pdb_2021aug02_sample/pdb/l3/1l38_A.pt +3 -0
  34. data/pdb_2021aug02_sample/pdb/l3/1l39.pt +3 -0
  35. data/pdb_2021aug02_sample/pdb/l3/1l39_A.pt +3 -0
  36. data/pdb_2021aug02_sample/pdb/l3/1l3a.pt +3 -0
  37. data/pdb_2021aug02_sample/pdb/l3/1l3a_A.pt +3 -0
  38. data/pdb_2021aug02_sample/pdb/l3/1l3a_B.pt +3 -0
  39. data/pdb_2021aug02_sample/pdb/l3/1l3a_C.pt +3 -0
  40. data/pdb_2021aug02_sample/pdb/l3/1l3a_D.pt +3 -0
  41. data/pdb_2021aug02_sample/pdb/l3/1l3b.pt +3 -0
  42. data/pdb_2021aug02_sample/pdb/l3/1l3b_A.pt +3 -0
  43. data/pdb_2021aug02_sample/pdb/l3/1l3b_B.pt +3 -0
  44. data/pdb_2021aug02_sample/pdb/l3/1l3b_C.pt +3 -0
  45. data/pdb_2021aug02_sample/pdb/l3/1l3b_D.pt +3 -0
  46. data/pdb_2021aug02_sample/pdb/l3/1l3b_E.pt +3 -0
  47. data/pdb_2021aug02_sample/pdb/l3/1l3b_F.pt +3 -0
  48. data/pdb_2021aug02_sample/pdb/l3/1l3b_G.pt +3 -0
  49. data/pdb_2021aug02_sample/pdb/l3/1l3b_H.pt +3 -0
  50. data/pdb_2021aug02_sample/pdb/l3/1l3c.pt +3 -0
.gitattributes CHANGED
@@ -1,35 +1,60 @@
1
  *.7z filter=lfs diff=lfs merge=lfs -text
2
  *.arrow filter=lfs diff=lfs merge=lfs -text
3
  *.bin filter=lfs diff=lfs merge=lfs -text
 
4
  *.bz2 filter=lfs diff=lfs merge=lfs -text
5
- *.ckpt filter=lfs diff=lfs merge=lfs -text
6
  *.ftz filter=lfs diff=lfs merge=lfs -text
7
  *.gz filter=lfs diff=lfs merge=lfs -text
8
  *.h5 filter=lfs diff=lfs merge=lfs -text
9
  *.joblib filter=lfs diff=lfs merge=lfs -text
10
  *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
- *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
  *.model filter=lfs diff=lfs merge=lfs -text
13
  *.msgpack filter=lfs diff=lfs merge=lfs -text
14
- *.npy filter=lfs diff=lfs merge=lfs -text
15
- *.npz filter=lfs diff=lfs merge=lfs -text
16
  *.onnx filter=lfs diff=lfs merge=lfs -text
17
  *.ot filter=lfs diff=lfs merge=lfs -text
18
  *.parquet filter=lfs diff=lfs merge=lfs -text
19
  *.pb filter=lfs diff=lfs merge=lfs -text
20
- *.pickle filter=lfs diff=lfs merge=lfs -text
21
- *.pkl filter=lfs diff=lfs merge=lfs -text
22
- *.pt filter=lfs diff=lfs merge=lfs -text
23
  *.pth filter=lfs diff=lfs merge=lfs -text
24
  *.rar filter=lfs diff=lfs merge=lfs -text
25
- *.safetensors filter=lfs diff=lfs merge=lfs -text
26
  saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
  *.tar.* filter=lfs diff=lfs merge=lfs -text
28
- *.tar filter=lfs diff=lfs merge=lfs -text
29
  *.tflite filter=lfs diff=lfs merge=lfs -text
30
  *.tgz filter=lfs diff=lfs merge=lfs -text
31
- *.wasm filter=lfs diff=lfs merge=lfs -text
32
  *.xz filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  *.7z filter=lfs diff=lfs merge=lfs -text
2
  *.arrow filter=lfs diff=lfs merge=lfs -text
3
  *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bin.* filter=lfs diff=lfs merge=lfs -text
5
  *.bz2 filter=lfs diff=lfs merge=lfs -text
 
6
  *.ftz filter=lfs diff=lfs merge=lfs -text
7
  *.gz filter=lfs diff=lfs merge=lfs -text
8
  *.h5 filter=lfs diff=lfs merge=lfs -text
9
  *.joblib filter=lfs diff=lfs merge=lfs -text
10
  *.lfs.* filter=lfs diff=lfs merge=lfs -text
 
11
  *.model filter=lfs diff=lfs merge=lfs -text
12
  *.msgpack filter=lfs diff=lfs merge=lfs -text
 
 
13
  *.onnx filter=lfs diff=lfs merge=lfs -text
14
  *.ot filter=lfs diff=lfs merge=lfs -text
15
  *.parquet filter=lfs diff=lfs merge=lfs -text
16
  *.pb filter=lfs diff=lfs merge=lfs -text
 
 
 
17
  *.pth filter=lfs diff=lfs merge=lfs -text
18
  *.rar filter=lfs diff=lfs merge=lfs -text
 
19
  saved_model/**/* filter=lfs diff=lfs merge=lfs -text
20
  *.tar.* filter=lfs diff=lfs merge=lfs -text
 
21
  *.tflite filter=lfs diff=lfs merge=lfs -text
22
  *.tgz filter=lfs diff=lfs merge=lfs -text
 
23
  *.xz filter=lfs diff=lfs merge=lfs -text
24
  *.zip filter=lfs diff=lfs merge=lfs -text
25
+ *.zstandard filter=lfs diff=lfs merge=lfs -text
26
+ *.tfevents* filter=lfs diff=lfs merge=lfs -text
27
+ *.db* filter=lfs diff=lfs merge=lfs -text
28
+ *.ark* filter=lfs diff=lfs merge=lfs -text
29
+ **/*ckpt*data* filter=lfs diff=lfs merge=lfs -text
30
+ **/*ckpt*.meta filter=lfs diff=lfs merge=lfs -text
31
+ **/*ckpt*.index filter=lfs diff=lfs merge=lfs -text
32
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
33
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
34
+ *.gguf* filter=lfs diff=lfs merge=lfs -text
35
+ *.ggml filter=lfs diff=lfs merge=lfs -text
36
+ *.llamafile* filter=lfs diff=lfs merge=lfs -text
37
+ *.pt2 filter=lfs diff=lfs merge=lfs -text
38
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
39
+ *.npy filter=lfs diff=lfs merge=lfs -text
40
+ *.pickle filter=lfs diff=lfs merge=lfs -text
41
+ *.pkl filter=lfs diff=lfs merge=lfs -text
42
+ *.tar filter=lfs diff=lfs merge=lfs -text
43
+ *.wasm filter=lfs diff=lfs merge=lfs -text
44
  *.zst filter=lfs diff=lfs merge=lfs -text
45
  *tfevents* filter=lfs diff=lfs merge=lfs -text
46
+ inputs/PSSM_inputs/3HTN.npz filter=lfs diff=lfs merge=lfs -text
47
+ inputs/PSSM_inputs/4YOW.npz filter=lfs diff=lfs merge=lfs -text
48
+ vanilla_model_weights/v_48_002.pt filter=lfs diff=lfs merge=lfs -text
49
+ vanilla_model_weights/v_48_010.pt filter=lfs diff=lfs merge=lfs -text
50
+ vanilla_model_weights/v_48_020.pt filter=lfs diff=lfs merge=lfs -text
51
+ vanilla_model_weights/v_48_030.pt filter=lfs diff=lfs merge=lfs -text
52
+ ca_model_weights/v_48_002.pt filter=lfs diff=lfs merge=lfs -text
53
+ ca_model_weights/v_48_010.pt filter=lfs diff=lfs merge=lfs -text
54
+ ca_model_weights/v_48_020.pt filter=lfs diff=lfs merge=lfs -text
55
+ soluble_model_weights/v_48_002.pt filter=lfs diff=lfs merge=lfs -text
56
+ soluble_model_weights/v_48_010.pt filter=lfs diff=lfs merge=lfs -text
57
+ soluble_model_weights/v_48_020.pt filter=lfs diff=lfs merge=lfs -text
58
+ soluble_model_weights/v_48_030.pt filter=lfs diff=lfs merge=lfs -text
59
+ data/** filter=lfs diff=lfs merge=lfs -text
60
+ weight/** filter=lfs diff=lfs merge=lfs -text
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Justas Dauparas
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
README.md ADDED
@@ -0,0 +1,256 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ frameworks:
3
+ - ""
4
+ language:
5
+ - en
6
+ - zh
7
+ license: mit
8
+ tags:
9
+ - OneScience
10
+ - life-science
11
+ - graph-neural-network
12
+ - amino-acid-sequence
13
+ tasks: []
14
+ ---
15
+ <p align="center">
16
+ <strong>
17
+ <span style="font-size: 30px;">ProteinMPNN</span>
18
+ </strong>
19
+ </p>
20
+
21
+ # Model Introduction
22
+
23
+ ProteinMPNN is a protein sequence design model based on a Message Passing Neural Network. Given a protein backbone structure, it can efficiently generate highly expressible and foldable amino acid sequences.
24
+
25
+ # Model Description
26
+
27
+ ProteinMPNN uses an encoder-decoder architecture. The encoder extracts geometric and topological features of the backbone structure through a graph neural network, while the decoder generates the amino acid sequence position by position in an autoregressive manner.
28
+
29
+
30
+ # Usage
31
+
32
+ ## 1. Using OneCode
33
+
34
+ You can try intelligent one-click AI4S programming through the OneCode online environment:
35
+
36
+ [Try intelligent one-click AI4S programming](https://web-2069360198568017922-iaaj.ksai.scnet.cn:58043/home)
37
+
38
+ ## 2. Manual Installation and Usage
39
+
40
+ **Hardware Requirements**
41
+
42
+ - Running on a GPU or DCU is recommended.
43
+ - A CPU can be used for import checks and small-configuration connectivity validation, but full training and inference will be slow.
44
+ - DCU users need to install DTK in advance. DTK 25.04.2 or later is recommended, or the OneScience-recommended version that matches the current cluster.
45
+
46
+
47
+ ## 3. Quick Start
48
+
49
+ ### Download the Model Package
50
+
51
+ ```bash
52
+ modelscope download --model OneScience/ProteinMPNN --local_dir ./ProteinMPNN
53
+ cd ProteinMPNN
54
+ ```
55
+
56
+ ### Install the Runtime Environment
57
+ #### DCU Environment
58
+
59
+ ```bash
60
+ # Activate DTK and CONDA first
61
+ conda create -n onescience311 python=3.11 -y
62
+ conda activate onescience311
63
+ # uv installation is supported
64
+ pip install onescience[bio] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai
65
+ ```
66
+
67
+ If the runtime environment explicitly needs to point to the OneScience root directory, set:
68
+
69
+ ```bash
70
+ export ONESCIENCE_ROOT=/path/to/onescience
71
+ ```
72
+
73
+ ## Quick Verification
74
+
75
+ ```bash
76
+ export PYTHONPATH=$(pwd)/model:${ONESCIENCE_ROOT}/src:${PYTHONPATH:-}
77
+ python -c "from proteinmpnn.protein_mpnn_utils import ProteinMPNN; print('proteinmpnn wrapper ok')"
78
+ python scripts/inference.py --help
79
+ python scripts/training.py --help
80
+ ```
81
+
82
+ ## Inference
83
+
84
+ The current weights have been placed in subdirectories under `weight/`. The standard ProteinMPNN uses `weight/vanilla_model_weights/`; if `--path_to_model_weights` is not explicitly passed, `scripts/inference.py` uses this directory by default.
85
+
86
+ ### Run Minimal Inference with the Script
87
+
88
+ ```bash
89
+ cd /path/to/proteinmpnn
90
+ bash scripts/test_inference.sh
91
+ ```
92
+
93
+ This script uses the following by default:
94
+
95
+ ```text
96
+ Input PDB: data/inputs/PDB_monomers/pdbs/5L33.pdb
97
+ Designed chain: A
98
+ Model weights: weight/vanilla_model_weights
99
+ Output directory: outputs/test_inference/
100
+ ```
101
+
102
+ View the generated sequences:
103
+
104
+ ```bash
105
+ ls outputs/test_inference/seqs
106
+ ```
107
+
108
+ Equivalent command:
109
+
110
+ ```bash
111
+ python scripts/inference.py \
112
+ --pdb_path ./data/inputs/PDB_monomers/pdbs/5L33.pdb \
113
+ --pdb_path_chains "A" \
114
+ --out_folder ./outputs/test_inference \
115
+ --path_to_model_weights ./weight/vanilla_model_weights \
116
+ --model_name v_48_020 \
117
+ --num_seq_per_target 2 \
118
+ --sampling_temp "0.1" \
119
+ --seed 37 \
120
+ --batch_size 1
121
+ ```
122
+
123
+ Available weights:
124
+
125
+ - Standard model: `--path_to_model_weights ./weight/vanilla_model_weights`
126
+ - Soluble protein model: `--path_to_model_weights ./weight/soluble_model_weights` or add `--use_soluble_model`
127
+ - CA-only model: `--path_to_model_weights ./weight/ca_model_weights` or add `--ca_only`
128
+
129
+ ## Inference Example Scripts
130
+
131
+ The `scripts/infer_examples/` directory contains examples for 12 inference scenarios, all adapted to the current directory structure:
132
+
133
+ | Script | Scenario |
134
+ | --- | --- |
135
+ | `submit_example_1.sh` | Inference on multiple single-chain PDBs. |
136
+ | `submit_example_2.sh` | Multi-chain complex; design only the specified chains. |
137
+ | `submit_example_3.sh` | Inference on a single PDB complex. |
138
+ | `submit_example_3_score_only.sh` | Score existing structures/sequences without generating new sequences. |
139
+ | `submit_example_3_score_only_from_fasta.sh` | Score a structure using FASTA sequences. |
140
+ | `submit_example_4.sh` | Fix certain residue positions and exclude them from design. |
141
+ | `submit_example_4_non_fixed.sh` | Design only the specified positions. |
142
+ | `submit_example_5.sh` | Tied positions, with multi-position tied design. |
143
+ | `submit_example_6.sh` | Homooligomer-constrained design. |
144
+ | `submit_example_7.sh` | Output unconditional probabilities. |
145
+ | `submit_example_8.sh` | Add a global amino acid bias. |
146
+ | `submit_example_pssm.sh` | Add PSSM constraints to assist design. |
147
+
148
+ Run a single example:
149
+
150
+ ```bash
151
+ bash scripts/infer_examples/submit_example_3.sh
152
+ ```
153
+
154
+ Note: `submit_example_3_score_only_from_fasta.sh` depends on `submit_example_3.sh` first generating `outputs/example_3_outputs/seqs/3HTN.fa`.
155
+
156
+ ## Training
157
+
158
+ The current example training data is placed in `data/pdb_2021aug02_sample/`. This directory should contain:
159
+
160
+ ```text
161
+ list.csv
162
+ valid_clusters.txt
163
+ test_clusters.txt
164
+ pdb/<2nd-3rd characters of pdbid>/<pdbid>.pt
165
+ pdb/<2nd-3rd characters of pdbid>/<pdbid>_<chain>.pt
166
+ ```
167
+
168
+ Run the training example script directly:
169
+
170
+ ```bash
171
+ cd /path/to/proteinmpnn
172
+ bash scripts/test_train.sh
173
+ ```
174
+
175
+ This script uses the following by default:
176
+
177
+ ```text
178
+ Training data: data/pdb_2021aug02_sample
179
+ Output directory: outputs/train/exp_020/
180
+ Number of samples per epoch: 1000
181
+ Save a checkpoint every 50 epochs
182
+ ```
183
+
184
+ View the training log and weights:
185
+
186
+ ```bash
187
+ cat outputs/train/exp_020/log.txt
188
+ ls outputs/train/exp_020/model_weights
189
+ ```
190
+
191
+ Equivalent command:
192
+
193
+ ```bash
194
+ python scripts/training.py \
195
+ --path_for_training_data ./data/pdb_2021aug02_sample \
196
+ --path_for_outputs ./outputs/train/exp_020 \
197
+ --num_examples_per_epoch 1000 \
198
+ --save_model_every_n_epochs 50
199
+ ```
200
+
201
+ To resume training, pass:
202
+
203
+ ```bash
204
+ python scripts/training.py \
205
+ --path_for_training_data ./data/pdb_2021aug02_sample \
206
+ --path_for_outputs ./outputs/train/exp_020 \
207
+ --previous_checkpoint ./outputs/train/exp_020/model_weights/epoch_last.pt
208
+ ```
209
+
210
+ ## Common Parameters
211
+
212
+ ### Inference Parameters
213
+
214
+ | Parameter | Description | Default/Example |
215
+ | --- | --- | --- |
216
+ | `--pdb_path` | Input path for a single PDB | `./data/inputs/PDB_monomers/pdbs/5L33.pdb` |
217
+ | `--jsonl_path` | Parsed PDB JSONL input path | Generated by `parse_multiple_chains.py` |
218
+ | `--pdb_path_chains` | Chains to design in single-PDB mode | `"A"` or `"A B"` |
219
+ | `--out_folder` | Inference output directory | `./outputs/test_inference` |
220
+ | `--path_to_model_weights` | Weight directory | `./weight/vanilla_model_weights` |
221
+ | `--model_name` | Weight file name without `.pt` | `v_48_020` |
222
+ | `--num_seq_per_target` | Number of sequences to generate for each target | `2` |
223
+ | `--sampling_temp` | Sampling temperature | `"0.1"` |
224
+ | `--score_only` | Score only, without generating new sequences | `0` or `1` |
225
+ | `--save_score` | Save score files | `0` or `1` |
226
+ | `--save_probs` | Save probability files | `0` or `1` |
227
+ | `--ca_only` | Use the CA-only model | Disabled by default |
228
+ | `--use_soluble_model` | Use the soluble protein model | Disabled by default |
229
+
230
+ ### Training Parameters
231
+
232
+ | Parameter | Description | Default/Example |
233
+ | --- | --- | --- |
234
+ | `--path_for_training_data` | Preprocessed training data directory | `./data/pdb_2021aug02_sample` |
235
+ | `--path_for_outputs` | Training output directory | `./outputs/train/exp_020` |
236
+ | `--previous_checkpoint` | Checkpoint for resuming training | `epoch_last.pt` |
237
+ | `--num_epochs` | Number of training epochs | Default `200` |
238
+ | `--num_examples_per_epoch` | Number of samples loaded per epoch | Example `1000` |
239
+ | `--batch_size` | Token batch size | Default `10000` |
240
+ | `--save_model_every_n_epochs` | Save a checkpoint every N epochs | `50` in the example script |
241
+ | `--mixed_precision` | Whether to use mixed precision | Default `True` |
242
+
243
+ ## Official OneScience Information
244
+
245
+ | Platform | Documentation | OneScience Main Repository | Skills Repository |
246
+ | --- | --- | --- | --- |
247
+ | Gitee | https://gitee.com/onescience-ai/onescience-doc | https://gitee.com/onescience-ai/onescience | https://gitee.com/onescience-ai/oneskills |
248
+ | GitHub | https://github.com/onescience-ai/OneScience-doc | https://github.com/onescience-ai/OneScience | https://github.com/onescience-ai/oneskills |
249
+
250
+ ## Citations and License
251
+
252
+ - Original ProteinMPNN paper: [Robust deep learning-based protein sequence design using ProteinMPNN](https://www.biorxiv.org/content/10.1101/2022.06.03.494563v1).
253
+
254
+ - ProteinMPNN-related source code uses the MIT License. See `LICENSE` in the repository root for details. The specific terms of use for model weights and data should follow the instructions provided by the corresponding publishers.
255
+
256
+ - If you use ProteinMPNN in research, it is recommended to cite the corresponding original ProteinMPNN paper and relevant OneScience project information, and to add citations for downstream analysis tools or datasets according to the actual task.
config/config.yaml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ model:
2
+ name: ProteinMPNN
3
+ package_path: ../model/proteinmpnn
4
+ base_dependency: OneScience
5
+ runtime:
6
+ pythonpath: ../model
7
+ onescience_root_env: ONESCIENCE_ROOT
8
+ inference:
9
+ entry: ../scripts/inference.py
10
+ input_dir: ../data/inputs
11
+ output_dir: ../outputs
12
+ weight_dir: ../weight/vanilla_model_weights
13
+ ca_weight_dir: ../weight/ca_model_weights
14
+ soluble_weight_dir: ../weight/soluble_model_weights
15
+ train:
16
+ entry: ../scripts/training.py
17
+ data_dir: ../data/pdb_2021aug02_sample
18
+ output_dir: ../outputs/train
configuration.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_name": "ProteinMPNN",
3
+ "framework": "PyTorch",
4
+ "task": "protein-sequence-design",
5
+ "entry_points": {
6
+ "inference": "scripts/inference.py",
7
+ "train": "scripts/training.py",
8
+ "helper_scripts": "scripts/helper_scripts"
9
+ },
10
+ "source_package": "model/proteinmpnn",
11
+ "base_dependency": "onescience",
12
+ "config": "config/config.yaml",
13
+ "weight_dir": "weight",
14
+ "license": "MIT"
15
+ }
data/inputs/PDB_complexes/pdbs/3HTN.pdb ADDED
The diff for this file is too large to render. See raw diff
 
data/inputs/PDB_complexes/pdbs/4YOW.pdb ADDED
The diff for this file is too large to render. See raw diff
 
data/inputs/PDB_homooligomers/pdbs/4GYT.pdb ADDED
The diff for this file is too large to render. See raw diff
 
data/inputs/PDB_homooligomers/pdbs/6EHB.pdb ADDED
The diff for this file is too large to render. See raw diff
 
data/inputs/PDB_monomers/pdbs/5L33.pdb ADDED
The diff for this file is too large to render. See raw diff
 
data/inputs/PDB_monomers/pdbs/6MRR.pdb ADDED
The diff for this file is too large to render. See raw diff
 
data/inputs/PSSM_inputs/3HTN.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0f93dfdf6da0336cbe6a0d09fb6c7d31670f73afb3157a7d43b76c032c89f4c6
3
+ size 148078
data/inputs/PSSM_inputs/4YOW.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8b26254422205d1751ccae4ee02f120a6320f756185637685160f061739039d5
3
+ size 240034
data/pdb_2021aug02_sample/README ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ Training set for RosettaFold/MPNN etc.
3
+
4
+ Each PDB entry is represented as a collection of .pt files:
5
+ PDBID_CHAINID.pt - contains CHAINID chain from PDBID
6
+ PDBID.pt - metadata and information on biological assemblies
7
+
8
+ PDBID_CHAINID.pt has the following fields:
9
+ seq - amino acid sequence (string)
10
+ xyz - atomic coordinates [L,14,3]
11
+ mask - boolean mask [L,14]
12
+ bfac - temperature factors [L,14]
13
+ occ - occupancy [L,14] (is 1 for most atoms, <1 if alternative conformations are present)
14
+
15
+ PDBID.pt:
16
+ method - experimental method (str)
17
+ date - deposition date (str)
18
+ resolution - resolution (float)
19
+ chains - list of CHAINIDs (there is a corresponding PDBID_CHAINID.pt file for each of these)
20
+ tm - pairwise similarity between chains (TM-score,seq.id.,rmsd from TM-align) [num_chains,num_chains,3]
21
+ asmb_ids - biounit IDs as in the PDB (list of str)
22
+ asmb_details - how the assembly was identified: author, or software, or smth else (list of str)
23
+ asmb_method - PISA or smth else (list of str)
24
+
25
+ asmb_chains - list of chains which each biounit is composed of (list of str, each str contains comma separated CHAINIDs)
26
+ asmb_xformIDX - (one per biounit) xforms to be applied to chains from asmb_chains[IDX], [n,4,4]
27
+ [n,:3,:3] - rotation matrices
28
+ [n,3,:3] - translation vectors
29
+
30
+ list.csv:
31
+ CHAINID - chain label, PDBID_CHAINID
32
+ DEPOSITION - deposition date
33
+ RESOLUTION - structure resolution
34
+ HASH - unique 6-digit hash for the sequence
35
+ CLUSTER - sequence cluster the chain belongs to (clusters were generated at seqID=30%)
36
+ SEQUENCE - reference amino acid sequence
37
+
38
+
39
+ valid_clusters.txt - clusters used for validation
40
+
41
+ test_clusters.txt - clusters used for testing
data/pdb_2021aug02_sample/list.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1f3672bc396b465865cdb6c4f643fe92806462e5203589bd0892e9666db7b597
3
+ size 175927651
data/pdb_2021aug02_sample/pdb/l3/1l30.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3e175b2a3cb19b7ffaba1ff999126a92704f4b679c8c887f1e31e3804cddc3f6
3
+ size 1639
data/pdb_2021aug02_sample/pdb/l3/1l30_A.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f5befc14fe895e4000dba92e738531989ab334de29b36f58627e439369718c1e
3
+ size 56671
data/pdb_2021aug02_sample/pdb/l3/1l31.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2e2a17ac6362326d38bb26d1cc73f820d127ab72e5649c342abf9c5323759e7d
3
+ size 1639
data/pdb_2021aug02_sample/pdb/l3/1l31_A.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9bbc4fd744ec7e76e37e76d3a869e92dcc283f6ec1415a1d37d123b44a04282c
3
+ size 56671
data/pdb_2021aug02_sample/pdb/l3/1l32.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:46729094548d3ba3aa22c0ea223f4a9258c8061f2fcb4ef65d0a1b53c7f20995
3
+ size 1639
data/pdb_2021aug02_sample/pdb/l3/1l32_A.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1138354579b24eb592dba33be6fd24d16a6a41af8a94f3fe3c81b32d47fff116
3
+ size 56671
data/pdb_2021aug02_sample/pdb/l3/1l33.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d12642f663eae599a3527e91c12538ca243a2fc8c7fecd7e1945c14145f8bb96
3
+ size 1639
data/pdb_2021aug02_sample/pdb/l3/1l33_A.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:36d893288e7960a95bd57412097f7926bfd8903f69babaecd4fc3a96f4c7335e
3
+ size 56671
data/pdb_2021aug02_sample/pdb/l3/1l34.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:88b226e7de23eda747f7f0b7fecd413066e06dcb18b6af00e55026b7a21ed79e
3
+ size 1639
data/pdb_2021aug02_sample/pdb/l3/1l34_A.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:468f0984d641491afc380393dbb8ccc752efc26384b62e3aafd05c38c3333b1e
3
+ size 56671
data/pdb_2021aug02_sample/pdb/l3/1l35.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c0cd54513a235dd95f28e089843c7aa4eafa949fcdf3734bc9d90fd55e92477e
3
+ size 1639
data/pdb_2021aug02_sample/pdb/l3/1l35_A.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bd215c1bff76b94e34b401777a3e25333904dda095e403ca07d080d670e798d7
3
+ size 56671
data/pdb_2021aug02_sample/pdb/l3/1l36.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:094543a71933ec6b25f3b4a2033576c8309865e8657efedc75633858f1824cca
3
+ size 1639
data/pdb_2021aug02_sample/pdb/l3/1l36_A.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a75c1231c69ab41066980ef2884b40ede5a0e0a82b830e40ae7f57db80a0d169
3
+ size 56671
data/pdb_2021aug02_sample/pdb/l3/1l37.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ed43d688a1c56b4f6e6ee6b59e5f452f8eb220d6a4ff3f07f38b695dc4d3e8da
3
+ size 1639
data/pdb_2021aug02_sample/pdb/l3/1l37_A.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bd69e3a5b3cde0a1628c93f25e3fdda2da5bf4f7b20d511198d47f82b26546ff
3
+ size 56671
data/pdb_2021aug02_sample/pdb/l3/1l38.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:01358241a8d12e182af8af64ae846db00753e942c30fd31c660e886e05c61e19
3
+ size 1639
data/pdb_2021aug02_sample/pdb/l3/1l38_A.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:48b1aeb4c629af3e4345e23bdca116731d75a5b51e9a10dd0c602e815bd0d3ff
3
+ size 56671
data/pdb_2021aug02_sample/pdb/l3/1l39.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6544d7dec156ef35590f36ea06316454e5d38e67894cdd23d264e7cdb6a55cd4
3
+ size 1639
data/pdb_2021aug02_sample/pdb/l3/1l39_A.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:db2aae01106652a1a32341bfcf0d0ea4ff39dc417e39e484e9c7b33b876e10d2
3
+ size 56671
data/pdb_2021aug02_sample/pdb/l3/1l3a.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bd537a6141598894bbf3d8192d9050f2a09b090debf05f24d4904cc813ad5b0e
3
+ size 2727
data/pdb_2021aug02_sample/pdb/l3/1l3a_A.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3ac517edf90561529b7bdd8afb9d45881a6d022f58ba79e4fa53a97a20bf46bb
3
+ size 77855
data/pdb_2021aug02_sample/pdb/l3/1l3a_B.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:94205a0436f13a4d81394810986d7912294bb22970bc78c894cb13f9d17c62dd
3
+ size 77855
data/pdb_2021aug02_sample/pdb/l3/1l3a_C.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:af73c2f40128fdd22c02a0aab6511841785b92fda8c27f5258771ecdeec19627
3
+ size 77855
data/pdb_2021aug02_sample/pdb/l3/1l3a_D.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:20ccc2cc800e8accf6e3a134187df41e07ff9832ed347829ab05b97a3b27e5f4
3
+ size 77855
data/pdb_2021aug02_sample/pdb/l3/1l3b.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:91f5076bcc0904d35621e6cf64cd82d7ac46eb5dde664c95affe79984a274a68
3
+ size 4387
data/pdb_2021aug02_sample/pdb/l3/1l3b_A.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b3cad6f555bc6eb9b7690883b9d23f3ea80be92e682929c924fe638dd552b0e
3
+ size 66079
data/pdb_2021aug02_sample/pdb/l3/1l3b_B.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1344bd0b197b38193a11b8b04e4ec14b5435de1d8aa24d678dd800a426af3708
3
+ size 66079
data/pdb_2021aug02_sample/pdb/l3/1l3b_C.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e7a6df4cc2fc6a583140bef230e5c38abd5960c8659e40d1d1f3c999e254f65c
3
+ size 66079
data/pdb_2021aug02_sample/pdb/l3/1l3b_D.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:40ca9f60e8e2753e09471ce6dcc8faaee715acf7b9e07eb76dbe8666eedbe2cb
3
+ size 66079
data/pdb_2021aug02_sample/pdb/l3/1l3b_E.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:07afaad97a7e5db3384c2ea0584a62e0ee6d0246c8b661a04065d91fcd20e322
3
+ size 66079
data/pdb_2021aug02_sample/pdb/l3/1l3b_F.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:41879db8e423b303b6b5530377df25e3eda2aead72fc25722e31b7e5c9b9d42b
3
+ size 66079
data/pdb_2021aug02_sample/pdb/l3/1l3b_G.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b8b35fd39dcccc433dff4c98e5007aab7556fca3af251a7180fe853f96f14ed0
3
+ size 66079
data/pdb_2021aug02_sample/pdb/l3/1l3b_H.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e2f671ab33adcdcebcf7f33539aab8b08cfa01cacce84f4da0bdce513acf0c47
3
+ size 66079
data/pdb_2021aug02_sample/pdb/l3/1l3c.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7f8bde66e5d499ee08039760ecab2df3305bc9588cb2ab8f0621301ce94066a6
3
+ size 2599