Skip to content

Commit

Permalink
Fix templates to work with empty a3m
Browse files Browse the repository at this point in the history
Second fix needed for #244

PiperOrigin-RevId: 721790067
Change-Id: Ib3eebf30f270b45d08cc94057a4feca5b4753d63
  • Loading branch information
Augustin-Zidek authored and copybara-github committed Jan 31, 2025
1 parent 4d0e7a6 commit 7f6edd0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/alphafold3/data/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,9 @@ def from_hmmsearch_a3m(
"""

def hit_generator(a3m: str):
if not a3m:
return # Hmmsearch could return an empty string if there are no hits.

for hit_seq, hit_desc in parsers.lazy_parse_fasta_string(a3m):
pdb_id, auth_chain_id, start, end, full_length = _parse_hit_description(
hit_desc
Expand Down

0 comments on commit 7f6edd0

Please # to comment.