Post #1909683
2026-03-20 09:44 UTC
Replies (2)
-
@dalke@toots.nu 2026-03-21 10:34
The answer is 42. When the pattern [CD4H0X4](-*)(-*)(-*)-*) matches an atom, there are 24 possible ways for it to match (that's 4! = 4 * 3 * 2 * 1 because there are 4 places for the first *, 3 for the second, etc.). RDKit's GetSubstructMatches by default matches at most maxMatches=1000 times. 1000/24 = 41.666... Changing maxMatches to 2000 finds all 50 expected matches. This means RDKit's recursive SMARTS matcher does all matches, rather than stop at first match.
-
@cdk@fosstodon.org 2026-03-20 11:16
@dalke we find 50: https://cdkdepict.cloud.vhp4safety.nl/depict/bot/svg?smi=CC(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C(C)(C)C&w=-1&h=-1&abbr=on&hdisp=S&sma=%5B%24(%5BCD4H0X4%5D(-*)(-*)(-*)-*)%5D&zoom=1.3&annotate=none&r=0