Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cyclobutyl group in a macrocycle triggers a stereo center #6049

Closed
cdvonbargen opened this issue Feb 2, 2023 · 1 comment
Closed

Cyclobutyl group in a macrocycle triggers a stereo center #6049

cdvonbargen opened this issue Feb 2, 2023 · 1 comment
Labels
Milestone

Comments

@cdvonbargen
Copy link
Contributor

cdvonbargen commented Feb 2, 2023

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
Screenshot 2023-02-02 at 2 19 16 PM

Configuration:

>>> rdkit.__version__
'2022.09.4-sch'
@cdvonbargen cdvonbargen added the bug label Feb 2, 2023
@greglandrum
Copy link
Member

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:
image

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:
image

So I think the problem here is that queryIsAtomBridgehead() is falsely identifying this N as a bridgehead.

greglandrum added a commit to greglandrum/rdkit that referenced this issue Feb 7, 2023
Bump version of NumBridgeheadAtoms descriptor
@greglandrum greglandrum added this to the 2022_09_5 milestone Feb 7, 2023
greglandrum added a commit that referenced this issue Feb 23, 2023
* backup

* backup

* Fixes #6049

Bump version of NumBridgeheadAtoms descriptor

* add a specific test for the issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants