我想在下面实现这个模块,包括使用rdkit.Chem.PeriodicTable模块计算原子量
这是指向上述模块的链接:https://www.rdkit.org/docs/source/rdkit.Chem.PeriodicTable.html
由于文档很模糊,我不知道如何传递这个论点。
所以我做了这个:
from rdkit import Chem
print(Chem.PeriodicTable.GetAtomicWeight('C'))但我遇到了这样的错误:
ArgumentError Traceback (most recent call last)
<ipython-input-42-e098e56063a3> in <module>
----> 1 print(Chem.PeriodicTable.GetAtomicWeight('C'))
ArgumentError: Python argument types in
PeriodicTable.GetAtomicWeight(str)
did not match C++ signature:
GetAtomicWeight(RDKit::PeriodicTable {lvalue}, std::string)
GetAtomicWeight(RDKit::PeriodicTable {lvalue}, unsigned int)我不知道如何通过这方面的论据。
发布于 2022-10-11 16:27:27
如您所链接的页面所示:use GetPeriodicTable()
from rdkit import Chem
pse = Chem.GetPeriodicTable()
print(pse.GetAtomicWeight('C'))12.011
https://stackoverflow.com/questions/74019566
复制相似问题