Skip to content

Commit 1d966c4

Browse files
authored
adding script to download pdb data
this script was produced during the class "Computational aminoacid and protein Simulation"
1 parent 7cc9304 commit 1d966c4

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

pdb_downloader.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
from Bio.PDB.PDBParser import PDBParser
2+
from Bio.PDB.PDBList import PDBList
3+
4+
pdbl = PDBList()
5+
parser = PDBParser()
6+
7+
for i in ["ID"]:
8+
pdbl.retrieve_pdb_file(pdb_code=i,file_format="pdb",pdir="./")
9+
structure_id = i
10+
filename = "pdb"+i.lower()+".ent"
11+
structure = parser.get_structure(structure_id, filename)
12+
print("id: ",structure_id)
13+
print("name: ", structure.header["name"])
14+
print("deposition date :", structure.header["deposition_date"])
15+
print("release date :", structure.header["release_date"])
16+
print("structure method : ", structure.header["structure_method"])
17+
print("resolution : ", structure.header["resolution"])
18+
print("")

0 commit comments

Comments
 (0)