(function(I,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,aa,ba,ca,da,j,ea,fa,ga,ha,ia,ja,ka,la,ma,n,na,oa,pa,qa,A,y,l,B,C,D,ra,E,sa,ta,F,z,ua,va,G,wa,xa,H){y("J.api");H(J.api,"JmolPropertyManager");y("J.viewer");B(["J.api.JmolPropertyManager","java.util.Hashtable"],"J.viewer.PropertyManager","java.lang.Boolean $.Double $.Float java.util.Arrays $.Map JU.BS $.Base64 $.List $.M3 $.P3 $.PT $.SB J.modelset.Atom $.BondSet $.LabelToken J.script.SV $.T J.util.BSUtil $.C $.Elements $.Escape $.JmolEdge $.JmolMolecule $.Logger $.Txt J.viewer.Viewer".split(" "),
function(){c$=D(function(){this.map=this.viewer=null;C(this,arguments)},J.viewer,"PropertyManager",null,J.api.JmolPropertyManager);G(c$,function(){this.map=new java.util.Hashtable});E(c$,function(){});n(c$,"setViewer",function(a){this.viewer=a;for(var c=a=0;a<J.viewer.PropertyManager.propertyTypes.length;a+=3)this.map.put(J.viewer.PropertyManager.propertyTypes[a].toLowerCase(),Integer.$valueOf(c++))},"J.viewer.Viewer");n(c$,"getPropertyNumber",function(a){a=this.map.get(null==a?"":a.toLowerCase());
return null==a?-1:a.intValue()},"~S");n(c$,"getDefaultPropertyParam",function(a){return 0>a?"":J.viewer.PropertyManager.propertyTypes[3*a+2]},"~N");n(c$,"checkPropertyParameter",function(a){a=this.getPropertyNumber(a);a=J.viewer.PropertyManager.getParamType(a);return 0<a.length&&"<atom selection>"!==a},"~S");n(c$,"getProperty",function(a,c,d){126!=J.viewer.PropertyManager.propertyTypes.length&&J.util.Logger.warn("propertyTypes is not the right length: "+J.viewer.PropertyManager.propertyTypes.length+
" != 126");d=0<=c.indexOf(".")||0<=c.indexOf("[")?this.getModelProperty(c,d):this.getPropertyAsObject(c,d,a);if(null==a)return d;var b=a.equalsIgnoreCase("readable");b&&(a=J.viewer.PropertyManager.isReadableAsString(c)?"String":"JSON");return a.equalsIgnoreCase("String")?null==d?"":d.toString():b?J.util.Escape.toReadable(c,d):a.equalsIgnoreCase("JSON")?"{"+JU.PT.toJSON(c,d)+"}":d},"~S,~S,~O");j(c$,"getModelProperty",function(a,c){a=a.$replace("]"," ").$replace("["," ").$replace("."," ");a=JU.PT.simpleReplace(a,
"  "," ");var d=JU.PT.split(JU.PT.trim(a," ")," "),b=Array(d.length);a=d[0];for(var e,f=1;f<d.length;f++)b[f]=-2147483648!=(e=JU.PT.parseInt(d[f]))?J.script.SV.newI(e):J.script.SV.newV(4,d[f]);return this.extractProperty(this.getProperty(null,a,c),b,1)},"~S,~O");n(c$,"extractProperty",function(a,c,d){if(d>=c.length)return a;var b,e=c[d++];switch(e.tok){case 2:b=e.asInt()-1;if(l(a,JU.List))return 0>b&&(b+=a.size()),0<=b&&b<a.size()?this.extractProperty(a.get(b),c,d):"";if(l(a,JU.M3))return a=[[a.m00,
a.m01,a.m02],[a.m10,a.m11,a.m12],[a.m20,a.m21,a.m22]],0>b&&(b+=3),0<=b&&3>b?this.extractProperty(a,c,--d):"";if(JU.PT.isAI(a))return 0>b&&(b+=a.length),0<=b&&b<a.length?Integer.$valueOf(a[b]):"";if(JU.PT.isAD(a))return 0>b&&(b+=a.length),0<=b&&b<a.length?Double.$valueOf(a[b]):"";if(JU.PT.isAF(a))return 0>b&&(b+=a.length),0<=b&&b<a.length?Float.$valueOf(a[b]):"";if(JU.PT.isAII(a)||JU.PT.isAFF(a))return 0>b&&(b+=a.length),0<=b&&b<a.length?this.extractProperty(a[b],c,d):"";if(JU.PT.isAS(a)||l(a,Array))return 0>
b&&(b+=a.length),0<=b&&b<a.length?a[b]:"";break;case 4:var f=e.asString();if(l(a,java.util.Map)){if(f.equalsIgnoreCase("keys")){f=new JU.List;for(e=a.keySet().iterator();e.hasNext()&&((b=e.next())||1);)f.addLast(b);return this.extractProperty(f,c,d)}if(!a.containsKey(f))for(e=a.keySet().iterator();e.hasNext()&&((b=e.next())||1);)if(b.equalsIgnoreCase(f)){f=b;break}return a.containsKey(f)?this.extractProperty(a.get(f),c,d):""}if(l(a,JU.List)){e=new JU.List;d--;for(b=0;b<a.size();b++)f=a.get(b),l(f,
java.util.Map)&&e.addLast(this.extractProperty(f,c,d));return e}}return a},"~O,~A,~N");c$.getPropertyName=j(c$,"getPropertyName",function(a){return 0>a?"":J.viewer.PropertyManager.propertyTypes[3*a]},"~N");c$.getParamType=j(c$,"getParamType",function(a){return 0>a?"":J.viewer.PropertyManager.propertyTypes[3*a+1]},"~N");c$.isReadableAsString=j(c$,"isReadableAsString",function(a){for(var c=J.viewer.PropertyManager.readableTypes.length;0<=--c;)if(a.equalsIgnoreCase(J.viewer.PropertyManager.readableTypes[c]))return!0;
return!1},"~S");j(c$,"getPropertyAsObject",function(a,c,d){if(a.equals("tokenList"))return J.script.T.getTokensLike(c);var b=this.getPropertyNumber(a),e=null!=c&&0<c.toString().length;c=e?c:this.getDefaultPropertyParam(b);switch(b){case 0:return this.viewer.getAppletInfo();case 5:return this.viewer.getAnimationInfo();case 13:return this.viewer.getAtomBitSetVector(c);case 14:return this.getAllAtomInfo(this.viewer.getAtomBitSet(c));case 24:return this.viewer.getAuxiliaryInfo(c);case 15:return this.getAllBondInfo(c);
case 25:return this.viewer.getBoundBoxInfo();case 10:return this.viewer.getRotationCenter();case 16:return this.getAllChainInfo(this.viewer.getAtomBitSet(c));case 37:return this.viewer.getProperty("DATA_API","consoleText",null);case 26:return this.viewer.getData(c.toString());case 33:return this.viewer.getErrorMessageUn();case 28:return this.viewer.evaluateExpression(c.toString());case 20:return this.viewer.getModelExtract(c,!0,!1,"MOL");case 32:return J.viewer.PropertyManager.getFileInfo(this.viewer.getFileData(),
c.toString());case 1:return this.viewer.getFullPathName(!1);case 2:return this.viewer.getFileHeader();case 4:case 3:return e?this.viewer.getFileAsString(c.toString()):this.viewer.getCurrentFileAsString();case 27:e=c.toString().toLowerCase();b=a=-1;if(0<=(c=e.indexOf("height=")))a=JU.PT.parseInt(e.substring(c+7));if(0<=(c=e.indexOf("width=")))b=JU.PT.parseInt(e.substring(c+6));0>b&&0>a?a=b=-1:0>b?b=a:a=b;if(0<=e.indexOf("g64")||0<=e.indexOf("base64"))d="string";c="JPG";0<=e.indexOf("type=")&&(c=JU.PT.getTokens(JU.PT.replaceAllCharacter(e.substring(e.indexOf("type=")+
5),";,"," "))[0]);e=Array(1);a=this.viewer.getImageAsBytes(c.toUpperCase(),b,a,-1,e);return null!=e[0]?e[0]:null==d?a:JU.Base64.getBase64(a).toString();case 35:return this.viewer.getShapeProperty(24,"getInfo");case 36:return this.viewer.getShapeProperty(24,"getData");case 40:return this.viewer.getNMRCalculation().getInfo(c.toString());case 41:return this.getVariables(c.toString());case 21:return this.viewer.getStatusChanged(c.toString());case 22:return this.viewer;case 38:return this.viewer.getJspecViewProperties(c);
case 7:return this.getLigandInfo(this.viewer.getAtomBitSet(c));case 9:return this.viewer.getMeasurementInfo();case 29:return this.viewer.getMenu(c.toString());case 23:return this.viewer.getMessageQueue();case 30:return this.viewer.getMinimizationInfo();case 6:return this.getModelInfo(this.viewer.getAtomBitSet(c));case 18:return this.getMoleculeInfo(this.viewer.getAtomBitSet(c));case 34:return this.viewer.getMouseInfo();case 11:return this.viewer.getOrientationInfo();case 31:return this.viewer.getPointGroupInfo(c);
case 17:return this.getAllPolymerInfo(this.viewer.getAtomBitSet(c));case 39:return this.viewer.getScriptQueueInfo();case 8:return this.viewer.getShapeInfo();case 19:return this.viewer.getStateInfo3(c.toString(),0,0);case 12:return this.viewer.getMatrixRotate()}d=Array(42);for(b=0;42>b;b++){e=J.viewer.PropertyManager.getParamType(b);c=this.getDefaultPropertyParam(b);var f=J.viewer.PropertyManager.getPropertyName(b);d[b]="X"==f.charAt(0)?"":f+(""!==e?" "+J.viewer.PropertyManager.getParamType(b)+(""!==
c?" #default: "+this.getDefaultPropertyParam(b):""):"")}java.util.Arrays.sort(d);e=new JU.SB;e.append("getProperty ERROR\n").append(a).append("?\nOptions include:\n");for(b=0;42>b;b++)0<d[b].length&&e.append("\n getProperty ").append(d[b]);return e.toString()},"~S,~O,~S");j(c$,"getVariables",function(a){return a.toLowerCase().equals("all")?this.viewer.global.getAllVariables():this.viewer.evaluateExpressionAsVariable(a)},"~S");c$.getFileInfo=j(c$,"getFileInfo",function(a,c){var d=new java.util.Hashtable;
if(null==a)return d;var b=null!=c&&0<c.length;if(l(a,java.util.Map))return b?a.get(c):a;var e=JU.PT.split(a,"\n");if(0==e.length||6>e[0].length||" "!=e[0].charAt(6)||!e[0].substring(0,6).equals(e[0].substring(0,6).toUpperCase()))return d.put("fileHeader",a),d;var f="",h=new JU.SB;b&&(c=c.toUpperCase());for(var g="",m=0;m<e.length;m++){var k=e[m];if(!(12>k.length)){var g=k.substring(0,6).trim(),p=k.substring(7,10).trim();g.equals("REMARK")&&(g+=p);if(!g.equals(f)){if(b&&f.equals(c))return h.toString();
b||(d.put(f,h.toString()),h=new JU.SB);f=g}(!b||g.equals(c))&&h.append(k).appendC("\n")}}b||d.put(f,h.toString());return b?g.equals(c)?h.toString():"":d},"~O,~S");j(c$,"getMoleculeInfo",function(a){a=this.viewer.getAtomBitSet(a);for(var c=this.viewer.modelSet.getMolecules(),d=new JU.List,b=new JU.BS,e=0;e<c.length;e++){var b=J.util.BSUtil.copy(a),f=c[e];b.and(f.atomList);0<b.length()&&(b=new java.util.Hashtable,b.put("mf",f.getMolecularFormula(!1)),b.put("number",Integer.$valueOf(f.moleculeIndex+
1)),b.put("modelNumber",this.viewer.modelSet.getModelNumberDotted(f.modelIndex)),b.put("numberInModel",Integer.$valueOf(f.indexInModel+1)),b.put("nAtoms",Integer.$valueOf(f.atomCount)),b.put("nElements",Integer.$valueOf(f.nElements)),d.addLast(b))}return d},"~O");n(c$,"getModelInfo",function(a){a=this.viewer.getModelBitSet(this.viewer.getAtomBitSet(a),!1);var c=this.viewer.getModelSet(),d=new java.util.Hashtable;d.put("modelSetName",c.modelSetName);d.put("modelCount",Integer.$valueOf(c.modelCount));
d.put("isTainted",Boolean.$valueOf(null!=c.tainted));d.put("canSkipLoad",Boolean.$valueOf(c.canSkipLoad));d.put("modelSetHasVibrationVectors",Boolean.$valueOf(c.modelSetHasVibrationVectors()));null!=c.modelSetProperties&&d.put("modelSetProperties",c.modelSetProperties);d.put("modelCountSelected",Integer.$valueOf(J.util.BSUtil.cardinalityOf(a)));d.put("modelsSelected",a);var b=new JU.List;c.getMolecules();for(var e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+1)){var f=new java.util.Hashtable;f.put("_ipt",
Integer.$valueOf(e));f.put("num",Integer.$valueOf(c.getModelNumber(e)));f.put("file_model",c.getModelNumberDotted(e));f.put("name",c.getModelName(e));var h=c.getModelTitle(e);null!=h&&f.put("title",h);h=c.getModelFileName(e);null!=h&&f.put("file",h);h=c.getModelAuxiliaryInfoValue(e,"modelID");null!=h&&f.put("id",h);f.put("vibrationVectors",Boolean.$valueOf(this.viewer.modelHasVibrationVectors(e)));h=c.models[e];f.put("atomCount",Integer.$valueOf(h.atomCount));f.put("bondCount",Integer.$valueOf(h.getBondCount()));
f.put("groupCount",Integer.$valueOf(h.getGroupCount()));f.put("moleculeCount",Integer.$valueOf(h.moleculeCount));f.put("polymerCount",Integer.$valueOf(h.getBioPolymerCount()));f.put("chainCount",Integer.$valueOf(c.getChainCountInModel(e,!0)));null!=h.properties&&f.put("modelProperties",h.properties);var g=c.getModelAuxiliaryInfoValue(e,"Energy");null!=g&&f.put("energy",g);f.put("atomCount",Integer.$valueOf(h.atomCount));b.addLast(f)}d.put("models",b);return d},"~O");n(c$,"getLigandInfo",function(a){var c=
this.viewer.getAtomBitSet(a),d=this.viewer.getAtomBitSet("solvent");a=new java.util.Hashtable;var b=new JU.List;a.put("ligands",b);var e=this.viewer.modelSet,f=J.util.BSUtil.copyInvert(c,e.atomCount);f.or(d);for(var d=e.atoms,h=c.nextSetBit(0);0<=h;h=c.nextSetBit(h+1))(d[h].isProtein()||d[h].isNucleic())&&f.set(h);c=Array(e.modelCount);for(h=e.modelCount;0<=--h;)c[h]=this.viewer.getModelUndeletedAtomsBitSet(h),c[h].andNot(f);f=J.util.JmolMolecule.getMolecules(d,c,null,f);for(h=0;h<f.length;h++){var c=
f[h].atomList,g=new java.util.Hashtable;b.addLast(g);g.put("atoms",J.util.Escape.eBS(c));for(var m="",k="",p=null,s=0,j=null,q="",n="",l=2147483647,w=2147483647,u=c.nextSetBit(0);0<=u;u=c.nextSetBit(u+1)){var r=d[u];if(p!==r.group){var p=r.group,v=r.getResno(),x=r.getChainID();l!=v-1&&(0!=q.length&&l!=w&&(q+="-"+l),x=-1,w=v);n="/"+e.getModelNumberDotted(r.modelIndex);0!=s&&x!=s&&(q+=":"+j+n);-1==x&&(q+=" "+v);l=v;s=r.getChainID();j=r.getChainIDStr();m+=k+r.getGroup3(!1);k="-"}}q+=(w==l?"":"-"+l)+
(0==s?"":":"+j)+n;g.put("groupNames",m);g.put("residueList",q.substring(1))}return a},"~O");n(c$,"getSymmetryInfo",function(a,c,d,b,e,f,h){var g=-1;if(null==a){g=this.viewer.getCurrentModelIndex();if(0>g)return"";a=this.viewer.getModelUndeletedAtomsBitSet(g)}a=a.nextSetBit(0);if(0>a)return"";var g=this.viewer.modelSet.atoms[a].modelIndex,m=this.viewer.modelSet.models[g].biosymmetry;null==m&&(m=this.viewer.modelSet.getUnitCell(g));return null==m?"":m.getSymmetryInfo(this.viewer.modelSet,g,a,m,c,d,
b,e,f,h)},"JU.BS,~S,~N,JU.P3,JU.P3,~S,~N");n(c$,"getModelExtract",function(a,c,d,b){var e=b.equalsIgnoreCase("V3000"),f=b.equalsIgnoreCase("SDF"),h=b.equalsIgnoreCase("XYZVIB"),g=b.equalsIgnoreCase("JSON")||b.equalsIgnoreCase("CD");b=new JU.SB;var m=this.viewer.modelSet;if(!h&&!g){b.append(d?"Jmol Model Kit":this.viewer.getFullPathName(!1).$replace("\\","/"));d=J.viewer.Viewer.getJmolVersion();b.append("\n__Jmol-").append(d.substring(0,2));var k,p,j,l;l=new Date;d=l.getMonth();k=l.getDate();p=l.getFullYear();
j=l.getHours();l=l.getMinutes();J.util.Txt.rightJustify(b,"_00",""+(1+d));J.util.Txt.rightJustify(b,"00",""+k);b.append((""+p).substring(2,4));J.util.Txt.rightJustify(b,"00",""+j);J.util.Txt.rightJustify(b,"00",""+l);b.append("3D 1   1.00000     0.00000     0");b.append("\nJmol version ").append(J.viewer.Viewer.getJmolVersion()).append(" EXTRACT: ").append(J.util.Escape.eBS(a)).append("\n")}d=J.util.BSUtil.copy(a);p=m.atoms;for(k=a.nextSetBit(0);0<=k;k=a.nextSetBit(k+1))c&&p[k].isDeleted()&&d.clear(k);
j=J.viewer.PropertyManager.getCovalentBondsForAtoms(m.bonds,m.bondCount,d);if(!h&&0==d.cardinality())return"";a=!0;c=c?this.viewer.getRotationQuaternion():null;if(f){p=b.toString();b=new JU.SB;e=this.viewer.getModelBitSet(d,!0);for(k=e.nextSetBit(0);0<=k;k=e.nextSetBit(k+1)){b.append(p);f=J.util.BSUtil.copy(d);f.and(m.getModelAtomBitSetIncludingDeleted(k,!1));j=J.viewer.PropertyManager.getCovalentBondsForAtoms(m.bonds,m.bondCount,f);if(!(a=this.addMolFile(b,f,j,!1,!1,c)))break;b.append("$$$$\n")}}else if(h){h=
J.modelset.LabelToken.compile(this.viewer,"%-2e %10.5x %10.5y %10.5z %10.5vx %10.5vy %10.5vz\n","\x00",null);c=J.modelset.LabelToken.compile(this.viewer,"%-2e %10.5x %10.5y %10.5z\n","\x00",null);e=this.viewer.getModelBitSet(d,!0);for(k=e.nextSetBit(0);0<=k;k=e.nextSetBit(k+1))if(f=J.util.BSUtil.copy(d),f.and(m.getModelAtomBitSetIncludingDeleted(k,!1)),0!=f.cardinality()){b.appendI(f.cardinality()).appendC("\n");g=m.models[k].properties;b.append("Model["+(k+1)+"]: ");if(null!=m.frameTitles[k]&&0<
m.frameTitles[k].length)b.append(m.frameTitles[k].$replace("\n"," "));else if(null==g)b.append("Jmol "+J.viewer.Viewer.getJmolVersion());else{j=new JU.SB;l=g.propertyNames();for(var n=null;l.hasMoreElements();){var t=l.nextElement();t.equals(".PATH")?n=g.getProperty(t):j.append(";").append(t).append("=").append(g.getProperty(t))}null!=n&&j.append(";PATH=").append(n);n=j.substring(0<j.length()?1:0);b.append(n.$replace("\n"," "))}b.appendC("\n");for(g=f.nextSetBit(0);0<=g;g=f.nextSetBit(g+1))b.append(J.modelset.LabelToken.formatLabelAtomArray(this.viewer,
p[g],null==m.getVibration(g,!1)?c:h,"\x00",null))}}else a=this.addMolFile(b,d,j,e,g,c);return a?b.toString():"ERROR: Too many atoms or bonds -- use V3000 format."},"JU.BS,~B,~B,~S");j(c$,"addMolFile",function(a,c,d,b,e,f){var h=c.cardinality(),g=d.cardinality();if(!b&&!e&&(999<h||999<g))return!1;var m=this.viewer.modelSet,k=F(m.atomCount,0),j=new JU.P3;b?a.append("  0  0  0  0  0  0            999 V3000"):e?a.append('{"mol":{"createdBy":"Jmol '+J.viewer.Viewer.getJmolVersion()+'","a":['):(J.util.Txt.rightJustify(a,
"   ",""+h),J.util.Txt.rightJustify(a,"   ",""+g),a.append("  0  0  0  0              1 V2000"));e||a.append("\n");b&&a.append("M  V30 BEGIN CTAB\nM  V30 COUNTS ").appendI(h).append(" ").appendI(g).append(" 0 0 0\n").append("M  V30 BEGIN ATOM\n");for(var l=new JU.P3,g=c.nextSetBit(0),n=0;0<=g;g=c.nextSetBit(g+1))this.getAtomRecordMOL(m,a,k[g]=++n,m.atoms[g],f,j,l,b,e);b?a.append("M  V30 END ATOM\nM  V30 BEGIN BOND\n"):e&&a.append('],"b":[');g=d.nextSetBit(0);for(n=0;0<=g;g=d.nextSetBit(g+1))this.getBondRecordMOL(a,
++n,m.bonds[g],k,b,e);b&&a.append("M  V30 END BOND\nM  V30 END CTAB\n");e?a.append("]}}"):a.append("M  END\n");if(!e&&!b&&(d=m.getPartialCharges(),null!=d)){a.append("> <JMOL_PARTIAL_CHARGES>\n").appendI(h).appendC("\n");g=c.nextSetBit(0);for(n=0;0<=g;g=c.nextSetBit(g+1))a.appendI(++n).append(" ").appendF(d[g]).appendC("\n")}return!0},"JU.SB,JU.BS,JU.BS,~B,~B,J.util.Quaternion");c$.getCovalentBondsForAtoms=j(c$,"getCovalentBondsForAtoms",function(a,c,d){for(var b=new JU.BS,e=0;e<c;e++){var f=a[e];
d.get(f.atom1.index)&&(d.get(f.atom2.index)&&f.isCovalent())&&b.set(e)}return b},"~A,~N,JU.BS");j(c$,"getAtomRecordMOL",function(a,c,d,b,e,f,h,g,m){a.models[b.modelIndex].isTrajectory?b.setFractionalCoordPt(h,a.trajectorySteps.get(b.modelIndex)[b.index-a.models[b.modelIndex].firstAtomIndex],!0):f.setT(b);null!=e&&e.transformP2(f,f);a=b.getElementNumber();e=b.isDeleted()?"Xx":J.util.Elements.elementSymbolFromNumber(a);h=b.getIsotopeNumber();var k=b.getFormalCharge();g?(c.append("M  V30 ").appendI(d).append(" ").append(e).append(" ").appendF(f.x).append(" ").appendF(f.y).append(" ").appendF(f.z).append(" 0"),
0!=k&&c.append(" CHG=").appendI(k),0!=h&&c.append(" MASS=").appendI(h),c.append("\n")):m?(1!=d&&c.append(","),c.append("{"),6!=b.getElementNumber()&&c.append('"l":"').append(b.getElementSymbol()).append('",'),0!=k&&c.append('"c":').appendI(k).append(","),0!=h&&h!=J.util.Elements.getNaturalIsotope(a)&&c.append('"m":').appendI(h).append(","),c.append('"x":').appendF(b.x).append(',"y":').appendF(b.y).append(',"z":').appendF(b.z).append("}")):(c.append(J.util.Txt.sprintf("%10.5p%10.5p%10.5p","p",[f])),
c.append(" ").append(e),1==e.length&&c.append(" "),0<h&&(h-=J.util.Elements.getNaturalIsotope(b.getElementNumber())),c.append(" "),J.util.Txt.rightJustify(c,"  ",""+h),J.util.Txt.rightJustify(c,"   ",""+(0==k?0:4-k)),c.append("  0  0  0  0\n"))},"J.modelset.ModelSet,JU.SB,~N,J.modelset.Atom,J.util.Quaternion,JU.P3,JU.P3,~B,~B");j(c$,"getBondRecordMOL",function(a,c,d,b,e,f){var h=b[d.atom1.index];b=b[d.atom2.index];var g=d.getValence();3<g&&(g=1);switch(d.order&-131073){case 515:g=f?-3:4;break;case 66:g=
f?-3:5;break;case 513:g=f?1:6;break;case 514:g=f?2:7;break;case 33:g=f?-1:8}e?a.append("M  V30 ").appendI(c).append(" ").appendI(g).append(" ").appendI(h).append(" ").appendI(b).appendC("\n"):f?(1!=c&&a.append(","),a.append('{"b":').appendI(h-1).append(',"e":').appendI(b-1),1!=g&&(a.append(',"o":'),0>g?a.appendF(-g/2):a.appendI(g)),a.append("}")):(J.util.Txt.rightJustify(a,"   ",""+h),J.util.Txt.rightJustify(a,"   ",""+b),a.append("  ").appendI(g).append("  0  0  0\n"))},"JU.SB,~N,J.modelset.Bond,~A,~B,~B");
n(c$,"getChimeInfo",function(a,c){switch(a){case 1073741982:break;case 1073741864:return this.getBasePairInfo(c);default:return this.getChimeInfoA(this.viewer.modelSet.atoms,a,c)}var d=new JU.SB;this.viewer.modelSet.models[0].getChimeInfo(d,0);return d.appendC("\n").toString().substring(1)},"~N,JU.BS");j(c$,"getChimeInfoA",function(a,c,d){var b=new JU.SB;b.append("\n");var e="",f=null,h=null,g=-1,m=0;if(null!=d)for(var k=d.nextSetBit(0);0<=k;k=d.nextSetBit(k+1)){var j=a[k];switch(c){default:return"";
case 1114638363:e=j.getInfo();break;case 1141899265:e=""+j.getAtomNumber();break;case 1087373318:e=j.getGroup3(!1);break;case 1087373316:case 1073742120:case 1087373320:var l=j.getChainID(),e=0==l?" ":j.getChainIDStr();255<l&&(e=J.util.Escape.eS(e));switch(c){case 1073742120:e="["+j.getGroup3(!1)+"]"+j.getSeqcodeString()+":"+e;break;case 1087373320:j.getModelIndex()!=g&&(b.appendC("\n"),m=0,g=j.getModelIndex(),b.append("Model "+j.getModelNumber()),f=h=null);j.getChain()!==f&&(b.appendC("\n"),m=0,
f=j.getChain(),b.append("Chain "+e+":\n"),h=null);e=j.getGroup();e!==h&&(0==m++%5&&1<m&&b.appendC("\n"),J.util.Txt.leftJustify(b,"          ","["+j.getGroup3(!1)+"]"+j.getResno()+" "),h=e);continue}}0>b.indexOf("\n"+e+"\n")&&b.append(e).appendC("\n")}1087373320==c&&b.appendC("\n");return b.toString().substring(1)},"~A,~N,JU.BS");n(c$,"getModelFileInfo",function(a){for(var c=this.viewer.modelSet,d=new JU.SB,b=0;b<c.modelCount;++b)if(null==a||a.get(b)){var e='["'+c.getModelNumberDotted(b)+'"] = ';d.append("\n\nfile").append(e).append(J.util.Escape.eS(c.getModelFileName(b)));
var f=c.getModelAuxiliaryInfoValue(b,"modelID");null!=f&&d.append("\nid").append(e).append(J.util.Escape.eS(f));d.append("\ntitle").append(e).append(J.util.Escape.eS(c.getModelTitle(b)));d.append("\nname").append(e).append(J.util.Escape.eS(c.getModelName(b)));d.append("\ntype").append(e).append(J.util.Escape.eS(c.getModelFileType(b)))}return d.toString()},"JU.BS");j(c$,"getAllAtomInfo",function(a){for(var c=new JU.List,d=a.nextSetBit(0);0<=d;d=a.nextSetBit(d+1))c.addLast(this.getAtomInfoLong(d));
return c},"JU.BS");j(c$,"getAtomInfoLong",function(a){var c=this.viewer.modelSet,d=c.atoms[a],b=new java.util.Hashtable;this.viewer.getAtomIdentityInfo(a,b);b.put("element",c.getElementName(a));b.put("elemno",Integer.$valueOf(c.getElementNumber(a)));b.put("x",Float.$valueOf(d.x));b.put("y",Float.$valueOf(d.y));b.put("z",Float.$valueOf(d.z));b.put("coord",JU.P3.newP(d));null!=c.vibrations&&null!=c.vibrations[a]&&c.vibrations[a].getInfo(b);b.put("bondCount",Integer.$valueOf(d.getCovalentBondCount()));
b.put("radius",Float.$valueOf(d.getRasMolRadius()/120));b.put("model",d.getModelNumberForLabel());var e=J.modelset.Atom.atomPropertyString(this.viewer,d,1087373323);null!=e&&b.put("shape",e);b.put("visible",Boolean.$valueOf(d.isVisible(0)));b.put("clickabilityFlags",Integer.$valueOf(d.clickabilityFlags));b.put("visibilityFlags",Integer.$valueOf(d.shapeVisibilityFlags));b.put("spacefill",Float.$valueOf(d.getRadius()));e=J.util.Escape.escapeColor(this.viewer.getColorArgbOrGray(d.colixAtom));null!=e&&
b.put("color",e);b.put("colix",Integer.$valueOf(d.colixAtom));(e=d.isTranslucent())&&b.put("translucent",Boolean.$valueOf(e));b.put("formalCharge",Integer.$valueOf(d.getFormalCharge()));b.put("partialCharge",Float.$valueOf(d.getPartialCharge()));e=d.getSurfaceDistance100()/100;0<=e&&b.put("surfaceDistance",Float.$valueOf(e));if(c.models[d.modelIndex].isBioModel){b.put("resname",d.getGroup3(!1));var e=d.getInsertionCode(),f=d.getResno();0<f&&b.put("resno",Integer.$valueOf(f));0!=e.charCodeAt(0)&&b.put("insertionCode",
""+e);b.put("name",c.getAtomName(a));b.put("chain",d.getChainIDStr());b.put("atomID",Integer.$valueOf(d.atomID));b.put("groupID",Integer.$valueOf(d.getGroupID()));"\x00"!=d.altloc&&b.put("altLocation",""+d.altloc);b.put("structure",Integer.$valueOf(d.getProteinStructureType().getId()));b.put("polymerLength",Integer.$valueOf(d.getPolymerLength()));b.put("occupancy",Integer.$valueOf(d.getOccupancy100()));a=d.getBfactor100();b.put("temp",Integer.$valueOf(A(a/100)))}return b},"~N");j(c$,"getAllBondInfo",
function(a){var c=new JU.List,d=this.viewer.modelSet,b=d.bondCount,d=d.bonds,e;l(a,String)&&(a=this.viewer.getAtomBitSet(a));if(l(a,Array)){e=a[0];var f=a[1];for(a=0;a<b;a++){var h=d[a].atom1.index,g=d[a].atom2.index;(e.get(h)&&f.get(g)||f.get(h)&&e.get(g))&&c.addLast(this.getBondInfo(a))}}else if(l(a,J.modelset.BondSet)){e=a;for(a=e.nextSetBit(0);0<=a&&a<b;a=e.nextSetBit(a+1))c.addLast(this.getBondInfo(a))}else if(l(a,JU.BS)){e=a;f=1==e.cardinality()?e.nextSetBit(0):-1;for(a=0;a<b;a++)(0<=f?d[a].atom1.index==
f||d[a].atom2.index==f:e.get(d[a].atom1.index)&&e.get(d[a].atom2.index))&&c.addLast(this.getBondInfo(a))}return c},"~O");j(c$,"getBondInfo",function(a){var c=this.viewer.modelSet.bonds[a],d=c.atom1,b=c.atom2,e=new java.util.Hashtable;e.put("_bpt",Integer.$valueOf(a));a=new java.util.Hashtable;this.viewer.getAtomIdentityInfo(d.index,a);var f=new java.util.Hashtable;this.viewer.getAtomIdentityInfo(b.index,f);e.put("atom1",a);e.put("atom2",f);e.put("order",Float.$valueOf(JU.PT.fVal(J.util.JmolEdge.getBondOrderNumberFromOrder(c.order))));
e.put("type",J.util.JmolEdge.getBondOrderNameFromOrder(c.order));e.put("radius",Float.$valueOf(c.mad/2E3));e.put("length_Ang",Float.$valueOf(d.distance(b)));e.put("visible",Boolean.$valueOf(0!=c.shapeVisibilityFlags));d=J.util.Escape.escapeColor(this.viewer.getColorArgbOrGray(c.colix));null!=d&&e.put("color",d);e.put("colix",Integer.$valueOf(c.colix));J.util.C.isColixTranslucent(c.colix)&&e.put("translucent",Boolean.TRUE);return e},"~N");j(c$,"getAllChainInfo",function(a){for(var c=new java.util.Hashtable,
d=new JU.List,b=this.viewer.modelSet.modelCount,e=0;e<b;++e){var f=new java.util.Hashtable,h=this.getChainInfo(e,a);0<h.size()&&(f.put("modelIndex",Integer.$valueOf(e)),f.put("chains",h),d.addLast(f))}c.put("models",d);return c},"JU.BS");j(c$,"getChainInfo",function(a,c){for(var d=this.viewer.modelSet.models[a],b=d.getChainCount(!0),e=new JU.List,f=0;f<b;f++){for(var h=d.getChainAt(f),g=new JU.List,j=h.getGroupCount(),k=new java.util.Hashtable,l=0;l<j;l++){var n=h.getGroup(l);c.get(n.firstAtomIndex)&&
g.addLast(n.getGroupInfo(l))}g.isEmpty()||(k.put("residues",g),e.addLast(k))}return e},"~N,JU.BS");j(c$,"getAllPolymerInfo",function(a){for(var c=new java.util.Hashtable,d=new JU.List,b=this.viewer.modelSet.modelCount,e=this.viewer.modelSet.models,f=0;f<b;++f)e[f].isBioModel&&e[f].getAllPolymerInfo(a,c,d);c.put("models",d);return c},"JU.BS");j(c$,"getBasePairInfo",function(a){var c=new JU.SB,d=new JU.List;this.viewer.modelSet.calcRasmolHydrogenBonds(a,a,d,!0,1,!1,null);for(a=d.size();0<=--a;){var b=
d.get(a);J.viewer.PropertyManager.getAtomResidueInfo(c,b.atom1);c.append(" - ");J.viewer.PropertyManager.getAtomResidueInfo(c,b.atom2);c.append("\n")}return c.toString()},"JU.BS");c$.getAtomResidueInfo=j(c$,"getAtomResidueInfo",function(a,c){a.append("[").append(c.getGroup3(!1)).append("]").append(c.getSeqcodeString()).append(":");var d=c.getChainID();a.append(0==d?" ":c.getChainIDStr())},"JU.SB,J.modelset.Atom");z(c$,"atomExpression","<atom selection>");c$.propertyTypes=c$.prototype.propertyTypes=
"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".split(";");
z(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_COUNT",42,"readableTypes"," stateinfo extractmodel filecontents fileheader image menu minimizationInfo".split(" "))})})(Clazz,
Clazz.newArray,Clazz.newBooleanArray,Clazz.newByteArray,Clazz.newCharArray,Clazz.newDoubleArray,Clazz.newFloatArray,Clazz.newIntArray,Clazz.newLongArray,Clazz.newShortArray,Clazz.prepareCallback,Clazz.decorateAsClass,Clazz.isClassDefined,Clazz.defineEnumConstant,Clazz.cloneFinals,Clazz.inheritArgs,Clazz.pu$h,Clazz.declareInterface,Clazz.declarePackage,Clazz.makeConstructor,Clazz.overrideConstructor,Clazz.load,Clazz.defineMethod,Clazz.innerTypeInstance,Clazz.instanceOf,Clazz.p0p,Clazz.makeFunction,
Clazz.superConstructor,Clazz.defineStatics,Clazz.registerSerializableFields,Clazz.declareType,Clazz.superCall,Clazz.overrideMethod,Clazz.declareAnonymous,Clazz.checkPrivateMethod,Clazz.prepareFields,Clazz.instantialize,Clazz.doubleToInt,Clazz.declarePackage,Clazz.instanceOf,Clazz.load,Clazz.instantialize,Clazz.decorateAsClass,Clazz.floatToInt,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.supportsNativeObject,Clazz.extendedObjectMethods,Clazz.callingStackTraces,Clazz.clone,Clazz.doubleToShort,Clazz.innerFunctions,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);
