-
Notifications
You must be signed in to change notification settings - Fork 0
/
jsmetest.htm
75 lines (66 loc) · 1.74 KB
/
jsmetest.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!DOCTYPE html>
<html>
<head>
<title>Jmol/JME Demo</title>
<meta charset="utf-8" />
<script type="text/javascript" language="javascript" src="jsme/jsme/jsme.nocache.js"></script>
<script type="text/javascript" src="JSmol.min.js"></script>
<script type="text/javascript" src="js/JSmolJME.js"></script>
<script type="text/javascript">
var jmol="jmol";
var jme = "jme";
var JmolInfo = {
width: 350,
height: 300,
debug: false,
color: "black",
use: "HTML5",
addSelectionOptions: true,
serverURL: "http://chemapps.stolaf.edu/jmol/jsmol/php/jsmol.php",
jarPath: "java",
jarFile: "JmolAppletSigned.jar",
j2sPath: "j2s",
isSigned: true,
//defaultModel: ":morphine",
console: "none",
script: ""
}
var JMEInfo = {
use: "HTML5",
visible: true
//,divId: "jmediv"
//,jarPath: "jme",
//,jarFile: "JME.jar"
//optional parameters
// turns out the JSME has "nocanonize" as default, not "canonize"
,"options" : "nocanonize"//"query,hydrogens"
//,"jme" : startingStructure
}
//Jmol.setGrabberOptions([[":", "PubChem"]])
Jmol.setGrabberOptions([["$", "NCI"]]) // allows 2D reading
</script>
</head>
<body>
<table width=1000 cellpadding=10>
<tr><td>
Test of Jmol/JME interface -- switch back and forth between 2D and 3D, changing the model as desired. Status: working; 3D->2D loses stereochemistry.
Requires <a href=../jsmol/js/JSmolJME.js>JSmolJME.js</a>. Code on page:
<pre>
<code>
jmol = Jmol.getApplet("jmol", JmolInfo)
jme = Jmol.getJMEApplet("jme", JMEInfo, jmol);
</code>
</pre>
</td>
<td>
<a href="javascript:Jmol.show2d(jmol, true)">2D</a>
<a href="javascript:Jmol.show2d(jmol, false)">3D</a>
<br>
<script>
jmol = Jmol.getApplet(jmol, JmolInfo)
jme = Jmol.getJMEApplet(jme, JMEInfo, jmol);
</script>
</td>
</tr></table>
</body>
</html>