opsin icon indicating copy to clipboard operation
opsin copied to clipboard

Unable to parse "(1s,4s)-4-(chlorooxy)cyclohexyl hypofluorite" and similar

Open rytheranderson opened this issue 2 years ago • 1 comments

ChemDraw names certain meso cyclic compounds with lowercase r/s, rather than using cis/trans, like in the issue title. For example, the name provided by ChemDraw in the attached figure. image

OPSIN errors with:

Could not find atom that: <stereoChemistry locant="1" type="RorS" value="S" stereoGroup="Abs">1s</stereoChemistry> appeared to be referring to

when attempting to parse this name or similar cases. This may be outside of OPSIN support, but I thought I would mention it as ChemDraw is frequently used for IUPAC naming. Happy to provide additional examples if needed.

Thanks in advance, -Ryther

rytheranderson avatar Nov 02 '23 15:11 rytheranderson

This is indeed a known limitation in OPSIN's stereochemistry support, and has been reported all the way back to 2015 (https://github.com/dan2097/opsin/issues/23). Due to the complexity of implementation, I've been thinking for a while about including John's library for detecting/labelling stereocentres (https://github.com/SiMolecule/centres)... but haven't got around to doing so.

dan2097 avatar Nov 04 '23 13:11 dan2097