HSExposure()模块不是callab

2024-04-20 08:09:05 发布

您现在位置:Python中文网/ 问答频道 /正文

from Bio.PDB import *
parser=PDBParser()
structure=parser.get_structure('cal1','3CLN.pdb')
model=structure[0]
chain=model["A"]
hse=HSExposure()
expca=hse.calc_hs_exposure(model,option='CA3')
print expca[chain[40]]

当我执行这段代码时,我得到了一个错误:

^{pr2}$

怎么了?在


Tags: fromimportparserchaingetmodelstructurepdb
2条回答

对于像我这样还在寻找答案的人:
大多数教程似乎都错了。对我有用的是

exp_ca = HSExposureCA(model)  
res_id = residue.get_id()  
print(exp_ca[(chain.get_id(), res_id)])  

请注意,对于链的第一个和最后一个残基,HSEalpha是未定义的。在

HSExposure是一个模块,而不是一个类,因此不能实例化它。有一个bunch of classes in that module,所以我想你想要一个。在

相关问题 更多 >