"undefined"==typeof jQuery&&alert("Note -- JSmoljQuery is required for JSmol, but it's not defined.");
Jmol=function(b){return{_jmolInfo:{userAgent:navigator.userAgent,version:version="Jmol-JSO 13.0"},_allowedJmolSize:[25,2048,300],_applets:{},_asynchronous:!0,_ajaxQueue:[],db:{_databasePrefixes:"$=:",_fileLoadScript:";if (_loadScript = '' && defaultLoadScript == '' && _filetype == 'Pdb') { select protein or nucleic;cartoons Only;color structure; select * };",_nciLoadScript:";n = ({molecule=1}.length < {molecule=2}.length ? 2 : 1); select molecule=n;display selected;center selected;",_pubChemLoadScript:"",
_DirectDatabaseCalls:{"cactus.nci.nih.gov":"%URL","www.rcsb.org":"%URL","pubchem.ncbi.nlm.nih.gov":"%URL",$:"http://cactus.nci.nih.gov/chemical/structure/%FILE/file?format=sdf&get3d=True",$$:"http://cactus.nci.nih.gov/chemical/structure/%FILE/file?format=sdf","=":"http://www.rcsb.org/pdb/files/%FILE.pdb","==":"http://www.rcsb.org/pdb/files/ligand/%FILE.cif",":":"http://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/%FILE/SDF?record_type=3d"},_restQueryUrl:"http://www.rcsb.org/pdb/rest/search",_restQueryXml:"<orgPdbQuery><queryType>org.pdb.query.simple.AdvancedKeywordQuery</queryType><description>Text Search</description><keywords>QUERY</keywords></orgPdbQuery>",
_restReportUrl:"http://www.pdb.org/pdb/rest/customReport?pdbids=IDLIST&customReportColumns=structureId,structureTitle"},_debugAlert:!1,_document:b,_execLog:"",_execStack:[],_isMsie:0<=navigator.userAgent.toLowerCase().indexOf("msie"),_isXHTML:!1,_lastAppletID:null,_mousePageX:null,_serverUrl:"http://chemapps.stolaf.edu/jmol/jsmol.jsmol.php",_touching:!1,_XhtmlElement:null,_XhtmlAppendChild:!1}}(document);
(function(b,g){b.$=function(c,b){return g("#"+c._id+(b?"_"+b:""))};b.$ajax=function(c){return g.ajax(c)};b.$attr=function(c,b,a){return g("#"+c).attr(b,a)};b.$bind=function(c,b,a){return a?g(c).bind(b,a):g(c).unbind(b)};b.$html=function(c,b){return g("#"+c).html(b)};b.$offset=function(c){return g("#"+c).offset()};b.$on=function(c,b){return g(window).on(c,b)};b.$resize=function(c){return g(window).resize(c)};b.$submit=function(c){return g("#"+c).submit()};b.$val=function(c,b){return g("#"+c).val(b)};
var a=jQuery,e=document;a.map(["click","mousemove","mouseup","touchmove","touchend"],function(c){var b=function(c){a(m).each(function(){var b=a(this);this!==c.target&&!b.has(c.target).length&&b.triggerHandler(k,[c.target,c])})},k=c+"outjsmol",m=a(),d=c+"."+k+"-special-event";a.event.special[k]={setup:function(){m=m.add(this);1===m.length&&a(e).bind(d,b)},teardown:function(){m=m.not(this);0===m.length&&a(e).unbind(d)},add:function(c){var b=c.handler;c.handler=function(c,l){c.target=l;b.apply(this,
arguments)}}}});var d=jQuery;d.ajaxSettings.xdr=function(){return window.XDomainRequest?new window.XDomainRequest:null};var f=d.ajaxSettings.xdr();d.extend(d.support,{iecors:!!f});d.support.iecors&&d.ajaxTransport(function(c){return{send:function(b,a){var e=c.xdr();e.onload=function(){a(200,"OK",{text:e.responseText},{"Content-Type":e.contentType})};c.xhrFields&&(e.onerror=c.xhrFields.error,e.ontimeout=c.xhrFields.timeout);e.open(c.type,c.url);e.send(c.hasContent&&c.data||null)},abort:function(){xdr.abort()}}});
b._clearVars=function(){delete jQuery;delete g;delete b;java&&(delete J,delete JZ,delete java,delete Clazz,delete JavaObject,delete bhtest,delete xxxbhparams,delete xxxShowParams,delete c$,delete d$,delete w$,delete $_A,delete $_AB,delete $_AC,delete $_AD,delete $_AF,delete $_AI,delete $_AL,delete $_AS,delete $_Ab,delete $_B,delete $_C,delete $_D,delete $_E,delete $_F,delete $_G,delete $_H,delete $_I,delete $_J,delete $_K,delete $_L,delete $_M,delete $_N,delete $_O,delete $_P,delete $_Q,delete $_R,
delete $_S,delete $_T,delete $_U,delete $_V,delete $_W,delete $_X,delete $_Y,delete $_Z,delete $_k,delete $_s,delete $t$)};var h=document,q=window,j={};j.ua=navigator.userAgent.toLowerCase();j.os=function(){for(var c=["linux","unix","mac","win"],b=c.length;b--;)if(-1!=j.ua.indexOf(c[b]))return c[b];return"unknown"};j.browser=function(){for(var c=j.ua,b="konqueror webkit omniweb opera webtv icab msie mozilla".split(" "),a=0;a<b.length;a++)if(0<=c.indexOf(b[a]))return b[a];return"unknown"};j.browserName=
j.browser();j.browserVersion=parseFloat(j.ua.substring(j.ua.indexOf(j.browserName)+j.browserName.length+1));j.supportsXhr2=function(){return g.support.cors||g.support.iecors};j.allowDestroy="msie"!=j.browserName;j.allowHTML5="msie"!=j.browserName||0>navigator.appVersion.indexOf("MSIE 8");j.getDefaultLanguage=function(){return navigator.language||navigator.userLanguage||"en-US"};j._webGLtest=0;j.supportsWebGL=function(){if(!b.featureDetection._webGLtest){var c;b.featureDetection._webGLtest=q.WebGLRenderingContext&&
((c=h.createElement("canvas")).getContext("webgl")||c.getContext("experimental-webgl"))?1:-1}return 0<b.featureDetection._webGLtest};j.supportsLocalization=function(){for(var c=h.getElementsByTagName("meta"),b=c.length;0<=--b;)if(0<=c[b].outerHTML.toLowerCase().indexOf("utf-8"))return!0;return!1};j.supportsJava=function(){if(!b.featureDetection._javaEnabled){if(b._isMsie)return!0;b.featureDetection._javaEnabled=navigator.javaEnabled()?1:-1}return 0<b.featureDetection._javaEnabled};j.compliantBrowser=
function(){var c=!!h.getElementById,b=j.os();if("opera"==j.browserName&&7.54>=j.browserVersion&&"mac"==b||"webkit"==j.browserName&&125.12>j.browserVersion||"msie"==j.browserName&&"mac"==b||"konqueror"==j.browserName&&3.3>=j.browserVersion)c=!1;return c};j.isFullyCompliant=function(){return j.compliantBrowser()&&j.supportsJava()};j.useIEObject="win"==j.os()&&"msie"==j.browserName&&5.5<=j.browserVersion;j.useHtml4Object="mozilla"==j.browserName&&5<=j.browserVersion||"opera"==j.browserName&&8<=j.browserVersion||
"webkit"==j.browserName&&412.2<=j.browserVersion;b.featureDetection=j;b._ajax=function(c){if(!c.async)return b.$ajax(c).responseText;b._ajaxQueue.push(c);1==b._ajaxQueue.length&&b._ajaxDone()};b._ajaxDone=function(){var c=b._ajaxQueue.shift();c&&b.$ajax(c)};b._grabberOptions=[["$","NCI(small molecules)"],[":","PubChem(small molecules)"],["=","RCSB(macromolecules)"]];b._getGrabberOptions=function(c,a){if(0==b._grabberOptions.length)return"";var k='<input type="text" id="ID_query" onkeypress="13==event.which&&Jmol._applets[\'ID\']._search()" size="32" value="" />',
e='<button id="ID_submit" onclick="Jmol._applets[\'ID\']._search()">Search</button></nobr>';1==b._grabberOptions.length?(k="<nobr>"+k+'<span style="display:none">',e="</span>"+e):k+="<br /><nobr>";for(var k=k+'<select id="ID_select">',d=0;d<b._grabberOptions.length;d++)var f=b._grabberOptions[d],k=k+('<option value="'+f[0]+'" '+(0==d?"selected":"")+">"+f[1]+"</option>");k=(k+"</select>"+e).replace(/ID/g,c._id)+(a?a:"");return"<br />"+k};b._saveFile=function(c,a,k,e){var d=b._serverUrl;d&&(b.$attr("__jsmolform__",
"action",d+"?"+(new Date).getMilliseconds()),b.$val("__jsmoldata__",k),b.$val("__jsmolfilename__",c),b.$val("__jsmolmimetype__",a),b.$val("__jsmolencoding__",e),b.$submit("__jsmolform__"),b.$val("__jsmoldata__",""))};b._getScriptForDatabase=function(c){return"$"==c?b.db._nciLoadScript:":"==c?b.db._pubChemLoadScript:b.db._fileLoadScript};b._setInfo=function(c,b,a){var e=[],d="";if(0==a.indexOf("ERROR"))d=a;else switch(b){case "=":b=a.split("<dimStructure.structureId>");e=["<table>"];for(a=1;a<b.length;a++)e.push('<tr><td valign=top><a href="javascript:Jmol.search('+
c._id+",'="+b[a].substring(0,4)+"')\">"+b[a].substring(0,4)+"</a></td>"),e.push("<td>"+b[a].split("Title>")[1].split("</")[0]+"</td></tr>");e.push("</table>");d=b.length-1+" matches";break;case "$":case ":":break;default:return}c._infoHeader=d;c._info=e.join("");c._showInfo(!0)};b._loadSuccess=function(c,a){a&&(b._ajaxDone(),a(c))};b._loadError=function(c){b._ajaxDone();b.say("Error connecting to server.");null!=c&&c()};b._isDatabaseCall=function(c){return 0<=b.db._databasePrefixes.indexOf(c.substring(0,
1))};b._getDirectDatabaseCall=function(c,a){if(a&&!b.featureDetection.supportsXhr2())return c;var e=2,d,f=b.db._DirectDatabaseCalls[c.substring(0,e)];f||(f=b.db._DirectDatabaseCalls[d=c.substring(0,--e)]);f&&":"==d&&(d=c.toLowerCase(),isNaN(parseInt(c.substring(1)))?0==d.indexOf(":smiles:")?(f+="?POST?smiles="+c.substring(8),c=":smiles"):0==d.indexOf(":cid:")?c=":cid/"+c.substring(5):(0==d.indexOf(":name:")?c=c.substring(5):0==d.indexOf(":cas:")&&(c=c.substring(4)),c=":name/"+encodeURIComponent(c.substring(1))):
c=":cid/"+c.substring(1));return c=f?f.replace(/\%FILE/,c.substring(e)):c};b._getRawDataFromServer=function(c,a,e,d,f,h){c="?call=getRawDataFromDatabase&database="+c+"&query="+encodeURIComponent(a)+(f?"&encoding=base64":"")+(h?"":"&script="+encodeURIComponent(b._getScriptForDatabase(c)));return b._contactServer(c,e,d)};b._getInfoFromDatabase=function(c,a,e){if("===="==a){var d=b.db._restQueryXml.replace(/QUERY/,e),d={dataType:"text",type:"POST",contentType:"application/x-www-form-urlencoded",url:b.db._restQueryUrl,
data:encodeURIComponent(d)+"&req=browser",success:function(d){b._ajaxDone();b._extractInfoFromRCSB(c,a,e,d)},error:function(){b._loadError(null)},async:b._asynchronous};return b._ajax(d)}e="?call=getInfoFromDatabase&database="+a+"&query="+encodeURIComponent(e);return b._contactServer(e,function(e){b._setInfo(c,a,e)})};b._extractInfoFromRCSB=function(c,a,e,d){var f=d.length/5;if(0!=f&&4==e.length&&1!=f){e=e.toUpperCase();var h=d.indexOf(e);0<h&&0<="123456789".indexOf(e.substring(0,1))&&(d=e+","+d.substring(0,
h)+d.substring(h+5));50<f&&(d=d.substring(0,250));d=d.replace(/\n/g,",");d=b._restReportUrl.replace(/IDLIST/,d);b._loadFileData(c,d,function(e){b._setInfo(c,a,e)})}};b._loadFileData=function(c,a,e,d){if(b._isDatabaseCall(a)&&(b._setQueryTerm(c,a),a=b._getDirectDatabaseCall(a,!0),b._isDatabaseCall(a))){a=b._getDirectDatabaseCall(a,!1);b._getRawDataFromServer("_",a,e,d);return}c={dataType:"text",url:a,async:b._asynchronous,success:function(c){b._loadSuccess(c,e)},error:function(){b._loadError(d)}};
var f=a.indexOf("?POST?");0<f&&(c.url=a.substring(0,f),c.data=a.substring(f+6),c.type="POST",c.contentType="application/x-www-form-urlencoded");b._ajax(c)};b._contactServer=function(c,a,e){return b._ajax({dataType:"text",type:"GET",url:b._serverUrl+c,success:function(c){b._loadSuccess(c,a)},error:function(){b._loadError(e)},async:a?b._asynchronous:!1})};b._setQueryTerm=function(c,a){if(a&&c._hasOptions&&"http://"!=a.substring(0,7)){if(b._isDatabaseCall(a)){var e=a.substring(0,1);a=a.substring(1);
"="==e&&(4==a.length&&"="==a.substring(0,1))&&(a=a.substring(1));var d=b._getElement(c,"select");if(d.options)for(var f=0;f<d.options.length;f++)d[f].value==e&&(d[f].selected=!0)}b._getElement(c,"query").value=a}};b._search=function(c,a,e){1<arguments.length||(a=null);b._setQueryTerm(c,a);a||(a=b._getElement(c,"query").value);if(0==a.indexOf("!"))c._script(a);else{a&&(a=a.replace(/\"/g,""));c._showInfo(!1);var d;b._isDatabaseCall(a)?(d=a.substring(0,1),a=a.substring(1)):d=c._hasOptions?b._getElement(c,
"select").value:"$";"="==d&&3==a.length&&(a="="+a);var f=d+a;a&&!(0>f.indexOf("?")&&f==c._thisJmolModel)&&(c._thisJmolModel=f,"$"==d||":"==d?c._jmolFileType="MOL":"="==d&&(c._jmolFileType="PDB"),c._searchDatabase(a,d,e))}};b._searchDatabase=function(c,a,e,d){c._showInfo(!1);return 0<=a.indexOf("?")?(b._getInfoFromDatabase(c,e,a.split("?")[0]),!0):b.db._DirectDatabaseCalls[e]?(c._loadFile(e+a,d),!0):!1};b._syncBinaryOK="?";b._canSyncBinary=function(){if(self.VBArray)return b._syncBinaryOK=!1;if("?"!=
b._syncBinaryOK)return b._syncBinaryOK;b._syncBinaryOK=!0;try{var c=new window.XMLHttpRequest;c.open("text","http://google.com",!1);c.hasOwnProperty("responseType")?c.responseType="arraybuffer":c.overrideMimeType&&c.overrideMimeType("text/plain; charset=x-user-defined")}catch(a){return System.out.println("JmolCore.js: synchronous binary file transfer is not available"),b._syncBinaryOK=!1}return!0};b._binaryTypes=".gz .jpg .png .zip .jmol .bin .smol .spartan .mrc .pse".split(" ");b._isBinaryUrl=function(c){for(var a=
b._binaryTypes.length;0<=--a;)if(0<=c.indexOf(b._binaryTypes[a]))return!0;return!1};b._getFileData=function(c){var a=b._isBinaryUrl(c)?"binary":"text",e="binary"==a&&!b._canSyncBinary(),d=0<=c.indexOf("?POST?");0==c.indexOf("file:/")&&0!=c.indexOf("file:///")&&(c="file://"+c.substring(5));var f=0>c.indexOf("://")||0==c.indexOf(document.location.protocol)&&0<=c.indexOf(document.location.host),h=b._isDirectCall(c);if(!f&&g.support.iecors||e||!f&&!h)return b._getRawDataFromServer("_",c,null,null,e,!0);
a={dataType:a,async:!1};d?(a.type="POST",a.url=c.split("?POST?")[0],a.data=c.split("?POST?")[1]):a.url=c;c=b.$ajax(a);return self.Clazz&&Clazz.instanceOf(c.response,self.ArrayBuffer)?c.response:c.responseText};b._isDirectCall=function(c){for(var a in b.db._DirectDatabaseCalls)if(0<=a.indexOf(".")&&0<=c.indexOf(a))return!0;return!1};b._cleanFileData=function(c){return 0<=c.indexOf("\r")&&0<=c.indexOf("\n")?c.replace(/\r\n/g,"\n"):0<=c.indexOf("\r")?c.replace(/\r/g,"\n"):c};b._getFileType=function(c){var a=
c.substring(0,1);if("$"==a||":"==a)return"MOL";if("="==a)return"="==c.substring(1,2)?"LCIF":"PDB";c=c.split(".").pop().toUpperCase();return c.substring(0,Math.min(c.length,3))};b._scriptLoad=function(c,a,b,e){var d=c._isJava||!c._noscript||1<b.length;d&&c._script("zap;set echo middle center;echo Retrieving data...");if(!e)return!1;d?c._script('load "'+a+'"'+b):c._applet.viewer.openFile(a);c._checkDeferred("");return!0};b._setConsoleDiv=function(c){self.Clazz&&Clazz.setConsoleDiv(c)};b._setJmolParams=
function(c,a,e){for(var d in a)if(0<="'progressbar','progresscolor','boxbgcolor','boxfgcolor','allowjavascript','boxmessage',\t\t\t\t\t\t\t\t\t'messagecallback','pickcallback','animframecallback','appletreadycallback','atommovedcallback',\t\t\t\t\t\t\t\t\t'echocallback','evalcallback','hovercallback','language','loadstructcallback','measurecallback',\t\t\t\t\t\t\t\t\t'minimizationcallback','resizecallback','scriptcallback','statusform','statustext','statustextarea',\t\t\t\t\t\t\t\t\t'synccallback','usecommandthread'".indexOf("'"+
d.toLowerCase()+"'")&&("language"!=d||b.featureDetection.supportsLocalization()))e?c.put(d,!0===a[d]?Boolean.TRUE:!1===a[d]?Boolean.FALSE:a[d]):c[d]=a[d]};b._registerApplet=function(c,a){return window[c]=b._applets[c]=b._applets[a]=a};b._readyCallback=function(c,a,e,d){var f=c.split("_object")[0];b._applets[f]._readyCallback(c,a,e,d)};b._getWrapper=function(c,a){var e=c._height,d=c._width;if("string"!==typeof e||0>e.indexOf("%"))e+="px";if("string"!==typeof d||0>d.indexOf("%"))d+="px";var f="";c._coverImage&&
(f=' onclick="Jmol.coverApplet(ID, false)" title="'+c._coverTitle+'"',f='<div id="ID_coverdiv" style="backgoround-color:red;z-index:10000;width:100%;height:100%;display:inline;position:absolute;top:0px;left:0px"><image id="ID_coverimage" src="'+c._coverImage+'" style="width:100%;height:100%"'+f+"/>"+('<image id="ID_coverclickgo" src="'+c._j2sPath+'/img/play_make_live.jpg" style="width:25px;height:25px;position:absolute;bottom:10px;left:10px;z-index:10001;opacity:0.5;"'+f+" />")+"</div>");var h=!a&&
!b._formdiv?'<div id="__jsmolformdiv__" style="display:none">\t\t\t\t<form id="__jsmolform__" method="post" target="_blank" action="">\t\t\t\t<input name="call" value="saveFile"/>\t\t\t\t<input id="__jsmolmimetype__" name="mimetype" value=""/>\t\t\t\t<input id="__jsmolencoding__" name="encoding" value=""/>\t\t\t\t<input id="__jsmolfilename__" name="filename" value=""/>\t\t\t\t<input id="__jsmoldata__" name="data" value=""/>\t\t\t\t</form>\t\t\t\t</div>':"";h&&(b._formdiv="__jsmolform__");return(a?
'<div id="ID_appletinfotablediv" style="width:Wpx;height:Hpx;position:relative">IMG<div id="ID_appletdiv" style="z-index:9999;width:100%;height:100%;position:absolute:top:0px;left:0px;">':'</div><div id="ID_infotablediv" style="width:100%;height:100%;position:absolute;top:0px;left:0px">\t\t\t<div id="ID_infoheaderdiv" style="height:20px;width:100%;background:yellow;display:none"><span id="ID_infoheaderspan"></span><span id="ID_infocheckboxspan" style="position:absolute;text-align:right;right:1px;"><a href="javascript:Jmol.showInfo(ID,false)">[x]</a></span></div>\t\t\t<div id="ID_infodiv" style="position:absolute;top:20px;bottom:0;width:100%;height:95%;overflow:auto"></div></div></div>'+
h).replace(/IMG/,f).replace(/Hpx/g,e).replace(/Wpx/g,d).replace(/ID/g,c._id)};b._documentWrite=function(c){if(b._document){if(b._isXHTML&&!b._XhtmlElement){var a=document.getElementsByTagName("script");b._XhtmlElement=a.item(a.length-1);b._XhtmlAppendChild=!1}b._XhtmlElement?b._domWrite(c):b._document.write(c);return null}return c};b._domWrite=function(c){for(var a=[0];a[0]<c.length;){var e=b._getDomElement(c,a);if(!e)break;b._XhtmlAppendChild?b._XhtmlElement.appendChild(e):b._XhtmlElement.parentNode.insertBefore(e,
_jmol.XhtmlElement)}};b._getDomElement=function(c,a){var b=document.createElement("span");b.innerHTML=c;a[0]=c.length;return b};b._setObject=function(c,a,b){c._id=a;c.__Info={};for(var e in b)c.__Info[e]=b[e];c._width=b.width;c._height=b.height;c._noscript=!c._isJava&&b.noscript;c._console=b.console;c._console||(c._console=c._id+"_infodiv");"none"==c._console&&(c._console=null);c._color=b.color?b.color.replace(/0x/,"#"):"#FFFFFF";c._disableInitialConsole=b.disableInitialConsole;c._noMonitor=b.disableJ2SLoadMonitor;
c._j2sPath=b.j2sPath;c._deferApplet=b.deferApplet;c._deferUncover=b.deferUncover;c._coverImage=!c._isJava&&b.coverImage;c._isCovered=!!c._coverImage;c._coverScript=b.coverScript;c._coverTitle=b.coverTitle;c._coverTitle||(c._coverTitle=c._deferApplet?"activate 3D model":"3D model is loading...");c._containerWidth=c._width+(c._width==parseFloat(c._width)?"px":"");c._containerHeight=c._height+(c._height==parseFloat(c._height)?"px":"");c._info="";c._infoHeader=c._jmolType+' "'+c._id+'"';c._hasOptions=
b.addSelectionOptions;c._defaultModel=b.defaultModel;c._readyScript=b.script?b.script:"";c._readyFunction=b.readyFunction;c._coverImage&&!c._deferApplet&&(c._readyScript+=";javascript "+a+"._displayCoverImage(false)");c._src=b.src};b._addDefaultInfo=function(c,a){for(var b in a)"undefined"==typeof c[b]&&(c[b]=a[b])};b._syncedApplets=[];b._syncedCommands=[];b._syncedReady=[];b._syncReady=!1;b._isJmolJSVSync=!1;b._setReady=function(a){b._syncedReady[a]=1;for(var e=0,d=0;d<b._syncedApplets.length;d++){if(b._syncedApplets[d]==
a._id)b._syncedApplets[d]=a,b._syncedReady[d]=1;else if(!b._syncedReady[d])continue;e++}e==b._syncedApplets.length&&b._setSyncReady()};b._setDestroy=function(a){b.featureDetection.allowDestroy&&b.$on("beforeunload",function(){b._destroy(a)})};b._destroy=function(a){try{a._applet&&a._applet.destroy();a._applet=null;b._unsetMouse(a._canvas);a._canvas=null;for(var e=0,d=0;d<b._syncedApplets.length;d++)b._syncedApplets[d]==a&&(b._syncedApplets[d]=null),b._syncedApplets[d]&&e++;0<e||b._clearVars()}catch(f){}};
b._setSyncReady=function(){b._syncReady=!0;for(var a="",e=0;e<b._syncedApplets.length;e++)b._syncedCommands[e]&&(a+="Jmol.script(Jmol._syncedApplets["+e+"], Jmol._syncedCommands["+e+"]);");setTimeout(a,50)};b._mySyncCallback=function(a,e){if(!b._syncReady||!b._isJmolJSVSync)return 1;for(var d=0;d<b._syncedApplets.length;d++)0<=e.indexOf(b._syncedApplets[d]._syncKeyword)&&b._syncedApplets[d]._syncScript(e);return 0};b._getElement=function(a,b){return document.getElementById(a._id+"_"+b)||{}};b._evalJSON=
function(a,b){a+="";if(!a)return[];if("{"!=a.charAt(0))return 0<=a.indexOf(" | ")&&(a=a.replace(/\ \|\ /g,"\n")),a;var e=(new Function("return "+a))();return!e?null:b&&void 0!=e[b]?e[b]:e};b._sortMessages=function(a){function b(a,c){return a[0]<c[0]?1:a[0]>c[0]?-1:0}if(!a||"object"!=typeof a)return[];for(var e=[],d=a.length-1;0<=d;d--)for(var f=0,h=a[d].length;f<h;f++)e[e.length]=a[d][f];if(0!=e.length)return e=e.sort(b)};b._jsGetMouseModifiers=function(a){var b=0;switch(a.button){case 0:b=16;break;
case 1:b=8;break;case 2:b=4}a.shiftKey&&(b+=1);a.altKey&&(b+=8);a.ctrlKey&&(b+=2);return b};b._jsGetXY=function(a,e){if(!a.applet._ready)return!1;e.preventDefault();var d=b.$offset(a.id),f,h=e.originalEvent;b._mousePageX=e.pageX;b._mousePageY=e.pageY;h.targetTouches&&h.targetTouches[0]?(f=h.targetTouches[0].pageX-d.left,d=h.targetTouches[0].pageY-d.top):h.changedTouches?(f=h.changedTouches[0].pageX-d.left,d=h.changedTouches[0].pageY-d.top):(f=e.pageX-d.left,d=e.pageY-d.top);return void 0==f?null:
[Math.round(f),Math.round(d),b._jsGetMouseModifiers(e)]};b._gestureUpdate=function(a,e){e.stopPropagation();e.preventDefault();var d=e.originalEvent;switch(e.type){case "touchstart":b._touching=!0;break;case "touchend":b._touching=!1}if(!d.touches||2!=d.touches.length)return!1;switch(e.type){case "touchstart":a._touches=[[],[]];break;case "touchmove":var f=b.$offset(a.id);a._touches[0].push([d.touches[0].pageX-f.left,d.touches[0].pageY-f.top]);a._touches[1].push([d.touches[1].pageX-f.left,d.touches[1].pageY-
f.top]);2<=a._touches[0].length&&a.applet._processGesture(a._touches)}return!0};b._jsSetMouse=function(a){b.$bind(a,"mousedown touchstart",function(e){e.stopPropagation();e.preventDefault();a.isDragging=!0;if("touchstart"==e.type&&b._gestureUpdate(a,e))return!1;b._setConsoleDiv(a.applet._console);var d=b._jsGetXY(a,e);if(!d)return!1;2!=e.button&&a.applet._popups&&b.Menu.hidePopups(a.applet.popups);a.applet._processEvent(501,d);return!1});b.$bind(a,"mouseup touchend",function(e){e.stopPropagation();
e.preventDefault();a.isDragging=!1;if("touchend"==e.type&&b._gestureUpdate(a,e))return!1;e=b._jsGetXY(a,e);if(!e)return!1;a.applet._processEvent(502,e);return!1});b.$bind(a,"mousemove touchmove",function(e){e.stopPropagation();e.preventDefault();if(("touchmove"==e.type||b._touching)&&b._gestureUpdate(a,e))return!1;e=b._jsGetXY(a,e);if(!e)return!1;a.isDragging||(e[2]=0);a.applet._processEvent(a.isDragging?506:503,e);return!1});b.$bind(a,"DOMMouseScroll mousewheel",function(e){e.stopPropagation();e.preventDefault();
a.isDragging=!1;var d=e.originalEvent,d=d.detail?d.detail:d.wheelDelta;e=b._jsGetMouseModifiers(e);a.applet._processEvent(-1,[0>d?-1:1,0,e]);return!1});b.$bind(a,"contextmenu",function(){return!1});b.$bind(a,"mouseout",function(){a.applet._applet&&a.applet._applet.viewer.startHoverWatcher(!1)});b.$bind(a,"mouseenter",function(e){a.applet._applet&&a.applet._applet.viewer.startHoverWatcher(!0);if(0===e.buttons||0===e.which){a.isDragging=!1;e=b._jsGetXY(a,e);if(!e)return!1;a.applet._processEvent(502,
e)}});a.applet._is2D&&b.$resize(function(){a.applet&&a.applet._resize()});b.$bind("body","mouseup touchend",function(){a.applet&&(a.isDragging=!1)})};b._jsUnsetMouse=function(a){a.applet=null;b.$bind(a,"mousedown touchstart mousemove touchmove mouseup touchend DOMMouseScroll mousewheel contextmenu mouseout mouseenter",null)};b._setDraggable=function(a){a=a.prototype;a.setContainer=function(a){this.container=a;this.ignoreMouse=this.isDragging=!1;var b=this;a.bind("mousedown touchstart",function(a){if(b.ignoreMouse)return b.ignoreMouse=
!1,!0;b.isDragging=!0;b.pageX=a.pageX;b.pageY=a.pageY;return!1});a.bind("mousemove touchmove",function(a){if(b.isDragging)return b.mouseMove(a),!1});a.bind("mouseup touchend",function(a){b.mouseUp(a)})};a.mouseUp=function(a){if(this.isDragging)return this.pageX0+=a.pageX-this.pageX,this.pageY0+=a.pageY-this.pageY,this.isDragging=!1};a.setPosition=function(){if(null===b._mousePageX){var a=b.$offset(this.applet._id+"_"+(this.applet._is2D?"canvas2d":"canvas"));b._mousePageX=a.left;b._mousePageY=a.top}this.pageX0=
b._mousePageX;this.pageY0=b._mousePageY;this.container.css({top:b._mousePageY+"px",left:b._mousePageX+"px"})};a.mouseMove=function(a){this.isDragging&&this.container.css({top:this.pageY0+(a.pageY-this.pageY)+"px",left:this.pageX0+(a.pageX-this.pageX)+"px"})};a.dragBind=function(a){this.container.unbind("mousemoveoutjsmol");this.container.unbind("touchmoveoutjsmol");this.container.unbind("mouseupoutjsmol");this.container.unbind("touchendoutjsmol");if(a){var b=this;this.container.bind("mousemoveoutjsmol touchmoveoutjsmol",
function(a,e,c){b.mouseMove(c)});this.container.bind("mouseupoutjsmol touchendoutjsmol",function(a,e,c){b.mouseUp(c)})}}}})(Jmol,jQuery);Jmol._grabberOptions=[["$","NCI(small molecules)"],[":","PubChem(small molecules)"]];Jmol.say=function(b){alert(b)};Jmol._TMApplet=function(b,g,a){this._syncId=(""+Math.random()).substring(3);this._id=b;this._is2D=!0;this._isJava=!1;this._ready=!0;this._mouseDown=!1;this._jmolType="Jmol._Canvas2D (TwirlyMol)";if(a)return this;this._createCanvas(b,g);return this};
Jmol._TMApplet._getApplet=function(b,g,a){if(!Jmol.featureDetection.allowHTML5)return null;a||(a=!1);g||(g={});Jmol._addDefaultInfo(g,{color:"#FFFFFF",width:300,height:300,addSelectionOptions:!1,serverURL:"http://chemapps.stolaf.edu/jmol/jsmol/jsmol.php",defaultModel:"",readyFunction:null,use:"HTML5",bondWidth:5,shadeAtoms:!1,zoomScaling:1.5,pinchScaling:2,mouseDragFactor:0.5,touchDragFactor:0.15,multipleBondSpacing:4,spinRateX:0,spinRateY:0.5,spinFPS:20,spin:!1,noscript:!0,debug:!1});g=new Jmol._TMApplet(b,
g,a);return a?g:Jmol._registerApplet(b,g)};Jmol.getTMApplet=Jmol._TMApplet._getApplet;
(function(b){b._CPK="#FF1493 #FFFFFF #D9FFFF #CC80FF #C2FF00 #FFB5B5 #909090 #3050F8 #FF0D0D #90E050 #B3E3F5 #AB5CF2 #8AFF00 #BFA6A6 #F0C8A0 #FF8000 #FFFF30 #1FF01F #80D1E3 #8F40D4 #3DFF00 #E6E6E6 #BFC2C7 #A6A6AB #8A99C7 #9C7AC7 #E06633 #F090A0 #50D050 #C88033 #7D80B0 #C28F8F #668F8F #BD80E3 #FFA100 #A62929 #5CB8D1 #702EB0 #00FF00 #94FFFF #94E0E0 #73C2C9 #54B5B5 #3B9E9E #248F8F #0A7D8C #006985 #C0C0C0 #FFD98F #A67573 #668080 #9E63B5 #D47A00 #940094 #429EB0 #57178F #00C900".split(" ");b._elem="X H He Li Be B C N O F Ne Na Mg Al Si P S Cl Ar K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe Cs Ba La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn Fr Ra Ac Th Pa U Np Pu Am Cm Bk Cf Es".split(" ");
b._elemNo={};var g=b.prototype;g.spin=function(a){this.__Info.spin=a;this._spin(a)};g._spin=function(a){this._spinThread&&clearTimeout(this._spinThread);if(0==this.spinFPS||0==this.spinRateX&&0==this.spinRateY)a=!1;if(a){var b=this;a=1E3/this.spinFPS;this._mouseDown||(this._rotate(this.spinRateY,this.spinRateX),this._draw());this._spinThread=setTimeout(function(){b._spin(!0)},a)}};g._initParams=function(){this.zoom=this.__Info.defaultZoom||100;this.doSpin=this.__Info.spin||!1;this.center2D=[this._canvas.width/
2,this._canvas.height/2,0];this._getCenterAndRadius();this.rotation=new b.M3;this.shadeAtoms=!1;this._setParams()};g._setParams=function(){this.bondWidth=this.__Info.bondWidth||5;this.zoomScaling=this.__Info.zoomScaling||1.5;this.pinchScaling=this.__Info.pinchScaling||1;this.mouseDragFactor=this.__Info.mouseDragFactor||0.5;this.touchDragFactor=this.__Info.touchDragFactor||0.15;this.multipleBondSpacing=this.__Info.multipleBondSpacing||4;this.spinRateX=this.__Info.spinRateX||0;this.spinRateY=this.__Info.spinRateY||
0;this.spinFPS=this.__Info.spinFPS||0;var a=this.shadeAtoms;(this.shadeAtoms=this.__Info.shadeAtoms||!1)&&!a&&this._setAtomShades()};g._setAtomShades=function(){if(this.atoms)for(var a=this.atoms.length;0<=--a;)this.atoms[a].color50=this._getColor(this.atoms[a].color,0.5)};g._createCanvas=function(a,b){Jmol._setObject(this,a,b);this._color=this._color.replace(/0x/,"#");var d=Jmol._getWrapper(this,!0);Jmol._document?(Jmol._documentWrite(d),this._createCanvas2d(!1),d=""):d+='<script type="text/javascript">'+
a+"._createCanvas2d(false)\x3c/script>";d+=Jmol._getWrapper(this,!1);b.addSelectionOptions&&(d+=Jmol._getGrabberOptions(this,""));Jmol._debugAlert&&!Jmol._document&&alert(d);this._code=Jmol._documentWrite(d)};g._readyCallback=function(a,b,d,f){d&&(Jmol._setDestroy(this),this._ready=!0,a=this._readyScript,this._applet=f,this._defaultModel?this._search(this._defaultModel,a?";"+a:""):this._src&&this._loadFile(this._src),this._showInfo(!0),this._showInfo(!1),this._readyFunction&&this._readyFunction(this),
Jmol._setReady(this))};g._createCanvas2d=function(a){var b=document.createElement("canvas"),d=Jmol.$(this,"appletdiv");a&&(d[0].removeChild(this._canvas),Jmol._jsUnsetMouse(this._canvas));a=Math.round(d.width());var f=Math.round(d.height());b.applet=this;this._canvas=b;b.style.width="100%";b.style.height="100%";b.width=a;b.height=f;b.id=this._id+"_canvas2d";d.append(b);setTimeout(this._id+"._start()",10)};g._start=function(){Jmol._jsSetMouse(this._canvas);this._defaultModel?Jmol._search(this,this._defaultModel):
this._src&&this._loadFile(this._src);this._showInfo(!0);this._showInfo(!1)};g._search=function(a,b){Jmol._search(this,a,b)};g._searchDatabase=function(a,b,d){this._showInfo(!1);if(0<=a.indexOf("?"))Jmol._getInfoFromDatabase(this,b,a.split("?")[0]);else{var f=b+a;if(Jmol.db._DirectDatabaseCalls[b])this._loadFile(f,d);else{var h=this;Jmol._getRawDataFromServer(b,a,function(a){h._loadModel(a,"")})}}};g._loadModel=function(a){this._spin(!1);"''"==a&&(a=this._mol);a?(this._parse(a),this._initParams(),
this._draw(),this._showInfo(!1),this.doSpin&&this._spin(!0)):alert("No model data.")};g._showInfo=function(a){Jmol._getElement(this,"infoheaderspan").innerHTML=this._infoHeader;this._info&&(Jmol._getElement(this,"infodiv").innerHTML=this._info);!this._isInfoVisible!=!a&&(this._isInfoVisible=a,this._infoObject?this._infoObject._showInfo(a):(Jmol._getElement(this,"infotablediv").style.display=a?"block":"none",Jmol._getElement(this,"infoheaderdiv").style.display=a?"block":"none"),this._show(!a))};g._show=
function(a){Jmol._getElement(this,"appletdiv").style.display=a?"block":"none";a&&this._draw()};g._resize=function(){var a="__resizeTimeout_"+this._id;Jmol[a]&&clearTimeout(Jmol[a]);var b=this;Jmol[a]=setTimeout(function(){b._draw();Jmol[a]=null},100)};g._canScript=function(){return!1};g._loadFile=function(a){this._showInfo(!1);this._thisJmolModel=a;var b=this;Jmol._loadFileData(this,a,function(a){b._loadModel(a)})};g._processEvent=function(a,b){switch(a){case 502:case 503:this._mouseDown=!1;default:return;
case 501:this._mouseX=b[0];this._mouseY=b[1];this._mouseDown=!0;return;case 506:var d=b[0]-this._mouseX,f=b[1]-this._mouseY,d=0>d?-1:0<d?1:0,f=0>f?-1:0<f?1:0;switch(b[2]){case 17:this._zoomBy(f);break;case 24:this.center2D[0]+=d;this.center2D[1]+=f;break;default:this._rotate(d,f)}this._mouseX=b[0];this._mouseY=b[1];break;case -1:this._zoomBy(b[1])}this._draw()};g._processGesture=function(a){if(!(2>a[0].length)){var e=a[0],d=a[1],f=e[0],h=e[d.length-1];a=f[0];var g=h[0],f=f[1],h=h[1],j=[g-a,h-f,0],
c=b._length(j),l=d[0],k=d[d.length-1],d=l[0],m=k[0],l=l[1],k=k[1],n=[m-d,k-l,0],p=b._length(n);3>c||3>p||(b._scale(j,1/c),b._scale(n,1/p),j=b._dot(j,n),0.8<j?(a=Math.round(g-e[e.length-2][0]),e=Math.round(h-e[e.length-2][1]),this.center2D[0]+=a,this.center2D[1]+=e):-0.8>j&&(j=[d-a,l-f,0],n=[m-g,k-h,0],e=b._length(n)-b._length(j),this.zoom+=(0>e?-1:1)*this.pinchScaling),this._draw())}};g._zoomBy=function(a){this.zoom+=a*this.zoomScaling;5>this.zoom&&(this.zoom=5);500<this.zoom&&(this.zoom=500)};g._getRotationScaling=
function(){return[1/Math.max(this._canvas.width,500)*this.mouseDragFactor*b.deg_per_radian,1/Math.max(this._canvas.height,500)*this.mouseDragFactor*b.deg_per_radian]};g._rotate=function(a,e){var d=this._getRotationScaling();e&&(b._m3.rotX(e*d[1]),this.rotation.mul(b._m3));a&&(b._m3.rotY(a*d[0]),this.rotation.mul(b._m3))};g._getCenterAndRadius=function(){Math.min(this._canvas.width,this._canvas.height);for(var a=[999999,999999,999999],e=[-999999,-999999,-999999],d=this.atoms.length;0<=--d;)for(var f=
3;0<=--f;){var h=this.atoms[d].xyz[f];h<a[f]&&(a[f]=h);h>e[f]&&(e[f]=h)}h=[0,0,0];for(f=3;0<=--f;)h[f]=(e[f]+a[f])/2;a=0;for(d=this.atoms.length;0<=--d;)e=this.atoms[d],e=b._distance(e.xyz,h)+(1==e.elemNo?1:1.5),e>a&&(a=e);this.center=h;this.modelRadius=0==a?10:a};g._setScreenCoords=function(){for(var a=this.center,b=this.rotation,d=this.center2D,f=Math.min(this._canvas.width,this._canvas.height)/2/this.modelRadius*this.zoom/100,h=this.atoms.length;0<=--h;){var g=this.atoms[h];this._transform(g.xyz,
g.sxyz,a,b,f,d);g.srad=f*g.radius}for(h=this.bonds.length;0<=--h;)g=this.bonds[h],this._transform(g.xyz,g.sxyz,a,b,f,d),this._transform(g.pts[0],g.spts[0],a,b,f,d),this._transform(g.pts[1],g.spts[1],a,b,f,d)};g._transform=function(a,e,d,f,h,g){for(var j=b._temp1,c=b._temp2,l=3;0<=--l;)j[l]=(a[l]-d[l])*h;f.transform(j,c);c[1]=-c[1];c[2]=-c[2];for(l=3;0<=--l;)e[l]=c[l]+g[l]};g._parse=function(a){this._parseSDF(a)};g._parseSDF=function(a){this._mol=a;if(!b._elemNo.H)for(var e=b._elem.length;0<=--e;)b._elemNo[b._elem[e]]=
e;a=a.split("\n");var d=3,f=a[d++];this.nAtoms=parseFloat(f.substring(0,3));this.nBonds=parseFloat(f.substring(3,6));this.atoms=Array(this.nAtoms);this.bonds=Array(this.nBonds);this.elements=Array(this.nAtoms+this.nBonds);for(var h=0,g,j,c,e=0;e<this.nAtoms;e++){f=a[d++];g=parseFloat(f.substring(0,10));j=parseFloat(f.substring(10,20));c=parseFloat(f.substring(20,30));var f=f.substring(31,34).replace(/\s+/g,""),f=b._elemNo[f]||0,l=1==f?0.23:0.35,k=b._CPK[f]||b._CPK[0];this.elements[h++]=this.atoms[e]=
{type:0,elemNo:f,xyz:[g,j,c],sxyz:[0,0,0],radius:l,color:k,color50:k}}for(e=0;e<this.nBonds;e++){f=a[d++];g=this.atoms[parseFloat(f.substring(0,3))-1];j=this.atoms[parseFloat(f.substring(3,6))-1];c=Math.abs(parseFloat(f.substring(6,9)));switch(c){case 4:case 5:case 6:case 8:c=1;break;case 7:c=2}f=b._getPointAlong(g.xyz,j.xyz,0.5);k=b._distance(g.xyz,f);l=g.radius<k?b._getPointAlong(g.xyz,f,g.radius/k):[0,0,99999];k=j.radius<k?b._getPointAlong(j.xyz,f,j.radius/k):[0,0,99999];this.elements[h++]=this.bonds[e]=
{type:1,atoms:[g,j],xyz:f,pts:[l,k],sxyz:[0,0,0],spts:[[0,0,0],[0,0,0]],order:c,color:0}}};g._getColor=function(a,b){"#FFFFFF"==a&&(a="#D0D0D0");var d=parseInt("0x"+a.substring(1),16),f=d>>16&255,h=d>>8&255,d=d&255;255!=f&&(f+=Math.floor((255-f)*b));255!=h&&(h+=Math.floor((255-h)*b));255!=d&&(d+=Math.floor((255-d)*b));f="000000"+(f<<16|h<<8|d).toString(16);return"#"+f.substring(f.length-6,f.length)};g._draw=function(){if(this.atoms){this._setParams();this._setScreenCoords();var a=this.elements;a.sort(b._zorder);
var e=this._canvas.getContext("2d");e.fillStyle=this._color;e.fillRect(0,0,this._canvas.width,this._canvas.height);for(var d=a.length;0<=--d;){var f=a[d];0==f.type?this._drawAtom(e,f):this._drawBond(e,f)}}};g._drawAtom=function(a,e){a.beginPath();if(this.shadeAtoms){var d=e.srad/4,d=a.createRadialGradient(e.sxyz[0]-d,e.sxyz[1]-d,d,e.sxyz[0],e.sxyz[1],e.srad);d.addColorStop(0,e.color50);d.addColorStop(1,"#FFFFFF"==e.color?"#D0D0D0":e.color);a.fillStyle=d;a.arc(e.sxyz[0],e.sxyz[1],e.srad,0,b._pi2);
a.fill()}else a.fillStyle=e.color,a.arc(e.sxyz[0],e.sxyz[1],e.srad,0,b._pi2),a.fill(),a.strokeStyle="#000000",a.lineWidth=1,a.stroke()};g._drawBond=function(a,b){99999!=b.pts[0][2]&&this._drawBondLines(a,b,b.spts[0],b.atoms[0].color);99999!=b.pts[1][2]&&this._drawBondLines(a,b,b.spts[1],b.atoms[1].color)};g._drawBondLines=function(a,e,d,f){var h=b._temp;h.width=this.bondWidth;h.color=e.color?e.color:f;if(1==e.order)h.pt1=d,h.pt2=e.sxyz,this._drawLine(a,h);else{h.pt1=b._temp1;h.pt2=b._temp2;h.pta=
d;h.ptb=e.sxyz;h.dx=h.ptb[0]-h.pta[0];h.dy=h.ptb[1]-h.pta[1];h.mag2d=Math.round(Math.sqrt(h.dx*h.dx+h.dy*h.dy));h.bondOrder=e.order;for(this._resetAxisCoordinates(h);0<h.bondOrder;)this._drawLine(a,h),h.bondOrder--,this._stepAxisCoordinates(h)}};g._drawLine=function(a,b){a.beginPath();a.strokeStyle=b.color;a.moveTo(b.pt1[0],b.pt1[1]);a.lineTo(b.pt2[0],b.pt2[1]);a.lineWidth=b.width;a.stroke()};g._resetAxisCoordinates=function(a){var b=a.mag2d>>3;1!=this.multipleBondSpacing&&(b*=this.multipleBondSpacing);
b=a.width+b;a.dxStep=Math.round(b*a.dy/a.mag2d);a.dyStep=Math.round(b*-a.dx/a.mag2d);a.pt1[0]=a.pta[0];a.pt1[1]=a.pta[1];a.pt2[0]=a.ptb[0];a.pt2[1]=a.ptb[1];b=a.bondOrder-1;a.pt1[0]-=Math.round(a.dxStep*b/2);a.pt1[1]-=Math.round(a.dyStep*b/2);a.pt2[0]-=Math.round(a.dxStep*b/2);a.pt2[1]-=Math.round(a.dyStep*b/2)};g._stepAxisCoordinates=function(a){a.pt1[0]+=a.dxStep;a.pt1[1]+=a.dyStep;a.pt2[0]+=a.dxStep;a.pt2[1]+=a.dyStep};b._distance=function(a,b){for(var d=0,f=3;0<=--f;)var h=a[f]-b[f],d=d+h*h;return Math.sqrt(d)};
b._dot=function(a,b){for(var d=0,f=3;0<=--f;)d+=a[f]*b[f];return d};b._setPt=function(a,b){for(var d=3;0<=--d;)b[d]=a[d];return b};b._scale=function(a,b){for(var d=3;0<=--d;)a[d]*=b};b._length=function(a){for(var b=0,d=3;0<=--d;)b+=a[d]*a[d];return Math.sqrt(b)};b._getPointAlong=function(a,b,d){return[(b[0]-a[0])*d+a[0],(b[1]-a[1])*d+a[1],(b[2]-a[2])*d+a[2]]};b._zorder=function(a,b){var d=a.sxyz[2],f=b.sxyz[2];return d<f?-1:d>f?1:0};b.M3=function(){this.m00=1;this.m10=this.m02=this.m01=0;this.m11=
1;this.m21=this.m20=this.m12=0;this.m22=1};b.M3.prototype.set=function(a,b,d,f,h,g,j,c,l){this.m00=a;this.m01=b;this.m02=d;this.m10=f;this.m11=h;this.m12=g;this.m20=j;this.m21=c;this.m22=l};b.M3.prototype.transform=function(a,b){b[0]=this.m00*a[0]+this.m01*a[1]+this.m02*a[2];b[1]=this.m10*a[0]+this.m11*a[1]+this.m12*a[2];b[2]=this.m20*a[0]+this.m21*a[1]+this.m22*a[2]};b.M3.prototype.rotX=function(a){var b=Math.cos(a);a=Math.sin(a);this.m00=1;this.m10=this.m02=this.m01=0;this.m11=b;this.m12=-a;this.m20=
0;this.m21=a;this.m22=b};b.M3.prototype.rotY=function(a){var b=Math.cos(a);a=Math.sin(a);this.m00=b;this.m01=0;this.m02=a;this.m10=0;this.m11=1;this.m12=0;this.m20=-a;this.m21=0;this.m22=b};b.M3.prototype.mul=function(a){this.set(a.m00*this.m00+a.m01*this.m10+a.m02*this.m20,a.m00*this.m01+a.m01*this.m11+a.m02*this.m21,a.m00*this.m02+a.m01*this.m12+a.m02*this.m22,a.m10*this.m00+a.m11*this.m10+a.m12*this.m20,a.m10*this.m01+a.m11*this.m11+a.m12*this.m21,a.m10*this.m02+a.m11*this.m12+a.m12*this.m22,a.m20*
this.m00+a.m21*this.m10+a.m22*this.m20,a.m20*this.m01+a.m21*this.m11+a.m22*this.m21,a.m20*this.m02+a.m21*this.m12+a.m22*this.m22)};b._pi2=2*Math.PI;b.deg_per_radian=180/Math.PI;b._z3=[0,0,0];b._temp1=[0,0,0];b._temp2=[0,0,0];b._temp={};b._m3=new b.M3})(Jmol._TMApplet);
