from Bio import PDB
pdb1 = PDB.PDBList()
pdb1.retrieve_pdb_file("1CRK") #downloads the .pdb file from the internet
parser = PDB.PDBParser(PERMISSIVE=1)
structure = parser.get_structure("1CRK",r'C:\Users\Sam\AppData\Local\Enthought\Canopy\User\Lib\site-packages\Bio\cr\pdb1crk.ent')
print(structure)
print(dir(structure))
for model in structure:
for chain in model:
for residue in chain:
for atom in residue:
N = atom.get_name()
I = atom.get_id()
Y = atom.get_coord()
V = atom.get_vector()
O = atom.get_occupancy()
B = atom.get_bfactor()
我是python的新手,并尝试了一下biopython模块, 我想要做的是基本上,仅针对B> 10且B <50的值打印(Y,B)。 但我不知道如何处理这个问题。有什么建议? :(this is where i got all the code from, this might help
答案 0 :(得分:0)
if 10 < B < 50:
print(Y, B)
陷入了最后的循环