Re: [Rdkit-discuss] HasSubstructMatch doesn't work as expected

2017-09-14 Thread Greg Landrum
On Thu, Sep 14, 2017 at 12:05 PM, Michał Nowotka wrote: > Using > > params = AdjustQueryParameters() > params.makeAtomsGeneric = True > params.makeBondsGeneric = True > pattern = AdjustQueryProperties(pattern, params) > > Seems to solve my problem - I'm getting

Re: [Rdkit-discuss] HasSubstructMatch doesn't work as expected

2017-09-14 Thread Michał Nowotka
Using params = AdjustQueryParameters() params.makeAtomsGeneric = True params.makeBondsGeneric = True pattern = AdjustQueryProperties(pattern, params) Seems to solve my problem - I'm getting a match now (but I haven't yet verified if the match is correct and I don't understand why

Re: [Rdkit-discuss] HasSubstructMatch doesn't work as expected

2017-09-13 Thread Greg Landrum
This isn't a really straightforward one. One solution (and I think the best one) is to change the aromaticity model used to match whatever is generating the hits (in your case it's the Symyx cartridge). The RDKit has functionality to do this already when you call the SetAromaticity() function:

Re: [Rdkit-discuss] HasSubstructMatch doesn't work as expected

2017-09-13 Thread Michal Krompiec
I'm afraid it won't work in the general case (i.e. you can make it work for some classes of compounds, but not without unwanted side effects on others) if the aromaticity model of the other cartridge is different - and it seems to be the case here... On Wednesday, 13 September 2017, Michał

Re: [Rdkit-discuss] HasSubstructMatch doesn't work as expected

2017-09-13 Thread Michał Nowotka
OK, so what I have is some substructure results from other (non-rdkit) cartridge and I want to use rdkit to generate images of all results with the query substracture highlighed and aligned. So I have two things: a list of compounds and a query compound. Now I need to highlight the query compound

Re: [Rdkit-discuss] HasSubstructMatch doesn't work as expected

2017-09-13 Thread Peter S. Shenkin
Your course of action depends upon just what you are really trying to do. If it's only aspirin, then why wouldn't you just do it manually? If it goes beyond aspirin, you have to start by defining in general terms exactly what you want to match to what. For example, given a query molecule (aspirin

Re: [Rdkit-discuss] HasSubstructMatch doesn't work as expected

2017-09-13 Thread Michał Nowotka
Is there any flag in RDkit to match both 'normal' aspirin and embedded aromatic analogues? The problem is that I can't modify user queries by hand in real time :) On Wed, Sep 13, 2017 at 2:12 PM, Chris Earnshaw wrote: > Hi > > The problem is due to RDkit perceiving the

Re: [Rdkit-discuss] HasSubstructMatch doesn't work as expected

2017-09-13 Thread Chris Earnshaw
Hi The problem is due to RDkit perceiving the embedded pyranone in CHEMBL1999443 as an aromatic system, which is probably correct. However, in the structure of aspirin the carboxyl carbon and singly bonded oxygen are non-aromatic, so if you just use the SMILES of aspirin as a query it won't match