[Biopython] Bio.PDB Module - Atom.set_serial_number function - usage?
João Rodrigues
anaryin at gmail.com
Mon Mar 15 08:58:29 UTC 2010
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.
João [...] Rodrigues
@ http://stanford.edu/~joaor/
2010/3/15 Peter <biopython at maubp.freeserve.co.uk>
> On Mon, Mar 15, 2010 at 6:35 AM, Sebastian Bassi <sbassi at gmail.com> wrote:
> > On Tue, Mar 9, 2010 at 7:21 PM, João Rodrigues <anaryin at gmail.com>
> wrote:
> >> I checked the code of PDBIO and apparently, it has hard-coded a
> resetting of
> >> the atom number. My question is, what is this set_serial_number for
> then? Is
> >> there a way for me to override this easily?
> >
> > It may be a bug. Could you post your code related to this?
>
> PDBIO does explicitly just use an incremental counter for the
> atom number. I don't know why for sure, but this is a simple way
> to ensure the atoms are given unique identifiers on output. I
> guess the serial_number is just set by the parser. I don't see an
> easy way to override it - why do you want to change it?
>
> Regarding the point of get_serial_number and set_serial_number,
> they seem to be rather pointless methods - since you can just edit
> the serial_number attribute directly. Maybe Thomas has been using
> Java while writing this code? We have talked about deprecating the
> pointless get/set functions to make the PDB API a little more transparent.
>
> Peter
>
More information about the Biopython
mailing list