Ninjani commited on
Commit
46e55cb
·
1 Parent(s): c4533fb

pdb file only -_-

Browse files
Files changed (1) hide show
  1. inference_app.py +7 -3
inference_app.py CHANGED
@@ -14,6 +14,7 @@ import pandas as pd
14
  from biotite.structure import centroid, from_template
15
  from biotite.structure.io import load_structure
16
  from biotite.structure.io.mol import MOLFile, SDFile
 
17
 
18
  from plinder.eval.docking.write_scores import evaluate
19
 
@@ -95,10 +96,13 @@ def predict(
95
  Path(input_protein).parent,
96
  max_num_poses=max_num_poses,
97
  )
98
- print(docking_poses)
99
  end_time = time.time()
100
  run_time = end_time - start_time
101
- return [input_protein.name, str(docking_poses[0])], run_time
 
 
 
 
102
 
103
 
104
  def get_metrics(
@@ -186,7 +190,7 @@ with gr.Blocks() as app:
186
  "color": "greenCarbon",
187
  },
188
  ]
189
- smiles = molecule2d(input_ligand)
190
  out = Molecule3D(reps=reps)
191
  run_time = gr.Textbox(label="Runtime")
192
 
 
14
  from biotite.structure import centroid, from_template
15
  from biotite.structure.io import load_structure
16
  from biotite.structure.io.mol import MOLFile, SDFile
17
+ from biotite.structure.io.pdb import PDBFile
18
 
19
  from plinder.eval.docking.write_scores import evaluate
20
 
 
96
  Path(input_protein).parent,
97
  max_num_poses=max_num_poses,
98
  )
 
99
  end_time = time.time()
100
  run_time = end_time - start_time
101
+ pdb_file = PDBFile()
102
+ pdb_file.set_structure(receptor)
103
+ output_pdb = Path(input_protein).parent / "receptor.pdb"
104
+ pdb_file.write(output_pdb)
105
+ return [str(output_pdb), str(docking_poses[0])], run_time
106
 
107
 
108
  def get_metrics(
 
190
  "color": "greenCarbon",
191
  },
192
  ]
193
+ # smiles = molecule2d(input_ligand)
194
  out = Molecule3D(reps=reps)
195
  run_time = gr.Textbox(label="Runtime")
196