tidy imports
[jalview.git] / examples / embeddedWJmol.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
2 <!--
3  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
4  * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
5  * 
6  * This file is part of Jalview.
7  * 
8  * Jalview is free software: you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License 
10  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
11  *  
12  * Jalview is distributed in the hope that it will be useful, but 
13  * WITHOUT ANY WARRANTY; without even the implied warranty 
14  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15  * PURPOSE.  See the GNU General Public License for more details.
16  * 
17  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
18 -->
19 <html xmlns="http://www.w3.org/1999/xhtml">
20 <head>
21 <TITLE>Embedded JalviewLite talking to externally managed Jmol</TITLE>
22 <script src="javascript/deployJava.js"></script>
23 <script src="jmol/Jmol.js"></script>
24 <script src="javascript/jquery-1.4.4.min.js"></script>
25 <script src="javascript/jquery.timer.js"></script>
26 <script src="javascript/jquery.blockUI.js"></script>
27 <script src="javascript/jshashtable-2.1.js" language="javascript"></script>
28 <!-- <script src="archive-min.js" language="javascript"></script>
29 -->
30 <script src="javascript/jalview.js" language="javascript"></script>
31 <script language="JavaScript">
32 // instead of this, we use a custom JmolApplet spec
33 // jmolInitialize('jmol');
34 jmolInitialize("","JmolApplet-12.2.4.jar");
35 function genHref()
36 {
37  var s1 = "ml:i@midd..", s2 = "atelcpoueau", s3 = "iomyob.neck", href="";
38  for(i=0; i<11; i++)
39  { href = href + s1.charAt(i) + s2.charAt(i) + s3.charAt(i); 
40  }
41  window.location=href;
42 }
43 </script>
44 <script>
45  var loglevel=1;
46  function dbg(lvl,string) {
47   if (_console && lvl<=loglevel) {_console.value += string + "\n";}
48  }
49  var _lastTime=new Date();
50  var _path;
51  var _datazip;
52  var _zip;
53  var alignA;
54  var alignB;
55  var featuresA;
56  var featuresB;
57  var pairs;
58  var atompairs;
59  var structdata;
60  var jmolview;
61  var jvstructassoc;
62  var modeltofiles = new Array();
63
64  function lJvA() {
65   jvfollower = document.getElementById("jvA");
66   setConsole(document.getElementById("stdout"));
67   
68   sep = jvfollower.getSeparator();
69   //jvapp.setSeparator(""+jvapp.getSeparator());
70   linkJvJmol(jvfollower, "jmolView", modeltofiles);
71  };
72
73  var _jvA=new Object();
74  _jvA.attributes = {
75   code : 'jalview.bin.JalviewLite',
76   archive : 'jalviewApplet.jar',
77   width : '500',
78   height : '350',
79   mayscript : 'True',
80   scriptable: 'True',
81   id : 'jvA'
82  };
83  _jvA.parameters = {
84    java_arguments : "-Xmx256m",
85   externalstructureviewer : "true",
86    oninit : "lJvA",
87   automaticScrolling : "true",
88 //  <!-- defaultColour : "Strand Propensity", -->
89   file : "uniref50_mz.fa",
90   
91   relaxedidmatch : "true",
92   debug : "true",
93   wrap : "false",
94   // separator : "^",
95   showAnnotation : "false",
96   embedded : "true",
97   showFullId : "false",
98   RGB : "F2F2FF",
99   linkLabel_1 : "SRS",
100   linkUrl_1 : "http://srs.ebi.ac.uk/srs7bin/cgi-bin/wgetz?-e+[uniprot-all:$SEQUENCE_ID$]+-vn+2"
101   ,
102   linkLabel_2 : "Uniprot"
103   ,
104   linkUrl_2 : "http://us.expasy.org/cgi-bin/niceprot.pl?$SEQUENCE_ID$",
105   APPLICATION_URL : "http://www.jalview.org/services/launchApp",
106   PDBfile : "1gaq.txt FER1_MAIZE"
107  };
108  jmolSetCallback("hoverCallback","_jmolhover");
109   jmolSetCallback("pickCallback","_jmolpick");
110   modeltofiles+="1gaq.txt";
111 </script>
112 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
113
114  <link href="css/reset.css" rel="stylesheet" type="text/css" />
115  <link href="css/style.css" rel="stylesheet" type="text/css" />
116  
117   <!--[if IE 6]>
118  <link rel="stylesheet" type="text/css" href="css/ie6.css" />
119 <![endif]-->
120
121 <!--[if IE 7]>
122  <link rel="stylesheet" type="text/css" href="css/ie7.css" />
123 <![endif]-->
124
125 <!-- dd menu -->
126 <script type="text/javascript">
127 <!--
128 var timeout         = 500;
129 var closetimer  = 0;
130 var ddmenuitem      = 0;
131
132 // open hidden layer
133 function mopen(id)
134
135  // cancel close timer
136  mcancelclosetime();
137
138  // close old layer
139  if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
140
141  // get new layer and show it
142  ddmenuitem = document.getElementById(id);
143  ddmenuitem.style.visibility = 'visible';
144
145 }
146 // close showed layer
147 function mclose()
148 {
149  if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
150 }
151
152 // go close timer
153 function mclosetime()
154 {
155  closetimer = window.setTimeout(mclose, timeout);
156 }
157
158 // cancel close timer
159 function mcancelclosetime()
160 {
161  if(closetimer)
162  {
163   window.clearTimeout(closetimer);
164   closetimer = null;
165  }
166 }
167
168 // close layer when click-out
169 document.onclick = mclose; 
170 // -->
171 </script>
172
173 </head>
174
175
176 <body>
177
178
179 <div id="header">
180 <div id="logo"><a href="/" title="Home"></a></div>
181 <ul id="buttons">
182 <li id="applet"><a href="applets.html" title="applet"></a></li>
183 <li id="desktop"><a href="/webstart/jalview.jnlp" title="desktop"></a></li>
184 </ul>
185 </div>
186
187
188 <div id ="nav">
189 <div id="navInner">
190
191 <ul id="sddm">
192  <li><a href="#">Home</a></li>
193  <li><a href="#" onmouseover="mopen('m1')" onmouseout="mclosetime()">About</a>
194   <div id="m1" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
195   <a href="#">Documentation</a>
196   <a href="#">Publications</a>
197   <a href="#">Credits</a>
198   <a href="#">Screenshots</a>
199   </div>
200  </li>
201  <li><a href="#">FAQ</a></li>
202  <li><a href="#" onmouseover="mopen('m3')" onmouseout="mclosetime()" class="community">Community</a>
203   <div id="m3" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
204   <a href="#">News Mailing List</a>
205   <a href="#">Discussion Mailing List</a>
206   <a href="#">Links</a>
207   <a href="#">Community News</a>
208   </div>
209  </li>
210  <li><a href="#" onmouseover="mopen('m4')" onmouseout="mclosetime()" class="development">Development</a>
211   <div id="m4" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
212   <a href="#">Release History</a>
213   <a href="#">Jalview Bug Tracker</a>
214   <a href="#">Jalview Git Web</a>
215   <a href="#">Development News</a>
216   </div>
217  </li>
218  <li><a href="#" onmouseover="mopen('m5')" onmouseout="mclosetime()" class="training">Training</a>
219   <div id="m5" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
220   <a href="#">Training Courses</a>
221   <a href="#">Training News</a>
222   </div>
223  </li>
224  <li><a href="#" class="download-right">Download</a></li>
225 </ul>
226 <div style="clear:both"></div>
227 </div>
228
229 </div>
230
231
232 <div id="pageWrap">
233
234 <div id="sideNav">
235 <ul>
236 <li><a href="applets.html">JalviewLite Examples</a></li>
237 <li><a href="appletParameters.html">Applet Parameters</a></li>
238 <li><a href="jalviewLiteJs.html">Javascript API</a></li>
239 <li><a href="formComplete.html">in-page API demo</a></li>
240 <li><a href="linkedapplets_ng.html">Two JalviewLites demo</a></li>
241 <li class="jvlite-nav-small"><a href="embeddedWJmol.html">Jalview and Jmol demo</a></li>
242 </ul>
243 </div>
244
245 <div id="content" class="content">
246  <center>
247     <script>
248         jmolApplet("500x500","zap; load FILE '1gaq.txt'; frame 0; select all; wireframe off; spacefill off; cartoons; restrict; center *; set selectionhalos true;select 0","jmolView");
249 </script>
250   <script>
251     deployJava.runApplet(_jvA.attributes, _jvA.parameters, '1.4');
252     </script>
253         </center>
254 </div>
255
256 <div id ="footer">
257 <div id="innerFooter">
258 <div id="copyright"><p>Copyright all rights reserved 2012</p></div>
259 <div id="cite">
260 <p>
261 If you use Jalview in your work, please cite this publication:
262 </p>
263 <br />
264 <p>
265 Waterhouse, A.M., Procter, J.B., Martin, D.M.A, Clamp, M. and Barton, G. J. (2009)
266 "Jalview Version 2 - a multiple sequence alignment editor and analysis workbench"
267 Bioinformatics 25 (9) 1189-1191 doi: 10.1093/bioinformatics/btp033
268 </p>
269 </div>
270 </div>
271 </div>
272 </body>
273 </html>