// https://chemapps.stolaf.edu/jmol/jmol.php /////// https://chemapps.stolaf.edu/jmol/jsmol/js/JSmolMin2.js Sat, 27 Apr 24 21:32:46 +0000 /////// /*! jQuery v3.7.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}var t="3.7.1",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},M=function(){V()},R=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&U(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function z(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&R(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function X(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function U(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",M),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML="",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="",le.option=!!xe.lastChild;var ke={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n",""]);var je=/<|&#?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function Re(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="
",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return M(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return M(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 0org.pdb.query.simple.AdvancedKeywordQueryText SearchQUERY",_restReportUrl:"http://www.pdb.org/pdb/rest/customReport?pdbids=IDLIST&customReportColumns=structureId,structureTitle"},_debugAlert:!1,_document:a,_isXHTML:!1,_lastAppletID:null,_mousePageX:null, _mouseOwner:null,_serverUrl:"https://your.server.here/jsmol.php",_syncId:(""+Math.random()).substring(3),_touching:!1,_XhtmlElement:null,_XhtmlAppendChild:!1};a=a.location.href.toLowerCase();j._debugCore=0<=a.indexOf("j2sdebugcore");j._httpProto=0==a.indexOf("https")?"https://":"http://";j._isFile=0==a.indexOf("file:");j._isFile&&$.ajaxSetup({mimeType:"text/plain"});j._ajaxTestSite=j._httpProto+"google.com";a=j._isFile||0==a.indexOf("http://localhost")||0==a.indexOf("http://127.");j._tracker=!a&& "https://chemapps.stolaf.edu/jmol/JmolTracker.php?id=UA-45940799-1";j._isChrome=0<=navigator.userAgent.toLowerCase().indexOf("chrome");j._isSafari=!j._isChrome&&0<=navigator.userAgent.toLowerCase().indexOf("safari");j._isMsie=void 0!==window.ActiveXObject;j._isEdge=0<=navigator.userAgent.indexOf("Edge/");j._useDataURI=!j._isMsie&&!j._isEdge;window.requestAnimationFrame||(window.requestAnimationFrame=window.setTimeout);for(var g in Jmol)j[g]=Jmol[g];return j}(document,Jmol)); (function(a,j){a.clazzAlert=function(){};a.__$=j;j(document).ready(function(){a._document=null});a.$=function(a,e){null==a&&alert(e+arguments.callee.caller.toString());return j(e?"#"+a._id+"_"+e:a)};a._$=function(a){return"string"==typeof a?j("#"+a):a};a.$ajax=function(c){a._ajaxCall=c.url;c.cache="NO"!=c.cache;c.url=a._fixProtocol(c.url);return j.ajax(c)};a._fixProtocol=function(c){0<=c.indexOf("get3d=True")&&(c=c.replace(/get3d\=True/,"get3d=true"));return 0==c.indexOf("http://www.rcsb.org/pdb/files/")&& 0>c.indexOf("/ligand/")?"http://files.rcsb.org/view/"+c.substring(30).replace(/\.gz/,""):0==c.indexOf("http://")&&("https://"==a._httpProto||0e?h[0].scrollHeight:e)}; a.$setEnabled=function(c,e){return a._$(c).attr("disabled",e?null:"disabled")};a.$getSize=function(c){c=a._$(c);return[c.width(),c.height()]};a.$setSize=function(c,e,h){return a._$(c).width(e).height(h)};a.$is=function(c,e){return a._$(c).is(e)};a.$setVisible=function(c,e){var h=a._$(c);return e?h.show():h.hide()};a.$submit=function(c){return a._$(c).submit()};a.$val=function(c,e){var h=a._$(c);return 1==arguments.length?h.val():h.val(e)};a._clearVars=function(){delete jQuery;delete j;delete a;delete SwingController; delete J;delete JM;delete JS;delete JSV;delete JU;delete JV;delete java;delete javajs;delete Clazz;delete c$};var g=document,d=window,b={};b.ua=navigator.userAgent.toLowerCase();var f;a:{f=["linux","unix","mac","win"];for(var k=f.length;k--;)if(-1!=b.ua.indexOf(f[k])){f=f[k];break a}f="unknown"}b.os=f;b.browser=function(){for(var a=b.ua,e="konqueror webkit omniweb opera webtv icab msie mozilla".split(" "),h=0;hnavigator.appVersion.indexOf("MSIE 8");b.getDefaultLanguage=function(){return navigator.language||navigator.userLanguage||"en-US"};b._webGLtest=0;b.supportsWebGL=function(){if(!a.featureDetection._webGLtest){var c;a.featureDetection._webGLtest=d.WebGLRenderingContext&& ((c=g.createElement("canvas")).getContext("webgl")||c.getContext("experimental-webgl"))?1:-1}return 0=b.browserVersion&&"mac"==e||"webkit"==b.browserName&&125.12>b.browserVersion||"msie"==b.browserName&&"mac"==e||"konqueror"==b.browserName&&3.3>=b.browserVersion)a=!1;return a};b.isFullyCompliant=function(){return b.compliantBrowser()&&b.supportsJava()};b.useIEObject="win"==b.os&&"msie"==b.browserName&&5.5<=b.browserVersion;b.useHtml4Object="mozilla"==b.browserName&& 5<=b.browserVersion||"opera"==b.browserName&&8<=b.browserVersion||"webkit"==b.browserName;b.hasFileReader=d.File&&d.FileReader;a.featureDetection=b;a._ajax=function(c){if(!c.async)return a.$ajax(c).responseText;a._ajaxQueue.push(c);1==a._ajaxQueue.length&&a._ajaxDone()};a._ajaxDone=function(){var c=a._ajaxQueue.shift();c&&a.$ajax(c)};a._grabberOptions=[["$","NCI(small molecules)"],[":","PubChem(small molecules)"],["=","RCSB(macromolecules)"],["*","PDBe(macromolecules)"]];a._getGrabberOptions=function(c){if(0== a._grabberOptions.length)return"";var e='',h='';1==a._grabberOptions.length?(e=""+e+'',h=""+h):e+="
";for(var e=e+'"+h).replace(/ID/g,c._id);return"
"+e};a._getScriptForDatabase=function(c){return"$"==c?a.db._nciLoadScript:":"==c?a.db._pubChemLoadScript:a.db._fileLoadScript};a._setInfo=function(a,e,h){var b=[],d="";if(0==h.indexOf("ERROR"))d=h;else switch(e){case "=":e=h.split("");b=[""];for(h=1;h"),b.push("");b.push("
"+e[h].substring(0,4)+""+e[h].split("Title>")[1].split("
");d=e.length-1+" matches";break;case "$":case ":":break;default:return}a._infoHeader=d;a._info=b.join("");a._showInfo(!0)};a._loadSuccess=function(c,e){e&&(a._ajaxDone(),e(c))};a._loadError=function(c){a._ajaxDone();a.say("Error connecting to server: "+a._ajaxCall);null!=c&&c()};a._isDatabaseCall=function(c){return 0<=a.db._databasePrefixes.indexOf(c.substring(0, 1))};a._getDirectDatabaseCall=function(c,e){if(e&&!a.featureDetection.supportsXhr2())return c;var h=2,b=c.substring(0,h),d=a.db._DirectDatabaseCalls[b]||a.db._DirectDatabaseCalls[b=c.substring(0,--h)];d&&(":"==b?(b=c.toLowerCase(),isNaN(parseInt(c.substring(1)))?0==b.indexOf(":smiles:")?(d+="?POST?smiles="+c.substring(8),c="smiles"):0==b.indexOf(":cid:")?c="cid/"+c.substring(5):(0==b.indexOf(":name:")?c=c.substring(5):0==b.indexOf(":cas:")&&(c=c.substring(4)),c="name/"+encodeURIComponent(c.substring(h))): c="cid/"+c.substring(1)):c=encodeURIComponent(c.substring(h)),0<=c.indexOf(".mmtf")?c="https://mmtf.rcsb.org/v1.0/full/"+c.replace(/\.mmtf/,""):0<=d.indexOf("FILENCI")?(c=c.replace(/\%2F/g,"/"),c=d.replace(/\%FILENCI/,c)):c=d.replace(/\%FILE/,c));return c};a._getRawDataFromServer=function(c,e,h,b,d,f){c="?call=getRawDataFromDatabase&database="+c+(0<=e.indexOf("?POST?")?"?POST?":"")+"&query="+encodeURIComponent(e)+(d?"&encoding=base64":"")+(f?"":"&script="+encodeURIComponent(a._getScriptForDatabase(c))); return a._contactServer(c,h,b)};a._checkFileName=function(c,e,h){a._isDatabaseCall(e)&&(h&&a._setQueryTerm(c,e),e=a._getDirectDatabaseCall(e,!0),a._isDatabaseCall(e)&&(e=a._getDirectDatabaseCall(e,!1),h&&(h[0]=!0)));return e};a._checkCache=function(c,e,h){if(c._cacheFiles&&a._fileCache&&!e.endsWith(".js")){if(c=a._fileCache[e])return System.out.println("using "+c.length+" bytes of cached data for "+e),h(c),null;h=function(c,e){h(a._fileCache[c]=e)}}return h};a.playAudio=function(c){a.playAudio(null, c)};a.playAudio=function(a,e){var h=e.get?function(a){return e.get(a)}:null,b=e.put?function(a,c){return e.put(a,c)}:null,d=h?h("audioFile"):e,f=h&&h("audioPlayer"),g=document.createElement("audio");b&&b("audioElement",g);var k=null;f&&(k=function(a){f.processUpdate(a)},f.myClip={open:function(){k("open")},start:function(){g.play();k("start")},loop:function(a){g.loop=0!=a},stop:function(){g.pause()},close:function(){k("close")},setMicrosecondPosition:function(a){g.currentTime=a/1E6}});g.controls= "true";g.src=d;h&&h("loop")&&(g.loop="true");k&&(g.addEventListener("pause",function(){k("pause")}),g.addEventListener("play",function(){k("play")}),g.addEventListener("playing",function(){k("playing")}),g.addEventListener("ended",function(){k("ended")}),k("open"))};a._loadFileData=function(c,e,h,b){var d=[];e=a._checkFileName(c,e,d);h=a._checkCache(c,e,h);d[0]?a._getRawDataFromServer("_",e,h,b):(c={type:"GET",dataType:"text",url:e,async:a._asynchronous,success:function(c){a._loadSuccess(c,h)},error:function(){a._loadError(b)}}, a._checkAjaxPost(c),a._ajax(c))};a._getInfoFromDatabase=function(c,e,h){if("===="==e){var b=a.db._restQueryXml.replace(/QUERY/,h),b={dataType:"text",type:"POST",contentType:"application/x-www-form-urlencoded",url:a.db._restQueryUrl,data:encodeURIComponent(b)+"&req=browser",success:function(b){a._ajaxDone();a._extractInfoFromRCSB(c,e,h,b)},error:function(){a._loadError(null)},async:a._asynchronous};return a._ajax(b)}h="?call=getInfoFromDatabase&database="+e+"&query="+encodeURIComponent(h);return a._contactServer(h, function(h){a._setInfo(c,e,h)})};a._extractInfoFromRCSB=function(c,e,h,b){var d=b.length/5;if(0!=d&&4==h.length&&1!=d){h=h.toUpperCase();var f=b.indexOf(h);0f.indexOf("?")&&f==c._thisJmolModel)){c._thisJmolModel=f;var g;b&&null!=c._viewSet&&null!=(g=a.View.__findView(c._viewSet,{chemID:f}))?a.View.__setView(g,c,!1):("$"==d||":"==d?c._jmolFileType="MOL":"="==d&&(c._jmolFileType="PDB"),c._searchDatabase(e,d,h))}};a._searchDatabase=function(c,e,h,b){c._showInfo(!1);return 0<=e.indexOf("?")?(a._getInfoFromDatabase(c,h,e.split("?")[0]),!0):a.db._DirectDatabaseCalls[h]?(c._loadFile(h+e,b),!0):!1};a._syncBinaryOK= "?";a._canSyncBinary=function(c){if(a._isAsync)return!0;if(self.VBArray)return a._syncBinaryOK=!1;if("?"!=a._syncBinaryOK)return a._syncBinaryOK;a._syncBinaryOK=!0;try{var e=new window.XMLHttpRequest;e.open("text",a._ajaxTestSite,!1);e.hasOwnProperty("responseType")?e.responseType="arraybuffer":e.overrideMimeType&&e.overrideMimeType("text/plain; charset=x-user-defined")}catch(h){return System.out.println("JSmolCore.js: synchronous binary file transfer is requested but not available"),a._alertNoBinary&& !c&&alert("JSmolCore.js: synchronous binary file transfer is requested but not available"),a._syncBinaryOK=!1}return!0};a._binaryTypes="mmtf .bcif .gz .bz2 .jpg .gif .png .zip .jmol .bin .smol .spartan .pmb .mrc .map .ccp4 .dn6 .delphi .omap .pse .dcd .lut .uk/pdbe/densities/".split(" ");a.isBinaryUrl=function(c){for(var e=a._binaryTypes.length;0<=--e;)if(0<=c.indexOf(a._binaryTypes[e]))return!0;return!1};a._getFileData=function(c,e,h){var b=a.isBinaryUrl(c),d=0<=c.indexOf(".gz")&&0<=c.indexOf("rcsb.org"); d&&(c=c.replace(/\.gz/,""),b=!1);var d=b&&!e&&!a._canSyncBinary(d),f=0<=c.indexOf("?POST?");0==c.indexOf("file:/")&&0!=c.indexOf("file:///")&&(c="file://"+c.substring(5));var g=0>c.indexOf("://")||0==c.indexOf(document.location.protocol)&&0<=c.indexOf(document.location.host),k="https://"==a._httpProto&&0==c.indexOf("http://"),j=a._isDirectCall(c);!j&&0<=c.indexOf("?ALLOWSORIGIN?")&&(j=!0,c=c.replace(/\?ALLOWSORIGIN\?/,""));var l=!g&&a.$supportsIECrossDomainScripting(),m=null;if(k||d||!g&&!j||!e&& l)m=a._getRawDataFromServer("_",c,e,e,d,!0);else{c=c.replace(/file:\/\/\/\//,"file://");var r={dataType:b?"binary":"text",async:!!e};f?(r.type="POST",r.url=c.split("?POST?")[0],r.data=c.split("?POST?")[1]):(r.type="GET",r.url=c);e&&(r.success=function(){e(a._xhrReturn(r.xhr))},r.error=function(){e(r.xhr.statusText)});r.xhr=a.$ajax(r);e||(m=a._xhrReturn(r.xhr))}if(!h)return m;null==m&&(m="",b=!1);b&&(b=a._canSyncBinary(!0));return b?a._strToBytes(m):JU.SB.newS(m)};a._xhrReturn=function(a){return!a.responseText&& ""!==a.responseText||self.Clazz&&Clazz.instanceOf(a.response,self.ArrayBuffer)?a.response||a.statusText:a.responseText};a._isDirectCall=function(c){if(0<=c.indexOf("?ALLOWSORIGIN?"))return!0;for(var e in a.db._DirectDatabaseCalls)if(0<=e.indexOf(".")&&0<=c.indexOf(e))return!0;return!1};a._cleanFileData=function(a){return 0<=a.indexOf("\r")&&0<=a.indexOf("\n")?a.replace(/\r\n/g,"\n"):0<=a.indexOf("\r")?a.replace(/\r/g,"\n"):a};a._getFileType=function(a){var e=a.substring(0,1);if("$"==e||":"==e)return"MOL"; if("="==e)return"="==a.substring(1,2)?"LCIF":"PDB";a=a.split(".").pop().toUpperCase();return a.substring(0,Math.min(a.length,3))};a._getZ=function(c,e){return c&&c._z&&c._z[e]||a._z[e]};a._incrZ=function(c,e){return c&&c._z&&++c._z[e]||++a._z[e]};a._hideLocalFileReader=function(c){c._localReader&&a.$setVisible(c._localReader,!1);c._readingLocal=!1;a.setCursor(c,0)};a.loadFileFromDialog=function(c){a.loadFileAsynchronously(null,c,null,null)};a.loadFileAsynchronously=function(c,e,h,b){if(h&&0!=h.indexOf("?")){var d= h;h=a._checkFileName(e,h);var f=function(f){a._setData(c,h,d,f,b,e)},f=a._checkCache(e,h,f);0<=h.indexOf("|")&&(h=h.split("|")[0]);return null==f?null:a._getFileData(h,f)}if(!a.featureDetection.hasFileReader)return c?c.setData("Local file reading is not enabled in your browser",null,null,b,e):alert("Local file reading is not enabled in your browser");e._localReader||(f='
', a.$after("#"+e._id+"_appletdiv",f.replace(/ID/g,e._id+"_localReader")),e._localReader=a.$(e,"localReader"));a.$appEvent(e,"localReader_loadurl","click");a.$appEvent(e,"localReader_loadurl","click",function(){var c=prompt("Enter a URL");c&&(a._hideLocalFileReader(e,0),a._setData(null,c,c,null,b,e))});a.$appEvent(e,"localReader_loadfile","click");a.$appEvent(e,"localReader_loadfile","click",function(){var h=a.$(e,"localReader_files")[0].files[0],d=new FileReader;d.onloadend=function(d){d.target.readyState== FileReader.DONE&&(a._hideLocalFileReader(e,0),a._setData(c,h.name,h.name,d.target.result,b,e))};try{d.readAsArrayBuffer(h)}catch(f){alert("You must select a file first.")}});a.$appEvent(e,"localReader_cancel","click");a.$appEvent(e,"localReader_cancel","click",function(){a._hideLocalFileReader(e);c&&c.setData("#CANCELED#",null,null,b,e)});a.$setVisible(e._localReader,!0);e._readingLocal=!0};a._setData=function(c,e,h,b,d,f){b&&(b=a._strToBytes(b));null!=b&&(null==c||0<=e.indexOf(".jdx"))&&a.Cache.put("cache://"+ e,b);null==c?f._applet.openFileAsyncSpecial(null==b?e:"cache://"+e,1):c.setData(e,h,b,d)};a.doAjax=function(c,e,h){c=c.toString();if(h){if(0!=c.indexOf("http://")&&0!=c.indexOf("https://"))return a._saveFile(c,h);c={async:!1,url:c,type:"POST",data:"string"==typeof data?h:";base64,"+(JU||J.util).Base64.getBase64(h).toString(),processData:!1};return a.$ajax(c).responseText}e&&(c+="?POST?"+e);return a._getFileData(c,null,!0)};a._saveFile=function(c,e,h,b){if(a._localFileSaveFunction&&a._localFileSaveFunction(c, e))return"OK";c=c.substring(c.lastIndexOf("/")+1);h||(h=0<=c.indexOf(".pdf")?"application/pdf":0<=c.indexOf(".png")?"image/png":0<=c.indexOf(".gif")?"image/gif":0<=c.indexOf(".jpg")?"image/jpg":"");var d="string"==typeof e;e=d&&0<=e.indexOf(";base64,")?e.split(";base64,")[1]:(JU||J.util).Base64.getBase64(d?e.getBytes("UTF-8"):e).toString();b||(b="base64");(d=a._serverUrl)&&0<=d.indexOf("your.server")&&(d="");a._useDataURI||!d?(b=document.createElement("a"),b.href="data:"+h+";base64,"+e,b.type=h|| "text/plain;charset=utf-8",b.download=c,b.target="_blank",j("body").append(b),b.click(),b.remove()):(a._formdiv||(a.$after("body",''), a._formdiv="__jsmolform__"),a.$attr(a._formdiv,"action",d+"?"+(new Date).getMilliseconds()),a.$val("__jsmoldata__",e),a.$val("__jsmolfilename__",c),a.$val("__jsmolmimetype__",h),a.$val("__jsmolencoding__",b),a.$submit("__jsmolform__"),a.$val("__jsmoldata__",""),a.$val("__jsmolfilename__",""));return"OK"};a._strToBytes=function(a){if(Clazz.instanceOf(a,self.ArrayBuffer))return Clazz.newByteArray(-1,a);for(var e=Clazz.newByteArray(a.length,0),h=a.length;0<=--h;)e[h]=a.charCodeAt(h)&255;return e};a._setConsoleDiv= function(a){self.Clazz&&Clazz.setConsoleDiv(a)};a._registerApplet=function(c,e){return window[c]=a._applets[c]=a._applets.master=a._applets[c+"__"+a._syncId+"__"]=e};a._readyCallback=function(c,e,h,b,d){c=c.split("_object")[0];var f=a._applets[c];if(h=h.booleanValue?h.booleanValue():h)f._appletPanel=d||b,f._applet=b;a._track(f)._readyCallback(c,e,h)};a._getWrapper=function(c,e){var h;if(e){var b="";if(c._coverImage)var b=' onclick="Jmol.coverApplet(ID, false)" title="'+c._coverTitle+'"',d='",b='
"+d+"
";d=c._isJava?"":'';h=a._appletCssText.replace(/\'/g,'"');var f=c._getSpinner&&c._getSpinner();c._spinner=f=!f||"none"==f?"":"background-image:url("+f+"); background-repeat:no-repeat; background-position:center;";h=f+(0<=h.indexOf('style="')?h.split('style="')[1]:'" '+h);h='...
IMG WAIT......
";var f=c._height,g=c._width;if("string"!==typeof f||0>f.indexOf("%"))f+="px";if("string"!==typeof g||0>g.indexOf("%"))g+="px";h=h.replace(/IMG/,b).replace(/WAIT/,d).replace(/Hpx/g,f).replace(/Wpx/g,g)}else h='......
............
..................
......
...
'; return h.replace(/\.\.\./g,"").replace(/[\n\r]/g,"").replace(/ID/g,c._id)};a._hideLoadingSpinner=function(c){c._spinner&&a.$css(a.$(c,"appletdiv"),{"background-image":""})};a._documentWrite=function(c){if(a._document){if(a._isXHTML&&!a._XhtmlElement){var e=document.getElementsByTagName("script");a._XhtmlElement=e.item(e.length-1);a._XhtmlAppendChild=!1}a._XhtmlElement?a._domWrite(c):a._document.write(c)}return c};a._domWrite=function(c){for(var e=[0];e[0]c.jarFile.indexOf("Signed")&&(c.jarFile=c.jarFile.replace(/Applet/,"AppletSigned")),c.use= c.use.replace(/SIGNED/,"JAVA"),c.isSigned=!0)};a._syncedApplets=[];a._syncedCommands=[];a._syncedReady=[];a._syncReady=!1;a._isJmolJSVSync=!1;a._setReady=function(c){a._syncedReady[c]=1;for(var e=0,h=0;hc[0]?-1:0}if(!a||"object"!=typeof a)return[];for(var h=[],b=a.length-1;0<=b;b--)for(var d=0,f=a[b].length;de.type.indexOf("touch"))return!1;var b=a.$offset(c.id),d,f=e.originalEvent;e.pageX||(e.pageX=f.pageX);e.pageY||(e.pageY=f.pageY);a._mousePageX=e.pageX;a._mousePageY=e.pageY;f.targetTouches&&f.targetTouches[0]?(d=f.targetTouches[0].pageX-b.left,b=f.targetTouches[0].pageY-b.top):f.changedTouches?(d=f.changedTouches[0].pageX-b.left,b=f.changedTouches[0].pageY- b.top):(d=e.pageX-b.left,b=e.pageY-b.top);return void 0==d?null:[Math.round(d),Math.round(b),a._jsGetMouseModifiers(e)]};a.setCursor=function(c,e){if(!c._isJava&&!c._readingLocal){var b;switch(e){case 1:b="crosshair";break;case 3:b="wait";a.$setVisible(a.$(c,"waitimage"),!0);break;case 8:b="ns-resize";break;case 12:b="grab";break;case 13:b="move";break;default:a.$setVisible(a.$(c,"waitimage"),!1),b="default"}c._canvas.style.cursor=b}};a._gestureUpdate=function(c,e){e.stopPropagation();e.preventDefault(); var b=e.originalEvent;switch(e.type){case "touchstart":a._touching=!0;break;case "touchend":a._touching=!1}if(!b.touches||2!=b.touches.length)return!1;switch(e.type){case "touchstart":c._touches=[[],[]];break;case "touchmove":var d=a.$offset(c.id),f=c._touches[0],g=c._touches[1];f.push([b.touches[0].pageX-d.left,b.touches[0].pageY-d.top]);g.push([b.touches[1].pageX-d.left,b.touches[1].pageY-d.top]);b=f.length;3d?-1:1,0,b]);return!1});a.$bind(c,"contextmenu",function(){return!1});a.$bind(c,"mouseout",function(b){if(e(b))return!0;a._mouseOwner&&(!a._mouseOwner.mouseMove&&!a._mouseOwner.isDragging)&& a._setMouseOwner(null);c.applet._appletPanel&&c.applet._appletPanel.startHoverWatcher(!1);a._jsGetXY(c,b);return!1});a.$bind(c,"mouseenter",function(b){if(e(b))return!0;c.applet._appletPanel&&c.applet._appletPanel.startHoverWatcher(!0);if(0===b.buttons||0===b.which){c.isDragging=!1;b=a._jsGetXY(c,b);if(!b)return!1;c.applet._processEvent(504,b);c.applet._processEvent(502,b);return!1}});a.$bind(c,"mousemoveoutjsmol",function(b,d,f){if(e(f))return!0;if(c==a._mouseOwner&&c.isDragging)return a._drag(c, f)});c.applet._is2D&&a.$resize(function(){c.applet&&c.applet._resize()});a.$bind("body","mouseup touchend",function(b){if(e(b))return!0;c.applet&&(c.isDragging=!1);a._setMouseOwner(null)})};a._jsUnsetMouse=function(c){c.applet=null;a.$bind(c,"mousedown touchstart mousemove touchmove mouseup touchend DOMMouseScroll mousewheel contextmenu mouseout mouseenter",null);a._setMouseOwner(null)};a.Swing={count:0,menuInitialized:0,menuCounter:0,htDialogs:{}};var l=a.Swing;SwingController=l;l.setDraggable=function(c){c= c.prototype;c.setContainer||(c.setContainer=function(c){this.container=c;c.obj=this;this.ignoreMouse=this.isDragging=!1;var b=this;c.bind("mousedown touchstart",function(c){if(b.ignoreMouse)return b.ignoreMouse=!1,!0;a._setMouseOwner(b,!0);b.isDragging=!0;b.pageX=c.pageX;b.pageY=c.pageY;return!1});c.bind("mousemove touchmove",function(c){if(b.isDragging&&a._mouseOwner==b)return b.mouseMove(c),!1});c.bind("mouseup touchend",function(c){b.mouseUp(c);a._setMouseOwner(null)})},c.mouseUp=function(c){if(this.isDragging&& a._mouseOwner==this)return this.pageX0+=c.pageX-this.pageX,this.pageY0+=c.pageY-this.pageY,this.isDragging=!1;a._setMouseOwner(null)},c.setPosition=function(){if(null===a._mousePageX){var c=a.$offset(this.applet._id+"_"+(this.applet._is2D?"canvas2d":"canvas"));a._mousePageX=c.left;a._mousePageY=c.top}this.pageX0=a._mousePageX;this.pageY0=a._mousePageY;this.container.css({top:a._mousePageY+"px",left:a._mousePageX+"px"})},c.mouseMove=function(c){if(this.isDragging&&a._mouseOwner==this){this.timestamp= System.currentTimeMillis();var b=this.pageX0+(c.pageX-this.pageX);c=this.pageY0+(c.pageY-this.pageY);a._mousePageX=b;a._mousePageY=c;this.container.css({top:c+"px",left:b+"px"})}},c.dragBind=function(c){this.applet._ignoreMouse=!c;this.container.unbind("mousemoveoutjsmol");this.container.unbind("touchmoveoutjsmol");this.container.unbind("mouseupoutjsmol");this.container.unbind("touchendoutjsmol");a._setMouseOwner(null);if(c){var b=this;this.container.bind("mousemoveoutjsmol touchmoveoutjsmol",function(a, c,e){b.mouseMove(e)});this.container.bind("mouseupoutjsmol touchendoutjsmol",function(a,c,e){b.mouseUp(e)})}})};l.JSDialog=function(){};l.setDraggable(l.JSDialog);l.getScreenDimensions=function(a){a.width=j(window).width();a.height=j(window).height()};l.dispose=function(c){a.$remove(c.id+"_mover");delete l.htDialogs[c.id];c.container.obj.dragBind(!1)};l.register=function(a,b){a.id=b+ ++l.count;l.htDialogs[a.id]=a};l.setDialog=function(c){a._setMouseOwner(null);a.$remove(c.id);var b=c.id+"_mover", h=a._$(b),d;h[0]?(h.html(c.html),d=h[0].jd):(a.$after("body","
"+c.html+"
"),d=new l.JSDialog,h=a._$(b),c.container=h,d.applet=c.manager.vwr.html5Applet,d.setContainer(h),d.dialog=c,d.setPosition(),d.dragBind(!0),h[0].jd=d);a.$bind("#"+c.id+" .JButton","mousedown touchstart",function(){d.ignoreMouse=!0});a.$bind("#"+c.id+" .JComboBox","mousedown touchstart",function(){d.ignoreMouse=!0});a.$bind("#"+c.id+" .JCheckBox","mousedown touchstart", function(){d.ignoreMouse=!0});a.$bind("#"+c.id+" .JTextField","mousedown touchstart",function(){d.ignoreMouse=!0});a.$bind("#"+c.id+" .JTable","mousedown touchstart",function(){d.ignoreMouse=!0});a.$bind("#"+c.id+" .JScrollPane","mousedown touchstart",function(){d.ignoreMouse=!0});a.$bind("#"+c.id+" .JEditorPane","mousedown touchstart",function(){d.ignoreMouse=!0})};l.setSelected=function(c){a.$prop(c.id,"checked",!!c.selected)};l.setSelectedIndex=function(c){a.$prop(c.id,"selectedIndex",c.selectedIndex)}; l.setText=function(c){a.$prop(c.id,"value",c.text)};l.setVisible=function(c){a.$setVisible(c.id,c._visible)};l.setEnabled=function(c){a.$setEnabled(c.id,c.enabled)};l.click=function(c,b){var h=l.htDialogs[c.id];if(h){var d=h.toString();if(0<=d.indexOf("JCheck"))h.selected=c.checked;else if(0<=d.indexOf("JCombo"))h.selectedIndex=c.selectedIndex;else if(null!=h.text&&(h.text=c.value,b&&13!=(b.charCode||b.keyCode)))return}d=l.htDialogs[a.$getAncestorDiv(c.id,"JDialog").id];d.manager.actionPerformed(h? h.name:d.registryKey+"/"+c.id)};l.setFront=function(c){var b=c.manager.vwr.html5Applet;c.zIndex!=a._getZ(b,"dialog")&&(c.zIndex=a._incrZ(b,"dialog"));c.container&&((c.container[0]||c.container).style.zIndex=c.zIndex)};l.hideMenus=function(a){if(a=a._menus)for(var b in a)a[b]._visible&&l.hideMenu(a[b])};l.windowClosing=function(c){c=l.htDialogs[a.$getAncestorDiv(c.id,"JDialog").id];c.registryKey?c.manager.processWindowClosing(c.registryKey):c.dispose()};a._track=function(c){if(a._tracker){try{var b= '';a.$after("body",b)}catch(h){}delete a._tracker}return c};var m;a.getProfile=function(a){if(self.Clazz&&self.JSON)return m||Clazz._startProfiling(m=0==arguments.length||a),Clazz.getProfile()};a._getInChIKey=function(a,b){0<=b.indexOf("MOL=")&&b.split("MOL=")[1].split('"')}; a._getAttr=function(a,b){var h=a.indexOf(b+"=");return 0<=h&&0<=(h=a.indexOf('"',h))?a.substring(h+1,a.indexOf('"',h+1)):null};a.User={viewUpdatedCallback:null};a.View={count:0,applets:{},sets:{}};(function(b){b.resetView=function(b,c){debugger;if(c){if(c._viewSet){var d=a.View.applets[c._viewSet];for(b in d)b!=c&&a.View.resetView(b)}}else b&&(b._reset(),a.View.updateView(b))};b.updateView=function(e,d){if(null!=e._viewSet){d||(d={});d.chemID||(e._searchQuery=null);d.data||(d.data="N/A");d.type=e._viewType; if(null==(e._currentView=b.__findView(e._viewSet,d)))e._currentView=b.__createViewSet(e._viewSet,d.chemID,d.viewID||d.chemID);e._currentView[d.type].data=d.data;e._currentView[d.type].smiles=e._getSmiles();a.User.viewUpdatedCallback&&a.User.viewUpdatedCallback(e,"updateView");b.__setView(e._currentView,e,!1)}};b.updateFromSync=function(e,d){e._updateMsg=d;var f=a._getAttr(d,"sourceID")||a._getAttr(d,"file");if(f){var g=b.__findView(e._viewSet,{viewID:f});if(null==g)return a.updateView(e,d);g!=e._currentView&& b.__setView(g,e,!0);var k=(f=a._getAttr(d,"atoms"))&&0<=d.indexOf("selectionhalos ON")?eval("["+f+"]"):[];setTimeout(function(){e._currentView==g&&b.updateAtomPick(e,k)},10);a.User.viewUpdatedCallback&&a.User.viewUpdatedCallback(e,"updateFromSync")}};b.updateAtomPick=function(b,c){var d=b._currentView;if(null!=d){for(var f in d)"info"!=f&&d[f].applet!=b&&d[f].applet._updateAtomPick(c);a.User.viewUpdatedCallback&&a.User.viewUpdatedCallback(b,"updateAtomPick")}};b.dumpViews=function(a){var d=b.sets[a]; if(d){var f="View set "+a+":\n";a=b.applets[a];for(var g in a)f+="\napplet "+a[g]._id+" currentView="+(a[g]._currentView?a[g]._currentView.info.viewID:null);for(g=d.length;0<=--g;){a=d[g];var f=f+("\n\nview="+g+" viewID="+a.info.viewID+" chemID="+a.info.chemID+"\n"),k,j;for(j in a)"info"!=j&&(f+="\nview="+g+" type="+j+" applet="+((k=a[j]).applet?k.applet._id:null)+" SMILES="+k.smiles+"\n atomMap="+JSON.stringify(k.atomMap)+"\n data=\n"+k.data+"\n")}return f}};b.__init=function(a){var d=a._viewSet, f=b.applets;f[d]||(f[d]={});f[d][a._viewType]=a};b.__findView=function(a,d){var f=b.sets[a];null==f&&(f=b.sets[a]=[]);for(var g=f.length;0<=--g;){var k=f[g];if(d.viewID){if(k.info.viewID==d.viewID)return k}else{if(null!=d.chemID&&d.chemID==k.info.chemID)return k;for(var j in k)if("info"!=j&&(null!=d.data&&null!=k[j].data?d.data==k[j].data:d.type==j))return k}}return null};b.__createViewSet=function(e,d,f){b.count++;d={info:{chemID:d,viewID:f||"model_"+b.count}};for(var g in a._applets)f=a._applets[g], f._viewSet==e&&(d[f._viewType]={applet:f,data:null});b.sets[e].push(d);return d};b.__setView=function(a,b,c){for(var d in a)if("info"!=d){var f=a[d],g=f.applet,k=c||null!=g&&""==g._molData;if(!(null==g||g==b&&!k)){var j=null==f.data,l=null!=g._currentView;g._currentView=a;if(!l||!(a[d].data==f.data&&!j&!k))if(g._loadModelFromView(a),j)break}}}})(a.View);a.Cache={fileCache:{}};a.Cache.get=function(b){return a.Cache.fileCache[b]};a.Cache.put=function(b,e){a.Cache.fileCache[b]=e};a.Cache.setDragDrop= function(b,e){a.$appEvent(b,e,"dragover",function(a){a=a.originalEvent;a.stopPropagation();a.preventDefault();a.dataTransfer.dropEffect="copy"});a.$appEvent(b,e,"drop",function(d){var f=d.originalEvent;f.stopPropagation();f.preventDefault();var g=f.dataTransfer.files[0];if(null==g)try{g=""+f.dataTransfer.getData("text"),(0==g.indexOf("file:/")||0==g.indexOf("http:/")||0==g.indexOf("https:/"))&&b._scriptLoad(g)}catch(k){}else f=new FileReader,f.onloadend=function(f){if(f.target.readyState==FileReader.DONE){var k= "cache://DROP_"+g.name;f=Clazz.newByteArray(-1,f.target.result);if("console_input"==e)k=String.instantialize(f),a.$(b,e).val(0>k.indexOf("\x00")?k:f.length+" bytes");else{k.endsWith(".spt")||b._appletPanel.cacheFileByName("cache://DROP_*",!1);"JSV"==b._viewType||k.endsWith(".jdx")?a.Cache.put(k,f):b._appletPanel.cachePut(k,f);f=a._jsGetXY(b._canvas,d);var j=[null];f&&(!b._appletPanel.setStatusDragDropped||b._appletPanel.setStatusDragDropped(0,f[0],f[1],k,j))&&b._appletPanel.openFileAsyncSpecialType(k, 1,j[0])}}},f.readAsArrayBuffer(g)})}})(Jmol,jQuery);Jmol._debugCode=document&&document.location&&0<=document.location.href.indexOf("j2sdebugcode"); (function(a){a._isAsync=!1;a._asyncCallbacks={};a._coreFiles=[];var j=!1,g=[],d=[],b=0,f=[],k=[],l=function(c){arguments.length||(c=!0);delete b;for(var f;0k.join("").indexOf(d[b])&&k.push(c+"/core/core"+d[b]+".z.js");for(b=0;b"));d+=a._getWrapper(this,!1);c.addSelectionOptions&&(d+=a._getGrabberOptions(this)); a._debugAlert&&!a._document&&alert(d);this._code=a._documentWrite(d)};c._newCanvas=function(a){this._is2D?this._createCanvas2d(a):this._GLmol.create()};c._getHtml5Canvas=function(){return this._canvas};c._getWidth=function(){return this._canvas.width};c._getHeight=function(){return this._canvas.height};c._getContentLayer=function(){return a.$(this,"contentLayer")[0]};c._repaintNow=function(){a.repaint(this,!1)};c._createCanvas2d=function(){var b=a.$(this,"appletdiv");try{b[0].removeChild(this._canvas), this._canvas.frontLayer&&b[0].removeChild(this._canvas.frontLayer),this._canvas.rearLayer&&b[0].removeChild(this._canvas.rearLayer),this._canvas.contentLayer&&b[0].removeChild(this._canvas.contentLayer),a._jsUnsetMouse(this._mouseInterface)}catch(c){}var d=Math.round(b.width()),e=Math.round(b.height()),f=document.createElement("canvas");f.tabIndex=1;f.outline="none";f.applet=this;this._canvas=f;f.style.width="100%";f.style.height="100%";f.width=d;f.height=e;f.id=this._id+"_canvas2d";b.append(f);a._$(f.id).css({"z-index":a._getZ(this, "main")});if(this._isLayered){var g=document.createElement("div");f.contentLayer=g;g.id=this._id+"_contentLayer";b.append(g);a._$(g.id).css({zIndex:a._getZ(this,"image"),position:"absolute",left:"0px",top:"0px",width:(this._isSwing?d:0)+"px",height:(this._isSwing?e:0)+"px",overflow:"hidden"});this._isSwing?(b=document.createElement("div"),b.id=this._id+"_swingdiv",a._$(this._id+"_appletinfotablediv").append(b),a._$(b.id).css({zIndex:a._getZ(this,"rear"),position:"absolute",left:"0px",top:"0px",width:d+ "px",height:e+"px",overflow:"hidden"}),this._mouseInterface=f.contentLayer,f.contentLayer.applet=this):this._mouseInterface=this._getLayer("front",b,d,e,!1)}else this._mouseInterface=f;a._jsSetMouse(this._mouseInterface)};c._getLayer=function(b,c,d,e,f){var g=document.createElement("canvas");this._canvas[b+"Layer"]=g;g.style.width="100%";g.style.height="100%";g.id=this._id+"_"+b+"Layer";g.width=d;g.height=e;c.append(g);g.applet=this;a._$(g.id).css({background:f?"rgb(0,0,0,1)":"rgb(0,0,0,0.001)","z-index":a._getZ(this, b),position:"absolute",left:"0px",top:"0px",overflow:"hidden"});return g};c._setupJS=function(){window["j2s.lib"]={base:this._j2sPath+"/",alias:".",console:this._console,monitorZIndex:a._getZ(this,"monitorZIndex")};0==d.length&&a._addExec([this,m,null,"loadClazz"]);this._addCoreFiles();a._addExec([this,this.__startAppletJS,null,"start applet"]);this._isSigned=!0;this._ready=!1;this._applet=null;this._canScript=function(){return!0};this._savedOrientations=[];b&&clearTimeout(b);b=setTimeout(l,100)}; c.__startAppletJS=function(b){0==a._version.indexOf("$Date: ")&&(a._version=(a._version.substring(7)+" -").split(" -")[0]+" (JSmol/j2s)");var c=Clazz._4Name("java.util.Hashtable").newInstance();a._setAppletParams(b._availableParams,c,b.__Info,Boolean.TRUE);c.put("appletReadyCallback","Jmol._readyCallback");c.put("applet",Boolean.TRUE);c.put("name",b._id);c.put("syncId",a._syncId);a._isAsync&&c.put("async",Boolean.TRUE);b._color&&c.put("bgcolor",b._color);b._startupScript&&c.put("script",b._startupScript); a._syncedApplets.length&&c.put("synccallback","Jmol._mySyncCallback");c.put("signedApplet","true");c.put("platform",b._platform);b._is2D&&c.put("display",b._id+"_canvas2d");c.put("documentBase",document.location.href);var d=b._j2sPath+"/";if(0>d.indexOf("://")){var e=document.location.href.split("#")[0].split("?")[0].split("/");0==d.indexOf("/")?e=[e[0],d.substring(1)]:e[e.length-1]=d;d=e.join("/")}b._j2sFullPath=d.substring(0,d.length-1);c.put("codePath",d);a._registerApplet(b._id,b);try{b._newApplet(c)}catch(f){b= (a._isAsync?"normal async abort? from ":"")+f;a._debugCode&&alert(b);System.out.println(b);return}b._jsSetScreenDimensions();l()};c._restoreState||(c._restoreState=function(){});c._jsSetScreenDimensions=function(){if(this._appletPanel){var b=a._getElement(this,this._is2D?"canvas2d":"canvas");this._appletPanel.setScreenDimension(b.width,b.height)}};c._show=function(b){a.$setVisible(a.$(this,"appletdiv"),b);b&&a.repaint(this,!0)};c._canScript=function(){return!0};c.equals=function(a){return this==a}; c.clone=function(){return this};c.hashCode=function(){return parseInt(this._uniqueId)};c._processGesture=function(a){return this._appletPanel.processTwoPointGesture(a)};c._processEvent=function(a,b){this._appletPanel.processMouseEvent(a,b[0],b[1],b[2],System.currentTimeMillis())};c._processKeyEvent=function(a,b,c){this._appletPanel.processKeyEvent({getID:function(){return a},getKeyCode:function(){return c.keyCode},getModifiers:function(){return b[2]},consume:function(){}})};c._resize=function(){var b= "__resizeTimeout_"+this._id;a[b]&&clearTimeout(a[b]);var c=this;a[b]=setTimeout(function(){a.repaint(c,!0);a[b]=null},100)};return c};a.repaint=function(b,c){if(b&&b._appletPanel){var d=a.$(b,"appletdiv"),f=Math.round(d.width()),d=Math.round(d.height());if(b._is2D&&(b._canvas.width!=f||b._canvas.height!=d))b._newCanvas(!0),b._appletPanel.setDisplay(b._canvas);b._appletPanel.setScreenDimension(f,d);f=function(){b._appletPanel.paint?b._appletPanel.paint(null):b._appletPanel.update(null)};c?requestAnimationFrame(f): f()}};a.loadImage=function(b,c,d,f,g,k){var j="echo_"+c+d+(f?"_"+f.length:""),l=a.getHiddenCanvas(b.vwr.html5Applet,j,0,0,!1,!0);if(null==l){if(null==k){k=new Image;if(null==f)return k.onload=function(){a.loadImage(b,c,d,null,g,k)},k.src=d,null;System.out.println("Jsmol.js Jmol.loadImage using data URI for "+j);k.src="string"==typeof f?f:"data:"+JU.Rdr.guessMimeTypeForBytes(f)+";base64,"+JU.Base64.getBase64(f)}var m=k.width,u=k.height;"webgl"==c&&(m/=2,u/=2);l=a.getHiddenCanvas(b.vwr.html5Applet, j,m,u,!0,!1);l.imageWidth=m;l.imageHeight=u;l.id=j;l.image=k;a.setCanvasImage(l,m,u)}else System.out.println("Jsmol.js Jmol.loadImage reading cached image for "+j);return null==f?g(l,d):l};a._canvasCache={};a.getHiddenCanvas=function(b,c,d,f,g,k){c=b._id+"_"+c;b=a._canvasCache[c];if(k)return b;if(g||!b||b.width!=d||b.height!=f)b=document.createElement("canvas"),b.width=b.style.width=d,b.height=b.style.height=f,b.id=c,a._canvasCache[c]=b;return b};a.setCanvasImage=function(a,b,c){a.buf32=null;a.width= b;a.height=c;a.getContext("2d").drawImage(a.image,0,0,a.image.width,a.image.height,0,0,b,c)};a.applyFunc=function(a,b){return a(b)}})(Jmol); (function(a,j){a._Applet=function(b,d,g){window[b]=this;this._jmolType="Jmol._Applet"+(d.isSigned?" (signed)":"");this._viewType="Jmol";this._isJava=!0;this._syncKeyword="Select:";this._availableParams=";progressbar;progresscolor;boxbgcolor;boxfgcolor;allowjavascript;boxmessage;\t\t\t;animframecallback;appletreadycallback;atommovedcallback;audiocallback;\t\t\t;clickcallback;dragdropcallback;echocallback;errorcallback;evalcallback;hovercallback;\t\t\t;imagecallback;loadstructcallback;measurecallback;messagecallback;minimizationcallback;modelkitcallback;pickcallback;\t\t\t;resizecallback;scriptcallback;selectcallback;servicecallback;structuremodifiedcallback;synccallback;\t\t\t;statusform;statustext;statustextarea;usecommandthread;syncid;appletid;startupscript;language;menufile;";if(g)return this; this._isSigned=d.isSigned;this._readyFunction=d.readyFunction;this._ready=!1;this._isJava=!0;this._isInfoVisible=!1;this._applet=null;this._memoryLimit=d.memoryLimit||512;this._canScript=function(){return!0};this._savedOrientations=[];this._initialize=function(b,g){var c=!1;a._jarFile&&(g=a._jarFile);if(this._jarFile){var e=this._jarFile;0<=e.indexOf("/")?(alert("This web page URL is requesting that the applet used be "+e+". This is a possible security risk, particularly if the applet is signed, because signed applets can read and write files on your local machine or network."), "yes"==prompt("Do you want to use applet "+e+"? ","yes or no")?(b=e.substring(0,e.lastIndexOf("/")),g=e.substring(e.lastIndexOf("/")+1)):c=!0):g=e;this_isSigned=d.isSigned=0<=g.indexOf("Signed")}this._jarPath=d.jarPath=b||".";this._jarFile=d.jarFile="string"==typeof g?g:(g?"JmolAppletSigned":"JmolApplet")+"0.jar";c&&alert("The web page URL was ignored. Continuing using "+this._jarFile+' in directory "'+this._jarPath+'"');void 0==a.controls||a.controls._onloadResetForms()};this._create(b,d);return this}; var g=a._Applet,d=a._Applet.prototype;g._get=function(b,d,k){k||(k=!1);d||(d={});a._addDefaultInfo(d,{color:"#FFFFFF",width:300,height:300,addSelectionOptions:!1,serverURL:"http://your.server.here/jsmol.php",defaultModel:"",script:null,src:null,readyFunction:null,use:"HTML5",jarPath:"java",jarFile:"JmolApplet0.jar",isSigned:!1,j2sPath:"j2s",coverImage:null,makeLiveImage:null,coverTitle:"",coverCommand:"",deferApplet:!1,deferUncover:!1,disableJ2SLoadMonitor:!1,disableInitialConsole:!0,debug:!1});a._debugAlert= d.debug;d.serverURL&&(a._serverUrl=d.serverURL);for(var j=!1,m=null,c=d.use.toUpperCase().split("#")[0].split(" "),e=0;ek.codePath.indexOf("://")){var e=j.location.href.split("#")[0].split("?")[0].split("/");e[e.length-1]=k.codePath;k.codePath=e.join("/")}k.archive=l;k.mayscript="true";k.java_arguments="-Xmx"+Math.round(d.memoryLimit||b._memoryLimit)+"m";k.permissions=b._isSigned?"all-permissions":"sandbox";k.documentLocation=j.location.href;k.documentBase=j.location.href.split("#")[0].split("?")[0];k.jarPath=d.jarPath;a._syncedApplets.length&&(k.synccallback="Jmol._mySyncCallback"); b._startupScript&&(k.script=b._startupScript);var e="\n",h;for(h in k)k[h]&&(e+=" \n");e=a.featureDetection.useIEObject||a.featureDetection.useHtml4Object?"":" type='application/x-java-applet'>")+e+"

\n"+ g._noJavaMsg+"

\n":"\n"+e+"
\n"+g._noJavaMsg+"
\n";b._deferApplet&&(b._javaCode=e,e="");e=a._getWrapper(b,!0)+e+a._getWrapper(b,!1)+(d.addSelectionOptions?a._getGrabberOptions(b):"");a._debugAlert&&alert(e);b._code=a._documentWrite(e)};d._newApplet=function(a){this._is2D||a.put("script",(a.get("script")|| "")+";set multipleBondSpacing 0.35;");this._viewerOptions=a;return new J.appletjs.Jmol(a)};d._addCoreFiles=function(){a._addCoreFile("jmol"+(a._debugCode?"debug":""),this._j2sPath,this.__Info.preloadCore);a._debugCode&&a._addCoreFile("jmoldebug",this._j2sPath,this.__Info.preloadCore);this._is2D||a._addExec([this,null,"J.export.JSExporter","load JSExporter"]);a._debugCode&&a._addExec([this,null,"J.appletjs.Jmol","load Jmol"])};d._create=function(b,d){a._setObject(this,b,d);var k={syncId:a._syncId, progressbar:"true",progresscolor:"blue",boxbgcolor:this._color||"black",boxfgcolor:"white",boxmessage:"Downloading JmolApplet ...",script:this._color?'background "'+this._color+'"':"",code:"JmolApplet.class"};a._setAppletParams(this._availableParams,k,d);var j;d.inlineModel?(j=d.inlineModel,j=j.replace(/\r|\n|\r\n/g,0<=j.indexOf("|")?"\\/n":"|").replace(/'/g,"'"),a._debugAlert&&alert("inline model:\n"+j)):j="";k.loadInline=j;k.appletReadyCallback="Jmol._readyCallback";a._syncedApplets.length&& (k.synccallback="Jmol._mySyncCallback");k.java_arguments="-Xmx"+Math.round(d.memoryLimit||this._memoryLimit)+"m";this._initialize(d.jarPath,d.jarFile);g._createApplet(this,d,k)};d._restoreState=function(b,d){System.out.println("\n\nasynchronous restore state for "+b+" "+d);var g=this,j=g._applet&&g._applet.viewer;switch(d){case "setOptions":return function(){g.__startAppletJS(g)};case "render":return function(){setTimeout(function(){j.refresh(2)},10)};default:switch(b){case "J.shape.Balls":case "J.shape.Sticks":case "J.shape.Frank":return null}if(j&& j.isScriptExecuting&&j.isScriptExecuting()){if(a._asyncCallbacks[b])return System.out.println("...ignored"),1;var m=j.getEvalContextAndHoldQueue(j.eval),c=m.pc-1;m.asyncID=b;a._asyncCallbacks[b]=function(a){m.pc=a;System.out.println("sc.asyncID="+m.asyncID+" sc.pc = "+m.pc);j.eval.resumeEval(m)};j.eval.pc=j.eval.pcEnd;System.out.println("setting resume for pc="+m.pc+" "+b+" to "+a._asyncCallbacks[b]+"//");return function(){System.out.println("resuming "+b+" "+a._asyncCallbacks[b]);a._asyncCallbacks[b](c)}}System.out.println(b+ "?????????????????????"+d);return function(){setTimeout(function(){j.refresh(2)},10)}}};d._notifyAudioEnded=function(a){this._applet.notifyAudioEnded(a)};d._readyCallback=function(b,d,g){if(g){a._setDestroy(this);this._ready=!0;b=this._readyScript;this._defaultModel?a._search(this,this._defaultModel,b?";"+b:""):b?this._script(b):this._src&&this._script('load "'+this._src+'"');this._showInfo(!0);this._showInfo(!1);a.Cache.setDragDrop(this,"appletdiv");this._readyFunction&&this._readyFunction(this); a._setReady(this);if((b=this._2dapplet)&&b._isEmbedded&&b._ready&&b.__Info.visible)this._show2d(!0),this._show2d(!1),this._show2d(!0);a._hideLoadingSpinner(this)}};d._showInfo=function(b){b&&this._2dapplet&&this._2dapplet._show(!1);a.$html(a.$(this,"infoheaderspan"),this._infoHeader);this._info&&a.$html(a.$(this,"infodiv"),this._info);if(!this._isInfoVisible!=!b){this._isInfoVisible=b;if(this._isJava){var d=b?2:"100%";a.$setSize(a.$(this,"appletdiv"),d,d)}a.$setVisible(a.$(this,"infotablediv"),b); a.$setVisible(a.$(this,"infoheaderdiv"),b);this._show(!b)}};d._show2d=function(a){this._2dapplet._show2d(a);this._2dapplet._isEmbedded&&(this._showInfo(!1),this._show(!a),this._2dapplet.__showContainer(!0,!0))};d._getSpinner=function(){return this.__Info.appletLoadingImage||this._j2sPath+"/img/JSmol_spinner.gif"};d._getAtomCorrelation=function(a,d){var g=this._evaluate("{*}.count");if(0!=g){this._loadMolData(a,"atommap = compare({1.1} {2.1} 'MAP' "+(d?"":"'H'")+"); zap 2.1",!0);for(var j=this._evaluate("atommap"), m=[],c=[],e=0;earguments.length&&(d=1);var g=this._savedOrientations[a];return!g||""==g?g.replace(/1\.0/,d):this._scriptWait(g)};d._resizeApplet=function(b){function d(b, g){var c=""+b;return 0==c.length?g?"":a._allowedJmolSize[2]:c.indexOf("%")==c.length-1?c:1>=(b=parseFloat(b))&&0a._allowedJmolSize[1]?a._allowedJmolSize[1]:b)+(g?g:"")}var g;"object"==typeof b&&null!=b?(g=b[0]||b.width,b=b[1]||b.height):g=b;g=[d(g,"px"),d(b,"px")];b=a._getElement(this,"appletinfotablediv");b.style.width=g[0];b.style.height=g[1];this._containerWidth=g[0];this._containerHeight= g[1];this._is2D&&a.repaint(this,!0)};d._search=function(b,d){a._search(this,b,d)};d._searchDatabase=function(b,d,g){if(this._2dapplet&&this._2dapplet._isEmbedded&&!a.$(this,"appletdiv:visible")[0])return this._2dapplet._searchDatabase(b,d,g);this._showInfo(!1);0<=b.indexOf("?")?a._getInfoFromDatabase(this,d,b.split("?")[0]):(g||(g=a._getScriptForDatabase(d)),b=d+b,this._currentView=null,this._searchQuery=b,this._loadFile(b,g,b))};d._loadFile=function(b,d,g){this._showInfo(!1);d||(d="");this._thisJmolModel= ""+Math.random();this._fileName=b;if(!this._scriptLoad(b,d)){var j=this;a._loadFileData(this,b,function(a){j.__loadModel(a,d,g)},function(){j.__loadModel(null)})}};d._scriptLoad=function(a,d){d||(d="");var g=this._isJava||!this._noscript;g&&this._script("zap;set echo middle center;echo Retrieving data...");if(!this._isSigned||null!=this._viewSet)return!1;g?this._script('load async "'+a+'";'+d):this._applet.openFile(a);this._checkDeferred("");return!0};d.__loadModel=function(b,d,g){null!=b&&(null!= this._viewSet&&(d||(d=""),d+=";if ({*}.molecule.max > 1 || {*}.modelindex.max > 0){ delete molecule > 1 or modelindex > 0;x = getProperty('extractModel',{*});load inline @x};"),!d&&this._noscript?this._applet.loadInlineString(b,"",!1):this._loadMolData(b,d,!1),null!=this._viewSet&&a.View.updateView(this,{chemID:g,data:b}))};d._loadMolData=function(a,d,g){d||(d="");g=g?"append":"model";this._applet.scriptWait('load DATA "'+g+'"'+a+'\nEND "'+g+'" ;'+d)};d._loadModelFromView=function(b){this._currentView= b;var d=b.Jmol;null!=d.data?this.__loadModel(d.data,null,b.info.chemID):null!=b.info.chemID?a._searchMol(this,b.info.chemID,null,!1):(d=b.JME)&&d.applet._show2d(!1,this)};d._reset=function(){this._scriptWait("zap",!0)};d._updateView=function(){null!=this._viewSet&&this._applet&&(chemID=""+this._getPropertyAsJavaObject("variableInfo","script('show chemical inchiKey')"),chemID=36>chemID.length?null:chemID.substring(36).split("\n")[0],a.View.updateView(this,{chemID:chemID,data:""+this._getPropertyAsJavaObject("evaluate", "extractModel","{visible}")}))};d._atomPickedCallback=function(b,d){if(!(0>d)){var g=[d+1];a.View.updateAtomPick(this,g);this._updateAtomPick(g)}};d._updateAtomPick=function(a){this._script(0==a.length?"select none":"select on visible and (@"+a.join(",@")+")")};d._isDeferred=function(){return!this._canvas&&this._cover&&this._isCovered&&this._deferApplet};d._checkDeferred=function(a){return this._isDeferred()?(this._coverScript=a,this._cover(!1),!0):!1};d._cover=function(b){b||!this._deferApplet?this._displayCoverImage(b): (b=this._coverScript?this._coverScript:"",this._coverScript="",this._deferUncover&&(b+=";refresh;javascript "+this._id+"._displayCoverImage(false)"),this._script(b,!0),this._deferUncover&&"activate 3D model"==this._coverTitle&&(a._getElement(this,"coverimage").title="3D model is loading..."),this._isJava||this._newCanvas(!1),this._defaultModel&&a._search(this,this._defaultModel),this._showInfo(!1),this._deferUncover||this._displayCoverImage(!1),this._isJava&&a.$html(a.$(this,"appletdiv"),this._javaCode), this._init&&this._init())};d._displayCoverImage=function(b){this._coverImage&&this._isCovered!=b&&(this._isCovered=b,a._getElement(this,"coverdiv").style.display=b?"block":"none")};d._getSmiles=function(){return this._evaluate("{visible}.find('SMILES')")};d._getMol=function(){return this._evaluate("getProperty('ExtractModel',{visible})")};d._getMol2D=function(){return this._evaluate("script('select visible;show chemical sdf')")};a.jmolSmiles=function(a){return a._getSmiles()}})(Jmol,document); (function(a){var j=a.controls={_hasResetForms:!1,_scripts:[""],_checkboxMasters:{},_checkboxItems:{},_actions:{},_buttonCount:0,_checkboxCount:0,_radioGroupCount:0,_radioCount:0,_linkCount:0,_cmdCount:0,_menuCount:0,_previousOnloadHandler:null,_control:null,_element:null,_appletCssClass:null,_appletCssText:"",_buttonCssClass:null,_buttonCssText:"",_checkboxCssClass:null,_checkboxCssText:"",_radioCssClass:null,_radioCssText:"",_linkCssClass:null,_linkCssText:"",_menuCssClass:null,_menuCssText:""}; j._addScript=function(a,d){var b=j._scripts.length;j._scripts[b]=[a,d];return b};j._getIdForControl=function(a,d){return"string"==typeof a?a:!d||!a._canScript||a._canScript(d)?a._id:null};j._radio=function(a,d,b,f,k,l,m,c){var e=j._getIdForControl(a,d);if(null==e)return null;++j._radioCount;void 0!=l&&null!=l||(l="jmolRadioGroup"+(j._radioGroupCount-1));if(!d)return"";void 0!=m&&null!=m||(m="jmolRadio"+(j._radioCount-1));void 0!=b&&null!=b||(b=d.substring(0,32));k||(k="");a="";j._actions[m]= j._addScript(e,d);d='";0<=b.toLowerCase().indexOf("")&&(d+=a,a="");return d+('"+a+k)};j._scriptExecute=function(g,d){var b=a._applets[d[0]],f=d[1];if("object"==typeof f)f[0](g,f, b);else"function"==typeof f?f(b):a.script(b,f)};j.__checkScript=function(a,d){var b=0<=d.value.indexOf("JSCONSOLE ")||""===a._scriptCheck(d.value);d.style.color=b?"black":"red";return b};j.__getCmd=function(a,d){if(d._cmds&&d._cmds.length){var b=d._cmds[d._cmdpt=(d._cmdpt+d._cmds.length+a)%d._cmds.length];setTimeout(function(){d.value=b},10);d._cmdadd=1;d._cmddir=a}};j._commandKeyPress=function(g,d,b){g=13==g?13:window.event?window.event.keyCode:g?g.keyCode||g.which:0;var f=document.getElementById(d), k=a._applets[b];switch(g){case 13:return d=f.value,j._scriptExecute(f,[b,d]),f._cmds||(f._cmds=[],f._cmddir=0,f._cmdpt=-1,f._cmdadd=0),d&&0==f._cmdadd?(++f._cmdpt,f._cmds.splice(f._cmdpt,0,d),f._cmdadd=0,f._cmddir=0):f._cmdadd=0,f.value="",!1;case 27:return setTimeout(function(){f.value=""},20),!1;case 38:j.__getCmd(-1,f);break;case 40:j.__getCmd(1,f);break;default:f._cmdadd=0}setTimeout(function(){j.__checkScript(k,f)},20);return!0};j._click=function(a,d){j._element=a;1==arguments.length&&(d=j._actions[a.id]); j._scriptExecute(a,j._scripts[d])};j._menuSelected=function(a){var d=a.value;if(void 0!=d)j._scriptExecute(a,j._scripts[d]);else{d=a.length;if("number"==typeof d)for(var b=0;b";a._debugAlert&&alert(d);return a._documentWrite(d)};j._getCheckbox=function(g,d,b,f,k,l,m){var c=j._getIdForControl(g,d);null!=c&&(c=j._getIdForControl(g,b));if(null==c)return"";void 0!=l&&null!=l||(l="jmolCheckbox"+j._checkboxCount);++j._checkboxCount;if(void 0==d||null==d||void 0==b||null==b)alert("jmolCheckbox requires two scripts");else if(void 0==f||null==f)alert("jmolCheckbox requires a label");else return j._actions[l]=[j._addScript(c,d),j._addScript(c,b)],g="", k='",0<=f.toLowerCase().indexOf("")&&(k+=g,g=""),k+='"+g,a._debugAlert&&alert(k),a._documentWrite(k)};j._getCommandInput=function(g,d,b,f,k,l){g=j._getIdForControl(g,"x");if(null==g)return""; void 0!=f&&null!=f||(f="jmolCmd"+j._cmdCount);void 0!=d&&null!=d||(d="Execute");void 0!=b&&!isNaN(b)||(b=60);void 0!=l||(l="help");++j._cmdCount;d='";a._debugAlert&&alert(d);return a._documentWrite(d)}; j._getLink=function(g,d,b,f,k){g=j._getIdForControl(g,d);if(null==g)return"";void 0!=f&&null!=f||(f="jmolLink"+j._linkCount);void 0!=b&&null!=b||(b=d.substring(0,32));++j._linkCount;d=j._addScript(g,d);b='"+b+"";a._debugAlert&&alert(b);return a._documentWrite(b)}; j._getMenu=function(g,d,b,f,k){var l=j._getIdForControl(g,null);void 0!=f&&null!=f||(f="jmolMenu"+j._menuCount);++j._menuCount;l=typeof d;if(null!=l&&"object"==l&&d.length){var m=d.length;"number"!=typeof b||1==b?b=null:0>b&&(b=m);b='";a._debugAlert&&alert(b);return a._documentWrite(b)}};j._getRadio=function(g,d,b,f,k,l,m,c){0==j._radioGroupCount&&++j._radioGroupCount;l||(l="jmolRadioGroup"+(j._radioGroupCount-1));g=j._radio(g,d,b,f,k,l,m?m:l+"_"+j._radioCount,c?c:0);if(null== g)return"";a._debugAlert&&alert(g);return a._documentWrite(g)};j._getRadioGroup=function(g,d,b,f,k,l){var m=typeof d;if("object"!=m||null==m||!d.length)alert("invalid arrayOfRadioButtons");else{void 0!=b&&null!=b||(b="  ");var c=d.length;++j._radioGroupCount;f||(f="jmolRadioGroup"+(j._radioGroupCount-1));for(var e="",h=0;h";a._debugAlert&&alert(e);return a._documentWrite(e)}}})(Jmol); (function(a){var j=function(a){a="&"+a+"=";return decodeURI(("&"+document.location.search.substring(1)+a).split(a)[1].split("&")[0])};a._j2sPath=j("_J2S");a._jarFile=j("_JAR");a._use=j("_USE");a.getVersion=function(){return a._jmolInfo.version};a.getApplet=function(g,d,b){return a._Applet._get(g,d,b)};a.getJMEApplet=function(g,d,b,f){return a._JMEApplet._get(g,d,b,f)};a.getJSVApplet=function(g,d,b){return a._JSVApplet._get(g,d,b)};a.setCallback=function(a,d,b){a._setCallback(d,b)};a.loadFile=function(a, d,b){a._loadFile(d,b)};a.script=function(a,d){a._checkDeferred(d)||a._script(d)};a.scriptCheck=function(a,d){return a&&a._scriptCheck&&a._ready&&a._scriptCheck(d)};a.scriptWait=function(a,d){return a._scriptWait(d)};a.scriptEcho=function(a,d){return a._scriptEcho(d)};a.scriptMessage=function(a,d){return a._scriptMessage(d)};a.scriptWaitOutput=function(a,d){return a._scriptWait(d)};a.scriptWaitAsArray=function(a,d){return a._scriptWaitAsArray(d)};a.search=function(a,d,b){a._search(d,b)};a.evaluateVar= function(a,d){return a._evaluate(d)};a.evaluate=function(a,d){return a._evaluateDEPRECATED(d)};a.getAppletHtml=function(g,d){if(d){var b=a._document;a._document=null;g=a.getApplet(g,d);a._document=b}return g._code};a.getPropertyAsArray=function(a,d,b){return a._getPropertyAsArray(d,b)};a.getPropertyAsJavaObject=function(a,d,b){return a._getPropertyAsJavaObject(d,b)};a.getPropertyAsJSON=function(a,d,b){return a._getPropertyAsJSON(d,b)};a.getPropertyAsString=function(a,d,b){return a._getPropertyAsString(d, b)};a.getStatus=function(a,d){return a._getStatus(d)};a.resizeApplet=function(a,d){return a._resizeApplet(d)};a.restoreOrientation=function(a,d){return a._restoreOrientation(d)};a.restoreOrientationDelayed=function(a,d,b){return a._restoreOrientationDelayed(d,b)};a.saveOrientation=function(a,d){return a._saveOrientation(d)};a.say=function(a){alert(a)};a.clearConsole=function(a){a._clearConsole()};a.getInfo=function(a){return a._info};a.setInfo=function(a,d,b){a._info=d;2")};a.jmolButton=function(g,d,b,f,j){return a.controls._getButton(g,d,b,f,j)};a.jmolCheckbox=function(g,d,b,f,j,l,m){return a.controls._getCheckbox(g,d,b,f,j,l,m)};a.jmolCommandInput=function(g,d,b,f,j,l){return a.controls._getCommandInput(g,d,b,f,j,l)};a.jmolHtml=function(g){return a._documentWrite(g)};a.jmolLink=function(g,d,b,f,j){return a.controls._getLink(g,d,b,f,j)}; a.jmolMenu=function(g,d,b,f,j){return a.controls._getMenu(g,d,b,f,j)};a.jmolRadio=function(g,d,b,f,j,l,m,c){return a.controls._getRadio(g,d,b,f,j,l,m,c)};a.jmolRadioGroup=function(g,d,b,f,j,l){return a.controls._getRadioGroup(g,d,b,f,j,l)};a.setCheckboxGroup=function(g,d){a.controls._cbSetCheckboxGroup(g,d,arguments)};a.setDocument=function(g){a._document=g};a.setXHTML=function(g){a._isXHTML=!0;a._XhtmlElement=null;a._XhtmlAppendChild=!1;g&&(a._XhtmlElement=document.getElementById(g),a._XhtmlAppendChild= !0)};a.setAppletCss=function(g,d){null!=g&&(a._appletCssClass=g);a._appletCssText=d?d+" ":g?'class="'+g+'" ':""};a.setButtonCss=function(g,d){null!=g&&(a.controls._buttonCssClass=g);a.controls._buttonCssText=d?d+" ":g?'class="'+g+'" ':""};a.setCheckboxCss=function(g,d){null!=g&&(a.controls._checkboxCssClass=g);a.controls._checkboxCssText=d?d+" ":g?'class="'+g+'" ':""};a.setRadioCss=function(g,d){null!=g&&(a.controls._radioCssClass=g);a.controls._radioCssText=d?d+" ":g?'class="'+g+'" ':""};a.setLinkCss= function(g,d){null!=g&&(a.controls._linkCssClass=g);a.controls._linkCssText=d?d+" ":g?'class="'+g+'" ':""};a.setMenuCss=function(g,d){null!=g&&(a.controls._menuCssClass=g);a.controls._menuCssText=d?d+" ":g?'class="'+g+'" ':""};a.setAppletSync=function(g,d,b){a._syncedApplets=g;a._syncedCommands=d;a._syncedReady={};a._isJmolJSVSync=b};a.setGrabberOptions=function(g){a._grabberOptions=g};a.setAppletHtml=function(g,d){g._code&&(a.$html(d,g._code),g._init&&!g._deferApplet&&g._init())};a.coverApplet=function(a, d){a._cover&&a._cover(d)};a.setFileCaching=function(g,d){g?g._cacheFiles=d:a.fileCache=d?{}:null};a.resetView=function(g,d){a.View.resetView(g,d)};a.updateView=function(a,d,b){a._updateView(d,b)};a.getChemicalInfo=function(g,d,b){d||(d="name");"string"!=typeof g&&(g=g._getSmiles());return a._getNCIInfo(g,d,b)};a.saveImage=function(g,d,b){d=(d||"png").toLowerCase();b||(b=g.id+"."+d.toLowerCase());0>b.indexOf(".")&&(b+="."+d);switch(g._viewType){case "Jmol":return g._script('write PNGJ "'+b+'"');case "JSV":if("PDF"== d)return g._script("write PDF");break;case "JME":return g._script("print")}a._saveFile(b,g._canvas.toDataURL("image/png"))}})(Jmol); LoadClazz=function(){TypeError.prototype.printStackTrace=ReferenceError.prototype.printStackTrace=function(){console.log(this)};window["j2s.clazzloaded"]||(window["j2s.clazzloaded"]=!1);window["j2s.clazzloaded"]||(window["j2s.clazzloaded"]=!0,window["j2s.object.native"]=!0,Clazz={_isQuiet:!1,_debugging:!1},function(a,j){try{a._debugging=0<=document.location.href.indexOf("j2sdebug")}catch(g){}var d=["j2s.clazzloaded","j2s.object.native"];a.setGlobal=function(a,b){d.push(a);window[a]=b};a.getGlobals= function(){return d.sort().join("\n")};a.setConsoleDiv=function(a){window["j2s.lib"]&&(window["j2s.lib"].console=a)};var b=null;a._startProfiling=function(a){b=a&&self.JSON?{}:null};NullObject=function(){};a._supportsNativeObject=window["j2s.object.native"];a._supportsNativeObject?(a._O=function(){},a._O.__CLASS_NAME__="Object",a._O.getClass=function(){return a._O}):a._O=Object;a.Console={};a.dateToString=Date.prototype.toString;a._hashCode=0;var f=a._O.prototype;f.equals=function(a){return this== a};f.hashCode=function(){return this._$hashcode||(this._$hashcode=++a._hashCode)};f.getClass=function(){return a.getClass(this)};f.clone=function(){return a.clone(this)};a.clone=function(a){var b=a instanceof Array?Array(a.length):new a.constructor,c;for(c in a)b[c]=a[c];return b};f.finalize=function(){};f.notify=function(){};f.notifyAll=function(){};f.wait=function(){};f.to$tring=Object.prototype.toString;f.toString=function(){return this.__CLASS_NAME__?"["+this.__CLASS_NAME__+" object]":this.to$tring.apply(this, arguments)};a._extendedObjectMethods="equals hashCode getClass clone finalize notify notifyAll wait to$tring toString".split(" ");a.extendJO=function(b,c){c&&(b.__CLASS_NAME__=b.prototype.__CLASS_NAME__=c,a._setDeclared(c,b));if(a._supportsNativeObject)for(var d=0;de)return"["==d.charAt(0)?a.extractClassName(d):d.replace(/[^a-zA-Z0-9]/g,"");var e=e+8,f=d.indexOf("(",e);if(0>f)break;d=d.substring(e,f);if(0<=d.indexOf("Array"))return"Array";d= d.replace(/^\s+/,"").replace(/\s+$/,"");return"anonymous"==d||""==d?"Function":d;case "object":if(b.__CLASS_NAME__)return b.__CLASS_NAME__;if(!b.constructor)break;if(!b.constructor.__CLASS_NAME__){if(b instanceof Number)return"Number";if(b instanceof Boolean)return"Boolean";if(b instanceof Array||b.BYTES_PER_ELEMENT)return"Array";d=b.toString();if("["==d.charAt(0))return a.extractClassName(d)}return a.getClassName(b.constructor,!0)}return"Object"};a.getClass=function(b){if(!b)return a._O;if("function"== typeof b)return b;if(b instanceof a.CastedNull)b=b.clazzName;else switch(typeof b){case "string":return String;case "object":if(!b.__CLASS_NAME__)return b.constructor||a._O;b=b.__CLASS_NAME__;break;default:return b.constructor}return a.evalType(b,!0)};var k=function(b,c){for(var d=0;dd;){if(e.implementz)for(var f=e.implementz,g=0;gb.indexOf(".")&&(b="java.lang."+b);a.allClasses[b]=c};a._getDeclared=function(b){0>b.indexOf(".")&&(b="java.lang."+b);return a.allClasses[b]};a.instanceOf=function(b,c){if(null==b)return!1;"string"==typeof c&&(c=a._getDeclared(c));return!c?!1:c==String?"string"==typeof b:null!=b&&c&&(b==c||b instanceof c||0<=a.getInheritedLevel(a.getClassName(b),c))};a.exceptionOf=function(b,c){if(b.__CLASS_NAME__){if("string"== typeof c){var d=a._getDeclared(c);if(!d)return!1;c=d}return a.instanceOf(b,c)}b.getMessage||(b.getMessage=function(){return""+b+(b.stack?"\n"+b.stack:"")});b.printStackTrace||(b.printStackTrace=function(){System.err.println(""+b)});if(c==Error){if(0>(""+b).indexOf("Error"))return!1;System.out.println(a.getStackTrace());return!0}return c==Exception||c==Throwable||c==NullPointerException&&e(b)};a.superCall=function(b,c,d,e){var f=null,g=-1,h=b[d];if(h)if(h.claxxOwner)h.claxxOwner!==c&&(f=h);else if(!h.stacks&& (!h.lastClaxxRef||!h.lastClaxxRef.prototype[d]||!h.lastClaxxRef.prototype[d].stacks))f=h;else{var j=h.stacks;j||(j=h.lastClaxxRef.prototype[d].stacks);for(g=j.length;0<=--g;)if(c===j[g]){f=0a;d&&(a=-a);try{for(var e=0;e",b=b+(e+" "+(c.exName?(c.claxxOwner?c.claxxOwner.__CLASS_NAME__+".":"")+c.exName+f.replace(/function /,""):f)+"\n");if(c==c.caller){b+="\n";break}if(d)for(var g=c.arguments,h=0;hu.indexOf(E)&&(u+=E+"\n");b[E]||(b[E]=0);b[E]++}if(fx.lastParams==f.typeString&&fx.lastClaxxRef===e){if(f.hasCastedNull){e= [];for(A=0;Ap[r]){sa=!1;break}sa&&(p[m.length]=F,B.push(p))}if(0==B.length)l=null;else{n=B[0];for(F=1;FT(l,d)&&l.push(d);k&&(k.claxxOwner===d?(j[k.funParams]=k,k.claxxOwner=null,k.funParams=null):k.claxxOwner||(j["\\unknown"]=k));f.exClazz=d;j[g]=f;return j};duplicatedMethods={};var S=function(b,c,d){var e=b.prototype[c];if(e&&(e.claxxOwner|| e.claxxReference)===b)key=b.__CLASS_NAME__+"."+c+d,(b=duplicatedMethods[key])?(c="Warning! Duplicate method found for "+key,System.out.println(c),a.alert(c),duplicatedMethods[key]=b+1):duplicatedMethods[key]=1};a.showDuplicates=function(a){var b="",c=duplicatedMethods,d=0,e;for(e in c)1c.length)break;if(c.indexOf(g)==c.length-g.length){c=c.substring(0,c.length-g.length+1);break}}else c=a._Loader.getClasspathFor(d,!0);else(e=a.binaryFolders)&&e.length&&(c=e[0]);c||(c="j2s/");c=c.replace(/\\/g,"/");e=c.length;e=c.charAt(e-1);"/"!=e&&(c+="/");this.base?d=c+b:(e=d.lastIndexOf("."),d=-1==e||this.base? c+b:c+d.substring(0,e).replace(/\./g,"/")+"/"+b)}c=null;try{if(0>d.indexOf(":/")){var k=document.location.href.split("?")[0].split("/");k[k.length-1]=d;d=k.join("/")}c=new java.net.URL(d)}catch(l){}k=null==c?null:j._getFileData(d.toString());if(!k||"error"==k||0==k.indexOf("[Exception"))return null;k=(new java.lang.String(k)).getBytes();k=new java.io.BufferedInputStream(new java.io.ByteArrayInputStream(k));k.url=c;return k},defineMethod:function(b,c,d){a.defineMethod(this,b,c,d)},defineStaticMethod:function(b, c,d){a.defineMethod(this,b,c,d);this[b]=this.prototype[b]},makeConstructor:function(b,c){a.makeConstructor(this,b,c)}};var Y=[];a.pu$h=function(a){a||(a=self.c$);a&&Y.push(a)};a.p0p=function(){return Y.pop()};a.decorateAsClass=function(b,c,d,e,f,g){var h=null;c&&(h=c.__PKG_NAME__,h||(h=c.__CLASS_NAME__));var j=(h?h+".":"")+d;a._Loader._classPending[j]&&(delete a._Loader._classPending[j],a._Loader._classCountOK++,a._Loader._classCountPending--);a._Loader&&a._Loader._checkLoad&&System.out.println("decorating class "+ h+"."+d);(h=a.unloadedClasses[j])&&(b=h);Z(b,c,d);g?a.inheritClass(b,e,g):e&&a.inheritClass(b,e);f&&a.implementOf(b,f);return b};var Z=function(b,c,d,e){var f;c?c.__PKG_NAME__?(f=c.__PKG_NAME__+"."+d,c[d]=b,c===java.lang&&a.setGlobal(d,b)):(f=c.__CLASS_NAME__+"."+d,c[d]=b):(f=d,a.setGlobal(d,b));a.extendJO(b,f);c=a.innerFunctionNames;for(d=0;da?Math.ceil(a):Math.floor(a)};a.floatToByte=a.floatToShort=a.floatToLong=a.floatToInt; a.doubleToByte=a.doubleToShort=a.doubleToLong=a.doubleToInt=a.floatToInt;a.floatToChar=function(a){return String.fromCharCode(0>a?Math.ceil(a):Math.floor(a))};a.doubleToChar=a.floatToChar;var aa=function(a,b){a||(a=0);if("object"==typeof a)var c=a;else for(var c=Array(a),d=0;d>3;c._fake=!0;return c},P=function(a,b){a||(a=0);b||(b=this.length);if(this._fake){var c=new this.constructor(b-a);System.arraycopy(this,a,c,0,b-a);return c}return new this.constructor(this.buffer.slice(a* this.BYTES_PER_ELEMENT,b*this.BYTES_PER_ELEMENT))};!0==(a.haveInt32=!!(self.Int32Array&&self.Int32Array!=Array))?Int32Array.prototype.sort||(Int32Array.prototype.sort=Array.prototype.sort):(Int32Array=function(a){return aa(a,32)},Int32Array.prototype.sort=Array.prototype.sort,Int32Array.prototype.toString=function(){return"[object Int32Array]"});Int32Array.prototype.slice||(Int32Array.prototype.slice=function(){return P.apply(this,arguments)});Int32Array.prototype.clone=function(){var a=this.slice(); a.BYTES_PER_ELEMENT=4;return a};!0==(a.haveFloat64=!!(self.Float64Array&&self.Float64Array!=Array))?Float64Array.prototype.sort||(Float64Array.prototype.sort=Array.prototype.sort):(Float64Array=function(a){return aa(a,64)},Float64Array.prototype.sort=Array.prototype.sort,Float64Array.prototype.toString=function(){return"[object Float64Array]"});Float64Array.prototype.slice||(Float64Array.prototype.slice=function(){return P.apply(this,arguments)});Float64Array.prototype.clone=function(){return this.slice()}; a.newArray=function(a,b,c,d){if(-1!=a||2==arguments.length)return G(arguments,0);a=b.slice(c,d);a.BYTES_PER_ELEMENT=b.BYTES_PER_ELEMENT;return a};var G=function(a,b){var c=a[0];"string"==typeof c&&(c=c.charCodeAt(0));var d=a.length-1,e=a[d];if(1c&&(c=e);switch(b){case 8:return d=new Int8Array(c),d.BYTES_PER_ELEMENT=1,d;case 32:return d=new Int32Array(c),d.BYTES_PER_ELEMENT=4,d;case 64:return d=new Float64Array(c), d.BYTES_PER_ELEMENT=8,d;default:d=0>c?e:Array(c);d.BYTES_PER_ELEMENT=0;if(0d)for(;0<=--e;)c[d++]=a[b++];else{d+=e;for(b+=e;0<=--e;)a[--d]=a[--b]}},currentTimeMillis:function(){return(new Date).getTime()},gc:function(){},getProperties:function(){return System.props},getProperty:function(a,b){if(System.props)return System.props.getProperty(a,b);var c=System.$props[a];if("undefined"!=typeof c)return c;if(0=n.STATUS_LOAD_COMPLETE))h?window.setTimeout(f,25):f()}else{var k=b.getClasspathFor(c);j=e[k];if(!j)for(h=w.length;0<=--h;)if(w[h].path==k||w[h].name==c){j=!0;break}if(j){if(f&&(j=D(c)))if(j.onLoaded){if(f!=j.onLoaded){var l=j.onLoaded,m=f;j.onLoaded=function(){l();m()}}}else j.onLoaded=f}else{j=a.unloadedClasses[c]&&D(c)||new n;j.name=c;j.path=k;j.isPackage=k.lastIndexOf("package.js")== k.length-10;fa(k,c,j);j.onLoaded=f;j.status=n.STATUS_KNOWN;c=!1;for(h=w.length;0<=--h;)if(w[h].status!=n.STATUS_LOAD_COMPLETE){c=!0;break}if(j.isPackage){for(h=w.length;0<=--h&&!w[h].isPackage;)w[h+1]=w[h];w[++h]=j}else c&&w.push(j);if(!c){var t=!1;f&&(t=K,K=!0);g&&(f=null);ba(d,j,!0);G(j,j.path,j.requiredBy,!1,f?function(){K=t;f()}:null)}}}};b.loadPackage=function(a,c){c||(c=null);window[a+".registered"]=!1;b.loadPackageClasspath(a,b.J2SLibBase||(b.J2SLibBase=b.getJ2SLibBase()||"j2s/"),!0,c)};b.jarClasspath= function(a,b){b instanceof Array||(b=[b]);v(b);j._debugCore&&(a=a.replace(/\.z\./,"."));for(var c=b.length;0<=--c;)C["#"+b[c]]=a;C["$"+a]=b};b.registerPackages=function(c,d){for(var e=b.getClasspathFor(c+".*",!0),f=0;f>");h=e[d];e[d]=!0;ka(w,d);ga=!0;ha=!1;b._checkLoad&&System.out.println("\t"+d+(g?"\n -- required by "+g:"")+" ajax="+ga+" async="+ha);g=d;a._debugging&&(d=d.replace(/\.z\.js/,".js"));h||System.out.println("loadScript "+d);b.onScriptLoading(d);if(ga&&!ha){var l=j._getFileData(d);try{M(d,g,l,h)}catch(m){alert(m+" loading file "+d+" "+c.name+" "+a.getStackTrace())}k&&k()}else c= {dataType:"script",async:!0,type:"GET",url:d,success:L(d,!1,k),error:L(d,!0,k)},f++,h?setTimeout(c.success,0):j.$ajax(c)},L=function(c,d,e){a.getStackTrace();return function(){m&&this.timeoutHandle&&(window.clearTimeout(this.timeoutHandle),this.timeoutHandle=null);0q;q++)for(;k=j[q](n.STATUS_CONTENT_LOADED);)1==q&&m===k&&(k.status=n.STATUS_LOAD_COMPLETE),updateNode(k),m=k;for(;!(O=[],!P(d,c)););for(q=0;2>q;q++)for(m=null;(k=j[q](n.STATUS_DECLARED))&&m!==k;)updateNode(m=k);m=[];for(q=0;2>q;q++)for(;k=j[q](n.STATUS_DECLARED);)m.push(k), k.status=n.STATUS_LOAD_COMPLETE;if(m.length){for(q=0;q= n.STATUS_DECLARED););if(0<=f){if(b._checkLoad){var g;System.out.println("cycle found loading "+c+" for "+a)}for(;fg;g++){j=h[g];for(f=j.length;0<=--f;)if(j[f].status== n.STATUS_DECLARED&&P(j[f],c))return!0}d.length=e;return!1};b._classCountPending=0;b._classCountOK=0;b._classPending={};b.showPending=function(){var a=[],c;for(c in b._classPending){var d=D(c);d?(a.push(d),System.out.println(R("","",d,"",0))):alert("No node for "+c)}return a};var R=function(a,b,c,d,e){b+="--"+c.name;a+=b+"\n";if(5=n.STATUS_LOAD_COMPLETE)Q(a);else{var c=!0;if(a.musts.length&&a.declaration)for(var d=a.musts.length,e=d;0<=--e;){var f=a.musts[e];f.requiredBy=a;if(f.statusn.STATUS_KNOWN&&!a.declaration||S(a.musts,n.STATUS_LOAD_COMPLETE)&&S(a.optionals,n.STATUS_LOAD_COMPLETE)){c=n.STATUS_LOAD_COMPLETE;if(!T(a, c))return!1;if(a.declaration&&a.declaration.clazzList){h=0;j=a.declaration.clazzList;for(k=j.length;hc.indexOf("Opera")&&document.all?0==f?d:g:0>c.indexOf("Gecko")?f==e.offsetHeight&&f==e.scrollHeight?d:g:d;R!=c&&(R=c,v.style.bottom=R+4+"px");b&&N()}};var da=function(a){if(a)for(var b=a.childNodes.length;0<=--b;){var c=a.childNodes[b];if(c){c.childNodes&&c.childNodes.length&&da(c);try{a.removeChild(c)}catch(d){}}}},ea=function(a){L&& a==x.DEFAULT_OPACITY&&(window.clearTimeout(L),L=null);M=a;navigator.userAgent.toLowerCase();v.style.filter="Alpha(Opacity="+a+")";v.style.opacity=a/100},ra=function(){x.hideMonitor()},ca=!1,N=function(){"none"!=v.style.display&&(M==x.DEFAULT_OPACITY?(L=window.setTimeout(function(){N()},750),M-=5):0<=M-10?(ea(M-10),L=window.setTimeout(function(){N()},40)):v.style.display="none")},p=a.Console,y=System;p.maxTotalLines=1E4;p.setMaxTotalLines=function(a){p.maxTotalLines=0p.maxTotalLines){for(var d= 0;dc.childNodes.length)h= document.createElement("DIV"),c.appendChild(h),h.style.whiteSpace="nowrap",p.linesCount++;else try{h=c.childNodes[c.childNodes.length-1]}catch(j){h=document.createElement("DIV"),c.appendChild(h),h.style.whiteSpace="nowrap",p.linesCount++}var k=document.createElement("SPAN");h.appendChild(k);k.style.whiteSpace="nowrap";b&&(k.style.color=b);h=f[d];0==h.length&&(h=z);k.appendChild(document.createTextNode(h));p.pinning||(c.scrollTop+=100);p.metLineBreak=d!=g||e}d=c.parentNode.className;!p.pinning&&(d&& -1!=d.indexOf("composite"))&&(c.parentNode.scrollTop=c.parentNode.scrollHeight);p.lastOutputTime=(new Date).getTime()};p.clear=function(){try{p.metLineBreak=!0;var a=window["j2s.lib"],b=a&&a.console;if(b&&(b=document.getElementById(b))){for(var c=b.childNodes,d=c.length;0<=--d;)b.removeChild(c[d]);p.linesCount=0}}catch(e){}};a.alert=function(a){p.consoleOutput(a+"\r\n");j.clazzAlert(a)};y.out.print=function(a){p.consoleOutput(a)};y.out.println=function(a){p.consoleOutput("undefined"==typeof a?"\r\n": null==a?"null\r\n":a+"\r\n")};y.out.write=function(a,b,c){y.out.print(String.instantialize(a).substring(b,b+c))};y.err.__CLASS_NAME__="java.io.PrintStream";y.err.print=function(a){p.consoleOutput(a,"red")};y.err.println=function(a){p.consoleOutput("undefined"==typeof a?"\r\n":null==a?"null\r\n":a+"\r\n","red")};y.err.write=function(a,b,c){y.err.print(String.instantialize(a).substring(b,b+c))}}(Clazz,Jmol))}; /* Jmol2.js (JSmol version) author: Bob Hanson hansonr@stolaf.edu 5/24/2013 12:06:25 PM Script replacement for legacy Jmol.js that uses JSmol instead. Can be used to turn most legacy Jmol.js-based sites to JSmol. BH 1/23/2018 11:09:40 AM adding jmolScript(..."all") BH 1/16/2014 10:33:46 PM adding serverURL indication, more notes BH 1/13/2014 11:14:12 AM incorrect default for missing jmolInitialize() (should be ".") BH 1/8/2014 5:56:15 AM simplified instructions; removed option for self.Info BH 11/12/2013 6:34:22 AM adds jmolAppletInline() BH 9/23/2013 10:07:16 PM adds set of loadInline functions BH 9/19/2013 7:09:41 AM fixed jmolSetTarget() to accept "0" as a suffix; use of undefined --> null Summary: You should not have to change any of your HTML pages. You are going to replace Jmol.js, wherever that is, with this file. You are going to replace all your JAR file with the ones in this distribution. You are going to add about 1000 files in the jsmol/j2s directory to your website. Don't worry; only a few will be called. But you won't know which ones. You will be able to switch from HTML5 to JAVA using ?_USE=SIGNED in the URL Procedure: 1a) If you want to use HTML5, copy all jsmol/j2s/* files into a j2s subdirectory in the directory that contains Jmol.js and your old Jmol jar files. 1b) If you are not using HTML5, change the "use" parameter below from "HTML5" to "JAVA" and save this file. Copy all the jsmol/java/* files into the directory containing your current JAR files. This adds four JNLP files as well and will replace all your JAR files. 2) Rename your current Jmol.js file Jmol_old.js in case you want to undo this. 3) Concatenate JSmol.min.js if you are not using jQuery (or JSmol.min.nojq.js if you are) with this file to form a new file (Jmol.min.js first, then Jmol2.js) and replace your current Jmol.js with it. Note that if you are using your own version of jQuery, it must be version 1.9 or higher, and note that 2.0 or higher will not work with MSIE used locally but accessing remote resources. See http://bugs.jquery.com/ticket/14876 4) Try your page and see how it goes. You may still have some problems, because not all of the methods in the original Jmol.js are included here. Let me know if that's the case. Note that if you are using Jmol.setDocument(0) along with jmolApplet() and then placing the JSmol HTML code into your document yourself, then you may need to follow that jQuery .html() or .innerHTML = call with jmolApplet0._cover(false) in order to start the applet. Also, note that jmolApplet() now returns the actual object, not a string, so if you use that function, then you must use jmolApplet(...)._code to get the actual HTML code for the applet. For example: document.getElementById("myDiv").innerHTML = jmolApplet([width,height], readyScript, 1)._code not document.getElementById("myDiv").innerHTML = jmolApplet([width,height], readyScript, 1) If you wish to change the directories your j2s or JAR files and override the default settings (old JAR file location; j2s directory in the directory of those JAR files) and thus override your current settings in your HTML files, then you can to that three ways: a) You can change the parameters below to override what your pages already use by uncommenting one or the other of the jarPath and j2sPath definitions. This will override jmolInitialize in ALL your HTML files. b) You can change your jmolInitialization call in an individual HTML file. This sets both the JAR path and the j2s path (as [jarPath]/j2s) together. c) You can add lines to an individual HTML file along the lines of: Jmol.Info.jarPath = "../../Jmol" Jmol.Info.j2sPath = "../../JSmol" or whatever. This will override jmolInitialize in that specific HTML file only. Note that: -- FireFox works great. You will be able to read binary files from your local machine -- Chrome can only read local files if started with the --allow-file-access-from-files flag and even then the files must be ASCII, not binary. -- MSIE and Safari cannot work with local pages */ Jmol.Info = { // uncomment one or more of these next lines only if you want to override jmolInitialize() //jarPath: "java", //jarFile: "JmolAppletSigned0.jar", //j2sPath: "j2s", use: "HTML5", // could be JAVA or HTML5 // the serverURL path is only used to load binary files in Safari, Chrome, and MSIE serverURL: "http://your.server.here/jsmol.php", // required for binary file loading (Spartan, .gz, .map, etc.) disableJ2SLoadMonitor: false, disableInitialConsole: true } ////////// private functions ///////////// var _jmol = { appletCount: 0, applets: {}, allowedJmolSize: [25, 2048, 300], // min, max, default (pixels) codebase: ".", targetSuffix: 0, target: "jmolApplet0", buttonCount: 0, checkboxCount: 0, linkCount: 0, cmdCount: 0, menuCount: 0, radioCount: 0, radioGroupCount: 0, initialized: false, initChecked: false, archivePath: "JmolAppletSigned0.jar" } function _jmolApplet(size, inlineModel, script, nameSuffix) { nameSuffix == null && (nameSuffix = _jmol.appletCount); var id = "jmolApplet" + nameSuffix; jmolSetTarget(nameSuffix); ++_jmol.appletCount; script || (script = "select *"); inlineModel && (script = 'load DATA "inline"\n' + inlineModel + '\nEND "inline";' + script); var Info = {} for (var i in Jmol.Info) Info[i] = Jmol.Info[i] Info.jarFile || (Info.jarFile = _jmol.archivePath); Info.jarPath || (Info.jarPath = _jmol.codebase); Info.j2sPath || (Info.j2sPath = Info.jarPath + "/j2s"); var sz = _jmolGetAppletSize(size); Info.width || (Info.width = sz[0]); Info.height || (Info.height = sz[1]); Info.script || (Info.script = script); Info.isSigned == null && (Info.isSigned = (Info.jarFile.indexOf("Signed") >= 0)); for (var i in _jmol.params) if(_jmol.params[i]!="") Info[i] || (Info[i] = _jmol.params[i]); // alert(JSON.stringify(Info).replace(/\,/g,"\n\n\n\n")) return _jmol.applets[id] = Jmol.getApplet(id, Info) } function _jmolGetJarFilename(fileNameOrFlag) { _jmol.archivePath = (typeof(fileNameOrFlag) == "string" ? fileNameOrFlag : (fileNameOrFlag ? "JmolAppletSigned" : "JmolApplet") + "0.jar"); } //////////////////////////////////////////////////////////////// // Legacy Scripting API //////////////////////////////////////////////////////////////// function jmolSetParameter(key,value) { Jmol.Info[key] = value; } function jmolSetXHTML(id) { Jmol.setXHTML(id); } function jmolSetTranslation(TF) { // n/a } function jmolInitialize(codebaseDirectory, fileNameOrUseSignedApplet) { if (_jmol.initialized) return; _jmol.initialized = true; if(_jmol.jmoljar) { var f = _jmol.jmoljar; if (f.indexOf("/") >= 0) { alert ("This web page URL is requesting that the applet used be " + f + ". This is a possible security risk, particularly if the applet is signed, because signed applets can read and write files on your local machine or network.") var ok = prompt("Do you want to use applet " + f + "? ","yes or no") if (ok == "yes") { codebaseDirectory = f.substring(0, f.lastIndexOf("/")); fileNameOrUseSignedApplet = f.substring(f.lastIndexOf("/") + 1); } else { _jmolGetJarFilename(fileNameOrUseSignedApplet); alert("The web page URL was ignored. Continuing using " + _jmol.archivePath + ' in directory "' + codebaseDirectory + '"'); } } else { fileNameOrUseSignedApplet = f; } } _jmol.codebase = codebaseDirectory; _jmolGetJarFilename(fileNameOrUseSignedApplet); } function jmolSetDocument(doc) { _jmol.currentDocument = Jmol._document = doc; } function jmolSetAppletColor(boxbgcolor, boxfgcolor, progresscolor) { Jmol.Info.color = boxbgcolor ? boxbgcolor : "black"; } function jmolSetAppletWindow(w) { _jmol.appletWindow = w; } function jmolApplet(size, script, nameSuffix) { return _jmolApplet(size, null, script, nameSuffix); } function jmolAppletInline(size, inlineModel, script, nameSuffix) { return _jmolApplet(size, inlineModel, script, nameSuffix); } //////////////////////////////////////////////////////////////// // Basic controls //////////////////////////////////////////////////////////////// function jmolButton(script, label, id, title) { return Jmol.jmolButton(_jmol.target, script, label, id, title); } function jmolCheckbox(scriptWhenChecked, scriptWhenUnchecked, labelHtml, isChecked, id, title) { return Jmol.jmolCheckbox(_jmol.target, scriptWhenChecked, scriptWhenUnchecked, labelHtml, isChecked, id, title) } function jmolRadioGroup(arrayOfRadioButtons, separatorHtml, groupName, id, title) { return Jmol.jmolRadioGroup(_jmol.target, arrayOfRadioButtons, separatorHtml, groupName, id, title) } function jmolRadio(script, labelHtml, isChecked, separatorHtml, groupName, id, title) { return Jmol.jmolRadio(_jmol.target, script, labelHtml, isChecked, separatorHtml, groupName, id, title) } function jmolLink(script, label, id, title) { return Jmol.jmolLink(_jmol.target, script, label, id, title) } function jmolCommandInput(label, size, id, title) { return Jmol.jmolCommandInput(_jmol.target, label, size, id, title); } function jmolMenu(arrayOfMenuItems, size, id, title) { return Jmol.jmolMenu(_jmol.target, arrayOfMenuItems, size, id, title); } function jmolHtml(html) { return Jmol._documentWrite(html); } function jmolBr() { return Jmol._documentWrite("
"); } //////////////////////////////////////////////////////////////// // advanced scripting functions //////////////////////////////////////////////////////////////// function jmolDebugAlert(enableAlerts) { // n/a } function jmolLoadInline(model, targetSuffix) { return jmolLoadInlineScript(model, null, targetSuffix, false) } function jmolLoadInlineArray(ModelArray, script, targetSuffix) { return jmolLoadInlineScript(ModelArray.join("\n"), script, targetSuffix, false) } function jmolAppendInlineArray(ModelArray, script, targetSuffix) { return jmolLoadInlineScript(ModelArray.join("\n"), script, targetSuffix, true) } function jmolAppendInlineScript(model, script, targetSuffix) { return jmolLoadInlineScript(model, script, targetSuffix, true) } function jmolLoadInlineScript(model, script, targetSuffix, isAppend) { Jmol.script(jmolFindTarget(targetSuffix), "load " + (isAppend ? "APPEND " : "") + "DATA 'mydata'\n" + model.replace(/\"/g,'\\"') + "\nEND 'mydata'\n") } function jmolSetTarget(targetSuffix) { targetSuffix == null || (_jmol.targetSuffix = targetSuffix); return _jmol.target = "jmolApplet" + _jmol.targetSuffix; } function jmolFindTarget(targetSuffix) { return _jmol.applets[jmolSetTarget(targetSuffix)]; } function jmolScript(script, targetSuffix) { if (targetSuffix == "all") { for (var app in Jmol._applets) { var applet = (app.indexOf("__") >= 0 ? null : Jmol._applets[app]); if (applet) applet.script(script); } } else { Jmol.script(jmolFindTarget(targetSuffix), script) } } function jmolCheckBrowser(action, urlOrMessage, nowOrLater) { // unnecessary } //////////////////////////////////////////////////////////////// // Cascading Style Sheet Class support //////////////////////////////////////////////////////////////// function jmolSetAppletCssClass(appletCssClass) { Jmol.setAppletCss(appletCssClass) } function jmolSetButtonCssClass(s) { Jmol.setButtonCss(s) } function jmolSetCheckboxCssClass(s) { Jmol.setCheckboxCss(s) } function jmolSetRadioCssClass(s) { Jmol.setRadioCss(s) } function jmolSetLinkCssClass(s) { Jmol.setLinkCss(s) } function jmolSetMenuCssClass(s) { Jmol.setMenuCss(s) } function jmolSetMemoryMb(nMb) { // n/a } function jmolSetCallback(callbackName,funcName) { //if(!self[funcName])alert(funcName + " is not defined yet in jmolSetCallback") Jmol.Info[callbackName] = funcName //document.title=("jmolSetCallback " + callbackName + "/" + funcName + " must be included in Info definition") } function jmolSetSyncId(n) { alert("jmolSetSyncId " + n + " must be included in Info definition") } function jmolSetLogLevel(n) { Jmol.script(_jmol.target, "set loglevel " + n) } function _jmolGetAppletSize(size, units) { var width, height; if ( (typeof size) == "object" && size != null ) { width = size[0]; height = size[1]; } else { width = height = size; } return [_jmolFixDim(width, units), _jmolFixDim(height, units)]; } function _jmolFixDim(x, units) { var sx = "" + x; return (sx.length == 0 ? (units ? "" : _jmol.allowedJmolSize[2]) : sx.indexOf("%") == sx.length-1 ? sx : (x = parseFloat(x)) <= 1 && x > 0 ? x * 100 + "%" : (isNaN(x = Math.floor(x)) ? _jmol.allowedJmolSize[2] : x < _jmol.allowedJmolSize[0] ? _jmol.allowedJmolSize[0] : x > _jmol.allowedJmolSize[1] ? _jmol.allowedJmolSize[1] : x) + (units ? units : "")); } //////////user property/status functions///////// function jmolGetStatus(strStatus,targetSuffix){ return Jmol.getStatus(jmolFindTarget(targetSuffix), strStatus) } function jmolGetPropertyAsArray(sKey,sValue,targetSuffix) { return Jmol.getPropertyAsArray(jmolFindTarget(targetSuffix), sKey, sValue) } function jmolGetPropertyAsString(sKey,sValue,targetSuffix) { return Jmol.getPropertyAsString(jmolFindTarget(targetSuffix), sKey, sValue) } function jmolGetPropertyAsJSON(sKey,sValue,targetSuffix) { return Jmol.getPropertyAsJSON(jmolFindTarget(targetSuffix), sKey, sValue) } function jmolGetPropertyAsJavaObject(sKey,sValue,targetSuffix) { return Jmol.getPropertyAsJavaObject(jmolFindTarget(targetSuffix), sKey, sValue) } ///////// synchronous scripting //////// function jmolScriptWait(script, targetSuffix) { return Jmol.scriptWait(jmolFindTarget(targetSuffix), script) } function jmolScriptWaitOutput(script, targetSuffix) { return Jmol.scriptWaitOutput(jmolFindTarget(targetSuffix), script) } function jmolEvaluate(molecularMath, targetSuffix) { return Jmol.evaluate(jmolFindTarget(targetSuffix), molecularMath) } function jmolScriptEcho(script, targetSuffix) { return Jmol.scriptEcho(jmolFindTarget(targetSuffix), script) } function jmolScriptMessage(script, targetSuffix) { return Jmol.scriptMessage(jmolFindTarget(targetSuffix), script) } function jmolScriptWaitAsArray(script, targetSuffix) { return Jmol.scriptWait(jmolFindTarget(targetSuffix), script) } //////////// save/restore orientation ///////////// function jmolSaveOrientation(id, targetSuffix) { return Jmol.saveOrientation(jmolFindTarget(targetSuffix), id) } function jmolRestoreOrientation(id, targetSuffix) { return Jmol.restoreOrientation(jmolFindTarget(targetSuffix), id) } function jmolRestoreOrientationDelayed(id, delay, targetSuffix) { return Jmol.restoreOrientationDelayed(jmolFindTarget(targetSuffix), id, delay) } function jmolResizeApplet(size, targetSuffix) { return Jmol.resizeApplet(jmolFindTarget(targetSuffix), size); } //////////// add parameter ///////////// function jmolAppletAddParam(appletCode,name,value){ alert ("use Info to add a parameter: " + name + "/" + value) } Jmol.___JmolDate="$Date: 2024-03-15 17:42:21 -0500 (Fri, 15 Mar 2024) $" Jmol.___fullJmolProperties="src/org/jmol/viewer/Jmol.properties" Jmol.___JmolVersion="16.2.3" // (legacy) also 16.2.4 (swingJS) /////// END OF https://chemapps.stolaf.edu/jmol/jsmol/js/JSmolMin2.js /////// Jmol.Info.j2sPath = 'https://chemapps.stolaf.edu/jmol/jsmol/j2s';Jmol.Info.allowjavascript=false;;Jmol.Info.serverURL='https://chemapps.stolaf.edu/jmol/jsmol/php/jsmol.php' jmolInitialize('https://chemapps.stolaf.edu/jmol/files', true); jmolApplet(['320','340'],"set antialiasdisplay\;load data \"mydata\"|H|APtclcactv04262420183D 0 0.00000 0.00000| | 1 0 0 0 0 0 0 0 0 0999 V2000| 0.0000 0.0000 0.0000 H 0 4 0 0 0 0 0 0 0 0 0 0|M RAD 1 1 2|M END|$$$$||end \"mydata\";",'0');