Spaces:
Running
Running
Commit
·
3713ecb
1
Parent(s):
8027e0e
test
Browse files- app.py +5 -2
- workdir/gradio/1a0q_ligand.sdf +96 -0
- workdir/gradio/1a0q_protein.pdb +0 -0
app.py
CHANGED
@@ -108,9 +108,7 @@ def get_models(model_config, model_dir, checkpoint):
|
|
108 |
return model
|
109 |
|
110 |
def mbp_scoring(ligand_path, protein_path):
|
111 |
-
model_config = get_config(model_dir)
|
112 |
data_example = get_data(model_config, ligand_path, protein_path)
|
113 |
-
model = get_models(model_config, model_dir, checkpoint)
|
114 |
_, (affinity_pred_IC50, affinity_pred_K), _ = model(data_example, ASRP=False)
|
115 |
return affinity_pred_IC50.item(), affinity_pred_K.item()
|
116 |
|
@@ -131,4 +129,9 @@ with gr.Blocks() as demo:
|
|
131 |
submit_btn = gr.Button("Submit")
|
132 |
submit_btn.click(fn=test, inputs=[ligand, protein], outputs=[IC50, K], api_name="MBP_Scoring")
|
133 |
|
|
|
|
|
|
|
|
|
134 |
demo.launch()
|
|
|
|
108 |
return model
|
109 |
|
110 |
def mbp_scoring(ligand_path, protein_path):
|
|
|
111 |
data_example = get_data(model_config, ligand_path, protein_path)
|
|
|
112 |
_, (affinity_pred_IC50, affinity_pred_K), _ = model(data_example, ASRP=False)
|
113 |
return affinity_pred_IC50.item(), affinity_pred_K.item()
|
114 |
|
|
|
129 |
submit_btn = gr.Button("Submit")
|
130 |
submit_btn.click(fn=test, inputs=[ligand, protein], outputs=[IC50, K], api_name="MBP_Scoring")
|
131 |
|
132 |
+
model_config = get_config(model_dir)
|
133 |
+
data_example = get_data(model_config, './workdir/gradio/1a0q_ligand.sdf', './workdir/gradio/1a0q_protein.pdb')
|
134 |
+
model = get_models(model_config, model_dir, checkpoint)
|
135 |
+
|
136 |
demo.launch()
|
137 |
+
|
workdir/gradio/1a0q_ligand.sdf
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
1a0q_ligand
|
2 |
+
-I-interpret-
|
3 |
+
|
4 |
+
45 45 0 0 0 0 0 0 0 0999 V2000
|
5 |
+
13.3050 20.7000 59.4050 C 0 0 0 0 0
|
6 |
+
12.4520 19.8420 58.4700 C 0 0 0 0 0
|
7 |
+
12.0320 18.5340 59.1240 C 0 0 0 0 0
|
8 |
+
11.2470 17.6310 58.1880 C 0 0 0 0 0
|
9 |
+
12.1070 17.1040 57.0260 C 0 0 0 0 0
|
10 |
+
14.7350 20.9920 55.3470 C 0 0 0 0 0
|
11 |
+
15.1480 21.1380 54.0250 C 0 0 0 0 0
|
12 |
+
16.3840 21.7100 53.7410 C 0 0 0 0 0
|
13 |
+
17.2110 22.1400 54.7700 C 0 0 0 0 0
|
14 |
+
16.7990 21.9980 56.0940 C 0 0 0 0 0
|
15 |
+
15.5620 21.4200 56.3890 C 0 0 0 0 0
|
16 |
+
12.7980 20.9330 61.8050 C 0 0 0 0 0
|
17 |
+
11.7430 20.6960 64.1740 C 0 0 0 0 0
|
18 |
+
11.8610 21.4970 62.8700 C 0 0 0 0 0
|
19 |
+
11.1530 19.2930 64.0350 C 0 0 0 0 0
|
20 |
+
12.9990 22.5100 57.5130 O 0 0 0 0 0
|
21 |
+
14.5790 22.9640 59.4710 O 0 0 0 0 0
|
22 |
+
15.1750 21.2220 57.7500 O 0 0 0 0 0
|
23 |
+
13.7620 20.2300 62.1210 O 0 0 0 0 0
|
24 |
+
11.9380 18.3450 64.0180 O 0 0 0 0 0
|
25 |
+
9.9630 19.1340 64.3110 O 0 0 0 0 0
|
26 |
+
12.4830 21.1820 60.5180 N 0 0 0 0 0
|
27 |
+
13.9840 22.0210 58.4990 P 0 0 0 0 0
|
28 |
+
14.1209 20.1098 59.8222 H 0 0 0 0 0
|
29 |
+
13.0452 19.6068 57.5863 H 0 0 0 0 0
|
30 |
+
11.5516 20.4026 58.2187 H 0 0 0 0 0
|
31 |
+
11.3891 18.7761 59.9703 H 0 0 0 0 0
|
32 |
+
12.9373 18.0028 59.4179 H 0 0 0 0 0
|
33 |
+
10.4279 18.2128 57.7653 H 0 0 0 0 0
|
34 |
+
10.8936 16.7746 58.7623 H 0 0 0 0 0
|
35 |
+
12.4856 17.9452 56.4453 H 0 0 0 0 0
|
36 |
+
12.9436 16.5309 57.4257 H 0 0 0 0 0
|
37 |
+
11.4989 16.4640 56.3868 H 0 0 0 0 0
|
38 |
+
13.7665 20.5438 55.5690 H 0 0 0 0 0
|
39 |
+
14.5026 20.8040 53.2126 H 0 0 0 0 0
|
40 |
+
16.7048 21.8211 52.7052 H 0 0 0 0 0
|
41 |
+
18.1789 22.5870 54.5433 H 0 0 0 0 0
|
42 |
+
17.4450 22.3395 56.9028 H 0 0 0 0 0
|
43 |
+
11.0658 21.2543 64.8204 H 0 0 0 0 0
|
44 |
+
12.7572 20.5695 64.5528 H 0 0 0 0 0
|
45 |
+
10.8656 21.4978 62.4257 H 0 0 0 0 0
|
46 |
+
12.2711 22.4677 63.1487 H 0 0 0 0 0
|
47 |
+
15.1947 22.4925 60.0369 H 0 0 0 0 0
|
48 |
+
9.5112 19.9802 64.2737 H 0 0 0 0 0
|
49 |
+
11.6440 21.7243 60.3121 H 0 0 0 0 0
|
50 |
+
1 23 1 0 0 0
|
51 |
+
1 22 1 0 0 0
|
52 |
+
1 2 1 0 0 0
|
53 |
+
2 3 1 0 0 0
|
54 |
+
3 4 1 0 0 0
|
55 |
+
4 5 1 0 0 0
|
56 |
+
22 12 1 0 0 0
|
57 |
+
12 19 2 0 0 0
|
58 |
+
12 14 1 0 0 0
|
59 |
+
14 13 1 0 0 0
|
60 |
+
13 15 1 0 0 0
|
61 |
+
15 20 2 0 0 0
|
62 |
+
15 21 1 0 0 0
|
63 |
+
23 16 2 0 0 0
|
64 |
+
23 17 1 0 0 0
|
65 |
+
23 18 1 0 0 0
|
66 |
+
18 11 1 0 0 0
|
67 |
+
11 10 4 0 0 0
|
68 |
+
11 6 4 0 0 0
|
69 |
+
6 7 4 0 0 0
|
70 |
+
7 8 4 0 0 0
|
71 |
+
8 9 4 0 0 0
|
72 |
+
9 10 4 0 0 0
|
73 |
+
1 24 1 0 0 0
|
74 |
+
2 25 1 0 0 0
|
75 |
+
2 26 1 0 0 0
|
76 |
+
3 27 1 0 0 0
|
77 |
+
3 28 1 0 0 0
|
78 |
+
4 29 1 0 0 0
|
79 |
+
4 30 1 0 0 0
|
80 |
+
5 31 1 0 0 0
|
81 |
+
5 32 1 0 0 0
|
82 |
+
5 33 1 0 0 0
|
83 |
+
6 34 1 0 0 0
|
84 |
+
7 35 1 0 0 0
|
85 |
+
8 36 1 0 0 0
|
86 |
+
9 37 1 0 0 0
|
87 |
+
10 38 1 0 0 0
|
88 |
+
13 39 1 0 0 0
|
89 |
+
13 40 1 0 0 0
|
90 |
+
14 41 1 0 0 0
|
91 |
+
14 42 1 0 0 0
|
92 |
+
17 43 1 0 0 0
|
93 |
+
21 44 1 0 0 0
|
94 |
+
22 45 1 0 0 0
|
95 |
+
M END
|
96 |
+
$$$$
|
workdir/gradio/1a0q_protein.pdb
ADDED
The diff for this file is too large to render.
See raw diff
|
|