[Biopython-dev] PDB Parser error

Rodrigo faccioli rodrigo_faccioli at uol.com.br
Tue Mar 17 11:30:48 EDT 2009


I built a relational database in PostgreSQL. This database stores some
informations form PDB file. These informations are about its sequence, atoms
and sbonds. Now, I'm building a parser for this my database which I want to
load it in a biopython PDB parser structure. The idea is  keep on whole my
souce-code  based in biopython PDB parser, because will be necessary to do
some operations with these informations.

So, I study the Bio.PDB directory and I read in the PDBPaerser.py file, its
_parse_coordinates method where there is some methods about initialization
structure. I run them in my code. However, is showing the message below.
Traceback (most recent call last):
  File "src/testefcfrpPDB.py", line 32, in <module>
    main()
  File "src/testefcfrpPDB.py", line 30, in main
    structure = FcfrpPDB.getPDBFile(id)
  File "/home/faccioli/workspace/blast/src/FcfrpPDB.py", line 67, in
getPDBFile
    return fcfrpPDBParser.loadStructureFromDatabase(id)
  File "/home/faccioli/workspace/blast/src/FcfrpPDBParser.py", line 48, in
loadStructureFromDatabase
    self._structure_builder.init_atom(D_Atoms[i].get_id(),
D_Atoms[i].get_coord(), D_Atoms[i].get_bfactor(),D_Atoms[i].get_occupancy()
,D_Atoms[i].get_altloc(), D_Atoms[i].get_fullname(),
D_Atoms[i].get_serial_number())
  File
"/usr/lib/python2.5/site-packages/biopython-1.49-py2.5-linux-i686.egg/Bio/PDB/StructureBuilder.py",
line 182, in init_atom
    if residue.has_id(name):
  File
"/usr/lib/python2.5/site-packages/biopython-1.49-py2.5-linux-i686.egg/Bio/PDB/Entity.py",
line 96, in has_id
    return self.child_dict.has_key(id)
TypeError: list objects are unhashable

This post is my first post in biopython developer's list and I don't know
what is the its process to send a code.

Thanks for any help.

-- 
Rodrigo Antonio Faccioli
Ph.D Student in Electrical Engineering
University of Sao Paulo - USP
Engineering School of Sao Carlos - EESC
Department of Electrical Engineering - SEL
Intelligent System in Structure Bioinformatics
http://laips.sel.eesc.usp.br
Phone: 55 (16) 3373-9366 Ext 229
Curriculum Lattes - http://lattes.cnpq.br/1025157978990218


More information about the Biopython-dev mailing list