[BioPython] PDBParser -> structure not loaded
Brad Chapman
chapmanb at uga.edu
Thu Dec 4 17:00:20 EST 2003
Hi Sam;
I can jump in and help as well. I don't really use the PDB parser
and Thomas in the authority but I can provide my amateur opinion
which will hopefully help.
> Hi Thomas, Thanks for the help. Actually it seems that the structure is not
> retrieved from PDB.
>
> After the following lines
>
> >>>from Bio.PDB.PDBParser import PDBParser
> >>>p=PDBParser(PERMISSIVE=1)
> >>>structure_id="1fat"
> >>>structure=p.get_structure(structure_id, "filename")
> >>>model=structure[0]
>
> I tried to print the model and chain by the following lines,
>
> >>>print structure.child_list
> [<Model id=0>]
> >>>print model.child_list
> []
>
> but from the results it seems that 1FAT is not being retrieved from PDB
> site. I have an established connection to the Internet. I would appreciate
> your help on this.
The PDBParser doesn't do any internet retrieval at all, at least as
far as I can see. It is meant to parse a PDB file that you have
retrieved.
So, if you want to parse out the 1fat structure and deal with it you
should download the PDB file:
http://www.rcsb.org/pdb/cgi/explore.cgi?job=download;pdbId=1FAT;page=0;pid=293101070575263&opt=show&format=PDB&pre=1
Then, if you saved it to "1FAT.pdb" you can parse it with:
>>> from Bio.PDB.PDBParser import PDBParser
>>> p = PDBParser(PERMISSIVE=1)
>>> structure = p.get_structure("1fat", "1FAT.pdb")
>>> print structure.child_list
[<Model id=0>]
>>> model = structure[0]
>>> model.child_list
[<Chain id=A>, <Chain id=B>, <Chain id=C>, <Chain id=D>, <Chain id= >]
Hopefully this helps!
Brad
More information about the BioPython
mailing list