Unexpected EnumerateStereoisomers() result unless sanitize during MolFromSmiles()? #7197
-
Hi, The below code generates two isomers ('C/C=C/C' and 'C/C=C\C') from the input smiles of 'C/C=C/C', for which I'm expecting only a single isomer. This looks to be caused by "sanitize = False" in the SmilesParserParams (if I set it to True, then I get the expected EnumerateStereoisomers result). Here and typically, I am performing post-MolFromSmiles sanitizing (like here, https://rdkit.readthedocs.io/en/latest/Cookbook.html#using-a-different-aromaticity-model) in order to prevent certain sanitizing behaviors, but it does not recover the expected result (I still get two enumerated isomers). Perhaps meaningful, m.Debug directly after MolFromSmiles when sanitize==False shows that there are numerous valence complaints?: Is this behavior expected? Do I have to sanitize during MolFromSmiles()? If so, is there a way to adjust the granularity of the sanitizing performed during MolFromSmiles()? Thank you for any guidance. Best, Andrew
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
[Edited 14.03.2024]
|
Beta Was this translation helpful? Give feedback.
[Edited 14.03.2024]
@someonetookmyname the RDKit does not do stereochemistry perception if you don't do sanitization or remove Hs, so you have to call
Chem.AssignStereochemistry()
yourself: