There isn't great documentation for this, but the way the current code
works is reasonably simple.
If your reaction has two products (i.e. two molecules separated by a dot),
you will get two products (i.e. two separate molecules) when you call
RunReactants(); that's what you asked for.

Here's a very simple illustration of that with some silly isotope labels to
make it easier to see what's happening:

In [33]: rxn = AllChem.ReactionFromSmarts("[CH:1][O:2]>>[C:1].[O:2]")

In [34]: ps =
rxn.RunReactants((Chem.MolFromSmiles('[13CH2]1[12CH2][14CH2]O[15CH]1N'),))

In [35]: len(ps)

Out[35]: 1

In [36]: len(ps[0])

Out[36]: 2

In [37]: Chem.MolToSmiles(ps[0][0],True)

Out[37]: '[14CH2][12CH2][13CH2][15CH2]N'

In [39]: Chem.MolToSmiles(ps[0][1],True)

Out[39]: '[13CH2][12CH2][14CH2]O'

If you draw the molecule and the products, I think you'll see what's going
on.


If you are just interested in breaking a bond, you need to use "component
level grouping", like this:

In [40]: rxn = AllChem.ReactionFromSmarts("[CH:1][O:2]>>([C:1].[O:2])")

In [41]: ps =
rxn.RunReactants((Chem.MolFromSmiles('[13CH2]1[12CH2][14CH2]O[15CH]1N'),))

In [42]: len(ps)

Out[42]: 1

In [43]: len(ps[0])

Out[43]: 1

In [44]: Chem.MolToSmiles(ps[0][0],True)

Out[44]: 'N[15CH2][13CH2][12CH2][14CH2]O'

That formulation says, in effect, "[C:1] and [O:2] should be in the same
product molecule, but there should be no bond between them".


I should probably do a blog post on this and then incorporate it into the
documentation.


I hope this helps clear things up,

-greg



On Fri, Apr 22, 2016 at 11:31 AM, 吴玲 <monicacul...@126.com> wrote:

> Hi  Grégori,
>
> Maybe I don't have a clear understanding of this function, I know the dot
> represent disconncction of two fragments ,and I suppose  changes  just
> occurs in mapped molecular fragment, the remaining part of reactant is
> invariable, in other words, if  mapped molecular fragment  breaks based on
> input pattern, the rest of the reactant is maintained.
> So I still expect one site breaks, both ends would be connected by
> in-between atons .Maybe I shoud deep study the documentation of rdkit and
> SMARTS definition.
> Thank for your helps!
>
> Monica
>
>
>
>
>
> At 2016-04-22 16:32:39, greg...@gerebtzoff.com wrote:
> >Hi Monica,
> >
> >As Greg stated, why do you expect your product not to be fragmented?
> >I suggest you to have a careful look at the SMARTS definition (for
> >instance from Daylight:
> >http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html)
> >In SMARTS patterns, the dot indicates disconnected fragments. Thus you
> >obtain in your product... disconnected fragments.
> >
> >Best,
> >
> >Grégori
> >
> >
> >Le 2016-04-22 10:13, 吴玲 a écrit :
> >> Greg,
> >>
> >> After changing the pattern into
> >> "[C:1][C:2](=[O:3])[N+0:4][C:5]=[C:6][C:7]([O-:8])=[O:9].[OH2:10].[OH2:11]>>[C:1][C:2]([O-:10])=[O:3].[O:8]=[C:7]=[O:9].[N+:4].[C:6][C:5]=[O:11]
> >> , I get the same result .A ring structure just like you said is broken
> >> into pieces.
> >> pattern:[C:1][C:2](=[O:3])[N+0:4][C:5]=[C:6][C:7]([O-:8])=[O:9].[OH2:10].[OH2:11]>>[C:1][C:2]([O-:10])=[O:3].[O:8]=[C:7]=[O:9].[N+:4].[C:6][C:5]=[O:11]
> >>
> >> output:[O-]C(=O)C1=CNC(=O)CC1.O.O>>CCC(=O)[O-].O=C=[O-].[NH4+].CCC=O
> >>
> >> The input reactant ([O-]C(=O)C1=CNC(=O)CC1) if mapped with
> >> pattern'reactants ,it should be "
> >> [O-:8][C:7](=[O:9])[C:6]1=[C:5][N:4][C:2](=[O:3])[C:1][C:*]1,
> >>
> >> what I mean is that the input reactant with a ring that CARBON6
> >> connect with CARBON1 by CARBON* ,why the CARBON6  AND  CARBON1 IN THE
> >> product is not connected by the CARBON* ?
> >>
> >> Thanks a lot,
> >>
> >> -Monica
> >>
> >> At 2016-04-20 12:43:36, "Greg Landrum" <greg.land...@gmail.com> wrote:
> >>
> >>> Monica,
> >>>
> >>> Why do you think you should get a single chain from the ring
> >>> structure?
> >>> If you look at the atom mapping in your input reaction:
> >>>
> >>>
> >> [C:1][C:2](=[O:3])[N+0:4][C:5]=[C:6][C:7]([O-:8])=[O:9].[OH2:10].[OH2:11]>>[C:1][C:2]([O-:10])=[O:3].[O:7]=[C:8]=[O:9].[N+:4].[C:6][C:5]=[O:11]
> >>>
> >>> You've told it to put:
> >>> - carbons 1 and 2 from the reactant into product 1
> >>> - carbon 8 into product 2, carbon 7 into product 2 but converted
> >>> into an oxygen first.
> >>> - carbon 5 and 6 into product 4. In other words: you requested that
> >>> the input molecule be broken into pieces.
> >>>
> >>> The atom mapping tells you which atoms in the reactants correspond
> >>> to which atoms in the products.
> >>>
> >>> I would suggest that you look carefully at your reaction
> >>> definitions, in particular the atom mapping numbers, in Marvin and
> >>> make sure that you think that what you're asking for makes sense.
> >>>
> >>> -greg
> >>>
> >>> On Wed, Apr 20, 2016 at 6:04 AM, 吴玲 <monicacul...@126.com>
> >>> wrote:
> >>>
> >>>> Hi Greg,
> >>>>
> >>>> Thanks a lot for previous help! There is another question in
> >>>> RunReactants I want to ask for some help.
> >>>>
> >>>> when I input the pattern as
> >>>>
> >>>
> >> “[C:1][C:2](=[O:3])[N+0:4][C:5]=[C:6][C:7]([O-:8])=[O:9].[OH2:10].[OH2:11]>>[C:1][C:2]([O-:10])=[O:3].[O:7]=[C:8]=[O:9].[N+:4].[C:6][C:5]=[O:11]”
> >>>> and give the reactants rs1 =
> >>>>
> >>>
> >> ["[O-]C(=O)C1=CNC(=O)CC1","CC(=O)NC=C(CC([O-])=O)C([O-])=O","CC(=O)NC=C(C(CO)C([O-])=O)C([O-])=O"]
> >>>> ,rs2 = ['O'] , rs3 = ['O'],
> >>>> when I check the output product, I find that the first reactants
> >>>> with a ring structure divided into four sections instead of three
> >>>> parts containing a NH4+,a CO2,and a long chain composed by the
> >>>> remained two fragments.In other words , I think that the product
> >>>> should be like this:
> >>>>
> >>>> what's the matter with this pattern? why this reaction predicted
> >>>> is wrong and the other is correct?(output result attached below).
> >>>>
> >>>> pattern:
> >>>>
> >>>> 1 [O-]C(=O)C1=CNC(=O)CC1.O.O>>CCC(=O)[O-].O=C=O.[NH4+].CCC=O
> >>>>
> >>>> 2
> >>>>
> >>>
> >> CC(=O)NC=C(CC([O-])=O)C([O-])=O.O.O>>CC(=O)[O-].O=C=O.[NH4+].O=CCCC(=O)[O-]
> >>>>
> >>>> 3
> >>>>
> >>>
> >> CC(=O)NC=C(C(CO)C([O-])=O)C([O-])=O.O.O>>CC(=O)[O-].O=C=O.[NH4+].O=CCC(CO)C(=O)[O-]
> >>>>
> >>>> best wishes,
> >>>>
> >>>> monica
> >>>>
> >>>>
> >>>
> >> ------------------------------------------------------------------------------
> >>>> Find and fix application performance issues faster with
> >>>> Applications Manager
> >>>> Applications Manager provides deep performance insights into
> >>>> multiple tiers of
> >>>> your business applications. It resolves application problems
> >>>> quickly and
> >>>> reduces your MTTR. Get your free trial!
> >>>> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z [1]
> >>>> _______________________________________________
> >>>> Rdkit-discuss mailing list
> >>>> Rdkit-discuss@lists.sourceforge.net
> >>>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss [2]
> >>
> >>
> >>
> >> Links:
> >> ------
> >> [1] https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> >> [2] https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
> >>
> >> ------------------------------------------------------------------------------
> >> Find and fix application performance issues faster with Applications
> >> Manager
> >> Applications Manager provides deep performance insights into multiple
> >> tiers of
> >> your business applications. It resolves application problems quickly
> >> and
> >> reduces your MTTR. Get your free trial!
> >> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> >> _______________________________________________
> >> Rdkit-discuss mailing list
> >> Rdkit-discuss@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
> >
> >
> >------------------------------------------------------------------------------
> >Find and fix application performance issues faster with Applications Manager
> >Applications Manager provides deep performance insights into multiple tiers 
> >of
> >your business applications. It resolves application problems quickly and
> >reduces your MTTR. Get your free trial!
> >https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> >_______________________________________________
> >Rdkit-discuss mailing list
> >Rdkit-discuss@lists.sourceforge.net
> >https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Find and fix application performance issues faster with Applications
> Manager
> Applications Manager provides deep performance insights into multiple
> tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> _______________________________________________
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to