Re: [Rdkit-discuss] Two functional groups in a single SMARTS pattern

2023-08-24 Thread Andreas Luttens
That worked perfectly! Bedankt Wim! Best wishes, Andreas On Thu, Aug 24, 2023 at 2:27 PM Wim Dehaen wrote: > Dear Andreas, > the issue is with your aldehyde/ketone smarts. it looks for an explicit > aldehyde H that is not there. When the input smi is NCC(=O)C the > substructure matches. > > An

Re: [Rdkit-discuss] Two functional groups in a single SMARTS pattern

2023-08-24 Thread Wim Dehaen
Dear Andreas, the issue is with your aldehyde/ketone smarts. it looks for an explicit aldehyde H that is not there. When the input smi is NCC(=O)C the substructure matches. An alternative smarts you can use that will match aldehyde but not esters and amides: [#7H2].[#6][C;!$(C-O);!$(C-N)](=[O]) b