Result is empty
String smirks = "[#8-:10]-[#6:9](=[O:11])-[#6:1]-1=[CH1]-[#6;H1:5]=[#6;H1:4]-[#6;H1:3]=[#6;H1:2]-1>>O-[#6:5](=O)-[#6;H2:4]\\[#6;H1:3]=[#6;H1:2]/[#6;H2:1]-[#6:9](-[#8-:10])=[O:11]"; String smi = "O=C([O-])C1=CC=CC=C1";
Examples are also provided as short, self-contained Java Unit Test:
https://github.com/mguetlein/TestAmbitSmarts/blob/master/src/test/java/org/kramerlab/test/TestAmbit.java
envipath id:
rule4287
The smirks is not correctly defined. Two types of problems are present:
1.Aromatic ring is defined with single and double non aromatic bonds ('-' and '=')
2. Atom [CH1] does not match aromatic systems since it defines aliphatic carbon (capital symbol 'C')
According to the official SMARTS/SMIRKS syntax by default supported in Ambit,
bond '-' means single NON AROMATIC and that is why these substituents does not match the aromatic substituent because the aromatic cycle is fuzed to another atomatic cycle
Working solutions:
Solution (1)
Use insted of '-' single aromatic '-:' bond
Use insted of '=' doble aromatic '=:' bond
Use instead of [CH1] following: [#6H1]
A working variant of the smirks is:
Solution(2)
Use instead of [CH1] following: [#6H1]
Activate flags:
smrkMan.getSmartsParser().mSupportSingleBondAromaticityNotSpecified = true;
smrkMan.getSmartsParser().mSupportDoubleBondAromaticityNotSpecified = true;
By default these flags are 'false'. Making them 'true', the single bond '-' and double bond '=' will match aromatic systems as well as aliphatic systems.
Generally I do not reccomend the second solution (although it seems handy) because it changes the default smarts/smirks syntax.
And if using this approach, apply these flags only for specific reactions. Not for all reactions.
Fixed in 3.0.3-SNAPSHOT latest revision 7696