Search code examples
pythonbioinformaticsbiopython

"Desired structure doesn't exist" for PDB retrieve_pdb_file method


Trying to download some protein data from PDB using Biopython's Bio.PDB.PDBList

Here is a min. reproducible example:

from Bio.PDB import PDBList
pdbl=PDBList()
pdbl.retrieve_pdb_file('1GAV', file_format="pdb")

This returns:

Downloading PDB structure '1GAV'...
Desired structure doesn't exists

Desired behavior is download of the PDB file to the working directory.

Possibly useful info:

  • Using python 3
  • Do not want to download whole PDB, just pick and choose files
  • Using a proxy, but I don't think that's the problem because Biopython uses urllib to make requests and I tried using urllib with my proxy settings and it worked fine.
  • I've tried for a few different PDB code/IDs and for other file types ("mmCif", "bundle") and it returns the same thing
  • No error is being hit, it just can't find the file in PDB apparently?
  • The folder where the file should appear does get made in the working directory, but the folder is empty

Solution

  • We think the problem has to do with our corporate VPN because it works when the VPN is off (although proxy still on). So as sammam said, no problems in the code.

    Don't know the specifics of why this occurs with our VPN, will update if I find out.