如何在PubChemPy中使用searchtype选项

2024-09-28 05:22:17 发布

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

我试着运行代码

pcp.get_compounds('CC', searchtype='superstructure', listkey_count=3)

但是,它不起作用

此代码与文档中显示的代码完全相同(“https://pubchempy.readthedocs.io/en/latest/guide/searching.html#advanced-搜索类型”)

在同一页面中显示的另一个代码,如pcp.get_compounds('Aspirin', 'name', record_type='3d')起作用

请给我一些关于如何修复这个错误的建议


Tags: 代码文档httpsiogetcountreadthedocsen
1条回答
网友
1楼 · 发布于 2024-09-28 05:22:17

PubChemPy高级搜索文档中的示例似乎缺少一个参数。该示例未确定如何搜索,即通过微笑进行搜索。用下面的语句替换示例中的语句将得到所需的结果

pcp.get_compounds('CC', 'smiles', searchtype='superstructure', listkey_count=3)

相关问题 更多 >

    热门问题