Skip to content

PubChem resolver asks for the renamed IsomericSMILES property #954

Description

@skearnes

Describe the bug

resolvers._pubchem_resolve requests the IsomericSMILES property, which PubChem has
renamed to SMILES. Nothing is broken — the old name is still accepted as an alias —
but the response no longer echoes the name we asked for, which is visible as soon as
anyone reads the JSON form:

$ curl -s ".../rest/pug/compound/cid/2244/property/IsomericSMILES/JSON"
{"PropertyTable": {"Properties": [{"CID": 2244, "SMILES": "CC(=O)OC1=CC=CC=C1C(=O)O"}]}}

$ curl -s ".../rest/pug/compound/cid/2244/property/CanonicalSMILES/JSON"
{"PropertyTable": {"Properties": [{"CID": 2244, "ConnectivitySMILES": "CC(=O)OC1=CC=CC=C1C(=O)O"}]}}

IsomericSMILES -> SMILES and CanonicalSMILES -> ConnectivitySMILES. The resolver
uses the /txt format, where no field name appears, so the current code returns the
right string today.

Expected behavior

Ask for SMILES, so the request names the property PubChem documents and the code does
not depend on an alias being maintained indefinitely.

-        f"{urllib.parse.quote(value, safe='')}/property/IsomericSMILES/txt"
+        f"{urllib.parse.quote(value, safe='')}/property/SMILES/txt"

Additional context

Low priority — filing it so the alias dependency is recorded rather than rediscovered
the day it stops working. Noticed while auditing the resolver chain against PubChem's
bulk CID-SMILES dump, which is documented as isomeric SMILES and matches what this
endpoint returns.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions