Dear Ashok, You have tested this successfully in the console
smiles1 = 'CC1=CC2=C(C=C1C)N(C3=NC(=O)NC(=O)C3=N2)CC(C(C(CO)O)O)O' smiles2 = 'N(C(NC1=O)=O)=C(C1=NC2C=C3C)N(C=2C=C3C)C[C@H]([C@@H](O)[C @H](CO)O)O' result = smiles2.find("SMILES", smiles1) So that's what you need in your function. Something is getting broken in the way. This strategy seems to be working, moving things into Jmol script and doing them one by one (sort of a "divide and conquer" strategy, I'd say): function compSmiles(key, ans) { key = key.replace(/\\/g, '\\\\'); ans = ans.replace(/\\/g, '\\\\'); Jmol.script(jmolApplet0, "smiles1 = '" + key + "'; "); Jmol.script(jmolApplet0, "smiles2 = '" + ans + "'; "); return Jmol.evaluateVar(jmolApplet0, "smiles1.find('SMILES',smiles2) > 0"); } I'm not sure if I have 1 and 2 correctly or it's the other way around. · Dr. Angel Herráez Biochemistry and Molecular Biology, Dept. of Systems Biology, University of Alcalá E-28871 Alcalá de Henares (Madrid), Spain ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 _______________________________________________ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users