From: sushil r. <ron...@gm...> - 2007-04-25 06:02:25
|
I really appreciate the work you have done. Your code is working fine. It is creating a atomcontainer and also giving a match for few expression from UIT. i have not looked at all the aspect but here is my observation. ///////// Success! /////////// C=C c:c:c:c:c:c c:c:n:c:c:c [$([CX2](=C)=C)] //////////////////////////// like expression are parsed successfully and also return true from UIT. But for a complex expression like this ///////////// Error ! /////////////////// c:c:c:[c,n]:c:c [NX3,NX4+][CX4H]([*])[CX3](=[OX1])[O,N] //from benchmark() [OX1]=[C]~[N]~[C]=[OX1] [OX1]=[CX3]~[NH1]~[CX3]=[OX1] [$(c:cCl),$(c:c:cCl),$(c:c:c:cCl)]-[$(c:cCl),$(c:c:cCl),$(c:c:c:cCl)]//from benchmark() ////////////////////////////////////////////////////// It is giving this error. ********************************************** at org.openscience.cdk.isomorphism.UniversalIsomorphismTester.nodeConstructor( UniversalIsomorphismTester.java:696) at org.openscience.cdk.isomorphism.UniversalIsomorphismTester.buildRGraph( UniversalIsomorphismTester.java:384) at org.openscience.cdk.isomorphism.UniversalIsomorphismTester.search (UniversalIsomorphismTester.java:413) at org.openscience.cdk.isomorphism.UniversalIsomorphismTester.getSubgraphMaps( UniversalIsomorphismTester.java:227) at org.openscience.cdk.smiles.smarts.SMARTSQueryTool.matches( SMARTSQueryTool.java:135) at org.openscience.cdk.applications.SubstructureFinder.main( SubstructureFinder.java:108) *********************************************** This error has nothing to do with the parsing but with creation of atomcontainer. Comment: 1) May be the code is parsing the smarts correctly but that does not mean anything unless we create the atomcontainer. ( As we discuss previously) 2) If this parser is also good for the simple expressions that even the oldest code could do then creating this code will be like reinventing the wheel. 3)As jiao is running out of time with this progress in code only sure he will not be as active as today and progress in code will stop somebody else will have to take over the code,which will be more difficult for cdk because understanding this design is not that way easy for people already having their half hard disk full of chemistry. (as javacc is design is easy to understand any body can easily learn and start coding) (like for this query [$(c:cCl),$(c:c:cCl),$(c:c:c:cCl)]-[$(c:cCl),$(c:c:cCl),$(c:c:c:cCl)] present parser will say this is not valid smart encounter $ so programmer will understand he has to write a simple expression like <$> atomExpression() and parse this kind of SMARTS and create atom container as soon as a token is encounter.) 4) Adapting this design is not permanent solution and also not easy for other developer to adapt and code and contribute. (And we have to remember we need other developer to contribute because it is not possible for one to make a full substructure search and solution like jjtree will always tempting the admin to adapt something that will complete it quickly.) 5) But as our friend has worked on it we have to give a justification to his effort. Well this is my view you can test his code but remember to change the parser line in SQT. as both parser will have same name. looking forward to hear from you. -- ******************************** sushil ronghe Center of Pharmacoinformatics India ********************************* |