Hi Ivan,

I tried the SMARTS you sent and it worked.

Thank you!

Jean-Marc

Le 06/02/2019 à 15:46, Ivan Tubert-Brohman a écrit :
Hi Jean-Marc,

Try the reaction smarts '[C:1]([OH:2])=[N:3]>>[C:1](=[OH0:2])[NH:3]'. The only difference is the addition of "H0" to product atom :2. The problem is that the hydrogen count from the reactant atom gets copied over unless specified otherwise.

Hope this helps,
Ivan


On Wed, Feb 6, 2019 at 9:37 AM Jean-Marc Nuzillard <jm.nuzill...@univ-reims.fr <mailto:jm.nuzill...@univ-reims.fr>> wrote:

    Dear All,

    I need to convert iminol functional groups into amides.

    Being new to reaction SMARTS I wrote the following code:

    *********************

    from rdkit import Chem
    from rdkit.Chem import AllChem
    #from rdkit.Chem.Draw import IPythonConsole

    sm1 = 'CNC(C)=O'
    m1 = Chem.MolFromSmiles(sm1)
    #m1
    ## m1 is an amide

    inchi = Chem.MolToInchi(m1)
    m2 = Chem.MolFromInchi(inchi)
    #m2
    ## m2 is an iminol, as expected from InChI

    rxn =
    AllChem.ReactionFromSmarts('[C:1]([OH:2])=[N:3]>>[C:1](=[O:2])[NH:3]')
    ps = rxn.RunReactants((m2,))
    len(ps)
    ## 1

    m3 = ps[0][0]
    #m3
    ## m3 is wrong and cannot be sanitized
    print(Chem.MolToSmiles(m3))
    ## CNC(C)=[OH]

    rxn =
    AllChem.ReactionFromSmarts('[H:4][0:1][C:2]=[N:3]>>[O:1]=[C:2][N:3][H:4]')
    ps = rxn.RunReactants((m2,))
    len(ps)
    ## 0
    ********************

    The first reaction SMARTS I tried
    ('[C:1]([OH:2])=[N:3]>>[C:1](=[O:2])[NH:3]')
    gives a result but with a trivalent neutral oxygen atom.
    Reading more about SMIRKS theory, I tried:
    '[H:4][0:1][C:2]=[N:3]>>[O:1]=[C:2][N:3][H:4]' without any success.

    Could someone indicate me the correct iminol->amide reaction SMARTS?

    Best regards,

    Jean-Marc

-- Jean-Marc Nuzillard
    Directeur de Recherches au CNRS

    Institut de Chimie Moléculaire de Reims
    CNRS UMR 7312
    Moulin de la Housse
    CPCBAI, Bâtiment 18
    BP 1039
    51687 REIMS Cedex 2
    France

    Tel : 03 26 91 82 10
    Fax : 03 26 91 31 66
    http://www.univ-reims.fr/ICMR
    http://eos.univ-reims.fr/LSD/CSNteam.html

    http://www.univ-reims.fr/LSD/
    http://www.univ-reims.fr/LSD/JmnSoft/



    _______________________________________________
    Rdkit-discuss mailing list
    Rdkit-discuss@lists.sourceforge.net
    <mailto:Rdkit-discuss@lists.sourceforge.net>
    https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


--
Jean-Marc Nuzillard
Directeur de Recherches au CNRS

Institut de Chimie Moléculaire de Reims
CNRS UMR 7312
Moulin de la Housse
CPCBAI, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to