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
The initial mol contains 4 rings, of length 5, 5, 6, 7. After EnumerateStereoisomers, the list contains 4 rings, of length 5, 5, 7, 9. The representation of the mol looks strange as well (see snapshot below). MolToSmiles of the stereo mols return the expected stereo smiles CSCc1cnc(/C=N/n2c(C)nc3sc4c(c3c2=O)CCCCC4)s1 and CSCc1cnc(/C=N\n2c(C)nc3sc4c(c3c2=O)CCCCC4)s1.
Screenshots
Execution of the snippet:
One of the stereo mols:
I encountered another problem, which is unrelated to the ring issue. When loading the second stereo smiles (CSCc1cnc(/C=N\n2c(C)nc3sc4c(c3c2=O)CCCCC4)s1) as a new mol, it yields None. Adding a second \ in the smiles (CSCc1cnc(/C=N\\n2c(C)nc3sc4c(c3c2=O)CCCCC4)s1) makes it valid. What would be your recommendation to handle such cases?
Configuration (please complete the following information):
RDKit version: 2021.03.1
OS: macOS Mojave
Python version (if relevant): 3.7.9
Are you using conda? yes
If you are using conda, which channel did you install the rdkit from? conda install -y -c conda-forge rdkit
The text was updated successfully, but these errors were encountered:
For the first part: The problem here is that EnumerateStereoisomers() is clearing the ring information before calling AssignStereochemistry(). In order to be efficient, AssignStereochemistry() calls FastFindRings(), which doens't find the symmetric SSSR set. The next call to GetSymmSSR() then re-uses the information from FastFindRings().
A quick workaround until this is fixed and a new RDKit version is available would be to call m.ClearComputedProps() before the call to rdmolops.GetSymmSSSR(m)
For the second part:
the backslashes in the string literals are being interpreted by python as quoting characters. Here's a stackoverflow thread about that: https://stackoverflow.com/questions/301068/quoting-backslashes-in-python-string-literals
The short answer is that you can either double the backslashes (as you already discovered) or use a raw string: Chem.MolFromSmiles(r'CSCc1cnc(/C=N\n2c(C)nc3sc4c(c3c2=O)CCCCC4)s1')
Describe the bug
Calling
EnumerateStereoisomers
on some imines seems to alter the rings of the molecule.To Reproduce
The initial mol contains 4 rings, of length 5, 5, 6, 7. After
EnumerateStereoisomers
, the list contains 4 rings, of length 5, 5, 7, 9. The representation of the mol looks strange as well (see snapshot below).MolToSmiles
of the stereo mols return the expected stereo smilesCSCc1cnc(/C=N/n2c(C)nc3sc4c(c3c2=O)CCCCC4)s1
andCSCc1cnc(/C=N\n2c(C)nc3sc4c(c3c2=O)CCCCC4)s1
.Screenshots
Execution of the snippet:
One of the stereo mols:
I encountered another problem, which is unrelated to the ring issue. When loading the second stereo smiles (
CSCc1cnc(/C=N\n2c(C)nc3sc4c(c3c2=O)CCCCC4)s1
) as a new mol, it yields None. Adding a second\
in the smiles (CSCc1cnc(/C=N\\n2c(C)nc3sc4c(c3c2=O)CCCCC4)s1
) makes it valid. What would be your recommendation to handle such cases?Configuration (please complete the following information):
conda install -y -c conda-forge rdkit
The text was updated successfully, but these errors were encountered: