Skip to content

Commit

Permalink
Skip invalid models
Browse files Browse the repository at this point in the history
  • Loading branch information
amorehead committed Aug 15, 2024
1 parent 36e8147 commit 6cc1655
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions posebench/models/ensemble_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1548,9 +1548,11 @@ def export_ligands_in_casp15_format(
"Number of RFAA ligand numbers, names, and molecule fragments do not match. Note that this means it did not predict for all input ligands and that manual adjustments to the resulting CASP15 submission file may need to be made (e.g., to make sure ligand names are correctly aligned with listed molecular fragments)."
)
else:
assert (
len(ligand_numbers_list) == len(ligand_names_list) == len(mol_frags)
), "Number of ligand numbers, names, and molecule fragments must match."
if not (len(ligand_numbers_list) == len(ligand_names_list) == len(mol_frags)):
logger.warning(
f"Number of ligand numbers, names, and molecule fragments must match. Skipping model {i}..."
)
continue

sdf_content.write(f"MODEL {model_index if model_index is not None else i}\n")

Expand Down

0 comments on commit 6cc1655

Please sign in to comment.