wuxing0105 commited on
Commit
f066d72
·
verified ·
1 Parent(s): 0cc0c26

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. .ms_upload_cache +1 -0
  2. LICENSE +21 -0
  3. README.md +303 -0
  4. conf/P2PXML_Structure/.DS_Store +0 -0
  5. conf/P2PXML_Structure/P2PXML_structure.csv +0 -0
  6. conf/P2PXML_Structure/README.md +61 -0
  7. conf/P2PXML_Structure/antibodies/.DS_Store +0 -0
  8. conf/P2PXML_Structure/antibodies/0.5γ.pdb +0 -0
  9. conf/P2PXML_Structure/antibodies/10-1074.pdb +0 -0
  10. conf/P2PXML_Structure/antibodies/10-1121.pdb +0 -0
  11. conf/P2PXML_Structure/antibodies/10-1130.pdb +0 -0
  12. conf/P2PXML_Structure/antibodies/10-1146.pdb +0 -0
  13. conf/P2PXML_Structure/antibodies/10-1341.pdb +0 -0
  14. conf/P2PXML_Structure/antibodies/10-1369.pdb +0 -0
  15. conf/P2PXML_Structure/antibodies/10-259.pdb +0 -0
  16. conf/P2PXML_Structure/antibodies/10-303.pdb +0 -0
  17. conf/P2PXML_Structure/antibodies/10-410.pdb +0 -0
  18. conf/P2PXML_Structure/antibodies/10-847.pdb +0 -0
  19. conf/P2PXML_Structure/antibodies/10-996.pdb +0 -0
  20. conf/P2PXML_Structure/antibodies/17b.pdb +0 -0
  21. conf/P2PXML_Structure/antibodies/2909.pdb +0 -0
  22. conf/P2PXML_Structure/antibodies/3BC176.pdb +0 -0
  23. conf/P2PXML_Structure/antibodies/3BC315.pdb +0 -0
  24. conf/P2PXML_Structure/antibodies/49G2.pdb +0 -0
  25. conf/P2PXML_Structure/antibodies/4E9C.pdb +0 -0
  26. conf/P2PXML_Structure/antibodies/916B2.pdb +0 -0
  27. conf/P2PXML_Structure/antibodies/917B11.pdb +0 -0
  28. conf/P2PXML_Structure/antibodies/ABSe0002.pdb +0 -0
  29. conf/P2PXML_Structure/antibodies/ABSe0003.pdb +0 -0
  30. conf/P2PXML_Structure/antibodies/ABSe0006.pdb +0 -0
  31. conf/P2PXML_Structure/antibodies/ABSe0007.pdb +0 -0
  32. conf/P2PXML_Structure/antibodies/ABSe0008.pdb +0 -0
  33. conf/P2PXML_Structure/antibodies/ABSe0009.pdb +0 -0
  34. conf/P2PXML_Structure/antibodies/ABSe0010.pdb +0 -0
  35. conf/P2PXML_Structure/antibodies/ABSe0011.pdb +0 -0
  36. conf/P2PXML_Structure/antibodies/ABSe0012.pdb +0 -0
  37. conf/P2PXML_Structure/antibodies/ABSe0013.pdb +0 -0
  38. conf/P2PXML_Structure/antibodies/ABSe0014.pdb +0 -0
  39. conf/P2PXML_Structure/antibodies/ABSe0015.pdb +0 -0
  40. conf/P2PXML_Structure/antibodies/ABSe0016.pdb +0 -0
  41. conf/P2PXML_Structure/antibodies/ABSe0017.pdb +0 -0
  42. conf/P2PXML_Structure/antibodies/ABSe0018.pdb +0 -0
  43. conf/P2PXML_Structure/antibodies/ABSe0020.pdb +0 -0
  44. conf/P2PXML_Structure/antibodies/ABSe0021.pdb +0 -0
  45. conf/P2PXML_Structure/antibodies/ABSe0022.pdb +0 -0
  46. conf/P2PXML_Structure/antibodies/ABSe0023.pdb +0 -0
  47. conf/P2PXML_Structure/antibodies/ABSe0024.pdb +0 -0
  48. conf/P2PXML_Structure/antibodies/ABSe0026.pdb +0 -0
  49. conf/P2PXML_Structure/antibodies/ABSe0028.pdb +0 -0
  50. conf/P2PXML_Structure/antibodies/ABSe0029.pdb +0 -0
.ms_upload_cache ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version": 3, "repo_id": "OneScience/p2pxml", "files": {"conf/config.json|1787728246.0|294": {"hash": "8b92bcd94d60dc425bac6b996887b46c91e521dfd316474fb9c81eeb6eb47159", "size": 294, "status": "c"}, "README.md|1787730642.0|7809": {"hash": "19ecb53d04fcad2cb177e0600e2f273f7518c8ebbc22fa69e8a49e1c89bb4e32", "size": 7809, "status": "c"}, "LICENSE|1761909824.0|1076": {"hash": "c518f972b1f97a5ad26c945b202918486aee167761075f0bcc3b1b18ffe79509", "size": 1076, "status": "c"}, "conf/data/10-1074.pdb|1761909824.0|283500": {"hash": "309a8814ebca532df1c1430cd7f0ebe68cae45146339d374c839af75e4c93947", "size": 283500, "status": "c"}, "conf/smoke_train_data/0_best_model.pth.raysync.downloading|1787726779.0|0": {"hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "size": 0, "status": "c"}, "conf/data/0013095_2_11.pdb|1761909824.0|310392": {"hash": "c8f174e5ad969c80ccd91fe8311352da71d5eac50a97363104136a94a9dbf069", "size": 310392, "status": "c"}, "conf/data/readme.md|1761909824.0|85": {"hash": "f2f66430ff937cfe474b92672d5e58f8d5ca1d10355ee91d9302cffa51196f03", "size": 85, "status": "c"}, "conf/smoke_train_data/P2PXML_structure.csv|1785379058.0|116": {"hash": "af8e11a86c287863eb1c2560d2c29ac4b103ffe22ec70d2ee9e8360e5175fa80", "size": 116, "status": "c"}, "conf/smoke_train_data/evaluation_results.csv|1785379242.0|212": {"hash": "d649f34d4f73f9c2dcf9d8aa3fc182627d8392ca96e0d55f535679caf85e66e7", "size": 212, "status": "c"}, "conf/smoke_train_data/antibodies/10-1074.pdb|1785379049.0|283500": {"hash": "309a8814ebca532df1c1430cd7f0ebe68cae45146339d374c839af75e4c93947", "size": 283500, "status": "c"}, "conf/smoke_train_data/antigens/0013095_2_11.pdb|1785379050.0|310392": {"hash": "c8f174e5ad969c80ccd91fe8311352da71d5eac50a97363104136a94a9dbf069", "size": 310392, "status": "c"}, "conf/smoke_train_data/log_XthY.log|1785379242.0|2305": {"hash": "955c6798260ee8725ddf2a9caff9e664309cb914c1a8a8b602bda8ce79b2c837", "size": 2305, "status": "c"}, "configuration.json|1787728243.0|437": {"hash": "9fbb97c0bcff6307365688e68b15a78ee8d6eaf1a7bdce158de08e4b9b008225", "size": 437, "status": "c"}, "model/integrated_model_v1.py|1787728236.0|33935": {"hash": "082cb2b558c6b9e78a70cb7ab5626d14ab6679731b542a5e9b84d22e43ae208f", "size": 33935, "status": "c"}, "conf/smoke_train_data/graph_data/antibodies_10-1074.pt|1785379194.0|1553803": {"hash": "987af784857c996b6ed2283223c1a52fa9e7bd66ae10ec71bfb4a17fe2010696", "size": 1553803, "status": "c"}, "model/integrated_model_v1_dataset_smoke.py|1787728237.0|34475": {"hash": "4a247b12614ecd577c67bb4980f918d13e87301e25e05732d21a1399eaf1de0c", "size": 34475, "status": "c"}, "conf/smoke_train_data/graph_data/antigens_0013095_2_11.pt|1785379230.0|1727922": {"hash": "fb4a8f7280e30d781b5caa3ca1fab2d79541f3991f4d7ee67b6398fdaffaf5d8", "size": 1727922, "status": "c"}, "model/models/Readme.md|1761909824.0|23": {"hash": "afa45c70736b2beb315e55f1a1db291196538534050f2abe9b966105e1d3ae93", "size": 23, "status": "c"}, "model/integrated_model_v1_smoke.py|1787728239.0|34013": {"hash": "47002ea2459fb1c9fb1032b47984a796d6a0aafe79f307e133c4bd5d64257822", "size": 34013, "status": "c"}, "model/resources/SEQMODEL.png|1761909824.0|780853": {"hash": "8a77c1234ee2a6853d239c49a0f92beae6f47d827325589e47a2f879bdbaa862", "size": 780853, "status": "c"}, "model/readme.md|1761909824.0|858": {"hash": "464464cdf9675cdec7065670ca6baeb91a1377c5cb60c41c9de7fd01eeafa333", "size": 858, "status": "c"}, "model/resources/COMMODEL3.png|1761909824.0|1932183": {"hash": "a5701bfe830292ec01b1736196be07073188fefe8156e8b02e3a00c5545bdab7", "size": 1932183, "status": "c"}, "model/resources/STRMODEL.png|1761909824.0|1145437": {"hash": "8e73a5af18011ddaf9ab1f9be8dffbb4f16d0b2f868eb8d2cd99a0bed30c4fc5", "size": 1145437, "status": "c"}, "model/resources/bibtex.txt|1761909824.0|656": {"hash": "d7d885460ea39cb1fe978316e1b8bd7b7f7c46810d1214884d77c7f15ecf99ab", "size": 656, "status": "c"}, "model/resources/paper.png|1761909824.0|385425": {"hash": "20a64285500fed54b07ecaaf2d0f4fc6921e1090db8f10a5c716e901e1660b0f", "size": 385425, "status": "c"}, "model/resources/scat1.png|1761909824.0|176863": {"hash": "a82b71a35e0d96539f7d5547070e950814ac34d9ed4b28439017b6b8782af412", "size": 176863, "status": "c"}, "model/resources/scatter2.png|1761909824.0|89750": {"hash": "2e444b2f16fde770d256bda6830f70ed19e428b7e0c23faa035ede52738bd28c", "size": 89750, "status": "c"}, "requirements.txt|1787730082.0|235": {"hash": "66a11309b03cfeb3426f386c93cb14cdfc96ec7ddc2cc8e42fb56ee94d77e467", "size": 235, "status": "c"}, "scripts/notebooks/P2PXML_Demonstration.ipynb|1761909824.0|68820": {"hash": "a00a385e812ff617920bbbad22ef7611675c78751668cb74a9d37130b67ce21c", "size": 68820, "status": "c"}, "scripts/notebooks/readme.md|1761909824.0|48": {"hash": "c97ac0d20cbccb1ba45100bbc4054a4827777d98161f8f230eb14dabfec8d545", "size": 48, "status": "c"}, "scripts/p2pxml_upstream.sh|1787728383.0|1130": {"hash": "586059764d165b18f9a8c8c6483086bbfb0b88659acf2ebb4919effcc8cdb0e3", "size": 1130, "status": "c"}, "scripts/smoke/P2PXML_Demonstration_SCNet.ipynb|1787728240.0|61895": {"hash": "411d0e3eabd5395432cbff1bf16ad664664b66fb7a2e50534e1f6a50bef46047", "size": 61895, "status": "c"}, "scripts/smoke/P2PXML_Demonstration_SCNet_output.ipynb|1787728242.0|30380": {"hash": "d405275edfe8a7e09edcc38934d896b0e875258ebc2789bfaa333c1314c89e94", "size": 30380, "status": "c"}, "scripts/smoke/antibodies/10-1074.pdb|1761909824.0|283500": {"hash": "309a8814ebca532df1c1430cd7f0ebe68cae45146339d374c839af75e4c93947", "size": 283500, "status": "c"}, "scripts/smoke/antigens/0013095_2_11.pdb|1761909824.0|310392": {"hash": "c8f174e5ad969c80ccd91fe8311352da71d5eac50a97363104136a94a9dbf069", "size": 310392, "status": "c"}, "scripts/smoke/graph_data/antibodies_10-1074.pt|1785378641.0|1587531": {"hash": "d4f91d4681b79ec48f23f7888e6cb15a59db7ff68da879355ae3b0dee7295b50", "size": 1587531, "status": "c"}, "scripts/smoke/graph_data/antigens_0013095_2_11.pt|1785378678.0|2016242": {"hash": "ac2432509e5dec3f719fcbe459845a99cd148f97ff2be0007cc986f6e9aa7a60", "size": 2016242, "status": "c"}, "scripts/training_runs/n50/0_best_model.pth|1785383438.0|275578880": {"hash": "1e1f64ddf64c4967e010701d68d13cf8cd1974edb593e0eafec0e74591eb1013", "size": 275578880, "status": "c"}, "conf/smoke_train_data/0_best_model.pth|1785379241.0|319488000": {"hash": "5f2a050f3de67c187330daad9310a782b95d7ea5b9b0512f0aecd29195c7369e", "size": 319488000, "status": "c"}, "scripts/training_runs/n50/0_best_model.pth.raysync.downloading|1787726780.0|0": {"hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "size": 0, "status": "c"}, "scripts/training_runs/n50/evaluation_results.csv|1785383440.0|1228": {"hash": "af403a719a9fae6e54394714423f275a3f5f6c58c77942537972550ff7192e28", "size": 1228, "status": "c"}, "scripts/training_runs/n50/train.log|1785383440.0|19507": {"hash": "3914d37dff0d99f198170cc229c2883cb532ef8c4e2d3f4f9523a83fadf0cd9a", "size": 19507, "status": "c"}, "weight/model_weights.pth|1718801186.0|2475531770": {"hash": "a0f9beb6e8bedb7b63a6e778c2e2cca1f18506356e76d4bd370607903fd667c2", "size": 2475531770, "status": "c"}}}
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Drug-Discovery-ENTC
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,303 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ frameworks:
3
+ - PyTorch
4
+ language:
5
+ - en
6
+ license: mit
7
+ tags:
8
+ - OneScience
9
+ - bioscience
10
+ - antibody-antigen-binding-affinity
11
+ - graph-neural-network
12
+ - P2PXML
13
+ tasks:
14
+ - regression
15
+ ---
16
+
17
+ <p align="center">
18
+ <strong>
19
+ <span style="font-size: 30px;">P2PXML</span>
20
+ </strong>
21
+ </p>
22
+
23
+ # Model Introduction
24
+
25
+ P2PXML is a deep geometric learning framework for predicting antibody-antigen binding affinity. The model jointly uses protein sequence information and three-dimensional PDB structural information from the antibody and antigen to predict binding affinity in terms of IC50.
26
+
27
+ Paper: [Deep geometric framework to predict antibody–antigen binding affinity](https://doi.org/10.1016/j.jsb.2025.108257)
28
+
29
+ # Model Description
30
+
31
+ The P2PXML combined model consists of two parallel branches:
32
+
33
+ - **Structural branch:** Constructs antibody and antigen graphs from PDB atomic coordinates and extracts structural representations using GCN, GAT, and graph pooling;
34
+ - **Sequence branch:** Extracts amino acid sequences from PDB files, performs one-hot encoding, and uses attention, Transformer, and cross-attention modules to model sequence-level and interaction representations;
35
+ - **Fusion output:** Combines the regression outputs of the structural and sequence branches to predict antibody-antigen binding affinity.
36
+
37
+ The model takes one antibody PDB file and one antigen PDB file as input.
38
+
39
+ The maximum sequence lengths supported by the official demonstration model are:
40
+
41
+ - Antibody: 669 amino acids;
42
+ - Antigen: 3102 amino acids.
43
+
44
+ # Use Cases
45
+
46
+ | Use Case | Description |
47
+ | :---: | :--- |
48
+ | Antibody-antigen binding affinity prediction | Predict IC50 from antibody and antigen PDB structures. |
49
+ | Antibody candidate screening | Compare the predicted affinity trends of multiple antibody-antigen structure pairs. |
50
+ | Model compatibility validation | Validate PyTorch Geometric inference and training in the SCNet DCU environment. |
51
+ | P2PXML method reproduction | Perform training or evaluation using the official P2PXML_Structure dataset. |
52
+
53
+ # Usage
54
+
55
+ ## 1. OneCode
56
+
57
+ You can use the OneCode online environment for an intelligent one-click AI4S programming experience:
58
+
59
+ [Try OneCode for AI4S Programming](https://web-2069360198568017922-iaaj.ksai.scnet.cn:58043/home)
60
+
61
+ ## 2. Manual Installation
62
+
63
+ ### Hardware Requirements
64
+
65
+ - The model supports CPU as well as CUDA-, ROCm-, and DTK-compatible accelerator devices supported by PyTorch;
66
+ - GPU or DCU is recommended for inference and training;
67
+ - CPU can be used for functional validation, but PDB graph construction and model computation are significantly slower;
68
+ - The model and graph features use `float64`, so actual device-memory and host-memory requirements depend on the number of atoms in the antibody and antigen structures and on the training batch size;
69
+ - Full-dataset training generates graph caches and checkpoints and therefore requires substantially more disk space than single-sample inference.
70
+
71
+ ### Download the Model Package
72
+
73
+ Install the Hugging Face command-line tool and download the model package containing the adapted code, pretrained weights, and example data:
74
+
75
+ ```bash
76
+ python -m pip install -U huggingface_hub
77
+
78
+ hf download OneScience-Group/P2PXML --local-dir ./P2PXML
79
+ cd P2PXML
80
+ ```
81
+
82
+ All commands below should be executed from the repository root unless otherwise specified.
83
+
84
+ ### Install the Runtime Environment
85
+
86
+ **DCU Environment**
87
+
88
+ ```bash
89
+ # Activate DTK and Conda first
90
+ conda create -n onescience311 python=3.11 -y
91
+ conda activate onescience311
92
+
93
+ pip install onescience[bio-dcu] \
94
+ -i http://mirrors.onescience.ai:3141/pypi/simple/ \
95
+ --trusted-host mirrors.onescience.ai
96
+ ```
97
+ **GPU Environment**
98
+
99
+ ```bash
100
+ # Activate Conda first
101
+ conda create -n onescience311 python=3.11 -y
102
+ conda activate onescience311
103
+
104
+ python -m pip install "onescience[bio-gpu]" \
105
+ -i http://mirrors.onescience.ai:3141/pypi/simple/ \
106
+ --trusted-host mirrors.onescience.ai
107
+ ```
108
+ Install the additional dependencies required by P2PXML:
109
+
110
+ ```bash
111
+ python -m pip install -r requirements.txt
112
+ ```
113
+
114
+ If an independent Jupyter kernel is required, register one with:
115
+
116
+ ```bash
117
+ python -m ipykernel install \
118
+ --user \
119
+ --name evo_bio \
120
+ --display-name "Python (onescience311)"
121
+ ```
122
+
123
+ ### Weights and Data Preparation
124
+
125
+ The main assets included in the Hugging Face model package are:
126
+
127
+ | Asset | Location | Purpose |
128
+ | --- | --- | --- |
129
+ | Official combined-model weights | `weight/model_weights.pth` | Antibody-antigen binding affinity inference |
130
+ | Official antibody example | `conf/data/10-1074.pdb` | Quick-inference antibody input |
131
+ | Official antigen example | `conf/data/0013095_2_11.pdb` | Quick-inference antigen input |
132
+ | SCNet inference notebook | `scripts/smoke/P2PXML_Demonstration_SCNet.ipynb` | Local-weight and PDB inference |
133
+ | Structural training data | `conf/P2PXML_Structure/` | Real-data subset or full-dataset training |
134
+
135
+ The complete official dataset is available from Zenodo:
136
+
137
+ https://zenodo.org/records/11531319
138
+
139
+ The current local `P2PXML_structure.csv` contains:
140
+
141
+ - 8,475 antibody-antigen records;
142
+ - 655 antibody PDB structures;
143
+ - 469 antigen PDB structures.
144
+
145
+ ### Basic DCU/PyG Validation
146
+
147
+ Use the following script to verify PyTorch, PyTorch Geometric, GCN, GAT, and accelerator execution:
148
+
149
+ ```bash
150
+ python - <<'PY'
151
+ import torch
152
+ import torch_geometric
153
+ from torch_geometric.nn import GATConv, GCNConv
154
+
155
+ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
156
+
157
+ x = torch.randn(
158
+ 4,
159
+ 4,
160
+ dtype=torch.float64,
161
+ device=device,
162
+ )
163
+
164
+ edge_index = torch.tensor(
165
+ [[0, 1, 2, 3, 0, 2], [1, 0, 3, 2, 2, 0]],
166
+ dtype=torch.long,
167
+ device=device,
168
+ )
169
+
170
+ gcn = GCNConv(4, 8).to(device).double()
171
+ gat = GATConv(4, 8, heads=2).to(device).double()
172
+
173
+ print("torch:", torch.__version__)
174
+ print("torch_geometric:", torch_geometric.__version__)
175
+ print("device:", device)
176
+ print("GCN:", gcn(x, edge_index).shape)
177
+ print("GAT:", gat(x, edge_index).shape)
178
+ PY
179
+ ```
180
+
181
+ ### Quick Inference
182
+
183
+ Run the inference notebook on a DCU compute node with the complete DTK dynamic-library environment loaded:
184
+
185
+ ```bash
186
+ export P2PXML_ROOT=$PWD
187
+ cd scripts/smoke
188
+
189
+ P2PXML_ROOT="$P2PXML_ROOT" \
190
+ jupyter nbconvert \
191
+ --to notebook \
192
+ --execute P2PXML_Demonstration_SCNet.ipynb \
193
+ --output P2PXML_Demonstration_SCNet_output.ipynb \
194
+ --ExecutePreprocessor.kernel_name=evo_bio \
195
+ --ExecutePreprocessor.timeout=-1
196
+ ```
197
+
198
+ After successful execution, the resulting notebook is saved as:
199
+
200
+ ```text
201
+ scripts/smoke/P2PXML_Demonstration_SCNet_output.ipynb
202
+ ```
203
+
204
+ The warning:
205
+
206
+ ```text
207
+ IProgress not found
208
+ ```
209
+
210
+ only affects notebook progress-bar display and does not affect the inference results.
211
+
212
+ ### Real-Data Subset Training
213
+
214
+ The script:
215
+
216
+ ```text
217
+ model/integrated_model_v1_dataset_smoke.py
218
+ ```
219
+
220
+ supports selecting the number of training samples, number of epochs, output directory, and initialization checkpoint through environment variables.
221
+
222
+ The following example trains on 50 real structural records for one epoch:
223
+
224
+ ```bash
225
+ cd "$P2PXML_ROOT"
226
+
227
+ P2PXML_DATA_LIMIT=50 \
228
+ P2PXML_EPOCHS=1 \
229
+ P2PXML_RUN_DIR=./scripts/training_runs/n50 \
230
+ P2PXML_INIT_CHECKPOINT=./weight/model_weights.pth \
231
+ python model/integrated_model_v1_dataset_smoke.py
232
+ ```
233
+
234
+ The current upstream Dataset implementation recursively switches to the next sample when graph construction fails.
235
+
236
+ As a result, this training workflow can complete even when individual samples fail, but some effective training samples may be repeated.
237
+
238
+ Therefore, this run should only be interpreted as validation that the real-data training pipeline is executable.
239
+
240
+ It should not be treated as:
241
+
242
+ - A strict training-performance benchmark;
243
+ - A complete data-integrity validation;
244
+ - A final accuracy result.
245
+
246
+ ### Full-Dataset Single-Epoch Training
247
+
248
+ To run one epoch on the complete structural dataset:
249
+
250
+ ```bash
251
+ cd "$P2PXML_ROOT"
252
+
253
+ P2PXML_DATA_LIMIT=0 \
254
+ P2PXML_EPOCHS=1 \
255
+ P2PXML_RUN_DIR=./scripts/training_runs/full_epoch1 \
256
+ P2PXML_INIT_CHECKPOINT=./weight/model_weights.pth \
257
+ python model/integrated_model_v1_dataset_smoke.py
258
+ ```
259
+
260
+ Before running full-dataset training, verify that every `Ab` and `Ag` identifier in the CSV file has a corresponding PDB structure and handle any missing or invalid structures.
261
+
262
+ Initial graph construction computes pairwise distances between PDB atoms, with computational complexity approaching:
263
+
264
+ ```text
265
+ O(N²)
266
+ ```
267
+
268
+ The generated graph data is cached under:
269
+
270
+ ```text
271
+ conf/P2PXML_Structure/graph_data/
272
+ ```
273
+
274
+ Therefore, the first complete training run has substantially higher runtime and disk-space requirements than subsequent epochs.
275
+
276
+ It is recommended to retain the graph cache and gradually scale validation from:
277
+
278
+ ```text
279
+ 50 samples
280
+ → 500 samples
281
+ → full dataset
282
+ ```
283
+
284
+ before running complete training.
285
+
286
+ # OneScience Official Resources
287
+
288
+ | Platform | OneScience Main Repository | Skills Repository |
289
+ | --- | --- | --- |
290
+ | Gitee | https://gitee.com/onescience-ai/onescience | https://gitee.com/onescience-ai/oneskills |
291
+ | GitHub | https://github.com/onescience-ai/OneScience | https://github.com/onescience-ai/oneskills |
292
+
293
+ # Citation and License
294
+
295
+ - Paper: [Deep geometric framework to predict antibody–antigen binding affinity](https://doi.org/10.1016/j.jsb.2025.108257)
296
+ - Official implementation: https://github.com/Drug-Discovery-ENTC/p2pxml
297
+ - Official dataset: [P2PXML Dataset](https://zenodo.org/records/11531319)
298
+
299
+ The upstream P2PXML source code is distributed under the MIT License.
300
+
301
+ The official P2PXML notebook states that the dataset is distributed under the CC BY-NC-SA 4.0 license. Users must comply with the corresponding attribution, non-commercial-use, and share-alike requirements when using or redistributing the dataset.
302
+
303
+ This Hugging Face model package provides runtime adaptation and directory organization based on the official implementation. It does not modify or extend the original copyright status, licenses, or terms of use of the paper, source code, model weights, datasets, or other third-party resources.
conf/P2PXML_Structure/.DS_Store ADDED
Binary file (14.3 kB). View file
 
conf/P2PXML_Structure/P2PXML_structure.csv ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/README.md ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # P2PXML-PDB Dataset
2
+
3
+ To support the development of antibody-antigen binding affinity prediction frameworks, we curated the largest and most generalized datasets for antibody-antigen binding affinity prediction in the literature. To this end, P2PXML-PDB is the curated protein structure dataset.
4
+
5
+ ## Abstract from the accompanied paper [https://www.biorxiv.org/content/early/2024/06/10/2024.06.09.598103](Paper):
6
+
7
+ In the context of drug development, the efficacy of drugs designed using biologics depends on the strength of the interactions between the biologics and the target molecule. In practise, these strengths of the interactions are measured using binding affinity and thus, understanding the binding affinity between an engineered antibody and its target antigen is a critical aspect of antibody engineering as it reflects the overall effectiveness of the antibody in inhibiting the activity of the target antigen. In theory, potential candidate antibodies have a higher binding affinity towards the target antigen. Currently, techniques such as Molecular docking and Molecular dynamics are utilized in quantifying the binding affinity. However, owing to the computational complexity of the aforementioned techniques, running simulations for large antibodies/antigens remains a daunting task. Despite the commendable improvements in deep learning-based binding affinity prediction, such approaches are highly dependent on the quality of the antibody-antigen structures and they tend to overlook the importance of capturing the evolutionary details of proteins upon mutation. Further, most of the existing datasets for the task only include antibody-antigen pairs related to one antigen variant and thus, not suitable for developing comprehensive data-driven approaches. To circumvent the said complexities, we first curate the largest and most generalized datasets for antibody-antigen binding affinity prediction, consisting both protein sequences and structures, in the literature and then propose a deep geometric neural network comprising a structure-based model and a sequence-based model that considers both atomistic and evolutionary details when predicting the binding affinity. The proposed framework exhibited a $10\%$ improvement in mean absolute error compared to the state-of-the-art models while showing a very strong correlation between the predictions and target values. We release the datasets and code publicly [https://drug-discovery-entc.github.io/p2pxml/](web-page) to support the development of antibody-antigen binding affinity prediction frameworks for the benefit of science and society.
8
+
9
+ ## Dataset Overview
10
+
11
+ Data include binding affinity values (in terms of IC50 value) between a diverse sets of antibodies and antigens. To our knowledge, this dataset is the largest, publicly-available dataset that contains antibody structures, antigen structures and quantitative measurements and provides an opportunity to serve as a benchmark to evaluate generalized and data-driven antibody-antigen binding affinity prediction frameworks.
12
+
13
+ P2PXML-PDB dataset has two folders, named "antibodies" and "antigens", and a csv file with the following columns entries:
14
+
15
+ | **Variable Name** | **Description** |
16
+ | ------------------------ | ------------- |
17
+ | Ab | Antibody name |
18
+ | Ag | Antigen name |
19
+ | IC50| The binding affinity between the corresponding antibody and antigen |
20
+ | log(IC50) | Logarithmic (to base 10) value of the corresponding IC50 |
21
+
22
+ The antibody and antigen structures (in PDB format), which are corresponding to the names in the "Ab" and "Ag" columns, are in the respective folders.
23
+
24
+ ## Citation
25
+
26
+ @article {Bandara2024.06.09.598103,
27
+ author = {Bandara, Nuwan Sriyantha and Premathilaka, Dasun and Chandanayake, Sachini and Hettiarachchi, Sahan and Varenthirarajah, Vithurshan and Munasinghe, Aravinda and Madhawa, Kaushalya and Charles, Subodha},
28
+ title = {Deep Geometric Framework to Predict Antibody-Antigen Binding Affinity},
29
+ elocation-id = {2024.06.09.598103},
30
+ year = {2024},
31
+ doi = {10.1101/2024.06.09.598103},
32
+ publisher = {Cold Spring Harbor Laboratory},
33
+ URL = {https://www.biorxiv.org/content/early/2024/06/10/2024.06.09.598103},
34
+ eprint = {https://www.biorxiv.org/content/early/2024/06/10/2024.06.09.598103.full.pdf},
35
+ journal = {bioRxiv}
36
+ }
37
+
38
+
39
+ ## License
40
+
41
+
42
+ Shield: [![CC BY-NC-SA 4.0][cc-by-nc-sa-shield]][cc-by-nc-sa]
43
+
44
+ This work is licensed under a
45
+ [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License][cc-by-nc-sa].
46
+
47
+ [![CC BY-NC-SA 4.0][cc-by-nc-sa-image]][cc-by-nc-sa]
48
+
49
+ [cc-by-nc-sa]: http://creativecommons.org/licenses/by-nc-sa/4.0/
50
+ [cc-by-nc-sa-image]: https://licensebuttons.net/l/by-nc-sa/4.0/88x31.png
51
+ [cc-by-nc-sa-shield]: https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-lightgrey.svg
52
+
53
+
54
+ ## Disclaimer
55
+
56
+ DISTRIBUTION STATEMENT A. Approved for public release. Distribution is unlimited.
57
+
58
+ Any opinions, findings, conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the affiliated institutions of the author(s).
59
+
60
+ © 2024 P2PXML Team.
61
+
conf/P2PXML_Structure/antibodies/.DS_Store ADDED
Binary file (38.9 kB). View file
 
conf/P2PXML_Structure/antibodies/0.5γ.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/10-1074.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/10-1121.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/10-1130.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/10-1146.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/10-1341.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/10-1369.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/10-259.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/10-303.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/10-410.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/10-847.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/10-996.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/17b.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/2909.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/3BC176.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/3BC315.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/49G2.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/4E9C.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/916B2.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/917B11.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/ABSe0002.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/ABSe0003.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/ABSe0006.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/ABSe0007.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/ABSe0008.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/ABSe0009.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/ABSe0010.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/ABSe0011.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/ABSe0012.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/ABSe0013.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/ABSe0014.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/ABSe0015.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/ABSe0016.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/ABSe0017.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/ABSe0018.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/ABSe0020.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/ABSe0021.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/ABSe0022.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/ABSe0023.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/ABSe0024.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/ABSe0026.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/ABSe0028.pdb ADDED
The diff for this file is too large to render. See raw diff
 
conf/P2PXML_Structure/antibodies/ABSe0029.pdb ADDED
The diff for this file is too large to render. See raw diff