[Biopython-dev] PDB occupancy behavior

Peter Cock p.j.a.cock at googlemail.com
Fri Aug 9 14:22:29 UTC 2013


On Fri, Aug 9, 2013 at 2:46 PM, Lenna Peterson <arklenna at gmail.com> wrote:
> On Friday, 9 August 2013, Peter Cock wrote:
>>
>> Good (error in strict mode).
>>
>> Do you think a warning in permissive mode for missing occupancy
>> is also worth adding, or would using None as the value indicate
>> that nicely?
>>
>> Peter
>
>
>
> I have some concern about changing the type of an attribute but I imagine
> any end user who cares about occupancy doesn't want spurious values of
> either 1.0 or 0.0 anyway.
>
> I'm not at a computer right now but I believe most problems in the PDB
> parser are fatal in strict and warnings in permissive. So there should
> already be a warning in place.
>
> It occurred to me it would also be possible o create an "ultra-permissive"
> mode designed for parsing computationally produced files, and suppress some
> of the warnings (e.g. missing occupancy and B-factor). That way, the current
> behavior could be left unchanged. Possibly a permissiveness level (0 for
> strict, 1 for current permissive, 2 for even more permissive).
>
> Anyway, I'd be happy to implement any of these options (current parser to
> None, restore previous behavior and None in a new permissiveness level,
> other?) and of course update the unit test.

You should be able to silence the PDB warnings in two lines anyway,
so I don't think we really need an ultra-permissive no-warnings mode.

Peter



More information about the Biopython-dev mailing list