Skip to content

Commit

Permalink
Fix exception with unknown residues
Browse files Browse the repository at this point in the history
  • Loading branch information
peastman committed Jan 6, 2025
1 parent b31b57b commit da6761c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pdbfixer/pdbfixer.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ def fromReader(cls, reader: PdbxReader) -> 'CCDResidueDefinition':

residueName = block.getObj('chem_comp').getValue("id")

descriptorsData = block.getObj("pdbx_chem_comp_descriptor")
typeCol = descriptorsData.getAttributeIndex("type")

atomData = block.getObj('chem_comp_atom')
if atomData is None:
# The file doesn't contain any atoms, so report that no definition is available.
return None
atomNameCol = atomData.getAttributeIndex('atom_id')
symbolCol = atomData.getAttributeIndex('type_symbol')
leavingCol = atomData.getAttributeIndex('pdbx_leaving_atom_flag')
Expand Down

0 comments on commit da6761c

Please sign in to comment.