UNPKG

jsme

Version:

JSME is a free molecule editor written in JavaScript. JSME is a direct successor of the JME Molecule Editor applet. JSME supports drawing and editing of molecules and reactions on desktop computer, as well as on handheld devices including iPhone, iPad and

106 lines (93 loc) 4.12 kB
<html> <head> <script type="text/javascript" language="javascript" src="jsme/jsme.nocache.js"></script> <script> function atomHighLight(molIndex, atomIndex) { document.getElementById("atomHighLightTextAreaOut").value = atomIndex; } //this function will be called after the JavaScriptApplet code has been loaded. function jsmeOnLoad() { jsmeApplet = new JSApplet.JSME("jsme_container", "180px", "140px", { "options" : "depict" }); jsmeApplet.setNotifyAtomHighLightChangeJSfunction("atomHighLight"); var jme = "16 17 C 7.37 -8.99 C 7.37 -7.59 C 6.16 -6.89 C 4.95 -7.59 C 4.95 -8.99 C 6.16 -9.69 N 8.58 -6.89 C 8.58 -5.49 C 7.37 -4.79 O 6.16 -5.49 C 9.80 -7.59 O 9.80 -8.99 C 11.01 -6.89 Cl 12.22 -7.59 Cl 11.01 -5.49 C 9.80 -4.79 1 2 1 2 3 2 3 4 1 4 5 2 5 6 1 6 1 2 7 8 1 8 9 1 9 10 1 3 10 1 2 7 1 7 11 1 11 12 2 11 13 1 13 14 1 13 15 1 8 16 1"; jsmeApplet.readMolecule(jme); } </script> </head> <body bgcolor="#E6E6FA"> <h2>Depict mode with setNotifyAtomHighLightChangeJSfunction</h2> <div id="jsme_container"></div> <br> Atom highlighted by mouse over:<textarea id="atomHighLightTextAreaOut" rows="1" cols="3"></textarea> <hr> <br> <div code="JME.class" archive="JME.jar" width=120 height=80> <param name="options" value="depict"> <param name="mol" value="O=C1C3NNC1c2ccnc(c2)CCCCCCCCCc4cc3ccn4 JME 2013-10-12 Wed Oct 30 19:28:39 GMT+100 2013 27 30 0 0 0 0 0 0 0 0999 V2000 7.0399 2.4154 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 6.5611 3.7310 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 5.1620 3.6822 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 4.7761 2.3364 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 5.9367 1.5535 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 4.3000 4.7854 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 7.3440 4.8917 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 8.7406 4.7940 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 9.5234 5.9547 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 8.9097 7.2130 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 7.5131 7.3106 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 6.7303 6.1500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 3.4605 1.8576 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 2.3880 2.7575 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 1.0725 2.2786 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 0.8294 0.8999 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 1.9018 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 3.2174 0.4788 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 3.1785 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 0.2431 4.5573 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 1.5587 5.0361 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 1.8018 6.4148 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 3.1174 6.8937 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 3.3605 8.2724 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 4.6760 8.7512 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 5.7485 7.8513 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 7.0641 8.3301 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 1 2 1 0 0 0 0 2 3 1 0 0 0 0 3 4 1 0 0 0 0 4 5 1 0 0 0 0 5 1 1 0 0 0 0 3 6 2 0 0 0 0 2 7 1 0 0 0 0 8 9 1 0 0 0 0 9 10 2 0 0 0 0 10 11 1 0 0 0 0 11 12 2 0 0 0 0 7 12 1 0 0 0 0 7 8 2 0 0 0 0 4 13 1 0 0 0 0 14 15 1 0 0 0 0 15 16 2 0 0 0 0 16 17 1 0 0 0 0 17 18 2 0 0 0 0 13 18 1 0 0 0 0 13 14 2 0 0 0 0 15 19 1 0 0 0 0 19 20 1 0 0 0 0 20 21 1 0 0 0 0 21 22 1 0 0 0 0 22 23 1 0 0 0 0 23 24 1 0 0 0 0 24 25 1 0 0 0 0 25 26 1 0 0 0 0 26 27 1 0 0 0 0 27 11 1 0 0 0 0 M END "> </div> </body> </html>