From 6da2cdafc902d423cf7c136d66fbe81484d2cd0a Mon Sep 17 00:00:00 2001 From: Gustaf Ahdritz Date: Wed, 22 Jun 2022 04:08:04 -0400 Subject: [PATCH] Fix another PDB parsing bug --- openfold/np/protein.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openfold/np/protein.py b/openfold/np/protein.py index 09b48cc5..af8739c9 100644 --- a/openfold/np/protein.py +++ b/openfold/np/protein.py @@ -252,9 +252,9 @@ def add_pdb_headers(prot: Protein, pdb_str: str) -> str: out_pdb_lines.append(f"REMARK {remark}") parents_per_chain = None - if(prot.parents is not None): + if(prot.parents is not None and len(prot.parents) > 0): parents_per_chain = [] - if(prot.parents_chain_index is not None and len(prot.parents_chain_index) > 0): + if(prot.parents_chain_index is not None): cur_chain = prot.parents_chain_index[0] parent_dict = {} for p, i in zip(prot.parents, prot.parents_chain_index):