-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdiffdock_final.py
More file actions
42 lines (38 loc) · 1.52 KB
/
diffdock_final.py
File metadata and controls
42 lines (38 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
from itertools import islice
import subprocess
import glob
import os
import re
from itertools import product
def run_diff():
for file in glob.glob(f"/home/aiman/p53_docking/peptides/*.sdf"):
pep_str = file[33:36]
print("ANALYSING:", pep_str)
parameter_args = ['/home/aiman/virtualenvs/diffdock/bin/python',
'-m',
"inference",
'--protein_path',
"/home/aiman/DiffDock/3JZK.pdb",
'--ligand',
file,
'--out_dir',
"/home/aiman/p53_docking/mdm2_results/",
'--complex_name',
f'{pep_str}',
#change parameters according to preference
'--inference_steps',
'80',
'--samples_per_complex',
'15']
os.chdir("/home/aiman/DiffDock/")
parameter_out = subprocess.check_output(parameter_args)
# break
# break
# run_diff()
#Print rank1 for every peptide
print("peptide,conf")
for file in glob.glob(f"/home/aiman/p53_docking/mdm2_results/*/rank1_confidence*.sdf"):
# print(file)
m = re.search('^/home/aiman/p53_docking/mdm2_results/(\w{3})/rank1_confidence(.+)\.sdf', file)
if m:
print(f'{m.group(1)},{m.group(2)}')