This is a test version of Biostars. For the public version, visit https://www.biostars.org.
retrieve_pdb_file from Bio.PDB.PDBList creates .ent files, not .pdb

I'm using Biopython to load structures into my code. I then change them into poses, via PyRosetta, because I want to align my theo structure to the PDB website structures. This is my code:

pdbl = PDBList()
native_pdb = pdbl.retrieve_pdb_file('%s' %protein, pdir='/Users/mlane/PyRosetta4/test_natives', file_format='pdb')
native_pose = pose_from_pdb(native_pdb)

but the retrieve_pdb_file creates .ent files and not pdb files. how do I fix this?

OR how do I load the known PDB structures in order to align them to theo structures and find the rmsd?

biopython bio.pdb pyrosetta pdblist rmsd

I still can't solve this issue. Does anybody know why retrieve_pdb_file isn't working correctly? Is anybody experiencing the same issue?

1 answer

Most likely there is no need to fix anything. If you open the .ent files in a text editor they should look like PDB files. Simply change the file extension if it is important that they end in .pdb.

Okay, I'll try that. thank you! it matters for the next line "pose_from_pdb()" is an object that only accepts pdb files.

That didn't work, but thank you for your help!

What is it that didn't work?

I just ran this short script:

from Bio.PDB.PDBList import PDBList
pdbl = PDBList()
native_pdb = pdbl.retrieve_pdb_file('1ako', pdir='./', file_format='pdb')

It downloaded a file named pdb1ako.ent, which IS in PDB format, even though it ends in .ent. Simply running mv pdb1ako.ent 1ako.pdb would give a file in a proper format and with .pdb extension.

Log in to answer this question.