updated app
Browse files
app.py
CHANGED
@@ -4,13 +4,21 @@ import os
|
|
4 |
|
5 |
def runner(in_pdb, model_type):
|
6 |
out_fn = in_pdb.name[:-4] + "-all.pdb"
|
7 |
-
|
|
|
8 |
return out_fn
|
9 |
|
10 |
demo = gr.Interface(fn=runner,
|
11 |
-
inputs=["file",
|
|
|
|
|
12 |
outputs=["file"],
|
13 |
-
examples=[["1ab1_A.calpha.pdb", "CalphaBasedModel"],
|
14 |
-
["1ab1_A.residue.pdb", "ResidueBasedModel"],
|
15 |
-
["1ab1_A.
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
def runner(in_pdb, model_type):
|
6 |
out_fn = in_pdb.name[:-4] + "-all.pdb"
|
7 |
+
ckpt_fn = f"model/{model_type}.ckpt"
|
8 |
+
cg2all.convert_cg2all(in_pdb.name, out_fn, model_type=model_type, ckpt_fn=ckpt_fn)
|
9 |
return out_fn
|
10 |
|
11 |
demo = gr.Interface(fn=runner,
|
12 |
+
inputs=["file", \
|
13 |
+
gr.Radio(["CalphaBasedModel", "ResidueBasedModel", "CalphaCMModel", "BackboneModel",
|
14 |
+
"MainchainModel", "Martini", "PRIMO"])],
|
15 |
outputs=["file"],
|
16 |
+
examples=[["inputs/1ab1_A.calpha.pdb", "CalphaBasedModel"],
|
17 |
+
["inputs/1ab1_A.residue.pdb", "ResidueBasedModel"],
|
18 |
+
["inputs/1ab1_A.cacm.pdb", "CalphaCMModel"],
|
19 |
+
["inputs/1ab1_A.bb.pdb", "BackboneModel"],
|
20 |
+
["inputs/1ab1_A.mc.pdb", "MainchainModel"],
|
21 |
+
["inputs/1ab1_A.martini.pdb", "Martini"],
|
22 |
+
["inputs/1ab1_A.primo.pdb", "PRIMO"],
|
23 |
+
])
|
24 |
+
demo.launch()
|