You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to launch a discussion around stereochemistry detection and correction in case of molfile input. I regularly encounter inputs where RDKit either loses or flips the stereochemistry sometimes in an invalid way.
Below a recent example. The original drawing (top-left) is from a 3rd party. This one is not interpreted correctly and leads to a changed and if I'm not mistaken chemically invalid molecule. If the ring is drawn differently without the 180° angle, then rdkit properly recognizes it.
The issue I have is that the "corruption" that happens on the left-side is silent.
Further if generating the rdkit molecule from SMILES, rdkit draws the ring the same way as the source structure with a 180° bond:
The issue seems to be that rdkit requires either the wedged bonds on the hydrogen atoms and not on the bridge bonds for proper detection or the the ring drawn without the 180° angle. In short, proper detection from molfile depends on very specific details of the drawing.
Without visual (human) inspection you will not notice something went wrong. I was wondering if there already is some option to throw an exception for such cases? And if not, what is the consensus in the community how to deal with such cases? Shouldn't rdkit offer some kind of functionality to warn the user in case of "doubt" around stereochemistry?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I want to launch a discussion around stereochemistry detection and correction in case of molfile input. I regularly encounter inputs where RDKit either loses or flips the stereochemistry sometimes in an invalid way.
Below a recent example. The original drawing (top-left) is from a 3rd party. This one is not interpreted correctly and leads to a changed and if I'm not mistaken chemically invalid molecule. If the ring is drawn differently without the 180° angle, then rdkit properly recognizes it.
The issue I have is that the "corruption" that happens on the left-side is silent.
Further if generating the rdkit molecule from SMILES, rdkit draws the ring the same way as the source structure with a 180° bond:
The issue seems to be that rdkit requires either the wedged bonds on the hydrogen atoms and not on the bridge bonds for proper detection or the the ring drawn without the 180° angle. In short, proper detection from molfile depends on very specific details of the drawing.
Without visual (human) inspection you will not notice something went wrong. I was wondering if there already is some option to throw an exception for such cases? And if not, what is the consensus in the community how to deal with such cases? Shouldn't rdkit offer some kind of functionality to warn the user in case of "doubt" around stereochemistry?
top-left drawing as molfile v3000:
original_drawing.txt
Beta Was this translation helpful? Give feedback.
All reactions