[BioPython] BioPDB problem
Thomas Hamelryck
thamelry at binf.ku.dk
Fri Jun 18 06:57:34 EDT 2004
On Friday 18 June 2004 12:01, Hua Wong wrote:
> I have a PDB file that count 3145 atoms [1...3145], and using BioPDB I try
> to get all the coordinate.
One possibility might be that the PDB file contains disordered atoms. They
will be packed in one DisorderedAtom object, which in term holds the Atom
objects.
The method residue.get_unpacked_list() returns all the individual atoms, and
'unpacks' disordered atoms.
So if this is indeed the case, do the following:
Replace this line:
for atom in residue.get_iterator():
by:
for atom in residue.get_unpacked_list():
There might be other reasons, ie. a buggy PDB file.
Try running the parser in 'strict' mode:
parser=PDBParser(PERMISSIVE=0)
This will throw an exception if the PDB file is buggy.
Hope this helps,
-Thomas
--
Thomas Hamelryck
Bioinformatics center
University of Copenhagen
Universitetsparken 15 Bygning 10
2100 København Ø, Denmark
---
http://www.binf.ku.dk/users/thamelry/
More information about the BioPython
mailing list