[Biopython-dev] [Bug 2751] PDBParser crashes on empty tempFactor fields

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Fri Feb 6 10:46:54 UTC 2009


http://bugzilla.open-bio.org/show_bug.cgi?id=2751





------- Comment #2 from biopython-bugzilla at maubp.freeserve.co.uk  2009-02-06 05:46 EST -------
(In reply to comment #0)
> When parsing ATOM lines, Bio.PDB.PDBParser appears to be passing the contents
> of indexes 60-66 directly to the float() constructor without checking if the
> string is empty (or all spaces).
> 
> The PDB spec seems to indicate that the default value for this field should be
> 0.0:
> http://www.wwpdb.org/documentation/format23/sect9.html#ATOM
> 
> I interpret that to mean PDBParser should assume 0.0 if the string is blank,
> at least in permissive mode; otherwise, perhaps a PDBException should be
> raised.

I would have read that spec to mean if you don't know the tempFactor, put "0.0"
in the field and don't leave it blank.  By this interpretation of the spec,
your old file is invalid, and Biopython's failure is therefore not
unreasonable.  It would be good to cope with this in permissive mode though,
and raise a more meaningful error in strict mode.

(In reply to comment #1)
> (In reply to comment #0)
> 
> Sorry, that PDB example was manually fixed. The broken line format is:
> 
> ATOM   4260  H1  GLU B  82      -6.252  46.392 157.641  1.00
> 
> This is from an odd edition of the 1AD5 structure; RCSB's version has the 0.0
> values filled in correctly.

Do you have a link to download the old ("invalid") version of PDB reference
1AD5, as it would be very helpful to test this on a real file?


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Biopython-dev mailing list