Previously we were only using the service at https://cactus.nci.nih.gov/chemical/structure for SMILES lookups from compound names. This works pretty well, but sometimes we get SMILES back that contains vertical pipe | characters which breaks Sourire and won't render. These mainly seem to appear in organometallic compounds (ligand-related?) and just don't play nice with the renderer.
To remedy this, we now fall back to attempting to scrape the SMILES from the compound's Wikipedia page. This means it was necessary to restructure SMILES lookup services to support the chain of responsibility pattern.
Previously we were only using the service at
https://cactus.nci.nih.gov/chemical/structure
for SMILES lookups from compound names. This works pretty well, but sometimes we get SMILES back that contains vertical pipe|
characters which breaks Sourire and won't render. These mainly seem to appear in organometallic compounds (ligand-related?) and just don't play nice with the renderer.To remedy this, we now fall back to attempting to scrape the SMILES from the compound's Wikipedia page. This means it was necessary to restructure SMILES lookup services to support the chain of responsibility pattern.