Spaces:
Running
on
T4
Running
on
T4
simonduerr
commited on
Commit
•
f5e3ed9
1
Parent(s):
7aedea4
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,7 @@ import warnings
|
|
5 |
import copy
|
6 |
import random
|
7 |
import re
|
|
|
8 |
|
9 |
import os.path
|
10 |
|
@@ -331,8 +332,9 @@ def preprocess_mol(pdb_code="", filepath=""):
|
|
331 |
mol = Molecule(f"{pdb_code}.pdb")
|
332 |
|
333 |
print("print molecule loaded")
|
334 |
-
random_dir =
|
335 |
-
|
|
|
336 |
# clean messy files and only include protein itself
|
337 |
mol.filter("protein")
|
338 |
# renumber using moleculekit 0...len(protein)
|
@@ -346,9 +348,9 @@ def preprocess_mol(pdb_code="", filepath=""):
|
|
346 |
j += 1
|
347 |
df["proteinMPNN_index"] = indexes
|
348 |
|
349 |
-
mol.write(f"{random_dir
|
350 |
|
351 |
-
return f"{random_dir
|
352 |
|
353 |
|
354 |
def assign_sasa(mol):
|
|
|
5 |
import copy
|
6 |
import random
|
7 |
import re
|
8 |
+
import datetime
|
9 |
|
10 |
import os.path
|
11 |
|
|
|
332 |
mol = Molecule(f"{pdb_code}.pdb")
|
333 |
|
334 |
print("print molecule loaded")
|
335 |
+
random_dir = f"jobs/{datetime.now().isoformat()}"
|
336 |
+
os.system(f"mkdir -p {random_dir}")
|
337 |
+
mol.write(f"{random_dir}/original.pdb")
|
338 |
# clean messy files and only include protein itself
|
339 |
mol.filter("protein")
|
340 |
# renumber using moleculekit 0...len(protein)
|
|
|
348 |
j += 1
|
349 |
df["proteinMPNN_index"] = indexes
|
350 |
|
351 |
+
mol.write(f"{random_dir}/cleaned.pdb")
|
352 |
|
353 |
+
return f"{random_dir}/cleaned.pdb", df, f"{random_dir}/original.pdb"
|
354 |
|
355 |
|
356 |
def assign_sasa(mol):
|