[Biopython] Bio.PDB Module - Atom.set_serial_number function - usage?

Peter biopython at maubp.freeserve.co.uk
Mon Mar 15 09:29:09 UTC 2010


On Mon, Mar 15, 2010 at 8:58 AM, João Rodrigues <anaryin at gmail.com> wrote:
> Exactly my point. Those two functions are pretty much useless at the moment
> since the PDBIO module ignores those values. I just changed the value of the
> atom number in PDBIO for atom.get_serial_number() and it worked as I wanted,
> so it isn't that hard.
>
> I just wanted to ask if this had a particular reason or if it was some
> forgotten old setting or bug.

My guess is if you have selected only part of a PDB file, and written this out
to new sub-file, then it is conventional to have the atoms numbered sequentially
from one. This is what the current code does, but using the serial_number
from the objects would results in irregular numbering with gaps in it (not sure
if that is against the PDB specification, but it would not surprise me if third
party tools don't like it). i.e. Not a bug, but a deliberate design choice.
(We'd have to ask Thomas what he was thinking to be sure.)

Again, why do you want to change the atom numbers on output?

Peter




More information about the Biopython mailing list