anzhi2710gmailcom commited on
Commit
1a97b48
·
verified ·
1 Parent(s): ba97519

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. ProteinMPNN.md +255 -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.
ProteinMPNN.md ADDED
@@ -0,0 +1,255 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ frameworks:
3
+ - ""
4
+ language:
5
+ - en
6
+ license: mit
7
+ tags:
8
+ - OneScience
9
+ - life-science
10
+ - graph-neural-network
11
+ - amino-acid-sequence
12
+ tasks: []
13
+ ---
14
+ <p align="center">
15
+ <strong>
16
+ <span style="font-size: 30px;">ProteinMPNN</span>
17
+ </strong>
18
+ </p>
19
+
20
+ # Model Introduction
21
+
22
+ 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.
23
+
24
+ # Model Description
25
+
26
+ 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.
27
+
28
+
29
+ # Usage
30
+
31
+ ## 1. Using OneCode
32
+
33
+ You can try intelligent one-click AI4S programming through the OneCode online environment:
34
+
35
+ [Try intelligent one-click AI4S programming](https://web-2069360198568017922-iaaj.ksai.scnet.cn:58043/home)
36
+
37
+ ## 2. Manual Installation and Usage
38
+
39
+ **Hardware Requirements**
40
+
41
+ - Running on a GPU or DCU is recommended.
42
+ - A CPU can be used for import checks and small-configuration connectivity validation, but full training and inference will be slow.
43
+ - 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.
44
+
45
+
46
+ ## 3. Quick Start
47
+
48
+ ### Download the Model Package
49
+
50
+ ```bash
51
+ hf download --model OneScience-Sugon/ProteinMPNN --local-dir ./ProteinMPNN
52
+ cd ProteinMPNN
53
+ ```
54
+
55
+ ### Install the Runtime Environment
56
+ #### DCU Environment
57
+
58
+ ```bash
59
+ # Activate DTK and CONDA first
60
+ conda create -n onescience311 python=3.11 -y
61
+ conda activate onescience311
62
+ # uv installation is supported
63
+ pip install onescience[bio] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai
64
+ ```
65
+
66
+ If the runtime environment explicitly needs to point to the OneScience root directory, set:
67
+
68
+ ```bash
69
+ export ONESCIENCE_ROOT=/path/to/onescience
70
+ ```
71
+
72
+ ## Quick Verification
73
+
74
+ ```bash
75
+ export PYTHONPATH=$(pwd)/model:${ONESCIENCE_ROOT}/src:${PYTHONPATH:-}
76
+ python -c "from proteinmpnn.protein_mpnn_utils import ProteinMPNN; print('proteinmpnn wrapper ok')"
77
+ python scripts/inference.py --help
78
+ python scripts/training.py --help
79
+ ```
80
+
81
+ ## Inference
82
+
83
+ 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.
84
+
85
+ ### Run Minimal Inference with the Script
86
+
87
+ ```bash
88
+ cd /path/to/proteinmpnn
89
+ bash scripts/test_inference.sh
90
+ ```
91
+
92
+ This script uses the following by default:
93
+
94
+ ```text
95
+ Input PDB: data/inputs/PDB_monomers/pdbs/5L33.pdb
96
+ Designed chain: A
97
+ Model weights: weight/vanilla_model_weights
98
+ Output directory: outputs/test_inference/
99
+ ```
100
+
101
+ View the generated sequences:
102
+
103
+ ```bash
104
+ ls outputs/test_inference/seqs
105
+ ```
106
+
107
+ Equivalent command:
108
+
109
+ ```bash
110
+ python scripts/inference.py \
111
+ --pdb_path ./data/inputs/PDB_monomers/pdbs/5L33.pdb \
112
+ --pdb_path_chains "A" \
113
+ --out_folder ./outputs/test_inference \
114
+ --path_to_model_weights ./weight/vanilla_model_weights \
115
+ --model_name v_48_020 \
116
+ --num_seq_per_target 2 \
117
+ --sampling_temp "0.1" \
118
+ --seed 37 \
119
+ --batch_size 1
120
+ ```
121
+
122
+ Available weights:
123
+
124
+ - Standard model: `--path_to_model_weights ./weight/vanilla_model_weights`
125
+ - Soluble protein model: `--path_to_model_weights ./weight/soluble_model_weights` or add `--use_soluble_model`
126
+ - CA-only model: `--path_to_model_weights ./weight/ca_model_weights` or add `--ca_only`
127
+
128
+ ## Inference Example Scripts
129
+
130
+ The `scripts/infer_examples/` directory contains examples for 12 inference scenarios, all adapted to the current directory structure:
131
+
132
+ | Script | Scenario |
133
+ | --- | --- |
134
+ | `submit_example_1.sh` | Inference on multiple single-chain PDBs. |
135
+ | `submit_example_2.sh` | Multi-chain complex; design only the specified chains. |
136
+ | `submit_example_3.sh` | Inference on a single PDB complex. |
137
+ | `submit_example_3_score_only.sh` | Score existing structures/sequences without generating new sequences. |
138
+ | `submit_example_3_score_only_from_fasta.sh` | Score a structure using FASTA sequences. |
139
+ | `submit_example_4.sh` | Fix certain residue positions and exclude them from design. |
140
+ | `submit_example_4_non_fixed.sh` | Design only the specified positions. |
141
+ | `submit_example_5.sh` | Tied positions, with multi-position tied design. |
142
+ | `submit_example_6.sh` | Homooligomer-constrained design. |
143
+ | `submit_example_7.sh` | Output unconditional probabilities. |
144
+ | `submit_example_8.sh` | Add a global amino acid bias. |
145
+ | `submit_example_pssm.sh` | Add PSSM constraints to assist design. |
146
+
147
+ Run a single example:
148
+
149
+ ```bash
150
+ bash scripts/infer_examples/submit_example_3.sh
151
+ ```
152
+
153
+ Note: `submit_example_3_score_only_from_fasta.sh` depends on `submit_example_3.sh` first generating `outputs/example_3_outputs/seqs/3HTN.fa`.
154
+
155
+ ## Training
156
+
157
+ The current example training data is placed in `data/pdb_2021aug02_sample/`. This directory should contain:
158
+
159
+ ```text
160
+ list.csv
161
+ valid_clusters.txt
162
+ test_clusters.txt
163
+ pdb/<2nd-3rd characters of pdbid>/<pdbid>.pt
164
+ pdb/<2nd-3rd characters of pdbid>/<pdbid>_<chain>.pt
165
+ ```
166
+
167
+ Run the training example script directly:
168
+
169
+ ```bash
170
+ cd /path/to/proteinmpnn
171
+ bash scripts/test_train.sh
172
+ ```
173
+
174
+ This script uses the following by default:
175
+
176
+ ```text
177
+ Training data: data/pdb_2021aug02_sample
178
+ Output directory: outputs/train/exp_020/
179
+ Number of samples per epoch: 1000
180
+ Save a checkpoint every 50 epochs
181
+ ```
182
+
183
+ View the training log and weights:
184
+
185
+ ```bash
186
+ cat outputs/train/exp_020/log.txt
187
+ ls outputs/train/exp_020/model_weights
188
+ ```
189
+
190
+ Equivalent command:
191
+
192
+ ```bash
193
+ python scripts/training.py \
194
+ --path_for_training_data ./data/pdb_2021aug02_sample \
195
+ --path_for_outputs ./outputs/train/exp_020 \
196
+ --num_examples_per_epoch 1000 \
197
+ --save_model_every_n_epochs 50
198
+ ```
199
+
200
+ To resume training, pass:
201
+
202
+ ```bash
203
+ python scripts/training.py \
204
+ --path_for_training_data ./data/pdb_2021aug02_sample \
205
+ --path_for_outputs ./outputs/train/exp_020 \
206
+ --previous_checkpoint ./outputs/train/exp_020/model_weights/epoch_last.pt
207
+ ```
208
+
209
+ ## Common Parameters
210
+
211
+ ### Inference Parameters
212
+
213
+ | Parameter | Description | Default/Example |
214
+ | --- | --- | --- |
215
+ | `--pdb_path` | Input path for a single PDB | `./data/inputs/PDB_monomers/pdbs/5L33.pdb` |
216
+ | `--jsonl_path` | Parsed PDB JSONL input path | Generated by `parse_multiple_chains.py` |
217
+ | `--pdb_path_chains` | Chains to design in single-PDB mode | `"A"` or `"A B"` |
218
+ | `--out_folder` | Inference output directory | `./outputs/test_inference` |
219
+ | `--path_to_model_weights` | Weight directory | `./weight/vanilla_model_weights` |
220
+ | `--model_name` | Weight file name without `.pt` | `v_48_020` |
221
+ | `--num_seq_per_target` | Number of sequences to generate for each target | `2` |
222
+ | `--sampling_temp` | Sampling temperature | `"0.1"` |
223
+ | `--score_only` | Score only, without generating new sequences | `0` or `1` |
224
+ | `--save_score` | Save score files | `0` or `1` |
225
+ | `--save_probs` | Save probability files | `0` or `1` |
226
+ | `--ca_only` | Use the CA-only model | Disabled by default |
227
+ | `--use_soluble_model` | Use the soluble protein model | Disabled by default |
228
+
229
+ ### Training Parameters
230
+
231
+ | Parameter | Description | Default/Example |
232
+ | --- | --- | --- |
233
+ | `--path_for_training_data` | Preprocessed training data directory | `./data/pdb_2021aug02_sample` |
234
+ | `--path_for_outputs` | Training output directory | `./outputs/train/exp_020` |
235
+ | `--previous_checkpoint` | Checkpoint for resuming training | `epoch_last.pt` |
236
+ | `--num_epochs` | Number of training epochs | Default `200` |
237
+ | `--num_examples_per_epoch` | Number of samples loaded per epoch | Example `1000` |
238
+ | `--batch_size` | Token batch size | Default `10000` |
239
+ | `--save_model_every_n_epochs` | Save a checkpoint every N epochs | `50` in the example script |
240
+ | `--mixed_precision` | Whether to use mixed precision | Default `True` |
241
+
242
+ ## Official OneScience Information
243
+
244
+ | Platform | Documentation | OneScience Main Repository | Skills Repository |
245
+ | --- | --- | --- | --- |
246
+ | Gitee | https://gitee.com/onescience-ai/onescience-doc | https://gitee.com/onescience-ai/onescience | https://gitee.com/onescience-ai/oneskills |
247
+ | GitHub | https://github.com/onescience-ai/OneScience-doc | https://github.com/onescience-ai/OneScience | https://github.com/onescience-ai/oneskills |
248
+
249
+ ## Citations and License
250
+
251
+ - Original ProteinMPNN paper: [Robust deep learning-based protein sequence design using ProteinMPNN](https://www.biorxiv.org/content/10.1101/2022.06.03.494563v1).
252
+
253
+ - 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.
254
+
255
+ - 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