Ashok,
I see 2 sources of problem in your code:

1) You cannot call compareSmiles() before the Jmol Object has finished being 
created

2) Where do you expect to see the output of compareSmiles() ?

This, for example, works for me in the page (no need for the console):
<script type="text/javascript">
function go1() {
        document.getElementById('result').innerHTML = 
compareSmiles('CC1=CC2=C(C=C1C)N(C3=NC(=O)NC(=O)C3=N2)CC(C(C(CO)
O)O)O', 
'N(C(NC1=O)=O)=C(C1=NC2C=C3C)N(C=2C=C3C)C[C@H]([C@@H](O)[C@H
](CO)O)O');
}
function go2()  {
        document.getElementById('result').innerHTML = 
compSmiles('CC1=CC2=C(C=C1C)N(C3=NC(=O)NC(=O)C3=N2)CC(C(C(CO)O)
O)O', 
'N(C(NC1=O)=O)=C(C1=NC2C=C3C)N(C=2C=C3C)C[C@H]([C@@H](O)[C@H
](CO)O)O');
}
</script>
<body>
<input type="button" value="go! 1" onClick="go1()">
<input type="button" value="go! 2" onClick="go2()">

<div id="result"></div>
</body>

If you want to work with the Jmol console then you should run the functons in 
JmolScript, not in Javascript.

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to