That works, thanks! I'll be sure to include an explicit +0 when converting
when I need the product to be neutral.
On Mon, Oct 9, 2017 at 11:15 AM, Chris Earnshaw <[email protected]>
wrote:
> Hi
>
> I don't think the reaction SMARTS does specify a change in the
> charges. The N and O have to be charged in order to match the reactant
> pattern but they won't be altered by the transformation. If you
> specify that the product atoms are explicitly neutral I think you'll
> get the result you want -
> [#8-:2]-[#7+:1]=[O:3]>>[O+0:2]=[N+0:1]=[O:3]
>
> Chris Earnshaw
>
> On 9 October 2017 at 15:57, Chris Murphy <[email protected]>
> wrote:
> > Hi,
> >
> > I am using rdChemReactions to perform substructure transformations as
> > defined by configurable reaction smarts. When I create the reaction and
> run
> > a mol through it that I expect to be transformed by the indicated
> reaction
> > smarts, I see that the bonds have been changed according to the smarts,
> but
> > the charges are not changed.
> >
> > I am using the following smarts to define the transformation:
> > [#8-:2]-[#7+:1]=[O:3]>>[O:2]=[N:1]=[O:3]
> >
> > The input molecule is as follows:
> >
> > Mrv16c5 10061718252D
> >
> > 9 9 0 0 0 0 999 V2000
> > -0.5916 -0.0678 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
> > -1.3060 -0.4803 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
> > -1.3060 -1.3054 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
> > -0.5916 -1.7179 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
> > 0.1229 -1.3054 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
> > 0.1229 -0.4803 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
> > -0.5916 0.7572 0.0000 N 0 3 0 0 0 0 0 0 0 0 0 0
> > -1.3061 1.1697 0.0000 O 0 5 0 0 0 0 0 0 0 0 0 0
> > 0.1229 1.1697 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
> > 1 2 2 0 0 0 0
> > 2 3 1 0 0 0 0
> > 3 4 2 0 0 0 0
> > 4 5 1 0 0 0 0
> > 5 6 2 0 0 0 0
> > 6 1 1 0 0 0 0
> > 1 7 1 0 0 0 0
> > 7 8 1 0 0 0 0
> > 7 9 2 0 0 0 0
> > M END
> > $$$$
> >
> > and the output ends up being:
> >
> > RDKit 2D
> >
> > 9 9 0 0 0 0 0 0 0 0999 V2000
> > -1.3061 1.1697 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
> > -0.5916 0.7572 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
> > 0.1229 1.1697 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
> > -0.5916 -0.0678 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
> > -1.3060 -0.4803 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
> > 0.1229 -0.4803 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
> > -1.3060 -1.3054 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
> > 0.1229 -1.3054 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
> > -0.5916 -1.7179 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
> > 1 2 2 0
> > 2 3 2 0
> > 4 2 1 0
> > 4 5 2 0
> > 6 4 1 0
> > 5 7 1 0
> > 8 6 2 0
> > 7 9 2 0
> > 9 8 1 0
> > M CHG 2 1 -1 2 1
> > M END
> >
> > It seems the that NO bond is successfully converted to a double bond, but
> > the charges have not been changed, even though the reaction smarts
> indicates
> > that they N and O should be changed to neutral. Are there any glaring
> issues
> > with using reactions to do transformations like this?
> >
> > Thanks!
> >
> > -Chris
> >
> > ------------------------------------------------------------
> ------------------
> > 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
> > [email protected]
> > 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss