Overlapping multi component SMARTS matching #7216
-
Hi! I am not sure this is a bug, but Daylight specifies the "dot" as notation for "not necessarily connected" which in my opinion implies that the different components as specified in a SMARTS may be connected but don't have to. In RDKit the following yields no matches: test = "CCO"
testMol = Chem.MolFromSmiles(test)
testSMARTS = "[#8]-*.[#6]-*"
testSMARTSMol = Chem.MolFromSmarts(testSMARTS)
matches = testMol.GetSubstructMatches(testSMARTSMol)
print(matches) while with |
Beta Was this translation helpful? Give feedback.
Answered by
jasondbiggs
Mar 6, 2024
Replies: 1 comment 3 replies
-
The issue is that
|
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
jpfeuffer
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The issue is that
testSMARTSMol
has four atoms whiletestMol
only has three. Either of these SMARTS should show the behavior of disconnected pattern matching: