Skip to content

Commit

Permalink
Make ensemble generation method name parsing for CASP15 more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
amorehead committed Jun 12, 2024
1 parent 3c731fc commit c3eec83
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/models/ensemble_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1905,14 +1905,6 @@ def save_ranked_predictions(
output_protein_filepaths, protein_input_filepath
)

gap_insertion_point = (
# NOTE: for target `T1124` from CASP15, we have to insert a one-step gap starting at
# residue `243` in chain `B` for methods that predict holo protein PDB files ab initio
# to properly score these predictions
"B:243"
if name == "T1124" and method in METHODS_PREDICTING_HOLO_PROTEIN_AB_INITIO
else None
)
for i, (protein_output_filepath, ligand_output_filepath) in enumerate(
zip(output_protein_filepaths, output_ligand_filepaths), start=1
):
Expand All @@ -1927,6 +1919,15 @@ def save_ranked_predictions(
f"{name}LG{cfg.casp_author}_protein_{i}",
)
)
method = os.path.basename(ligand_output_filepath).split("_")[0]
gap_insertion_point = (
# NOTE: for target `T1124` from CASP15, we have to insert a one-step gap starting at
# residue `243` in chain `B` for methods that predict holo protein PDB files ab initio
# to properly score these predictions
"B:243"
if name == "T1124" and method in METHODS_PREDICTING_HOLO_PROTEIN_AB_INITIO
else None
)
export_proteins_in_casp_format(
[protein_output_filepath],
output_file,
Expand Down

0 comments on commit c3eec83

Please sign in to comment.