mcs07 / PubChemPy

Python wrapper for the PubChem PUG REST API.
http://pubchempy.readthedocs.io
MIT License
379 stars 106 forks source link

Neither NAMES nor CAS hyphened numbers, verified on PubChem, seem to retrieve many compounds' SMILES #83

Closed ecojimb closed 1 month ago

ecojimb commented 7 months ago

Hello,

I'm trying to automate the generation of SMILES from GC/MS results. The version of PubChemPy that I just installed seems to block all CAS numbers with hyphens. Removing hyphens also fails and just using the part before the hyphen retrieves different compounds entirely,  I tried using the names listed by the GC/MS, but only about 1/10th returned results. Copy and pasting either failed names or failed CAS#s into the PubChem website did usually produce the correct response. I realize that PubChem doesn't have everything, and there will be some failures. While I have not yet tryied to hack and rebuild the source code, it seems that it wouldn't be too difficult to pass unfiltered CAS#s and names to PubChem would not be extremely difficult.

  Thanks for the work that you have put into this effort.