Skip to content

Commit 0f87ff2

Browse files
committed
Add all PoseBusters Benchmark method interaction analyses in bulk
1 parent 1da3792 commit 0f87ff2

2 files changed

Lines changed: 34 additions & 7 deletions

File tree

1.47 MB
Loading

notebooks/posebusters_method_interaction_analysis_plotting.ipynb

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -329,12 +329,9 @@
329329
" ) + glob.glob(ligand_item_path)\n",
330330
" elif os.path.isdir(ligand_item_path) and \"_relaxed\" not in item:\n",
331331
" protein_pdb_filepath, ligand_sdf_filepath = None, None\n",
332-
" complex_filepaths = (\n",
333-
" glob.glob(os.path.join(protein_item_path, \"*rank1*.pdb\"))\n",
334-
" + glob.glob(os.path.join(protein_item_path, \"*idx_0*.pdb\"))\n",
335-
" + glob.glob(os.path.join(ligand_item_path, \"*rank1.sdf\"))\n",
336-
" + glob.glob(os.path.join(ligand_item_path, \"*idx_0*.sdf\"))\n",
337-
" )\n",
332+
" complex_filepaths = glob.glob(\n",
333+
" os.path.join(protein_item_path, \"*rank1*.pdb\")\n",
334+
" ) + glob.glob(os.path.join(ligand_item_path, \"*rank1.sdf\"))\n",
338335
" if not len(complex_filepaths) == 2:\n",
339336
" # NOTE: this handles DiffDock and TULIP's output formats\n",
340337
" complex_filepaths = glob.glob(f\"{protein_item_path}.pdb\") + glob.glob(\n",
@@ -350,7 +347,37 @@
350347
" complex_filepaths = glob.glob(f\"{protein_item_path}.pdb\") + glob.glob(\n",
351348
" os.path.join(ligand_item_path, f\"{item}.sdf\")\n",
352349
" )\n",
353-
" if method == \"consensus_ensemble\":\n",
350+
"\n",
351+
" if method == \"neuralplexer\":\n",
352+
" # NOTE: this handles NeuralPlexer's output formats\n",
353+
" complex_filepaths = [\n",
354+
" p\n",
355+
" for p in glob.glob(\n",
356+
" os.path.join(protein_item_path.removesuffix(\"*\"), \"*rank1_*.pdb\")\n",
357+
" )\n",
358+
" + glob.glob(\n",
359+
" os.path.join(ligand_item_path.removesuffix(\"*\"), \"*rank1_*.sdf\")\n",
360+
" )\n",
361+
" if \"relaxed\" not in p and \"aligned\" not in p\n",
362+
" ]\n",
363+
" elif method == \"chai-lab\":\n",
364+
" # NOTE: this handles Chai-1's output formats\n",
365+
" complex_filepaths = [\n",
366+
" p\n",
367+
" for p in glob.glob(\n",
368+
" os.path.join(\n",
369+
" protein_item_path.removesuffix(\"*\"),\n",
370+
" \"pred.model_idx_0_protein.pdb\",\n",
371+
" )\n",
372+
" )\n",
373+
" + glob.glob(\n",
374+
" os.path.join(\n",
375+
" ligand_item_path.removesuffix(\"*\"),\n",
376+
" \"pred.model_idx_0_ligand.sdf\",\n",
377+
" )\n",
378+
" )\n",
379+
" ]\n",
380+
" elif method == \"consensus_ensemble\":\n",
354381
" # NOTE: this handles the Consensus Ensemble's output formats\n",
355382
" complex_filepaths = glob.glob(\n",
356383
" os.path.join(protein_item_path.removesuffix(\"*\"), \"*.pdb\")\n",

0 commit comments

Comments
 (0)