0
我有一個pdb文件,我想分析pdb。我正在使用Biopython。我想列出每個殘基的N-CA-C-CB列表的座標。我如何實現這一目標?將字符串轉換爲Python中的列表易於使用
pdb = "1dly.pdb"
name = pdb[:3]
from Bio import PDB
from ast import literal_eval
p = PDB.PDBParser()
s = p.get_structure(name, pdb)
#print dir(s)
#y = s.get_residues()
z = s.get_atoms()
for x in z:
print x, x.get_coord()
我想以這種格式輸出:
[[(coordinates of N - residue1), (coordinates of CA - residue1), (coordinates of C - residue1), (coordinates of CB - residue1)], [(coordinates of N - residue2), (coordinates of CA - residue2), (coordinates of C - residue2), (coordinates of CB - residue2)]]
我怎麼能這樣做?