[Biopython-dev] Parsing "element" out of PDB file

Peter biopython at maubp.freeserve.co.uk
Thu Jun 24 16:54:41 UTC 2010


On Thu, Jun 24, 2010 at 5:36 PM, João Rodrigues <anaryin at gmail.com> wrote:
>>
>> I wonder if using None or NAN would be better than zero here? Or just an
>> exception. This is difficult for me to say without a better idea of what
>> you will be using the atomic weights for.
>>
>
> Right now I'm just using them for the center of mass calculation.
>

Well if you don't know an atom's mass, you can't calculate the real
center of mass. Maybe this should throw an exception?

>> On a separate point, if you have an old fashioned PDB file without the
>> element column, you can probably work out the element anyway. ...
>
> From non HETATMs its possible from the first letter of the atom name (or it
> is H if the first letter is a digit). For HETATMs, names match elements
> IIRC.
>
> Do you think it's worth the try? It shouldn't be hard to write and the cases
> where it would fail would be sporadic.

Eric - what do you think?

>> How common are this kind of PDB file for the work you are doing - do
>> many modelling packages omit the element?
>
>
>> Have you contacted the program authors to request they include the
>> element column in future?
>>
>
> Well... several packages make this, specially webservers.. Contacting them
> authors wouldn't bring those many favourable answers IMO.

I'd ask politely anyway ;)

> I've commited it here:
> http://github.com/JoaoRodrigues/biopython/commit/29f48e8f97870530520884fa6b8c9b70d87ba8bc
>
> I commented out the self.mass part since we're still working on it.

I've cherry-picked that for the trunk - could you test the master branch
please (just to make sure this worked as you expected)?

Thanks,

Peter




More information about the Biopython-dev mailing list