|
329 | 329 | " ) + glob.glob(ligand_item_path)\n", |
330 | 330 | " elif os.path.isdir(ligand_item_path) and \"_relaxed\" not in item:\n", |
331 | 331 | " 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", |
338 | 335 | " if not len(complex_filepaths) == 2:\n", |
339 | 336 | " # NOTE: this handles DiffDock and TULIP's output formats\n", |
340 | 337 | " complex_filepaths = glob.glob(f\"{protein_item_path}.pdb\") + glob.glob(\n", |
|
350 | 347 | " complex_filepaths = glob.glob(f\"{protein_item_path}.pdb\") + glob.glob(\n", |
351 | 348 | " os.path.join(ligand_item_path, f\"{item}.sdf\")\n", |
352 | 349 | " )\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", |
354 | 381 | " # NOTE: this handles the Consensus Ensemble's output formats\n", |
355 | 382 | " complex_filepaths = glob.glob(\n", |
356 | 383 | " os.path.join(protein_item_path.removesuffix(\"*\"), \"*.pdb\")\n", |
|
0 commit comments