Spaces:
Running
on
Zero
Running
on
Zero
Anton Bushuiev
commited on
Commit
·
cc0f00e
1
Parent(s):
5676685
Fix when '_' in pdb file name
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import copy
|
2 |
import random
|
3 |
import tempfile
|
|
|
4 |
from pathlib import Path
|
5 |
from functools import partial
|
6 |
|
@@ -49,6 +50,11 @@ def process_inputs(inputs, temp_dir):
|
|
49 |
|
50 |
# Prepare PDB input
|
51 |
if pdb_path:
|
|
|
|
|
|
|
|
|
|
|
52 |
pdb_path = Path(pdb_path)
|
53 |
else:
|
54 |
try:
|
|
|
1 |
import copy
|
2 |
import random
|
3 |
import tempfile
|
4 |
+
import shutil
|
5 |
from pathlib import Path
|
6 |
from functools import partial
|
7 |
|
|
|
50 |
|
51 |
# Prepare PDB input
|
52 |
if pdb_path:
|
53 |
+
# remove '-' chars from pdb name
|
54 |
+
new_pdb_path = temp_dir / f"pdb/{pdb_path.name.replace('_', '-')}"
|
55 |
+
new_pdb_path.parent.mkdir(parents=True, exist_ok=True)
|
56 |
+
shutil.copy(str(pdb_path), str(new_pdb_path))
|
57 |
+
pdb_path = new_pdb_path
|
58 |
pdb_path = Path(pdb_path)
|
59 |
else:
|
60 |
try:
|