---------- Forwarded message ----------
From: Yannick .Djoumbou <y.djoum...@gmail.com>
Date: Thu, Nov 20, 2014 at 9:21 AM
Subject: Weird problem with CDK smarts pattern matching
To: cdkuser <cdk-user@lists.sourceforge.net>, Zheng Shi <zs...@ualberta.ca>
Dear all,
I am working on task where I need to generate atom fingerprints based on
the occurence of a set of patterns in a molecule. Therefore, I am doing
some pattern matching and trying to get the atom indices.
I ran this ():
IAtomContainer molecule = sp.parseSmiles("CSCCSCO");
SMARTSQueryTool smarts_pattern = new SMARTSQueryTool("[#6]S[#6]");
boolean status = smarts_pattern.matches(molecule);
List<List<Integer>> indexes = smarts_pattern.getUniqueMatchingAtoms();
smarts_pattern.countMatches() returned 2. However, indexes = [[0, 1, 2]]
(Aren't I supposed to get 2 arrays here ?).
Trying smarts_pattern.getMatchingAtoms() did not change anything.
When I changed the structure to "CSCCSC(O)CCCSCC",
smarts_pattern.countMatches() returned 4, which is wrong too.
And indexes = [[0, 1, 2], [9, 10, 11]].
I am using CDK-1.4.11.
Please could you help me understand this and get the correct result?
Regards,
Yannick
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user