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
Describe the bug
Adding a cyclobutyl group into a macrocycle causes the nitrogen to be treated as a stereo center.
To Reproduce
>>> from rdkit import Chem
>>> mol = Chem.MolFromSmiles("O=S1(=O)C=CC=C2CCCCC3CC(C3)N21")
>>> [Chem.MolToSmiles(x) for x in Chem.EnumerateStereoisomers.EnumerateStereoisomers(mol)]
['O=S1(=O)C=CC=C2CCCCC3CC(C3)[N@@]21', 'O=S1(=O)C=CC=C2CCCCC3CC(C3)[N@]21']
The nitrogen isn't necessary, the following variation also treats the same position as a carbon as a stereo center:
>>> mol = Chem.MolFromSmiles("C1=CCC2C(=C1)CCCCC1CC2C1")
>>> [Chem.MolToSmiles(x) for x in Chem.EnumerateStereoisomers.EnumerateStereoisomers(mol)]
['C1=CC[C@@H]2C(=C1)CCCCC1CC2C1', 'C1=CC[C@H]2C(=C1)CCCCC1CC2C1']
Screenshots
Configuration:
>>> rdkit.__version__
'2022.09.4-sch'
The text was updated successfully, but these errors were encountered:
Here's what's going on in this one.
It's clear that a C in that position should be stereogenic: it has four different neighbors.
The condition for an N with degree three to be stereogenic is that it be in a ring of size 3 or be shared between at least 3 rings (In this case, the docs were actually useful to me in figuring this out, I love it when that happens! https://www.rdkit.org/docs/RDKit_Book.html#stereogenic-atoms-bonds). That last condition was added (PR #3958) in order to handle bridgehead atoms like the N here:
In this case the presence of the four membered ring means that the macrocycle actually counts as 2 rings (due to the symmetric paths around the 3 ring), so the N is in three rings, so it's considered stereogenic. If you make the four-ring a five-ring this goes away. If you make it a para-substituted six-ring it comes back:
So I think the problem here is that queryIsAtomBridgehead() is falsely identifying this N as a bridgehead.
Describe the bug
Adding a cyclobutyl group into a macrocycle causes the nitrogen to be treated as a stereo center.
To Reproduce
The nitrogen isn't necessary, the following variation also treats the same position as a carbon as a stereo center:
Screenshots
Configuration:
The text was updated successfully, but these errors were encountered: