Error in downloading pdb from protein data bank using biopython
Question: Some pdbs cannot be download from PDB using biopython, though they exist in
PDB. It generates the error. This code is used to download pdb (2j8e) It could
not download however it works for other pdbs.

    
    
    Python 2.7.4 (default, May 14 2013, 09:41:12)
    [GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from Bio.PDB import PDBList
    >>> pdbdownload = PDBList()
    >>> pdbid = '2j8e'
    >>> downloaded_path = pdbdownload.retrieve_pdb_file(pdbid)
    Downloading PDB structure '2j8e'...
    
    Traceback (most recent call last):
    IOError: [Errno ftp error] [Errno ftp error] 550 Can't change directory to pdb2j8e.ent.gz: No such file or directory
    

This is an error. Has someone faced this problem?


Answer: I'm sorry, but that file doesn't exist! See by yourself:

<ftp://ftp.wwpdb.org/pub/pdb/data/structures/divided/pdb/j8/>

There are no pdb2j8e.ent.gz in that dir. If you try to download 2j8f or any
other id, you get it without problem.

That file got obsolete, and can be retrieved from
<ftp://ftp.wwpdb.org/pub/pdb/data/structures/obsolete/pdb/j8/>. With Biopython
you can do:

    
    
    downloaded_path = pdbdownload.retrieve_pdb_file(pdbid, obsolete=True)
    

