Re: [Rdkit-discuss] RunReactants atom mapping

2017-12-21 Thread Jennifer Wei
Hi Ruben,

I ran into this issue a few months ago. Take a look at this thread :
https://www.mail-archive.com/rdkit-discuss@lists.sourceforge.net/msg07311.html

And also Connor Coley's fork of rdkit:


https://github.com/connorcoley/Rdkit


Example of use:

https://github.com/connorcoley/ochem_predict_nn/blob/master/data/generate_candidates_edits_fullgrants.py



Cheers,
Jennifer


On Thu, Dec 21, 2017 at 10:02 AM Ruben Van de Vijver <
ruben.vandevij...@ugent.be> wrote:

> Dear all,
>
>
>
> I have the following lines to create the products of a hydrogen
> abstraction reaction by a radical atom. The length of the product tuple is
> 6 as expected from the 6 hydrogen atoms of ethane that can be abstracted. A
> first question that I have is, is there a way to know for each set of
> products which hydrogen got abstracted from which carbon atom? I would need
> some sort of mapping of the atom indices of the reactants to the indices
> given by the reaction smarts.
>
> Secondly, if there is a reaction with two reactants, and both reactants
> match the two reactant templates, is it possible to know which reactant
> template was used on which reactant?
>
>
>
> rxn =
> AllChem.ReactionFromSmarts("[C;v4:0][H:1].[C;v3:2]>>[C;v3:0].[H:1][C;v4:2]")
>
> react1 = Chem.AddHs(Chem.MolFromSmiles('CC'))
>
> react2 = Chem.AddHs(Chem.MolFromSmiles('[CH3]'))
>
> prods = rxn.RunReactants((react1,react2))
>
> print len(prods)
>
>
>
> Thanks,
>
> Ruben
>
>
>
>
>
> [image:
> https://styleguide.ugent.be/files/uploads/logo_UGent_EN_RGB_2400_kleur_witbg.png]
>
> *Ruben Van de Vijver*
>
> *Postdoctoral Researcher*
>
> *Laboratory for Chemical Technology (LCT) *
>
> Department of Materials, Textiles and Chemical Engineering
>
> Technologiepark 914, 9052 Ghent, Belgium
>
> T: +32 9 264 56 75 <+32%209%20264%2056%2075>
>
> http://www.lct.ugent.be/
> 
> http://helpdesk.UGent.be/e-maildisclaimer.php
> 
>
>
>
>
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] RunReactants atom mapping

2017-12-21 Thread Ruben Van de Vijver
Dear all,

I have the following lines to create the products of a hydrogen abstraction 
reaction by a radical atom. The length of the product tuple is 6 as expected 
from the 6 hydrogen atoms of ethane that can be abstracted. A first question 
that I have is, is there a way to know for each set of products which hydrogen 
got abstracted from which carbon atom? I would need some sort of mapping of the 
atom indices of the reactants to the indices given by the reaction smarts.
Secondly, if there is a reaction with two reactants, and both reactants match 
the two reactant templates, is it possible to know which reactant template was 
used on which reactant?

rxn = 
AllChem.ReactionFromSmarts("[C;v4:0][H:1].[C;v3:2]>>[C;v3:0].[H:1][C;v4:2]")
react1 = Chem.AddHs(Chem.MolFromSmiles('CC'))
react2 = Chem.AddHs(Chem.MolFromSmiles('[CH3]'))
prods = rxn.RunReactants((react1,react2))
print len(prods)

Thanks,
Ruben


[https://styleguide.ugent.be/files/uploads/logo_UGent_EN_RGB_2400_kleur_witbg.png]

Ruben Van de Vijver
Postdoctoral Researcher
Laboratory for Chemical Technology (LCT)
Department of Materials, Textiles and Chemical Engineering
Technologiepark 914, 9052 Ghent, Belgium
T: +32 9 264 56 75
http://www.lct.ugent.be/  
http://helpdesk.UGent.be/e-maildisclaimer.php



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss