Hi,
I am using CDK 1.5.4 and detected some behavior of the SMARTS matcher that I
didn't quite understand.
When I search for a SMARTS pattern in one of the rings detected using the
SSSRFinder algorithm, the success of finding the pattern in the ring depends on
whether implicit hydrogens were converted to explicit ones, or not.
If explicit hydrogens are present, the pattern is not found. If only implicit
hydrogens are present, the pattern IS found.
This code was used:
String smiles = "C1C(O)CCC1";
IChemObjectBuilder blr =
SilentChemObjectBuilder.getInstance();
SmilesParser smipar = new SmilesParser(blr);
IAtomContainer m = smipar.parseSmiles(smiles);
String smarts = "C1-C-C-C-C1";
SMARTSQueryTool sqt = new SMARTSQueryTool(smarts, blr);
AtomContainerManipulator.convertImplicitToExplicitHydrogens(m);
IRingSet ringSet = new SSSRFinder(m).findSSSR();//find SSSR rings
for(IAtomContainer ring : ringSet.atomContainers()){
boolean found = sqt.matches(ring);//false (should be true)
}
Although the release notes of 1.5.4 are very informative, I couldn't find an
answer explaining this behavior.
So my question is two-fold:
1) how do I ensure that the pattern is found, even when explicit hydrogens
are used in the atomcontainer?
2) What is happening underneath the hood here? Is this behavior normal?
Regards,
Nick
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user