1
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]]

当我执行此代码时,我收到此错误:

File "D:\python\Core\pdb_2.py", line 6, in <module>
    hse=HSExposure()
TypeError: 'module' object is not callable

它出什么问题了?

4

2 回答 2

3

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

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

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

于 2018-04-19T15:21:04.513 回答
2

HSExposure是一个模块,而不是一个类,所以你不能实例化它。该模块中有很多类,所以我假设你想要其中一个。

于 2012-02-05T11:58:48.907 回答