Hi Fiorella, I don't believe your initial solution is actually wrong; I think it may just be the drawing of RDKit that is throwing you off. Whenever a red circle shows up in a mol image, that indicates the perfect overlap of two atoms. In this case, it is extra confusing because one of the atoms is a red O itself.
If I do `Chem.MolToSmiles(products[0][0])` on your code, I get `O=C(O)COC1(Cc2cc[nH]n2)CNC1`, which gives the following image in ChemDraw. [image: Screen Shot 2021-06-27 at 5.20.55 PM.png] Hopefully that's all that it was, but please let me know if there was some other error you noticed. Best, Matt On Sun, Jun 27, 2021 at 3:34 PM Fiorella Ruggiu <ruggiu.fiore...@gmail.com> wrote: > Errata: My previously given solution actually doesn't work. > > On Sun, Jun 27, 2021 at 12:10 PM Fiorella Ruggiu < > ruggiu.fiore...@gmail.com> wrote: > >> Hi all, >> >> I initially wrote an fmoc smarts reaction to deprotect molecules as the >> following: >> reaction_smarts='[#7:1]C(=O)OCC1c2ccccc2-c3ccccc13>>[#7:1]' >> >> Here's an example where this fails: >> >> from rdkit import Chem >> from rdkit.Chem import AllChem >> >> >> mol=Chem.MolFromSmiles('O=C(O)COC1(Cc2cc[nH]n2)CN(C(=O)OCC2c3ccccc3-c3ccccc32)C1') >> mol >> [image: image.png] >> reaction_smarts='[#7:1]C(=O)OCC1c2ccccc2-c3ccccc13>>[#7:1]' >> rxn = AllChem.ReactionFromSmarts(reaction_smarts) >> products = rxn.RunReactants((mol,)) >> products[0][0] >> [image: image.png] >> >> Now this gets solved by rewriting my smarts >> to '[#7;$([#7]C(=O)OCC1c2ccccc2-c3ccccc13):1]>>[#7:1]' but I don't >> understand what was wrong with the initial one and how it could create that >> result. This does not happen systematically to the building blocks I've >> been working with. Does anyone have an explanation for this or is it a bug? >> >> Thank you for your help! >> Fio >> >> >> _______________________________________________ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss