(function(R,S,T,I,U,G,p,K,L,M,V,W,N,X,Y,O,H,t,Z,P,$,aa,Q,ba,ca,da,ea,fa,ga,s,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,h,r){G("J.api");Q(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 $.JC $.Viewer JV.binding.Binding".split(" "),
function(){c$=M(function(){this.map=this.vwr=null;L(this,arguments)},JV,"PropertyManager",null,[J.api.JmolPropertyManager,java.util.Comparator]);P(c$,function(){this.map=new java.util.Hashtable});N(c$,function(){});r(c$,"setViewer",function(b){this.vwr=b;for(var c=b=0;b<JV.PropertyManager.propertyTypes.length;b+=3)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")?"{"+JU.PT.toJSON(c,e)+"}":e},"~S,~S,~O");h(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.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");h(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)){var j=d;0>f&&(f+=j.size());return 0<=f&&f<j.size()?this.extractProperty(j.get(f),c,e,null,!0):""}if(p(d,JU.M3))return a=d,a=s(-1,[t(-1,[a.m00,a.m01,a.m02]),t(-1,[a.m10,a.m11,a.m12]),t(-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=s(-1,[t(-1,[a.m00,a.m01,a.m02,a.m03]),t(-1,[a.m10,a.m11,a.m12,a.m13]),t(-1,[a.m20,a.m21,a.m22,a.m23]),t(-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 135280133:case 4:if(p(d,java.util.Map)){j=!1;if(135280133==g.tok)if(b=g.myName,b.equals("**")){b="";for(var l,q=d.entrySet().iterator();q.hasNext()&&((l=q.next())||1);)f=l.getKey(),j=l.getValue(),6==j.tok&&this.vwr.checkSelect(j.value,g.value)&&(b+=","+f);if(0==b.length)return"";j=!0}else{if(!this.vwr.checkSelect(d,g.value))return""}else if(b=
g.asString(),b.equalsIgnoreCase("keys")){a=new JU.Lst;for(d=d.keySet().iterator();d.hasNext()&&((f=d.next())||1);)a.addLast(f);return this.extractProperty(a,c,e,null,!0)}(f=b.startsWith("*")||b.endsWith("*")||0<=b.indexOf(","))&&null==a&&(a=new JU.Lst);if(f&&1==b.length)return e==c.length?(a.addLast(d),a):this.extractProperty(d,c,e,a,!0);if(b.contains(",")){j&&(b=b.substring(1));f=new java.util.Hashtable;b=JU.PT.split(b,",");for(l=b.length;0<=--l;)JV.PropertyManager.getMapSubset(d,b[l],f);return j?
f:e==c.length?(a.addLast(f),a):this.extractProperty(f,c,e,a,!0)}b=this.checkMap(d,b,f,a,c,e);return null!=b&&!f?this.extractProperty(d.get(b),c,e,null,!0):f?a:""}if(p(d,JU.Lst)){j=d;null==a&&(a=new JU.Lst);e--;for(f=0;f<j.size();f++)d=j.get(f),(p(d,java.util.Map)||p(d,JU.Lst)||p(d,JS.SV)&&(null!=d.getMap()||null!=d.getList()))&&this.extractProperty(d,c,e,a,!0);return a}}return b},"~O,~O,~N,JU.Lst,~B");c$.getMapSubset=h(c$,"getMapSubset",function(b,c,e){if(c.startsWith('"')||c.startsWith("'"))c=JU.PT.trim(c,
"\"'");var a=b.get(c);if(null!=a)e.put(c,a);else{var d;for(b=b.entrySet().iterator();b.hasNext()&&((d=b.next())||1);)a=d.getKey(),JU.PT.isLike(a,c)&&e.put(a,d.getValue())}},"java.util.Map,~S,java.util.Map");h(c$,"compileSelect",function(b){for(var c=null,e=b.length;0<=--e;)if(4==b[e].tok){var a=b[e].value;if(a.toUpperCase().startsWith("SELECT ")){null==c&&(c=JU.AU.arrayCopyObject(b,b.length));a=a.substring(6).trim();a.toUpperCase().startsWith("WHERE ")&&(a="* "+a);var d=a.toUpperCase().indexOf(" WHERE ");
0>d?c[e].value=a:(c[e]=JS.SV.newV(135280133,this.vwr.compileExpr(a.substring(d+6).trim())),c[e].myName=a.substring(0,d).trim())}}return null==c?b:c},"~A");h(c$,"checkMap",function(b,c,e,a,d,f){var g=null==a&&b.containsKey(c);if(!g)for(var j=e?c.toLowerCase():null,l,q=b.keySet().iterator();q.hasNext()&&((l=q.next())||1);)if(l.equalsIgnoreCase(c)||null!=j&&JU.PT.isLike(l.toLowerCase(),j)){if(null==a)return l;a.addLast(this.extractProperty(b.get(l),d,f,null,!0));if(!e)return null}return g?c:null},"java.util.Map,~S,~B,JU.Lst,~O,~N");
c$.getPropertyName=h(c$,"getPropertyName",function(b){return 0>b?"":JV.PropertyManager.propertyTypes[3*b]},"~N");c$.getParamType=h(c$,"getParamType",function(b){return 0>b?"":JV.PropertyManager.propertyTypes[3*b+1]},"~N");c$.isReadableAsString=h(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");h(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 13:return this.vwr.getAtomBitSetVector(c);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.getData(c.toString());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,"getInfo");case 36:return this.vwr.getShapeProperty(24,"getData");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]="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");h(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");h(c$,"getVariables",function(b){return b.toLowerCase().equals("all")?this.vwr.g.getAllVariables():
this.vwr.evaluateExpressionAsVariable(b)},"~S");c$.getFileInfo=h(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 j="",l=0;l<d.length;l++){var q=d[l];if(!(12>q.length)){var j=q.substring(0,
6).trim(),k=q.substring(7,10).trim();j.equals("REMARK")&&(j+=k);if(!j.equals(f)){if(a&&f.equals(c))return g.toString();a||(e.put(f,g.toString()),g=new JU.SB);f=j}(!a||j.equals(c))&&g.append(q).appendC("\n")}}a||e.put(f,g.toString());return a?j.equals(c)?g.toString():"":e},"~O,~S");h(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(!1,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(JU.BSUtil.cardinalityOf(b)));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 j=c.getInfo(d,"Energy");null!=j&&f.put("energy",j);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].isProtein()||e[g].isNucleic())&&f.set(g);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,j=new java.util.Hashtable;a.addLast(j);j.put("atoms",JU.Escape.eBS(c));for(var l="",q="",k=null,u=0,m=null,h="",v="",n=2147483647,p=2147483647,r=c.nextSetBit(0);0<=r;r=c.nextSetBit(r+1)){var s=e[r];if(k!==s.group){var k=s.group,w=s.getResno(),t=s.getChainID();n!=w-1&&(0!=h.length&&n!=p&&(h+="-"+n),t=-1,p=w);v="/"+d.getModelNumberDotted(s.mi);0!=u&&t!=u&&(h+=":"+m+v);-1==t&&(h+=" "+w);n=w;u=s.getChainID();m=s.getChainIDStr();l+=q+s.getGroup3(!1);q="-"}}h+=(p==n?"":"-"+n)+(0==u?"":":"+
m)+v;j.put("groupNames",l);j.put("residueList",h.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"),j=!c&&a.equalsIgnoreCase("XYZVIB"),l=a.equalsIgnoreCase("XYZRN"),q=a.toUpperCase().startsWith("XYZ"),k=a.equalsIgnoreCase("JSON")||
a.equalsIgnoreCase("CD");a=new JU.SB;var h=this.vwr.ms;if(!q&&!k){a.append(e?"Jmol Model Kit":this.vwr.fm.getFullPathName(!1).$replace("\\","/"));e=JV.Viewer.getJmolVersion();a.append("\n__Jmol-").append(e.substring(0,2));var m,r,v,n;n=new Date;e=n.getMonth();m=n.getDate();r=n.getFullYear();v=n.getHours();n=n.getMinutes();JU.PT.rightJustify(a,"_00",""+(1+e));JU.PT.rightJustify(a,"00",""+m);a.append((""+r).substring(2,4));JU.PT.rightJustify(a,"00",""+v);JU.PT.rightJustify(a,"00",""+n);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);r=h.at;for(m=b.nextSetBit(0);0<=m;m=b.nextSetBit(m+1))c&&r[m].isDeleted()&&e.clear(m);n=JV.PropertyManager.getCovalentBondsForAtoms(h.bo,h.bondCount,e);if(!j&&0==e.cardinality())return"";b=!0;v=this.vwr.ms.getModelBS(e,!0);null!=h.trajectory&&!d&&h.trajectory.selectDisplayed(v);c=c?this.vwr.tm.getRotationQ():null;if(g){j=a.toString();a=new JU.SB;for(m=v.nextSetBit(0);0<=
m;m=v.nextSetBit(m+1)){a.append(j);f=JU.BSUtil.copy(e);f.and(h.getModelAtomBitSetIncludingDeleted(m,!1));n=JV.PropertyManager.getCovalentBondsForAtoms(h.bo,h.bondCount,f);if(!(b=this.addMolFile(m,a,f,n,!1,!1,c)))break;a.append("$$$$\n")}}else if(q){g=JM.LabelToken.compile(this.vwr,l?"%-2e _XYZ_ %4.2[vdw] 1 [%n]%r.%a#%i\n":"%-2e _XYZ_\n","\x00",null);l=j?JM.LabelToken.compile(this.vwr,"%-2e _XYZ_ %12.5vx %12.5vy %12.5vz\n","\x00",null):null;q=new JU.P3;for(m=v.nextSetBit(0);0<=m;m=v.nextSetBit(m+1))if(f=
JU.BSUtil.copy(e),f.and(h.getModelAtomBitSetIncludingDeleted(m,!1)),0!=f.cardinality()){a.appendI(f.cardinality()).appendC("\n");d=h.am[m].properties;a.append("Model["+(m+1)+"]: ");if(null!=h.frameTitles[m]&&0<h.frameTitles[m].length)a.append(h.frameTitles[m].$replace("\n"," "));else if(null==d)a.append("Jmol "+JV.Viewer.getJmolVersion());else{k=new JU.SB;n=d.propertyNames();for(var p=null;n.hasMoreElements();){var t=n.nextElement();t.equals(".PATH")?p=d.getProperty(t):k.append(";").append(t).append("=").append(d.getProperty(t))}null!=
p&&k.append(";PATH=").append(p);p=k.substring(0<k.length()?1:0);a.append(p.$replace("\n"," "))}a.appendC("\n");d=s(-1,[q]);for(k=f.nextSetBit(0);0<=k;k=f.nextSetBit(k+1))n=JM.LabelToken.formatLabelAtomArray(this.vwr,r[k],j&&null!=h.getVibration(k,!1)?l:g,"\x00",null,q),this.getPointTransf(m,h,r[k],c,q),n=JU.PT.rep(n,"_XYZ_",JU.PT.sprintf("%12.5p %12.5p %12.5p","p",d)),a.append(n)}}else b=this.addMolFile(-1,a,e,n,f,k,c);return b?a.toString():"ERROR: Too many atoms or bonds -- use V3000 format."},"JU.BS,~B,~B,~S,~B");
h(c$,"addMolFile",function(b,c,e,a,d,f,g){var j=e.cardinality(),l=a.cardinality();if(!d&&!f&&(999<j||999<l))return!1;var h=this.vwr.ms,k=O(h.ac,0),u=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,"   ",""+j),JU.PT.rightJustify(c,"   ",""+l),c.append("  0  0  0  0              1 V2000"));f||c.append("\n");d&&c.append("M  V30 BEGIN CTAB\nM  V30 COUNTS ").appendI(j).append(" ").appendI(l).append(" 0 0 0\n").append("M  V30 BEGIN ATOM\n");
for(var l=e.nextSetBit(0),m=0;0<=l;l=e.nextSetBit(l+1))this.getAtomRecordMOL(b,h,c,k[l]=++m,h.at[l],g,u,d,f);d?c.append("M  V30 END ATOM\nM  V30 BEGIN BOND\n"):f&&c.append('],"b":[');l=a.nextSetBit(0);for(m=0;0<=l;l=a.nextSetBit(l+1))this.getBondRecordMOL(c,++m,h.bo[l],k,d,f);d&&c.append("M  V30 END BOND\nM  V30 END CTAB\n");f?c.append("]}}"):c.append("M  END\n");if(!f&&!d&&(b=h.getPartialCharges(),null!=b)){c.append("> <JMOL_PARTIAL_CHARGES>\n").appendI(j).appendC("\n");l=e.nextSetBit(0);for(m=0;0<=
l;l=e.nextSetBit(l+1))c.appendI(++m).append(" ").appendF(b[l]).appendC("\n")}return!0},"~N,JU.SB,JU.BS,JU.BS,~B,~B,JU.Quat");c$.getCovalentBondsForAtoms=h(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");h(c$,"getAtomRecordMOL",function(b,c,e,a,d,f,g,j,l){this.getPointTransf(b,c,d,f,g);b=d.getElementNumber();c=d.isDeleted()?"Xx":JU.Elements.elementSymbolFromNumber(b);f=
d.getIsotopeNumber();var h=d.getFormalCharge();g=s(-1,[g]);j?(e.append("M  V30 ").appendI(a).append(" ").append(c).append(JU.PT.sprintf(" %12.5p %12.5p %12.5p 0","p",g)),0!=h&&e.append(" CHG=").appendI(h),0!=f&&e.append(" MASS=").appendI(f),e.append("\n")):l?(1!=a&&e.append(","),e.append("{"),6!=d.getElementNumber()&&e.append('"l":"').append(d.getElementSymbol()).append('",'),0!=h&&e.append('"c":').appendI(h).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==h?0:4-h)),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(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");h(c$,"getBondRecordMOL",function(b,c,e,a,d,f){var g=a[e.atom1.i];a=a[e.atom2.i];var j=e.getValence();3<j&&(j=1);switch(e.order&-131073){case 515:j=f?-3:4;break;case 66:j=f?-3:5;break;case 513:j=f?1:6;break;case 514:j=f?2:7;break;case 33:j=f?-1:8}d?b.append("M  V30 ").appendI(c).append(" ").appendI(j).append(" ").appendI(g).append(" ").appendI(a).appendC("\n"):f?(1!=c&&b.append(","),
b.append('{"b":').appendI(g-1).append(',"e":').appendI(a-1),1!=j&&(b.append(',"o":'),0>j?b.appendF(-j/2):b.appendI(j)),b.append("}")):(JU.PT.rightJustify(b,"   ",""+g),JU.PT.rightJustify(b,"   ",""+a),b.append("  ").appendI(j).append("  0  0  0\n"))},"JU.SB,~N,JM.Bond,~A,~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");h(c$,"getChimeInfoA",function(b,c,e){var a=new JU.SB;a.append("\n");var d="",f=null,g=null,j=-1,l=0;if(null!=e)for(var h=e.nextSetBit(0);0<=h;h=e.nextSetBit(h+1)){var k=b[h];switch(c){default:return"";case 1114638363:d=k.getInfo();break;case 1141899265:d=""+k.getAtomNumber();break;case 1087373318:d=k.getGroup3(!1);break;case 1087373316:case 1073742120:case 1087373320:case 1087373319:var u=k.getChainID(),d=0==u?" ":k.getChainIDStr();300<=
u&&(d=JU.PT.esc(d));switch(c){case 1073742120:d="["+k.getGroup3(!1)+"]"+k.group.getSeqcodeString()+":"+d;break;case 1087373320:case 1087373319:k.mi!=j&&(a.appendC("\n"),l=0,j=k.mi,a.append("Model "+k.getModelNumber()),f=g=null);k.group.chain!==f&&(a.appendC("\n"),l=0,f=k.group.chain,a.append("Chain "+d+":\n"),g=null);d=k.group;d!==g&&(g=d,1087373319==c?a.append(k.getGroup1("?")):(0==l++%5&&1<l&&a.appendC("\n"),JU.PT.leftJustify(a,"          ","["+k.getGroup3(!1)+"]"+k.getResno()+" ")));continue}}0>
a.indexOf("\n"+d+"\n")&&a.append(d).appendC("\n")}1087373320==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");h(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");h(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,1087373323);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(I(e/100)))}return d},"~N,JU.P3");h(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 j=e[b].atom1.i,h=e[b].atom2.i;
(d.get(j)&&g.get(h)||g.get(j)&&d.get(h))&&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");h(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 j=new java.util.Hashtable;this.vwr.ms.getAtomIdentityInfo(d.i,j,c);f.put("atom1",g);f.put("atom2",j);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");h(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");h(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 j=e.getChainAt(g),h=new JU.Lst,q=j.groupCount,k=new java.util.Hashtable,u=0;u<q;u++){var m=j.groups[u];c.get(m.firstAtomIndex)&&h.addLast(m.getGroupInfo(u,f))}h.isEmpty()||(k.put("residues",h),d.addLast(k))}return d},"~N,JU.BS");h(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");h(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=h(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");h(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});h(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});h(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});h(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});h(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().initializeAnnotation(a,c,e);
return a.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 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=s(-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,
j=-1,h=!1,q="%6.2Q%6.2b          ";if(e){var q="%8.4P%7.4V       ",k=0;for(e=b.nextSetBit(0);0<=e;e=b.nextSetBit(e+1))k+=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: "+k+" e\nREMARK   6\n")}e=b.length()-1;var u=g!=d[e].mi,m=new JU.Lst,g=f[g].isPdbWithMultipleBonds,
r,p=new JU.P3,n=s(-1,[p]),t=a?this.vwr.tm.getRotationQ():null;for(e=b.nextSetBit(0);0<=e;e=b.nextSetBit(e+1))a=d[e],h=f[a.mi].isBioModel,u&&a.mi!=j&&(-1!=j&&c.append("ENDMDL\n"),j=a.mi,c.append("MODEL     "+(j+1)+"\n"),m=new JU.Lst),k=a.getAtomName(),r=2==a.getElementSymbol().length||4<=k.length||JU.PT.isDigit(k.charAt(0)),k=a.isHetero(),r=h?k?r?JM.LabelToken.compile(this.vwr,"HETATM%5.-5i %-4.4a%1A%3.-3n %1c%4.-4R%1E   _XYZ_"+q,"\x00",null):JM.LabelToken.compile(this.vwr,"HETATM%5.-5i  %-3.3a%1A%3.-3n %1c%4.-4R%1E   _XYZ_"+
q,"\x00",null):r?JM.LabelToken.compile(this.vwr,"ATOM  %5.-5i %-4.4a%1A%3.-3n %1c%4.-4R%1E   _XYZ_"+q,"\x00",null):JM.LabelToken.compile(this.vwr,"ATOM  %5.-5i  %-3.3a%1A%3.-3n %1c%4.-4R%1E   _XYZ_"+q,"\x00",null):r?JM.LabelToken.compile(this.vwr,"HETATM%5.-5i %-4.4a%1AUNK %1c   1%1E   _XYZ_"+q,"\x00",null):JM.LabelToken.compile(this.vwr,"HETATM%5.-5i  %-3.3a%1AUNK %1c   1%1E   _XYZ_"+q,"\x00",null),k=a.getElementSymbolIso(!1).toUpperCase(),k=(a.group.getBioPolymerIndexInModel()+"    ").substring(0,
4)+JM.LabelToken.formatLabelAtomArray(this.vwr,a,r,"\x00",null,p)+(1==k.length?" "+k:k.substring(0,2))+"  ",this.getPointTransf(-1,this.vwr.ms,a,t,p),a=JU.PT.sprintf("%8.3p%8.3p%8.3p","p",n),24<a.length&&(a=JU.PT.sprintf("%8.2p%8.2p%8.2p","p",n)),k=JU.PT.rep(k,"_XYZ_",a),m.addLast(k);f=new java.util.Hashtable;this.fixPDBFormat(m,f,c);if(u)c.append("ENDMDL\n");else for(e=b.nextSetBit(0);0<=e;e=b.nextSetBit(e+1))if(a=d[e],k=!h||a.isHetero(),j=!k&&16==a.getElementNumber(),k||g||j)if(q=a.bonds,null!=
q)for(u=0;u<q.length;u++)if(p=a.getAtomNumber(),n=q[u].getOtherAtom(a),b.get(n.i)&&(m=q[u].getCovalentOrder(),!(1==m&&(g&&!k&&!j||j&&16!=n.getElementNumber()))))switch(n=n.getAtomNumber(),m){case 2:case 3:if(n<p)continue;case 1:c.append("CONECT").append(JU.PT.formatStringI("%5i","i",f.get(Integer.$valueOf(p)).intValue()));p=JU.PT.formatStringI("%5i","i",f.get(Integer.$valueOf(n)).intValue());for(n=0;n<m;n++)c.append(p);c.append("\n")}return c.toString()},"JU.BS,JU.OC,~B,~B,~B");h(c$,"fixPDBFormat",
function(b,c,e){b.addLast("9999XXXXXX99999999999999999999!99!");var a=Array(b.size());b.toArray(a);java.util.Arrays.sort(a,this);b.clear();for(var d=0,f=a.length;d<f;d++)b.addLast(a[d]);for(var a=1,g=null,j=null,d=0,f=b.size();d<f;d++){var h=b.get(d),q=h.substring(0,4),h=h.substring(4),k=!1,p=0<=h.indexOf("!99!");if(!q.equals(g)||p)null!=g&&!g.equals("-1  ")&&(k=!0,h="TER   "+h.substring(6,11)+"      "+j.substring(17,27),b.set(d,h)),g=q;if(p&&!k)break;j=JU.PT.parseInt(h.substring(6,11));null!=c&&
!k&&c.put(Integer.$valueOf(j),Integer.$valueOf(d+a));j="     "+(d+a);e.append(h.substring(0,6)).append(j.substring(j.length-5)).append(h.substring(11)).append("\n");k&&a++;j=h}},"JU.Lst,java.util.Map,JU.OC");r(c$,"compare",function(b,c){var e=JU.PT.parseInt(b.substring(10,16)),a=JU.PT.parseInt(c.substring(10,16)),d=JU.PT.parseInt(b.substring(26,30)),f=JU.PT.parseInt(c.substring(26,30));return d<f?-1:d>f?1:e<a?-1:e>a?1:0},"~S,~S");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 l=new JU.SB,q=0<=c.indexOf("draw"),k=null,p=new JU.BS,m="\x00",r=this.vwr.ms.getLabeler().compile(this.vwr,"ATOM  %-6i%4a%1A%3n %1c%4R%1E   ","\x00",null);if(null==a)m=11<c.length&&0<=c.indexOf("quaternion ")?c.charAt(11):"R",g.getPdbData(c,m,q,e,d,r,l,p),k=this.vwr.getModelUndeletedAtomsBitSet(b);else{k=a[0];b=a[1];var g=
a[2],v=a[3],n=null!=g,B=null!=v,C=a[4],D=a[5],w=a[6],y=a[7];a=a[8];var E=null!=w&&null==a;E&&(d.append("REMARK   6 Jmol PDB-encoded data: ").append(c).append(";\n"),d.append("REMARK   6 Jmol data").append(" min = ").append(JU.Escape.eP(C)).append(" max = ").append(JU.Escape.eP(D)).append(" unScaledXyz = xyz * ").append(JU.Escape.eP(w)).append(" + ").append(JU.Escape.eP(y)).append(";\n"));c=null;C=this.vwr.ms.at;D=new JU.P3;E||(null==a&&(a="%-5i %-10s %-13.5f "+(B?"%-13.5f %-13.5f":n?"%-13.5f":"")),
a+="\n");w=k.nextSetBit(0);for(y=0;0<=w;w=k.nextSetBit(w+1),y++){var z=b[y],A=n?g[y]:0,F=B?v[y]:0;if(!Float.isNaN(z)&&!Float.isNaN(A)&&!Float.isNaN(F)){var x=C[w];E?(d.append(JM.LabelToken.formatLabelAtomArray(this.vwr,x,r,"\x00",null,D)),h&&p.set(w),d.append(JU.PT.sprintf("%-8.2f%-8.2f%-10.2f    %6.3f          %2s    %s\n","ssF",s(-1,[x.getElementSymbolIso(!1).toUpperCase(),"",t(-1,[z,A,F,0])]))),null!=c&&c.group.getBioPolymerIndexInModel()==x.group.getBioPolymerIndexInModel()&&l.append("CONECT").append(JU.PT.formatStringI("%5i",
"i",c.getAtomNumber())).append(JU.PT.formatStringI("%5i","i",x.getAtomNumber())).appendC("\n")):B?d.append(JU.PT.sprintf(a,"isF",s(-1,[Integer.$valueOf(x.getAtomNumber()),x.getAtomName(),t(-1,[z,A,F])]))):n?d.append(JU.PT.sprintf(a,"isF",s(-1,[Integer.$valueOf(x.getAtomNumber()),x.getAtomName(),t(-1,[z,A])]))):d.append(JU.PT.sprintf(a,"isF",s(-1,[Integer.$valueOf(x.getAtomNumber()),x.getAtomName(),t(-1,[z])])));c=x}}}d.append(l.toString());if(q)return d.toString();e.and(k);h&&f&&d.append("\n\n"+this.vwr.ms.getProteinStructureState(p,
"R"==m?1052714:1074790662));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==JU.BSUtil.cardinalityOf(b))return"";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],l=h.getAtomName();JU.PT.rep(l,'"',"''");d.set(h.i);JU.XmlUtil.appendTag(a,"atom/",s(-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/",s(-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");H(c$,"atomExpression","<atom selection>");c$.propertyTypes=c$.prototype.propertyTypes=s(-1,"appletInfo;;;fileName;;;fileHeader;;;fileContents;<pathname>;;fileContents;;;animationInfo;;;modelInfo;<atom selection>;{*};ligandInfo;<atom selection>;{*};shapeInfo;;;measurementInfo;;;centerInfo;;;orientationInfo;;;transformInfo;;;atomList;<atom selection>;(visible);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(";"));
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_LIST",13,"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",
s(-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.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);
