@@ -613,19 +613,19 @@ def create_docking(receptor_name: str, ligand_name: str, docking_pdb_path: str):
613
613
receptor_name = receptor_name [:receptor_name .index ('.' )]
614
614
command = ['ls ' + 'AF2_' + receptor_name + '*.pdb' ]
615
615
completed_process = subprocess .run (command ,
616
- shell = True ,
617
- cwd = receptor_folder ,
618
- stdout = subprocess .PIPE ,
619
- stderr = subprocess .PIPE ,
620
- text = True )
616
+ shell = True ,
617
+ cwd = receptor_folder ,
618
+ stdout = subprocess .PIPE ,
619
+ stderr = subprocess .PIPE ,
620
+ text = True )
621
621
if completed_process .returncode != 0 :
622
622
print ("Receptor file not found" )
623
623
# return "Receptor file not found"
624
624
receptor_file = completed_process .stdout [:- 1 ]
625
-
625
+
626
626
receptor_file_path = receptor_folder + receptor_file
627
627
receptor_name = receptor_file [4 :(receptor_file .index ('.' ) + 2 )]
628
-
628
+
629
629
results_path = docking_pdb_path + receptor_name + '_' + ligand_name + '/'
630
630
print (results_path )
631
631
@@ -635,12 +635,6 @@ def create_docking(receptor_name: str, ligand_name: str, docking_pdb_path: str):
635
635
return [None , results_path ]
636
636
receptor = Docker .create_receptor (receptor_name , receptor_file_path )
637
637
638
- # for receptor_file in os.listdir(receptor_folder):
639
- # if receptor_file[0] != '.' and receptor_file[-4:] == '.pdb' and \
640
- # (receptor_name in receptor_file):
641
- # receptor_file_path = receptor_folder + receptor_file
642
- # receptor = Docker.create_receptor(receptor_name, receptor_file_path)
643
-
644
638
# find ligand file and create ligand object
645
639
ligand_folder = '/DATA/HEX_API/HEX_SELECTED_LIGANDS/'
646
640
ligand_file_found = False
@@ -652,7 +646,7 @@ def create_docking(receptor_name: str, ligand_name: str, docking_pdb_path: str):
652
646
ligand_file_found = True
653
647
ligand_file_path = ligand_folder + '/' + ligand_file
654
648
ligand = Ligand (ligand_name , ligand_file_path )
655
-
649
+
656
650
if not ligand_file_found :
657
651
return "Ligand file not found"
658
652
@@ -736,6 +730,3 @@ def create_mapping_unfiltered(self, folder_path: str, results_path: str):
736
730
with open (json_file , 'w' ) as file :
737
731
file .write (json .dumps (mapped_sdf ))
738
732
return mapped_sdf
739
-
740
- # if __name__ == "__main__":
741
- # Docker.start("AT3G22150", "801_Auxin", "/DATA/HEX_API/RESULTS/")
0 commit comments