Commit 29fcf15f by Peter Eastman Committed by GitHub

Fix exception with unknown residues (#322)

parent b31b57b1
...@@ -150,10 +150,10 @@ class CCDResidueDefinition: ...@@ -150,10 +150,10 @@ class CCDResidueDefinition:
residueName = block.getObj('chem_comp').getValue("id") residueName = block.getObj('chem_comp').getValue("id")
descriptorsData = block.getObj("pdbx_chem_comp_descriptor")
typeCol = descriptorsData.getAttributeIndex("type")
atomData = block.getObj('chem_comp_atom') 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') atomNameCol = atomData.getAttributeIndex('atom_id')
symbolCol = atomData.getAttributeIndex('type_symbol') symbolCol = atomData.getAttributeIndex('type_symbol')
leavingCol = atomData.getAttributeIndex('pdbx_leaving_atom_flag') leavingCol = atomData.getAttributeIndex('pdbx_leaving_atom_flag')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment