User 779e37e0e6
29-07-2015 21:41:19
Hello,
I would like to express the smarts for a class of compounds with an aliphatic carbon chain of 13 to 21 carbon atoms, where the longest chain of carbon has between 13 and 21 carbons and is attached to a Nitrogen atom. Examples include:
- CCCCCCCCCCCCCNH2 ; CCCCCC(C)C\C=C\C(C)CCCNH2 ; CCCCCCCCCCC\C=C\CCCCNH2
However, I do not want to include compounds containing a carbon chain of more than 21 carbon atoms. Which means that the following compounds should not be included:
- CCCCCCCCCCCCCCCC\C=C\CCCCNH2; CC/C=C\CCCCCCCCCCCC\C=C\CCCCNH2
I first generated the patterns for each of the two types:
13 carbons attached to N: (A) => [#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-[#7]([H])[H]
22 carbons attached to N: (B) => [#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-[#7]([H])[H]
I then tried to combined those into 1 smarts [$(A)!$(B)] * to mean that the compound of interest should match A but not match B. This does not work!
What would be the best way of describing this in one SMARTS string?
[$(A)!$(B)]: [$([#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-[#7]([H])[H])!$( [#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-,=[#6]-[#7]([H])[H])]
Thank you
Regards,
MrYan