Hi Christos,
If you add hydrogens to m3 after creating it in RDKit then both m1 and m2
are recognised as substructures of m3. See below for how I achieved this:
>>> from rdkit import Chem
>>> m1 = Chem.MolFromSmarts("[C:3][C:4](=[O:5])[O:6]([H:100])")
>>> m2 = Chem.MolFromSmarts("[C:3][C:4](=[O:5])[O;H:6]")
>>> m3 = Chem.MolFromSmiles("CCCCCCCCCCCCCC(=O)O")
>>> m3H = Chem.AddHs(m3)
>>> m3.HasSubstructMatch(m1)
False
>>> m3H.HasSubstructMatch(m1)
True
>>> m3.HasSubstructMatch(m2)
True
>>> m3H.HasSubstructMatch(m2)
True
Hope that helps.
Yours,
Toby Wright
--
InhibOx Ltd, Oxford
On 19 February 2014 10:25, Christos Kannas <chriskan...@gmail.com> wrote:
> Hi all,
>
> At my current project I'm working on reaction based multiobjective de novo
> design.
> And I have a set of reactions that I have converted into SMIRKS and
> reaction SMARTS..
>
> The problem I have is that when I have a reactant pattern in SSMARTS, as
> required by SMIRKS, that has explicit mapped Hydrogens that play a role in
> reaction, and I request a substructure search matching to a compound that
> has the substructure in question it can not find a match. But when I change
> the pattern to not have explicit mapped hydrogens the substructure matching
> search is successful.
>
> To help you understand I've created this small IPython Notebook
> http://nbviewer.ipython.org/gist/CKannas/9089271
>
> Can you give me the reasons why this happens?
>
> Best,
> Christos
>
> --
>
> Christos Kannas
> Researcher
> Ph.D Student
>
> Mob (UK): +44 (0) 7447700937
> Mob (Cyprus): +357 99530608
>
> [image: View Christos Kannas's profile on
> LinkedIn]<http://cy.linkedin.com/in/christoskannas>
>
>
> ------------------------------------------------------------------------------
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
> _______________________________________________
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss