[Biopython-dev] Parsing "element" out of PDB file
João Rodrigues
anaryin at gmail.com
Thu Jun 24 16:36:36 UTC 2010
>
> 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.
>
> On a separate point, if you have an old fashioned PDB file without the
> element
> column, you can probably work out the element anyway. For example CA in
> a normal amino acids residue means the alpha carbon, so the element is
> carbon (although in a HETATM there is a possibility it is Calcium I think).
> So I think it would be possible to infer the element in many cases (but not
> all). However, this is going to be a reasonable amount of work to write and
> test.
>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.
> 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'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.
Best,
J
More information about the Biopython-dev
mailing list