haddocking / pdb-tools

A dependency-free cross-platform swiss army knife for PDB files.
https://haddocking.github.io/pdb-tools/
Apache License 2.0
378 stars 113 forks source link

avoid IndexError: string index out of range #56

Closed mukhyala closed 4 years ago

mukhyala commented 4 years ago

In certain not-so-clean PDB files, this change avoids index out of range error

JoaoRodrigues commented 4 years ago

Hi @mukhyala , thanks for the contribution.

Fixing line lengths is something we've considered in the past. Since the PDB format stipulates lines must have 80 characters, even if they are just whitespace, we recommend using pdb_tidy before any of our tools if these errors happens. Adding checks like these to the code would very quickly get out of hand as more and more exceptions pop up. As such, I'm closing this PR.