Skip to content

Commit 6da2cda

Browse files
committed
Fix another PDB parsing bug
1 parent 0f54f67 commit 6da2cda

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

openfold/np/protein.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,9 @@ def add_pdb_headers(prot: Protein, pdb_str: str) -> str:
252252
out_pdb_lines.append(f"REMARK {remark}")
253253

254254
parents_per_chain = None
255-
if(prot.parents is not None):
255+
if(prot.parents is not None and len(prot.parents) > 0):
256256
parents_per_chain = []
257-
if(prot.parents_chain_index is not None and len(prot.parents_chain_index) > 0):
257+
if(prot.parents_chain_index is not None):
258258
cur_chain = prot.parents_chain_index[0]
259259
parent_dict = {}
260260
for p, i in zip(prot.parents, prot.parents_chain_index):

0 commit comments

Comments
 (0)