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

Rule not applied when I think it should be. #18

Open
willfinnigan opened this issue Mar 2, 2020 · 4 comments
Open

Rule not applied when I think it should be. #18

willfinnigan opened this issue Mar 2, 2020 · 4 comments

Comments

@willfinnigan
Copy link

willfinnigan commented Mar 2, 2020

Hi,

Nice project.

I've got quite a simple rule I'd like to apply which has no chirality specified.

[#6:4][#8:6][#6:2](=[O:3])[#6:1] >> [#6:4][#6:2](=[O:3])[#6:1]

Screenshot 2020-03-02 at 18 54 01

This works fine in most cases, but not for this ring:

C[C@@H]1CCOC(=O)CC1

Screenshot 2020-03-02 at 18 54 06

However, rings one carbon bigger or one carbon smaller work fine.

Is it something to do with it being a symmetrical product? The standard rdkit method works ok.

Thanks for any help!!

Best,
Will

@willfinnigan
Copy link
Author

willfinnigan commented Mar 2, 2020

from rdchiral.main import rdchiralReaction, rdchiralReactants, rdchiralRun

rxn = rdchiralReaction('[#6:4][#8:6][#6:2](=[O:3])[#6:1]>>[#6:4][#6:2](=[O:3])[#6:1]')
reactants = rdchiralReactants('C[C@@H]1CCOC(=O)CC1')
outcomes = rdchiralRun(rxn, reactants)

print(outcomes)

@thomasstruble
Copy link
Contributor

You are correct, the outcomes from rdkit has stereochemistry when the symmetry of the product makes the molecule achiral. The lines in the code that deals with this are:

rdchiral/rdchiral/main.py

Lines 498 to 511 in 3b9ae0e

# Now, check to see if we have destroyed chirality
# this occurs when chirality was not actually possible (e.g., due to
# symmetry) but we had assigned a tetrahedral center originating
# from the reactants.
# ex: SMILES C(=O)1C[C@H](Cl)CCC1
# SMARTS [C:1]-[C;H0;D3;+0:2](-[C:3])=[O;H0;D1;+0]>>[C:1]-[CH2;D2;+0:2]-[C:3]
skip_outcome = False
if len(tetra_copied_from_reactants) > 0:
Chem.AssignStereochemistry(outcome, cleanIt=True, force=True)
for a in tetra_copied_from_reactants:
if a.GetChiralTag() == ChiralType.CHI_UNSPECIFIED:
if PLEVEL >= 2: print('Auxiliary reactant atom was chiral, now is broken -> skip outcome')
skip_outcome = True
break

@connorcoley
Copy link
Owner

Hi Will -- Thanks for creating this issue. Viewed in the context of retrosynthesis, this looks like the desired behavior. We wouldn't be able to synthesize C[C@@H]1CCOC(=O)CC1 through that ring expansion; we could only make a racemic mixture since we are starting from the achiral precursor.

If you're interested in changing this behavior, you could consider modifying the lines @thomasstruble referred you to. However, we always handle ambiguity in a manner that makes sense for retrosynthesis throughout the code, so I'd caution you against making just that single change

@willfinnigan
Copy link
Author

Ah that makes sense! (sorry, biologist here)

However, enzymatically this appears to be possible.
https://onlinelibrary.wiley.com/doi/epdf/10.1002/cctc.201300604

I'll have a play with the change @thomasstruble suggested.

Thanks both for getting back. Hopefully see you in Bristol next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants