Spaces:
Runtime error
Runtime error
simonduerr
commited on
Commit
·
1c9254d
1
Parent(s):
3920349
Update app.py
Browse files
app.py
CHANGED
@@ -50,7 +50,7 @@ def update(inp, file, mode, custom_resids, clustering_threshold):
|
|
50 |
filepath = f"files/{pdb_file}.pdb"
|
51 |
else:
|
52 |
return "pdb code must be 4 letters or Uniprot code does not match", ""
|
53 |
-
|
54 |
if mode == "All residues":
|
55 |
ids = get_all_protein_resids(filepath)
|
56 |
elif len(custom_resids)!=0:
|
@@ -81,22 +81,22 @@ def update(inp, file, mode, custom_resids, clustering_threshold):
|
|
81 |
bb,
|
82 |
probability_values,
|
83 |
box_N,
|
84 |
-
outname=f"output/metal_{
|
85 |
gridres=gridres,
|
86 |
)
|
87 |
message = find_unique_sites(
|
88 |
probability_values,
|
89 |
grid,
|
90 |
writeprobes=True,
|
91 |
-
probefile=f"output/probes_{
|
92 |
threshold=7,
|
93 |
p=clustering_threshold,
|
94 |
)
|
95 |
|
96 |
return message, molecule(
|
97 |
filepath,
|
98 |
-
f"output/probes_{
|
99 |
-
f"output/metal_{
|
100 |
)
|
101 |
|
102 |
|
|
|
50 |
filepath = f"files/{pdb_file}.pdb"
|
51 |
else:
|
52 |
return "pdb code must be 4 letters or Uniprot code does not match", ""
|
53 |
+
identifier = os.path.basename(filepath)
|
54 |
if mode == "All residues":
|
55 |
ids = get_all_protein_resids(filepath)
|
56 |
elif len(custom_resids)!=0:
|
|
|
81 |
bb,
|
82 |
probability_values,
|
83 |
box_N,
|
84 |
+
outname=f"output/metal_{identifier}.cube",
|
85 |
gridres=gridres,
|
86 |
)
|
87 |
message = find_unique_sites(
|
88 |
probability_values,
|
89 |
grid,
|
90 |
writeprobes=True,
|
91 |
+
probefile=f"output/probes_{identifier}.pdb",
|
92 |
threshold=7,
|
93 |
p=clustering_threshold,
|
94 |
)
|
95 |
|
96 |
return message, molecule(
|
97 |
filepath,
|
98 |
+
f"output/probes_{identifier}.pdb",
|
99 |
+
f"output/metal_{identifier}.cube",
|
100 |
)
|
101 |
|
102 |
|