diff --git a/openfold/np/protein.py b/openfold/np/protein.py index 96d337b3..09b48cc5 100644 --- a/openfold/np/protein.py +++ b/openfold/np/protein.py @@ -254,7 +254,7 @@ def add_pdb_headers(prot: Protein, pdb_str: str) -> str: parents_per_chain = None if(prot.parents is not None): parents_per_chain = [] - if(prot.parents_chain_index is not None): + if(prot.parents_chain_index is not None and len(prot.parents_chain_index) > 0): cur_chain = prot.parents_chain_index[0] parent_dict = {} for p, i in zip(prot.parents, prot.parents_chain_index):