我重新编号了残基编号,新的残基=[18,19,20,21,22,34,35,36,37。。。。130131132]我想用这个列表更改我的pdb残留物编号。你有办法重新编号吗?在
。。。在
w=PDBIO()
structure=p.get_structure(" ", pdbfile)
for model in structure:
for chain in model:
chain_ID=model[chainID]
for residue in chain_ID:
#for i in range(len(residue.id)):
#resID=new_resnums[i]
residue.id=(" ",new_resnums[residue.id[1]], " ")
w.set_structure(structure)
w.save(pdbfile + "-new.pdb")
在你的例子中,你覆盖了所有关于残基的信息,还有关于特定位置的氨基酸的信息。在
让我们将文件中的所有id递增200,循环使用}来获得所有的残数和索引。在
model
s和structures
,然后使用get_residues()
和{在残留物.id存储在
list
中,并且只更改id。这个list
然后被转换回tuple
,并在原始id的位置被写入相关问题 更多 >
编程相关推荐