Hi,

Is it reasonable to expect that a SMARTS should match itself when
useQueryQueryMatches=True?

  query = Chem.MolFromSmarts('[C;!$(C=O)]Cl')
  query.HasSubstructMatch(query, useQueryQueryMatches=True)

The above returns False. Without useQueryQueryMatches, it returns True, but
I think I need useQueryQueryMatches for my application because queries are
not generally valid molecules, and in some cases HasSubstructMatch ends up
raising exceptions (for example when the SMARTS specifies hydrogen counts).

If I remove the recursive part of the SMARTS above, I get a match, so I
suspect that the query-query search doesn't play well with recursive SMARTS.

Best,
Ivan
------------------------------------------------------------------------------
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
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to