(function(Q,R,S,T,I,U,G,r,K,L,M,V,W,N,X,Y,D,H,z,Z,O,$,aa,P,ba,ca,da,ea,fa,ga,x,ha,ia,ja,ka,la,ma,na,oa,pa,qa,ra,sa,ta,ua,va,wa,xa,ya,za,Aa,Ba,Ca,Da,Ea,Fa,Ga,Ha,h,w){G("J.api");P(J.api,"JmolPropertyManager");G("JV");K(["J.api.JmolPropertyManager","java.util.Hashtable"],"JV.PropertyManager","java.lang.Boolean $.Double $.Float java.util.Arrays $.Date $.Map JU.AU $.BArray $.BS $.Base64 $.Lst $.M3 $.M4 $.P3 $.PT $.SB $.V3 J.api.Interface JM.BondSet $.LabelToken JS.SV $.T JU.BSUtil $.C $.Edge $.Elements $.Escape $.JmolMolecule $.Logger JV.ActionManager $.FileManager $.JC $.Viewer JV.binding.Binding".split(" "),
function(){c$=M(function(){this.map=this.vwr=null;L(this,arguments)},JV,"PropertyManager",null,J.api.JmolPropertyManager);O(c$,function(){this.map=new java.util.Hashtable});N(c$,function(){});w(c$,"setViewer",function(c){this.vwr=c;for(var a=c=0;c<JV.PropertyManager.propertyTypes.length;c+=3,a++)0<JV.PropertyManager.propertyTypes[c].length&&this.map.put(JV.PropertyManager.propertyTypes[c].toLowerCase(),Integer.$valueOf(a))},"JV.Viewer");w(c$,"getPropertyNumber",function(c){c=this.map.get(null==c?
"":c.toLowerCase());return null==c?-1:c.intValue()},"~S");w(c$,"getDefaultPropertyParam",function(c){return 0>c?"":JV.PropertyManager.propertyTypes[3*c+2]},"~N");w(c$,"checkPropertyParameter",function(c){c=this.getPropertyNumber(c);c=JV.PropertyManager.getParamType(c);return 0<c.length&&"<atom selection>"!==c},"~S");w(c$,"getProperty",function(c,a,e){138!=JV.PropertyManager.propertyTypes.length&&JU.Logger.warn("propertyTypes is not the right length: "+JV.PropertyManager.propertyTypes.length+" != 138");
if(0<=a.indexOf(".")||0<=a.indexOf("[")){var b=this.getArguments(a);e=this.extractProperty(this.getPropertyAsObject(b[0].asString(),e,null),b,1,null,!1)}else e=this.getPropertyAsObject(a,e,c);if(null==c)return e;(b=c.equalsIgnoreCase("readable"))&&(c=JV.PropertyManager.isReadableAsString(a)?"String":"JSON");return c.equalsIgnoreCase("String")?null==e?"":e.toString():b?JU.Escape.toReadable(a,e):c.equalsIgnoreCase("JSON")?JS.SV.safeJSON(a,e):e},"~S,~S,~O");h(c$,"getArguments",function(c){var a=c.toLowerCase(),
e=-1;if(0<=c.indexOf('"')||0<=c.indexOf("'"))c=this.fixSelectQuotes(c);for(;0<=(e=a.indexOf("[select ",++e));){var b=a.indexOf(" where ",e),d=a.indexOf(" wherein ",e);0<d&&d<b&&(b=d);d=a.lastIndexOf("]");0>b||b>d||(c=c.substring(0,e+1)+c.substring(e+1,d).$replace(".","\u0001").$replace("[","\u0002").$replace("]","\u0003")+c.substring(d))}c=JU.PT.rep(JU.PT.rep(c.$replace("]","\x00").$replace("[","\x00"),"..","\u0004").$replace(".","\x00").$replace("\u0001",".").$replace("\u0002","[").$replace("\u0003",
"]"),"\u0004","..");c=JU.PT.rep(c,"\x00\x00","\x00");c=JU.PT.split(JU.PT.trim(c,"\x00"),"\x00");for(var a=Array(c.length),e=0,f;e<c.length;e++)a[e]=c[e].startsWith("'")||c[e].startsWith('"')?JS.SV.newS(JU.PT.trim(c[e],"'\"")):-2147483648==(f=JU.PT.parseInt(c[e]))?JS.SV.newS(c[e]):JS.SV.newI(f);return a},"~S");h(c$,"fixSelectQuotes",function(c){c=c.toCharArray();for(var a=!1,e=!1,b=!1,d=c.length;0<=--d;)switch(c[d]){case "'":b||(a=e=!a);break;case '"':e||(a=b=!a);break;case ".":a&&(c[d]="\u0001");
break;case "[":a&&(c[d]="\u0002");break;case "]":a&&(c[d]="\u0003")}return c=String.instantialize(c)},"~S");w(c$,"extractProperty",function(c,a,e,b,d){0>e&&(a=this.getArguments(a),e=0);if(e>=a.length)return c;d||(a=this.compileSelect(a));var f,g=a[e++];d=JS.SV.oValue(c);switch(g.tok){case 2:f=g.intValue-1;if(r(d,JU.Lst))return 0>f&&(f+=d.size()),0<=f&&f<d.size()?this.extractProperty(d.get(f),a,e,null,!0):"";if(r(d,JU.M3))return b=d,b=x(-1,[z(-1,[b.m00,b.m01,b.m02]),z(-1,[b.m10,b.m11,b.m12]),z(-1,
[b.m20,b.m21,b.m22])]),0>f&&(f+=3),0<=f&&3>f?this.extractProperty(b,a,--e,null,!0):"";if(r(d,JU.M4))return b=d,b=x(-1,[z(-1,[b.m00,b.m01,b.m02,b.m03]),z(-1,[b.m10,b.m11,b.m12,b.m13]),z(-1,[b.m20,b.m21,b.m22,b.m23]),z(-1,[b.m30,b.m31,b.m32,b.m33])]),0>f&&(f+=4),0<=f&&4>f?this.extractProperty(b,a,--e,null,!0):"";if(JU.AU.isAI(d))return 0>f&&(f+=d.length),0<=f&&f<d.length?Integer.$valueOf(d[f]):"";if(JU.AU.isAD(d))return 0>f&&(f+=d.length),0<=f&&f<d.length?Double.$valueOf(d[f]):"";if(JU.AU.isAF(d))return 0>
f&&(f+=d.length),0<=f&&f<d.length?Float.$valueOf(d[f]):"";if(JU.AU.isAII(d)||JU.AU.isAFF(d))return 0>f&&(f+=d.length),0<=f&&f<d.length?this.extractProperty(d[f],a,e,null,!0):"";if(JU.AU.isAS(d)||r(d,Array))return 0>f&&(f+=d.length),0<=f&&f<d.length?d[f]:"";break;case 1275082245:case 4:if(r(d,java.util.Map)){var j=!1,s=c=!1;f=1275082245==g.tok?g.value[0]:null;var k=null;if(1275082245==g.tok)if(s=!0,k=g.value[1],g=g.myName,c=0<=g.indexOf(";"),g.contains("**")){for(var m=0==f.size(),n="",y,l=d.entrySet().iterator();l.hasNext()&&
((y=l.next())||1);)for(var h=y.getKey(),g=m?1:f.size();0<=--g;)if(m||JU.PT.isLike(h,f.get(g))){var j=y.getValue(),t=!1;switch(r(j,JS.SV)?j.tok:0){case 7:t=!0;j=j.getList();break;case 6:case 14:j=j.getMap();break;default:if(!r(j,java.util.Map)&&!(t=r(j,JU.Lst)))j=null}if(null!=j){if(t){null==b&&(b=new JU.Lst);a=j;e=a.size();for(d=0;d<e;d++)if(j=a.get(d),r(j,JS.SV)&&null!=(j=j.getMap()))(null==k||this.vwr.checkSelect(j,k))&&b.addLast(j);return b}if(null==k||this.vwr.checkSelect(j,k))n+=","+h}}if(0==
n.length)return new JU.Lst;g=n.substring(1);j=!c;f=null}else{if(null!=k&&!this.vwr.checkSelect(d,k))return""}else if(g=g.asString(),g.equalsIgnoreCase("keys")){b=new JU.Lst;for(d=d.keySet().iterator();d.hasNext()&&((h=d.next())||1);)b.addLast(h);return this.extractProperty(b,a,e,null,!0)}k=c||0<=g.indexOf(",")||0<=g.indexOf(";");s&&!k&&(k=!0,g+=",");y=c||g.startsWith("*")||g.endsWith("*")||k;h=null!=b;if(y&&(h||(b=new JU.Lst),!c&&(null==f?1==g.length:0==f.size()))){if(e==a.length){if(!h)return d;
b.addLast(d);return b}return this.extractProperty(d,a,e,b,!0)}g.contains("**")&&(g=JU.PT.rep(g,"**","*"));y&&!k&&(g+=",");if(j||c||g.contains(",")){s=new java.util.Hashtable;null!=f&&0==f.size()&&(f=null,g="*");if(null==f){f=JU.PT.split(g,",");for(g=f.length;0<=--g;)JV.PropertyManager.getMapSubset(d,f[g],s,c?b:null)}else for(g=f.size();0<=--g;)JV.PropertyManager.getMapSubset(d,f.get(g),s,c?b:null);if(j&&!h)return s;if(e==a.length){if(!c){if(!h)return s;b.addLast(s)}return b}return this.extractProperty(s,
a,e,h?b:null,!0)}g=this.checkMap(d,g,y,b,a,e,s);return null!=g&&!y?this.extractProperty(d.get(g),a,e,null,!0):!y?"":b}if(r(d,JU.Lst)){null==b&&(b=new JU.Lst);e--;for(f=0;f<d.size();f++)j=d.get(f),(r(j,java.util.Map)||r(j,JU.Lst)||r(j,JS.SV)&&(null!=j.getMap()||null!=j.getList()))&&this.extractProperty(j,a,e,b,!0);return b}}return c},"~O,~O,~N,JU.Lst,~B");c$.getMapSubset=h(c$,"getMapSubset",function(c,a,e,b){if(a.startsWith('"')||a.startsWith("'"))a=JU.PT.trim(a,"\"'");var d=c.get(a);if(null!=d)null==
b?e.put(a,d):b.addLast(d);else{var f;for(c=c.entrySet().iterator();c.hasNext()&&((f=c.next())||1);)d=f.getKey(),JU.PT.isLike(d,a)&&(null==b?e.put(d,f.getValue()):b.addLast(f.getValue()))}},"java.util.Map,~S,java.util.Map,JU.Lst");h(c$,"compileSelect",function(c){for(var a=null,e=c.length;0<=--e;)if(4==c[e].tok){var b=c[e].value,d=b.toUpperCase();d.startsWith("WHERE")&&(d=(b="SELECT * "+b).toUpperCase());if(d.startsWith("SELECT ")){null==a&&(a=JU.AU.arrayCopyObject(c,c.length));d=(b=b.substring(6).trim()).toUpperCase();
if(d.startsWith("WHERE ")||d.startsWith("WHEREIN "))d=(b="* "+b).toUpperCase();var f=d.indexOf(" WHEREIN "),g=0>f?"":0<=b.indexOf(";")?";**":",**";0>f&&(f=d.indexOf(" WHERE "));d=b.substring(0,0>f?b.length:f).trim();d.startsWith("(")&&d.endsWith(")")&&(d=d.substring(1,d.length-1)+";");0>f?a[e]=JS.SV.newV(1275082245,x(-1,[this.getKeys(d),null])):(d+=g,a[e]=JS.SV.newV(1275082245,x(-1,[this.getKeys(d),this.vwr.compileExpr(b.substring(f+6+g.length).trim())])));a[e].myName=d}}return null==a?c:a},"~A");
h(c$,"getKeys",function(c){var a=new JU.Lst;c=JU.PT.rep(JU.PT.rep(c,"**","*"),";",",")+",";for(var e=0,b=-1;0<=(b=c.indexOf(",",b+1));)if(b>e){var d=c.substring(e,b);if(d.equals("*")){if(0==a.size())break}else a.addLast(d),e=b+1}return a},"~S");h(c$,"checkMap",function(c,a,e,b,d,f,g){var j=null==b&&c.containsKey(a);if(!j)for(var s=a.contains(";"),k=s?JU.PT.split(a,";"):null,m=e&&!g?a.toLowerCase():null,n,h=c.keySet().iterator();h.hasNext()&&((n=h.next())||1);){if(s){for(var l=k.length;0<=--l;a=null)if(a=
k[l],0!=a.length){if(g){if(!JU.PT.isLike(n,a))continue;break}m=0<=a.indexOf("*")?a.toLowerCase():null;if(this.checkKey(n,a,m))break}if(null==a)continue}else if(g?!JU.PT.isLike(n,a):!this.checkKey(n,a,m))continue;if(null==b)return n;b.addLast(this.extractProperty(c.get(n),d,f,null,!0));if(!e&&!s)return null}return j?a:null},"java.util.Map,~S,~B,JU.Lst,~O,~N,~B");h(c$,"checkKey",function(c,a,e){return c.equalsIgnoreCase(a)||null!=e&&JU.PT.isLike(c.toLowerCase(),e)},"~S,~S,~S");c$.getPropertyName=h(c$,
"getPropertyName",function(c){return 0>c?"":JV.PropertyManager.propertyTypes[3*c]},"~N");c$.getParamType=h(c$,"getParamType",function(c){return 0>c?"":JV.PropertyManager.propertyTypes[3*c+1]},"~N");c$.isReadableAsString=h(c$,"isReadableAsString",function(c){for(var a=JV.PropertyManager.readableTypes.length;0<=--a;)if(c.equalsIgnoreCase(JV.PropertyManager.readableTypes[a]))return!0;return!1},"~S");h(c$,"getPropertyAsObject",function(c,a,e){if(c.equals("tokenList"))return JS.T.getTokensLike(a);var b=
this.getPropertyNumber(c),d=null!=a&&0<a.toString().length;a=d?a:this.getDefaultPropertyParam(b);switch(b){case 0:return this.getAppletInfo();case 5:return this.getAnimationInfo();case 14:return this.getAllAtomInfo(this.vwr.getAtomBitSet(a));case 24:return this.vwr.getAuxiliaryInfoForAtoms(a);case 15:return this.getAllBondInfo(a);case 25:return this.getBoundBoxInfo();case 10:return this.vwr.tm.fixedRotationCenter;case 16:return this.getAllChainInfo(this.vwr.getAtomBitSet(a));case 37:return this.vwr.getProperty("DATA_API",
"consoleText",null);case 26:return this.vwr.getDataObj(a.toString(),null,-1);case 33:return this.vwr.getErrorMessageUn();case 28:return this.vwr.evaluateExpression(a.toString());case 20:return this.vwr.getModelExtract(a,!0,!1,"MOL");case 32:return JV.PropertyManager.getFileInfo(this.vwr.getFileData(),a.toString());case 45:return this.vwr.readCifData(a.toString(),null);case 1:return this.vwr.fm.getFullPathName(!1);case 2:return this.vwr.getFileHeader();case 4:case 3:return d?this.vwr.getFileAsString3(a.toString(),
!0,null):this.vwr.getCurrentFileAsString("prop");case 27:return c=a.toString().toLowerCase(),this.getImage(c,0>c.indexOf("g64")&&0>c.indexOf("base64")&&(null==e||e.equalsIgnoreCase("java")));case 35:return this.vwr.getShapeProperty(24,"info");case 36:return this.vwr.getShapeProperty(24,"data");case 40:return this.vwr.getNMRCalculation().getInfo(a.toString());case 41:return this.getVariables(a.toString());case 21:return this.vwr.getStatusChanged(a.toString());case 22:return this.vwr;case 38:return this.vwr.getJspecViewProperties(a);
case 7:return this.getLigandInfo(this.vwr.getAtomBitSet(a));case 9:return this.getMeasurementInfo();case 29:return this.vwr.getMenu(a.toString());case 23:return this.vwr.sm.messageQueue;case 30:return this.vwr.getMinimizationInfo();case 6:return this.getModelInfo(this.vwr.getAtomBitSet(a));case 18:return this.getMoleculeInfo(this.vwr.getAtomBitSet(a));case 34:return this.getMouseInfo();case 11:return this.vwr.tm.getOrientationInfo();case 31:return this.vwr.ms.getPointGroupInfo(this.vwr.getAtomBitSet(a));
case 17:return this.getAllPolymerInfo(this.vwr.getAtomBitSet(a));case 39:return this.vwr.getScriptQueueInfo();case 8:return this.getShapeInfo();case 19:return this.vwr.getStateInfo3(a.toString(),0,0);case 12:return JU.M3.newM3(this.vwr.tm.matrixRotate);case 42:return this.getAnnotationInfo(a,1073741925);case 43:return this.getAnnotationInfo(a,1073742189);case 44:return a=JS.SV.oValue(a),d=r(a,java.util.Map)?a:null,null==d?null:this.vwr.sm.processService(d)}e=Array(46);for(b=0;46>b;b++){d=JV.PropertyManager.getParamType(b);
a=this.getDefaultPropertyParam(b);var f=JV.PropertyManager.getPropertyName(b);e[b]=0==f.length||"X"==f.charAt(0)?"":f+(""!==d?" "+JV.PropertyManager.getParamType(b)+(""!==a?" #default: "+this.getDefaultPropertyParam(b):""):"")}java.util.Arrays.sort(e);d=new JU.SB;d.append("getProperty ERROR\n").append(c).append("?\nOptions include:\n");for(b=0;46>b;b++)0<e[b].length&&d.append("\n getProperty ").append(e[b]);return d.toString()},"~S,~O,~S");h(c$,"getImage",function(c,a){var e=-1,b=-1,d;if(0<=(d=c.indexOf("height=")))e=
JU.PT.parseInt(c.substring(d+7));if(0<=(d=c.indexOf("width=")))b=JU.PT.parseInt(c.substring(d+6));0>b&&0>e?e=b=-1:0>b?b=e:e=b;var f="JPG";0<=c.indexOf("type=")&&(f=JU.PT.getTokens(JU.PT.replaceWithCharacter(c.substring(c.indexOf("type=")+5),";,"," "))[0]);d=Array(1);e=this.vwr.getImageAsBytes(f.toUpperCase(),b,e,-1,d);return null!=d[0]?d[0]:a?new JU.BArray(e):JU.Base64.getBase64(e).toString()},"~S,~B");h(c$,"getVariables",function(c){return c.toLowerCase().equals("all")?this.vwr.g.getAllVariables():
this.vwr.evaluateExpressionAsVariable(c)},"~S");c$.getFileInfo=h(c$,"getFileInfo",function(c,a){var e=new java.util.Hashtable;if(null==c)return e;var b=null!=a&&0<a.length;if(r(c,java.util.Map))return b?c.get(a):c;var d=JU.PT.split(c,"\n");if(0==d.length||6>d[0].length||" "!=d[0].charAt(6)||!d[0].substring(0,6).equals(d[0].substring(0,6).toUpperCase()))return e.put("fileHeader",c),e;var f="",g=new JU.SB;b&&(a=a.toUpperCase());for(var j="",s=0;s<d.length;s++){var k=d[s];if(!(12>k.length)){var j=k.substring(0,
6).trim(),m=k.substring(7,10).trim();j.equals("REMARK")&&(j+=m);if(!j.equals(f)){if(b&&f.equals(a))return g.toString();b||(e.put(f,g.toString()),g=new JU.SB);f=j}(!b||j.equals(a))&&g.append(k).appendC("\n")}}b||e.put(f,g.toString());return b?j.equals(a)?g.toString():"":e},"~O,~S");h(c$,"getMoleculeInfo",function(c){c=this.vwr.getAtomBitSet(c);for(var a=this.vwr.ms.getMolecules(),e=new JU.Lst,b=new JU.BS,d=0;d<a.length;d++){var b=JU.BSUtil.copy(c),f=a[d];b.and(f.atomList);0<b.length()&&(b=new java.util.Hashtable,
b.put("mf",f.getMolecularFormula(!0,null,!1)),b.put("number",Integer.$valueOf(f.moleculeIndex+1)),b.put("modelNumber",this.vwr.ms.getModelNumberDotted(f.modelIndex)),b.put("numberInModel",Integer.$valueOf(f.indexInModel+1)),b.put("nAtoms",Integer.$valueOf(f.ac)),b.put("nElements",Integer.$valueOf(f.nElements)),e.addLast(b))}return e},"~O");w(c$,"getModelInfo",function(c){c=this.vwr.ms.getModelBS(this.vwr.getAtomBitSet(c),!1);var a=this.vwr.ms,e=new java.util.Hashtable;e.put("modelSetName",a.modelSetName);
e.put("modelIndex",Integer.$valueOf(this.vwr.am.cmi));e.put("modelCount",Integer.$valueOf(a.mc));e.put("isTainted",Boolean.$valueOf(null!=a.tainted));e.put("canSkipLoad",Boolean.$valueOf(a.canSkipLoad));e.put("modelSetHasVibrationVectors",Boolean.$valueOf(a.modelSetHasVibrationVectors()));null!=a.modelSetProperties&&e.put("modelSetProperties",a.modelSetProperties);e.put("modelCountSelected",Integer.$valueOf(c.cardinality()));e.put("modelsSelected",c);var b=new JU.Lst;a.getMolecules();for(var d=c.nextSetBit(0);0<=
d;d=c.nextSetBit(d+1)){var f=new java.util.Hashtable;f.put("_ipt",Integer.$valueOf(d));f.put("num",Integer.$valueOf(a.getModelNumber(d)));f.put("file_model",a.getModelNumberDotted(d));f.put("name",a.getModelName(d));var g=a.getModelTitle(d);null!=g&&f.put("title",g);g=a.getModelFileName(d);null!=g&&f.put("file",g);g=a.getInfo(d,"modelID");null!=g&&f.put("id",g);f.put("vibrationVectors",Boolean.$valueOf(this.vwr.modelHasVibrationVectors(d)));g=a.am[d];f.put("atomCount",Integer.$valueOf(g.act));f.put("bondCount",
Integer.$valueOf(g.getBondCount()));f.put("groupCount",Integer.$valueOf(g.getGroupCount()));f.put("moleculeCount",Integer.$valueOf(g.moleculeCount));g.isBioModel&&f.put("polymerCount",Integer.$valueOf(g.getBioPolymerCount()));f.put("chainCount",Integer.$valueOf(a.getChainCountInModelWater(d,!0)));null!=g.properties&&f.put("modelProperties",g.properties);var j=a.getInfo(d,"Energy");null!=j&&f.put("energy",j);f.put("atomCount",Integer.$valueOf(g.act));b.addLast(f)}e.put("models",b);return e},"~O");
w(c$,"getLigandInfo",function(c){var a=this.vwr.getAtomBitSet(c),e=this.vwr.getAtomBitSet("solvent");c=new java.util.Hashtable;var b=new JU.Lst;c.put("ligands",b);var d=this.vwr.ms,f=JU.BSUtil.copyInvert(a,d.ac);f.or(e);for(var e=d.at,g=a.nextSetBit(0);0<=g;g=a.nextSetBit(g+1))(e[g].group.isProtein()||e[g].group.isDna()||e[g].group.isRna())&&e[g].group.setAtomBitsAndClear(f,a);a=Array(d.mc);for(g=d.mc;0<=--g;)a[g]=this.vwr.getModelUndeletedAtomsBitSet(g),a[g].andNot(f);f=JU.JmolMolecule.getMolecules(e,
a,null,f);for(g=0;g<f.length;g++){var a=f[g].atomList,j=new java.util.Hashtable;b.addLast(j);j.put("atoms",JU.Escape.eBS(a));for(var s="",k="",m=null,n=0,h=null,l="",v="",t=2147483647,p=2147483647,u=a.nextSetBit(0);0<=u;u=a.nextSetBit(u+1)){var q=e[u];if(m!==q.group){var m=q.group,r=q.getResno(),x=q.getChainID();t!=r-1&&(0!=l.length&&t!=p&&(l+="-"+t),x=-1,p=r);v="/"+d.getModelNumberDotted(q.mi);0!=n&&x!=n&&(l+=":"+h+v);-1==x&&(l+=" "+r);t=r;n=q.getChainID();h=q.getChainIDStr();s+=k+q.getGroup3(!1);
k="-"}}l+=(p==t?"":"-"+t)+(0==n?"":":"+h)+v;j.put("groupNames",s);j.put("residueList",l.substring(1))}return c},"~O");w(c$,"getAtomData",function(c,a,e){c.startsWith("{")||(c="{"+c+"}");var b=a.toLowerCase().startsWith("user:"),d=a.toLowerCase().startsWith("property_");e&&(!b&&!d)&&(a=a.toUpperCase());b=d?"%{"+a+"}":b?a.substring(5):a.equals("xyzrn")?"%-2e %8.3x %8.3y %8.3z %4.2[vdw] 1 [%n]%r.%a#%i":a.equals("xyzvib")?"%-2e %10.5x %10.5y %10.5z %10.5vx %10.5vy %10.5vz":a.equals("pdb")?'{selected and not hetero}.label("ATOM  %5i %-4a%1A%3.3n %1c%4R%1E   %8.3x%8.3y%8.3z%6.2Q%6.2b          %2e  ").lines+{selected and hetero}.label("HETATM%5i %-4a%1A%3.3n %1c%4R%1E   %8.3x%8.3y%8.3z%6.2Q%6.2b          %2e  ").lines':
a.equals("xyz")?"%-2e %10.5x %10.5y %10.5z":a.equals("cfi")?"print '$CFI from Jmol"+JV.Viewer.getJmolVersion()+"\n'+{selected}.count + ' ' + {selected}.bonds.count + '\n'   + {selected}.format('%10.0[atomno] %10.0[elemno] %10.4[xyz]')  + {selected}.bonds.format('%i1 %i2') + '\n' + {selected}.bonds.format('%ORDER')":null;if(null==b)return this.getModelExtract(this.vwr.getAtomBitSet(c),!1,!1,a.toUpperCase(),e);if(b.startsWith("print"))return c.equals("selected")||(b=JU.PT.rep(b,"selected",c.substring(1,
c.length-1))),this.vwr.runScriptCautiously(b);0>b.indexOf("label")?b=c+'.label("'+b+'").lines':c.equals("selected")||(b=JU.PT.rep(b,"selected",c.substring(1,c.length-1)));return this.vwr.evaluateExpression(b)},"~S,~S,~B");w(c$,"getModelExtract",function(c,a,e,b,d){if(b.equalsIgnoreCase("CIF"))return this.getModelCif(c);if(b.equalsIgnoreCase("CML"))return this.getModelCml(c,2147483647,!0,a,d);if(b.equals("PDB")||b.equals("PQR"))return this.getPdbAtomData(c,null,b.equals("PQR"),a,d);var f=b.equalsIgnoreCase("V3000"),
g=b.equalsIgnoreCase("SDF"),j=b.equalsIgnoreCase("MOL"),s=!a&&b.equalsIgnoreCase("XYZVIB"),k=b.equalsIgnoreCase("XYZRN"),m=b.toUpperCase().startsWith("XYZ"),n=b.equalsIgnoreCase("JSON")||b.equalsIgnoreCase("CD");b=new JU.SB;var h=this.vwr.ms;if(!m&&!n){b.append(e?"Jmol Model Kit":JV.FileManager.fixDOSName(this.vwr.fm.getFullPathName(!1)));e=JV.Viewer.getJmolVersion();b.append("\n__Jmol-").append(e.substring(0,2));var l,v,t,p;p=new Date;e=p.getMonth();l=p.getDate();v=p.getFullYear();t=p.getHours();
p=p.getMinutes();JU.PT.rightJustify(b,"_00",""+(1+e));JU.PT.rightJustify(b,"00",""+l);b.append((""+v).substring(2,4));JU.PT.rightJustify(b,"00",""+t);JU.PT.rightJustify(b,"00",""+p);b.append("3D 1   1.00000     0.00000     0");b.append("\nJmol version ").append(JV.Viewer.getJmolVersion()).append(" EXTRACT: ").append(JU.Escape.eBS(c)).append("\n")}e=JU.BSUtil.copy(c);v=h.at;for(l=c.nextSetBit(0);0<=l;l=c.nextSetBit(l+1))a&&v[l].isDeleted()&&e.clear(l);p=JV.PropertyManager.getCovalentBondsForAtoms(h.bo,
h.bondCount,e);if(!s&&e.isEmpty())return"";c=!0;t=this.vwr.ms.getModelBS(e,!0);null!=h.trajectory&&!d&&h.trajectory.selectDisplayed(t);a=a?this.vwr.tm.getRotationQ():null;if(g){s=b.toString();b=new JU.SB;for(l=t.nextSetBit(0);0<=l;l=t.nextSetBit(l+1)){b.append(s);f=JU.BSUtil.copy(e);f.and(h.getModelAtomBitSetIncludingDeleted(l,!1));p=JV.PropertyManager.getCovalentBondsForAtoms(h.bo,h.bondCount,f);if(!(c=this.addMolFile(l,b,f,p,!1,!1,j,a)))break;b.append("$$$$\n")}}else if(m){j=JM.LabelToken.compile(this.vwr,
k?"%-2e _XYZ_ %4.2[vdw] 1 [%n]%r.%a#%i\n":"%-2e _XYZ_\n","\x00",null);g=s?JM.LabelToken.compile(this.vwr,"%-2e _XYZ_ %12.5vx %12.5vy %12.5vz\n","\x00",null):null;k=new JU.P3;for(l=t.nextSetBit(0);0<=l;l=t.nextSetBit(l+1))if(f=JU.BSUtil.copy(e),f.and(h.getModelAtomBitSetIncludingDeleted(l,!1)),!f.isEmpty()){b.appendI(f.cardinality()).appendC("\n");m=h.am[l].properties;b.append("Model["+(l+1)+"]: ");if(null!=h.frameTitles[l]&&0<h.frameTitles[l].length)b.append(h.frameTitles[l].$replace("\n"," "));else if(null==
m)b.append("Jmol "+JV.Viewer.getJmolVersion());else{d=new JU.SB;n=m.propertyNames();for(p=null;n.hasMoreElements();){var u=n.nextElement();u.equals(".PATH")?p=m.getProperty(u):d.append(";").append(u).append("=").append(m.getProperty(u))}null!=p&&d.append(";PATH=").append(p);p=d.substring(0<d.length()?1:0);b.append(p.$replace("\n"," "))}b.appendC("\n");m=x(-1,[k]);for(d=f.nextSetBit(0);0<=d;d=f.nextSetBit(d+1))n=JM.LabelToken.formatLabelAtomArray(this.vwr,v[d],s&&null!=h.getVibration(d,!1)?g:j,"\x00",
null,k),this.getPointTransf(l,h,v[d],a,k),n=JU.PT.rep(n,"_XYZ_",JU.PT.sprintf("%12.5p %12.5p %12.5p","p",m)),b.append(n)}}else c=this.addMolFile(-1,b,e,p,f,n,j,a);return c?b.toString():"ERROR: Too many atoms or bonds -- use V3000 format."},"JU.BS,~B,~B,~S,~B");h(c$,"getModelCif",function(c){var a=new JU.SB;a.append("# primitive CIF file created by Jmol "+JV.Viewer.getJmolVersion()+"\ndata_primitive");var e=this.vwr.ms.getUnitCellForAtom(c.nextSetBit(0)),b=null==e?z(-1,[1,1,1,90,90,90]):e.getUnitCellAsArray(!1);
a.append("\n_cell_length_a ").appendF(b[0]);a.append("\n_cell_length_b ").appendF(b[1]);a.append("\n_cell_length_c ").appendF(b[2]);a.append("\n_cell_angle_alpha ").appendF(b[3]);a.append("\n_cell_angle_beta ").appendF(b[4]);a.append("\n_cell_angle_gamma ").appendF(b[5]);a.append("\n\n_symmetry_space_group_name_H-M 'P 1'\nloop_\n_space_group_symop_operation_xyz\n'x,y,z'");a.append("\n\nloop_\n_atom_site_label\n_atom_site_fract_x\n_atom_site_fract_y\n_atom_site_fract_z\n");for(var b=this.vwr.ms.at,
d=new JU.P3,f=c.nextSetBit(0);0<=f;f=c.nextSetBit(f+1)){var g=b[f];d.setT(g);null!=e&&e.toFractional(d,!1);a.append(g.getElementSymbol()).append("\t").append(JU.PT.formatF(d.x,10,5,!0,!1)).append("\t").append(JU.PT.formatF(d.y,10,5,!0,!1)).append("\t").append(JU.PT.formatF(d.z,10,5,!0,!1)).append("\n")}return a.toString()},"JU.BS");h(c$,"addMolFile",function(c,a,e,b,d,f,g,j){var s=e.cardinality(),k=b.cardinality();if(!d&&!f&&(999<s||999<k))return!1;var h=this.vwr.ms,n=D(h.ac,0),y=new JU.P3;d?a.append("  0  0  0  0  0  0            999 V3000"):
f?a.append('{"mol":{"createdBy":"Jmol '+JV.Viewer.getJmolVersion()+'","a":['):(JU.PT.rightJustify(a,"   ",""+s),JU.PT.rightJustify(a,"   ",""+k),a.append("  0  0  0  0              1 V2000"));f||a.append("\n");d&&a.append("M  V30 BEGIN CTAB\nM  V30 COUNTS ").appendI(s).append(" ").appendI(k).append(" 0 0 0\n").append("M  V30 BEGIN ATOM\n");for(var k=e.nextSetBit(0),l=0;0<=k;k=e.nextSetBit(k+1))this.getAtomRecordMOL(c,h,a,n[k]=++l,h.at[k],j,y,d,f);d?a.append("M  V30 END ATOM\nM  V30 BEGIN BOND\n"):
f&&a.append('],"b":[');k=b.nextSetBit(0);for(l=0;0<=k;k=b.nextSetBit(k+1))this.getBondRecordMOL(a,++l,h.bo[k],n,d,f,g);d&&a.append("M  V30 END BOND\nM  V30 END CTAB\n");f?a.append("]}}"):a.append("M  END\n");if(!f&&!d&&(c=h.getPartialCharges(),null!=c)){a.append("> <JMOL_PARTIAL_CHARGES>\n").appendI(s).appendC("\n");k=e.nextSetBit(0);for(l=0;0<=k;k=e.nextSetBit(k+1))a.appendI(++l).append(" ").appendF(c[k]).appendC("\n")}return!0},"~N,JU.SB,JU.BS,JU.BS,~B,~B,~B,JU.Quat");c$.getCovalentBondsForAtoms=
h(c$,"getCovalentBondsForAtoms",function(c,a,e){for(var b=new JU.BS,d=0;d<a;d++){var f=c[d];e.get(f.atom1.i)&&(e.get(f.atom2.i)&&f.isCovalent())&&b.set(d)}return b},"~A,~N,JU.BS");h(c$,"getAtomRecordMOL",function(c,a,e,b,d,f,g,j,h){this.getPointTransf(c,a,d,f,g);c=d.getElementNumber();a=d.isDeleted()?"Xx":JU.Elements.elementSymbolFromNumber(c);f=d.getIsotopeNumber();var k=d.getFormalCharge();g=x(-1,[g]);j?(e.append("M  V30 ").appendI(b).append(" ").append(a).append(JU.PT.sprintf(" %12.5p %12.5p %12.5p 0",
"p",g)),0!=k&&e.append(" CHG=").appendI(k),0!=f&&e.append(" MASS=").appendI(f),e.append("\n")):h?(1!=b&&e.append(","),e.append("{"),6!=d.getElementNumber()&&e.append('"l":"').append(d.getElementSymbol()).append('",'),0!=k&&e.append('"c":').appendI(k).append(","),0!=f&&f!=JU.Elements.getNaturalIsotope(c)&&e.append('"m":').appendI(f).append(","),e.append('"x":').appendF(d.x).append(',"y":').appendF(d.y).append(',"z":').appendF(d.z).append("}")):(e.append(JU.PT.sprintf("%10.5p%10.5p%10.5p","p",g)),e.append(" ").append(a),
1==a.length&&e.append(" "),0<f&&(f-=JU.Elements.getNaturalIsotope(d.getElementNumber())),e.append(" "),JU.PT.rightJustify(e,"  ",""+f),JU.PT.rightJustify(e,"   ",""+(0==k?0:4-k)),e.append("  0  0  0  0\n"))},"~N,JM.ModelSet,JU.SB,~N,JM.Atom,JU.Quat,JU.P3,~B,~B");h(c$,"getPointTransf",function(c,a,e,b,d){a.isTrajectory(0<=c?c:e.mi)?a.trajectory.getFractional(e,d):d.setT(e);null!=b&&b.transform2(d,d)},"~N,JM.ModelSet,JM.Atom,JU.Quat,JU.P3");h(c$,"getBondRecordMOL",function(c,a,e,b,d,f,g){var j=b[e.atom1.i];
b=b[e.atom2.i];var h=e.getValence();3<h&&(h=1);switch(e.order&-131073){case 515:h=f?-3:4;break;case 66:h=f?-3:5;break;case 513:h=f||g?1:6;break;case 514:h=f||g?2:7;break;case 33:h=f?-1:8}d?c.append("M  V30 ").appendI(a).append(" ").appendI(h).append(" ").appendI(j).append(" ").appendI(b).appendC("\n"):f?(1!=a&&c.append(","),c.append('{"b":').appendI(j-1).append(',"e":').appendI(b-1),1!=h&&(c.append(',"o":'),0>h?c.appendF(-h/2):c.appendI(h)),c.append("}")):(JU.PT.rightJustify(c,"   ",""+j),JU.PT.rightJustify(c,
"   ",""+b),c.append("  ").appendI(h).append("  0  0  0\n"))},"JU.SB,~N,JM.Bond,~A,~B,~B,~B");w(c$,"getChimeInfo",function(c,a){switch(c){case 1073741982:break;case 1073741863:return this.getBasePairInfo(a);default:return this.getChimeInfoA(this.vwr.ms.at,c,a)}var e=new JU.SB;this.vwr.getChimeMessenger().getAllChimeInfo(e);return e.appendC("\n").toString().substring(1)},"~N,JU.BS");h(c$,"getChimeInfoA",function(c,a,e){var b=new JU.SB;b.append("\n");var d="",f=null,g=null,j=-1,h=0;if(null!=e)for(var k=
e.nextSetBit(0);0<=k;k=e.nextSetBit(k+1)){var m=c[k];switch(a){default:return"";case 1113589787:d=m.getInfo();break;case 1140850689:d=""+m.getAtomNumber();break;case 1086324742:d=m.getGroup3(!1);break;case 1086326788:case 1073742120:case 1086324744:case 1086324743:var n=m.getChainID(),d=0==n?" ":m.getChainIDStr();300<=n&&(d=JU.PT.esc(d));switch(a){case 1073742120:d="["+m.getGroup3(!1)+"]"+m.group.getSeqcodeString()+":"+d;break;case 1086324744:case 1086324743:m.mi!=j&&(b.appendC("\n"),h=0,j=m.mi,b.append("Model "+
m.getModelNumber()),f=g=null);m.group.chain!==f&&(b.appendC("\n"),h=0,f=m.group.chain,b.append("Chain "+d+":\n"),g=null);d=m.group;d!==g&&(g=d,1086324743==a?b.append(m.getGroup1("?")):(0==h++%5&&1<h&&b.appendC("\n"),JU.PT.leftJustify(b,"          ","["+m.getGroup3(!1)+"]"+m.getResno()+" ")));continue}}0>b.indexOf("\n"+d+"\n")&&b.append(d).appendC("\n")}1086324744==a&&b.appendC("\n");return b.toString().substring(1)},"~A,~N,JU.BS");w(c$,"getModelFileInfo",function(c){for(var a=this.vwr.ms,e=new JU.SB,
b=0;b<a.mc;++b)if(null==c||c.get(b)){var d='["'+a.getModelNumberDotted(b)+'"] = ';e.append("\n\nfile").append(d).append(JU.PT.esc(a.getModelFileName(b)));var f=a.getInfo(b,"modelID");null!=f&&e.append("\nid").append(d).append(JU.PT.esc(f));e.append("\ntitle").append(d).append(JU.PT.esc(a.getModelTitle(b)));e.append("\nname").append(d).append(JU.PT.esc(a.getModelName(b)));e.append("\ntype").append(d).append(JU.PT.esc(a.getModelFileType(b)))}return e.toString()},"JU.BS");h(c$,"getAllAtomInfo",function(c){for(var a=
new JU.Lst,e=new JU.P3,b=c.nextSetBit(0);0<=b;b=c.nextSetBit(b+1))a.addLast(this.getAtomInfoLong(b,e));return a},"JU.BS");h(c$,"getAtomInfoLong",function(c,a){var e=this.vwr.ms,b=e.at[c],d=new java.util.Hashtable;e.getAtomIdentityInfo(c,d,a);d.put("element",e.getElementName(c));d.put("elemno",Integer.$valueOf(e.at[c].getElementNumber()));d.put("x",Float.$valueOf(b.x));d.put("y",Float.$valueOf(b.y));d.put("z",Float.$valueOf(b.z));d.put("coord",JU.P3.newP(b));null!=e.vibrations&&null!=e.vibrations[c]&&
e.vibrations[c].getInfo(d);d.put("bondCount",Integer.$valueOf(b.getCovalentBondCount()));d.put("radius",Float.$valueOf(b.getRasMolRadius()/120));d.put("model",b.getModelNumberForLabel());var f=b.atomPropertyString(this.vwr,1086324748);null!=f&&d.put("shape",f);d.put("visible",Boolean.$valueOf(b.checkVisible()));d.put("clickabilityFlags",Integer.$valueOf(b.clickabilityFlags));d.put("visibilityFlags",Integer.$valueOf(b.shapeVisibilityFlags));d.put("spacefill",Float.$valueOf(b.getRadius()));f=JU.Escape.escapeColor(this.vwr.gdata.getColorArgbOrGray(b.colixAtom));
null!=f&&d.put("color",f);d.put("colix",Integer.$valueOf(b.colixAtom));(f=JU.C.isColixTranslucent(b.colixAtom))&&d.put("translucent",Boolean.$valueOf(f));d.put("formalCharge",Integer.$valueOf(b.getFormalCharge()));d.put("partialCharge",Float.$valueOf(b.getPartialCharge()));f=b.getSurfaceDistance100()/100;0<=f&&d.put("surfaceDistance",Float.$valueOf(f));if(e.am[b.mi].isBioModel){d.put("resname",b.getGroup3(!1));var f=b.group.getInsertionCode(),g=b.getResno();0<g&&d.put("resno",Integer.$valueOf(g));
0!=f.charCodeAt(0)&&d.put("insertionCode",""+f);d.put("name",e.at[c].getAtomName());d.put("chain",b.getChainIDStr());d.put("atomID",Integer.$valueOf(b.atomID));d.put("groupID",Integer.$valueOf(b.group.groupID));"\x00"!=b.altloc&&d.put("altLocation",""+b.altloc);d.put("structure",Integer.$valueOf(b.group.getProteinStructureType().getId()));d.put("polymerLength",Integer.$valueOf(b.group.getBioPolymerLength()));d.put("occupancy",Integer.$valueOf(b.getOccupancy100()));e=b.getBfactor100();d.put("temp",
Integer.$valueOf(I(e/100)))}return d},"~N,JU.P3");h(c$,"getAllBondInfo",function(c){var a=new JU.Lst,e=this.vwr.ms,b=e.bondCount,e=e.bo,d;r(c,String)&&(c=this.vwr.getAtomBitSet(c));var f=new JU.P3;if(r(c,Array)){d=c[0];var g=c[1];for(c=0;c<b;c++){var j=e[c].atom1.i,h=e[c].atom2.i;(d.get(j)&&g.get(h)||g.get(j)&&d.get(h))&&a.addLast(this.getBondInfo(c,f))}}else if(r(c,JM.BondSet)){d=c;for(c=d.nextSetBit(0);0<=c&&c<b;c=d.nextSetBit(c+1))a.addLast(this.getBondInfo(c,f))}else if(r(c,JU.BS)){d=c;g=1==d.cardinality()?
d.nextSetBit(0):-1;for(c=0;c<b;c++)(0<=g?e[c].atom1.i==g||e[c].atom2.i==g:d.get(e[c].atom1.i)&&d.get(e[c].atom2.i))&&a.addLast(this.getBondInfo(c,f))}return a},"~O");h(c$,"getBondInfo",function(c,a){var e=this.vwr.ms.bo[c],b=e.atom1,d=e.atom2,f=new java.util.Hashtable;f.put("_bpt",Integer.$valueOf(c));var g=new java.util.Hashtable;this.vwr.ms.getAtomIdentityInfo(b.i,g,a);var j=new java.util.Hashtable;this.vwr.ms.getAtomIdentityInfo(d.i,j,a);f.put("atom1",g);f.put("atom2",j);f.put("jmol_order","0x"+
Integer.toHexString(e.order));f.put("order",Float.$valueOf(JU.PT.fVal(JU.Edge.getBondOrderNumberFromOrder(e.order))));f.put("type",JU.Edge.getBondOrderNameFromOrder(e.order));f.put("radius",Float.$valueOf(e.mad/2E3));f.put("length_Ang",Float.$valueOf(b.distance(d)));f.put("visible",Boolean.$valueOf(0!=e.shapeVisibilityFlags));b=JU.Escape.escapeColor(this.vwr.gdata.getColorArgbOrGray(e.colix));null!=b&&f.put("color",b);f.put("colix",Integer.$valueOf(e.colix));JU.C.isColixTranslucent(e.colix)&&f.put("translucent",
Boolean.TRUE);return f},"~N,JU.P3");h(c$,"getAllChainInfo",function(c){for(var a=new java.util.Hashtable,e=new JU.Lst,b=this.vwr.ms.mc,d=0;d<b;++d){var f=new java.util.Hashtable,g=this.getChainInfo(d,c);0<g.size()&&(f.put("modelIndex",Integer.$valueOf(d)),f.put("chains",g),e.addLast(f))}a.put("models",e);return a},"JU.BS");h(c$,"getChainInfo",function(c,a){for(var e=this.vwr.ms.am[c],b=e.getChainCount(!0),d=new JU.Lst,f=new JU.P3,g=0;g<b;g++){for(var j=e.getChainAt(g),h=new JU.Lst,k=j.groupCount,
m=new java.util.Hashtable,n=0;n<k;n++){var y=j.groups[n];a.get(y.firstAtomIndex)&&h.addLast(y.getGroupInfo(n,f))}h.isEmpty()||(m.put("residues",h),d.addLast(m))}return d},"~N,JU.BS");h(c$,"getAllPolymerInfo",function(c){var a=new java.util.Hashtable;null!=this.vwr.ms.bioModelset&&this.vwr.ms.bioModelset.getAllPolymerInfo(c,a);return a},"JU.BS");h(c$,"getBasePairInfo",function(c){var a=new JU.SB,e=new JU.Lst;this.vwr.ms.calcRasmolHydrogenBonds(c,c,e,!0,1,!1,null);for(c=e.size();0<=--c;){var b=e.get(c);
JV.PropertyManager.getAtomResidueInfo(a,b.atom1);a.append(" - ");JV.PropertyManager.getAtomResidueInfo(a,b.atom2);a.append("\n")}return a.toString()},"JU.BS");c$.getAtomResidueInfo=h(c$,"getAtomResidueInfo",function(c,a){c.append("[").append(a.getGroup3(!1)).append("]").append(a.group.getSeqcodeString()).append(":");var e=a.getChainID();c.append(0==e?" ":a.getChainIDStr())},"JU.SB,JM.Atom");h(c$,"getAppletInfo",function(){var c=new java.util.Hashtable;c.put("htmlName",this.vwr.htmlName);c.put("syncId",
this.vwr.syncId);c.put("fullName",this.vwr.fullName);c.put("codeBase",""+JV.Viewer.appletCodeBase);this.vwr.isApplet&&(c.put("documentBase",JV.Viewer.appletDocumentBase),c.put("registry",this.vwr.sm.getRegistryInfo()));c.put("version",JV.JC.version);c.put("date",JV.JC.date);c.put("javaVendor",JV.Viewer.strJavaVendor);c.put("javaVersion",JV.Viewer.strJavaVersion+(!this.vwr.isJS?"":this.vwr.isWebGL?"(WebGL)":"(HTML5)"));c.put("operatingSystem",JV.Viewer.strOSName);return c});h(c$,"getAnimationInfo",
function(){var c=this.vwr.am,a=new java.util.Hashtable;a.put("firstModelIndex",Integer.$valueOf(c.firstFrameIndex));a.put("lastModelIndex",Integer.$valueOf(c.lastFrameIndex));a.put("animationDirection",Integer.$valueOf(c.animationDirection));a.put("currentDirection",Integer.$valueOf(c.currentDirection));a.put("displayModelIndex",Integer.$valueOf(c.cmi));null!=c.animationFrames&&(a.put("isMovie",Boolean.TRUE),a.put("frames",JU.Escape.eAI(c.animationFrames)),a.put("currentAnimationFrame",Integer.$valueOf(c.caf)));
a.put("displayModelNumber",this.vwr.getModelNumberDotted(c.cmi));a.put("displayModelName",0<=c.cmi?this.vwr.getModelName(c.cmi):"");a.put("animationFps",Integer.$valueOf(c.animationFps));a.put("animationReplayMode",JS.T.nameOf(c.animationReplayMode));a.put("firstFrameDelay",Float.$valueOf(c.firstFrameDelay));a.put("lastFrameDelay",Float.$valueOf(c.lastFrameDelay));a.put("animationOn",Boolean.$valueOf(c.animationOn));a.put("animationPaused",Boolean.$valueOf(c.animationPaused));return a});h(c$,"getBoundBoxInfo",
function(){var c=this.vwr.ms.getBoxInfo(null,1).getBoundBoxPoints(!0),a=new java.util.Hashtable;a.put("center",JU.P3.newP(c[0]));a.put("vector",JU.V3.newV(c[1]));a.put("corner0",JU.P3.newP(c[2]));a.put("corner1",JU.P3.newP(c[3]));return a});h(c$,"getShapeInfo",function(){var c=new java.util.Hashtable,a=new JU.SB,e=this.vwr.shm.shapes;if(null!=e)for(var b=0;37>b;++b){var d=e[b];if(null!=d){var f=JV.JC.shapeClassBases[b],d=d.getShapeDetail();null!=d&&c.put(f,d)}}0<a.length()&&c.put("shapeCommands",
a.toString());return c});h(c$,"getAnnotationInfo",function(c,a){var e=this.vwr.getAtomBitSet(c),e=this.vwr.ms.getModelBS(e,!1).nextSetBit(0);if(0>e)return null;var b=this.vwr.ms.getModelAuxiliaryInfo(e).get(1073741925==a?"domains":"validation");if(null==b||6!=b.tok)return null;this.vwr.getAnnotationParser(!1).initializeAnnotation(b,a,e);return b.mapGet("_list")},"~O,~N");h(c$,"getMeasurementInfo",function(){return this.vwr.getShapeProperty(6,"info")});h(c$,"getMouseInfo",function(){if(!this.vwr.haveDisplay)return null;
for(var c=new java.util.Hashtable,a=new JU.Lst,e=this.vwr.acm,b,d=e.b.getBindings().values().iterator();d.hasNext()&&((b=d.next())||1);)r(b,Boolean)||(JU.AU.isAI(b)&&(b=x(-1,[JV.binding.Binding.getMouseActionName(b[0],!1),JV.ActionManager.getActionName(b[1])])),a.addLast(b));c.put("bindings",a);c.put("bindingName",e.b.name);c.put("actionNames",JV.ActionManager.actionNames);c.put("actionInfo",JV.ActionManager.actionInfo);c.put("bindingInfo",JU.PT.split(e.getBindingInfo(null),"\n"));return c});w(c$,
"getPdbAtomData",function(c,a,e,b){if(0==this.vwr.ms.ac||0>c.nextSetBit(0))return"";null==a?a=this.vwr.getOutputChannel(null,null):(e=(new Boolean(e|0<=a.getType().indexOf("PQR"))).valueOf(),b=(new Boolean(b|0<=a.getType().indexOf("-coord true"))).valueOf());var d=this.vwr.ms.at,f=this.vwr.ms.am,g="%6.2Q%6.2b          ";if(e){g="%8.4P%7.4V       ";e=0;for(var j=c.nextSetBit(0);0<=j;j=c.nextSetBit(j+1))e+=d[j].getPartialCharge();a.append("REMARK   1 PQR file generated by Jmol "+JV.Viewer.getJmolVersion()).append("\nREMARK   1 created "+
new java.util.Date).append("\nREMARK   1 Forcefield Used: unknown\nREMARK   1").append("\nREMARK   5").append("\nREMARK   6 Total charge on this protein: "+e+" e\nREMARK   6\n")}j=d[c.nextSetBit(0)].mi;e=-1;var h=c.length()-1,h=j!=d[h].mi,k=this.vwr.ms.getModelBS(c,!0),m=k.cardinality(),n=new JU.Lst,y=f[j].isPdbWithMultipleBonds,l=!1;if(1<m)for(var v=null,t=0,j=k.nextSetBit(0);0<=j;j=k.nextSetBit(j+1)){var p=this.vwr.ms.getModelAuxiliaryInfo(j).get("PDB_CONECT_bonds");if(p!==v||!this.vwr.ms.am[j].isBioModel)if(v=
p,0<t++){l=!0;break}}var v=new JU.P3,t=x(-1,[v]),u=b?this.vwr.tm.getRotationQ():null;b=new java.util.Hashtable;for(var k=!1,q=l?D(m,0):null,m=0,j=c.nextSetBit(0);0<=j;j=c.nextSetBit(j+1)){p=d[j];k=f[p.mi].isBioModel;h&&p.mi!=e&&(-1!=e&&(m=this.fixPDBFormat(n,b,a,q,m),a.append("ENDMDL\n")),n=new JU.Lst,e=p.mi,a.append("MODEL     "+(e+1)+"\n"));var l=p.getAtomName(),r=2==p.getElementSymbol().length||4<=l.length||JU.PT.isDigit(l.charAt(0)),l=p.isHetero(),l=k?l?r?JM.LabelToken.compile(this.vwr,"HETATM%5.-5i %-4.4a%1A%3.3n %1c%4.-4R%1E   _XYZ_"+
g,"\x00",null):JM.LabelToken.compile(this.vwr,"HETATM%5.-5i  %-3.3a%1A%3.3n %1c%4.-4R%1E   _XYZ_"+g,"\x00",null):r?JM.LabelToken.compile(this.vwr,"ATOM  %5.-5i %-4.4a%1A%3.3n %1c%4.-4R%1E   _XYZ_"+g,"\x00",null):JM.LabelToken.compile(this.vwr,"ATOM  %5.-5i  %-3.3a%1A%3.3n %1c%4.-4R%1E   _XYZ_"+g,"\x00",null):r?JM.LabelToken.compile(this.vwr,"HETATM%5.-5i %-4.4a%1AUNK %1c   1%1E   _XYZ_"+g,"\x00",null):JM.LabelToken.compile(this.vwr,"HETATM%5.-5i  %-3.3a%1AUNK %1c   1%1E   _XYZ_"+g,"\x00",null),k=
p.getElementSymbolIso(!1).toUpperCase(),k=this.pdbKey(p.group.getBioPolymerIndexInModel())+this.pdbKey(p.group.groupIndex)+JM.LabelToken.formatLabelAtomArray(this.vwr,p,l,"\x00",null,v)+(1==k.length?" "+k:k.substring(0,2))+"  ";this.getPointTransf(-1,this.vwr.ms,p,u,v);p=JU.PT.sprintf("%8.3p%8.3p%8.3p","p",t);24<p.length&&(p=JU.PT.sprintf("%8.2p%8.2p%8.2p","p",t));k=JU.PT.rep(k,"_XYZ_",p);n.addLast(k)}this.fixPDBFormat(n,b,a,q,m);h&&a.append("ENDMDL\n");e=m=-1;k=!1;for(j=c.nextSetBit(0);0<=j;j=c.nextSetBit(j+
1))if(p=d[j],h&&p.mi!=e&&(e=p.mi,k=f[e].isBioModel,m++),l=!k||p.isHetero(),g=!l&&16==p.getElementNumber(),l||y||g)if(n=p.bonds,null!=n)for(v=0;v<n.length;v++)if(u=p.getAtomNumber(),q=n[v].getOtherAtom(p),c.get(q.i)&&(t=n[v].getCovalentOrder(),!(1==t&&(y&&!l&&!g||g&&16!=q.getElementNumber()))))switch(q=q.getAtomNumber(),t){case 2:case 3:if(q<u)continue;case 1:u=b.get(""+m+"."+Integer.$valueOf(u));q=b.get(""+m+"."+Integer.$valueOf(q));if(null==u||null==q)break;a.append("CONECT").append(JU.PT.formatStringS("%5s",
"s",""+u));u=JU.PT.formatStringS("%5s","s",""+q);for(q=0;q<t;q++)a.append(u);a.append("\n")}return a.toString()},"JU.BS,JU.OC,~B,~B,~B");h(c$,"pdbKey",function(c){c=0>c?"~999":"   "+c;return c.substring(c.length-4)},"~N");h(c$,"fixPDBFormat",function(c,a,e,b,d){c.addLast("~999~999XXXXXX99999999999999999999~99~");var f=Array(c.size());c.toArray(f);java.util.Arrays.sort(f);c.clear();for(var g=0,j=f.length;g<j;g++)c.addLast(f[g]);for(var h=f=null,j=c.size(),k=0,m=null==b?0:b[d],g=0;g<j;g++){var n=c.get(g),
r=n.substring(0,4),n=n.substring(8),l=!1,v=0<=n.indexOf("~99~");if(!r.equals(f)||v)null!=f&&!f.equals("~999")&&(l=!0,n="TER   "+h.substring(6,11)+"      "+h.substring(17,27),c.add(g,r+"~~~~"+n),j++),f=r;if(v&&!l)break;h=n;k=g+1+m;null!=a&&!l&&a.put(""+d+"."+Integer.$valueOf(JU.PT.parseInt(n.substring(6,11))),Integer.$valueOf(k));r="     "+k;e.append(n.substring(0,6)).append(r.substring(r.length-5)).append(n.substring(11)).append("\n")}null!=b&&++d<b.length&&(b[d]=k);return d},"JU.Lst,java.util.Map,JU.OC,~A,~N");
w(c$,"getPdbData",function(c,a,e,b,d,f){this.vwr.ms.isJmolDataFrameForModel(c)&&(c=this.vwr.ms.getJmolDataSourceFrame(c));if(0>c)return"";var g=this.vwr.ms.am[c],j=g.isBioModel;if(null==b&&!j)return null;null==d&&(d=this.vwr.getOutputChannel(null,null));var h=new JU.SB,k=0<=a.indexOf("draw"),m=null,n=new JU.BS,r="\x00",l=this.vwr.ms.getLabeler().compile(this.vwr,"ATOM  %-6i%4a%1A%3.-3n %1c%4R%1E   ","\x00",null);if(null==b)r=11<a.length&&0<=a.indexOf("quaternion ")?a.charAt(11):"R",g.getPdbData(a,
r,k,e,d,l,h,n),m=this.vwr.getModelUndeletedAtomsBitSet(c);else{m=b[0];c=b[1];var g=b[2],v=b[3],t=null!=g,p=null!=v,u=b[4],q=b[5],w=b[6],E=b[7],B=b[8],C=b[9];b=null!=w&&null==B;var D=this.vwr.ms.at;if(b){d.append("REMARK   6 Jmol PDB-encoded data: ").append(a).append("; ").append(JV.Viewer.getJmolVersion()).append("; ").append(this.vwr.apiPlatform.getDateFormat(null)).append("\n");d.append("REMARK   6 Jmol data").append(" min = ").append(JU.Escape.eP(u)).append(" max = ").append(JU.Escape.eP(q)).append(" unScaledXyz = xyz * ").append(JU.Escape.eP(w)).append(" + ").append(JU.Escape.eP(E)).append(";\n");
q=null;for(a=m.nextSetBit(0);0<=a;a=m.nextSetBit(a+1))if(u=""+D[a].getAtomName(),null!=q||4<u.length)null==q?(q="",a=-1):q+=" "+u;null!=q&&d.append("REMARK   6 Jmol atom names").append(q).append("\n");q=null;for(a=m.nextSetBit(0);0<=a;a=m.nextSetBit(a+1))if(u=""+D[a].getGroup3(!0),null!=q||3<u.length)null==q?(q="",a=-1):q+=" "+u;null!=q&&d.append("REMARK   6 Jmol residue names").append(q).append("\n");for(a=0;a<C.length;a++)null!=C[a]&&d.append("REMARK   6 Jmol property ").append(C[a]).append(";\n")}C=
null;u=new JU.P3;b||(null==B&&(B="%-5i %-10s %-13.5f "+(p?"%-13.5f %-13.5f":t?"%-13.5f":"")),B+="\n");a=m.nextSetBit(0);for(q=0;0<=a;a=m.nextSetBit(a+1),q++){var w=c[q],E=t?g[q]:0,F=p?v[q]:0;if(!Float.isNaN(w)&&!Float.isNaN(E)&&!Float.isNaN(F)){var A=D[a];b?(d.append(JM.LabelToken.formatLabelAtomArray(this.vwr,A,l,"\x00",null,u)),j&&n.set(a),d.append(JU.PT.sprintf("%-8.2f%-8.2f%-10.2f    %6.3f          %2s    %s\n","ssF",x(-1,[A.getElementSymbolIso(!1).toUpperCase(),"",z(-1,[w,E,F,0])]))),null!=C&&
C.group.getBioPolymerIndexInModel()==A.group.getBioPolymerIndexInModel()&&h.append("CONECT").append(JU.PT.formatStringI("%5i","i",C.getAtomNumber())).append(JU.PT.formatStringI("%5i","i",A.getAtomNumber())).appendC("\n")):p?d.append(JU.PT.sprintf(B,"isF",x(-1,[Integer.$valueOf(A.getAtomNumber()),A.getAtomName(),z(-1,[w,E,F])]))):t?d.append(JU.PT.sprintf(B,"isF",x(-1,[Integer.$valueOf(A.getAtomNumber()),A.getAtomName(),z(-1,[w,E])]))):d.append(JU.PT.sprintf(B,"isF",x(-1,[Integer.$valueOf(A.getAtomNumber()),
A.getAtomName(),z(-1,[w])])));C=A}}}d.append(h.toString());if(k)return d.toString();e.and(m);j&&f&&d.append("\n\n"+this.vwr.ms.getProteinStructureState(n,"R"==r?4138:1073742086));return d.toString()},"~N,~S,JU.BS,~A,JU.OC,~B");w(c$,"getModelCml",function(c,a,e){var b=new JU.SB;if(0==c.cardinality())return"";this.vwr.isJS&&J.api.Interface.getInterface("JU.XmlUtil",this.vwr,"file");JU.XmlUtil.openTag(b,"molecule");JU.XmlUtil.openTag(b,"atomArray");for(var d=new JU.BS,f=this.vwr.ms.at,g=c.nextSetBit(0);0<=
g&&!(0>--a);g=c.nextSetBit(g+1)){var h=f[g],r=h.getAtomName();JU.PT.rep(r,'"',"''");d.set(h.i);JU.XmlUtil.appendTag(b,"atom/",x(-1,["id","a"+(h.i+1),"title",h.getAtomName(),"elementType",h.getElementSymbol(),"x3",""+h.x,"y3",""+h.y,"z3",""+h.z]))}JU.XmlUtil.closeTag(b,"atomArray");if(e){JU.XmlUtil.openTag(b,"bondArray");c=this.vwr.ms.bondCount;a=this.vwr.ms.bo;for(g=0;g<c;g++)e=a[g],f=e.atom2,d.get(e.atom1.i)&&d.get(f.i)&&(f=JU.Edge.getCmlBondOrder(e.order),null!=f&&JU.XmlUtil.appendTag(b,"bond/",
x(-1,["atomRefs2","a"+(e.atom1.i+1)+" a"+(e.atom2.i+1),"order",f])));JU.XmlUtil.closeTag(b,"bondArray")}JU.XmlUtil.closeTag(b,"molecule");return b.toString()},"JU.BS,~N,~B,~B,~B");w(c$,"fixJMEFormalCharges",function(c,a){var e=!1;if(null==c)return a;for(var b=c.nextSetBit(0);0<=b;b=c.nextSetBit(b+1)){var d=this.vwr.ms.at[b];if(0!=d.getFormalCharge()){e=!0;break}}if(!e)return a;e=this.vwr.getSmilesMatcher().getMapForJME(a,this.vwr.ms.at,c);if(null==e)return a;for(var d=e[0],f=e[1],e=JU.PT.getTokens(a),
g=JU.PT.parseInt(e[0]),g=D(g,0),b=d.length;0<=--b;)g[d[b]]=f[b]+1;b=0;for(f=2;f<e.length;f+=3){var h=e[f];if(-2147483648!=JU.PT.parseInt(h))break;h=JU.PT.replaceAllCharacters(h,"+-","");d=this.vwr.ms.at[g[b++]-1];if(!d.getElementSymbol().equals(h))return a;d=d.getFormalCharge();0!=d&&(e[f]=h+(0<d?"+":"-")+(1<Math.abs(d)?""+Math.abs(d):""))}return JU.PT.join(e," ",0)},"JU.BS,~S");H(c$,"atomExpression","<atom selection>");c$.propertyTypes=c$.prototype.propertyTypes=x(-1,"appletInfo;;;fileName;;;fileHeader;;;fileContents;<pathname>;;fileContents;;;animationInfo;;;modelInfo;<atom selection>;{*};ligandInfo;<atom selection>;{*};shapeInfo;;;measurementInfo;;;centerInfo;;;orientationInfo;;;transformInfo;;;;;;atomInfo;<atom selection>;(visible);bondInfo;<atom selection>;(visible);chainInfo;<atom selection>;(visible);polymerInfo;<atom selection>;(visible);moleculeInfo;<atom selection>;(visible);stateInfo;<state type>;all;extractModel;<atom selection>;(visible);jmolStatus;statusNameList;;jmolViewer;;;messageQueue;;;auxiliaryInfo;<atom selection>;{*};boundBoxInfo;;;dataInfo;<data type>;types;image;<width=www,height=hhh>;;evaluate;<expression>;;menu;<type>;current;minimizationInfo;;;pointGroupInfo;<atom selection>;(visible);fileInfo;<type>;;errorMessage;;;mouseInfo;;;isosurfaceInfo;;;isosurfaceData;;;consoleText;;;JSpecView;<key>;;scriptQueueInfo;;;nmrInfo;<elementSymbol> or 'all' or 'shifts';all;variableInfo;<name>;all;domainInfo;<atom selection>;{visible};validationInfo;<atom selection>;{visible};service;<hashTable>;;CIFInfo;<filename>;".split(";"));
H(c$,"PROP_APPLET_INFO",0,"PROP_FILENAME",1,"PROP_FILEHEADER",2,"PROP_FILECONTENTS_PATH",3,"PROP_FILECONTENTS",4,"PROP_ANIMATION_INFO",5,"PROP_MODEL_INFO",6,"PROP_LIGAND_INFO",7,"PROP_SHAPE_INFO",8,"PROP_MEASUREMENT_INFO",9,"PROP_CENTER_INFO",10,"PROP_ORIENTATION_INFO",11,"PROP_TRANSFORM_INFO",12,"PROP_ATOM_INFO",14,"PROP_BOND_INFO",15,"PROP_CHAIN_INFO",16,"PROP_POLYMER_INFO",17,"PROP_MOLECULE_INFO",18,"PROP_STATE_INFO",19,"PROP_EXTRACT_MODEL",20,"PROP_JMOL_STATUS",21,"PROP_JMOL_VIEWER",22,"PROP_MESSAGE_QUEUE",
23,"PROP_AUXILIARY_INFO",24,"PROP_BOUNDBOX_INFO",25,"PROP_DATA_INFO",26,"PROP_IMAGE",27,"PROP_EVALUATE",28,"PROP_MENU",29,"PROP_MINIMIZATION_INFO",30,"PROP_POINTGROUP_INFO",31,"PROP_FILE_INFO",32,"PROP_ERROR_MESSAGE",33,"PROP_MOUSE_INFO",34,"PROP_ISOSURFACE_INFO",35,"PROP_ISOSURFACE_DATA",36,"PROP_CONSOLE_TEXT",37,"PROP_JSPECVIEW",38,"PROP_SCRIPT_QUEUE_INFO",39,"PROP_NMR_INFO",40,"PROP_VAR_INFO",41,"PROP_DOM_INFO",42,"PROP_VAL_INFO",43,"PROP_SERVICE",44,"PROP_CIF_INFO",45,"PROP_COUNT",46,"readableTypes",
x(-1," stateinfo extractmodel filecontents fileheader image menu minimizationInfo".split(" ")))})})(Clazz,Clazz.getClassName,Clazz.newLongArray,Clazz.doubleToByte,Clazz.doubleToInt,Clazz.doubleToLong,Clazz.declarePackage,Clazz.instanceOf,Clazz.load,Clazz.instantialize,Clazz.decorateAsClass,Clazz.floatToInt,Clazz.floatToLong,Clazz.makeConstructor,Clazz.defineEnumConstant,Clazz.exceptionOf,Clazz.newIntArray,Clazz.defineStatics,Clazz.newFloatArray,Clazz.declareType,Clazz.prepareFields,Clazz.superConstructor,
Clazz.newByteArray,Clazz.declareInterface,Clazz.p0p,Clazz.pu$h,Clazz.newShortArray,Clazz.innerTypeInstance,Clazz.isClassDefined,Clazz.prepareCallback,Clazz.newArray,Clazz.castNullAs,Clazz.floatToShort,Clazz.superCall,Clazz.decorateAsType,Clazz.newBooleanArray,Clazz.newCharArray,Clazz.implementOf,Clazz.newDoubleArray,Clazz.overrideConstructor,Clazz.clone,Clazz.doubleToShort,Clazz.getInheritedLevel,Clazz.getParamsType,Clazz.isAF,Clazz.isAB,Clazz.isAI,Clazz.isAS,Clazz.isASS,Clazz.isAP,Clazz.isAFloat,
Clazz.isAII,Clazz.isAFF,Clazz.isAFFF,Clazz.tryToSearchAndExecute,Clazz.getStackTrace,Clazz.inheritArgs,Clazz.alert,Clazz.defineMethod,Clazz.overrideMethod,Clazz.declareAnonymous,Clazz.cloneFinals);
