(function(S,T,U,K,V,H,p,L,M,N,W,X,O,Y,Z,P,I,w,$,Q,aa,ba,R,ca,da,ea,fa,ga,ha,v,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,Ia,j,r){H("J.api");R(J.api,"JmolPropertyManager");H("JV");L(["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$=N(function(){this.map=this.vwr=null;M(this,arguments)},JV,"PropertyManager",null,J.api.JmolPropertyManager);Q(c$,function(){this.map=new java.util.Hashtable});O(c$,function(){});r(c$,"setViewer",function(b){this.vwr=b;for(var c=b=0;b<JV.PropertyManager.propertyTypes.length;b+=3,c++)0<JV.PropertyManager.propertyTypes[b].length&&this.map.put(JV.PropertyManager.propertyTypes[b].toLowerCase(),Integer.$valueOf(c))},"JV.Viewer");r(c$,"getPropertyNumber",function(b){b=this.map.get(null==b?
"":b.toLowerCase());return null==b?-1:b.intValue()},"~S");r(c$,"getDefaultPropertyParam",function(b){return 0>b?"":JV.PropertyManager.propertyTypes[3*b+2]},"~N");r(c$,"checkPropertyParameter",function(b){b=this.getPropertyNumber(b);b=JV.PropertyManager.getParamType(b);return 0<b.length&&"<atom selection>"!==b},"~S");r(c$,"getProperty",function(b,c,e){135!=JV.PropertyManager.propertyTypes.length&&JU.Logger.warn("propertyTypes is not the right length: "+JV.PropertyManager.propertyTypes.length+" != 135");
if(0<=c.indexOf(".")||0<=c.indexOf("[")){var a=this.getArguments(c);e=this.extractProperty(this.getPropertyAsObject(a[0].asString(),e,null),a,1,null,!1)}else e=this.getPropertyAsObject(c,e,b);if(null==b)return e;(a=b.equalsIgnoreCase("readable"))&&(b=JV.PropertyManager.isReadableAsString(c)?"String":"JSON");return b.equalsIgnoreCase("String")?null==e?"":e.toString():a?JU.Escape.toReadable(c,e):b.equalsIgnoreCase("JSON")?JS.SV.safeJSON(c,e):e},"~S,~S,~O");j(c$,"getArguments",function(b){var c=b.toLowerCase(),
e=-1;if(0<=b.indexOf('"')||0<=b.indexOf("'"))b=this.fixSelectQuotes(b);for(;0<=(e=c.indexOf("[select ",++e));){var a=c.indexOf(" where ",e),d=c.indexOf(" wherein ",e);0<d&&d<a&&(a=d);d=c.lastIndexOf("]");0>a||a>d||(b=b.substring(0,e+1)+b.substring(e+1,d).$replace(".","\u0001").$replace("[","\u0002").$replace("]","\u0003")+b.substring(d))}b=JU.PT.rep(JU.PT.rep(b.$replace("]","\x00").$replace("[","\x00"),"..","\u0004").$replace(".","\x00").$replace("\u0001",".").$replace("\u0002","[").$replace("\u0003",
"]"),"\u0004","..");b=JU.PT.rep(b,"\x00\x00","\x00");b=JU.PT.split(JU.PT.trim(b,"\x00"),"\x00");for(var c=Array(b.length),e=0,f;e<b.length;e++)c[e]=b[e].startsWith("'")||b[e].startsWith('"')?JS.SV.newS(JU.PT.trim(b[e],"'\"")):-2147483648==(f=JU.PT.parseInt(b[e]))?JS.SV.newS(b[e]):JS.SV.newI(f);return c},"~S");j(c$,"fixSelectQuotes",function(b){b=b.toCharArray();for(var c=!1,e=!1,a=!1,d=b.length;0<=--d;)switch(b[d]){case "'":a||(c=e=!c);break;case '"':e||(c=a=!c);break;case ".":c&&(b[d]="\u0001");
break;case "[":c&&(b[d]="\u0002");break;case "]":c&&(b[d]="\u0003")}return b=String.instantialize(b)},"~S");r(c$,"extractProperty",function(b,c,e,a,d){0>e&&(c=this.getArguments(c),e=0);if(e>=c.length)return b;d||(c=this.compileSelect(c));var f,g=c[e++];d=JS.SV.oValue(b);switch(g.tok){case 2:f=g.intValue-1;if(p(d,JU.Lst))return 0>f&&(f+=d.size()),0<=f&&f<d.size()?this.extractProperty(d.get(f),c,e,null,!0):"";if(p(d,JU.M3))return a=d,a=v(-1,[w(-1,[a.m00,a.m01,a.m02]),w(-1,[a.m10,a.m11,a.m12]),w(-1,
[a.m20,a.m21,a.m22])]),0>f&&(f+=3),0<=f&&3>f?this.extractProperty(a,c,--e,null,!0):"";if(p(d,JU.M4))return a=d,a=v(-1,[w(-1,[a.m00,a.m01,a.m02,a.m03]),w(-1,[a.m10,a.m11,a.m12,a.m13]),w(-1,[a.m20,a.m21,a.m22,a.m23]),w(-1,[a.m30,a.m31,a.m32,a.m33])]),0>f&&(f+=4),0<=f&&4>f?this.extractProperty(a,c,--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],c,e,null,!0):"";if(JU.AU.isAS(d)||p(d,Array))return 0>f&&(f+=d.length),0<=f&&f<d.length?d[f]:"";break;case 1275082245:case 4:if(p(d,java.util.Map)){var h=!1,n=b=!1;f=1275082245==g.tok?g.value[0]:null;var k=null;if(1275082245==g.tok)if(n=!0,k=g.value[1],g=g.myName,b=0<=g.indexOf(";"),g.contains("**")){for(var l=0==f.size(),D="",q,m=d.entrySet().iterator();m.hasNext()&&
((q=m.next())||1);)for(var j=q.getKey(),g=l?1:f.size();0<=--g;)if(l||JU.PT.isLike(j,f.get(g))){var h=q.getValue(),s=!1;switch(p(h,JS.SV)?h.tok:0){case 7:s=!0;h=h.getList();break;case 6:case 14:h=h.getMap();break;default:if(!p(h,java.util.Map)&&!(s=p(h,JU.Lst)))h=null}if(null!=h){if(s){null==a&&(a=new JU.Lst);c=h;e=c.size();for(d=0;d<e;d++)if(h=c.get(d),p(h,JS.SV)&&null!=(h=h.getMap()))(null==k||this.vwr.checkSelect(h,k))&&a.addLast(h);return a}if(null==k||this.vwr.checkSelect(h,k))D+=","+j}}if(0==
D.length)return new JU.Lst;g=D.substring(1);h=!b;f=null}else{if(null!=k&&!this.vwr.checkSelect(d,k))return""}else if(g=g.asString(),g.equalsIgnoreCase("keys")){a=new JU.Lst;for(d=d.keySet().iterator();d.hasNext()&&((j=d.next())||1);)a.addLast(j);return this.extractProperty(a,c,e,null,!0)}k=b||0<=g.indexOf(",")||0<=g.indexOf(";");n&&!k&&(k=!0,g+=",");q=b||g.startsWith("*")||g.endsWith("*")||k;j=null!=a;if(q&&(j||(a=new JU.Lst),!b&&(null==f?1==g.length:0==f.size()))){if(e==c.length){if(!j)return d;
a.addLast(d);return a}return this.extractProperty(d,c,e,a,!0)}g.contains("**")&&(g=JU.PT.rep(g,"**","*"));q&&!k&&(g+=",");if(h||b||g.contains(",")){n=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],n,b?a:null)}else for(g=f.size();0<=--g;)JV.PropertyManager.getMapSubset(d,f.get(g),n,b?a:null);if(h&&!j)return n;if(e==c.length){if(!b){if(!j)return n;a.addLast(n)}return a}return this.extractProperty(n,
c,e,j?a:null,!0)}g=this.checkMap(d,g,q,a,c,e,n);return null!=g&&!q?this.extractProperty(d.get(g),c,e,null,!0):!q?"":a}if(p(d,JU.Lst)){null==a&&(a=new JU.Lst);e--;for(f=0;f<d.size();f++)h=d.get(f),(p(h,java.util.Map)||p(h,JU.Lst)||p(h,JS.SV)&&(null!=h.getMap()||null!=h.getList()))&&this.extractProperty(h,c,e,a,!0);return a}}return b},"~O,~O,~N,JU.Lst,~B");c$.getMapSubset=j(c$,"getMapSubset",function(b,c,e,a){if(c.startsWith('"')||c.startsWith("'"))c=JU.PT.trim(c,"\"'");var d=b.get(c);if(null!=d)null==
a?e.put(c,d):a.addLast(d);else{var f;for(b=b.entrySet().iterator();b.hasNext()&&((f=b.next())||1);)d=f.getKey(),JU.PT.isLike(d,c)&&(null==a?e.put(d,f.getValue()):a.addLast(f.getValue()))}},"java.util.Map,~S,java.util.Map,JU.Lst");j(c$,"compileSelect",function(b){for(var c=null,e=b.length;0<=--e;)if(4==b[e].tok){var a=b[e].value,d=a.toUpperCase();if(d.startsWith("SELECT ")){null==c&&(c=JU.AU.arrayCopyObject(b,b.length));d=(a=a.substring(6).trim()).toUpperCase();if(d.startsWith("WHERE ")||d.startsWith("WHEREIN "))d=
(a="* "+a).toUpperCase();var f=d.indexOf(" WHEREIN "),g=0>f?"":0<=a.indexOf(";")?";**":",**";0>f&&(f=d.indexOf(" WHERE "));d=a.substring(0,0>f?a.length:f).trim();d.startsWith("(")&&d.endsWith(")")&&(d=d.substring(1,d.length-1)+";");0>f?c[e]=JS.SV.newV(1275082245,v(-1,[this.getKeys(d),null])):(d+=g,c[e]=JS.SV.newV(1275082245,v(-1,[this.getKeys(d),this.vwr.compileExpr(a.substring(f+6+g.length).trim())])));c[e].myName=d}}return null==c?b:c},"~A");j(c$,"getKeys",function(b){var c=new JU.Lst;b=JU.PT.rep(JU.PT.rep(b,
"**","*"),";",",")+",";for(var e=0,a=-1;0<=(a=b.indexOf(",",a+1));)if(a>e){var d=b.substring(e,a);if(d.equals("*")){if(0==c.size())break}else c.addLast(d),e=a+1}return c},"~S");j(c$,"checkMap",function(b,c,e,a,d,f,g){var h=null==a&&b.containsKey(c);if(!h)for(var n=c.contains(";"),k=n?JU.PT.split(c,";"):null,l=e&&!g?c.toLowerCase():null,j,q=b.keySet().iterator();q.hasNext()&&((j=q.next())||1);){if(n){for(var m=k.length;0<=--m;c=null)if(c=k[m],0!=c.length){if(g){if(!JU.PT.isLike(j,c))continue;break}l=
0<=c.indexOf("*")?c.toLowerCase():null;if(this.checkKey(j,c,l))break}if(null==c)continue}else if(g?!JU.PT.isLike(j,c):!this.checkKey(j,c,l))continue;if(null==a)return j;a.addLast(this.extractProperty(b.get(j),d,f,null,!0));if(!e&&!n)return null}return h?c:null},"java.util.Map,~S,~B,JU.Lst,~O,~N,~B");j(c$,"checkKey",function(b,c,e){return b.equalsIgnoreCase(c)||null!=e&&JU.PT.isLike(b.toLowerCase(),e)},"~S,~S,~S");c$.getPropertyName=j(c$,"getPropertyName",function(b){return 0>b?"":JV.PropertyManager.propertyTypes[3*
b]},"~N");c$.getParamType=j(c$,"getParamType",function(b){return 0>b?"":JV.PropertyManager.propertyTypes[3*b+1]},"~N");c$.isReadableAsString=j(c$,"isReadableAsString",function(b){for(var c=JV.PropertyManager.readableTypes.length;0<=--c;)if(b.equalsIgnoreCase(JV.PropertyManager.readableTypes[c]))return!0;return!1},"~S");j(c$,"getPropertyAsObject",function(b,c,e){if(b.equals("tokenList"))return JS.T.getTokensLike(c);var a=this.getPropertyNumber(b),d=null!=c&&0<c.toString().length;c=d?c:this.getDefaultPropertyParam(a);
switch(a){case 0:return this.getAppletInfo();case 5:return this.getAnimationInfo();case 14:return this.getAllAtomInfo(this.vwr.getAtomBitSet(c));case 24:return this.vwr.getAuxiliaryInfoForAtoms(c);case 15:return this.getAllBondInfo(c);case 25:return this.getBoundBoxInfo();case 10:return this.vwr.tm.fixedRotationCenter;case 16:return this.getAllChainInfo(this.vwr.getAtomBitSet(c));case 37:return this.vwr.getProperty("DATA_API","consoleText",null);case 26:return this.vwr.getDataObj(c.toString(),null,
-1);case 33:return this.vwr.getErrorMessageUn();case 28:return this.vwr.evaluateExpression(c.toString());case 20:return this.vwr.getModelExtract(c,!0,!1,"MOL");case 32:return JV.PropertyManager.getFileInfo(this.vwr.getFileData(),c.toString());case 1:return this.vwr.fm.getFullPathName(!1);case 2:return this.vwr.getFileHeader();case 4:case 3:return d?this.vwr.getFileAsString3(c.toString(),!0,null):this.vwr.getCurrentFileAsString("prop");case 27:return b=c.toString().toLowerCase(),this.getImage(b,0>
b.indexOf("g64")&&0>b.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(c.toString());case 41:return this.getVariables(c.toString());case 21:return this.vwr.getStatusChanged(c.toString());case 22:return this.vwr;case 38:return this.vwr.getJspecViewProperties(c);case 7:return this.getLigandInfo(this.vwr.getAtomBitSet(c));case 9:return this.getMeasurementInfo();
case 29:return this.vwr.getMenu(c.toString());case 23:return this.vwr.sm.messageQueue;case 30:return this.vwr.getMinimizationInfo();case 6:return this.getModelInfo(this.vwr.getAtomBitSet(c));case 18:return this.getMoleculeInfo(this.vwr.getAtomBitSet(c));case 34:return this.getMouseInfo();case 11:return this.vwr.tm.getOrientationInfo();case 31:return this.vwr.ms.getPointGroupInfo(this.vwr.getAtomBitSet(c));case 17:return this.getAllPolymerInfo(this.vwr.getAtomBitSet(c));case 39:return this.vwr.getScriptQueueInfo();
case 8:return this.getShapeInfo();case 19:return this.vwr.getStateInfo3(c.toString(),0,0);case 12:return JU.M3.newM3(this.vwr.tm.matrixRotate);case 42:return this.getAnnotationInfo(c,1073741925);case 43:return this.getAnnotationInfo(c,1073742189);case 44:return c=JS.SV.oValue(c),d=p(c,java.util.Map)?c:null,null==d?null:this.vwr.sm.processService(d)}e=Array(45);for(a=0;45>a;a++){d=JV.PropertyManager.getParamType(a);c=this.getDefaultPropertyParam(a);var f=JV.PropertyManager.getPropertyName(a);e[a]=
0==f.length||"X"==f.charAt(0)?"":f+(""!==d?" "+JV.PropertyManager.getParamType(a)+(""!==c?" #default: "+this.getDefaultPropertyParam(a):""):"")}java.util.Arrays.sort(e);d=new JU.SB;d.append("getProperty ERROR\n").append(b).append("?\nOptions include:\n");for(a=0;45>a;a++)0<e[a].length&&d.append("\n getProperty ").append(e[a]);return d.toString()},"~S,~O,~S");j(c$,"getImage",function(b,c){var e=-1,a=-1,d;if(0<=(d=b.indexOf("height=")))e=JU.PT.parseInt(b.substring(d+7));if(0<=(d=b.indexOf("width=")))a=
JU.PT.parseInt(b.substring(d+6));0>a&&0>e?e=a=-1:0>a?a=e:e=a;var f="JPG";0<=b.indexOf("type=")&&(f=JU.PT.getTokens(JU.PT.replaceWithCharacter(b.substring(b.indexOf("type=")+5),";,"," "))[0]);d=Array(1);e=this.vwr.getImageAsBytes(f.toUpperCase(),a,e,-1,d);return null!=d[0]?d[0]:c?new JU.BArray(e):JU.Base64.getBase64(e).toString()},"~S,~B");j(c$,"getVariables",function(b){return b.toLowerCase().equals("all")?this.vwr.g.getAllVariables():this.vwr.evaluateExpressionAsVariable(b)},"~S");c$.getFileInfo=
j(c$,"getFileInfo",function(b,c){var e=new java.util.Hashtable;if(null==b)return e;var a=null!=c&&0<c.length;if(p(b,java.util.Map))return a?b.get(c):b;var d=JU.PT.split(b,"\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",b),e;var f="",g=new JU.SB;a&&(c=c.toUpperCase());for(var h="",n=0;n<d.length;n++){var k=d[n];if(!(12>k.length)){var h=k.substring(0,6).trim(),l=k.substring(7,10).trim();h.equals("REMARK")&&
(h+=l);if(!h.equals(f)){if(a&&f.equals(c))return g.toString();a||(e.put(f,g.toString()),g=new JU.SB);f=h}(!a||h.equals(c))&&g.append(k).appendC("\n")}}a||e.put(f,g.toString());return a?h.equals(c)?g.toString():"":e},"~O,~S");j(c$,"getMoleculeInfo",function(b){b=this.vwr.getAtomBitSet(b);for(var c=this.vwr.ms.getMolecules(),e=new JU.Lst,a=new JU.BS,d=0;d<c.length;d++){var a=JU.BSUtil.copy(b),f=c[d];a.and(f.atomList);0<a.length()&&(a=new java.util.Hashtable,a.put("mf",f.getMolecularFormula(!0,null,
!1)),a.put("number",Integer.$valueOf(f.moleculeIndex+1)),a.put("modelNumber",this.vwr.ms.getModelNumberDotted(f.modelIndex)),a.put("numberInModel",Integer.$valueOf(f.indexInModel+1)),a.put("nAtoms",Integer.$valueOf(f.ac)),a.put("nElements",Integer.$valueOf(f.nElements)),e.addLast(a))}return e},"~O");r(c$,"getModelInfo",function(b){b=this.vwr.ms.getModelBS(this.vwr.getAtomBitSet(b),!1);var c=this.vwr.ms,e=new java.util.Hashtable;e.put("modelSetName",c.modelSetName);e.put("modelIndex",Integer.$valueOf(this.vwr.am.cmi));
e.put("modelCount",Integer.$valueOf(c.mc));e.put("isTainted",Boolean.$valueOf(null!=c.tainted));e.put("canSkipLoad",Boolean.$valueOf(c.canSkipLoad));e.put("modelSetHasVibrationVectors",Boolean.$valueOf(c.modelSetHasVibrationVectors()));null!=c.modelSetProperties&&e.put("modelSetProperties",c.modelSetProperties);e.put("modelCountSelected",Integer.$valueOf(b.cardinality()));e.put("modelsSelected",b);var a=new JU.Lst;c.getMolecules();for(var d=b.nextSetBit(0);0<=d;d=b.nextSetBit(d+1)){var f=new java.util.Hashtable;
f.put("_ipt",Integer.$valueOf(d));f.put("num",Integer.$valueOf(c.getModelNumber(d)));f.put("file_model",c.getModelNumberDotted(d));f.put("name",c.getModelName(d));var g=c.getModelTitle(d);null!=g&&f.put("title",g);g=c.getModelFileName(d);null!=g&&f.put("file",g);g=c.getInfo(d,"modelID");null!=g&&f.put("id",g);f.put("vibrationVectors",Boolean.$valueOf(this.vwr.modelHasVibrationVectors(d)));g=c.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(c.getChainCountInModelWater(d,!0)));null!=g.properties&&f.put("modelProperties",g.properties);var h=c.getInfo(d,"Energy");null!=h&&f.put("energy",h);f.put("atomCount",Integer.$valueOf(g.act));a.addLast(f)}e.put("models",a);return e},"~O");r(c$,"getLigandInfo",function(b){var c=this.vwr.getAtomBitSet(b),
e=this.vwr.getAtomBitSet("solvent");b=new java.util.Hashtable;var a=new JU.Lst;b.put("ligands",a);var d=this.vwr.ms,f=JU.BSUtil.copyInvert(c,d.ac);f.or(e);for(var e=d.at,g=c.nextSetBit(0);0<=g;g=c.nextSetBit(g+1))(e[g].group.isProtein()||e[g].group.isDna()||e[g].group.isRna())&&e[g].group.setAtomBitsAndClear(f,c);c=Array(d.mc);for(g=d.mc;0<=--g;)c[g]=this.vwr.getModelUndeletedAtomsBitSet(g),c[g].andNot(f);f=JU.JmolMolecule.getMolecules(e,c,null,f);for(g=0;g<f.length;g++){var c=f[g].atomList,h=new java.util.Hashtable;
a.addLast(h);h.put("atoms",JU.Escape.eBS(c));for(var n="",k="",l=null,j=0,q=null,m="",E="",s=2147483647,u=2147483647,p=c.nextSetBit(0);0<=p;p=c.nextSetBit(p+1)){var t=e[p];if(l!==t.group){var l=t.group,v=t.getResno(),r=t.getChainID();s!=v-1&&(0!=m.length&&s!=u&&(m+="-"+s),r=-1,u=v);E="/"+d.getModelNumberDotted(t.mi);0!=j&&r!=j&&(m+=":"+q+E);-1==r&&(m+=" "+v);s=v;j=t.getChainID();q=t.getChainIDStr();n+=k+t.getGroup3(!1);k="-"}}m+=(u==s?"":"-"+s)+(0==j?"":":"+q)+E;h.put("groupNames",n);h.put("residueList",
m.substring(1))}return b},"~O");r(c$,"getAtomData",function(b,c,e){b.startsWith("{")||(b="{"+b+"}");var a=c.toLowerCase().startsWith("user:"),d=c.toLowerCase().startsWith("property_");e&&(!a&&!d)&&(c=c.toUpperCase());a=d?"%{"+c+"}":a?c.substring(5):c.equals("xyzrn")?"%-2e %8.3x %8.3y %8.3z %4.2[vdw] 1 [%n]%r.%a#%i":c.equals("xyzvib")?"%-2e %10.5x %10.5y %10.5z %10.5vx %10.5vy %10.5vz":c.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':
c.equals("xyz")?"%-2e %10.5x %10.5y %10.5z":c.equals("cfi")?"print '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==a)return this.getModelExtract(this.vwr.getAtomBitSet(b),!1,!1,c.toUpperCase(),e);if(a.startsWith("print"))return this.vwr.runScript(a);0>a.indexOf("label")?a=b+'.label("'+a+'").lines':
b.equals("selected")||(a=JU.PT.rep(a,"selected",b.substring(1,b.length-1)));return this.vwr.evaluateExpression(a)},"~S,~S,~B");r(c$,"getModelExtract",function(b,c,e,a,d){if(a.equalsIgnoreCase("CML"))return this.getModelCml(b,2147483647,!0,c,d);if(a.equals("PDB")||a.equals("PQR"))return this.getPdbAtomData(b,null,a.equals("PQR"),c,d);var f=a.equalsIgnoreCase("V3000"),g=a.equalsIgnoreCase("SDF"),h=a.equalsIgnoreCase("MOL"),n=!c&&a.equalsIgnoreCase("XYZVIB"),k=a.equalsIgnoreCase("XYZRN"),l=a.toUpperCase().startsWith("XYZ"),
j=a.equalsIgnoreCase("JSON")||a.equalsIgnoreCase("CD");a=new JU.SB;var q=this.vwr.ms;if(!l&&!j){a.append(e?"Jmol Model Kit":JV.FileManager.fixDOSName(this.vwr.fm.getFullPathName(!1)));e=JV.Viewer.getJmolVersion();a.append("\n__Jmol-").append(e.substring(0,2));var m,p,s,u;u=new Date;e=u.getMonth();m=u.getDate();p=u.getFullYear();s=u.getHours();u=u.getMinutes();JU.PT.rightJustify(a,"_00",""+(1+e));JU.PT.rightJustify(a,"00",""+m);a.append((""+p).substring(2,4));JU.PT.rightJustify(a,"00",""+s);JU.PT.rightJustify(a,
"00",""+u);a.append("3D 1   1.00000     0.00000     0");a.append("\nJmol version ").append(JV.Viewer.getJmolVersion()).append(" EXTRACT: ").append(JU.Escape.eBS(b)).append("\n")}e=JU.BSUtil.copy(b);p=q.at;for(m=b.nextSetBit(0);0<=m;m=b.nextSetBit(m+1))c&&p[m].isDeleted()&&e.clear(m);u=JV.PropertyManager.getCovalentBondsForAtoms(q.bo,q.bondCount,e);if(!n&&e.isEmpty())return"";b=!0;s=this.vwr.ms.getModelBS(e,!0);null!=q.trajectory&&!d&&q.trajectory.selectDisplayed(s);c=c?this.vwr.tm.getRotationQ():
null;if(g){n=a.toString();a=new JU.SB;for(m=s.nextSetBit(0);0<=m;m=s.nextSetBit(m+1)){a.append(n);f=JU.BSUtil.copy(e);f.and(q.getModelAtomBitSetIncludingDeleted(m,!1));u=JV.PropertyManager.getCovalentBondsForAtoms(q.bo,q.bondCount,f);if(!(b=this.addMolFile(m,a,f,u,!1,!1,h,c)))break;a.append("$$$$\n")}}else if(l){h=JM.LabelToken.compile(this.vwr,k?"%-2e _XYZ_ %4.2[vdw] 1 [%n]%r.%a#%i\n":"%-2e _XYZ_\n","\x00",null);g=n?JM.LabelToken.compile(this.vwr,"%-2e _XYZ_ %12.5vx %12.5vy %12.5vz\n","\x00",null):
null;k=new JU.P3;for(m=s.nextSetBit(0);0<=m;m=s.nextSetBit(m+1))if(f=JU.BSUtil.copy(e),f.and(q.getModelAtomBitSetIncludingDeleted(m,!1)),!f.isEmpty()){a.appendI(f.cardinality()).appendC("\n");l=q.am[m].properties;a.append("Model["+(m+1)+"]: ");if(null!=q.frameTitles[m]&&0<q.frameTitles[m].length)a.append(q.frameTitles[m].$replace("\n"," "));else if(null==l)a.append("Jmol "+JV.Viewer.getJmolVersion());else{d=new JU.SB;j=l.propertyNames();for(u=null;j.hasMoreElements();){var r=j.nextElement();r.equals(".PATH")?
u=l.getProperty(r):d.append(";").append(r).append("=").append(l.getProperty(r))}null!=u&&d.append(";PATH=").append(u);u=d.substring(0<d.length()?1:0);a.append(u.$replace("\n"," "))}a.appendC("\n");l=v(-1,[k]);for(d=f.nextSetBit(0);0<=d;d=f.nextSetBit(d+1))j=JM.LabelToken.formatLabelAtomArray(this.vwr,p[d],n&&null!=q.getVibration(d,!1)?g:h,"\x00",null,k),this.getPointTransf(m,q,p[d],c,k),j=JU.PT.rep(j,"_XYZ_",JU.PT.sprintf("%12.5p %12.5p %12.5p","p",l)),a.append(j)}}else b=this.addMolFile(-1,a,e,u,
f,j,h,c);return b?a.toString():"ERROR: Too many atoms or bonds -- use V3000 format."},"JU.BS,~B,~B,~S,~B");j(c$,"addMolFile",function(b,c,e,a,d,f,g,h){var n=e.cardinality(),k=a.cardinality();if(!d&&!f&&(999<n||999<k))return!1;var l=this.vwr.ms,j=P(l.ac,0),q=new JU.P3;d?c.append("  0  0  0  0  0  0            999 V3000"):f?c.append('{"mol":{"createdBy":"Jmol '+JV.Viewer.getJmolVersion()+'","a":['):(JU.PT.rightJustify(c,"   ",""+n),JU.PT.rightJustify(c,"   ",""+k),c.append("  0  0  0  0              1 V2000"));
f||c.append("\n");d&&c.append("M  V30 BEGIN CTAB\nM  V30 COUNTS ").appendI(n).append(" ").appendI(k).append(" 0 0 0\n").append("M  V30 BEGIN ATOM\n");for(var k=e.nextSetBit(0),m=0;0<=k;k=e.nextSetBit(k+1))this.getAtomRecordMOL(b,l,c,j[k]=++m,l.at[k],h,q,d,f);d?c.append("M  V30 END ATOM\nM  V30 BEGIN BOND\n"):f&&c.append('],"b":[');k=a.nextSetBit(0);for(m=0;0<=k;k=a.nextSetBit(k+1))this.getBondRecordMOL(c,++m,l.bo[k],j,d,f,g);d&&c.append("M  V30 END BOND\nM  V30 END CTAB\n");f?c.append("]}}"):c.append("M  END\n");
if(!f&&!d&&(b=l.getPartialCharges(),null!=b)){c.append("> <JMOL_PARTIAL_CHARGES>\n").appendI(n).appendC("\n");k=e.nextSetBit(0);for(m=0;0<=k;k=e.nextSetBit(k+1))c.appendI(++m).append(" ").appendF(b[k]).appendC("\n")}return!0},"~N,JU.SB,JU.BS,JU.BS,~B,~B,~B,JU.Quat");c$.getCovalentBondsForAtoms=j(c$,"getCovalentBondsForAtoms",function(b,c,e){for(var a=new JU.BS,d=0;d<c;d++){var f=b[d];e.get(f.atom1.i)&&(e.get(f.atom2.i)&&f.isCovalent())&&a.set(d)}return a},"~A,~N,JU.BS");j(c$,"getAtomRecordMOL",function(b,
c,e,a,d,f,g,h,n){this.getPointTransf(b,c,d,f,g);b=d.getElementNumber();c=d.isDeleted()?"Xx":JU.Elements.elementSymbolFromNumber(b);f=d.getIsotopeNumber();var k=d.getFormalCharge();g=v(-1,[g]);h?(e.append("M  V30 ").appendI(a).append(" ").append(c).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")):n?(1!=a&&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(b)&&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(c),1==c.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");j(c$,"getPointTransf",function(b,c,e,a,d){c.isTrajectory(0<=b?b:e.mi)?c.trajectory.getFractional(e,d):d.setT(e);null!=a&&a.transform2(d,d)},"~N,JM.ModelSet,JM.Atom,JU.Quat,JU.P3");j(c$,"getBondRecordMOL",function(b,c,e,a,d,f,g){var h=a[e.atom1.i];a=a[e.atom2.i];var n=e.getValence();3<n&&(n=1);switch(e.order&-131073){case 515:n=f?-3:4;break;case 66:n=f?-3:5;break;case 513:n=f||g?1:6;break;case 514:n=f||g?2:7;break;case 33:n=f?-1:8}d?b.append("M  V30 ").appendI(c).append(" ").appendI(n).append(" ").appendI(h).append(" ").appendI(a).appendC("\n"):
f?(1!=c&&b.append(","),b.append('{"b":').appendI(h-1).append(',"e":').appendI(a-1),1!=n&&(b.append(',"o":'),0>n?b.appendF(-n/2):b.appendI(n)),b.append("}")):(JU.PT.rightJustify(b,"   ",""+h),JU.PT.rightJustify(b,"   ",""+a),b.append("  ").appendI(n).append("  0  0  0\n"))},"JU.SB,~N,JM.Bond,~A,~B,~B,~B");r(c$,"getChimeInfo",function(b,c){switch(b){case 1073741982:break;case 1073741864:return this.getBasePairInfo(c);default:return this.getChimeInfoA(this.vwr.ms.at,b,c)}var e=new JU.SB;this.vwr.getChimeMessenger().getAllChimeInfo(e);
return e.appendC("\n").toString().substring(1)},"~N,JU.BS");j(c$,"getChimeInfoA",function(b,c,e){var a=new JU.SB;a.append("\n");var d="",f=null,g=null,h=-1,n=0;if(null!=e)for(var k=e.nextSetBit(0);0<=k;k=e.nextSetBit(k+1)){var l=b[k];switch(c){default:return"";case 1113589787:d=l.getInfo();break;case 1140850689:d=""+l.getAtomNumber();break;case 1086324742:d=l.getGroup3(!1);break;case 1086324740:case 1073742120:case 1086324744:case 1086324743:var j=l.getChainID(),d=0==j?" ":l.getChainIDStr();300<=
j&&(d=JU.PT.esc(d));switch(c){case 1073742120:d="["+l.getGroup3(!1)+"]"+l.group.getSeqcodeString()+":"+d;break;case 1086324744:case 1086324743:l.mi!=h&&(a.appendC("\n"),n=0,h=l.mi,a.append("Model "+l.getModelNumber()),f=g=null);l.group.chain!==f&&(a.appendC("\n"),n=0,f=l.group.chain,a.append("Chain "+d+":\n"),g=null);d=l.group;d!==g&&(g=d,1086324743==c?a.append(l.getGroup1("?")):(0==n++%5&&1<n&&a.appendC("\n"),JU.PT.leftJustify(a,"          ","["+l.getGroup3(!1)+"]"+l.getResno()+" ")));continue}}0>
a.indexOf("\n"+d+"\n")&&a.append(d).appendC("\n")}1086324744==c&&a.appendC("\n");return a.toString().substring(1)},"~A,~N,JU.BS");r(c$,"getModelFileInfo",function(b){for(var c=this.vwr.ms,e=new JU.SB,a=0;a<c.mc;++a)if(null==b||b.get(a)){var d='["'+c.getModelNumberDotted(a)+'"] = ';e.append("\n\nfile").append(d).append(JU.PT.esc(c.getModelFileName(a)));var f=c.getInfo(a,"modelID");null!=f&&e.append("\nid").append(d).append(JU.PT.esc(f));e.append("\ntitle").append(d).append(JU.PT.esc(c.getModelTitle(a)));
e.append("\nname").append(d).append(JU.PT.esc(c.getModelName(a)));e.append("\ntype").append(d).append(JU.PT.esc(c.getModelFileType(a)))}return e.toString()},"JU.BS");j(c$,"getAllAtomInfo",function(b){for(var c=new JU.Lst,e=new JU.P3,a=b.nextSetBit(0);0<=a;a=b.nextSetBit(a+1))c.addLast(this.getAtomInfoLong(a,e));return c},"JU.BS");j(c$,"getAtomInfoLong",function(b,c){var e=this.vwr.ms,a=e.at[b],d=new java.util.Hashtable;e.getAtomIdentityInfo(b,d,c);d.put("element",e.getElementName(b));d.put("elemno",
Integer.$valueOf(e.at[b].getElementNumber()));d.put("x",Float.$valueOf(a.x));d.put("y",Float.$valueOf(a.y));d.put("z",Float.$valueOf(a.z));d.put("coord",JU.P3.newP(a));null!=e.vibrations&&null!=e.vibrations[b]&&e.vibrations[b].getInfo(d);d.put("bondCount",Integer.$valueOf(a.getCovalentBondCount()));d.put("radius",Float.$valueOf(a.getRasMolRadius()/120));d.put("model",a.getModelNumberForLabel());var f=a.atomPropertyString(this.vwr,1086324748);null!=f&&d.put("shape",f);d.put("visible",Boolean.$valueOf(a.checkVisible()));
d.put("clickabilityFlags",Integer.$valueOf(a.clickabilityFlags));d.put("visibilityFlags",Integer.$valueOf(a.shapeVisibilityFlags));d.put("spacefill",Float.$valueOf(a.getRadius()));f=JU.Escape.escapeColor(this.vwr.gdata.getColorArgbOrGray(a.colixAtom));null!=f&&d.put("color",f);d.put("colix",Integer.$valueOf(a.colixAtom));(f=JU.C.isColixTranslucent(a.colixAtom))&&d.put("translucent",Boolean.$valueOf(f));d.put("formalCharge",Integer.$valueOf(a.getFormalCharge()));d.put("partialCharge",Float.$valueOf(a.getPartialCharge()));
f=a.getSurfaceDistance100()/100;0<=f&&d.put("surfaceDistance",Float.$valueOf(f));if(e.am[a.mi].isBioModel){d.put("resname",a.getGroup3(!1));var f=a.group.getInsertionCode(),g=a.getResno();0<g&&d.put("resno",Integer.$valueOf(g));0!=f.charCodeAt(0)&&d.put("insertionCode",""+f);d.put("name",e.at[b].getAtomName());d.put("chain",a.getChainIDStr());d.put("atomID",Integer.$valueOf(a.atomID));d.put("groupID",Integer.$valueOf(a.group.groupID));"\x00"!=a.altloc&&d.put("altLocation",""+a.altloc);d.put("structure",
Integer.$valueOf(a.group.getProteinStructureType().getId()));d.put("polymerLength",Integer.$valueOf(a.group.getBioPolymerLength()));d.put("occupancy",Integer.$valueOf(a.getOccupancy100()));e=a.getBfactor100();d.put("temp",Integer.$valueOf(K(e/100)))}return d},"~N,JU.P3");j(c$,"getAllBondInfo",function(b){var c=new JU.Lst,e=this.vwr.ms,a=e.bondCount,e=e.bo,d;p(b,String)&&(b=this.vwr.getAtomBitSet(b));var f=new JU.P3;if(p(b,Array)){d=b[0];var g=b[1];for(b=0;b<a;b++){var h=e[b].atom1.i,j=e[b].atom2.i;
(d.get(h)&&g.get(j)||g.get(h)&&d.get(j))&&c.addLast(this.getBondInfo(b,f))}}else if(p(b,JM.BondSet)){d=b;for(b=d.nextSetBit(0);0<=b&&b<a;b=d.nextSetBit(b+1))c.addLast(this.getBondInfo(b,f))}else if(p(b,JU.BS)){d=b;g=1==d.cardinality()?d.nextSetBit(0):-1;for(b=0;b<a;b++)(0<=g?e[b].atom1.i==g||e[b].atom2.i==g:d.get(e[b].atom1.i)&&d.get(e[b].atom2.i))&&c.addLast(this.getBondInfo(b,f))}return c},"~O");j(c$,"getBondInfo",function(b,c){var e=this.vwr.ms.bo[b],a=e.atom1,d=e.atom2,f=new java.util.Hashtable;
f.put("_bpt",Integer.$valueOf(b));var g=new java.util.Hashtable;this.vwr.ms.getAtomIdentityInfo(a.i,g,c);var h=new java.util.Hashtable;this.vwr.ms.getAtomIdentityInfo(d.i,h,c);f.put("atom1",g);f.put("atom2",h);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(a.distance(d)));
f.put("visible",Boolean.$valueOf(0!=e.shapeVisibilityFlags));a=JU.Escape.escapeColor(this.vwr.gdata.getColorArgbOrGray(e.colix));null!=a&&f.put("color",a);f.put("colix",Integer.$valueOf(e.colix));JU.C.isColixTranslucent(e.colix)&&f.put("translucent",Boolean.TRUE);return f},"~N,JU.P3");j(c$,"getAllChainInfo",function(b){for(var c=new java.util.Hashtable,e=new JU.Lst,a=this.vwr.ms.mc,d=0;d<a;++d){var f=new java.util.Hashtable,g=this.getChainInfo(d,b);0<g.size()&&(f.put("modelIndex",Integer.$valueOf(d)),
f.put("chains",g),e.addLast(f))}c.put("models",e);return c},"JU.BS");j(c$,"getChainInfo",function(b,c){for(var e=this.vwr.ms.am[b],a=e.getChainCount(!0),d=new JU.Lst,f=new JU.P3,g=0;g<a;g++){for(var h=e.getChainAt(g),j=new JU.Lst,k=h.groupCount,l=new java.util.Hashtable,p=0;p<k;p++){var q=h.groups[p];c.get(q.firstAtomIndex)&&j.addLast(q.getGroupInfo(p,f))}j.isEmpty()||(l.put("residues",j),d.addLast(l))}return d},"~N,JU.BS");j(c$,"getAllPolymerInfo",function(b){var c=new java.util.Hashtable;null!=
this.vwr.ms.bioModelset&&this.vwr.ms.bioModelset.getAllPolymerInfo(b,c);return c},"JU.BS");j(c$,"getBasePairInfo",function(b){var c=new JU.SB,e=new JU.Lst;this.vwr.ms.calcRasmolHydrogenBonds(b,b,e,!0,1,!1,null);for(b=e.size();0<=--b;){var a=e.get(b);JV.PropertyManager.getAtomResidueInfo(c,a.atom1);c.append(" - ");JV.PropertyManager.getAtomResidueInfo(c,a.atom2);c.append("\n")}return c.toString()},"JU.BS");c$.getAtomResidueInfo=j(c$,"getAtomResidueInfo",function(b,c){b.append("[").append(c.getGroup3(!1)).append("]").append(c.group.getSeqcodeString()).append(":");
var e=c.getChainID();b.append(0==e?" ":c.getChainIDStr())},"JU.SB,JM.Atom");j(c$,"getAppletInfo",function(){var b=new java.util.Hashtable;b.put("htmlName",this.vwr.htmlName);b.put("syncId",this.vwr.syncId);b.put("fullName",this.vwr.fullName);b.put("codeBase",""+JV.Viewer.appletCodeBase);this.vwr.isApplet&&(b.put("documentBase",JV.Viewer.appletDocumentBase),b.put("registry",this.vwr.sm.getRegistryInfo()));b.put("version",JV.JC.version);b.put("date",JV.JC.date);b.put("javaVendor",JV.Viewer.strJavaVendor);
b.put("javaVersion",JV.Viewer.strJavaVersion+(!this.vwr.isJS?"":this.vwr.isWebGL?"(WebGL)":"(HTML5)"));b.put("operatingSystem",JV.Viewer.strOSName);return b});j(c$,"getAnimationInfo",function(){var b=this.vwr.am,c=new java.util.Hashtable;c.put("firstModelIndex",Integer.$valueOf(b.firstFrameIndex));c.put("lastModelIndex",Integer.$valueOf(b.lastFrameIndex));c.put("animationDirection",Integer.$valueOf(b.animationDirection));c.put("currentDirection",Integer.$valueOf(b.currentDirection));c.put("displayModelIndex",
Integer.$valueOf(b.cmi));null!=b.animationFrames&&(c.put("isMovie",Boolean.TRUE),c.put("frames",JU.Escape.eAI(b.animationFrames)),c.put("currentAnimationFrame",Integer.$valueOf(b.caf)));c.put("displayModelNumber",this.vwr.getModelNumberDotted(b.cmi));c.put("displayModelName",0<=b.cmi?this.vwr.getModelName(b.cmi):"");c.put("animationFps",Integer.$valueOf(b.animationFps));c.put("animationReplayMode",JS.T.nameOf(b.animationReplayMode));c.put("firstFrameDelay",Float.$valueOf(b.firstFrameDelay));c.put("lastFrameDelay",
Float.$valueOf(b.lastFrameDelay));c.put("animationOn",Boolean.$valueOf(b.animationOn));c.put("animationPaused",Boolean.$valueOf(b.animationPaused));return c});j(c$,"getBoundBoxInfo",function(){var b=this.vwr.ms.getBoxInfo(null,1).getBoundBoxPoints(!0),c=new java.util.Hashtable;c.put("center",JU.P3.newP(b[0]));c.put("vector",JU.V3.newV(b[1]));c.put("corner0",JU.P3.newP(b[2]));c.put("corner1",JU.P3.newP(b[3]));return c});j(c$,"getShapeInfo",function(){var b=new java.util.Hashtable,c=new JU.SB,e=this.vwr.shm.shapes;
if(null!=e)for(var a=0;37>a;++a){var d=e[a];if(null!=d){var f=JV.JC.shapeClassBases[a],d=d.getShapeDetail();null!=d&&b.put(f,d)}}0<c.length()&&b.put("shapeCommands",c.toString());return b});j(c$,"getAnnotationInfo",function(b,c){var e=this.vwr.getAtomBitSet(b),e=this.vwr.ms.getModelBS(e,!1).nextSetBit(0);if(0>e)return null;var a=this.vwr.ms.getModelAuxiliaryInfo(e).get(1073741925==c?"domains":"validation");if(null==a||6!=a.tok)return null;this.vwr.getAnnotationParser(!1).initializeAnnotation(a,c,
e);return a.mapGet("_list")},"~O,~N");j(c$,"getMeasurementInfo",function(){return this.vwr.getShapeProperty(6,"info")});j(c$,"getMouseInfo",function(){if(!this.vwr.haveDisplay)return null;for(var b=new java.util.Hashtable,c=new JU.Lst,e=this.vwr.acm,a,d=e.b.getBindings().values().iterator();d.hasNext()&&((a=d.next())||1);)p(a,Boolean)||(JU.AU.isAI(a)&&(a=v(-1,[JV.binding.Binding.getMouseActionName(a[0],!1),JV.ActionManager.getActionName(a[1])])),c.addLast(a));b.put("bindings",c);b.put("bindingName",
e.b.name);b.put("actionNames",JV.ActionManager.actionNames);b.put("actionInfo",JV.ActionManager.actionInfo);b.put("bindingInfo",JU.PT.split(e.getBindingInfo(null),"\n"));return b});r(c$,"getPdbAtomData",function(b,c,e,a){if(0==this.vwr.ms.ac||0>b.nextSetBit(0))return"";null==c?c=this.vwr.getOutputChannel(null,null):(e=(new Boolean(e|0<=c.getType().indexOf("PQR"))).valueOf(),a=(new Boolean(a|0<=c.getType().indexOf("-coord true"))).valueOf());var d=this.vwr.ms.at,f=this.vwr.ms.am,g=d[b.nextSetBit(0)].mi,
h=-1,j=!1,k="%6.2Q%6.2b          ";if(e){var k="%8.4P%7.4V       ",l=0;for(e=b.nextSetBit(0);0<=e;e=b.nextSetBit(e+1))l+=d[e].getPartialCharge();c.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: "+l+" e\nREMARK   6\n")}e=b.length()-1;var p=g!=d[e].mi,q=new JU.Lst,g=f[g].isPdbWithMultipleBonds,
m,r=new JU.P3,s=v(-1,[r]),u=a?this.vwr.tm.getRotationQ():null;for(e=b.nextSetBit(0);0<=e;e=b.nextSetBit(e+1))a=d[e],j=f[a.mi].isBioModel,p&&a.mi!=h&&(-1!=h&&c.append("ENDMDL\n"),h=a.mi,c.append("MODEL     "+(h+1)+"\n"),q=new JU.Lst),l=a.getAtomName(),m=2==a.getElementSymbol().length||4<=l.length||JU.PT.isDigit(l.charAt(0)),l=a.isHetero(),m=j?l?m?JM.LabelToken.compile(this.vwr,"HETATM%5.-5i %-4.4a%1A%3.3n %1c%4.-4R%1E   _XYZ_"+k,"\x00",null):JM.LabelToken.compile(this.vwr,"HETATM%5.-5i  %-3.3a%1A%3.3n %1c%4.-4R%1E   _XYZ_"+
k,"\x00",null):m?JM.LabelToken.compile(this.vwr,"ATOM  %5.-5i %-4.4a%1A%3.3n %1c%4.-4R%1E   _XYZ_"+k,"\x00",null):JM.LabelToken.compile(this.vwr,"ATOM  %5.-5i  %-3.3a%1A%3.3n %1c%4.-4R%1E   _XYZ_"+k,"\x00",null):m?JM.LabelToken.compile(this.vwr,"HETATM%5.-5i %-4.4a%1AUNK %1c   1%1E   _XYZ_"+k,"\x00",null):JM.LabelToken.compile(this.vwr,"HETATM%5.-5i  %-3.3a%1AUNK %1c   1%1E   _XYZ_"+k,"\x00",null),l=a.getElementSymbolIso(!1).toUpperCase(),l=this.pdbKey(a.group.getBioPolymerIndexInModel())+this.pdbKey(a.group.groupIndex)+
JM.LabelToken.formatLabelAtomArray(this.vwr,a,m,"\x00",null,r)+(1==l.length?" "+l:l.substring(0,2))+"  ",this.getPointTransf(-1,this.vwr.ms,a,u,r),a=JU.PT.sprintf("%8.3p%8.3p%8.3p","p",s),24<a.length&&(a=JU.PT.sprintf("%8.2p%8.2p%8.2p","p",s)),l=JU.PT.rep(l,"_XYZ_",a),q.addLast(l);f=new java.util.Hashtable;this.fixPDBFormat(q,f,c);if(p)c.append("ENDMDL\n");else for(e=b.nextSetBit(0);0<=e;e=b.nextSetBit(e+1))if(a=d[e],l=!j||a.isHetero(),h=!l&&16==a.getElementNumber(),l||g||h)if(k=a.bonds,null!=k)for(p=
0;p<k.length;p++)if(r=a.getAtomNumber(),s=k[p].getOtherAtom(a),b.get(s.i)&&(q=k[p].getCovalentOrder(),!(1==q&&(g&&!l&&!h||h&&16!=s.getElementNumber()))))switch(s=s.getAtomNumber(),q){case 2:case 3:if(s<r)continue;case 1:c.append("CONECT").append(JU.PT.formatStringS("%5s","s",""+f.get(Integer.$valueOf(r))));r=JU.PT.formatStringS("%5s","s",""+f.get(Integer.$valueOf(s)));for(s=0;s<q;s++)c.append(r);c.append("\n")}return c.toString()},"JU.BS,JU.OC,~B,~B,~B");j(c$,"pdbKey",function(b){b=0>b?"!999":"   "+
b;return b.substring(b.length-4)},"~N");j(c$,"fixPDBFormat",function(b,c,e){b.addLast("!999!999XXXXXX99999999999999999999!99!");var a=Array(b.size());b.toArray(a);java.util.Arrays.sort(a);b.clear();for(var d=0,f=a.length;d<f;d++)b.addLast(a[d]);for(var g=a=null,f=b.size(),d=0;d<f;d++){var h=b.get(d),j=h.substring(0,4),h=h.substring(8),k=!1,l=0<=h.indexOf("!99!");if(!j.equals(a)||l)null!=a&&!a.equals("!999")&&(k=!0,h="TER   "+g.substring(6,11)+"      "+g.substring(17,27),b.add(d,j+"!!!!"+h),f++),a=
j;if(l&&!k)break;g=h;null!=c&&!k&&c.put(Integer.$valueOf(JU.PT.parseInt(h.substring(6,11))),Integer.$valueOf(d+1));j="     "+(d+1);e.append(h.substring(0,6)).append(j.substring(j.length-5)).append(h.substring(11)).append("\n")}},"JU.Lst,java.util.Map,JU.OC");r(c$,"getPdbData",function(b,c,e,a,d,f){this.vwr.ms.isJmolDataFrameForModel(b)&&(b=this.vwr.ms.getJmolDataSourceFrame(b));if(0>b)return"";var g=this.vwr.ms.am[b],h=g.isBioModel;if(null==a&&!h)return null;null==d&&(d=this.vwr.getOutputChannel(null,
null));var j=new JU.SB,k=0<=c.indexOf("draw"),l=null,p=new JU.BS,q="\x00",m=this.vwr.ms.getLabeler().compile(this.vwr,"ATOM  %-6i%4a%1A%3.-3n %1c%4R%1E   ","\x00",null);if(null==a)q=11<c.length&&0<=c.indexOf("quaternion ")?c.charAt(11):"R",g.getPdbData(c,q,k,e,d,m,j,p),l=this.vwr.getModelUndeletedAtomsBitSet(b);else{l=a[0];b=a[1];var g=a[2],r=a[3],s=null!=g,u=null!=r,y=a[4],t=a[5],z=a[6],C=a[7],A=a[8],B=a[9];a=null!=z&&null==A;var F=this.vwr.ms.at;if(a){d.append("REMARK   6 Jmol PDB-encoded data: ").append(c).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(y)).append(" max = ").append(JU.Escape.eP(t)).append(" unScaledXyz = xyz * ").append(JU.Escape.eP(z)).append(" + ").append(JU.Escape.eP(C)).append(";\n");t=null;for(c=l.nextSetBit(0);0<=c;c=l.nextSetBit(c+1))if(y=""+F[c].getAtomName(),null!=t||4<y.length)null==t?(t="",c=-1):t+=" "+y;null!=t&&d.append("REMARK   6 Jmol atom names").append(t).append("\n");t=null;for(c=l.nextSetBit(0);0<=c;c=l.nextSetBit(c+1))if(y=""+F[c].getGroup3(!0),
null!=t||3<y.length)null==t?(t="",c=-1):t+=" "+y;null!=t&&d.append("REMARK   6 Jmol residue names").append(t).append("\n");for(c=0;c<B.length;c++)null!=B[c]&&d.append("REMARK   6 Jmol property ").append(B[c]).append(";\n")}B=null;y=new JU.P3;a||(null==A&&(A="%-5i %-10s %-13.5f "+(u?"%-13.5f %-13.5f":s?"%-13.5f":"")),A+="\n");c=l.nextSetBit(0);for(t=0;0<=c;c=l.nextSetBit(c+1),t++){var z=b[t],C=s?g[t]:0,G=u?r[t]:0;if(!Float.isNaN(z)&&!Float.isNaN(C)&&!Float.isNaN(G)){var x=F[c];a?(d.append(JM.LabelToken.formatLabelAtomArray(this.vwr,
x,m,"\x00",null,y)),h&&p.set(c),d.append(JU.PT.sprintf("%-8.2f%-8.2f%-10.2f    %6.3f          %2s    %s\n","ssF",v(-1,[x.getElementSymbolIso(!1).toUpperCase(),"",w(-1,[z,C,G,0])]))),null!=B&&B.group.getBioPolymerIndexInModel()==x.group.getBioPolymerIndexInModel()&&j.append("CONECT").append(JU.PT.formatStringI("%5i","i",B.getAtomNumber())).append(JU.PT.formatStringI("%5i","i",x.getAtomNumber())).appendC("\n")):u?d.append(JU.PT.sprintf(A,"isF",v(-1,[Integer.$valueOf(x.getAtomNumber()),x.getAtomName(),
w(-1,[z,C,G])]))):s?d.append(JU.PT.sprintf(A,"isF",v(-1,[Integer.$valueOf(x.getAtomNumber()),x.getAtomName(),w(-1,[z,C])]))):d.append(JU.PT.sprintf(A,"isF",v(-1,[Integer.$valueOf(x.getAtomNumber()),x.getAtomName(),w(-1,[z])])));B=x}}}d.append(j.toString());if(k)return d.toString();e.and(l);h&&f&&d.append("\n\n"+this.vwr.ms.getProteinStructureState(p,"R"==q?4138:1073742086));return d.toString()},"~N,~S,JU.BS,~A,JU.OC,~B");r(c$,"getModelCml",function(b,c,e){var a=new JU.SB;if(0==b.cardinality())return"";
this.vwr.isJS&&J.api.Interface.getInterface("JU.XmlUtil",this.vwr,"file");JU.XmlUtil.openTag(a,"molecule");JU.XmlUtil.openTag(a,"atomArray");for(var d=new JU.BS,f=this.vwr.ms.at,g=b.nextSetBit(0);0<=g&&!(0>--c);g=b.nextSetBit(g+1)){var h=f[g],j=h.getAtomName();JU.PT.rep(j,'"',"''");d.set(h.i);JU.XmlUtil.appendTag(a,"atom/",v(-1,["id","a"+(h.i+1),"title",h.getAtomName(),"elementType",h.getElementSymbol(),"x3",""+h.x,"y3",""+h.y,"z3",""+h.z]))}JU.XmlUtil.closeTag(a,"atomArray");if(e){JU.XmlUtil.openTag(a,
"bondArray");b=this.vwr.ms.bondCount;c=this.vwr.ms.bo;for(g=0;g<b;g++)e=c[g],f=e.atom2,d.get(e.atom1.i)&&d.get(f.i)&&(f=JU.Edge.getCmlBondOrder(e.order),null!=f&&JU.XmlUtil.appendTag(a,"bond/",v(-1,["atomRefs2","a"+(e.atom1.i+1)+" a"+(e.atom2.i+1),"order",f])));JU.XmlUtil.closeTag(a,"bondArray")}JU.XmlUtil.closeTag(a,"molecule");return a.toString()},"JU.BS,~N,~B,~B,~B");I(c$,"atomExpression","<atom selection>");c$.propertyTypes=c$.prototype.propertyTypes=v(-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>;".split(";"));
I(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_COUNT",45,"readableTypes",v(-1," stateinfo extractmodel filecontents fileheader image menu minimizationInfo".split(" ")))})})(Clazz,
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);
