That worked perfectly!

Bedankt Wim!

Best wishes,
Andreas

On Thu, Aug 24, 2023 at 2:27 PM Wim Dehaen <wimdeh...@gmail.com> 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 alternative smarts you can use that will match aldehyde but not esters
> and amides:
> [#7H2].[#6][C;!$(C-O);!$(C-N)](=[O])
>
> best wishes
> wim
>
> On Thu, Aug 24, 2023, 2:09 PM Andreas Luttens <andreas.lutt...@gmail.com>
> wrote:
>
>> Dear community,
>>
>> I'm looking for a way to identify molecules that have two functional
>> groups, for instance a primary amine and a ketone.
>>
>> How can I construct a single SMARTS pattern that encompasses two
>> functional groups?
>>
>> I've tried the following pattern:
>> [#7H2].[#6][#6](=[O])[#6,#1]
>>
>> This should ideally hit compounds that have both a primary amine and a
>> ketone/aldehyde. For instance, the molecule:
>> mol = Chem.MolFromSmiles("NCC(=O)")
>>
>> However, I get no matches using this SMARTS pattern. Is there anyway to
>> enforce the identification with a single pattern?
>>
>> Thanks in advance!
>>
>> Best regards,
>> Andreas
>> _______________________________________________
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to