|
From: Rajarshi G. <rg...@in...> - 2009-03-07 05:41:59
|
On Mar 7, 2009, at 12:21 AM, Rajarshi Guha wrote: > > On Mar 6, 2009, at 11:15 PM, Andrew Dalke wrote: > >> On Mar 7, 2009, at 1:37 AM, Rajarshi Guha wrote: >>> In the CDK you can get the AST for a given SMARTS query - I suppose >>> you could then play with the two AST's >> >> FROWNS also has a tokenizer for SMARTS, written in Python. >> >> But the tree isn't enough - you need to turn it into a graph to do >> the MCS. > > > I'm not sure I understand - the tree is a graph Actually, it seems that one can walk the AST to generate a 'query molecule' as shown in the Javadocs for SmartsQueryVisitor. Now, given two queries, one ends up with two IQueryAtomContainers - but the CDK UIT doesn't allow one to do a matching in this case. So the mechanics needs some fiddling, but it seems that it should be doable. ------------------------------------------------------------------- Rajarshi Guha <rg...@in...> GPG Fingerprint: D070 5427 CC5B 7938 929C DD13 66A1 922C 51E7 9E84 ------------------------------------------------------------------- Q: What's polite and works for the phone company? A: A deferential operator. |