Biopython PDB提取坐标(x,y,z)和b值数据,如果b值> 10 && <50
Biopython PDB extract coordinate(x,y,z) and b value data if b value>10 && <50
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
if 10 < B < 50:
print(Y, B)
卡在最后一个 for 循环中
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
if 10 < B < 50:
print(Y, B)
卡在最后一个 for 循环中