-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtesta.htm
More file actions
124 lines (100 loc) · 4.53 KB
/
Copy pathtesta.htm
File metadata and controls
124 lines (100 loc) · 4.53 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<!DOCTYPE html>
<html>
<title>HTML5-only AstexViewer test</title>
<head>
<meta charset="utf-8">
<!-- breaking out the library for debugging -->
<script type="text/javascript" src="jquery/jquery.js"></script>
<script type="text/javascript" src="js/JSmoljQueryExt.js"></script>
<script type="text/javascript" src="js/JSmolCore.js"></script>
<script type="text/javascript" src="js/JSmolAstex.js"></script>
<script type="text/javascript" src="js/JSmolApi.js"></script>
<script type="text/javascript" src="js/JSmolControls.js"></script>
<script type="text/javascript" src="js/j2sjmol.js"></script>
<script type="text/javascript" src="js/JSmol.js"></script>
<script type="text/javascript" src="js/JSmolConsole.js"></script>
<script type="text/javascript" src="js/JSmolMenu.js"></script>
<script type="text/javascript">
Jmol.getProfile() // records repeat calls to overridden or overloaded Java methods
var astex0; // set up in HTML table, below
// use ?_USE=JAVA or _USE=SIGNED or _USE=HTML5
jmol_isReady = function(applet) {
document.title = (applet._id + " is ready")
Jmol._getElement(applet, "appletdiv").style.border="1px solid blue"
}
Info = {
width: 400,
height: 400,
debug: false,
color: "#F0F0F0",
zIndexBase: 20000,
z:{monitorZIndex:100},
addSelectionOptions: true,
serverURL: "https://chemapps.stolaf.edu/jmol/jsmol/php/jsmol.php",
use: "HTML5",
jarPath: "java",
j2sPath: "j2s",
jarFile: "OpenAstexViewer.jar",
isSigned: true,
disableJ2SLoadMonitor: false,
disableInitialConsole: false,
readyFunction: jmol_isReady,
allowjavascript: true,
// scriptFile: ...,
molecule1: 'http://www.ebi.ac.uk/pdbe/entry-files/pdb1crn.ent'
}
</script>
</head>
<body>
<table width=1000 cellpadding=10>
<tr><td colspan=2>
</td></tr>
<tr><td valign=top>
<script>
// note that the variable name MUST match the first parameter in quotes
astex0 = Jmol.getAstexApplet("astex0", Info)
// note that now scripts can be sent immediately after the _Applet object is created
var lastPrompt=0;
</script>
<a href="javascript:Jmol.script(astex0,'set antialiasDisplay false')">faster</a>
<a href="javascript:Jmol.script(astex0,'set antialiasDisplay true')">sharper</a>
<br>
info <a href="javascript:Jmol.showInfo(astex0, true)">show</a>
<a href="javascript:Jmol.clearConsole(astex0)">clear</a>
<a href="javascript:Jmol.showInfo(astex0, false)">hide</a>
</td><td valign=top>
<br><br>
<span style=color:red>
This page is only for debugging. It is a test of porting OpenAstexViewer to JavaScript and loads slowly because it is reading uncompressed individual files.
As of July 24, 2014, OpenAstexViewer/HTML5 is loading small molecules
from NCI and PubChem, reading PDB files from RCSB (San Diego), reading mmCIF files from EBI (Cambridge, UK), creating surfaces, and drawing bonds, atoms, and
cartoons.
<br><br>
Use the search box to load a new molecule via one of the four databases. Enter commands into the text area and press EXECUTE to execute an <a target=_blank href=http://openastexviewer.net/web/scripting.html>OpenAstexViewer script command</a>.
</span>
<br><br>
<table cellpadding=5><tr><td valign=top>
<a href="javascript:Jmol.script(astex0,'surface -solid true s red all;')">surface -solid true s red all;</a> (takes a few seconds)
<br>
<a href="javascript:Jmol.script(astex0,'surface -solid false s orange all;')">surface -solid false s orange all;</a>
<br>
<a href="javascript:Jmol.script(astex0,'display wide all;')">display wide all;</a>
<br>
<a href="javascript:Jmol.script(astex0,'display sticks all;display lines none;')">display sticks all;display lines none;</a>
<br>
<a href="javascript:Jmol.script(astex0,'clip 5;')">clip 5;</a>
<a href="javascript:Jmol.script(astex0,'clip 10;')">clip 10;</a>
<a href="javascript:Jmol.script(astex0,'clip 100;')">clip 100;</a>
<br><a href="javascript:Jmol.script(astex0,'secstruc all;schematic -name -colorbyss true "ts" all;')">secstruc all;schematic -name -colorbyss true 'ts' all;</a>
<br><a href="javascript:Jmol.script(astex0,'background white;')">background white;</a>
<a href="javascript:Jmol.script(astex0,'background black;')">background black;</a>
<br>
<br>Enter commands here, terminated with semicolons:
<br><textarea id=cmd style="width:500px;height:100px">molecule remove *; object remove *; molecule load test "http://www.ebi.ac.uk/pdbe/entry-files/pdb1d66.ent"</textarea><input type=button value="execute" onclick="javascript:Jmol.script(astex0,$('#cmd').val().replace(/\\n/g,';')+';')" />
</td></tr></table>
</td>
</tr></table>
<iframe width=800 height=800 href=data/astex.cmds.txt src=data/astex.cmds.txt>
</iframe>
</body>
</html>