(function(Y,Z,$,aa,ba,ca,O,I,P,Q,R,M,S,T,da,N,H,U,L,V,ea,W,fa,ga,ha,ia,ja,ka,la,ma,D,na,oa,pa,qa,ra,sa,ta,ua,va,wa,xa,ya,za,Aa,Ba,Ca,Da,Ea,Fa,Ga,Ha,Ia,Ja,Ka,La,Ma,Na,k,X){O("JS");P(null,"JS.ScriptExt",["JU.AU"],function(){c$=R(function(){this.e=this.vwr=null;this.chk=!1;this.st=null;this.slen=0;Q(this,arguments)},JS,"ScriptExt");k(c$,"init",function(a){this.e=a;this.vwr=this.e.vwr;return this},"~O");k(c$,"atomExpressionAt",function(a){return this.e.atomExpressionAt(a)},"~N");k(c$,"checkLength",function(a){this.e.checkLength(a)},
"~N");k(c$,"error",function(a){this.e.error(a)},"~N");k(c$,"invArg",function(){this.e.invArg()});k(c$,"invPO",function(){this.error(23)});k(c$,"getShapeProperty",function(a,b){return this.e.getShapeProperty(a,b)},"~N,~S");k(c$,"paramAsStr",function(a){return this.e.paramAsStr(a)},"~N");k(c$,"centerParameter",function(a){return this.e.centerParameter(a,null)},"~N");k(c$,"floatParameter",function(a){return this.e.floatParameter(a)},"~N");k(c$,"getPoint3f",function(a,b){return this.e.getPoint3f(a,b,
!0)},"~N,~B");k(c$,"intParameter",function(a){return this.e.intParameter(a)},"~N");k(c$,"isFloatParameter",function(a){switch(this.e.tokAt(a)){case 2:case 3:return!0}return!1},"~N");k(c$,"setShapeProperty",function(a,b,c){this.e.setShapeProperty(a,b,c)},"~N,~S,~O");k(c$,"showString",function(a){this.e.showString(a)},"~S");k(c$,"stringParameter",function(a){return this.e.stringParameter(a)},"~N");k(c$,"getToken",function(a){return this.e.getToken(a)},"~N");k(c$,"tokAt",function(a){return this.e.tokAt(a)},
"~N");k(c$,"setShapeId",function(a,b,c){c&&this.invArg();b=this.e.setShapeNameParameter(b).toLowerCase();this.setShapeProperty(a,"thisID",b);return b},"~N,~N,~B");k(c$,"getColorTrans",function(a,b,c,d){c=3.4028235E38;1765808134!=a.theTok&&--b;switch(this.tokAt(b+1)){case 603979967:b++;c=this.isFloatParameter(b+1)?a.getTranslucentLevel(++b):this.vwr.getFloat(570425354);break;case 1073742074:b++,c=0}a.isColorParam(b+1)?d[0]=a.getArgbParam(++b):1073742333==this.tokAt(b+1)?(d[0]=0,a.iToken=b+1):3.4028235E38==
c?this.invArg():d[0]=-2147483648;return c},"JS.ScriptEval,~N,~B,~A");k(c$,"finalizeObject",function(a,b,c,d,f,e,g,h){f&&this.setShapeProperty(a,"set",e);-2147483648!=b&&this.e.setShapePropertyBs(a,"color",Integer.$valueOf(b),h);3.4028235E38!=c&&this.e.setShapeTranslucency(a,"","translucent",c,h);0!=d&&this.setShapeProperty(a,"scale",Integer.$valueOf(d));0<g&&(this.e.setMeshDisplayProperty(a,g,0)||this.invArg())},"~N,~N,~N,~N,~B,~O,~N,JU.BS");k(c$,"getIntArray2",function(a){a=this.e.getToken(a).getList();
for(var b=JU.AU.newInt2(a.size()),c=b.length;0<=--c;){var d=a.get(c).getList();null==d&&this.invArg();b[c]=H(d.size(),0);for(var f=b[c].length;0<=--f;)b[c][f]=d.get(f).intValue}return b},"~N");k(c$,"getAllPoints",function(a){var b=null,c=null;try{switch(this.e.tokAt(a)){case 7:b=this.e.getPointArray(a,-1,!1);break;case 12290:case 10:case 1073742325:c=this.atomExpressionAt(a)}if(null==b){null==c&&(c=this.vwr.getAllAtoms());var b=Array(c.cardinality()),d=c.nextSetBit(0);for(a=0;0<=d;d=c.nextSetBit(d+
1))b[a++]=this.vwr.ms.at[d]}}catch(f){if(!N(f,Exception))throw f;}3>b.length&&this.invArg();return b},"~N")});O("JS");P(["JS.ScriptExt"],"JS.CmdExt","java.lang.Boolean $.Float $.Long java.util.Hashtable $.Map JU.AU $.BS $.Base64 $.Lst $.M3 $.M4 $.Measure $.P3 $.P4 $.PT $.Quat $.SB $.V3 J.api.Interface J.atomdata.RadiusData J.c.STER $.VDW J.i18n.GT JM.Atom $.AtomCollection $.BondSet $.LabelToken JS.SV $.ScriptCompiler $.ScriptError $.ScriptEval $.ScriptInterruption $.ScriptMathProcessor $.ScriptParam $.T JU.BSUtil $.BoxInfo $.C $.Edge $.Elements $.Escape $.Logger $.Parser $.Point3fi $.SimpleUnitCell JV.FileManager $.JC $.StateManager $.Viewer".split(" "),
function(){c$=V(JS,"CmdExt",JS.ScriptExt);T(c$,function(){W(this,JS.CmdExt,[])});X(c$,"dispatch",function(a,b,c){this.chk=this.e.chk;this.slen=this.e.slen;this.st=c;switch(a){case 1073741866:c[0].value=this.prepareBinaryOutput(c[0]);break;case 4098:this.assign();break;case 134221829:this.cache();break;case 4102:this.calculate();break;case 4103:this.capture();break;case 4105:this.centerAt();break;case 134221831:this.compare();break;case 528395:this.console();break;case 4106:this.connect(1);break;case 1094717448:this.configuration();
break;case 134221834:this.data();break;case 1613238294:this.connect(0);break;case 4120:this.image();break;case 4122:this.invertSelected();break;case 4124:this.macro();break;case 4125:this.mapProperty();break;case 4126:this.minimize();break;case 1275072532:this.modulation();break;case 4130:this.mutate();break;case 4131:this.navigate();break;case 4133:case 134221850:case 4138:this.plot(c);break;case 134222350:this.show();break;case 528443:this.stereo();break;case 1814695966:this.unitcell(b?2:1);break;
case 134221856:return this.write(b?c:null);case 6:this.measure();break;case 21:this.polyhedra();break;case 20:this.ellipsoid();break;case 4:this.struts()}return null},"~N,~B,~A");k(c$,"macro",function(){var a=this.e.optParameterAsString(1);if(0!=a.length&&!this.chk){var b=JV.JC.getMacro(a);null==b?this.showString("macro "+a+" could not be found. Current macros include:\n"+JV.JC.getMacroList()):(this.showString("running "+b),this.e.cmdScript(4124,b,null))}});k(c$,"evalParallel",function(a,b){this.chk=
this.e.chk;this.slen=this.e.slen;var c=(new JS.ScriptEval).setViewer(this.vwr);c.historyDisabled=!0;c.compiler=new JS.ScriptCompiler(this.vwr);c.sm=b;try{c.restoreScriptContext(a,!0,!1,!1),c.allowJSThreads=!1,c.dispatchCommands(!1,!1,!1)}catch(d){if(N(d,Exception))return this.e.vwr.setStringProperty("_errormessage",""+d),null==c.thisContext&&(JU.Logger.error("Error evaluating context "+d),d.printStackTrace()),!1;throw d;}return!0},"JS.ScriptContext,JV.ShapeManager");k(c$,"getBitsetIdent",function(a,
b,c,d,f,e){var g=!I(c,JM.BondSet);g&&(null==b?b=this.vwr.getStandardLabelFormat(0):0==b.length&&(b="%[label]"));var h=null==b?-1:b.indexOf("%"),j=2147483647!=f;if(null==a||this.chk||g&&0>h)return null==b&&(b=""),e?D(-1,[b]):b;var h=this.vwr.ms,s=0,p=h.getLabeler();c=g||!d?null:c.associatedAtoms;null==c&&(null!=b&&0<b.indexOf("%D"))&&(c=this.vwr.ms.getAtomIndices(a));d=null==b||0==b.length;var m=g||d?null:JM.LabelToken.getBondLabelValues();b=d?null:g?p.compile(this.vwr,b,"\x00",null):p.compile(this.vwr,
b,"\u0001",m);var w=j?1:a.cardinality(),l=Array(w),k=new JU.P3;for(f=j?f:a.nextSetBit(0);0<=f;f=a.nextSetBit(f+1)){var x;g?x=d?h.at[f].getInfo():p.formatLabelAtomArray(this.vwr,h.at[f],b,"\x00",c,k):(x=h.bo[f],x=d?x.getIdentity():p.formatLabelBond(this.vwr,x,b,m,c,k));x=JU.PT.formatStringI(x,"#",s+1);l[s++]=x;if(j)break}return 1==w&&!e?l[0]:l},"JU.BS,~S,~O,~B,~N,~B");k(c$,"getLoadSymmetryParams",function(a,b,c){var d=this.e;this.chk=d.chk;this.slen=d.slen;var f=null,e=this.tokAt(a);if(1073742332==
e||8==e)f=d.getPointOrPlane(a,!1,!0,!1,!0,3,3,!0),e=this.tokAt(a=d.iToken+1);switch(e){case 1073741938:case 1073742080:case 1094713350:case 1073742163:case 1073742114:case 1073742152:case 1814695966:null==f&&(f=JU.P3.new3(555,555,-1)),d.iToken=a-1}e=null;if(null!=f){c.put("lattice",f);a=d.iToken+1;b.append(" "+JU.SimpleUnitCell.escapeMultiplier(f));a=this.checkPacked(a,c,b);1094713350==this.tokAt(a)&&(c.put("centroid",Boolean.TRUE),b.append(" CENTROID"),a=this.checkPacked(++a,c,b));if(1073742163==
this.tokAt(a)){var g;b.append(" SUPERCELL ");if(d.isPoint3f(++a)){g=this.getPoint3f(a,!1);if(g.x!=M(g.x)||g.y!=M(g.y)||g.z!=M(g.z)||1>g.x||1>g.y||1>g.z)d.iToken=a,this.invArg();a=d.iToken}else g=this.stringParameter(a);b.append(JU.Escape.e(g));c.put("supercell",g);a=this.checkPacked(++a,c,b)}g=0;1073742114==this.tokAt(a)&&(a++,g=this.floatParameter(a++),b.append(" range "+g));c.put("symmetryRange",Float.$valueOf(g));g=null;var h;g=-2147483648;1073742152==this.tokAt(a)&&(++a,g=JU.PT.rep(this.paramAsStr(a++),
"''",'"'),b.append(" spacegroup "+JU.PT.esc(g)),g.equalsIgnoreCase("ignoreOperators")?g=-999:(0==g.length?(h=this.vwr.getCurrentUnitCell(),null!=h&&(g=h.getSpaceGroupName())):0<=g.indexOf(",")&&9>f.x&&(9>f.y&&0==f.z)&&(g+="#doNormalize=0"),c.put("spaceGroupName",g),g=-2));f=null;if(1814695966==this.tokAt(a)){++a;h=d.optParameterAsString(a);0==h.length?(h=this.vwr.getCurrentUnitCell(),null!=h&&(f=h.getUnitCellAsArray(!0),e=h.getCartesianOffset())):4==this.tokAt(a)?(f=L(6,0),JU.SimpleUnitCell.setOabc(h,
f,null)):f=d.floatParameterSet(a,6,9);(null==f||6!=f.length&&9!=f.length)&&this.invArg();b.append(" unitcell [");for(a=0;a<f.length;a++)b.append((0==a?"":" ")+f[a]);b.append("]");c.put("unitcell",f);-2147483648==g&&(g=-1);a=d.iToken+1}-2147483648!=g&&c.put("spaceGroupIndex",Integer.$valueOf(g))}null!=e?d.coordinatesAreFractional=!1:1073742066==this.tokAt(a)&&(e=this.getPoint3f(++a,!0));null!=e&&(d.coordinatesAreFractional?(e.setT(d.fractionalPoint),c.put("unitCellOffsetFractional",d.coordinatesAreFractional?
Boolean.TRUE:Boolean.FALSE),b.append(" offset {"+e.x+" "+e.y+" "+e.z+"/1}")):b.append(" offset "+JU.Escape.eP(e)),c.put("unitCellOffset",e),a=d.iToken+1);return a},"~N,JU.SB,java.util.Map");k(c$,"checkPacked",function(a,b,c){switch(this.tokAt(a)){case 1073741938:b.put("packed",Boolean.TRUE);var d=null,f=this.tokAt(++a);switch(f){case 1814695966:case 1678381065:break;default:this.e.isArrayParameter(a)?(d=this.e.getPointArray(a,-1,!1),a=this.e.iToken):this.isFloatParameter(a)?(d=this.floatParameter(a),
d=D(-1,[new JU.P3,JU.P3.new3(d,d,d)])):(d=[],--a)}a++;if(this.e.chk)break;switch(f){case 1814695966:d=this.e.optParameterAsString(a++).toLowerCase();if(JU.PT.isOneOf(d,";conventional;primitive;"))return b.put("fillRange",d),c.append(' FILL UNITCELL "'+d+'"'),a;d=this.vwr.getCurrentUnitCell();if(null!=d){d=JU.BoxInfo.toOABC(d.getUnitCellVerticesNoOffset(),d.getCartesianOffset());break}case 1678381065:d=JU.BoxInfo.toOABC(this.vwr.ms.getBBoxVertices(),null)}switch(d.length){case 2:f=d[1];d=D(-1,[d[0],
JU.P3.newP(d[0]),new JU.P3,new JU.P3]);d[1].x=f.x;d[2].y=f.y;d[3].z=f.z;break;case 3:d=D(-1,[new JU.P3,d[0],d[1],d[2]]);break;case 4:break;default:d=D(-1,[new JU.P3,JU.P3.new3(10,0,0),JU.P3.new3(0,10,0),JU.P3.new3(0,0,10)])}b.put("fillRange",d);c.append(" FILL ["+d[0]+d[1]+d[2]+d[3]+"]");break;case 1073742080:d=NaN,this.isFloatParameter(++a)&&(d=this.floatParameter(a++)),this.e.chk||(b.put("packed",Boolean.TRUE),c.append(" PACKED"),Float.isNaN(d)||(b.put("packingError",Float.$valueOf(d)),c.append(" "+
d)))}return a},"~N,java.util.Map,JU.SB");k(c$,"cache",function(){var a=this.tokAt(1),b=null,c=2;switch(a){case 1275069441:case 1073742119:b=this.e.optParameterAsString(c++);case 1073741882:this.checkLength(c);this.chk||("all".equals(b)&&(b=null),b=this.vwr.cacheFileByName(b,1275069441==a),this.showString(0>b?"cache cleared":b+" bytes "+(1275069441==a?" cached":" removed")));break;default:this.invArg()}});k(c$,"calculate",function(){var a=!1,b=!1,c=null,d=null,f=this.e,e=-2147483648,e=2;if(2<=(f.iToken=
f.slen))switch(f.clearDefinedVariableAtomSets(),this.getToken(1).tok){case 1073741824:this.checkLength(2);break;case 1086324752:f.iToken=1;c=2==this.slen?null:this.atomExpressionAt(2);f.checkLast(f.iToken);this.chk||f.showString(this.vwr.calculateChirality(c));return;case 1631586315:this.checkLength(2);if(this.chk)return;e=this.vwr.calculateFormalCharges(null);this.showString(J.i18n.GT.i(J.i18n.GT.$("{0} charges modified"),e));return;case 1075838996:this.checkLength(2);this.chk||this.vwr.ms.assignAromaticBondsBs(!0,
null);return;case 1613238294:2!=f.slen&&(c=(b=1639976963==this.tokAt(++f.iToken))?this.vwr.bsA():this.atomExpressionAt(f.iToken),!b&&1639976963!=this.tokAt(++f.iToken)&&(d=this.atomExpressionAt(f.iToken)));if(this.chk)return;e=this.vwr.autoHbond(c,d,!1);-2147483648!=e&&f.report(J.i18n.GT.i(J.i18n.GT.$("{0} hydrogen bonds"),Math.abs(e)),!1);return;case 1612709900:(a=1073742335==this.tokAt(2))&&f.iToken++;c=this.slen==(a?3:2)?null:this.atomExpressionAt(a?3:2);f.checkLast(f.iToken);this.chk||(this.vwr.addHydrogens(c,
!1,!1),a&&(null==c&&(c=this.vwr.bsA()),this.vwr.makeConnections(0.1,1E8,515,1073742025,c,c,null,!1,!1,0),this.vwr.ms.assignAromaticBondsBs(!0,null)));return;case 1111492619:f.iToken=1;c=2==this.slen?null:this.atomExpressionAt(2);f.checkLast(f.iToken);this.chk||f.getPartialCharges(c);return;case 1088421903:case 134217762:this.chk||(1275203608==this.tokAt(2)?(a=4==this.tokAt(3)?this.stringParameter(3):null,c=null!=a||3==this.slen?null:this.atomExpressionAt(3),c=D(-1,[a,null,c]),this.showString(f.getShapePropertyData(21,
"symmetry",c)?c[1]:"")):this.showString(this.vwr.ms.calculatePointGroup(this.vwr.bsA())));return;case 1111490574:this.checkLength(2);this.chk||(this.vwr.calculateStraightness(),this.vwr.addStateScript("set quaternionFrame '"+this.vwr.getQuaternionFrame()+"'; calculate straightness",!1,!0));return;case 1639976963:c=4>this.slen||this.isFloatParameter(3)?null:this.atomExpressionAt(2);switch(this.tokAt(++f.iToken)){case 4138:break;case 1111490587:if(this.chk)return;f.showString(this.vwr.getAnnotationParser(!0).calculateDSSRStructure(this.vwr,
c));return;case 1073741915:b=!0;e=this.slen==f.iToken+1?2:M(this.floatParameter(++f.iToken));break;case 0:b=this.vwr.getBoolean(603979826);break;default:this.invArg()}this.chk||this.showString(this.vwr.calculateStructures(c,b,!0,e));return;case 659482:c=f.iToken+1<this.slen?this.atomExpressionAt(++f.iToken):null;d=f.iToken+1<this.slen?this.atomExpressionAt(++f.iToken):null;this.checkLength(++f.iToken);this.chk||(e=this.vwr.calculateStruts(c,d),0<e&&(this.setShapeProperty(1,"type",Integer.$valueOf(32768)),
f.setShapePropertyBs(1,"color",Integer.$valueOf(16777215),null),f.setShapeTranslucency(1,"","translucent",0.5,null),this.setShapeProperty(1,"type",Integer.$valueOf(1023))),this.showString(J.i18n.GT.i(J.i18n.GT.$("{0} struts added"),e)));return;case 2097180:a=!0;case 1111490575:b=!1;switch(this.tokAt(2)){case 134217759:f.iToken++;break;case 0:b=!a;break;case 1073741952:b=!0;f.iToken++;break;default:b=!0}c=f.iToken+1<this.slen?this.atomExpressionAt(++f.iToken):this.vwr.bsA();this.checkLength(++f.iToken);
this.chk||this.vwr.calculateSurface(c,b?3.4028235E38:-1);return}f.errorStr2(53,"CALCULATE","aromatic? hbonds? hydrogen? formalCharge? partialCharge? pointgroup? straightness? structure? struts? surfaceDistance FROM? surfaceDistance WITHIN?")});k(c$,"capture",function(){if(!this.chk&&!this.vwr.allowCapture())this.showString("Cannot capture on this platform");else{var a=this.vwr.captureParams,b=null==a?"GIF":a.get("type"),c=0,d=0,f=this.e.slen,e="",g=1073742070!=this.vwr.am.animationReplayMode,h=1,
j=this.tokAt(h),s=603979967==j;s&&(j=this.tokAt(++h));switch(0==j?j=102409:j){case 4:e=this.e.optParameterAsString(h++);if(0==e.length){d=102409;break}b=e.toLowerCase();b.endsWith(".gift")||b.endsWith(".pngt")?(s=!0,e=e.substring(0,e.length-1),b=e.toLowerCase()):!b.endsWith(".gif")&&!b.contains(".png")&&(e+=".gif");b.endsWith(".png")?(b.endsWith("0.png")||(e=e.substring(0,e.length-4)+"0000.png"),b="PNG"):b="GIF";s&&(b+="T");a=e.indexOf("0000.");j=0>a||a!=e.lastIndexOf(".")-4;a=!1;528411==this.tokAt(h)&&
(g=!0,this.tokAt(++h));switch(this.tokAt(h)){case 1073742129:a=!0;case 1611141175:c=null;g="y";h++;a?(h<f&&2!=this.tokAt(h)&&(g=this.e.optParameterAsString(h++).toLowerCase()),c="rotate Y 10 10;rotate Y -10 -10;rotate Y -10 -10;rotate Y 10 10",f=h<f?this.intParameter(h++):5,c=0>f?JU.PT.rep(c,"10;",""+-f+";"):JU.PT.rep(c,"10",""+f)):(h<f&&(g=this.e.optParameterAsString(h++).toLowerCase()),c="rotate Y 360 30;");if(this.chk)return;this.vwr.setNavigationMode(!1);if(""===g||0>"xyz".indexOf(g))g="y";f=
this.vwr.g.waitForMoveTo;c="set waitformoveto true;"+JU.PT.rep(c,"Y",g)+";set waitformoveto "+f;c="capture "+(s?"transparent ":"")+JU.PT.esc(e)+" LOOP;"+c+";capture end;";this.e.cmdScript(0,null,c);return;case 3:case 2:c=this.floatParameter(h++)}if(this.chk)return;d=1073742031;a=new java.util.Hashtable;s=this.vwr.getInt(553648132);j&&(a.put("streaming",Boolean.TRUE),g||this.showString(J.i18n.GT.o(J.i18n.GT.$("Note: Enable looping using {0}"),D(-1,["ANIMATION MODE LOOP"]))),this.showString(J.i18n.GT.o(J.i18n.GT.$("Animation delay based on: {0}"),
D(-1,["ANIMATION FPS "+s]))));a.put("captureFps",Integer.$valueOf(s));break;case 102409:case 1073741874:null!=a&&a.put("captureSilent",Boolean.TRUE);case 1073742335:case 1073742334:this.checkLength(-2);d=j;break;default:this.invArg()}this.chk||null==a||(a.put("type",b),s=Integer.$valueOf(this.vwr.getBackgroundArgb()),a.put("backgroundColor",s),a.put("fileName",e),a.put("quality",Integer.$valueOf(-1)),a.put("endTime",Long.$valueOf(0>=c?-1:System.currentTimeMillis()+S(1E3*c))),a.put("captureMode",JS.T.nameOf(d).toLowerCase()),
a.put("captureLooping",g?Boolean.TRUE:Boolean.FALSE),e=this.vwr.processWriteOrCapture(a),null==e&&(e="canceled"),JU.Logger.info(e))}});k(c$,"centerAt",function(){var a=this.getToken(1).tok;switch(a){case 1073741826:case 96:case 1678381065:break;default:this.invArg()}var b=JU.P3.new3(0,0,0);5==this.slen?(b.x=this.floatParameter(2),b.y=this.floatParameter(3),b.z=this.floatParameter(4)):this.e.isCenterParameter(2)?(b=this.centerParameter(2),this.e.checkLast(this.e.iToken)):this.checkLength(2);!this.chk&&
!this.vwr.isJmolDataFrame()&&this.vwr.tm.setCenterAt(a,b)});k(c$,"compare",function(){var a=this.e,b=!1,c=!1,d=!1,f=!1,e=!1,g=null,h=null,j=null,s=null,p=null,m=null;a.iToken=0;var w=this.isFloatParameter(1)?this.floatParameter(++a.iToken):NaN,l=this.atomExpressionAt(++a.iToken),k=null,x=null;a.isArrayParameter(++a.iToken)?k=a.getPointArray(a.iToken,-1,!1):1140850689!=this.tokAt(a.iToken)&&(x=this.atomExpressionAt(a.iToken));var z=null,q=!1,n=null,r=JU.BSUtil.copy(l);null!=x&&r.or(x);for(var r=f=
null==k&&null!=x&&r.equals(l),t=a.iToken+1;t<this.slen;++t)switch(this.getToken(t).tok){case 4115:r=!0;break;case 134218757:if(q=!0,4!=this.tokAt(t+1)){n="*";break}case 134218756:n=this.stringParameter(++t);break;case 1677721602:c=e=!0;n=this.paramAsStr(++t);n.equalsIgnoreCase("SMILES")&&(q=!0,n="*");break;case 3:case 2:w=Math.abs(this.floatParameter(t));break;case 268435504:break;case 2109448:z=this.atomExpressionAt(++t);t=a.iToken;break;case 10:case 1073742325:null!=m&&this.invArg();var j=this.atomExpressionAt(a.iToken),
K=f?0:this.tokAt(a.iToken+1),s=null==k&&a.isArrayParameter(a.iToken+1)?null:10==K||1073742325==K?this.atomExpressionAt(++a.iToken):JU.BSUtil.copy(j);null!=z&&(j.and(z),null!=s&&s.and(z));null==s?k=a.getPointArray(++a.iToken,-1,!1):null!=x&&s.and(x);null==p&&(p=new JU.Lst);p.addLast(D(-1,[j,s]));t=a.iToken;break;case 7:null!=p&&this.invArg();b=!0;g=a.getQuaternionArray(a.theToken.getList(),1073742001);this.getToken(++t);h=a.getQuaternionArray(a.theToken.getList(),1073742001);null==m&&(m=new JU.Lst);
m.addLast(D(-1,[g,h]));break;case 1073742077:b=!0;break;case 134217751:case 1140850689:b=!1;break;case 528432:c=!0;break;case 4160:d=!0;break;default:this.invArg()}if(!this.chk){r&&(w=0);Float.isNaN(w)||0>w?w=1:!c&&!d&&(c=d=!0);f=0!=w;(K=!b&&null==n||null!=k)&&J.api.Interface.getInterface("JU.Eigen",this.vwr,"script");null==p&&null==m&&(null==z?(j=K?this.vwr.getAtomBitSet("spine"):new JU.BS,0>j.nextSetBit(0)?(j=l,s=x):(s=JU.BSUtil.copy(j),j.and(l),s.and(x))):(j=JU.BSUtil.copy(l),s=JU.BSUtil.copy(x),
j.and(z),j.and(l),null!=s&&(s.and(z),s.and(x))),p=new JU.Lst,p.addLast(D(-1,[j,s])));if(r){l=this.vwr.ms.getModelBS(l,!1);z=Array(l.cardinality());t=0;for(s=l.nextSetBit(0);0<=s;s=l.nextSetBit(s+1),t++)z[t]=this.vwr.getModelUndeletedAtomsBitSet(s)}else z=D(-1,[l]);for(s=0;s<z.length;s++){for(var l=z[s],A=L(2,0),u=null,E=new JU.Lst,v=null,y=r?new JU.Lst:p,t=0;t<p.size();++t){var F=p.get(t);r&&y.addLast(F=D(-1,[JU.BSUtil.copy(F[0]),F[1]]));F[0].and(l)}var G=null,B=null;if(K){null!=k&&(y.clear(),y.addLast(D(-1,
[j,k])));try{v=this.vwr.getCenterAndPoints(y,!0)}catch(H){if(N(H,Exception))this.invArg();else throw H;}u=v[0].length-1;for(t=1;t<=u;t++){E=v[0][t];F=v[1][t];if(!I(E,JM.Atom)||!I(F,JM.Atom))break;JU.Logger.info(" atom 1 "+E.getInfo()+"\tatom 2 "+F.getInfo())}u=JU.Measure.calculateQuaternionRotation(v,A);t=Float.isNaN(A[1])?NaN:Math.round(100*A[0])/100;A=Float.isNaN(A[1])?NaN:Math.round(100*A[1])/100;this.showString("RMSD "+t+" --\x3e "+A+" Angstroms")}else if(b){if(null==m)for(t=0;t<y.size();t++){F=
y.get(t);g=this.vwr.getAtomGroupQuaternions(F[0],2147483647);h=this.vwr.getAtomGroupQuaternions(F[1],2147483647);for(u=0;u<g.length&&u<h.length;u++)E.addLast(h[u].div(g[u]))}else for(u=0;u<g.length&&u<h.length;u++)E.addLast(h[u].div(g[u]));A[0]=0;g=E.toArray(Array(E.size()));u=JU.Quat.sphereMean(g,A,1E-4);this.showString("RMSD = "+A[0]+" degrees")}else{t=new JU.M4;G=new JU.P3;if(("*".equals(n)||"".equals(n))&&null!=l)try{n=this.vwr.getSmiles(l)}catch(M){if(N(M,Exception))a.evalError(M.getMessage(),
null);else throw M;}if(e){var O;if(null==l||null==x||null==(O=a.getSmilesExt().getFlexFitList(l,x,n,!q)))break;this.vwr.setDihedrals(O,null,1)}A=a.getSmilesExt().getSmilesCorrelation(l,x,n,null,null,t,null,!1,null,G,!1,32|(q?1:2));if(Float.isNaN(A)){this.showString("structures do not match");break}d&&(B=new JU.V3,t.getTranslation(B));c&&(u=new JU.M3,t.getRotationScale(u),u=JU.Quat.newM(u));this.showString("RMSD = "+A+" Angstroms")}null!=v&&(G=v[0][0]);null==G&&(v=this.vwr.getCenterAndPoints(y,!0),
G=v[0][0]);y=new JU.P3;A=NaN;d&&(null==B&&(B=JU.V3.newVsub(v[1][0],G)),A=1E10);c&&(null==u&&a.evalError("option not implemented",null),y.add2(G,u.getNormal()),A=u.getTheta(),0==A&&d&&(0.01<B.length()?A=1E10:c=d=f=!1));if(!Float.isNaN(A)&&!Float.isNaN(y.x)&&(v=null,c&&(d&&0!=w)&&(v=this.vwr.ms.getAtomPointVector(l),t=JS.ScriptMathProcessor.getMatrix4f(u.getMatrix(),B),v=JU.Measure.transformPoints(v,t,G)),a.useThreads()||(f=!1),this.vwr.rotateAboutPointsInternal(a,G,y,A/w,A,f,l,B,v,null,null)&&f&&a.isJS))throw new JS.ScriptInterruption(a,
"compare",1);}}});k(c$,"configuration",function(){var a=null,b=this.vwr.bsA();if(1==this.slen){if(this.chk)return;a=this.vwr.ms.setConformation(b);this.vwr.ms.addStateScript("select",null,b,null,"configuration",!0,!1)}else if(this.isFloatParameter(1)){b=this.intParameter(this.e.checkLast(1));if(this.chk)return;a=this.vwr.ms.getConformation(this.vwr.am.cmi,b-1,!0,null);this.vwr.addStateScript("configuration "+b+";",!0,!1)}else{a=this.atomExpressionAt(1);if(this.chk)return;b=this.intParameter(this.e.checkLast(this.e.iToken+
1));this.vwr.addStateScript("configuration "+JU.Escape.eBS(a)+" "+b+";",!0,!1);a=this.vwr.ms.getConformation(this.vwr.am.cmi,b-1,!0,a)}this.setShapeProperty(1,"type",Integer.$valueOf(30720));this.e.setShapeSizeBs(1,0,a);this.vwr.autoHbond(a,a,!0);this.vwr.select(a,!1,0,this.e.tQuiet)});k(c$,"measure",function(){var a=this.e,b=null,c=0,d=null;if(2==this.slen)switch(this.tokAt(1)){case 1073742334:this.setShapeProperty(6,"hideAll",Boolean.TRUE);return;case 12291:this.chk||this.vwr.clearAllMeasurements();
return}this.vwr.shm.loadShape(6);switch(this.tokAt(1)){case 134218756:var f=this.stringParameter(3==this.slen?2:4);if(this.chk)return;var e=this.vwr.ms.at,b=this.vwr.ms.ac,c=null;try{c=this.vwr.getSmilesMatcher().getCorrelationMaps(f,e,b,this.vwr.bsA(),2)}catch(g){if(N(g,Exception))a.evalError(g.getMessage(),null);else throw g;}if(null==c)return;this.setShapeProperty(6,"maps",c);return}switch(this.slen){case 2:switch(this.getToken(1).tok){case 0:case 1073742335:this.vwr.shm.loadShape(6);this.setShapeProperty(6,
"hideAll",Boolean.FALSE);return;case 1073742001:this.chk||a.showStringPrint(this.vwr.getMeasurementInfoAsString(),!1);return;case 4:this.setShapeProperty(6,"setFormats",this.stringParameter(1));return}a.errorStr(24,"ON, OFF, DELETE");break;case 3:switch(this.getToken(1).tok){case 12291:if(1073742327==this.getToken(2).tok)this.chk||this.vwr.clearAllMeasurements();else{var h=this.intParameter(2)-1;this.chk||this.vwr.deleteMeasurement(h)}return}}for(var j=0,s=0,p=-1,m=-1,k=-1,l=H(5,0),C=L(-1,[3.4028235E38,
3.4028235E38]),x=!1,z=!1,q=!1,n=!0,r=null,t=null,f=268435538,D=e=null,A=new JU.Lst,u=new JU.BS,E=null,v=null,y=0,F=0,G=null,h=1;h<this.slen;++h)switch(this.getToken(h).tok){case 1073741974:1!=h&&this.invArg();b=a.optParameterAsString(++h);continue;case 1073741824:a.errorStr(24,"ALL, ALLCONNECTED, DELETE");break;default:this.error(15);break;case 268435568:134217736!=this.tokAt(h+1)&&this.invArg();h++;q=!0;break;case 1073741832:G=this.paramAsStr(++h).toLowerCase();break;case 134217736:case 1073741834:case 1073742327:z=
1073741834==a.theTok;m=-1;x=!0;z&&q&&this.invArg();break;case 1765808134:c=JU.C.getColix(a.getArgbParam(++h));h=a.iToken;break;case 1073742066:a.isPoint3f(++h)?(d=this.getPoint3f(h,!1),d=L(-1,[1,d.x,d.y,d.z,0,0,0])):d=a.floatParameterSet(h,7,7);h=a.iToken;break;case 1665140738:case 1073741917:F=M((1665140738==a.theTok?2E3:1E3)*this.floatParameter(++h));null!=b&&0>=F&&(F=-1);break;case 3:null!=r&&this.invArg();n=x=!0;k=(k+1)%2;C[k]=this.floatParameter(h);break;case 12291:268435538!=f&&this.invArg();
f=12291;break;case 4114:var B=this.floatParameter(++h),O=this.paramAsStr(++h),P=this.paramAsStr(++h);this.chk||(D=this.vwr.getFont3D(O,P,B));break;case 2:B=this.intParameter(h);if(x)n=!0,k=(k+1)%2,C[k]=B;else{m=this.vwr.ms.getFirstAtomIndexFromAtomNumber(B,this.vwr.getVisibleFramesBitSet());if(!this.chk&&0>m)return;null!=E&&this.invArg();4<(l[0]=++j)&&a.bad();l[j]=m}break;case 1094713359:p=this.intParameter(++h);break;case 1073742334:268435538!=f&&this.invArg();f=1073742334;break;case 1073742335:268435538!=
f&&this.invArg();f=1073742335;break;case 1073742114:n=x=!0;m=-1;break;case 1073741989:case 1073741990:t=Boolean.$valueOf(1073741989==a.theTok);x=!0;q=1073741990==a.theTok;break;case 1648363544:0<=k&&this.invArg();r=a.encodeRadiusParameter(h,!1,!0);if(null==r)return;r.values=C;h=a.iToken;x=q=!0;t=Boolean.$valueOf(!1);1==y&&(y++,j++,B=JU.BSUtil.copy(u),JU.BSUtil.invertInPlace(B,this.vwr.ms.ac),B.and(this.vwr.ms.getAtomsWithinRadius(5,u,!1,null)),A.addLast(B));break;case 12290:case 10:case 1073742325:y++;
case 1073742332:case 8:case 1073742330:0<=m&&this.invArg();j=Array(1);E=a.centerParameter(h,j);if(I(j[0],JU.BS)&&(E=u=j[0],!this.chk&&0==u.length()))return;I(E,JU.P3)&&(h=new JU.Point3fi,h.setT(E),h.mi=p,E=h);4<(j=++s)&&a.bad();h=a.iToken;A.addLast(E);break;case 4:e=this.stringParameter(h);break;case 1073742164:v=a.tickParamAsStr(h,!1,!0,!0),h=a.iToken,f=12290}(null!=r&&(0<=k||2!=j)||2>j&&null==b&&(null==v||1==j))&&a.bad();null!=e&&0!=e.indexOf(j+":")&&(e=j+":"+e);n&&C[1]<C[0]&&(C[1]=C[0],C[0]=3.4028235E38==
C[1]?3.4028235E38:-200);if(!this.chk)if(null!=E||null!=v){null==r&&(r=new J.atomdata.RadiusData(C,0,null,null));null==E&&(v.id="default");null!=E&&(null!=e&&268435538==f)&&(f=12290);a=null;if(null!=D||null!=G||null!=e&&0<=e.indexOf("\n"))a=J.api.Interface.getInterface("JM.Text",this.vwr,"script").newLabel(this.vwr,D,"",c,0,0,0);null!=a&&(a.pymolOffset=d,a.setAlignmentLCR(G));this.setShapeProperty(6,"measure",this.vwr.newMeasurementData(b,A).set(f,null,r,e,null,v,z,q,t,x,F,c,a))}else switch(a=null==
b?l:b,f){case 12291:this.setShapeProperty(6,"delete",a);break;case 1073742335:this.setShapeProperty(6,"show",a);break;case 1073742334:this.setShapeProperty(6,"hide",a);break;default:this.setShapeProperty(6,null==e?"toggle":"toggleOn",a),null!=e&&this.setShapeProperty(6,"setFormats",e)}});k(c$,"connect",function(a){var b=this.e,c=L(2,0),d=Array(2);d[0]=d[1]=this.vwr.bsA();var f=NaN,e=H(-1,[-2147483648]),g=0,h=131071,j=1073742026,s=!1,p=!1,m=!1,k=3.4028235E38,l=!1,C=0,x=0,z=new JU.BS,q=!1,n=0,r=0,t=
0,K=!1;if(1==this.slen)this.chk||this.vwr.rebondState(b.$isStateScript);else if(1073877011==this.tokAt(1))this.chk||this.vwr.connectNBO(this.e.optParameterAsString(2));else{for(;a<this.slen;++a){switch(this.getToken(a).tok){case 1073742335:case 1073742334:this.checkLength(2);this.chk||this.vwr.rebondState(b.$isStateScript);return;case 2:case 3:if(0<C){(p||l)&&b.error(23);h=JU.Edge.getBondOrderFromFloat(this.floatParameter(a));131071==h&&this.invArg();p=!0;break}2<++x&&b.bad();var A=this.floatParameter(a);
268435634==this.tokAt(a+1)&&(A=-A/100,a++);c[g++]=A;break;case 12290:case 10:case 1073742325:(2<C||q&&0<C)&&b.bad();(p||l)&&this.invArg();d[C++]=this.atomExpressionAt(a);q=b.isBondSet;if(2==C){for(var A=b.iToken,u=a;u<A;u++)if(1073741824==this.tokAt(u)&&this.paramAsStr(u).equals("_1")){n=a;break}b.iToken=A}a=b.iToken;break;case 1086324742:K=!0;break;case 1765808134:case 603979967:case 1073742074:l=!0;k=this.getColorTrans(b,a,!1,e);a=b.iToken;break;case 1073742086:e=1073741852==this.tokAt(2);this.checkLength(e?
3:2);if(this.chk)return;this.vwr.clearModelDependentObjects();this.vwr.ms.deleteAllBonds();f=new JU.BS;this.vwr.ms.setPdbConectBonding(0,0,f);if(e){b=b.$isStateScript&&this.vwr.getBoolean(603979873);this.vwr.ms.autoBondBs4(null,null,f,null,this.vwr.getMadBond(),b);this.vwr.addStateScript(b?"set legacyAutoBonding TRUE;connect PDB AUTO;set legacyAutoBonding FALSE;":"connect PDB auto;",!1,!0);return}this.vwr.addStateScript("connect PDB;",!1,!0);return;case 1073741830:case 1073741852:case 1073741904:case 1073742025:case 1073742026:m=
!0;++a!=this.slen&&this.invArg();j=b.theTok;1073741852==j&&!(131071==h||2048==h||515==h)&&this.invArg();break;case 659482:l||(e[0]=16777215,k=0.5,f=this.vwr.getFloat(570425406),l=!0),m||(j=1073742026,m=!0);case 1073741824:if(b.isColorParam(a)){r=-a;break}case 1075838996:case 1613238294:h=this.paramAsStr(a);131071==(h=JS.ScriptParam.getBondOrderFromString(h))&&this.invArg();p&&b.error(18);p=!0;switch(h){case 33:switch(this.tokAt(a+1)){case 3:h=JS.ScriptParam.getPartialBondOrderFromFloatEncodedInt(this.st[++a].intValue);
break;case 2:h=this.intParameter(++a)}break;case 2048:2==this.tokAt(a+1)&&(h=this.intParameter(++a)<<11,t=this.floatParameter(++a));break;case 65537:m||(j=1073742025,m=!0)}break;case 1665140738:f=this.floatParameter(++a);l=!0;break;case 1073742333:case 12291:++a!=this.slen&&this.invArg();j=12291;s=!0;l=!1;break;default:r=a}0<a&&(r==-a||r==a&&b.isColorParam(a)?(l=!0,e[0]=b.getArgbParam(a),a=b.iToken):r==a&&this.invArg())}if(!this.chk){2>g&&(0==g&&(c[0]=1E8),c[1]=c[0],c[0]=0.1);l&&(p||(h=65535),m||
(j=1073742025));p=g=0;if(0<n){t=new JU.BS;this.vwr.definedAtomSets.put("_1",t);K=d[0];for(m=K.nextSetBit(0);0<=m;m=K.nextSetBit(m+1))t.set(m),d=this.vwr.makeConnections(c[0],c[1],h,j,t,this.atomExpressionAt(n),z,q,!1,0),g+=Math.abs(d[0]),p+=d[1],t.clear(m)}else d=this.vwr.makeConnections(c[0],c[1],h,j,d[0],d[1],z,q,K,t),g+=Math.abs(d[0]),p+=d[1];c=b.doReport();s?c&&b.report(J.i18n.GT.i(J.i18n.GT.$("{0} connections deleted"),p),!1):(l&&(this.vwr.selectBonds(z),Float.isNaN(f)||b.setShapeSizeBs(1,Math.round(2E3*
f),null),this.finalizeObject(1,e[0],k,0,!1,null,0,z),this.vwr.selectBonds(null)),c&&b.report(J.i18n.GT.o(J.i18n.GT.$("{0} new bonds; {1} modified"),D(-1,[Integer.$valueOf(g),Integer.$valueOf(p)])),!1))}}},"~N");k(c$,"console",function(){switch(this.getToken(1).tok){case 1073742334:this.chk||this.vwr.showConsole(!1);break;case 1073742335:this.chk||this.vwr.showConsole(!0);break;case 1073741882:this.chk||this.vwr.sm.clearConsole();break;case 134221856:this.showString(this.stringParameter(2));break;
default:this.invArg()}});k(c$,"data",function(){var a=this.e,b=null,c=null,d=!1,f;switch(a.iToken=this.slen){case 5:b=this.paramAsStr(2);case 4:case 2:c=this.paramAsStr(1);if(c.equalsIgnoreCase("clear")){this.chk||this.vwr.setData(null,null,0,0,0,0,0);return}if(0<=(f=c.indexOf("@")))b=""+a.getParameter(c.substring(f+1),4,!0),c=c.substring(0,f).trim();else if(null==b&&0<=(f=c.indexOf(" ")))b=c.substring(f+1).trim(),c=c.substring(0,f).trim(),d=!0;break;default:a.bad()}f=c.substring(0,(c+" ").indexOf(" ")).toLowerCase();
if(f.equals("model")||f.equals("append"))a.cmdLoad();else if(!this.chk){var e=0<=c.toLowerCase().indexOf("(default)");if(f.equals("connect_atoms"))this.vwr.ms.connect(this.parseDataArray(b,!1));else if(0==f.indexOf("ligand_"))this.vwr.setLigandModel(c.substring(7).toUpperCase()+"_data",b.trim());else if(0==f.indexOf("file_"))this.vwr.setLigandModel(c.substring(5)+"_file",b.trim());else if(a=Array(4),f.equals("element_vdw")){a[0]=f;a[1]=b.$replace(";","\n");b=JU.Elements.elementNumberMax;f=H(b+1,0);
for(e=1;e<=b;e++)f[e]=e;a[2]=f;a[3]=Integer.$valueOf(0);this.vwr.setData("element_vdw",a,b,0,0,0,0)}else if(0==f.indexOf("data2d_"))a[0]=c,a[1]=this.parseDataArray(b,!1),a[3]=Integer.$valueOf(2),this.vwr.setData(c,a,0,0,0,0,0);else if(0==f.indexOf("data3d_"))a[0]=c,a[1]=this.parseDataArray(b,!0),a[3]=Integer.$valueOf(3),this.vwr.setData(c,a,0,0,0,0,0);else{var g=JU.PT.getTokens(c);if(0==f.indexOf("property_")&&!(2==g.length&&g[1].equals("set"))){e=this.vwr.bsA();a[0]=f;var h=d?0:this.vwr.getP("propertyAtomNumberField").intValue(),
j=d?0:this.vwr.getP("propertyAtomNumberColumnCount").intValue(),s=d?-2147483648:this.vwr.getP("propertyDataField").intValue(),p=d?0:this.vwr.getP("propertyDataColumnCount").intValue();!d&&0<=c.indexOf(" ")&&(3==g.length&&(h=JU.PT.parseInt(g[1]),s=JU.PT.parseInt(g[2])),5==g.length&&(h=JU.PT.parseInt(g[1]),j=JU.PT.parseInt(g[2]),s=JU.PT.parseInt(g[3]),p=JU.PT.parseInt(g[4])));0>h&&(h=0);0>s&&(s=0);c=this.vwr.ms.ac;d=null;g=JU.BS.newN(c);if(0<h){for(var d=H(c+2,0),m=0;m<=c;m++)d[m]=-1;for(m=e.nextSetBit(0);0<=
m;m=e.nextSetBit(m+1)){var k=this.vwr.ms.at[m].getAtomNumber();k>c+1||(0>k||g.get(k))||(g.set(k),d[k]=m)}a[2]=d}else a[2]=JU.BSUtil.copy(e);a[1]=b;a[3]=Integer.$valueOf(0);this.vwr.setData(f,a,c,h,j,s,p)}else"occupany".equals(f)&&(f="occupancy"),h=JM.AtomCollection.getUserSettableType(f),-1<h?this.vwr.setAtomData(h,f,b,e):(a[0]=c,a[1]=b,a[3]=Integer.$valueOf(0),this.vwr.setData(f,a,0,0,0,0,0))}}});k(c$,"ellipsoid",function(){var a=this.e,b=0,c=1,d=3.4028235E38,f=!1,e=!1;this.setShapeProperty(20,"thisID",
null);switch(this.getToken(1).tok){case 1073742335:b=2147483647;break;case 1073742334:break;case 2:b=this.intParameter(1);break;case 36867:this.e.sm.loadShape(20);this.setShapeProperty(20,"select",this.paramAsStr(2));c=a.iToken;e=f=!0;break;case 1073741974:case 268435633:case 1073741824:this.e.sm.loadShape(20);1073741974==a.theTok&&c++;this.setShapeId(20,c,!1);c=a.iToken;f=!0;break;default:this.invArg()}if(f){for(b=H(-1,[-2147483648]);++c<this.slen;){var f=this.paramAsStr(c),g=null;this.getToken(c);
if(!e)switch(a.theTok){case 1073742330:f="points";g=Array(3);g[0]=a.objectNameParameter(++c);if(this.chk)continue;a.getShapePropertyData(24,"getVertices",g);break;case 1611272194:for(var g=Array(3),h=0;3>h;h++)g[h]=new JU.V3,g[h].setT(this.centerParameter(++c)),c=a.iToken;break;case 12289:g=this.centerParameter(++c);c=a.iToken;break;case 1094713359:g=Integer.$valueOf(this.intParameter(++c));break;case 12291:g=Boolean.TRUE,this.checkLength(c+1)}if(null==g)switch(a.theTok){case 1073742335:f="on";g=
Boolean.TRUE;break;case 1073742334:f="on";g=Boolean.FALSE;break;case 1073742138:g=Float.$valueOf(this.floatParameter(++c));break;case 12290:case 10:case 1073742325:f="atoms";g=this.atomExpressionAt(c);c=a.iToken;break;case 1765808134:case 603979967:case 1073742074:d=this.getColorTrans(a,c,!0,b);c=a.iToken;continue;case 1073742075:g=this.paramAsStr(++c)}null==g&&this.invArg();this.setShapeProperty(20,f.toLowerCase(),g)}this.finalizeObject(20,b[0],d,0,!1,null,0,null);this.setShapeProperty(20,"thisID",
null)}else a.setShapeSizeBs(20,b,null)});k(c$,"image",function(){this.chk||this.vwr.getConsole();var a=1,b=null;1073741974==this.tokAt(1)&&(b=this.e.optParameterAsString(++a),a++);var c=this.e.optParameterAsString(a),d=this.e.optParameterAsString(this.slen-1).equalsIgnoreCase("close");if(!d&&(this.slen==a||this.slen==a+2))c=this.slen==a+2?this.intParameter(a++):-1,a=0>c?-1:this.intParameter(a),d=new java.util.Hashtable,d.put("fileName","\u0001\u0001"+b),d.put("backgroundColor",Integer.$valueOf(this.vwr.getBackgroundArgb())),
d.put("type","png"),d.put("quality",Integer.$valueOf(-1)),d.put("width",Integer.$valueOf(c)),d.put("height",Integer.$valueOf(a)),this.chk||this.vwr.processWriteOrCapture(d);else{if(d)switch(this.slen){case 2:c="closeall";break;case 3:case 4:break;default:this.checkLength(0)}this.chk||this.vwr.fm.loadImage(d?"\u0001close":c,"\u0001"+c+"\u0001"+("".equals(b)||null==b?null:b),!1)}});k(c$,"invertSelected",function(){var a=this.e,b=null,c=null,d=null,f=-2147483648,e=1;switch(this.tokAt(1)){case 0:if(this.chk)return;
d=this.vwr.bsA();b=this.vwr.ms.getAtomSetCenter(d);this.vwr.invertAtomCoordPt(b,d);return;case 528443:case 1140850689:e++;case 10:case 1073742325:case 12290:d=this.atomExpressionAt(e);if(!a.isAtomExpression(a.iToken+1)){a.checkLengthErrorPt(a.iToken+1,a.iToken+1);if(!this.chk)for(a=d.nextSetBit(0);0<=a;a=d.nextSetBit(a+1))this.vwr.invertRingAt(a,!1);return}f=d.nextSetBit(0);d=this.atomExpressionAt(a.iToken+1);break;case 134217751:b=a.centerParameter(2,null);break;case 134217750:c=a.planeParameter(1);
break;case 134219265:c=a.hklParameter(2)}a.checkLengthErrorPt(a.iToken+1,1);null==c&&(null==b&&-2147483648==f)&&this.invArg();this.chk||-1!=f&&this.vwr.invertSelected(b,c,f,d)});k(c$,"mapProperty",function(){for(var a,b,c,d,f,e=0,g=0,h=0,j=this.e;;){if(1113589787==this.tokAt(1))a=this.vwr.bsA(),b=this.atomExpressionAt(2),c=d="selected";else{a=this.atomExpressionAt(1);if(1073742336!=this.tokAt(++j.iToken)||!JS.T.tokAttr(e=this.tokAt(++j.iToken),1077936128))break;c=this.paramAsStr(j.iToken);b=this.atomExpressionAt(++j.iToken);
if(1073742336!=this.tokAt(++j.iToken)||!JS.T.tokAttr(g=this.tokAt(++j.iToken),2048))break;d=this.paramAsStr(j.iToken)}f=JS.T.tokAttr(h=this.tokAt(j.iToken+1),1077936128)?this.paramAsStr(++j.iToken):JS.T.nameOf(h=1094715393);j.checkLast(j.iToken);if(this.chk)return;var s=null;this.showString("mapping "+c.toUpperCase()+" for "+a.cardinality()+" atoms to "+d.toUpperCase()+" for "+b.cardinality()+" atoms using "+f.toUpperCase());if(JS.T.tokAttrOr(e,1094713344,1111490560)&&JS.T.tokAttrOr(g,1094713344,
1111490560)&&JS.T.tokAttrOr(h,1094713344,1111490560)){var k=this.getBitsetPropertyFloat(a,e|224,null,NaN,NaN),m=this.getBitsetPropertyFloat(a,h|224,null,NaN,NaN),e=this.getBitsetPropertyFloat(b,h|224,null,NaN,NaN),w=1715472409==g,l=L(w?this.vwr.ms.ac:e.length,0),s=new JU.BS;if(k.length==m.length){for(var C=new java.util.Hashtable,h=0;h<k.length;h++)C.put(Float.$valueOf(m[h]),Float.$valueOf(k[h]));k=-1;for(h=m=0;h<e.length;h++){var k=b.nextSetBit(k+1),x=C.get(Float.$valueOf(e[h]));null!=x&&(s.set(k),
l[w?k:m]=x.floatValue(),m++)}w?this.vwr.setData(d,D(-1,[d,l,s,Integer.$valueOf(1),Boolean.TRUE]),this.vwr.ms.ac,0,0,2147483647,0):JS.T.tokAttr(g,2048)?this.vwr.setAtomProperty(s,g,0,0,null,l,null):this.error(56)}}if(null==s){c=this.getBitsetIdent(a,"{"+f+"=%["+f+"]}."+d+" = %["+c+"]",null,!1,2147483647,!1);a=new JU.SB;for(h=0;h<c.length;h++)0>c[h].indexOf("null")&&a.append(c[h]).appendC("\n");JU.Logger.debugging&&JU.Logger.debug(a.toString());c=JU.BSUtil.copy(this.vwr.slm.bsSubset);this.vwr.slm.setSelectionSubset(b);
try{j.runScript(a.toString())}catch(z){if(N(z,Exception))b=z,this.vwr.slm.setSelectionSubset(c),j.errorStr(-1,"Error: "+b.getMessage());else if(N(z,Error))b=z,this.vwr.slm.setSelectionSubset(c),j.errorStr(-1,"Error: "+b.toString());else throw z;}this.vwr.slm.setSelectionSubset(c)}this.showString("DONE");return}this.invArg()});k(c$,"minimize",function(){for(var a=null,b=2147483647,c=0,d=!1,f=!1,e=null,g=!1,h=this.vwr.getMinimizer(!1),j=1;j<this.slen;j++)switch(this.getToken(j).tok){case 1073741828:d=
!0;continue;case 1073741874:case 1073742162:this.checkLength(2);if(this.chk||null==h)return;h.setProperty(this.paramAsStr(j),null);return;case 1073741882:this.checkLength(2);if(this.chk||null==h)return;h.setProperty("clear",null);return;case 1073741894:1!=j&&this.invArg();b=a=0;c=H(5,0);if(1073741882==this.tokAt(++j))this.checkLength(3);else{for(;4>a&&!this.isFloatParameter(j);)c[++a]=this.atomExpressionAt(j).nextSetBit(0),j=this.e.iToken+1;c[0]=a;1==a&&this.invArg();b=this.floatParameter(this.e.checkLast(j))}this.chk||
this.vwr.getMinimizer(!0).setProperty("constraint",D(-1,[c,H(a,0),Float.$valueOf(b)]));return;case 1073741905:c=this.floatParameter(++j);continue;case 1073741935:b=0;continue;case 12293:1!=j&&this.invArg();e=this.atomExpressionAt(++j);0>e.nextSetBit(0)&&(e=null);j=this.e.iToken;this.chk||this.vwr.getMinimizer(!0).setProperty("fixed",e);if(j+1==this.slen)return;continue;case 10:case 1073742325:g=!0;case 1275082245:1275082245==this.e.theTok&&j++;a=this.atomExpressionAt(j);j=this.e.iToken;1073742072==
this.tokAt(j+1)&&(j++,g=!0);continue;case 1073742148:f=!0;break;case 266298:b=this.intParameter(++j);continue;default:this.invArg()}if(!this.chk)try{this.vwr.minimize(this.e,b,c,a,e,0,d,g,f,!1)}catch(s){if(N(s,Exception))throw new JS.ScriptInterruption(this.e,"minimize",1);throw s;}});k(c$,"modulation",function(){var a=null,b=this.e,c=!0,d=!1,f=null,e=1;switch(this.getToken(e).tok){case 1073742334:c=!1;case 0:case 1073742335:break;case 12290:case 10:case 1073742325:f=this.atomExpressionAt(1);switch(this.tokAt(b.iToken+
1)){case 1073742334:c=!1;case 1073742335:b.iToken++}b.checkLast(b.iToken);break;case 1073742332:case 8:a=b.getPoint3f(1,!1,!0);d=1073742335==this.tokAt(b.iToken+1);break;default:var g=b.theToken.value.toString();e++;g.equalsIgnoreCase("t")?b.theTok=3:g.equalsIgnoreCase("m")||g.equalsIgnoreCase("q")?b.theTok=2:this.invArg();case 3:case 2:switch(b.theTok){case 3:this.isFloatParameter(e)?(a=this.floatParameter(e),a=JU.P3.new3(a,a,a)):a=b.getPoint3f(e,!1,!0);break;case 2:2==this.tokAt(e)?(d=this.intParameter(e),
a=JU.P3.new3(d,d,d)):a=b.getPoint3f(e,!1,!0),d=!0}break;case 1073742138:c=this.floatParameter(2);this.chk||this.vwr.setFloatProperty("modulationScale",c);return}this.chk||(this.vwr.tm.setVibrationPeriod(0),this.vwr.setModulation(f,c,a,d))});k(c$,"mutate",function(){var a,b;switch(this.tokAt(1)){case 2:this.st[1]=JS.T.o(4,""+this.st[1].value);default:a=this.atomExpressionAt(1);b=++this.e.iToken;break;case 268435633:a=this.vwr.getAllAtoms(),b=2}a.and(this.vwr.getModelUndeletedAtomsBitSet(this.vwr.ms.mc-
1));var c=a.length()-1,d=0;if(!(0>c||(d=this.vwr.ms.at[c].mi)!=this.vwr.ms.mc-1||this.vwr.ms.isTrajectory(d)))if(c=this.e.optParameterAsString(b),this.e.checkLast(b),!this.chk&&this.vwr.ms.am[d].isBioModel){d=null;if(4==this.tokAt(b)&&!c.startsWith("~"))d=D(-1,[c]),c=null;else{c=JU.PT.replaceAllCharacters(c,",; \t\n"," ").trim().toUpperCase();if((b=c.startsWith("~"))||3!=c.length||!this.vwr.getJBR().isKnownPDBGroup(c,20))c=this.vwr.getJBR().toStdAmino3(b?c.substring(1):c);d=JU.PT.getTokens(c)}0<d.length&&
this.vwr.ms.bioModelset.mutate(a,c,d)}});k(c$,"navigate",function(){var a=this.e;if(1==this.slen)a.setBooleanProperty("navigationMode",!0);else{var b=JU.V3.new3(0,1,0),c=new JU.Lst,d;if(2==this.slen)switch(this.getToken(1).tok){case 1073742335:case 1073742334:if(this.chk)return;a.setObjectMad10(34,"axes",10);this.setShapeProperty(34,"position",JU.P3.new3(50,50,3.4028235E38));a.setBooleanProperty("navigationMode",!0);this.vwr.tm.setNavOn(1073742335==a.theTok);return;case 1073742162:this.chk||this.vwr.tm.setNavXYZ(0,
0,0);return;case 8:case 1112152078:break;default:this.invArg()}!this.chk&&!this.vwr.getBoolean(603979889)&&a.setBooleanProperty("navigationMode",!0);for(var f=1;f<this.slen;f++){var e=this.isFloatParameter(f)?this.floatParameter(f++):2;0>e&&this.invArg();!this.chk&&0<e&&a.refresh(!1);switch(this.getToken(f).tok){case 8:case 1073742332:d=this.getPoint3f(f,!0);a.iToken++;a.iToken!=this.slen&&this.invArg();this.chk||this.vwr.tm.setNavXYZ(d.x,d.y,d.z);return;case 554176526:d=this.floatParameter(++f);
this.chk||c.addLast(D(-1,[Integer.$valueOf(554176526),Float.$valueOf(e),Float.$valueOf(d)]));continue;case 12289:d=this.centerParameter(++f);f=a.iToken;this.chk||c.addLast(D(-1,[Integer.$valueOf(134217751),Float.$valueOf(e),d]));continue;case 528432:switch(this.getToken(++f).tok){case 1111492629:b.set(1,0,0);f++;break;case 1111492630:b.set(0,1,0);f++;break;case 1111492631:b.set(0,0,1);f++;break;case 8:case 1073742332:b.setT(this.getPoint3f(f,!0));f=a.iToken+1;break;case 1073741824:this.invArg()}d=
this.floatParameter(f);this.chk||c.addLast(D(-1,[Integer.$valueOf(528432),Float.$valueOf(e),b,Float.$valueOf(d)]));continue;case 4160:var g=d=NaN;if(this.isFloatParameter(++f))d=this.floatParameter(f),g=this.floatParameter(++f);else switch(this.tokAt(f)){case 1111492629:d=this.floatParameter(++f);break;case 1111492630:g=this.floatParameter(++f);break;default:d=this.centerParameter(f);f=a.iToken;this.chk||c.addLast(D(-1,[Integer.$valueOf(4160),Float.$valueOf(e),d]));continue}this.chk||c.addLast(D(-1,
[Integer.$valueOf(268435634),Float.$valueOf(e),Float.$valueOf(d),Float.$valueOf(g)]));continue;case 268435632:continue;case 1112152078:d=new JU.Lst;a.isAtomExpression(f+1)?(g=this.atomExpressionAt(++f),f=a.iToken):g=this.vwr.bsA();if(this.chk)return;this.vwr.getPolymerPointsAndVectors(g,d);var h;if(0<(h=d.size())){for(var g=Array(h),j=0;j<h;j++)g[j]=d.get(j);c.addLast(D(-1,[Integer.$valueOf(1112152078),Float.$valueOf(e),g]));continue}break;case 1073742084:if(1073742330==this.getToken(f+1).tok){f++;
d=a.objectNameParameter(++f);if(this.chk)return;this.setShapeProperty(22,"thisID",d);d=this.getShapeProperty(22,"vertices");a.refresh(!1);null==d&&this.invArg();g=M(this.isFloatParameter(f+1)?this.floatParameter(++f):0);h=M(this.isFloatParameter(f+1)?this.floatParameter(++f):2147483647);c.addLast(D(-1,[Integer.$valueOf(1073742084),Float.$valueOf(e),d,null,H(-1,[g,h])]));continue}for(d=new JU.Lst;a.isCenterParameter(f+1);)d.addLast(this.centerParameter(++f)),f=a.iToken;if(0<d.size()){d=d.toArray(Array(d.size()));
this.chk||c.addLast(D(-1,[Integer.$valueOf(1073742084),Float.$valueOf(e),d,null,H(-1,[0,2147483647])]));continue}default:this.invArg()}}!this.chk&&!this.vwr.isJmolDataFrame()&&this.vwr.tm.navigateList(a,c)}});k(c$,"plot",function(a){var b=this.e,c=this.vwr.am.cmi;0>c&&b.errorStr(30,"plot");var c=this.vwr.ms.getJmolDataSourceFrame(c),d=a.length-1,f=a!==this.st,e=!0,g=this.st;f&&(b.st=this.st=a);var h=f?134222350:a[0].tok,j=f||134221850==h||4138==h?0:1,s=null,k=!0,m=!1;switch(h){case 135176:k=!1;m=
!0;break;case 134222350:e=k=!1;break;case 134221856:k=!1,4==JS.CmdExt.tokAtArray(d,a)?s=this.stringParameter(d--):1073742336==JS.CmdExt.tokAtArray(d-1,a)?(s=this.paramAsStr(d-2)+"."+this.paramAsStr(d),d-=3):(b.st=this.st=g,b.iToken=this.st.length,this.error(13)),b.slen=this.slen=d+1}var f="",w=null,l="",C=!1,x=!1,z=!1,q=!1,n=Array(3),r=H(3,0),t=JU.BSUtil.copy(this.vwr.bsA()),K="; select "+JU.Escape.eBS(t)+";\n ",q=b.optParameterAsString(d).toLowerCase(),A=null,u=null,E=null,v=JS.CmdExt.tokAtArray(j,
a);4==v&&(v=JS.T.getTokFromName(a[j].value));switch(v){default:b.iToken=1;this.invArg();break;case 134221834:b.iToken=1;q="data";K="";break;case 1715472409:b.iToken=j+1;for(a=0;3>a;a++){switch(this.tokAt(b.iToken)){case 4:r[a]=JS.T.getTokFromName(b.getToken(b.iToken).value);break;default:r[a]=this.tokAt(b.iToken);break;case 0:0==a&&this.invArg();case 1287653388:case 32:case 64:a=2;continue}1715472409!=r[a]&&!JS.T.tokAttr(r[a],1077936128)&&this.invArg();n[a]=this.getToken(b.iToken).value.toString();
b.iToken++}1287653388==this.tokAt(b.iToken)&&(E=this.stringParameter(++b.iToken),e=!1,b.iToken++);32==this.tokAt(b.iToken)&&(A=this.getPoint3f(++b.iToken,!1),b.iToken++);64==this.tokAt(b.iToken)&&(u=this.getPoint3f(++b.iToken,!1),b.iToken++);q="property "+n[0]+(null==n[1]?"":" "+n[1])+(null==n[2]?"":" "+n[2]);0>t.nextSetBit(0)&&(t=this.vwr.getModelUndeletedAtomsBitSet(c));l="select "+JU.Escape.eBS(t)+";\n ";break;case 4138:q.equalsIgnoreCase("draw")&&(q=b.optParameterAsString(--d).toLowerCase());
q=d>j&&q.startsWith("r");q="ramachandran"+(q?" r":"")+(135176==h?" draw":"");break;case 134221850:case 136314895:f=' "'+this.vwr.getQuaternionFrame()+'"';l="set quaternionFrame"+f+";\n  ";C=!0;q.equalsIgnoreCase("draw")&&(m=!0,q=b.optParameterAsString(--d).toLowerCase());z=(x=q.startsWith("deriv")||q.startsWith("diff"))&&0<q.indexOf("2");x&&d--;if(q.equalsIgnoreCase("helix")||q.equalsIgnoreCase("axis"))x=m=!0,d=-1;q=((d<=j?"":b.optParameterAsString(d))+"w").substring(0,1);if(q.equals("a")||q.equals("r"))x=
!0;JU.PT.isOneOf(q,";w;x;y;z;r;a;")||b.evalError("QUATERNION [w,x,y,z,a,r] [difference][2]",null);q="quaternion "+q+(x?" difference":"")+(z?"2":"")+(m?" draw":"")}this.st=g;if(this.chk)return"";if(k&&(l+="plot "+q,g=this.vwr.ms.getJmolDataFrameIndex(c,l),0<g&&134221856!=h&&134222350!=h))return this.vwr.setCurrentModelIndexClear(g,!0),"";k=d=g=null;j=Array(3);if(1715472409==v){g=this.getBitsetPropertyFloat(t,r[0]|224,1715472409==r[0]?n[0]:null,null==A?NaN:A.x,null==u?NaN:u.x);j[0]=n[0]+" "+JU.Escape.eAF(g);
null!=n[1]&&(d=this.getBitsetPropertyFloat(t,r[1]|224,1715472409==r[1]?n[1]:null,null==A?NaN:A.y,null==u?NaN:u.y),j[1]=n[1]+" "+JU.Escape.eAF(d));null!=n[2]&&(k=this.getBitsetPropertyFloat(t,r[2]|224,1715472409==r[2]?n[2]:null,null==A?NaN:A.z,null==u?NaN:u.z),j[2]=n[2]+" "+JU.Escape.eAF(k));null==A&&(A=JU.P3.new3(this.getPlotMinMax(g,!1,r[0]),this.getPlotMinMax(d,!1,r[1]),this.getPlotMinMax(k,!1,r[2])));null==u&&(u=JU.P3.new3(this.getPlotMinMax(g,!0,r[0]),this.getPlotMinMax(d,!0,r[1]),this.getPlotMinMax(k,
!0,r[2])));JU.Logger.info("plot min/max: "+A+" "+u);m=w=null;if(e){m=JU.P3.new3(1,1,1);w=new JU.P3;w.ave(u,A);m.sub2(u,A);m.set(m.x/200,m.y/200,m.z/200);JS.T.tokAttr(r[0],1094713344)?(m.x=1,w.x=0):0.1<m.x&&10>=m.x&&(m.x=1);JS.T.tokAttr(r[1],1094713344)?(m.y=1,w.y=0):0.1<m.y&&10>=m.y&&(m.y=1);JS.T.tokAttr(r[2],1094713344)?(m.z=1,w.z=0):0.1<m.z&&10>=m.z&&(m.z=1);if(null==n[2]||null==n[1])w.z=A.z=u.z=m.z=0;for(a=0;a<g.length;a++)g[a]=(g[a]-w.x)/m.x;if(null!=n[1])for(a=0;a<d.length;a++)d[a]=(d[a]-w.y)/
m.y;if(null!=n[2])for(a=0;a<k.length;a++)k[a]=(k[a]-w.z)/m.z}w=D(-1,[t,g,d,k,A,u,m,w,E,j])}if(134221856==h)return this.vwr.writeFileData(s,"PLOT_"+q,c,w);e=q.equals("data")?"1 0 H 0 0 0 # Jmol PDB-encoded data":this.vwr.getPdbData(c,q,null,w,null,!0);if(134222350==h)return e;JU.Logger.debugging&&JU.Logger.debug(e);if(135176==h)return b.runScript(e),"";h=this.vwr.fm.getFileInfo();s=this.vwr.getBoolean(603979792);this.vwr.g.appendNew=!0;e=null!=e&&null==this.vwr.openStringInlineParamsAppend(e,null,
!0);this.vwr.g.appendNew=s;this.vwr.fm.setFileInfo(h);if(!e)return"";h=this.vwr.ms.mc;this.vwr.ms.setJmolDataFrame(l,c,h-1);1715472409!=v&&(l+=";\n"+K);l=this.vwr.addStateScript(l,!0,!1);e=150;switch(v){default:c="frame 0.0; frame last; reset;select visible;wireframe only;";e=10;break;case 1715472409:this.vwr.setFrameTitle(h-1,q+" plot for model "+this.vwr.getModelNumberDotted(c));c="frame 0.0; frame last; reset;select visible; spacefill 3.0; wireframe 0;draw plotAxisX"+h+' {100 -100 -100} {-100 -100 -100} "'+
n[0]+'";draw plotAxisY'+h+' {-100 100 -100} {-100 -100 -100} "'+n[1]+'";';null!=n[2]&&(c+="draw plotAxisZ"+h+' {-100 -100 100} {-100 -100 -100} "'+n[2]+'";');break;case 4138:this.vwr.setFrameTitle(h-1,"ramachandran plot for model "+this.vwr.getModelNumberDotted(c));c="frame 0.0; frame last; reset;select visible; color structure; spacefill 3.0; wireframe 0;draw ramaAxisX"+h+' {100 0 0} {-100 0 0} "phi";draw ramaAxisY'+h+' {0 100 0} {0 -100 0} "psi";';break;case 134221850:case 136314895:this.vwr.setFrameTitle(h-
1,q.$replace("w"," ")+f+" for model "+this.vwr.getModelNumberDotted(c)),c=JU.C.getHexCode(this.vwr.cm.colixBackgroundContrast),c="frame 0.0; frame last; reset;select visible; wireframe 0; spacefill 3.0; isosurface quatSphere"+h+" color "+c+" sphere 100.0 mesh nofill frontonly translucent 0.8;draw quatAxis"+h+'X {100 0 0} {-100 0 0} color red "x";draw quatAxis'+h+'Y {0 100 0} {0 -100 0} color green "y";draw quatAxis'+h+'Z {0 0 100} {0 0 -100} color blue "z";color structure;draw quatCenter'+h+"{0 0 0} scale 0.02;"}b.runScript(c+
K);l.setModelIndex(this.vwr.am.cmi);this.vwr.setRotationRadius(e,!0);b.sm.loadShape(31);this.showString("frame "+this.vwr.getModelNumberDotted(h-1)+(0<q.length?" created: "+q+(C?f:""):""));return""},"~A");k(c$,"polyhedra",function(){var a=this.e,b=1==this.slen,c=!1,d=b,f=!1,e=!1,g=!1,h=NaN,j=0;a.sm.loadShape(21);this.setShapeProperty(21,"init",Boolean.TRUE);for(var k=3.4028235E38,p=-1,m=H(-1,[-2147483648]),w=-1,l=null,C=null,x=!1,z=null,q=null,n=1;n<this.slen;++n){var r=null,z=null;switch(this.getToken(n).tok){case 1073742197:h=
NaN;case 1073741872:a=1073742197==this.e.theTok?-1:2==this.tokAt(n+1)?this.intParameter(++n):1;this.chk||J.api.Interface.getInterface("JU.BZone",this.vwr,"script").setViewer(this.vwr).createBZ(a,null,!1,C,h);this.setShapeProperty(21,"init",Boolean.FALSE);return;case 6:r="info";z=this.e.theToken.value;d=!0;break;case 134217751:r="points";z=Float.$valueOf(1073742334==this.tokAt(++n)?0:this.e.floatParameter(n));x=!0;break;case 1073742138:h=this.floatParameter(++n);x=!0;continue;case 1814695966:null!=
C&&this.invArg();r="unitCell";z=Boolean.TRUE;d=!0;break;case 1073742072:this.e.restrictSelected(!1,!1),a.theTok=1073742335;case 1073742335:case 12291:case 1073742334:(n+1!=this.slen||d||1<j)&&this.error(18);r=1073742334==a.theTok?"off":1073742335==a.theTok?"on":"delete";f=!0;break;case 7:(null==C||d)&&this.invArg();d=!0;z=this.getIntArray2(n);q=this.getAllPoints(a.iToken+1);n=a.iToken;I(q[0],JM.Atom)&&this.setShapeProperty(21,"model",Integer.$valueOf(q[0].getModelIndex()));r="definedFaces";z=D(-1,
[z,q]);break;case 1073741961:r="full";break;case 2:null!=C&&this.invArg();r="nVertices";z=Integer.$valueOf(this.intParameter(n));d=!0;268435504==this.tokAt(n+1)&&n++;break;case 1677721602:null!=C&&this.invArg();0<j&&this.invPO();d=!0;r="bonds";b=!0;break;case 1073741852:-1!=p&&this.invArg(),p=0,n--;case 1665140738:n++;case 3:null!=C&&this.invArg();0<j&&this.invPO();r=0>=p?"radius":"radius1";z=Float.$valueOf(p=0==p?0:this.floatParameter(n));d=!0;break;case 1073742066:if(!this.isFloatParameter(n+1)){l=
this.e.centerParameter(++n,null);n=a.iToken;x=!0;continue}case 1073741937:this.setShapeProperty(21,"collapsed",null);case 1073742099:case 1073741924:r=JS.T.nameOf(a.theTok);switch(this.tokAt(n+1)){case 268435860:case 268435504:n++}z=Float.$valueOf(this.floatParameter(++n));break;case 1094717454:null==C&&this.invArg();r="model";z=Integer.$valueOf(this.intParameter(++n));break;case 1073742170:(1<j||null!=C&&!c||w==n)&&this.invPO();j=3;a.isAtomExpression(++n)?(r=d||c?"to":"toBitSet",z=this.atomExpressionAt(n)):
a.isArrayParameter(n)?(r="toVertices",z=a.getPointArray(n,-1,!1)):this.error(19);n=a.iToken;d=!0;break;case 12290:case 10:case 1073742325:e&&this.invPO();switch(++j){case 1:null!=C&&this.invArg();r="centers";break;case 2:r="to";d=!0;break;default:a.bad()}z=this.atomExpressionAt(n);n=a.iToken;d=(new Boolean(d|n+1==this.slen)).valueOf();break;case 1765808134:case 603979967:case 1073742074:k=this.getColorTrans(a,n,!0,m);n=a.iToken;continue;case 1073741948:case 1073741886:e&&this.error(18);e=!0;this.isFloatParameter(n+
1)&&this.setShapeProperty(21,"faceCenterOffset",Float.$valueOf(this.floatParameter(++n)));r=1073741886==this.e.theTok?"collapsed":null;break;case 1073742044:case 1073741933:case 1073741956:case 1073741934:g&&this.error(18);x=g=!0;r=JS.T.nameOf(a.theTok);break;case 1073742182:case 1073742060:case 1073741861:case 1073741958:case 1073741964:continue;case 1073741974:case 268435633:case 1073741824:case 4:if(!a.isColorParam(n)){1!=n&&this.invPO();C=1073741974==a.theTok?this.stringParameter(++n):a.optParameterAsString(n);
this.setShapeProperty(21,"thisID",C);this.setShapeProperty(21,"model",Integer.$valueOf(this.vwr.am.cmi));if(!a.isCenterParameter(n+1))continue;r="center";z=this.centerParameter(++n);n=a.iToken;c=!0;break}default:if(a.isColorParam(n)){m[0]=a.getArgbParam(n);a.isCenterParameter(n)&&(w=a.iToken+1);n=a.iToken;continue}this.invArg()}null!=r&&this.setShapeProperty(21,r,z);if(f)return}d?(!e&&b&&this.setShapeProperty(21,"bonds",null),this.setShapeProperty(21,"generate",null)):x||this.error(19);null!=l&&this.setShapeProperty(21,
"offset",l);Float.isNaN(h)||this.setShapeProperty(21,"scale",Float.$valueOf(h));-2147483648!=m[0]&&this.setShapeProperty(21,"colorThis",Integer.$valueOf(m[0]));3.4028235E38!=k&&a.setShapeTranslucency(21,"","translucentThis",k,null);this.setShapeProperty(21,"init",Boolean.FALSE)});k(c$,"write",function(a){var b=this.e,c=1,d=1,f=null,e=null,g=null,h=null,j="SPT",k=!0,p=!1,m=!1;null==a?(a=this.st,p=this.vwr.isApplet&&!this.vwr.isSignedApplet||!this.vwr.haveAccess(JV.Viewer.ACCESS.ALL)||0<this.vwr.fm.getPathForAllFiles().length):
(c=d=0,k=!1,p=!k);var w=JS.CmdExt.tokAtArray(c,a);if(4==w&&!k){var l=JS.T.getTokenFromName(JS.SV.sValue(a[0]).toLowerCase());null!=l&&(w=l.tok)}switch(w){case 0:break;case 134221850:case 4138:case 1715472409:return e=this.plot(a),p?e:this.writeMsg(e);case 134222850:b.isArrayParameter(c+1)&&(f=b.stringParameterSet(++c),h=g=".",d=c=b.iToken+1,w=this.tokAt(c));break;default:j=JS.SV.sValue(this.tokenAt(c,a)).toUpperCase()}var C=this.vwr.getExportDriverList(),l=null,x=k?this.slen:a.length,z="",q=null,
n=null,r=0,t=null,D=!1,A=null,u=-1,E=-1,v=!1,y=null,F=-2147483648;0!=w&&(k&&1<this.slen&&1073741848==this.tokAt(this.slen-2))&&(j=this.paramAsStr(this.slen-1).toUpperCase(),d=x,x-=2,w=0);switch(w){case 15:case 6:j="VAR";n=this.tokenAt(c++,a);break;case 1073741984:j="INLINE";l=JS.SV.sValue(this.tokenAt(++c,a));c++;break;case 134217762:j="PGRP";c++;z=JS.SV.sValue(this.tokenAt(c,a)).toLowerCase();z.equals("draw")&&c++;break;case 1073742329:c++;D=!0;break;case 1073742158:case 134222850:for(q=JS.SV.sValue(this.tokenAt(++c,
a)).toLowerCase();q.equals("localpath")||q.equals("remotepath");)q.equals("localpath")?g=JS.SV.sValue(this.tokenAt(++c,a)):h=JS.SV.sValue(this.tokenAt(++c,a)),q=JS.SV.sValue(this.tokenAt(++c,a)).toLowerCase();j="SPT";break;case 1228935687:case 134320141:case 1610616855:case 135180:case 1073742015:case 1073742018:case 1073877011:case 1073877010:case 135188:c++;break;case 1073741991:j="ZIPALL";c++;break;case 36868:j="VAR";c+=2;break;case 4115:case 4120:case 1073742139:case 4166:case 1073741824:case 4:switch(w){case 4115:var G;
c+1<x&&1073742325==a[++c].tok||10==a[c].tok?(G=b.atomExpression(a,c,0,!0,!1,null,!0),c=b.iToken+1):G=this.vwr.getAllAtoms();this.chk||(A=this.vwr.ms.getModelBS(G,!0));break;case 4120:j="IMAGE";c++;break;case 1073742139:q=JS.SV.sValue(this.tokenAt(++c,a)).toUpperCase();JU.PT.isOneOf(q,";PNG;PNGJ;")?(t=q,c++):t="PNG";break;case 4166:r=b.intParameterRange(++c,1,10);if(2147483647==r)return"";this.chk||(this.vwr.tm.setVibrationPeriod(0),b.isJS||b.delayScript(100));c++;break;default:w=4120}if(4120==w&&
c<a.length)if(w=JS.T.getTokenFromName(JS.SV.sValue(a[c]).toLowerCase()),null!=w&&(j=JS.SV.sValue(w).toUpperCase()),JU.PT.isOneOf(j,C.toUpperCase())){c++;j=j.substring(0,1).toUpperCase()+j.substring(1).toLowerCase();v=!0;k&&(y="Jmol."+j.toLowerCase());break}else if(JU.PT.isOneOf(j,";ZIP;ZIPALL;SPT;STATE;")){c++;break}else j="IMAGE";2==JS.CmdExt.tokAtArray(c,a)&&(u=JS.SV.iValue(this.tokenAt(c++,a)),0>=u&&this.invArg(),E=JS.SV.iValue(this.tokenAt(c++,a)),0>=E&&this.invArg())}if(d<x){q=JS.SV.sValue(this.tokenAt(c,
a));if(q.equalsIgnoreCase("clipboard")){if(this.chk)return""}else JU.PT.isOneOf(q.toLowerCase(),";jpg;jpeg;jpg64;jpeg64;gif;gift;pdf;ppm;png;pngj;pngt;")?(2==JS.CmdExt.tokAtArray(c+1,a)&&2==JS.CmdExt.tokAtArray(c+2,a)&&(u=JS.SV.iValue(this.tokenAt(++c,a)),0>=u&&this.invArg(),E=JS.SV.iValue(this.tokenAt(++c,a)),0>=E&&this.invArg()),2==JS.CmdExt.tokAtArray(c+1,a)&&(F=JS.SV.iValue(this.tokenAt(++c,a)))):JU.PT.isOneOf(q.toLowerCase(),";xyz;xyzrn;xyzvib;mol;mol67;sdf;v2000;v3000;json;pdb;pqr;cml;cif;qcjson;")&&
(j=q.toUpperCase(),c+1==x&&c++);j.equals("IMAGE")&&JU.PT.isOneOf(q.toLowerCase(),";jpg;jpeg;jpg64;jpeg64;gif;gift;pdf;ppm;png;pngj;pngt;scene;")&&(j=q.toUpperCase(),F=-2147483648,c++)}c+2==x&&(d=JS.SV.sValue(this.tokenAt(++c,a)),0<d.length&&"."!=d.charAt(0)&&null==q&&(System.out.println("??"),j=q.toUpperCase()));switch(JS.CmdExt.tokAtArray(c,a)){case 0:p=!0;break;case 1073741884:break;case 805306401:y=j.equals("IMAGE")?"?jmol.png":"?jmol."+j.toLowerCase();break;case 1073741824:case 4:y=JS.SV.sValue(this.tokenAt(c,
a));if(y.equalsIgnoreCase("clipboard")||!this.vwr.haveAccess(JV.Viewer.ACCESS.ALL))y=null;break;default:this.invArg()}if(j.equals("IMAGE")||j.equals("FRAME")||j.equals("VIBRATION"))j=null!=y&&0<=y.indexOf(".")?y.substring(y.lastIndexOf(".")+1).toUpperCase():"JPG";if(j.equals("ISOSURFACE")||j.equals("CONTACT"))m=j.equals("CONTACT"),j=null!=y&&0<=y.indexOf(".")?y.substring(y.lastIndexOf(".")+1).toUpperCase():"JVXL",j.equals("PMESH")?j="ISOMESH":j.equals("PMB")&&(j="ISOMESHBIN");d=JU.PT.isOneOf(j.toLowerCase(),
";jpg;jpeg;jpg64;jpeg64;gif;gift;pdf;ppm;png;pngj;pngt;scene;");if(!d&&(j.equals("MNU")?j="MENU":j.equals("WRL")||j.equals("VRML")?(j="Vrml",v=!0):j.equals("X3D")?(j="X3d",v=!0):j.equals("STL")?(j="Stl",v=!0):j.equals("IDTF")?(j="Idtf",v=!0):j.equals("MA")?(j="Maya",v=!0):j.equals("JS")?(j="Js",v=!0):j.equals("OBJ")?(j="Obj",v=!0):j.equals("JVXL")?j="ISOSURFACE":j.equals("XJVXL")?j="ISOSURFACE":j.equals("JMOL")?j="ZIPALL":j.equals("HIS")&&(j="HISTORY"),j.equals("COORD")||j.equals("COORDS")))j=null!=
y&&0<=y.indexOf(".")?y.substring(y.lastIndexOf(".")+1).toUpperCase():"XYZ";null!=f&&(j.equals("PNG")&&(j="PNGJ"),!j.equals("PNGJ")&&(!j.equals("ZIPALL")&&!j.equals("ZIP"))&&this.invArg());!d&&(!v&&!JU.PT.isOneOf(j,";SCENE;JMOL;ZIP;ZIPALL;SPT;HISTORY;MO;NBO;ISOSURFACE;MESH;PMESH;PMB;ISOMESHBIN;ISOMESH;VAR;FILE;FUNCTION;CFI;CIF;CML;JSON;XYZ;XYZRN;XYZVIB;MENU;MOL;MOL67;PDB;PGRP;PQR;QUAT;RAMA;SDF;V2000;V3000;QCJSON;INLINE;"))&&b.errorStr2(54,"COORDS|FILE|FUNCTIONS|HISTORY|IMAGE|INLINE|ISOSURFACE|JMOL|MENU|MO|NBO|POINTGROUP|QUATERNION [w,x,y,z] [derivative]|RAMACHANDRAN|SPT|STATE|VAR x|ZIP|ZIPALL  CLIPBOARD",
"CIF|CML|CFI|GIF|GIFT|JPG|JPG64|JMOL|JVXL|MESH|MOL|PDB|PMESH|PNG|PNGJ|PNGT|PPM|PQR|SDF|CD|JSON|QCJSON|V2000|V3000|SPT|XJVXL|XYZ|XYZRN|XYZVIB|ZIP"+C.toUpperCase().$replace(";","|"));if(this.chk)return"";var C=Array(1),B,c=this.vwr.getBoolean(603979934);if(v){c&&JU.Logger.startTimer("export");e=new java.util.Hashtable;e.put("type",j);null!=y&&e.put("fileName",y);(k||null!=y)&&e.put("fullPath",C);e.put("width",Integer.$valueOf(u));e.put("height",Integer.$valueOf(E));l=this.vwr.generateOutputForExport(e);
if(null==l||0==l.length)return"";if(p)return l;if(!j.equals("Povray")&&!j.equals("Idtf")||null==C[0])return this.writeMsg(l);e=j.equals("Idtf")?".tex":".ini";y=C[0]+e;B=new java.util.Hashtable;B.put("fileName",y);B.put("type",e);B.put("text",l);B.put("fullPath",C);e=this.vwr.processWriteOrCapture(B);j.equals("Idtf")&&(l=l.substring(0,l.indexOf("\\begin{comment}")));l="Created "+C[0]+":\n\n"+l;c&&this.showString(JU.Logger.getTimerMsg("export",0));null!=e&&((j=!e.startsWith("OK"))&&b.evalError(e,null),
b.report(l,j));return""}v=null;q=!1;if(null==l){w=0;l=j.intern();if("MENU"===l)l=this.vwr.getMenu("");else if("PGRP"===l)l=this.vwr.ms.getPointGroupAsString(this.vwr.bsA(),null,0,1,null,null,z.equals("draw")?"":null);else if("PDB"===l||"PQR"===l)p?l=this.vwr.getPdbAtomData(null,null,"PQR"===l,D):(q=!0,j="PDB_"+l+"-coord "+D);else if("FILE"===l)"?".equals(y)&&(y="?Jmol."+this.vwr.getP("_fileType")),p?l=this.vwr.getCurrentFileAsString("script"):q=!0;else if("CIF"===l||"SDF"===l||"MOL"===l||"MOL67"===
l||"V2000"===l||"V3000"===l||"CD"===l||"JSON"===l||"XYZ"===l||"XYZRN"===l||"XYZVIB"===l||"CML"===l||"QCJSON"===l){a=this.vwr.bsA();e=" ("+a.cardinality()+" atoms)";if(0<=this.vwr.am.cmi&&!a.equals(B=this.vwr.getModelUndeletedAtomsBitSet(this.vwr.am.cmi)))e+="\nNote! Selected atom set "+a+" is not the same as the current model "+B;l=this.vwr.getModelExtract(a,D,!1,l);l.startsWith("ERROR:")&&(v=l)}else if("CFI"===l)l=this.vwr.getModelFileData("selected","cfi",!1);else if("FUNCTION"===l)l=this.vwr.getFunctionCalls(null),
j="TXT";else if("VAR"===l)null==n&&(n=b.getParameter(JS.SV.sValue(this.tokenAt(k?2:1,a)),1073742190,!0)),a=null,15==n.tok?(a=new JU.Lst,a.addLast(n.value.data)):6==n.tok&&(a=null==y?new JU.Lst:this.prepareBinaryOutput(n)),null==a?(l=n.asString(),j="TXT"):null!=y&&(B=new java.util.Hashtable,B.put("data",a),null==(v=l=this.vwr.createZip(y,1==a.size()||y.endsWith(".png")||y.endsWith(".pngj")?"BINARY":"ZIPDATA",B))&&b.evalError("#CANCELED#",null));else if("SPT"===l)if(D)B=this.vwr.ms.getTaintedAtoms(2),
this.vwr.setAtomCoordsRelative(JU.P3.new3(0,0,0),null),l=this.vwr.getStateInfo(),this.vwr.ms.setTaintedAtoms(B,2);else{if(l=this.vwr.getStateInfo(),null!=g||null!=h)l=JV.FileManager.setScriptFileReferences(l,g,h,null)}else"ZIP"===l||"ZIPALL"===l?null!=y&&(B=new java.util.Hashtable,null!=f&&B.put("data",f),null==(v=l=this.vwr.createZip(y,j,B))&&b.evalError("#CANCELED#",null)):"HISTORY"===l?(l=this.vwr.getSetHistory(2147483647),j="SPT"):"MO"===l||"NBO"===l?(l=this.getMoJvxl(2147483647,"NBO"===l),j=
"XJVXL"):"PMESH"===l||"PMB"===l?(null==(l=this.getIsosurfaceJvxl(29,l))&&this.error(31),j="XJVXL"):"ISOMESH"===l?(null==(l=this.getIsosurfaceJvxl(24,l))&&this.error(31),j="PMESH"):"ISOMESHBIN"===l?(null==(v=this.getIsosurfaceJvxl(24,"ISOMESHBIN"))&&this.error(31),j="PMB"):"ISOSURFACE"===l||"MESH"===l?(null==(l=this.getIsosurfaceJvxl(m?25:24,l))&&this.error(31),j=0<=l.indexOf("<?xml")?"XJVXL":"JVXL",p||this.showString(this.getShapeProperty(m?25:24,"jvxlFileInfo"))):(k&&(p&&null==y)&&(p=!1,y="\u0001"),
w=-1,null==t&&0>F&&(F=-1));null==l&&(l="");0==w&&(null==v||I(v,String))}if(!k)return l;if(p)return b.showStringPrint(l,!0),"";if(null!=v&&I(v,String))return this.writeMsg(v);if(q)return this.writeMsg(this.vwr.writeFileData(y,j,0,null));if(j.equals("SCENE"))v=t;else if(null==v&&(!d||null!=y))v=l;c&&JU.Logger.startTimer("write");d&&(b.refresh(!1),0>u&&(u=this.vwr.getScreenWidth()),0>E&&(E=this.vwr.getScreenHeight()));B=new java.util.Hashtable;null!=y&&B.put("fileName",y);B.put("backgroundColor",Integer.$valueOf(this.vwr.getBackgroundArgb()));
B.put("type",j);I(v,String)&&-2147483648==F?B.put("text",v):I(v,Array)&&B.put("bytes",v);null!=f&&B.put("scripts",f);null!=A&&B.put("bsFrames",A);B.put("fullPath",C);B.put("quality",Integer.$valueOf(F));B.put("width",Integer.$valueOf(u));B.put("height",Integer.$valueOf(E));B.put("nVibes",Integer.$valueOf(r));b=this.vwr.processWriteOrCapture(B);null==b&&(b="canceled");d&&b.startsWith("OK")&&(b+="; width="+u+"; height="+E);c&&this.showString(JU.Logger.getTimerMsg("write",0));return this.writeMsg(b+
(null==e?"":e))},"~A");k(c$,"prepareBinaryOutput",function(a){var b=a.getMap();if(null==b||!b.containsKey("$_BINARY_$"))return null;a=new JU.Lst;for(var c,b=b.entrySet().iterator();b.hasNext()&&((c=b.next())||1);){var d=c.getKey();if(!d.equals("$_BINARY_$")){var f=c.getValue(),e=15==f.tok?f.value.data:null;null==e&&(f=f.asString(),e=f.startsWith(";base64,")?JU.Base64.decodeBase64(f):f.getBytes());if(d.equals("_DATA_")){a=new JU.Lst;a.addLast(e);break}else d.equals("_IMAGE_")?(a.add(0,d),a.add(1,null),
a.add(2,e)):(a.addLast(d),a.addLast(null),a.addLast(e))}}return a},"JS.SV");k(c$,"writeMsg",function(a){if(this.chk||null==a)return"";var b=!a.startsWith("OK");b&&(this.e.evalError(a,null),alert(a));this.e.report(a,b);return a},"~S");k(c$,"show",function(){var a=this.e,b=null,c=this.paramAsStr(1),d=null,f=0;2<this.slen&&268435632==this.tokAt(this.slen-2)?(d="/"+this.paramAsStr(this.slen-1),this.slen-=2,f=2):0==(d=this.paramAsStr(this.slen-1)).lastIndexOf("/")?(this.slen--,f=1):d=null;var e=null,g=
null,h=2,j=this.getToken(1),g=I(j,JS.SV)&&1073741824!=j.tok?0:j.tok;4==g&&(j=JS.T.getTokenFromName(c.toLowerCase()),null!=j&&(g=j.tok));1296041986!=g&&(1073742158!=g&&1715472409!=g&&1228935687!=g)&&this.checkLength(-3);2==this.slen&&0<=c.indexOf("?")&&(e=this.vwr.getAllSettings(c.substring(0,c.indexOf("?"))),g=-1);switch(g){case 0:this.chk||(e=a.theToken.escape());break;case 1073741925:a.checkLength23();h=this.st.length;this.chk||(e=this.vwr.getModelInfo("domains"),e=I(e,JS.SV)?this.vwr.getAnnotationInfo(e,
a.optParameterAsString(2),1073741925):"domain information has not been loaded");break;case 1715472409:e=this.plot(this.st);h=this.st.length;break;case 1073742189:a.checkLength23();h=this.st.length;this.chk||(e=this.vwr.getModelInfo("validation"),e=I(e,JS.SV)?this.vwr.getAnnotationInfo(e,a.optParameterAsString(2),1073742189):"validation information has not been loaded");break;case 134221829:this.chk||(e=JU.Escape.e(this.vwr.fm.cacheList()));break;case 1111490587:a.checkLength23();h=this.st.length;
this.chk||(e=this.vwr.getModelInfo("dssr"),e=null==e?"no DSSR information has been read":2<h?JS.SV.getVariable(this.vwr.extractProperty(e,this.stringParameter(2),-1)).asString():""+JS.SV.getVariable(e).asString());break;case 1073741915:g=2;3==this.slen?g=M(this.floatParameter((h=3)-1)):this.checkLength(2+f);this.chk||(e=this.vwr.calculateStructures(null,!0,!1,g));break;case 545259572:this.checkLength(2+f);this.chk||(e=this.vwr.fm.getPathForAllFiles());break;case 1275203608:if(!this.chk){var k=Array(2);
this.vwr.shm.getShapePropertyData(21,"allInfo",k);e=JS.SV.getVariable(k[1]).asString()}break;case 1073742038:this.chk||this.vwr.getNMRPredict(a.optParameterAsString(2));return;case 1073741929:case 1073741879:case 134218757:this.checkLength((1073741879==g||134218757==g&&1073742335==this.tokAt(2)?h=3:2)+f);if(this.chk)return;var p=a.optParameterAsString(2);1073741879==g&&("mf".equals(p)&&(p="formula"),"formula".equals(p)&&(e=this.vwr.getModelInfo("formula"),null!=e&&(e=JU.PT.rep(e," ",""))));if(null==
e){try{134218757!=g?(e=this.vwr.ms.getModelDataBaseName(this.vwr.bsA()),e=null!=e&&(e.startsWith("$")||e.startsWith(":"))?e.substring(1):null):p.equalsIgnoreCase("true")?(e=this.vwr.getBioSmiles(null),d=null):null!=d&&(e=this.vwr.getSmilesOpt(null,-1,-1,1,d+"///"),d=null),null==e&&(k=JU.Logger.getLogLevel(),JU.Logger.setLogLevel(4),e=134218757==g?this.vwr.getSmiles(null):this.vwr.getOpenSmiles(null),JU.Logger.setLogLevel(k))}catch(m){if(N(m,Exception))e=m.getMessage(),null==e&&(e=""),m.printStackTrace();
else throw m;}switch(g){case 1073741929:if(0<e.length){this.vwr.fm.loadImage(this.vwr.setLoadFormat("_"+e,"2",!1),"\u0001"+e,!1);return}e="Could not show drawing -- Either insufficient atoms are selected or the model is a PDB file.";break;case 1073741879:h=3,0<e.length?(e=this.vwr.getChemicalInfo(e,p,this.vwr.bsA()),0<=e.indexOf("FileNotFound")&&(e="?")):e="Could not show name -- Either insufficient atoms are selected or the model is a PDB file."}}break;case 1073742152:case 1296041986:e="";k=null;
if(2==(h=this.slen)){if(this.chk)break;k=this.vwr.getSymTemp().getSpaceGroupInfo(this.vwr.ms,null,-1,!1)}else if(1073742152==g){k=this.paramAsStr(2);h=3;if(this.chk)break;k=this.vwr.getSymTemp().getSpaceGroupInfo(this.vwr.ms,JU.PT.rep(k,"''",'"'),-1,!1)}if(null!=k){e=(1073742152==g?""+k.get("spaceGroupInfo")+k.get("spaceGroupNote"):"")+k.get("symmetryInfo");break}var g=2==this.tokAt(2)?this.intParameter(2):0,k=4==this.tokAt(2)?this.paramAsStr(2):null,j=p=null,w=-1;if(3<this.slen&&4!=this.tokAt(3)){h=
D(-1,[null,this.vwr.getFrameAtoms()]);p=a.centerParameter(2+(0==g?0:1),h);if(null!=h[0]&&0==h[0].cardinality()){h=this.slen;break}h[0]=null;if(0==g&&(j=a.centerParameter(++a.iToken,h),null!=h[0]&&0==h[0].cardinality())){h=this.slen;break}2==this.tokAt(a.iToken+1)&&(w=a.getToken(++a.iToken).intValue)}var l=1<a.iToken&&4==this.tokAt(a.iToken+1)?this.stringParameter(++a.iToken):null;this.checkLength((h=++a.iToken)+f);this.chk||(e=this.vwr.getSymTemp().getSymmetryInfoAtom(this.vwr.ms,this.vwr.getAllAtoms().nextSetBit(0),
k,g,p,j,l,0,0,w),e=I(e,java.util.Map)?JS.SV.getVariable(e).asString():e.toString());break;case 1648363544:g=null;2<this.slen&&(h=this.slen,g=J.c.VDW.getVdwType(this.paramAsStr(2)),null==g&&this.invArg());this.chk||(e=this.vwr.getDefaultVdwNameOrData(0,g,null));break;case 134320141:a.checkLength23();h=this.slen;g=a.optParameterAsString(2);if(null==d&&0<=(p=g.indexOf("/")))d=g.substring(p+1),g=g.substring(0,p);this.chk||(e=this.vwr.getFunctionCalls(g));break;case 36867:this.checkLength(2+f);this.chk||
(e=this.vwr.getAllSettings(null));break;case 1073742166:e=this.vwr.getFrameTitle();break;case 1073742184:2==this.slen?this.chk||this.vwr.showUrl(a.getFullPathName()):(g=this.paramAsStr(2),this.chk||this.vwr.showUrl(g));return;case 1765808134:c="defaultColorScheme";break;case 1610612740:c="scaleAngstromsPerInch";break;case 134221850:case 4138:if(this.chk)return;0>this.vwr.am.cmi&&a.errorStr(30,"show "+a.theToken.value);e=this.plot(this.st);h=this.slen;break;case 14:case 1112152078:this.chk||(e=this.getContext(!1));
break;case 1073741888:g=a.optParameterAsString(2);0<g.length&&(h=3);this.chk||(b=this.vwr.cm.getColorSchemeList(g));break;case 1073742192:this.chk||(e=this.vwr.getAtomDefs(this.vwr.definedAtomSets)+this.vwr.g.getVariableList()+this.getContext(!0));break;case 536870926:this.chk||(e=this.vwr.getTrajectoryState());break;case 553648147:b=""+JS.ScriptEval.commandHistoryLevelMax;break;case 553648150:b=""+JU.Logger.getLogLevel();break;case 603979825:b=""+this.vwr.getBoolean(603979825);break;case 553648178:e=
"set strandCountForStrands "+this.vwr.getStrandCount(12)+"; set strandCountForMeshRibbon "+this.vwr.getStrandCount(13);break;case 536875070:e=this.vwr.showTimeout(2==(h=this.slen)?null:this.paramAsStr(2));break;case 536870918:b=JU.Escape.eP(this.vwr.getDefaultLattice());break;case 4126:this.chk||(e=this.vwr.getMinimizationInfo());break;case 1611272194:switch(this.vwr.g.axesMode){case 603979808:e="set axesUnitcell";break;case 603979804:e="set axesMolecular";break;default:e="set axesWindow"}break;case 1610612737:e=
"set bondMode "+(this.vwr.getBoolean(603979812)?"OR":"AND");break;case 1649022989:this.chk||(e="set strandCountForStrands "+this.vwr.getStrandCount(12)+"; set strandCountForMeshRibbon "+this.vwr.getStrandCount(13));break;case 1613238294:e="set hbondsBackbone "+this.vwr.getBoolean(603979852)+";set hbondsSolid "+this.vwr.getBoolean(603979854);break;case 1611141175:this.chk||(e=this.vwr.getSpinState());break;case 1611141176:e="set ssbondsBackbone "+this.vwr.getBoolean(603979952);break;case 1610625028:case 1611141171:e=
"selectionHalos "+(this.vwr.getSelectionHalosEnabled()?"ON":"OFF");break;case 1612709894:e="set selectHetero "+this.vwr.getBoolean(1612709894);break;case 1073741828:e=JU.Escape.eAP(this.vwr.getAdditionalHydrogens(null,!0,!0,null));break;case 1612709900:e="set selectHydrogens "+this.vwr.getBoolean(1612709900);break;case 553648130:case 553648141:case 536870924:case 553648176:case 553648172:case 1073741995:this.chk||(e=this.vwr.getLightingState());break;case 1073742136:case 4146:this.chk||(e=this.vwr.stm.listSavedStates());
break;case 1814695966:this.chk||(e=this.vwr.getUnitCellInfoText());break;case 1073742329:if(2==(h=this.slen)){this.chk||(e=this.vwr.getCoordinateState(this.vwr.bsA()));break}g=this.paramAsStr(2);this.chk||(e=this.vwr.stm.getSavedCoordinates(g));break;case 1073742158:!this.chk&&null==a.outputBuffer&&this.vwr.sm.clearConsole();if(2==(h=this.slen)){this.chk||(e=this.vwr.getStateInfo());break}if(null!=d&&3==this.slen){this.chk||(e=this.vwr.getStateInfo());break}else if(1228935687==this.tokAt(2)&&4==(h=
this.slen)){this.chk||(e=this.vwr.fm.getEmbeddedFileState(this.paramAsStr(3),!0,"state.spt"));break}h=3;g=this.paramAsStr(2);this.chk||(e=this.vwr.stm.getSavedState(g));break;case 1639976963:if(2==(h=this.slen)){this.chk||(e=this.vwr.ms.getProteinStructureState(this.vwr.bsA(),134222350));break}g=this.paramAsStr(2);this.chk||(e=this.vwr.stm.getSavedStructure(g));break;case 134221834:g=3==(h=this.slen)?this.paramAsStr(2):null;this.chk||(e=this.vwr.getDataObj(g,null,-2),e=null==e?"no data":JU.Escape.encapsulateData(e[0],
e[1],e[3].intValue()));break;case 1073742330:h=3;e=a.setObjectProperty();break;case 1678381065:this.chk||(e=this.vwr.ms.getBoundBoxCommand(!0));break;case 12289:this.chk||(e="center "+JU.Escape.eP(this.vwr.tm.fixedRotationCenter));break;case 135176:this.chk||(e=this.getShapeProperty(22,"command"));break;case 1228935687:if(2==this.slen){this.chk||(null==d&&this.vwr.sm.clearConsole(),e=this.vwr.getCurrentFileAsString("script"));null==e&&(e="<unavailable>");break}h=3;b=this.paramAsStr(2);this.chk||(null==
d&&this.vwr.sm.clearConsole(),e=this.vwr.getFileAsString3(b,!0,null));break;case 4115:e=1073742327==this.tokAt(2)&&0<(h=3)?this.vwr.getModelFileInfoAll():this.vwr.getModelFileInfo();break;case 1610616855:g=2==(h=this.slen)?2147483647:this.intParameter(2);1>g&&this.invArg();this.chk||(this.vwr.sm.clearConsole(),0==a.scriptLevel&&this.vwr.removeCommand(),e=this.vwr.getSetHistory(g));break;case 135180:this.chk||(e=this.getShapeProperty(24,"jvxlDataXml"));break;case 1073877011:case 1073877010:a.optParameterAsString(2).equalsIgnoreCase("list")?
(this.e.sm.loadShape(27),e=this.chk?"":this.getShapeProperty(27,"list -1"),h=3):(k=2==(h=this.slen)?-2147483648:this.intParameter(2),this.chk||(e=this.getMoJvxl(k,1073877011==g)));break;case 1094717454:this.chk||(e=this.vwr.ms.getModelInfoAsString());break;case 537006096:this.chk||(e=this.vwr.getMeasurementInfoAsString());break;case 1073741864:h=3;!this.chk&&this.slen==h&&(e=this.paramAsStr(2),e=this.vwr.getOrientationText(JS.T.getTokFromName(e.equals("box")?"volume":e.equals("rotation")?"best":e),
"best",null).toString());break;case 1073742132:g=this.tokAt(2),0==g?g=1073742132:h=3;case 1073742178:case 4129:this.chk||(e=this.vwr.getOrientationText(g,null,null).toString());break;case 1073742077:h=2;if(3<this.slen)break;switch(g=this.tokAt(2)){case 1073742178:case 1073742132:case 4129:case 0:this.chk||(e=this.vwr.getOrientationText(g,null,null).toString());break;default:g=a.optParameterAsString(2),e=this.vwr.getOrientationText(1073742034,g,null).toString()}h=this.slen;break;case 1073742088:this.chk||
(e=this.vwr.ms.getPDBHeader(this.vwr.am.cmi));break;case 134217762:g=a.optParameterAsString(2);0==g.length&&(g=null);h=this.slen;this.chk||(e=this.vwr.ms.getPointGroupAsString(this.vwr.bsA(),"show:"+g,0,0,null,null,null));break;case 1088421903:this.chk||(e=this.vwr.ms.getSymmetryInfoAsString());break;case 1073742176:this.chk||(e="transform:\n"+this.vwr.tm.matrixRotate.toString());break;case 4168:e="zoom "+(this.vwr.tm.zoomEnabled?""+this.vwr.tm.getZoomSetting():"off");break;case 1611272202:e=this.vwr.getShowFrank()?
"frank ON":"frank OFF";break;case 1665140738:c="solventProbeRadius";break;case 1086324744:if(3==(h=this.slen)&&1073742334==this.tokAt(2))g=1086324743;case 1073741863:case 1086326788:case 1073742120:case 1113589787:case 1086324742:case 1140850689:case 1073741982:this.chk||(e=this.vwr.getChimeInfo(g));break;case 537022465:case 1610612738:case 20482:case 1612709912:b="?";break;case 1073742030:g=2==(h=this.slen)?null:this.paramAsStr(2);this.chk||(e=this.vwr.getBindingInfo(g));break;case 1073742015:this.chk||
(b=this.vwr.getMenu(""));break;case 1073741824:c.equalsIgnoreCase("fileHeader")&&(this.chk||(e=this.vwr.ms.getPDBHeader(this.vwr.am.cmi)));break;case 1073741992:case 36868:c=this.paramAsStr(h++),k=a.getParameter(c,1073742190,!0),this.chk||(e=1073741992==g?k.toJSON():k.escape())}this.checkLength(h+f);this.chk||(null!=e?this.showString(this.filterShow(e,d)):null!=b?this.showString(c+" = "+b):null!=c&&(0<=c.indexOf(" ")?this.showString(c):this.showString(c+" = "+a.getParameter(c,1073742190,!0).escape())))});
k(c$,"filterShow",function(a,b){if(null==b)return a;b=b.substring(1).toLowerCase();for(var c=JU.PT.split(a,"\n"),d=new JU.SB,f=0;f<c.length;f++)0<=c[f].toLowerCase().indexOf(b)&&d.append(c[f]).appendC("\n");return d.toString()},"~S,~S");k(c$,"stereo",function(){for(var a=J.c.STER.DOUBLE,b=-5,c=!1,d=null,f=0,e=1;e<this.slen;++e)if(this.e.isColorParam(e))1<f&&this.e.bad(),0==f&&(d=H(2,0)),c||(b=3),d[f]=this.e.getArgbParam(e),0==f++&&(d[1]=~d[0]),e=this.e.iToken;else switch(this.getToken(e).tok){case 1073742335:this.e.checkLast(this.e.iToken=
1);this.e.iToken=1;break;case 1073742334:this.e.checkLast(this.e.iToken=1);a=J.c.STER.NONE;break;case 2:case 3:b=this.floatParameter(e);c=!0;break;case 1073741824:if(c||(b=3),a=J.c.STER.getStereoMode(this.paramAsStr(e)),null!=a)break;default:this.invArg()}this.chk||this.vwr.setStereoMode(d,a,b)});k(c$,"struts",function(){var a=this.e,b=1073742072==this.tokAt(1)||1073742335==this.tokAt(1)||1==this.slen,c=a.getMadParameter();if(2147483647==c)return!1;b&&(c=Math.round(2E3*this.vwr.getFloat(570425406)));
this.setShapeProperty(1,"type",Integer.$valueOf(32768));a.setShapeSizeBs(1,c,null);this.setShapeProperty(1,"type",Integer.$valueOf(1023));return!0});k(c$,"unitcell",function(a){var b=this.e,c=2147483647,d=2147483647,f=null,e=b.tickParamAsStr(a,!0,!1,!1);a=b.iToken;var g=null,h=null,j=null,k=null,p=d=!1;switch(this.tokAt(++a)){case 4142:case 4141:p=!0;f=JU.P4.new4(0,0,0,-1);b.iToken++;break;case 4:case 1073741824:var m=this.paramAsStr(a).toLowerCase(),k=m;if(0<=m.indexOf(",")||this.chk){j=m;break}d=
null;b.setCurrentCagePts(null,null);j=this.vwr.getModelInfo("unitcell_conventional");if(JU.PT.isOneOf(k,";parent;standard;primitive;")){if(null==j&&null!=this.vwr.getModelInfo("isprimitive")){this.showString("Cannot convert unit cell when file data is primitive and have no lattice information");return}k.equals("primitive")&&4==this.tokAt(a+1)&&(d=this.paramAsStr(++a).toUpperCase())}I(j,Array)&&(h=j);null==d&&(d=this.vwr.getModelInfo("latticeType"));null!=j&&b.setCurrentCagePts(this.vwr.getV0abc(j),
""+j);if(!k.equals("conventional")){m=this.vwr.getModelInfo("unitcell_"+k);if(null==m){if((m=k.equals("primitive"))||k.equals("reciprocal")){var w=this.slen==a+1?1:2==this.tokAt(a+1)?3.141592653589793*this.intParameter(++a):this.floatParameter(++a),l=this.vwr.getCurrentUnitCell(),k=(null==l?"":l.getSpaceGroupName()+" ")+k,h=null==l?D(-1,[JU.P3.new3(0,0,0),JU.P3.new3(1,0,0),JU.P3.new3(0,1,0),JU.P3.new3(0,0,1)]):l.getUnitCellVectors();null==d&&(d=this.vwr.getSymTemp().getSymmetryInfoAtom(this.vwr.ms,
this.vwr.getFrameAtoms().nextSetBit(0),null,0,null,null,null,1073741994,0,-1));null==l&&(l=this.vwr.getSymTemp());l.toFromPrimitive(!0,0==d.length?"P":d.charAt(0),h,this.vwr.getCurrentModelAuxInfo().get("primitiveToCrystal"));m||JU.SimpleUnitCell.getReciprocal(h,h,w);break}}else k=m,0<=m.indexOf(",")&&(j=m);this.showString(k)}break;case 135180:case 1073742330:g=b.objectNameParameter(++a);break;case 1678381065:h=JU.P3.newP(this.vwr.getBoundBoxCenter());f=this.vwr.getBoundBoxCornerVector();h.sub(f);
h=D(-1,[h,JU.P3.new3(2*f.x,0,0),JU.P3.new3(0,2*f.y,0),JU.P3.new3(0,0,2*f.z)]);f=null;b.iToken=a;break;case 1073742176:12!=this.tokAt(++a)&&this.invArg();j=D(-1,[this.getToken(a).value]);break;case 11:case 12:j=this.getToken(a).value;break;case 12289:switch(this.tokAt(++a)){case 12290:case 10:case 1073742325:f=this.vwr.ms.getAtomSetCenter(this.atomExpressionAt(a));this.vwr.toFractional(f,!0);a=b.iToken;break;default:if(b.isCenterParameter(a)){f=this.centerParameter(a);a=b.iToken;break}this.invArg()}f.x-=
0.5;f.y-=0.5;f.z-=0.5;break;case 12290:case 10:case 1073742325:a=this.atomExpressionAt(a).nextSetBit(0);this.chk||(this.vwr.am.cai=a);if(0>a)return;a=b.iToken;break;case 1073742066:d=!0;case 1073742114:f=b.getPointOrPlane(++a,!1,!0,!1,!0,3,3,!0);f=JU.P4.new4(f.x,f.y,f.z,d?1:0);a=b.iToken;break;case 3:case 2:if(111>this.floatParameter(a)){a--;break}c=this.intParameter(a);break;default:b.isArrayParameter(a)?(h=b.getPointArray(a,4,!1),a=b.iToken):this.slen>a+1?(f=b.getPointOrPlane(a,!1,!0,!1,!0,3,3,
!0),a=b.iToken):a--}d=b.getSetAxesTypeMad10(++a);b.checkLast(b.iToken);this.chk||2147483647==d||(2147483647==d&&(this.vwr.am.cai=-1),null==h&&null!=j&&(h=this.vwr.getV0abc(j)),2147483647!=c?this.vwr.ms.setUnitCellOffset(this.vwr.getCurrentUnitCell(),null,c):null!=g?this.vwr.setCurrentCage(g):(p||null!=h)&&b.setCurrentCagePts(h,k),b.setObjectMad10(33,"unitCell",d),null!=f&&this.vwr.ms.setUnitCellOffset(this.vwr.getCurrentUnitCell(),f,0),null!=e&&this.setShapeProperty(33,"tickInfo",e))},"~N");k(c$,
"assign",function(){var a=this.tokAt(1),b=-1,c=-1;if(1140850689==a&&4==this.tokAt(2))this.e.iToken++;else if(b=this.atomExpressionAt(2).nextSetBit(0),0>b)return;var d=null;4106==a?c=this.atomExpressionAt(++this.e.iToken).nextSetBit(0):d=this.paramAsStr(++this.e.iToken);var f=++this.e.iToken<this.slen?this.centerParameter(this.e.iToken):null;if(!this.chk)switch(this.vwr.pushState(),a){case 1140850689:this.e.clearDefinedVariableAtomSets();this.assignAtom(b,f,d);break;case 1677721602:this.assignBond(b,
(d+"p").charAt(0));break;case 4106:this.assignConnect(b,c)}});k(c$,"assignAtom",function(a,b,c){c.equals("X")&&this.vwr.setRotateBondIndex(-1);if(!(0<=a&&this.vwr.ms.at[a].mi!=this.vwr.ms.mc-1)){this.vwr.clearModelDependentObjects();var d=this.vwr.ms.ac;if(null==b)0>a||(this.vwr.sm.modifySend(a,this.vwr.ms.at[a].mi,1,this.e.fullCommand),this.vwr.ms.assignAtom(a,c,!0,!0),JU.PT.isOneOf(c,";Mi;Pl;X;")||this.vwr.ms.setAtomNamesAndNumbers(a,-d,null),this.vwr.sm.modifySend(a,this.vwr.ms.at[a].mi,-1,"OK"),
this.vwr.refresh(3,"assignAtom"));else{var f=0>a?null:this.vwr.ms.at[a],e=0>a?new JU.BS:JU.BSUtil.newAndSetBit(a);b=D(-1,[b]);var g=new JU.Lst,h=-1;null!=f&&(g.addLast(f),h=f.mi,this.vwr.sm.modifySend(a,h,3,this.e.fullCommand));try{var e=this.vwr.addHydrogensInline(e,g,b),j=e.nextSetBit(0);this.vwr.ms.assignAtom(j,c,!1,0<=a);a=j}catch(k){if(!N(k,Exception))throw k;}this.vwr.ms.setAtomNamesAndNumbers(a,-d,null);this.vwr.sm.modifySend(a,h,-3,"OK")}}},"~N,JU.P3,~S");k(c$,"assignBond",function(a,b){var c=
-1;try{c=this.vwr.ms.bo[a].atom1.mi;this.vwr.sm.modifySend(a,c,2,this.e.fullCommand);var d=this.vwr.ms.assignBond(a,b);null==d||"0"==b?this.vwr.refresh(3,"setBondOrder"):this.vwr.addHydrogens(d,!1,!0);this.vwr.sm.modifySend(a,c,-2,""+b)}catch(f){if(N(f,Exception))JU.Logger.error("assignBond failed"),this.vwr.sm.modifySend(a,c,-2,"ERROR "+f);else throw f;}},"~N,~S");k(c$,"assignConnect",function(a,b){this.vwr.clearModelDependentObjects();var c=JU.AU.newFloat2(1);c[0]=L(-1,[a,b]);var d=this.vwr.ms.at[a].mi;
this.vwr.sm.modifySend(a,d,2,this.e.fullCommand);this.vwr.ms.connect(c);this.vwr.ms.assignAtom(a,".",!0,!0);this.vwr.ms.assignAtom(b,".",!0,!0);this.vwr.sm.modifySend(a,d,-2,"OK");this.vwr.refresh(3,"assignConnect")},"~N,~N");k(c$,"getContext",function(a){for(var b=new JU.SB,c=this.e.thisContext;null!=c;)a?null!=c.vars&&(b.append(this.getScriptID(c)),b.append(JV.StateManager.getVariableList(c.vars,80,!0,!1))):b.append(JS.ScriptError.getErrorLineMessage(c.functionName,c.scriptFileName,this.e.getLinenumber(c),
c.pc,JS.ScriptEval.statementAsString(this.vwr,c.statement,-9999,this.e.debugHigh))),c=c.parentContext;a?null!=this.e.contextVariables&&(b.append(this.getScriptID(null)),b.append(JV.StateManager.getVariableList(this.e.contextVariables,80,!0,!1))):b.append(this.e.getErrorLineMessage2());return b.toString()},"~B");k(c$,"getIsosurfaceJvxl",function(a,b){return this.chk?"":this.getShapeProperty(a,"PMESH"===b||"MESH"===b?"jvxlMeshX":"ISOMESH"===b?"pmesh":"ISOMESHBIN"===b||"PMB"===b?"pmeshbin":"jvxlDataXml")},
"~N,~S");k(c$,"getMoJvxl",function(a,b){var c=b?28:27;this.e.sm.loadShape(c);var d=this.vwr.am.cmi;0>d&&this.e.errorStr(30,"show/write MO/NBO");var f=this.vwr.ms.getInfo(d,"moData");null==f&&this.error(27);var e=this.getShapeProperty(c,"moNumber");(null==e||0==e.intValue())&&this.setShapeProperty(c,"init",Integer.$valueOf(d));this.setShapeProperty(c,"moData",f);return this.e.sm.getShapePropertyIndex(c,"showMO",a)},"~N,~B");k(c$,"getScriptID",function(a){return"\n# "+(null==a?this.e.functionName:"function "+
a.functionName)+" (file "+(null==a?this.e.scriptFileName:a.scriptFileName)+(null==a?"":" context "+a.id)+")\n"},"JS.ScriptContext");k(c$,"tokenAt",function(a,b){return a<b.length?b[a]:null},"~N,~A");c$.tokAtArray=k(c$,"tokAtArray",function(a,b){return a<b.length&&null!=b[a]?b[a].tok:0},"~N,~A");k(c$,"getPlotMinMax",function(a,b,c){if(null==a)return 0;switch(c){case 1111490568:case 1111490569:case 1111490570:return b?180:-180;case 1111490565:case 1111490576:return b?360:0;case 1111490574:return b?
1:-1}c=b?-1E10:1E10;for(var d=a.length;0<=--d;){var f=a[d];Float.isNaN(f)||b==f>c&&(c=f)}return c},"~A,~B,~N");k(c$,"parseDataArray",function(a,b){a=JU.Parser.fixDataString(a);var c=JU.Parser.markLines(a,"\n"),d=c.length;if(!b){for(var f=JU.AU.newFloat2(d),e=0,g=0;e<d;g=c[e++])g=JU.PT.getTokens(a.substring(g,c[e])),JU.PT.parseFloatArrayData(g,f[e]=L(g.length,0));return f}g=JU.PT.getTokens(a.substring(0,c[0]));if(3!=g.length)return L(0,0,0,0);var h=JU.PT.parseInt(g[0]),j=JU.PT.parseInt(g[1]),k=JU.PT.parseInt(g[2]);
if(1>h||1>j||1>k)return L(1,1,1,0);for(var f=JU.AU.newFloat3(h,j),p=0,m=0,e=1,g=c[0];e<d&&p<h;g=c[e++])g=JU.PT.getTokens(a.substring(g,c[e])),g.length<k||(JU.PT.parseFloatArrayData(g,f[p][m]=L(g.length,0)),++m==j&&(p++,m=0));return p!=h?(System.out.println("Error reading 3D data -- nX = "+h+", but only "+p+" blocks read"),L(1,1,1,0)):f},"~S,~B");k(c$,"getBitsetPropertyFloat",function(a,b,c,d,f){b=null==c||1111490843==b?this.e.getBitsetProperty(a,null,b,null,null,c,null,!1,2147483647,!1):this.vwr.getDataObj(c,
a,1);if(null==b||!JU.AU.isAF(b))return null==a?null:L(a.cardinality(),0);if(!Float.isNaN(d))for(a=0;a<b.length;a++)b[a]<d&&(b[a]=NaN);if(!Float.isNaN(f))for(a=0;a<b.length;a++)b[a]>f&&(b[a]=NaN);return b},"JU.BS,~N,~S,~N,~N");U(c$,"ERROR_invalidArgument",22)})})(Clazz,Clazz.getClassName,Clazz.newLongArray,Clazz.doubleToByte,Clazz.doubleToInt,Clazz.doubleToLong,Clazz.declarePackage,Clazz.instanceOf,Clazz.load,Clazz.instantialize,Clazz.decorateAsClass,Clazz.floatToInt,Clazz.floatToLong,Clazz.makeConstructor,
Clazz.defineEnumConstant,Clazz.exceptionOf,Clazz.newIntArray,Clazz.defineStatics,Clazz.newFloatArray,Clazz.declareType,Clazz.prepareFields,Clazz.superConstructor,Clazz.newByteArray,Clazz.declareInterface,Clazz.p0p,Clazz.pu$h,Clazz.newShortArray,Clazz.innerTypeInstance,Clazz.isClassDefined,Clazz.prepareCallback,Clazz.newArray,Clazz.castNullAs,Clazz.floatToShort,Clazz.superCall,Clazz.decorateAsType,Clazz.newBooleanArray,Clazz.newCharArray,Clazz.implementOf,Clazz.newDoubleArray,Clazz.overrideConstructor,
Clazz.clone,Clazz.doubleToShort,Clazz.getInheritedLevel,Clazz.getParamsType,Clazz.isAF,Clazz.isAB,Clazz.isAI,Clazz.isAS,Clazz.isASS,Clazz.isAP,Clazz.isAFloat,Clazz.isAII,Clazz.isAFF,Clazz.isAFFF,Clazz.tryToSearchAndExecute,Clazz.getStackTrace,Clazz.inheritArgs,Clazz.alert,Clazz.defineMethod,Clazz.overrideMethod,Clazz.declareAnonymous,Clazz.cloneFinals);
