[Biopython] Bio.PDB Module - Atom.set_serial_number function - usage?
Peter
biopython at maubp.freeserve.co.uk
Mon Mar 15 08:34:41 UTC 2010
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