import gzip
from Bio.PDB.PDBParser import PDBParser

def disorder(structure):
    for chain in structure[0].get_list():
        for residue in chain.get_list():
            for atom in residue.get_list():
                if atom.is_disordered():
                    print residue, atom
    return None

pdbfn = '/home/sb/bioinfo/pdb1apk.ent.gz'
handle = gzip.GzipFile(pdbfn)
parser = PDBParser()
structure = parser.get_structure("test", handle)

This code is part of the book "Python for Bioinformatics", by Sebastian Bassi ( Return to home page.