擅长:python、mysql、java
<p>最近,我使用pubchempy管理了这个转换。下面是尝试的代码</p>
<pre><code>
filename = open("inif.txt", "r")
for line in filename :
event = line
compounds = pcp.get_compounds(event, namespace='smiles')
match = compounds[0]
print(i,'$$$','the CID is',compounds,'$$$','The IUPAC name is',match.iupac_name,'$$$','for the SMILE',event)
i+=1```
</code></pre>