-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsync4b.htm
More file actions
98 lines (83 loc) · 2.7 KB
/
Copy pathsync4b.htm
File metadata and controls
98 lines (83 loc) · 2.7 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src=JSmol.min.js></script>
<script type="text/javascript">
function callback(a,b) {
document.title=[a,b,b.charCodeAt(8)]
return b
}
function sync() {
var syncing = document.getElementById("drive").checked
var s = (syncing ? 'sync * on;sync * "set syncMouse on;set syncScript off";sync jmolAppletC SLAVE;sync jmolAppletD SLAVE': 'sync * off')
Jmol.script(jmolAppletA, s);
}
function syncAll() {
var s = 'sync *;set syncScript true;sync * "reset";'
Jmol.script(jmolAppletA, s);
sync();
}
function sync2() {
var syncing = document.getElementById("drive").checked
var s = (syncing ? 'sync * off;sync . on;sync jmolAppletB on;sync jmolAppletB "set syncMouse on;set syncScript off";': 'sync * off')
Jmol.script(jmolAppletA, s);
}
$(document).ready(function() {
document.getElementById("info").reset()
var Info = {
width: 200,
height: 200,
debug: false,
color: "0xFFFFFF",
addSelectionOptions: false,
use: "HTML5", // JAVA HTML5 WEBGL are all options
j2sPath: "./j2s", // this needs to point to where the j2s directory is.
jarPath: "./java",// this needs to point to where the java directory is.
jarFile: "JmolAppletSigned.jar",
isSigned: true,
//script: "set antialiasDisplay;load data/caffeine.mol",
serverURL: "https://chemapps.stolaf.edu/jmol/jsmol/php/jsmol.php",
disableJ2SLoadMonitor: true,
disableInitialConsole: true,
allowJavaScript: true
//defaultModel: "$dopamine",
//console: "none", // default will be jmolApplet0_infodiv, but you can designate another div here or "none"
}
Info.script = "load data/1crn.pdb;cartoon on;color cartoon structure;javascript \"sync(1)\" ";
$("#diva").html(Jmol.getAppletHtml("jmolAppletA", Info));
Info.script = "load data/1crn.pdb;calculate structure;cartoon on;color cartoon structure;javascript \"sync(2)\" ";
$("#divb").html(Jmol.getAppletHtml("jmolAppletB", Info));
Info.script = "load data/1crn.pdb;spacefill off;javascript \"sync(3)\" ";
$("#divc").html(Jmol.getAppletHtml("jmolAppletC", Info));
Info.script = "load data/1crn.pdb;spacefill on;javascript \"sync(4)\" ";
$("#divd").html(Jmol.getAppletHtml("jmolAppletD", Info));
});
</script>
</head>
<body>
<form id=info>
<input type=checkbox id=drive checked=true onClick=sync() accessKey="1">Synchronize <a href=javascript:syncAll()>reset</a>
<a href=javascript:sync2()>just two</a>
</form>
<table border = 1 cellpadding=40>
<tr>
<td id=tdA>
<div id=diva></div>
<br>File-derived structure
</td>
<td id=tdB>
<div id=divb></div>
<br>Jmol-derived structure
</td></tr>
<tr>
<td>
<div id=divc></div>
<br>wireframe (independently rotatable follower)
</td>
<td>
<div id=divd></div>
<br>spacefill (independently rotatable follower)
</td></tr>
</table>
</body>
</html>