(function(la,ma,na,oa,L,pa,$,R,V,F,N,v,qa,O,ra,U,M,T,H,sa,Y,ga,ta,ua,ha,ia,va,da,ja,ka,S,wa,xa,ea,ya,za,Aa,Ba,fa,Ca,Da,Ea,Fa,Ga,Ha,Ia,Ja,Ka,La,Ma,Na,Oa,Pa,Qa,Ra,Sa,Ta,Ua,d,l){$("J.adapter.smarter");V(["JU.P3","$.SB"],"J.adapter.smarter.XtalSymmetry","java.lang.Boolean $.Character $.Float java.util.Hashtable JU.BS $.Lst $.M3 $.M4 $.P3i $.PT $.V3 J.adapter.smarter.Atom JS.Symmetry $.SymmetryOperation JU.BSUtil $.SimpleUnitCell".split(" "),function(){c$=N(function(){this.sym2=this.baseSymmetry=this.asc=
this.acr=null;this.doCentroidUnitCell=this.centroidPacked=this.applySymmetryToBonds=!1;this.doNormalize=!0;this.latticeOnly=this.doPackUnitCell=!1;this.unitCellTranslations=this.latticeCells=this.baseUnitCell=this.unitCellParams=this.trajectoryUnitCells=null;this.packingError=this.symmetryRange=0;this.bondsFound=this.filterSymop=null;this.ndims=3;this.nVib=this.noSymmetryCount=this.latticeOp=this.firstAtom=0;this.mTemp=this.ptTemp=null;this.rmaxz=this.rmaxy=this.rmaxx=this.rminz=this.rminy=this.rminx=
0;this.maxXYZ0=this.minXYZ0=this.maxXYZ=this.minXYZ=this.ptOffset=null;this.checkAll=!1;this.bondCount0=0;this.disorderMap=this.symmetry=null;this.disorderMapMax=0;F(this,arguments)},J.adapter.smarter,"XtalSymmetry");Y(c$,function(){this.unitCellParams=H(6,0);this.bondsFound=new JU.SB;this.ptOffset=new JU.P3});O(c$,function(){});d(c$,"set",function(a){this.acr=a;this.asc=a.asc;this.getSymmetry();return this},"J.adapter.smarter.AtomSetCollectionReader");d(c$,"getSymmetry",function(){return null==this.symmetry?
this.symmetry=this.acr.getInterface("JS.Symmetry"):this.symmetry});d(c$,"setSymmetry",function(a){return this.symmetry=a},"J.api.SymmetryInterface");d(c$,"setSymmetryRange",function(a){this.symmetryRange=a;this.asc.setInfo("symmetryRange",Float.$valueOf(a))},"~N");d(c$,"setLatticeCells",function(){this.latticeCells=this.acr.latticeCells;var a=555>=this.latticeCells[0]&&555<=this.latticeCells[1]&&(0==this.latticeCells[2]||1==this.latticeCells[2]||-1==this.latticeCells[2]);this.doNormalize=0!=this.latticeCells[0]&&
(!a||1==this.latticeCells[2]);this.applySymmetryToBonds=this.acr.applySymmetryToBonds;this.doPackUnitCell=this.acr.doPackUnitCell&&!this.applySymmetryToBonds;this.doCentroidUnitCell=this.acr.doCentroidUnitCell;this.centroidPacked=this.acr.centroidPacked;this.filterSymop=this.acr.filterSymop});d(c$,"setUnitCell",function(a,b,c){this.unitCellParams=H(a.length,0);for(var e=0;e<a.length;e++)this.unitCellParams[e]=a[e];this.asc.haveUnitCell=!0;this.asc.setCurrentModelInfo("unitCellParams",this.unitCellParams);
this.asc.isTrajectory&&(null==this.trajectoryUnitCells&&(this.trajectoryUnitCells=new JU.Lst,this.asc.setInfo("unitCells",this.trajectoryUnitCells)),this.trajectoryUnitCells.addLast(this.unitCellParams));this.asc.setGlobalBoolean(2);this.getSymmetry().setUnitCell(this.unitCellParams,!1);null!=c&&(this.symmetry.setOffsetPt(c),this.asc.setCurrentModelInfo("unitCellOffset",c));null!=b&&(this.symmetry.initializeOrientation(b),this.asc.setCurrentModelInfo("matUnitCellOrientation",b))},"~A,JU.M3,JU.P3");
d(c$,"addSpaceGroupOperation",function(a,b){b&&this.setLatticeCells();this.symmetry.setSpaceGroup(this.doNormalize);return this.symmetry.addSpaceGroupOperation(a,0)},"~S,~B");d(c$,"setLatticeParameter",function(a){this.symmetry.setSpaceGroup(this.doNormalize);this.symmetry.setLattice(a)},"~N");d(c$,"applySymmetryFromReader",function(a){this.asc.setCoordinatesAreFractional(this.acr.iHaveFractionalCoordinates);this.setUnitCell(this.acr.unitCellParams,this.acr.matUnitCellOrientation,this.acr.unitCellOffset);
this.setAtomSetSpaceGroupName(this.acr.sgName);this.setSymmetryRange(this.acr.symmetryRange);if(this.acr.doConvertToFractional||this.acr.fileCoordinatesAreFractional){this.setLatticeCells();var b=!0;if(this.acr.ignoreFileSpaceGroupName||!this.acr.iHaveSymmetryOperators){if(!this.acr.merging||null==a)a=this.acr.getNewSymmetry();b=a.createSpaceGroup(this.acr.desiredSpaceGroupIndex,0<=this.acr.sgName.indexOf("!")?"P1":this.acr.sgName,this.acr.unitCellParams,this.acr.modDim)}else this.acr.doPreSymmetry(),
a=null;this.packingError=this.acr.packingError;b&&(null!=a&&this.setSpaceGroupFrom(a),this.applySymmetryLattice(),null!=a&&null==this.filterSymop&&this.setAtomSetSpaceGroupName(a.getSpaceGroupName()))}if(this.acr.iHaveFractionalCoordinates&&this.acr.merging&&null!=a){for(var b=this.asc.atoms,c=this.asc.getLastAtomSetAtomIndex(),e=this.asc.ac;c<e;c++)a.toCartesian(b[c],!0);this.asc.setCoordinatesAreFractional(!1);this.acr.addVibrations=!1}return this.symmetry},"J.api.SymmetryInterface");d(c$,"setSpaceGroupFrom",
function(a){this.getSymmetry().setSpaceGroupTo(a.getSpaceGroup())},"J.api.SymmetryInterface");d(c$,"setAtomSetSpaceGroupName",function(a){this.symmetry.setSpaceGroupName(a);this.asc.setCurrentModelInfo("spaceGroup",a+"")},"~S");d(c$,"applySymmetryLattice",function(){if(this.asc.coordinatesAreFractional&&null!=this.symmetry.getSpaceGroup()){this.sym2=null;var a=this.latticeCells[0],b=this.latticeCells[1],c=Math.abs(this.latticeCells[2]),e=this.latticeCells[3],h=v(this.symmetry.getUnitCellInfoType(6));
this.firstAtom=this.asc.getLastAtomSetAtomIndex();var f=this.asc.bsAtoms;null!=f&&(this.updateBSAtoms(),this.firstAtom=f.nextSetBit(this.firstAtom));this.rminx=this.rminy=this.rminz=3.4028235E38;this.rmaxx=this.rmaxy=this.rmaxz=-3.4028235E38;var g=null;null==this.acr.latticeType&&(this.acr.latticeType=""+this.symmetry.getLatticeType());this.acr.isPrimitive&&(this.asc.setCurrentModelInfo("isprimitive",Boolean.TRUE),(!"P".equals(this.acr.latticeType)||null!=this.acr.primitiveToCrystal)&&this.asc.setCurrentModelInfo("unitcell_conventional",
this.symmetry.getConventionalUnitCell(this.acr.latticeType,this.acr.primitiveToCrystal)));if(null!=this.acr.latticeType&&(this.asc.setCurrentModelInfo("latticeType",this.acr.latticeType),R(this.acr.fillRange,String))){var j=this.acr.fillRange;j.equals("conventional")?this.acr.fillRange=this.symmetry.getConventionalUnitCell(this.acr.latticeType,this.acr.primitiveToCrystal):j.equals("primitive")?(this.acr.fillRange=this.symmetry.getUnitCellVectors(),this.symmetry.toFromPrimitive(!0,this.acr.latticeType.charAt(0),
this.acr.fillRange,this.acr.primitiveToCrystal)):this.acr.fillRange=null;null!=this.acr.fillRange&&this.acr.addJmolScript("unitcell "+j)}if(null!=this.acr.fillRange){f=this.updateBSAtoms();this.acr.forcePacked=!0;this.doPackUnitCell=!1;this.minXYZ=new JU.P3i;this.maxXYZ=JU.P3i.new3(1,1,1);for(var j=Array(4),k=0;4>k;k++)j[k]=JU.P3.newP(this.acr.fillRange[k]);this.adjustRangeMinMax(j);null==this.sym2&&(this.sym2=new JS.Symmetry,this.sym2.getUnitCell(this.acr.fillRange,!1,null));this.applyAllSymmetry(this.acr.ms,
f);for(var g=new JU.P3,d=this.asc.atoms,k=this.asc.ac;--k>=this.firstAtom;)g.setT(d[k]),this.symmetry.toCartesian(g,!1),this.sym2.toFractional(g,!1),this.acr.fixJavaFloat&&JU.PT.fixPtFloats(g,1E5),(this.acr.noPack?!this.removePacking(this.ndims,g,0,1,0,1,0,1,this.packingError):!this.isWithinCell(this.ndims,g,0,1,0,1,0,1,this.packingError))&&f.clear(k)}else{this.nVib=0;var m=null,q=null,n=null;this.baseSymmetry=this.symmetry;var W=this.acr.strSupercell,j=null;if(null!=W&&0<=W.indexOf(",")){var l=new JU.M4;
null==J.adapter.smarter.XtalSymmetry.mident&&(J.adapter.smarter.XtalSymmetry.mident=new JU.M4);j=this.symmetry.getV0abc(W,l);null!=j&&!l.equals(J.adapter.smarter.XtalSymmetry.mident)&&(this.setMinMax(h,e,a,b,c),g=JU.P3.newP(j[0]),m=JU.P3.newP(j[1]),q=JU.P3.newP(j[2]),n=JU.P3.newP(j[3]),this.adjustRangeMinMax(j))}l=this.asc.getLastAtomSetAtomIndex();null!=f&&(l=f.nextSetBit(l));if(3.4028235E38==this.rminx)j=null;else{this.asc.setGlobalBoolean(7);this.doPackUnitCell=k=this.doPackUnitCell;f=this.updateBSAtoms();
this.applyAllSymmetry(this.acr.ms,null);this.doPackUnitCell=k;for(var d=this.asc.atoms,r=this.asc.ac,k=l;k<r;k++)this.symmetry.toCartesian(d[k],!0),f.set(k);this.symmetry=null;this.symmetry=this.getSymmetry();this.setUnitCell(H(-1,[0,0,0,0,0,0,m.x,m.y,m.z,q.x,q.y,q.z,n.x,n.y,n.z]),null,null);this.setAtomSetSpaceGroupName(null==j||null==W?"P1":"cell="+W);this.symmetry.setSpaceGroup(this.doNormalize);this.symmetry.addSpaceGroupOperation("x,y,z",0);null!=g&&this.symmetry.toFractional(g,!0);for(k=l;k<
r;k++)this.symmetry.toFractional(d[k],!0),null!=g&&d[k].sub(g);this.asc.haveAnisou=!1;this.asc.setCurrentModelInfo("matUnitCellOrientation",null)}this.setMinMax(h,e,a,b,c);if(null==j){this.applyAllSymmetry(this.acr.ms,f);if(!this.acr.noPack&&(!this.applySymmetryToBonds||!this.acr.doPackUnitCell))return;this.setMinMax(h,e,a,b,c)}(this.acr.forcePacked||this.acr.doPackUnitCell||this.acr.noPack)&&this.trimToUnitCell(l)}}});d(c$,"setMinMax",function(a,b,c,e,h){this.minXYZ=new JU.P3i;this.maxXYZ=JU.P3i.new3(c,
e,h);JU.SimpleUnitCell.setMinMaxLatticeParameters(a,this.minXYZ,this.maxXYZ,b)},"~N,~N,~N,~N,~N");d(c$,"trimToUnitCell",function(a){var b=this.asc.atoms,c=this.updateBSAtoms();if(this.acr.noPack)for(a=c.nextSetBit(a);0<=a;a=c.nextSetBit(a+1))this.removePacking(this.ndims,b[a],this.minXYZ.x,this.maxXYZ.x,this.minXYZ.y,this.maxXYZ.y,this.minXYZ.z,this.maxXYZ.z,this.packingError)||c.clear(a);else for(a=c.nextSetBit(a);0<=a;a=c.nextSetBit(a+1))this.isWithinCell(this.ndims,b[a],this.minXYZ.x,this.maxXYZ.x,
this.minXYZ.y,this.maxXYZ.y,this.minXYZ.z,this.maxXYZ.z,this.packingError)||c.clear(a)},"~N");d(c$,"updateBSAtoms",function(){var a=this.asc.bsAtoms;null==a&&(a=this.asc.bsAtoms=JU.BSUtil.newBitSet2(0,this.asc.ac));0>a.nextSetBit(this.firstAtom)&&a.setBits(this.firstAtom,this.asc.ac);return a});d(c$,"adjustRangeMinMax",function(a){var b=new JU.P3,c=new JU.P3,e=new JU.P3;this.acr.forcePacked&&(b.setT(a[1]),c.setT(a[2]),e.setT(a[3]),b.scale(this.packingError),c.scale(this.packingError),e.scale(this.packingError));
a[0].scaleAdd2(this.minXYZ.x,a[1],a[0]);a[0].scaleAdd2(this.minXYZ.y,a[2],a[0]);a[0].scaleAdd2(this.minXYZ.z,a[3],a[0]);a[0].sub(b);a[0].sub(c);a[0].sub(e);var h=JU.P3.newP(a[0]);this.symmetry.toFractional(h,!0);this.setSymmetryMinMax(h);a[1].scale(this.maxXYZ.x-this.minXYZ.x);a[2].scale(this.maxXYZ.y-this.minXYZ.y);a[3].scale(this.maxXYZ.z-this.minXYZ.z);a[1].scaleAdd2(2,b,a[1]);a[2].scaleAdd2(2,c,a[2]);a[3].scaleAdd2(2,e,a[3]);for(b=0;3>b;b++)for(c=b+1;4>c;c++)h.add2(a[b],a[c]),0!=b&&h.add(a[0]),
this.symmetry.toFractional(h,!1),this.setSymmetryMinMax(h);this.symmetry.toCartesian(h,!1);h.add(a[1]);this.symmetry.toFractional(h,!1);this.setSymmetryMinMax(h);this.minXYZ=JU.P3i.new3(L(Math.min(0,Math.floor(this.rminx+0.001))),L(Math.min(0,Math.floor(this.rminy+0.001))),L(Math.min(0,Math.floor(this.rminz+0.001))));this.maxXYZ=JU.P3i.new3(L(Math.max(1,Math.ceil(this.rmaxx-0.001))),L(Math.max(1,Math.ceil(this.rmaxy-0.001))),L(Math.max(1,Math.ceil(this.rmaxz-0.001))))},"~A");d(c$,"setSymmetryMinMax",
function(a){this.rminx>a.x&&(this.rminx=a.x);this.rminy>a.y&&(this.rminy=a.y);this.rminz>a.z&&(this.rminz=a.z);this.rmaxx<a.x&&(this.rmaxx=a.x);this.rmaxy<a.y&&(this.rmaxy=a.y);this.rmaxz<a.z&&(this.rmaxz=a.z)},"JU.P3");d(c$,"isWithinCell",function(a,b,c,e,h,f,g,j,k){return b.x>c-k&&b.x<e+k&&(2>a||b.y>h-k&&b.y<f+k)&&(3>a||b.z>g-k&&b.z<j+k)},"~N,JU.P3,~N,~N,~N,~N,~N,~N,~N");d(c$,"removePacking",function(a,b,c,e,h,f,g,j,k){return b.x>c-k&&b.x<e-k&&(2>a||b.y>h-k&&b.y<f-k)&&(3>a||b.z>g-k&&b.z<j-k)},"~N,JU.P3,~N,~N,~N,~N,~N,~N,~N");
d(c$,"applyAllSymmetry",function(a,b){if(!(0==this.asc.ac||null!=b&&b.isEmpty())){var c=this.noSymmetryCount=0<this.asc.baseSymmetryAtomCount?this.asc.baseSymmetryAtomCount:null==b?this.asc.getLastAtomSetAtomCount():this.asc.ac-b.nextSetBit(this.asc.getLastAtomSetAtomIndex());this.asc.setTensors();this.applySymmetryToBonds=this.acr.applySymmetryToBonds;this.doPackUnitCell=this.acr.doPackUnitCell&&!this.applySymmetryToBonds;this.bondCount0=this.asc.bondCount;this.ndims=v(this.symmetry.getUnitCellInfoType(6));
this.finalizeSymmetry(this.symmetry);var e=this.symmetry.getSpaceGroupOperationCount(),h=null==this.acr.thisBiomolecule?null:new JU.BS;null!=h&&(this.asc.checkSpecial=!0);JU.SimpleUnitCell.setMinMaxLatticeParameters(this.ndims,this.minXYZ,this.maxXYZ,0);this.latticeOp=this.symmetry.getLatticeOp();this.latticeOnly=this.asc.checkLatticeOnly&&0<=this.latticeOp;this.doCentroidUnitCell&&this.asc.setInfo("centroidMinMax",M(-1,[this.minXYZ.x,this.minXYZ.y,this.minXYZ.z,this.maxXYZ.x,this.maxXYZ.y,this.maxXYZ.z,
this.centroidPacked?1:0]));if(this.doCentroidUnitCell||this.acr.doPackUnitCell||0!=this.symmetryRange&&1==this.maxXYZ.x-this.minXYZ.x&&1==this.maxXYZ.y-this.minXYZ.y&&1==this.maxXYZ.z-this.minXYZ.z)switch(this.minXYZ0=JU.P3.new3(this.minXYZ.x,this.minXYZ.y,this.minXYZ.z),this.maxXYZ0=JU.P3.new3(this.maxXYZ.x,this.maxXYZ.y,this.maxXYZ.z),null!=a&&(a.setMinMax0(this.minXYZ0,this.maxXYZ0),this.minXYZ.set(v(this.minXYZ0.x),v(this.minXYZ0.y),v(this.minXYZ0.z)),this.maxXYZ.set(v(this.maxXYZ0.x),v(this.maxXYZ0.y),
v(this.maxXYZ0.z))),this.ndims){case 3:this.minXYZ.z--,this.maxXYZ.z++;case 2:this.minXYZ.y--,this.maxXYZ.y++;case 1:this.minXYZ.x--,this.maxXYZ.x++}for(var f=(this.maxXYZ.x-this.minXYZ.x)*(this.maxXYZ.y-this.minXYZ.y)*(this.maxXYZ.z-this.minXYZ.z),g=c*(this.latticeOnly?4:e),g=this.asc.checkSpecial||null!=this.acr.thisBiomolecule?g*f:0<this.symmetryRange?g:1,j=Array(g),k=this.asc.atoms,d=0;d<c;d++)k[this.firstAtom+d].bsSymmetry=JU.BS.newN(e*(f+1));var m=0;this.unitCellTranslations=Array(f);var q=
0,n=0,W=Math.abs(this.symmetryRange),l=0!=this.symmetryRange,r=0>this.symmetryRange,t=0<this.symmetryRange;l&&(this.rminx=this.rminy=this.rminz=3.4028235E38,this.rmaxx=this.rmaxy=this.rmaxz=-3.4028235E38);var x=this.symmetry,w=x;this.checkAll=this.latticeOnly||1==this.asc.atomSetCount&&this.asc.checkSpecial&&0<=this.latticeOp;var y=this.acr.lstNCS;if(null!=y&&0==y.get(0).m33){for(var L=x.getSpaceGroupOperationCount(),P=y.size(),d=P;0<=--d;){var G=y.get(d);G.m33=1;x.toFractionalM(G)}for(d=1;d<L;d++)for(var A=
x.getSpaceGroupOperation(d),E=0;E<P;E++)G=JU.M4.newM4(y.get(E)),G.mul2(A,G),this.doNormalize&&0<this.noSymmetryCount&&JS.SymmetryOperation.normalizeOperationToCentroid(3,G,k,this.firstAtom,this.noSymmetryCount),y.addLast(G)}d=null;y=x.getSpaceGroupOperation(0);this.doPackUnitCell&&(d=new JU.P3,this.ptOffset.set(0,0,0));L=this.bondCount0>this.asc.bondIndex0&&this.applySymmetryToBonds?M(c,0):null;f=M(f,0);for(P=this.minXYZ.x;P<this.maxXYZ.x;P++)for(G=this.minXYZ.y;G<this.maxXYZ.y;G++)for(A=this.minXYZ.z;A<
this.maxXYZ.z;A++)if(this.unitCellTranslations[q]=JU.V3.new3(P,G,A),f[q++]=555+100*P+10*G+A,!(0!=P||0!=G||0!=A||0==j.length)){for(m=0;m<c;m++){n=k[this.firstAtom+m];null!=a&&(x=a.getAtomSymmetry(n,this.symmetry),x!==w&&(0==x.getSpaceGroupOperationCount()&&this.finalizeSymmetry(w=x),y=x.getSpaceGroupOperation(0)));E=JU.P3.newP(n);y.rotTrans(E);x.toCartesian(E,!1);if(this.doPackUnitCell)if(x.toUnitCellRnd(E,this.ptOffset),d.setT(E),x.toFractional(d,!1),this.acr.fixJavaFloat&&JU.PT.fixPtFloats(d,1E5),
null==b)n.setT(d);else if(1E-4>n.distance(d))b.set(n.index);else{b.clear(n.index);continue}null!=b&&n.bsSymmetry.clearAll();n.bsSymmetry.set(q*e);n.bsSymmetry.set(0);l&&this.setSymmetryMinMax(E);m<g&&(j[m]=E)}r&&(this.rminx-=W,this.rminy-=W,this.rminz-=W,this.rmaxx+=W,this.rmaxy+=W,this.rmaxz+=W);n=m=this.symmetryAddAtoms(0,0,0,0,m,q*e,j,a,h,L)}t&&(this.rminx-=W,this.rminy-=W,this.rminz-=W,this.rmaxx+=W,this.rmaxy+=W,this.rmaxz+=W);q=0;for(P=this.minXYZ.x;P<this.maxXYZ.x;P++)for(G=this.minXYZ.y;G<
this.maxXYZ.y;G++)for(A=this.minXYZ.z;A<this.maxXYZ.z;A++)if(q++,0!=P||0!=G||0!=A)m=this.symmetryAddAtoms(P,G,A,n,m,q*e,j,a,h,L);q*c==this.asc.ac-this.firstAtom&&this.duplicateAtomProperties(q);this.setSymmetryOps();this.asc.setCurrentModelInfo("presymmetryAtomIndex",Integer.$valueOf(this.firstAtom));this.asc.setCurrentModelInfo("presymmetryAtomCount",Integer.$valueOf(c));this.asc.setCurrentModelInfo("latticeDesignation",x.getLatticeDesignation());this.asc.setCurrentModelInfo("unitCellRange",f);this.asc.setCurrentModelInfo("unitCellTranslations",
this.unitCellTranslations);this.baseUnitCell=this.unitCellParams;this.unitCellParams=H(6,0);this.reset()}},"J.adapter.smarter.MSInterface,JU.BS");d(c$,"symmetryAddAtoms",function(a,b,c,e,h,f,g,j,d,p){var m=0==e,q=null!=p;this.doPackUnitCell&&this.ptOffset.set(a,b,c);var n=this.symmetryRange*this.symmetryRange,l=0>this.symmetryRange,u=0<this.symmetryRange,r=m&&u,u=(new Boolean(u&!m)).valueOf(),t=this.symmetry.getSpaceGroupOperationCount(),x=this.acr.lstNCS,w=null==x?0:x.size(),y=t+w,w=L(w/t),v=1==
y&&!this.doPackUnitCell?!1:this.asc.checkSpecial,P=l||u,G=v||P,A=null!=d,E=v||r,D=this.acr.isMolecular?null:this.asc.bsAtoms,B=this.symmetry;l&&(e=this.noSymmetryCount);var l=this.firstAtom+this.noSymmetryCount,R=0>this.asc.firstAtomToBond?l:this.asc.firstAtomToBond,X=new JU.P3,H=null,aa=A?0.01:1E-4,M="\x00",S=null==D?this.firstAtom:D.nextSetBit(this.firstAtom),Q=0;a:for(;Q<y;Q++)if(!(m&&0==Q||this.latticeOnly&&0<Q&&0!=Q%this.latticeOp||null!=d&&d.get(Q))){for(var O=this.firstAtom+(v||null!=d?h:u?
e:0),F=Q>=t?0:0==this.asc.vibScale?B.getSpinOp(Q):this.asc.vibScale,Z=Math.max(this.firstAtom,null==D?0:D.nextSetBit(0)),N=G,C=Q>=t?L((Q-t)/w):Q,z=C+f;Z<l;Z++){var I=this.asc.atoms[Z];if(null==D||D.get(Z)){null==j?B.newSpaceGroupPoint(I,Q,Q>=t?x.get(Q-t):null,a,b,c,X):(B=j.getAtomSymmetry(I,this.symmetry),B.newSpaceGroupPoint(I,Q,null,a,b,c,X),H=B.getSpaceGroupOperationCode(Q),null!=H&&(M=H.charAt(0),B=j.getSymmetryFromCode(H),0==B.getSpaceGroupOperationCount()&&this.finalizeSymmetry(B)));this.acr.fixJavaFloat&&
JU.PT.fixPtFloats(X,1E5);var K=JU.P3.newP(X);B.toCartesian(K,!1);if(this.doPackUnitCell&&(B.toUnitCellRnd(K,this.ptOffset),X.setT(K),B.toFractional(X,!1),this.acr.fixJavaFloat&&JU.PT.fixPtFloats(X,1E5),!this.isWithinCell(this.ndims,X,this.minXYZ0.x,this.maxXYZ0.x,this.minXYZ0.y,this.maxXYZ0.y,this.minXYZ0.z,this.maxXYZ0.z,this.packingError)))continue;r&&this.setSymmetryMinMax(K);var s=null;if(N){if(P&&(K.x<this.rminx||K.y<this.rminy||K.z<this.rminz||K.x>this.rmaxx||K.y>this.rmaxy||K.z>this.rmaxz))continue;
for(var ba=3.4028235E38,T=this.checkAll?this.asc.ac:O,$=I.atomName,V=null==H?I.altLoc:M,ca=S;ca<T;ca++)if(null==D||D.get(ca)){var U=g[ca-this.firstAtom];if(null!=U){U=K.distanceSquared(U);if(v&&U<aa){if(A){d.set(Q);continue a}s=this.asc.atoms[ca];if((null==s.atomName||s.atomName.equals($))&&s.altLoc==V)break;s=null}u&&(ca<e&&U<ba)&&(ba=U)}}if(u&&ba>n)continue}A&&(N=!1);ca=I.atomSite;if(null!=s)q&&(p[ca]=s.index),s.bsSymmetry.set(z),s.bsSymmetry.set(C);else{q&&(p[ca]=this.asc.ac);s=I.copyTo(X,this.asc);
null!=this.asc.bsAtoms&&this.asc.bsAtoms.set(s.index);0!=F&&null!=s.vib&&(B.getSpaceGroupOperation(Q).rotate(s.vib),s.vib.scale(F));if(s.isNegDisorder){null==this.disorderMap&&(this.disorderMap=new java.util.Hashtable);var Y=Integer.$valueOf(1E3*Q+s.altLoc.charCodeAt(0)),ba=this.disorderMap.get(Y);if(null==ba){if(0==this.disorderMapMax||90==this.disorderMapMax)this.disorderMapMax=64;this.disorderMap.put(Y,ba=new Character(String.fromCharCode(++this.disorderMapMax)))}s.altLoc=ba.charValue()}s.atomSite=
ca;null!=H&&(s.altLoc=M);s.bsSymmetry=JU.BSUtil.newAndSetBit(z);s.bsSymmetry.set(C);E&&(g[h++]=K);I=I.tensors;if(null!=I){s.tensors=null;for(ca=I.size();0<=--ca;)K=I.get(ca),null!=K&&(1==t?s.addTensor(K.copyTensor(),null,!1):this.addRotatedTensor(s,K,Q,!1,B))}}}}if(q){O=this.asc.bonds;F=this.asc.atoms;for(N=this.asc.bondIndex0;N<this.bondCount0;N++)if(C=O[N],s=F[C.atomIndex1],Z=F[C.atomIndex2],!(null==s||null==Z||Z.atomSetIndex<s.atomSetIndex))if(z=p[s.atomSite],I=p[Z.atomSite],z>I&&(Z=z,z=I,I=Z),
z!=I&&(z>=R||I>=R)&&0>this.bondsFound.indexOf(Y="-"+z+","+I))this.bondsFound.append(Y),this.asc.addNewBondWithOrder(z,I,C.order)}}return h},"~N,~N,~N,~N,~N,~N,~A,J.adapter.smarter.MSInterface,JU.BS,~A");d(c$,"duplicateAtomProperties",function(a){var b=this.asc.getAtomSetAuxiliaryInfoValue(-1,"atomProperties");if(null!=b)for(var c,e=b.entrySet().iterator();e.hasNext()&&((c=e.next())||1);){var h=c.getKey(),f=c.getValue();if(R(f,String)){for(var g=f,j=new JU.SB,f=a;0<=--f;)j.append(g);b.put(h,j.toString())}else{h=
f;g=H(h.length*a,0);for(f=a;0<=--f;)System.arraycopy(h,0,g,f*h.length,h.length)}}},"~N");d(c$,"finalizeSymmetry",function(a){var b=this.asc.getAtomSetAuxiliaryInfoValue(-1,"spaceGroup");a.setFinalOperations(this.ndims,b,this.asc.atoms,this.firstAtom,this.noSymmetryCount,this.doNormalize,this.filterSymop);(null!=this.filterSymop||null==b||b.equals("unspecified!"))&&this.setAtomSetSpaceGroupName(a.getSpaceGroupName())},"J.api.SymmetryInterface");d(c$,"setSymmetryOps",function(){var a=this.symmetry.getSpaceGroupOperationCount();
if(0<a){for(var b=Array(a),c=0;c<a;c++)b[c]=""+this.symmetry.getSpaceGroupXyz(c,this.doNormalize);this.asc.setCurrentModelInfo("symmetryOperations",b);this.asc.setCurrentModelInfo("symmetryOps",this.symmetry.getSymmetryOperations())}this.asc.setCurrentModelInfo("symmetryCount",Integer.$valueOf(a));this.asc.setCurrentModelInfo("latticeType",null==this.acr.latticeType?"P":this.acr.latticeType);this.asc.setCurrentModelInfo("intlTableNo",this.symmetry.getIntTableNumber());if(null==this.acr.sgName||0<=
this.acr.sgName.indexOf("?")||0<=this.acr.sgName.indexOf("!"))this.setAtomSetSpaceGroupName(this.acr.sgName=this.symmetry.getSpaceGroupName())});d(c$,"getOverallSpan",function(){return null==this.maxXYZ0?JU.V3.new3(this.maxXYZ.x-this.minXYZ.x,this.maxXYZ.y-this.minXYZ.y,this.maxXYZ.z-this.minXYZ.z):JU.V3.newVsub(this.maxXYZ0,this.minXYZ0)});d(c$,"applySymmetryBio",function(a,b,c){var e=a.get("biomts"),h=e.size();null==J.adapter.smarter.XtalSymmetry.mident&&(J.adapter.smarter.XtalSymmetry.mident=new JU.M4,
J.adapter.smarter.XtalSymmetry.mident.setIdentity());this.acr.lstNCS=null;this.setLatticeCells();var f=null!=this.latticeCells&&0!=this.latticeCells[0]?M(3,0):null;if(null!=f)for(var g=0;3>g;g++)f[g]=this.latticeCells[g];this.latticeCells=null;var f=this.acr.getFilterWithCase("BMCHAINS"),j=null==f?-1:2>f.length?0:JU.PT.parseInt(f.substring(1));-2147483648==j&&(j=-f.charAt(1).charCodeAt(0));var d=0<=c.indexOf("BYCHAIN")?1:0<=c.indexOf("BYSYMOP")?2:0;this.doNormalize=!1;var p=a.get("chains");this.symmetry=
null;this.getSymmetry().setSpaceGroup(this.doNormalize);this.addSpaceGroupOperation("x,y,z",!1);f=a.get("name");this.setAtomSetSpaceGroupName(this.acr.sgName=f);this.applySymmetryToBonds=b;this.bondCount0=this.asc.bondCount;this.firstAtom=this.asc.getLastAtomSetAtomIndex();var f=this.asc.ac,m=new java.util.Hashtable,q=0,n=this.asc.atoms;b=this.bondCount0>this.asc.bondIndex0&&b;switch(d){case 1:for(g=f;--g>=this.firstAtom;){var l=Integer.$valueOf(n[g].chainID),u=m.get(l);null==u&&(q++,m.put(l,u=new JU.BS));
u.set(g)}this.asc.bsAtoms=new JU.BS;for(g=0;g<q;g++)this.asc.bsAtoms.set(f+g),b=new J.adapter.smarter.Atom,b.set(0,0,0),b.radius=16,this.asc.addAtom(b);for(var r=0,t,m=m.entrySet().iterator();m.hasNext()&&((t=m.next())||1);){b=n[f+r++];u=t.getValue();for(g=u.nextSetBit(0);0<=g;g=u.nextSetBit(g+1))b.add(n[g]);b.scale(1/u.cardinality());b.atomName="Pt"+r;b.chainID=t.getKey().intValue()}this.firstAtom=f;f+=q;b=!1;break;case 2:this.asc.bsAtoms=new JU.BS;this.asc.bsAtoms.set(f);b=n[f]=new J.adapter.smarter.Atom;
b.set(0,0,0);for(g=f;--g>=this.firstAtom;)b.add(n[g]);b.scale(1/(f-this.firstAtom));b.atomName="Pt";b.radius=16;this.asc.addAtom(b);this.firstAtom=f++;b=!1}q=a.get("asemblyIdAtoms");0<=c.indexOf("#<")&&(h=Math.min(h,JU.PT.parseInt(c.substring(c.indexOf("#<")+2))-1),c=JU.PT.rep(c,"#<","_<"));g=0;for(m=this.firstAtom;m<f;m++)n[m].bsSymmetry=new JU.BS,a=n[m].chainID,a>g&&(g=a);a=this.asc.bsAtoms;u=b?M(this.asc.ac,0):null;for(r=null==p?1:0;r<h;r++){if(0<=c.indexOf("!#")){if(0<=c.indexOf("!#"+(r+1)+";"))continue}else if(0<=
c.indexOf("#")&&0>c.indexOf("#"+(r+1)+";"))continue;var x=e.get(r),w=!x.equals(J.adapter.smarter.XtalSymmetry.mident),y=null==p?null:p.get(r);if(null!=y&&null!=q){a=new JU.BS;for(m=q.entrySet().iterator();m.hasNext()&&((t=m.next())||1);)0<=y.indexOf(":"+t.getKey()+";")&&a.or(t.getValue());null!=this.asc.bsAtoms&&a.and(this.asc.bsAtoms);y=null}for(var v=-1,P=!1,m=this.firstAtom;m<f;m++){if(null!=a)P=!a.get(m);else if(null!=y&&(l=n[m].chainID)!=v)P=0>y.indexOf(":"+this.acr.vwr.getChainIDStr(v=l)+";");
if(!P)try{var G=n[m].atomSite,A;b&&(u[G]=this.asc.ac);A=this.asc.newCloneAtom(n[m]);A.bondingRadius=r;this.asc.atomSymbolicMap.put(""+A.atomSerial,A);null!=this.asc.bsAtoms&&this.asc.bsAtoms.set(A.index);A.atomSite=G;w&&x.rotTrans(A);A.bsSymmetry=JU.BSUtil.newAndSetBit(r)}catch(E){if(U(E,Exception))this.asc.errorMessage="appendAtomCollection error: "+E;else throw E;}}w&&this.symmetry.addBioMoleculeOperation(x,!1);if(b)for(x=this.asc.bondIndex0;x<this.bondCount0;x++)m=this.asc.bonds[x],this.asc.addNewBondWithOrder(u[n[m.atomIndex1].atomSite],
u[n[m.atomIndex2].atomSite],m.order)}if(null!=p){null==this.asc.bsAtoms&&(this.asc.bsAtoms=JU.BSUtil.newBitSet2(0,this.asc.ac));this.asc.bsAtoms.clearBits(this.firstAtom,f);if(0==d){if(-1!=j){l=(e=0!=j)?new JU.BS:null;n=this.asc.atoms;G=0;e&&(G=0>j?Math.max(-j,g+1):Math.max(g+j,65),l.setBits(0,G-1),l.setBits(91,97),l.setBits(123,200));d=1==this.asc.structureCount?this.asc.structures[0].bsAll:null;p=new java.util.Hashtable;A=new java.util.Hashtable;m=null==d?null:new java.util.Hashtable;q=null;g=f;
for(u=this.asc.ac;g<u;g++)r=n[g].chainID,w=n[g].bsSymmetry.nextSetBit(0),j=this.acr.vwr.getChainIDStr(r),x=0==w?j:j+w,c=p.get(x),null==c&&(e&&0!=w&&(w=200>G?l.nextClearBit(G):200,200>w&&(l.set(w),c=Integer.$valueOf(this.acr.vwr.getChainID(""+String.fromCharCode(w),!0)),G=w)),null==c&&(c=Integer.$valueOf(this.acr.vwr.getChainID(x,!0))),x!==j&&(A.put(c,Integer.$valueOf(r)),null!=d&&(null!=q&&(q[1]=g),m.put(c,q=M(-1,[g,u])))),p.put(x,c)),n[g].chainID=c.intValue();if(0<this.asc.structureCount){n=this.asc.structures;
e=this.asc.structureCount;for(m=A.entrySet().iterator();m.hasNext()&&((t=m.next())||1);){c=t.getKey();c=c.intValue();j=t.getValue().intValue();for(g=0;g<e;g++)l=n[g],null==l.bsAll&&(l.startChainID==l.endChainID?l.startChainID==j&&(l=l.clone(),l.startChainID=l.endChainID=c,this.asc.addStructure(l)):System.err.println("XtalSymmetry not processing biomt chain structure "+this.acr.vwr.getChainIDStr(j)+" to "+this.acr.vwr.getChainIDStr(c)))}}}t=this.asc.getAtomSetAuxiliaryInfoValue(-1,"PDB_CONECT_bonds");
if(!b&&null!=t)for(g=t.size();0<=--g;)if(m=t.get(g),b=this.asc.getAtomFromName(""+m[0]),n=this.asc.getAtomFromName(""+m[1]),null!=b&&null!=n&&b.bondingRadius!=n.bondingRadius&&(null==a||a.get(b.index)&&a.get(n.index))&&25<b.distanceSquared(n))t.removeItemAt(g),System.out.println("long interchain bond removed for @"+b.atomSerial+"-@"+n.atomSerial)}g=f;for(u=this.asc.ac;g<u;g++)this.asc.atoms[g].bondingRadius=NaN}this.noSymmetryCount=f-this.firstAtom;this.asc.setCurrentModelInfo("presymmetryAtomIndex",
Integer.$valueOf(this.firstAtom));this.asc.setCurrentModelInfo("presymmetryAtomCount",Integer.$valueOf(this.noSymmetryCount));this.asc.setCurrentModelInfo("biosymmetryCount",Integer.$valueOf(h));this.asc.setCurrentModelInfo("biosymmetry",this.symmetry);this.finalizeSymmetry(this.symmetry);this.setSymmetryOps();this.reset()},"java.util.Map,~B,~S");d(c$,"reset",function(){this.asc.coordinatesAreFractional=!1;this.asc.setCurrentModelInfo("hasSymmetry",Boolean.TRUE);this.asc.setGlobalBoolean(1)});d(c$,
"addRotatedTensor",function(a,b,c,e,h){null==this.ptTemp&&(this.ptTemp=new JU.P3,this.mTemp=new JU.M3);return a.addTensor(this.acr.getInterface("JU.Tensor").setFromEigenVectors(h.rotateAxes(c,b.eigenVectors,this.ptTemp,this.mTemp),b.eigenValues,b.isIsotropic?"iso":b.type,b.id,b),null,e)},"J.adapter.smarter.Atom,JU.Tensor,~N,~B,J.api.SymmetryInterface");d(c$,"setTensors",function(){for(var a=this.asc.ac,b=this.asc.getLastAtomSetAtomIndex();b<a;b++){var c=this.asc.atoms[b];null!=c.anisoBorU&&(c.addTensor(this.symmetry.getTensor(this.acr.vwr,
c.anisoBorU),null,!1),Float.isNaN(c.bfactor)&&(c.bfactor=100*c.anisoBorU[7]),c.anisoBorU=null)}});d(c$,"setTimeReversal",function(a,b){this.symmetry.setTimeReversal(a,b)},"~N,~N");d(c$,"setSpinVectors",function(){if(0<this.nVib||0>this.asc.iSet||!this.acr.vibsFractional)return this.nVib;for(var a=this.asc.getAtomSetAtomIndex(this.asc.iSet),b=this.getBaseSymmetry(),c=this.asc.ac;--c>=a;){var e=this.asc.atoms[c].vib;null!=e&&(0<e.modDim?e.setMoment():(e=e.clone(),b.toCartesian(e,!0),this.asc.atoms[c].vib=
e),this.nVib++)}return this.nVib});d(c$,"scaleFractionalVibs",function(){for(var a=this.getBaseSymmetry().getUnitCellParams(),a=JU.P3.new3(1/a[0],1/a[1],1/a[2]),b=this.asc.getAtomSetAtomIndex(this.asc.iSet),c=this.asc.ac;--c>=b;){var e=this.asc.atoms[c].vib;null!=e&&e.scaleT(a)}});d(c$,"getBaseSymmetry",function(){return null==this.baseSymmetry?this.symmetry:this.baseSymmetry});d(c$,"finalizeUnitCell",function(a){null!=a&&null!=this.baseUnitCell&&(this.baseUnitCell[22]=Math.max(1,v(a.x)),this.baseUnitCell[23]=
Math.max(1,v(a.y)),this.baseUnitCell[24]=Math.max(1,v(a.z)))},"JU.P3");T(c$,"PARTICLE_NONE",0,"PARTICLE_CHAIN",1,"PARTICLE_SYMOP",2,"MAX_INTERCHAIN_BOND_2",25,"mident",null)});$("JS");V(["J.api.SymmetryInterface"],"JS.Symmetry","JU.BS $.Lst $.P3 $.PT J.api.Interface J.bspt.Bspt JS.PointGroup $.SpaceGroup $.SymmetryInfo $.SymmetryOperation $.UnitCell JU.Escape $.Logger $.SimpleUnitCell".split(" "),function(){c$=N(function(){this.cip=this.unitCell=this.symmetryInfo=this.pointGroup=this.spaceGroup=null;
this.$isBio=!1;this.desc=null;F(this,arguments)},JS,"Symmetry",null,J.api.SymmetryInterface);l(c$,"isBio",function(){return this.$isBio});O(c$,function(){});l(c$,"setPointGroup",function(a,b,c,e,h,f,g,j,d){this.pointGroup=JS.PointGroup.getPointGroup(null==a?null:a.pointGroup,b,c,e,h,f,g,j,d);return this},"J.api.SymmetryInterface,JU.T3,~A,JU.BS,~B,~N,~N,~N,~B");l(c$,"getPointGroupName",function(){return this.pointGroup.getName()});l(c$,"getPointGroupInfo",function(a,b,c,e,h,f){return null==b&&!c&&
null!=this.pointGroup.textInfo?this.pointGroup.textInfo:null==b&&this.pointGroup.isDrawType(e,h,f)?this.pointGroup.drawInfo:c&&null!=this.pointGroup.info?this.pointGroup.info:this.pointGroup.getInfo(a,b,c,e,h,f)},"~N,~S,~B,~S,~N,~N");l(c$,"setSpaceGroup",function(a){null==this.spaceGroup&&(this.spaceGroup=JS.SpaceGroup.getNull(!0,a,!1))},"~B");l(c$,"addSpaceGroupOperation",function(a,b){return this.spaceGroup.addSymmetry(a,b,!1)},"~S,~N");l(c$,"addBioMoleculeOperation",function(a,b){this.$isBio=this.spaceGroup.isBio=
!0;return this.spaceGroup.addSymmetry((b?"!":"")+"[[bio"+a,0,!1)},"JU.M4,~B");l(c$,"setLattice",function(a){this.spaceGroup.setLatticeParam(a)},"~N");l(c$,"getSpaceGroup",function(){return this.spaceGroup});l(c$,"createSpaceGroup",function(a,b,c,e){this.spaceGroup=JS.SpaceGroup.createSpaceGroup(a,b,c,e);null!=this.spaceGroup&&JU.Logger.debugging&&JU.Logger.debug("using generated space group "+this.spaceGroup.dumpInfo());return null!=this.spaceGroup},"~N,~S,~O,~N");l(c$,"getSpaceGroupInfoObj",function(a,
b,c,e){return JS.SpaceGroup.getInfo(this.spaceGroup,a,b,c,e)},"~S,~A,~B,~B");l(c$,"getLatticeDesignation",function(){return this.spaceGroup.getLatticeDesignation()});l(c$,"setFinalOperations",function(a,b,c,e,h,f,g){if(null!=b&&(b.startsWith("bio")||0<=b.indexOf(" *(")))this.spaceGroup.name=b;if(null!=g){var j=new JU.Lst;j.addLast(this.spaceGroup.operations[0]);for(var d=1;d<this.spaceGroup.operationCount;d++)g.contains(" "+(d+1)+" ")&&j.addLast(this.spaceGroup.operations[d]);this.spaceGroup=JS.SpaceGroup.createSpaceGroup(-1,
b+" *("+g.trim()+")",j,-1)}this.spaceGroup.setFinalOperationsForAtoms(a,c,e,h,f)},"~N,~S,~A,~N,~N,~B,~S");l(c$,"getSpaceGroupOperation",function(a){return null==this.spaceGroup||null==this.spaceGroup.operations||a>=this.spaceGroup.operations.length?null:null==this.spaceGroup.finalOperations?this.spaceGroup.operations[a]:this.spaceGroup.finalOperations[a]},"~N");l(c$,"getSpaceGroupXyz",function(a,b){return this.spaceGroup.getXyz(a,b)},"~N,~B");l(c$,"newSpaceGroupPoint",function(a,b,c,e,h,f,g){null==
c&&null==this.spaceGroup.finalOperations&&(c=this.spaceGroup.operations[b],c.isFinalized||c.doFinalize());JS.Symmetry.newPoint(null==c?this.spaceGroup.finalOperations[b]:c,a,e,h,f,g)},"JU.P3,~N,JU.M4,~N,~N,~N,JU.P3");l(c$,"rotateAxes",function(a,b,c,e){return 0==a?b:this.spaceGroup.finalOperations[a].rotateAxes(b,this.unitCell,c,e)},"~N,~A,JU.P3,JU.M3");l(c$,"getSpaceGroupOperationCode",function(a){return this.spaceGroup.operations[a].subsystemCode},"~N");l(c$,"setTimeReversal",function(a,b){this.spaceGroup.operations[a].setTimeReversal(b)},
"~N,~N");l(c$,"getSpinOp",function(a){return this.spaceGroup.operations[a].getMagneticOp()},"~N");l(c$,"addLatticeVectors",function(a){return this.spaceGroup.addLatticeVectors(a)},"JU.Lst");l(c$,"getLatticeOp",function(){return this.spaceGroup.latticeOp});l(c$,"getLatticeCentering",function(){return JS.SymmetryOperation.getLatticeCentering(this.getSymmetryOperations())});l(c$,"getOperationRsVs",function(a){return(null==this.spaceGroup.finalOperations?this.spaceGroup.operations:this.spaceGroup.finalOperations)[a].rsvs},
"~N");l(c$,"getSiteMultiplicity",function(a){return this.spaceGroup.getSiteMultiplicity(a,this.unitCell)},"JU.P3");l(c$,"addSubSystemOp",function(a,b,c,e){this.spaceGroup.isSSG=!0;b=JS.SymmetryOperation.getXYZFromRsVs(b,c,!1);c=this.spaceGroup.addSymmetry(b,-1,!0);this.spaceGroup.operations[c].setSigma(a,e);return b},"~S,JU.Matrix,JU.Matrix,JU.Matrix");l(c$,"getMatrixFromString",function(a,b,c){return JS.SymmetryOperation.getMatrixFromString(null,a,b,c)},"~S,~A,~B,~N");l(c$,"getSpaceGroupName",function(){return null!=
this.symmetryInfo?this.symmetryInfo.sgName:null!=this.spaceGroup?this.spaceGroup.getName():null!=this.unitCell&&0<this.unitCell.name.length?"cell="+this.unitCell.name:""});l(c$,"getSpaceGroupNameType",function(a){return null==this.spaceGroup?null:this.spaceGroup.getNameType(a,this)},"~S");l(c$,"setSpaceGroupName",function(a){null!=this.spaceGroup&&this.spaceGroup.setName(a)},"~S");l(c$,"getSpaceGroupOperationCount",function(){return null!=this.symmetryInfo&&null!=this.symmetryInfo.symmetryOperations?
this.symmetryInfo.symmetryOperations.length:null!=this.spaceGroup&&null!=this.spaceGroup.finalOperations?this.spaceGroup.finalOperations.length:0});l(c$,"getLatticeType",function(){return null!=this.symmetryInfo?this.symmetryInfo.latticeType:null==this.spaceGroup?"P":this.spaceGroup.latticeType});l(c$,"getIntTableNumber",function(){return null!=this.symmetryInfo?this.symmetryInfo.intlTableNo:null==this.spaceGroup?null:this.spaceGroup.intlTableNumber});l(c$,"getCoordinatesAreFractional",function(){return null==
this.symmetryInfo||this.symmetryInfo.coordinatesAreFractional});l(c$,"getCellRange",function(){return null==this.symmetryInfo?null:this.symmetryInfo.cellRange});l(c$,"getSymmetryInfoStr",function(){if(null!=this.symmetryInfo)return this.symmetryInfo.infoStr;if(null==this.spaceGroup)return"";this.symmetryInfo=new JS.SymmetryInfo;this.symmetryInfo.setSymmetryInfo(null,this.getUnitCellParams(),this.spaceGroup);return this.symmetryInfo.infoStr});l(c$,"getSymmetryOperations",function(){if(null!=this.symmetryInfo)return this.symmetryInfo.symmetryOperations;
null==this.spaceGroup&&(this.spaceGroup=JS.SpaceGroup.getNull(!0,!1,!0));this.spaceGroup.setFinalOperations();return this.spaceGroup.finalOperations});l(c$,"isSimple",function(){return null==this.spaceGroup&&(null==this.symmetryInfo||null==this.symmetryInfo.symmetryOperations)});l(c$,"setSymmetryInfo",function(a,b,c){this.symmetryInfo=new JS.SymmetryInfo;c=this.symmetryInfo.setSymmetryInfo(b,c,null);null!=c&&(this.setUnitCell(c,b.containsKey("jmolData")),this.unitCell.moreInfo=b.get("moreUnitCellInfo"),
b.put("infoUnitCell",this.getUnitCellAsArray(!1)),this.setOffsetPt(b.get("unitCellOffset")),b=b.get("matUnitCellOrientation"),null!=b&&this.initializeOrientation(b),JU.Logger.debugging&&JU.Logger.debug("symmetryInfos["+a+"]:\n"+this.unitCell.dumpInfo(!0,!0)));return this},"~N,java.util.Map,~A");l(c$,"haveUnitCell",function(){return null!=this.unitCell});d(c$,"setUnitCell",function(a,b){this.unitCell=JS.UnitCell.fromParams(a,b);return this},"~A,~B");l(c$,"unitCellEquals",function(a){return a.unitCell.isSameAs(this.unitCell)},
"J.api.SymmetryInterface");l(c$,"getUnitCellState",function(){return null==this.unitCell?"":this.unitCell.getState()});l(c$,"getMoreInfo",function(){return this.unitCell.moreInfo});d(c$,"getUnitsymmetryInfo",function(){return this.unitCell.dumpInfo(!1,!0)});l(c$,"initializeOrientation",function(a){this.unitCell.initOrientation(a)},"JU.M3");l(c$,"unitize",function(a){this.unitCell.unitize(a)},"JU.T3");l(c$,"toUnitCell",function(a,b){this.unitCell.toUnitCell(a,b)},"JU.T3,JU.T3");l(c$,"toUnitCellRnd",
function(a,b){this.unitCell.toUnitCellRnd(a,b)},"JU.T3,JU.T3");l(c$,"toSupercell",function(a){return this.unitCell.toSupercell(a)},"JU.P3");l(c$,"toFractional",function(a,b){this.$isBio||this.unitCell.toFractional(a,b)},"JU.T3,~B");l(c$,"toFractionalM",function(a){this.$isBio||this.unitCell.toFractionalM(a)},"JU.M4");l(c$,"toCartesian",function(a,b){this.$isBio||this.unitCell.toCartesian(a,b)},"JU.T3,~B");l(c$,"getUnitCellParams",function(){return this.unitCell.getUnitCellParams()});l(c$,"getUnitCellAsArray",
function(a){return this.unitCell.getUnitCellAsArray(a)},"~B");l(c$,"getTensor",function(a,b){if(null==b)return null;null==this.unitCell&&(this.unitCell=JS.UnitCell.fromParams(H(-1,[1,1,1,90,90,90]),!0));return this.unitCell.getTensor(a,b)},"JV.Viewer,~A");l(c$,"getUnitCellVerticesNoOffset",function(){return this.unitCell.getVertices()});l(c$,"getCartesianOffset",function(){return this.unitCell.getCartesianOffset()});l(c$,"getFractionalOffset",function(){return this.unitCell.getFractionalOffset()});
l(c$,"setOffsetPt",function(a){this.unitCell.setOffset(a)},"JU.T3");l(c$,"setOffset",function(a){var b=new JU.P3;JU.SimpleUnitCell.ijkToPoint3f(a,b,0,0);this.unitCell.setOffset(b)},"~N");l(c$,"getUnitCellMultiplier",function(){return this.unitCell.getUnitCellMultiplier()});l(c$,"getUnitCellMultiplied",function(){var a=this.unitCell.getUnitCellMultiplied();if(a===this.unitCell)return this;var b=new JS.Symmetry;b.unitCell=a;return b});l(c$,"getCanonicalCopy",function(a,b){return this.unitCell.getCanonicalCopy(a,
b)},"~N,~B");l(c$,"getUnitCellInfoType",function(a){return this.unitCell.getInfo(a)},"~N");l(c$,"getUnitCellInfo",function(a){return this.unitCell.dumpInfo(!1,a)},"~B");l(c$,"isSlab",function(){return this.unitCell.isSlab()});l(c$,"isPolymer",function(){return this.unitCell.isPolymer()});l(c$,"checkDistance",function(a,b,c,e,h,f,g,j){return this.unitCell.checkDistance(a,b,c,e,h,f,g,j)},"JU.P3,JU.P3,~N,~N,~N,~N,~N,JU.P3");d(c$,"getUnitCellVectors",function(){return this.unitCell.getUnitCellVectors()});
l(c$,"getUnitCell",function(a,b,c){if(null==a)return null;this.unitCell=JS.UnitCell.fromOABC(a,b);null!=c&&(this.unitCell.name=c);return this},"~A,~B,~S");l(c$,"isSupercell",function(){return this.unitCell.isSupercell()});l(c$,"notInCentroid",function(a,b,c){try{var e=new JU.BS,h=b.nextSetBit(0),f=a.getMolecules(),g=f.length,j=a.at,d=f[g-1].firstAtomIndex==a.am[j[h].mi].firstAtomIndex,p=new JU.P3,m=1==c[6];a=g;a:for(;0<=--a&&b.get(f[a].firstAtomIndex);){var q=f[a].atomList;p.set(0,0,0);for(var h=
0,n=q.nextSetBit(0);0<=n;n=q.nextSetBit(n+1))if(d||m)if(p.setT(j[n]),this.isNotCentroid(p,1,c,m))d&&e.set(n);else{if(!d)continue a}else p.add(j[n]),h++;(m||0<h&&this.isNotCentroid(p,h,c,!1))&&e.or(q)}return e}catch(l){if(U(l,Exception))return null;throw l;}},"JM.ModelSet,JU.BS,~A");d(c$,"isNotCentroid",function(a,b,c,e){a.scale(1/b);this.toFractional(a,!1);return e?a.x+5E-6<=c[0]||a.x-5E-6>c[3]||a.y+5E-6<=c[1]||a.y-5E-6>c[4]||a.z+5E-6<=c[2]||a.z-5E-6>c[5]:a.x+5E-6<=c[0]||a.x+5E-5>c[3]||a.y+5E-6<=
c[1]||a.y+5E-5>c[4]||a.z+5E-6<=c[2]||a.z+5E-5>c[5]},"JU.P3,~N,~A,~B");d(c$,"getDesc",function(a){return null==a?null==JS.Symmetry.nullDesc?JS.Symmetry.nullDesc=J.api.Interface.getInterface("JS.SymmetryDesc",null,"modelkit"):JS.Symmetry.nullDesc:(null==this.desc?this.desc=J.api.Interface.getInterface("JS.SymmetryDesc",a.vwr,"eval"):this.desc).set(a)},"JM.ModelSet");l(c$,"getSymmetryInfoAtom",function(a,b,c,e,h,f,g,j,d,p,m,q){return this.getDesc(a).getSymopInfo(b,c,e,h,f,g,j,d,p,m,q)},"JM.ModelSet,~N,~S,~N,JU.P3,JU.P3,JU.P3,~S,~N,~N,~N,~N");
l(c$,"getSpaceGroupInfo",function(a,b,c,e,h){var f=null==b;if(null==b){var g=a.getModelAuxiliaryInfo(a.vwr.am.cmi);null!=g&&(b=g.get("spaceGroup"))}g=null;null!=h&&(g=(new JS.Symmetry).setUnitCell(h,!1));return this.getDesc(a).getSpaceGroupInfo(this,c,b,0,null,null,null,0,-1,e,f,0,g,null)},"JM.ModelSet,~S,~N,~B,~A");l(c$,"fcoord",function(a){return JS.SymmetryOperation.fcoord(a)},"JU.T3");l(c$,"getV0abc",function(a,b){return null==this.unitCell?null:this.unitCell.getV0abc(a,b)},"~O,JU.M4");l(c$,"getQuaternionRotation",
function(a){return null==this.unitCell?null:this.unitCell.getQuaternionRotation(a)},"~S");l(c$,"getFractionalOrigin",function(){return this.unitCell.getFractionalOrigin()});l(c$,"getState",function(a,b,c){var e=this.getFractionalOffset(),h=!1;if(null!=e&&(0!=e.x||0!=e.y||0!=e.z))c.append("; set unitcell ").append(JU.Escape.eP(e)),h=!0;e=this.getUnitCellMultiplier();null!=e&&(c.append("; set unitcell ").append(JU.SimpleUnitCell.escapeMultiplier(e)),h=!0);var e=null!=a.getInfo(b,"spaceGroupAssigned"),
f=a.getInfo(b,"spaceGroup");e&&null!=f&&(c.append("\n UNITCELL "+JU.Escape.e(a.getUnitCell(b).getUnitCellVectors())),c.append("\n MODELKIT SPACEGROUP "+JU.PT.esc(f)),h=!0);return h},"JM.ModelSet,~N,JU.SB");l(c$,"getIterator",function(a,b,c,e){return J.api.Interface.getInterface("JS.UnitCellIterator",a,"script").set(this,b,a.ms.at,c,e)},"JV.Viewer,JM.Atom,JU.BS,~N");l(c$,"toFromPrimitive",function(a,b,c,e){null==this.unitCell&&(this.unitCell=JS.UnitCell.fromOABC(c,!1));return this.unitCell.toFromPrimitive(a,
b,c,e)},"~B,~S,~A,JU.M3");l(c$,"generateCrystalClass",function(a){var b=this.getSymmetryOperations(),c=new JU.Lst,e=null==a,h=0,f=0,g=0;e?(h=2.718281828459045,f=3.141592653589793,g=Math.log10(2E3),a=JU.P3.new3(h+1,f+2,g+3)):a=JU.P3.newP(a);if(null==b||null==this.unitCell)c.addLast(a);else{this.unitCell.toFractional(a,!0);var j=null,d=null,p=null;e&&(j=JU.P3.new3(f+4,g+5,h+6),this.unitCell.toFractional(j,!0),d=JU.P3.new3(g+7,h+8,f+9),this.unitCell.toFractional(d,!0));var h=new J.bspt.Bspt(3,0),f=h.allocateCubeIterator(),
g=new JU.P3,m=b.length;a:for(;0<=--m;){b[m].rotate2(a,g);f.initialize(g,0.001,!1);if(f.hasMoreElements())continue a;p=JU.P3.newP(g);c.addLast(p);h.addTuple(p);e&&(null!=d&&(p=new JU.P3,b[m].rotate2(d,p),c.addLast(p)),null!=j&&(p=new JU.P3,b[m].rotate2(j,p),c.addLast(p)))}for(a=c.size();0<=--a;)this.unitCell.toCartesian(c.get(a),!0)}return c},"JU.P3");l(c$,"calculateCIPChiralityForAtoms",function(a,b){a.setCursor(3);var c=this.getCIPChirality(a),e=a.getBoolean(603979960)?"CIPData":"CIPDataTracker",
e=J.api.Interface.getInterface("JS."+e,a,"script").set(a,b);e.setRule6Full(a.getBoolean(603979823));c.getChiralityForAtoms(e);a.setCursor(0)},"JV.Viewer,JU.BS");l(c$,"calculateCIPChiralityForSmiles",function(a,b){a.setCursor(3);var c=this.getCIPChirality(a),e=J.api.Interface.getInterface("JS.CIPDataSmiles",a,"script").setAtomsForSmiles(a,b);c.getChiralityForAtoms(e);a.setCursor(0);return e.getSmilesChiralityArray()},"JV.Viewer,~S");d(c$,"getCIPChirality",function(a){return null==this.cip?this.cip=
J.api.Interface.getInterface("JS.CIPChirality",a,"script"):this.cip},"JV.Viewer");l(c$,"getConventionalUnitCell",function(a,b){return null==this.unitCell||null==a?null:this.unitCell.getConventionalUnitCell(a,b)},"~S,JU.M3");l(c$,"getUnitCellInfoMap",function(){return null==this.unitCell?null:this.unitCell.getInfo()});d(c$,"setUnitCell",function(a){this.unitCell=JS.UnitCell.cloneUnitCell(a.unitCell)},"J.api.SymmetryInterface");l(c$,"findSpaceGroup",function(a,b,c,e,h,f){return J.api.Interface.getInterface("JS.SpaceGroupFinder",
a,"eval").findSpaceGroup(a,b,c,e,this,h,f)},"JV.Viewer,JU.BS,~S,~A,~B,~B");l(c$,"setSpaceGroupTo",function(a){this.symmetryInfo=null;this.spaceGroup=R(a,JS.SpaceGroup)?a:JS.SpaceGroup.getSpaceGroupFromITAName(a.toString())},"~O");l(c$,"removeDuplicates",function(a,b,c){var e=this.unitCell,h=a.at;a=a.occupancies;for(var f=null!=a,g=Array(b.length()),d=b.nextSetBit(0);0<=d;d=b.nextSetBit(d+1)){var k=g[d]=JU.P3.newP(h[d]);e.toFractional(k,!1);c?e.unitizeRnd(k):e.unitize(k)}for(d=b.nextSetBit(0);0<=d;d=
b.nextSetBit(d+1)){c=h[d];k=g[d];c=c.getAtomicAndIsotopeNumber();for(var e=f?a[d]:0,p=b.nextSetBit(d+1);0<=p;p=b.nextSetBit(p+1))c!=h[p].getAtomicAndIsotopeNumber()||f&&e!=a[p]||1.96E-6>k.distanceSquared(g[p])&&b.clear(p)}return b},"JM.ModelSet,JU.BS,~B");l(c$,"getEquivPoints",function(a,b,c){var e=this.getSymmetryOperations();return null==e||null==this.unitCell?null:this.unitCell.getEquivPoints(b,c,e,null==a?new JU.Lst:a,0,0)},"JU.Lst,JU.P3,~S");l(c$,"getEquivPointList",function(a,b,c){var e=this.getSymmetryOperations(),
h=0<=c.indexOf("newpt"),f=0<=c.indexOf("zapped"),g=a.size(),d=0<=c.indexOf("tofractional");if(0>c.indexOf("fromfractional"))for(var k=0;k<a.size();k++)this.toFractional(a.get(k),!0);c+=",fromfractional,tofractional";var p=0<b?0:g,m=b==g,q=0<b?b:g;m&&(b--,q--);f&&(q=0);var n=0<b?a.get(b):null;if(null!=e||null!=this.unitCell)for(k=b;k<g;k++)this.unitCell.getEquivPoints(a.get(k),c,e,a,p,q);!f&&(a.size()==b||a.get(b)!==n||m||h)&&g--;for(k=g-b;0<=--k;)a.removeItemAt(b);if(!d)for(k=a.size();--k>=b;)this.toCartesian(a.get(k),
!0)},"JU.Lst,~N,~S");l(c$,"getInvariantSymops",function(a,b){var c=this.getSymmetryOperations();if(null==c)return M(0,0);for(var e=new JU.BS,h=new JU.P3,f=new JU.P3,g=c.length,d=1;d<g;d++)h.setT(a),this.toFractional(h,!0),this.unitCell.unitize(h),f.setT(h),c[d].rotTrans(h),this.unitCell.unitize(h),1.96E-6>f.distanceSquared(h)&&e.set(d);c=M(e.cardinality(),0);if(null!=b&&c.length!=b.length)return null;h=0;for(d=1;d<g;d++)if(e.get(d)){if(null!=b&&b[h]!=d+1)return null;c[h++]=d+1}return c},"JU.P3,~A");
l(c$,"getTransform",function(a,b,c){return this.getDesc(null).getTransform(this.unitCell,this.getSymmetryOperations(),a,b,c)},"JU.P3,JU.P3,~B");c$.newPoint=d(c$,"newPoint",function(a,b,c,e,h,f){a.rotTrans2(b,f);f.add3(c,e,h)},"JU.M4,JU.P3,~N,~N,~N,JU.P3");T(c$,"nullDesc",null)});$("JS");V(["JU.M3","$.V3"],"JS.PointGroup","java.lang.Float java.util.Hashtable JU.Lst $.P3 $.PT $.Quat $.SB J.bspt.Bspt JU.BSUtil $.Escape $.Logger $.Node $.Point3fi".split(" "),function(){c$=N(function(){this.isAtoms=!1;
this.iter=this.textInfo=this.info=this.drawInfo=null;this.drawType="";this.drawIndex=0;this.scale=NaN;this.axes=this.nAxes=null;this.radius=this.nAtoms=0;this.distanceTolerance=0.25;this.distanceTolerance2=0;this.linearTolerance=8;this.cosTolerance=0.99;this.name="C_1?";this.vTemp=this.principalPlane=this.principalAxis=null;this.centerAtomIndex=-1;this.haveInversionCenter=!1;this.bsAtoms=this.atomMap=this.elements=this.points=this.center=null;this.localEnvOnly=this.haveVibration=!1;this.maxAtoms=
250;this.maxElement=0;this.eCounts=null;this.nOps=0;ja("JS.PointGroup.Operation")||JS.PointGroup.$PointGroup$Operation$();F(this,arguments)},JS,"PointGroup");Y(c$,function(){this.nAxes=M(JS.PointGroup.maxAxis,0);this.axes=Array(JS.PointGroup.maxAxis);this.vTemp=new JU.V3});d(c$,"getName",function(){return this.name});c$.getPointGroup=d(c$,"getPointGroup",function(a,b,c,e,h,f,g,d,k){var p=new JS.PointGroup;0>=f&&(f=0.01);0>=g&&(g=0.5);0>=d&&(d=250);p.distanceTolerance=f;p.distanceTolerance2=f*f;p.linearTolerance=
g;p.maxAtoms=d;p.isAtoms=null!=e;p.bsAtoms=p.isAtoms?e:JU.BSUtil.newBitSet2(0,c.length);p.haveVibration=h;p.center=b;p.localEnvOnly=k;JU.Logger.debugging&&(a=null);return p.set(a,c)?p:a},"JS.PointGroup,JU.T3,~A,JU.BS,~B,~N,~N,~N,~B");O(c$,function(){});d(c$,"isEqual",function(a){if(null==a||(this.linearTolerance!=a.linearTolerance||this.distanceTolerance!=a.distanceTolerance||this.nAtoms!=a.nAtoms||this.localEnvOnly!=a.localEnvOnly||this.haveVibration!=a.haveVibration||null==this.bsAtoms?null!=a.bsAtoms:
!this.bsAtoms.equals(a.bsAtoms)))return!1;for(var b=0;b<this.nAtoms;b++)if(this.elements[b]!=a.elements[b]||!this.points[b].equals(a.points[b]))return!1;return!0},"JS.PointGroup");d(c$,"set",function(a,b){this.cosTolerance=Math.cos(3.141592653589793*(this.linearTolerance/180));if(!this.getPointsAndElements(b))return JU.Logger.error("Too many atoms for point group calculation"),this.name="point group not determined -- ac > "+this.maxAtoms+" -- select fewer atoms and try again.",!0;this.getElementCounts();
if(this.haveVibration){for(var c=Array(this.points.length),e=this.points.length;0<=--e;){c[e]=JU.P3.newP(this.points[e]);var h=this.points[e].getVibrationVector();null!=h&&c[e].add(h)}this.points=c}if(this.isEqual(a))return!1;try{this.findInversionCenter();if(this.isLinear(this.points))return this.name=this.haveInversionCenter?"D(infinity)h":"C(infinity)v",this.vTemp.sub2(this.points[1],this.points[0]),this.addAxis(16,this.vTemp),this.principalAxis=this.axes[16][0],this.haveInversionCenter&&(this.axes[0]=
Array(1),this.principalPlane=this.axes[0][this.nAxes[0]++]=da(JS.PointGroup.Operation,this,null,this.vTemp)),!0;this.axes[0]=Array(15);c=0;this.findCAxes();c=this.findPlanes();this.findAdditionalAxes(c);var f=this.getHighestOrder();if(1<this.nAxes[17])this.name=1<this.nAxes[19]?this.haveInversionCenter?"Ih":"I":1<this.nAxes[18]?this.haveInversionCenter?"Oh":"O":0<c?this.haveInversionCenter?"Th":"Td":"T";else if(2>f){if(1==c)return this.name="Cs",!0;if(this.haveInversionCenter)return this.name="Ci",
!0;this.name="C1"}else 1==f%2&&0<this.nAxes[16]||0==f%2&&1<this.nAxes[16]?(this.principalAxis=this.setPrincipalAxis(f,c),0==c?this.name=14>f?"S"+f:"D"+(f-14):(f=14>f?L(f/2):f-14,this.name=c==f?"D"+f+"d":"D"+f+"h")):0==c?(this.principalAxis=this.axes[f][0],this.name=14>f?"S"+f:"C"+(f-14)):c==f-14?(this.principalAxis=this.axes[f][0],this.name="C"+c+"v"):(this.principalAxis=this.axes[14>f?f+14:f][0],this.principalPlane=this.axes[0][0],this.name="C"+(14>f?f/2:f-14)+"h")}catch(g){if(U(g,Exception))this.name=
"??";else throw g;}finally{JU.Logger.info("Point group found: "+this.name)}return!0},"JS.PointGroup,~A");d(c$,"setPrincipalAxis",function(a,b){var c=this.setPrincipalPlane(a,b);if(0==b&&14>a||1==this.nAxes[a])return 0<b&&14>a&&(a=14+L(a/2)),this.axes[a][0];if(null==c)return null;for(var e=0;e<this.nAxes[16];e++)if(this.isParallel(c.normalOrAxis,this.axes[16][e].normalOrAxis))return 0!=e&&(c=this.axes[16][0],this.axes[16][0]=this.axes[16][e],this.axes[16][e]=c),this.axes[16][0];return null},"~N,~N");
d(c$,"setPrincipalPlane",function(a,b){if(1==b)return this.principalPlane=this.axes[0][0];if(0==b||b==a-14)return null;for(var c=0;c<b;c++)for(var e=0,h=0;e<b;e++)if(this.isPerpendicular(this.axes[0][c].normalOrAxis,this.axes[0][e].normalOrAxis)&&2<++h)return 0!=c&&(e=this.axes[0][0],this.axes[0][0]=this.axes[0][c],this.axes[0][c]=e),this.principalPlane=this.axes[0][0];return null},"~N,~N");d(c$,"getPointsAndElements",function(a){var b=this.bsAtoms.cardinality();if(this.isAtoms&&b>this.maxAtoms)return!1;
this.points=Array(b);this.elements=M(b,0);if(0==b)return!0;for(var c=0,b=this.bsAtoms.nextSetBit(0);0<=b;b=this.bsAtoms.nextSetBit(b+1)){var e=a[b];R(e,JU.Node)&&(c=Math.max(c,e.i))}this.atomMap=M(c+1,0);this.nAtoms=0;if(c=null==this.center)this.center=new JU.P3;for(var h=new J.bspt.Bspt(3,0),b=this.bsAtoms.nextSetBit(0);0<=b;b=this.bsAtoms.nextSetBit(b+1),this.nAtoms++){e=a[b];if(R(e,JU.Node)){var f=this.localEnvOnly?1:1+Math.max(3,e.getCovalentBondCount());this.elements[this.nAtoms]=e.getElementNumber()*
f;this.atomMap[e.i]=this.nAtoms+1}else f=new JU.Point3fi,f.setT(e),f.i=-1-this.nAtoms,R(e,JU.Point3fi)&&(this.elements[this.nAtoms]=Math.max(0,e.sD)),e=f;h.addTuple(e);c&&this.center.add(e);this.points[this.nAtoms]=e}this.iter=h.allocateCubeIterator();c&&this.center.scale(1/this.nAtoms);for(b=this.nAtoms;0<=--b;)a=this.center.distanceSquared(this.points[b]),this.isAtoms&&a<this.distanceTolerance2&&(this.centerAtomIndex=b),this.radius=Math.max(this.radius,a);this.radius=Math.sqrt(this.radius);1.5>
this.radius&&0.15<this.distanceTolerance&&(this.distanceTolerance=this.radius/10,this.distanceTolerance2=this.distanceTolerance*this.distanceTolerance,System.out.println("PointGroup calculation adjusting distanceTolerance to "+this.distanceTolerance));return!0},"~A");d(c$,"findInversionCenter",function(){if(this.haveInversionCenter=this.checkOperation(null,this.center,-1))this.axes[1]=Array(1),this.axes[1][0]=da(JS.PointGroup.Operation,this,null)});d(c$,"checkOperation",function(a,b,c){var e=new JU.P3,
h=0;c=14>c;var f=this.points.length,g=f;a:for(;0<=--g&&h<f;)if(g!=this.centerAtomIndex){var d=this.points[g],k=this.elements[g];null!=a?(e.sub2(d,b),a.transform2(e,e).add(b)):e.setT(d);c&&(this.vTemp.sub2(b,e),e.scaleAdd2(2,this.vTemp,e));if((null!=a||c)&&e.distanceSquared(d)<this.distanceTolerance2)h++;else{for(this.iter.initialize(e,this.distanceTolerance,!1);this.iter.hasMoreElements();){var p=this.iter.nextElement();if(p!==d){var m=this.getPointIndex(p.i);if(!(0<=this.centerAtomIndex&&m==this.centerAtomIndex||
m>=this.elements.length||this.elements[m]!=k)&&e.distanceSquared(p)<this.distanceTolerance2){h++;continue a}}}return!1}}return!0},"JU.Quat,JU.T3,~N");d(c$,"getPointIndex",function(a){return(0>a?-a:this.atomMap[a])-1},"~N");d(c$,"isLinear",function(a){var b=null;if(2>a.length)return!1;for(var c=a.length;0<=--c;)if(c!=this.centerAtomIndex)if(null==b)b=new JU.V3,b.sub2(a[c],this.center),b.normalize(),this.vTemp.setT(b);else if(this.vTemp.sub2(a[c],this.center),this.vTemp.normalize(),!this.isParallel(b,
this.vTemp))return!1;return!0},"~A");d(c$,"isParallel",function(a,b){return Math.abs(a.dot(b))>=this.cosTolerance},"JU.V3,JU.V3");d(c$,"isPerpendicular",function(a,b){return Math.abs(a.dot(b))<=1-this.cosTolerance},"JU.V3,JU.V3");d(c$,"getElementCounts",function(){for(var a=this.points.length;0<=--a;){var b=this.elements[a];b>this.maxElement&&(this.maxElement=b)}this.eCounts=M(++this.maxElement,0);for(a=this.points.length;0<=--a;)this.eCounts[this.elements[a]]++});d(c$,"findCAxes",function(){for(var a=
new JU.V3,b=new JU.V3,c=new JU.V3,e=this.points.length;0<=--e;)if(e!=this.centerAtomIndex)for(var h=this.points[e],f=this.elements[e],g=this.points.length;--g>e;){var d=this.points[g];if(this.elements[g]==f)if(a.sub2(h,this.center),b.sub2(d,this.center),a.normalize(),b.normalize(),this.isParallel(a,b))this.getAllAxes(a);else{this.nAxes[16]<JS.PointGroup.axesMaxN[16]&&(c.ave(h,d),c.sub(this.center),this.getAllAxes(c));var d=6.283185307179586/a.angle(b),k=L(Math.floor(d+0.01));if(0.02>=d-k&&!((k+=14)>=
JS.PointGroup.maxAxis)&&this.nAxes[k]<JS.PointGroup.axesMaxN[k])c.cross(a,b),this.checkAxisOrder(k,c,this.center)}}h=Array(2*this.nAxes[16]);for(e=0;e<h.length;e++)h[e]=new JU.V3;for(e=g=0;e<this.nAxes[16];e++)h[g++].setT(this.axes[16][e].normalOrAxis),h[g].setT(this.axes[16][e].normalOrAxis),h[g++].scale(-1);for(e=h.length;2<=--e;)for(g=e;1<=--g;)for(f=g;0<=--f;)c.add2(h[e],h[g]),c.add(h[f]),1>c.length()||this.checkAxisOrder(17,c,this.center);g=2147483647;h=-1;for(e=0;e<this.maxElement;e++)this.eCounts[e]<
g&&2<this.eCounts[e]&&(g=this.eCounts[e],h=e);e=0;a:for(;e<this.points.length-2;e++)if(this.elements[e]==h)for(g=e+1;g<this.points.length-1;g++)if(this.elements[g]==h)for(f=g+1;f<this.points.length;f++)if(this.elements[f]==h&&(a.sub2(this.points[e],this.points[g]),b.sub2(this.points[e],this.points[f]),a.normalize(),b.normalize(),c.cross(a,b),this.getAllAxes(c),a.add2(this.points[e],this.points[g]),a.add(this.points[f]),a.normalize(),this.isParallel(a,c)||this.getAllAxes(a),this.nAxes[19]==JS.PointGroup.axesMaxN[19]))break a;
h=Array(this.maxElement);for(e=this.points.length;0<=--e;){f=this.elements[e];if(null==h[f])h[f]=new JU.V3;else if(this.haveInversionCenter)continue;h[f].add(this.points[e])}if(!this.haveInversionCenter)for(e=0;e<this.maxElement;e++)null!=h[e]&&h[e].scale(1/this.eCounts[e]);for(e=0;e<this.maxElement;e++)if(null!=h[e])for(g=0;g<this.maxElement;g++)e==g||null==h[g]||(this.haveInversionCenter?a.cross(h[e],h[g]):a.sub2(h[e],h[g]),this.checkAxisOrder(16,a,this.center));return this.getHighestOrder()});
d(c$,"getAllAxes",function(a){for(var b=16;b<JS.PointGroup.maxAxis;b++)this.nAxes[b]<JS.PointGroup.axesMaxN[b]&&this.checkAxisOrder(b,a,this.center)},"JU.V3");d(c$,"getHighestOrder",function(){for(var a=0,a=14;1<--a&&0==this.nAxes[a];);if(1<a)return a+14<JS.PointGroup.maxAxis&&0<this.nAxes[a+14]?a+14:a;for(a=JS.PointGroup.maxAxis;1<--a&&0==this.nAxes[a];);return a});d(c$,"checkAxisOrder",function(a,b,c){switch(a){case 22:if(0<this.nAxes[17])return!1;case 20:case 18:if(0<this.nAxes[19])return!1;break;
case 17:if(0<this.nAxes[22])return!1;break;case 19:if(0<this.nAxes[18]||0<this.nAxes[20]||0<this.nAxes[22])return!1}b.normalize();if(this.haveAxis(a,b))return!1;var e=JS.PointGroup.getQuaternion(b,a);if(!this.checkOperation(e,c,a))return!1;this.addAxis(a,b);switch(a){case 16:this.checkAxisOrder(4,b,c);break;case 17:this.checkAxisOrder(3,b,c);this.haveInversionCenter&&this.addAxis(6,b);break;case 18:this.addAxis(16,b);this.checkAxisOrder(4,b,c);this.checkAxisOrder(8,b,c);break;case 19:this.checkAxisOrder(5,
b,c);this.haveInversionCenter&&this.addAxis(10,b);break;case 20:this.addAxis(16,b);this.addAxis(17,b);this.checkAxisOrder(3,b,c);this.checkAxisOrder(6,b,c);this.checkAxisOrder(12,b,c);break;case 22:this.addAxis(16,b),this.addAxis(18,b)}return!0},"~N,JU.V3,JU.T3");d(c$,"addAxis",function(a,b){this.haveAxis(a,b)||(null==this.axes[a]&&(this.axes[a]=Array(JS.PointGroup.axesMaxN[a])),this.axes[a][this.nAxes[a]++]=da(JS.PointGroup.Operation,this,null,b,a))},"~N,JU.V3");d(c$,"haveAxis",function(a,b){if(this.nAxes[a]==
JS.PointGroup.axesMaxN[a])return!0;if(0<this.nAxes[a])for(var c=this.nAxes[a];0<=--c;)if(this.isParallel(b,this.axes[a][c].normalOrAxis))return!0;return!1},"~N,JU.V3");d(c$,"findPlanes",function(){for(var a=new JU.P3,b=new JU.V3,c=new JU.V3,e=new JU.V3,h=0,f=1<this.getHighestOrder(),g=this.points.length;0<=--g;)if(g!=this.centerAtomIndex)for(var d=this.points[g],k=this.elements[g],p=this.points.length;--p>g;)if(!(f&&this.elements[p]!=k)&&(h=this.points[p],a.add2(d,h),a.scale(0.5),b.sub2(d,this.center),
c.sub2(h,this.center),this.isParallel(b,c)||(e.cross(b,c),e.normalize(),this.getPlane(e)),e.sub2(h,d),e.normalize(),h=this.getPlane(e),h==JS.PointGroup.axesMaxN[0]))return h;if(f)for(g=16;g<JS.PointGroup.maxAxis;g++)for(p=0;p<this.nAxes[g];p++)h=this.getPlane(this.axes[g][p].normalOrAxis);return h});d(c$,"getPlane",function(a){!this.haveAxis(0,a)&&this.checkOperation(JU.Quat.newVA(a,180),this.center,-1)&&(this.axes[0][this.nAxes[0]++]=da(JS.PointGroup.Operation,this,null,a));return this.nAxes[0]},
"JU.V3");d(c$,"findAdditionalAxes",function(a){var b=this.axes[0],c=0;if(1<a&&(c=a+14)<JS.PointGroup.maxAxis&&0==this.nAxes[c])this.vTemp.cross(b[0].normalOrAxis,b[1].normalOrAxis),!this.checkAxisOrder(c,this.vTemp,this.center)&&2<a&&(this.vTemp.cross(b[1].normalOrAxis,b[2].normalOrAxis),this.checkAxisOrder(c-1,this.vTemp,this.center));if(0==this.nAxes[16]&&2<a)for(c=0;c<a-1;c++)for(var e=c+1;e<a;e++)this.vTemp.add2(b[1].normalOrAxis,b[2].normalOrAxis),this.checkAxisOrder(16,this.vTemp,this.center)},
"~N");c$.getQuaternion=d(c$,"getQuaternion",function(a,b){return JU.Quat.newVA(a,(14>b?180:0)+(0==b?0:L(360/(b%14))))},"JU.V3,~N");d(c$,"getInfo",function(a,b,c,e,h,f){var g=null!=b;this.info=c?new java.util.Hashtable:null;var d=new JU.V3,k;0==f&&(f=1);this.scale=f;for(var p=M(4,2,0),m=1;m<JS.PointGroup.maxAxis;m++)for(var q=this.nAxes[m];0<=--q;)p[this.axes[m][q].type][0]++;var n=(new JU.SB).append("# ").appendI(this.nAtoms).append(" atoms\n");if(g){b="draw "+b;this.drawType=e=(c=null!=e&&0<e.length)?
e:"";this.drawIndex=h;var g=e.equalsIgnoreCase("Cn"),l=e.equalsIgnoreCase("Sn");n.append("set perspectivedepth off;\n");var u="_"+a+"_";c||n.append(b+"pg0").append(u).append("* delete;draw pgva").append(u).append("* delete;draw pgvp").append(u).append("* delete;");if(!c||e.equalsIgnoreCase("Ci"))n.append(b+"pg0").append(u).append(this.haveInversionCenter?"inv ":" ").append(JU.Escape.eP(this.center)).append(this.haveInversionCenter?'"i";\n':";\n");for(var r=0.1,m=2;m<JS.PointGroup.maxAxis;m++)if(14==
m&&(r=0.1),0!=this.nAxes[m]){a=this.axes[m][0].getLabel();var r=r+0.25,t=f*this.radius+r,q=14<=m;if(!c||e.equalsIgnoreCase(a)||g&&q||l&&!q)for(q=0;q<this.nAxes[m];q++)if(!(0<h&&q+1!=h)){k=this.axes[m][q];d.add2(k.normalOrAxis,this.center);2==k.type&&(t=-t);n.append(b+"pgva").append(u).append(a).append("_").appendI(q+1).append(" width 0.05 scale ").appendF(t).append(" ").append(JU.Escape.eP(d));d.scaleAdd2(-2,k.normalOrAxis,d);var x=null!=this.principalAxis&&k.index==this.principalAxis.index;n.append(JU.Escape.eP(d)).append('"').append(a).append(x?
"*":"").append('" color ').append(x?"red":2==k.type?"blue":"orange").append(";\n")}}if(!c||e.equalsIgnoreCase("Cs"))for(q=0;q<this.nAxes[0];q++)0<h&&q+1!=h||(k=this.axes[0][q],n.append(b+"pgvp").append(u).appendI(q+1).append("disk scale ").appendF(2*f*this.radius).append(" CIRCLE PLANE ").append(JU.Escape.eP(this.center)),d.add2(k.normalOrAxis,this.center),n.append(JU.Escape.eP(d)).append(" color translucent yellow;\n"),d.add2(k.normalOrAxis,this.center),n.append(b+"pgvp").append(u).appendI(q+1).append("ring width 0.05 scale ").appendF(2*
f*this.radius).append(" arc ").append(JU.Escape.eP(d)),d.scaleAdd2(-2,k.normalOrAxis,d),n.append(JU.Escape.eP(d)),d.add3(0.011,0.012,0.013),n.append(JU.Escape.eP(d)).append("{0 360 0.5} color ").append(null!=this.principalPlane&&k.index==this.principalPlane.index?"red":"blue").append(";\n"));n.append("# name=").append(this.name);n.append(", nCi=").appendI(this.haveInversionCenter?1:0);n.append(", nCs=").appendI(this.nAxes[0]);n.append(", nCn=").appendI(p[1][0]);n.append(", nSn=").appendI(p[2][0]);
n.append(": ");for(m=JS.PointGroup.maxAxis;2<=--m;)0<this.nAxes[m]&&(n.append(" n").append(14>m?"S":"C").appendI(m%14),n.append("=").appendI(this.nAxes[m]));n.append(";\n");n.append("print '"+this.name+"';\n");this.drawInfo=n.toString();JU.Logger.debugging&&JU.Logger.info(this.drawInfo);return this.drawInfo}q=0;b=1;e=0;m=this.haveInversionCenter?"Ci":"center";this.haveInversionCenter&&(b++,e++);c?null!=this.center&&(this.info.put(m,this.center),this.haveInversionCenter&&this.info.put("center",this.center),
this.info.put(m,this.center)):n.append("\n\n").append(this.name).append("\t").append(m).append("\t").append(JU.Escape.eP(this.center));for(m=JS.PointGroup.maxAxis;0<=--m;)if(0<this.nAxes[m]){q=JS.PointGroup.nUnique[m];a=this.axes[m][0].getLabel();c?this.info.put("n"+a,Integer.$valueOf(this.nAxes[m])):n.append("\n\n").append(this.name).append("\tn").append(a).append("\t").appendI(this.nAxes[m]).append("\t").appendI(q);q*=this.nAxes[m];b+=q;e+=this.nAxes[m];p[this.axes[m][0].type][1]+=q;h=c?new JU.Lst:
null;f=c?new JU.Lst:null;for(q=0;q<this.nAxes[m];q++)d=this.axes[m][q],c?(h.addLast(d.normalOrAxis),f.addLast(d.getM3())):n.append("\n").append(this.name).append("\t").append(a).append("_").appendI(q+1).append("\t").appendO(d.normalOrAxis);c&&(this.info.put(a,h),this.info.put(a+"_m",f))}if(!c)return n.append("\n"),n.append("\n").append(this.name).append("\ttype\tnElements\tnUnique"),n.append("\n").append(this.name).append("\tE\t  1\t  1"),q=this.haveInversionCenter?1:0,n.append("\n").append(this.name).append("\tCi\t  ").appendI(q).append("\t  ").appendI(q),
n.append("\n").append(this.name).append("\tCs\t"),JU.PT.rightJustify(n,"    ",this.nAxes[0]+"\t"),JU.PT.rightJustify(n,"    ",this.nAxes[0]+"\n"),n.append(this.name).append("\tCn\t"),JU.PT.rightJustify(n,"    ",p[1][0]+"\t"),JU.PT.rightJustify(n,"    ",p[1][1]+"\n"),n.append(this.name).append("\tSn\t"),JU.PT.rightJustify(n,"    ",p[2][0]+"\t"),JU.PT.rightJustify(n,"    ",p[2][1]+"\n"),n.append(this.name).append("\t\tTOTAL\t"),JU.PT.rightJustify(n,"    ",b+"\n"),this.textInfo=n.toString();this.info.put("name",
this.name);this.info.put("nAtoms",Integer.$valueOf(this.nAtoms));this.info.put("nTotal",Integer.$valueOf(b));this.info.put("nElements",Integer.$valueOf(e));this.info.put("nCi",Integer.$valueOf(this.haveInversionCenter?1:0));this.haveInversionCenter&&this.info.put("Ci_m",JU.M3.newM3(JS.PointGroup.mInv));this.info.put("nCs",Integer.$valueOf(this.nAxes[0]));this.info.put("nCn",Integer.$valueOf(p[1][0]));this.info.put("nSn",Integer.$valueOf(p[2][0]));this.info.put("distanceTolerance",Float.$valueOf(this.distanceTolerance));
this.info.put("linearTolerance",Float.$valueOf(this.linearTolerance));this.info.put("points",this.points);this.info.put("detail",n.toString().$replace("\n",";"));null!=this.principalAxis&&0<this.principalAxis.index&&this.info.put("principalAxis",this.principalAxis.normalOrAxis);null!=this.principalPlane&&0<this.principalPlane.index&&this.info.put("principalPlane",this.principalPlane.normalOrAxis);return this.info},"~N,~S,~B,~S,~N,~N");d(c$,"isDrawType",function(a,b,c){return null!=this.drawInfo&&
this.drawType.equals(null==a?"":a)&&this.drawIndex==b&&this.scale==c},"~S,~N,~N");c$.$PointGroup$Operation$=function(){ia(self.c$);c$=N(function(){ka(this,arguments);this.index=this.order=this.type=0;this.normalOrAxis=null;this.typeOrder=0;this.mat=null;F(this,arguments)},JS.PointGroup,"Operation");O(c$,function(){this.index=++this.b$["JS.PointGroup"].nOps;this.type=3;this.typeOrder=this.order=1;JU.Logger.debugging&&JU.Logger.debug("new operation -- "+JS.PointGroup.typeNames[this.type])});O(c$,function(a,
b){this.index=++this.b$["JS.PointGroup"].nOps;this.type=14>b?2:1;this.typeOrder=b;this.order=b%14;this.normalOrAxis=JU.Quat.newVA(a,180).getNormal();JU.Logger.debugging&&JU.Logger.debug("new operation -- "+(this.order==b?"S":"C")+this.order+" "+this.normalOrAxis)},"JU.V3,~N");O(c$,function(a){null!=a&&(this.index=++this.b$["JS.PointGroup"].nOps,this.type=0,this.normalOrAxis=JU.Quat.newVA(a,180).getNormal(),JU.Logger.debugging&&JU.Logger.debug("new operation -- plane "+this.normalOrAxis))},"JU.V3");
d(c$,"getLabel",function(){switch(this.type){case 0:return"Cs";case 2:return"S"+this.order;default:return"C"+this.order}});d(c$,"getM3",function(){if(null!=this.mat)return this.mat;var a=JU.M3.newM3(JS.PointGroup.getQuaternion(this.normalOrAxis,this.typeOrder).getMatrix());(0==this.type||2==this.type)&&a.mul(JS.PointGroup.mInv);this.cleanMatrix(a);return this.mat=a});d(c$,"cleanMatrix",function(a){for(var b=0;3>b;b++)for(var c=0;3>c;c++)a.setElement(b,c,this.approx0(a.getElement(b,c)))},"JU.M3");
d(c$,"approx0",function(a){return 1E-15<a||-1E-15>a?a:0},"~N");c$=ha()};T(c$,"axesMaxN",M(-1,[15,0,0,1,3,1,10,0,1,0,6,0,1,0,0,0,15,10,6,6,10,0,1]),"nUnique",M(-1,[1,0,0,2,2,4,2,0,4,0,4,0,4,0,0,0,1,2,2,4,2,0,4]),"s3",3,"s4",4,"s5",5,"s6",6,"s8",8,"s10",10,"s12",12,"firstProper",14,"c2",16,"c3",17,"c4",18,"c5",19,"c6",20,"c8",22);c$.maxAxis=c$.prototype.maxAxis=JS.PointGroup.axesMaxN.length;T(c$,"OPERATION_PLANE",0,"OPERATION_PROPER_AXIS",1,"OPERATION_IMPROPER_AXIS",2,"OPERATION_INVERSION_CENTER",3,
"typeNames",S(-1,["plane","proper axis","improper axis","center of inversion"]));c$.mInv=c$.prototype.mInv=JU.M3.newA9(H(-1,[-1,0,0,0,-1,0,0,0,-1]))});$("JS");V(["java.util.Hashtable"],"JS.SpaceGroup","java.util.Arrays JU.AU $.Lst $.M4 $.P3 $.PT $.SB JS.HallInfo $.HallTranslation $.SymmetryOperation JU.Logger".split(" "),function(){c$=N(function(){this.index=0;this.isSSG=!1;this.name="unknown!";this.hmSymbolAbbrShort=this.hmSymbolAlternative=this.hmSymbolAbbr=this.hmSymbolExt=this.hmSymbolFull=this.hmSymbol=
this.crystalClass=this.hallSymbol=null;this.axisChoice=this.uniqueAxis=this.ambiguityType="\x00";this.hallInfo=this.intlTableNumberExt=this.intlTableNumberFull=this.intlTableNumber=null;this.latticeParameter=0;this.finalOperations=this.operations=null;this.operationCount=0;this.latticeOp=-1;this.xyzList=null;this.modDim=0;this.doNormalize=!0;this.isBilbao=this.isBio=!1;this.latticeType="P";this.info=this.nHallOperators=null;F(this,arguments)},JS,"SpaceGroup");c$.getNull=d(c$,"getNull",function(a,
b,c){JS.SpaceGroup.getSpaceGroups();a=new JS.SpaceGroup(-1,null,a);a.doNormalize=b;c&&a.setFinalOperations();return a},"~B,~B,~B");O(c$,function(a,b,c){++JS.SpaceGroup.sgIndex;0>a&&(a=JS.SpaceGroup.sgIndex);this.index=a;this.init(c&&null==b);c&&null!=b&&this.buildSpaceGroup(b)},"~N,~S,~B");d(c$,"init",function(a){this.xyzList=new java.util.Hashtable;this.operationCount=0;a&&this.addSymmetry("x,y,z",0,!1)},"~B");c$.createSpaceGroup=d(c$,"createSpaceGroup",function(a,b,c,e){var h=null;0<=a?h=JS.SpaceGroup.getSpaceGroups()[a]:
(h=R(c,JU.Lst)?JS.SpaceGroup.createSGFromList(b,c):JS.SpaceGroup.determineSpaceGroupNA(b,c),null==h&&(h=JS.SpaceGroup.createSpaceGroupN(0>=e?b:"x1,x2,x3,x4,x5,x6,x7,x8,x9".substring(0,3*e+8))));null!=h&&h.generateAllOperators(null);return h},"~N,~S,~O,~N");c$.createSGFromList=d(c$,"createSGFromList",function(a,b){var c=new JS.SpaceGroup(-1,"0;0;--;--;--",!0);c.doNormalize=!1;c.name=a;for(var e=b.size(),h=0;h<e;h++){var f=b.get(h);if(R(f,JS.SymmetryOperation)){var d=c.addOp(f,f.xyz,!1);c.operations[d].setTimeReversal(f.timeReversal)}else c.addSymmetrySM("xyz matrix:"+
f,f)}e=c.getDerivedSpaceGroup();null!=e&&(c=e);return c},"~S,JU.Lst");d(c$,"addSymmetry",function(a,b,c){a=a.toLowerCase();return 0>a.indexOf("[[")&&0>a.indexOf("x4")&&0>a.indexOf(";")&&(0>a.indexOf("x")||0>a.indexOf("y")||0>a.indexOf("z"))?-1:this.addOperation(a,b,c)},"~S,~N,~B");d(c$,"setFinalOperations",function(){this.setFinalOperationsForAtoms(3,null,0,0,!1)});d(c$,"setFinalOperationsForAtoms",function(a,b,c,e,h){if(null==this.hallInfo&&0!=this.latticeParameter){var f=new JS.HallInfo(JS.HallTranslation.getHallLatticeEquivalent(this.latticeParameter));
this.generateAllOperators(f)}this.finalOperations=null;this.isBio=0<=this.name.indexOf("bio");this.index>=JS.SpaceGroup.getSpaceGroups().length&&(!this.isBio&&0>this.name.indexOf("SSG:")&&0>this.name.indexOf("[subsystem"))&&(f=this.getDerivedSpaceGroup(),null!=f&&(this.name=f.getName(),this.latticeType=f.latticeType,this.intlTableNumber=f.intlTableNumber));0==this.operationCount&&this.addOperation("x,y,z",1,!1);this.finalOperations=Array(this.operationCount);var f=null,d=h&&0<e&&null!=b;if(d){f=this.finalOperations[0]=
new JS.SymmetryOperation(this.operations[0],0,!0);null==f.sigma&&JS.SymmetryOperation.normalizeOperationToCentroid(a,f,b,c,e);var j=b[c],k=JU.P3.newP(j);f.rotTrans(k);if(1E-4<k.distance(j))for(var p=0;p<e;p++)j=b[c+p],k.setT(j),f.rotTrans(k),j.setT(k);h||(f=null)}for(p=0;p<this.operationCount;p++){if(0<p||null==f)f=this.finalOperations[p]=new JS.SymmetryOperation(this.operations[p],0,h);d&&null==f.sigma&&JS.SymmetryOperation.normalizeOperationToCentroid(a,f,b,c,e);f.getCentering()}},"~N,~A,~N,~N,~B");
d(c$,"getOperationCount",function(){null==this.finalOperations&&this.setFinalOperations();return this.finalOperations.length});d(c$,"getOperation",function(a){return this.finalOperations[a]},"~N");d(c$,"getXyz",function(a,b){return null==this.finalOperations?this.operations[a].getXyz(b):this.finalOperations[a].getXyz(b)},"~N,~B");c$.getInfo=d(c$,"getInfo",function(a,b,c,e,h){try{if(null!=a&&a.index>=JS.SpaceGroup.SG.length){var f=JS.SpaceGroup.findSpaceGroup(a.operationCount,a.getCanonicalSeitzList());
null!=f&&(a=f)}if(null!=c){if(null==a){0<=b.indexOf("[")&&(b=b.substring(0,b.indexOf("[")).trim());if(b.equals("unspecified!"))return"no space group identified in file";a=JS.SpaceGroup.determineSpaceGroupNA(b,c)}}else{if(b.equalsIgnoreCase("ALL"))return JS.SpaceGroup.dumpAll(e);if(b.equalsIgnoreCase("MAP"))return JS.SpaceGroup.dumpAll(!0);if(b.equalsIgnoreCase("ALLSEITZ"))return JS.SpaceGroup.dumpAllSeitz();a=JS.SpaceGroup.determineSpaceGroupN(b)}if(null==a){var d=JS.SpaceGroup.createSpaceGroupN(b),
d=JS.SpaceGroup.findSpaceGroup(d.operationCount,d.getCanonicalSeitzList());null!=d&&(a=d)}if(null!=a){if(e)return a.dumpInfoObj();for(var j=new JU.SB;null!=a;){j.append(a.dumpInfo());if(a.index>=JS.SpaceGroup.SG.length||!h)break;a=JS.SpaceGroup.determineSpaceGroupNS(b,a)}return j.toString()}return e?null:"?"}catch(k){if(U(k,Exception))return"?";throw k;}},"JS.SpaceGroup,~S,~A,~B,~B");d(c$,"dumpInfo",function(){var a=this.dumpCanonicalSeitzList();if(R(a,JS.SpaceGroup))return a.dumpInfo();var b=(new JU.SB).append("\nHermann-Mauguin symbol: ");
null==this.hmSymbol||null==this.hmSymbolExt?b.append("?"):b.append(this.hmSymbol).append(0<this.hmSymbolExt.length?":"+this.hmSymbolExt:"");null!=this.intlTableNumber&&b.append("\ninternational table number: ").append(this.intlTableNumber).append(0<this.intlTableNumberExt.length?":"+this.intlTableNumberExt:"").append("\ncrystal class: "+this.crystalClass).append("\n\n").appendI(this.operationCount).append(" operators").append(null!=this.hallInfo&&!this.hallInfo.hallSymbol.equals("--")?" from Hall symbol "+
this.hallInfo.hallSymbol+"  #"+this.intlTableNumberFull:"").append(": ");for(var c=0;c<this.operationCount;c++)b.append("\n").append(this.operations[c].xyz);b.append("\n\n").append(null==this.hallInfo?"Hall symbol unknown":this.hallInfo.dumpInfo());b.append("\n\ncanonical Seitz: ").append(a).append("\n----------------------------------------------------\n");return b.toString()});d(c$,"dumpInfoObj",function(){var a=this.dumpCanonicalSeitzList();if(R(a,JS.SpaceGroup))return a.dumpInfoObj();a=new java.util.Hashtable;
a.put("HermannMauguinSymbol",null==this.hmSymbol||null==this.hmSymbolExt?"?":this.hmSymbol+(0<this.hmSymbolExt.length?":"+this.hmSymbolExt:""));null!=this.intlTableNumber&&(a.put("ita",Integer.$valueOf(JU.PT.parseInt(this.intlTableNumber))),a.put("itaFull",this.intlTableNumberFull),a.put("crystalClass",this.crystalClass),a.put("operationCount",Integer.$valueOf(this.operationCount)));for(var b=new JU.Lst,c=0;c<this.operationCount;c++)b.addLast(this.operations[c].xyz);a.put("operationsXYZ",b);a.put("HallSymbol",
null==this.hallInfo?"?":this.hallInfo.hallSymbol);return a});d(c$,"getName",function(){return this.name});d(c$,"getLatticeDesignation",function(){return JS.HallTranslation.getLatticeDesignation(this.latticeParameter)});d(c$,"setLatticeParam",function(a){this.latticeParameter=a;10<a&&(this.latticeParameter=-JS.HallTranslation.getLatticeIndex(JS.HallTranslation.getLatticeCode(a)))},"~N");d(c$,"dumpCanonicalSeitzList",function(){null!=this.nHallOperators&&(null==this.hallInfo&&(this.hallInfo=new JS.HallInfo(this.hallSymbol)),
this.generateAllOperators(null));var a=this.getCanonicalSeitzList();if(this.index>=JS.SpaceGroup.SG.length){var b=JS.SpaceGroup.findSpaceGroup(this.operationCount,a);if(null!=b)return b.getCanonicalSeitzList()}return(0<=this.index&&this.index<JS.SpaceGroup.SG.length?this.hallSymbol+" = ":"")+a});d(c$,"getDerivedSpaceGroup",function(){if(0<=this.index&&this.index<JS.SpaceGroup.SG.length||0<this.modDim||null==this.operations||0==this.operations.length||0!=this.operations[0].timeReversal)return this;
null!=this.finalOperations&&this.setFinalOperations();var a=this.getCanonicalSeitzList();return null==a?null:JS.SpaceGroup.findSpaceGroup(this.operationCount,a)});d(c$,"getCanonicalSeitzList",function(){for(var a=Array(this.operationCount),b=0;b<this.operationCount;b++)a[b]=JS.SymmetryOperation.dumpSeitz(this.operations[b],!0);java.util.Arrays.sort(a,0,this.operationCount);for(var c=(new JU.SB).append("\n["),b=0;b<this.operationCount;b++)c.append(a[b].$replace("\t"," ").$replace("\n"," ")).append("; ");
c.append("]");return c.toString()});c$.findSpaceGroup=d(c$,"findSpaceGroup",function(a,b){JS.SpaceGroup.getSpaceGroups();var c=JS.SpaceGroup.htByOpCount.get(Integer.$valueOf(a));if(null!=c)for(var e=0,h=c.size();e<h;e++){var f=c.get(e);if(0<=JS.SpaceGroup.getCanonicalSeitz(f.index).indexOf(b))return JS.SpaceGroup.SG[f.index]}return null},"~N,~S");c$.dumpAll=d(c$,"dumpAll",function(a){JS.SpaceGroup.getSpaceGroups();if(a){var b=new JU.Lst;for(a=0;a<JS.SpaceGroup.SG.length;a++)b.addLast(JS.SpaceGroup.SG[a].dumpInfoObj());
return b}b=new JU.SB;for(a=0;a<JS.SpaceGroup.SG.length;a++)b.append("\n----------------------\n"+JS.SpaceGroup.SG[a].dumpInfo());return b.toString()},"~B");c$.dumpAllSeitz=d(c$,"dumpAllSeitz",function(){JS.SpaceGroup.getSpaceGroups();for(var a=new JU.SB,b=0;b<JS.SpaceGroup.SG.length;b++)a.append("\n").appendO(JS.SpaceGroup.getCanonicalSeitz(b));return a.toString()});c$.getCanonicalSeitz=d(c$,"getCanonicalSeitz",function(a){null==JS.SpaceGroup.canonicalSeitzList&&(JS.SpaceGroup.canonicalSeitzList=
Array(JS.SpaceGroup.SG.length));var b=JS.SpaceGroup.canonicalSeitzList[a];return null==b?JS.SpaceGroup.canonicalSeitzList[a]=JS.SpaceGroup.SG[a].dumpCanonicalSeitzList().toString():b},"~N");d(c$,"setLattice",function(a,b){this.latticeParameter=JS.HallTranslation.getLatticeIndex(a);b||(this.latticeParameter=-this.latticeParameter)},"~S,~B");c$.createSpaceGroupN=d(c$,"createSpaceGroupN",function(a){JS.SpaceGroup.getSpaceGroups();a=a.trim();var b=JS.SpaceGroup.determineSpaceGroupN(a),c;null==b&&(c=new JS.HallInfo(a),
0<c.nRotations?(b=new JS.SpaceGroup(-1,"0;0;--;--;"+a,!0),b.hallInfo=c):0<=a.indexOf(",")&&(b=new JS.SpaceGroup(-1,"0;0;--;--;--",!0),b.doNormalize=!1,b.generateOperatorsFromXyzInfo(a)));null!=b&&b.generateAllOperators(null);return b},"~S");d(c$,"addOperation",function(a,b,c){if(null==a||3>a.length)return this.init(!1),-1;a=JU.PT.rep(a," ","");var e="="==a.charAt(0);e&&(a=a.substring(1));var h=this.checkXYZlist(a);if(0<=h)return h;if(a.startsWith("x1,x2,x3,x4")&&0==this.modDim)this.xyzList.clear(),
this.operationCount=0,this.modDim=JU.PT.parseInt(a.substring(a.lastIndexOf("x")+1))-3;else if(0<=a.indexOf("m")&&(a=JU.PT.rep(a,"+m","m"),a.equals("x,y,z,m")||a.equals("x,y,z(mx,my,mz)")))this.xyzList.clear(),this.operationCount=0;b=new JS.SymmetryOperation(null,b,this.doNormalize);return!b.setMatrixFromXYZ(a,this.modDim,c)?(JU.Logger.error("couldn't interpret symmetry operation: "+a),-1):this.addOp(b,a,e)},"~S,~N,~B");d(c$,"checkXYZlist",function(a){return this.xyzList.containsKey(a)?this.xyzList.get(a).intValue():
-1},"~S");d(c$,"addOp",function(a,b,c){var e=a.xyz;if(!c){c=this.checkXYZlist(e);if(0<=c)return c;0>this.latticeOp&&(c=JU.PT.replaceAllCharacters(0<this.modDim?JS.SymmetryOperation.replaceXn(e,this.modDim+3):e,"+123/",""),this.xyzList.containsKey(c+"!")?this.latticeOp=this.operationCount:this.xyzList.put(c+"!",Integer.$valueOf(this.operationCount)));this.xyzList.put(e,Integer.$valueOf(this.operationCount))}e.equals(b)||this.xyzList.put(b,Integer.$valueOf(this.operationCount));null==this.operations&&
(this.operations=Array(4));this.operationCount==this.operations.length&&(this.operations=JU.AU.arrayCopyObject(this.operations,2*this.operationCount));this.operations[this.operationCount++]=a;a.number=this.operationCount;0!=a.timeReversal&&(this.operations[0].timeReversal=1);JU.Logger.debugging&&JU.Logger.debug("\naddOperation "+this.operationCount+a.dumpInfo());return this.operationCount-1},"JS.SymmetryOperation,~S,~B");d(c$,"generateOperatorsFromXyzInfo",function(a){this.init(!0);a=JU.PT.split(a.toLowerCase(),
";");for(var b=0;b<a.length;b++)this.addSymmetry(a[b],0,!1)},"~S");d(c$,"generateAllOperators",function(a){if(null==a){if(0<this.operationCount)return;a=this.hallInfo;this.operations=Array(4);if(null==this.hallInfo||0==this.hallInfo.nRotations)a=this.hallInfo=new JS.HallInfo(this.hallSymbol);this.setLattice(this.hallInfo.latticeCode,this.hallInfo.isCentrosymmetric);this.init(!0)}switch(a.latticeCode){case "\x00":case "S":case "T":case "P":this.latticeType="P";break;default:this.latticeType=a.latticeCode}for(var b=
new JU.M4,c=new JU.M4,e=Array(7),h=0;7>h;h++)e[h]=new JU.M4;this.operationCount=1;for(h=0;h<a.nRotations;h++){var f=a.rotationTerms[h];b.setM4(f.seitzMatrix12ths);f=f.order;e[0].setIdentity();for(var d=this.operationCount,j=1;j<=f;j++){var k=e[j];k.mul2(b,e[0]);e[0].setM4(k);for(var p=0;p<d;p++){c.mul2(k,this.operations[p]);c.m03=(v(c.m03)+12)%12;c.m13=(v(c.m13)+12)%12;c.m23=(v(c.m23)+12)%12;var m=JS.SymmetryOperation.getXYZFromMatrix(c,!0,!0,!0);this.addSymmetrySM(m,c)}}}null!=this.nHallOperators&&
this.operationCount!=this.nHallOperators.intValue()&&JU.Logger.error("Operator mismatch "+this.operationCount+" for "+this)},"JS.HallInfo");d(c$,"addSymmetrySM",function(a,b){var c=this.addOperation(a,0,!1);0<=c&&this.operations[c].setM4(b);return c},"~S,JU.M4");c$.determineSpaceGroupN=d(c$,"determineSpaceGroupN",function(a){return JS.SpaceGroup.determineSpaceGroup(a,0,0,0,0,0,0,-1)},"~S");c$.determineSpaceGroupNS=d(c$,"determineSpaceGroupNS",function(a,b){return JS.SpaceGroup.determineSpaceGroup(a,
0,0,0,0,0,0,b.index)},"~S,JS.SpaceGroup");c$.determineSpaceGroupNA=d(c$,"determineSpaceGroupNA",function(a,b){return null==b?JS.SpaceGroup.determineSpaceGroup(a,0,0,0,0,0,0,-1):JS.SpaceGroup.determineSpaceGroup(a,b[0],b[1],b[2],b[3],b[4],b[5],-1)},"~S,~A");c$.determineSpaceGroup=d(c$,"determineSpaceGroup",function(a,b,c,e,h,f,d,j){a=JS.SpaceGroup.determineSpaceGroupIndex(a,b,c,e,h,f,d,j);return 0<=a?JS.SpaceGroup.SG[a]:null},"~S,~N,~N,~N,~N,~N,~N,~N");c$.determineSpaceGroupIndex=d(c$,"determineSpaceGroupIndex",
function(a,b,c,e,h,f,d,j){JS.SpaceGroup.getSpaceGroups();0>j&&(j=JS.SpaceGroup.SG.length);a=a.trim().toLowerCase();var k=!1;a.startsWith("bilbao:")&&(k=!0,a=a.substring(7));var p=a.indexOf("hall:");0<p&&(a=a.substring(p));var m=a.startsWith("hall:")?5:a.startsWith("hm:")?3:0;switch(m){case 3:case 5:a=a.substring(m);break;case 0:a.contains("[")&&(m=5,a=a.substring(0,a.indexOf("[")).trim())}var p=a,q,n=!1;a=a.$replace("_"," ");2<=a.length&&(q=0==a.indexOf("-")?2:1,q<a.length&&" "!=a.charAt(q)&&(a=a.substring(0,
q)+" "+a.substring(q)),a=JS.SpaceGroup.toCap(a,2));var l="";if(0<(q=a.indexOf(":")))l=a.substring(q+1),a=a.substring(0,q).trim(),n=!0;5!=m&&(!n&&JU.PT.isOneOf(a,JS.SpaceGroup.ambiguousNames))&&(l="?",n=!0);var u=JU.PT.replaceAllCharacters(a," ()",""),r;if(3!=m&&!n)for(q=j;0<=--q;)if(JS.SpaceGroup.SG[q].hallSymbol.equalsIgnoreCase(a))return q;if(5!=m){if(3!=m)for(q=j;0<=--q;)if(JS.SpaceGroup.SG[q].intlTableNumberFull.equalsIgnoreCase(p))return q;for(q=j;0<=--q;)if(JS.SpaceGroup.SG[q].hmSymbolFull.equalsIgnoreCase(p))return q;
for(q=j;0<=--q;)if(null!=(r=JS.SpaceGroup.SG[q]).hmSymbolAlternative&&r.hmSymbolAlternative.equalsIgnoreCase(p))return q;if(n){for(q=j;0<=--q;)if((r=JS.SpaceGroup.SG[q]).hmSymbolAbbr.equalsIgnoreCase(u)&&r.intlTableNumberExt.equalsIgnoreCase(l))return q;for(q=j;0<=--q;)if((r=JS.SpaceGroup.SG[q]).hmSymbolAbbrShort.equalsIgnoreCase(u)&&r.intlTableNumberExt.equalsIgnoreCase(l))return q}a=JS.SpaceGroup.determineUniqueAxis(b,c,e,h,f,d);if(!n||"?"==l.charAt(0))for(q=0;q<j;q++)if(((r=JS.SpaceGroup.SG[q]).hmSymbolAbbr.equalsIgnoreCase(u)||
r.hmSymbolAbbrShort.equalsIgnoreCase(u)||r.intlTableNumber.equals(u))&&(!k||r.isBilbao))switch(r.ambiguityType){case "\x00":return q;case "a":if(r.uniqueAxis==a||"\x00"==a)return q;break;case "o":if(0==l.length){if(r.hmSymbolExt.equals("2"))return q}else if(r.hmSymbolExt.equalsIgnoreCase(l))return q;break;case "t":if(0==l.length){if("h"==r.axisChoice)return q}else if((r.axisChoice+"").equalsIgnoreCase(l))return q}}if(0==l.length)for(q=0;q<j;q++)if((r=JS.SpaceGroup.SG[q]).intlTableNumber.equals(p)&&
(!k||r.isBilbao))return q;return-1},"~S,~N,~N,~N,~N,~N,~N,~N");c$.determineUniqueAxis=d(c$,"determineUniqueAxis",function(a,b,c,e,h,f){return a==b?b==c?"\x00":"c":b==c?"a":c==a?"b":e==h?h==f?"\x00":"c":h==f?"a":f==e?"b":"\x00"},"~N,~N,~N,~N,~N,~N");d(c$,"buildSpaceGroup",function(a){a=JU.PT.split(a.toLowerCase(),";");this.intlTableNumberFull=a[0].trim();this.isBilbao=6>a.length&&!this.intlTableNumberFull.equals("0");var b=JU.PT.split(this.intlTableNumberFull,":");this.intlTableNumber=b[0];this.intlTableNumberExt=
1==b.length?"":b[1];this.ambiguityType="\x00";0<this.intlTableNumberExt.length&&(this.intlTableNumberExt.equals("h")||this.intlTableNumberExt.equals("r")?(this.ambiguityType="t",this.axisChoice=this.intlTableNumberExt.charAt(0)):this.intlTableNumberExt.startsWith("1")||this.intlTableNumberExt.startsWith("2")?this.ambiguityType="o":2>=this.intlTableNumberExt.length?(this.ambiguityType="a",this.uniqueAxis=this.intlTableNumberExt.charAt(0)):this.intlTableNumberExt.contains("-")&&(this.ambiguityType=
"-"));a[1].equals("0")||(this.nHallOperators=Integer.$valueOf(a[1]),b=JS.SpaceGroup.htByOpCount.get(this.nHallOperators),null==b&&JS.SpaceGroup.htByOpCount.put(this.nHallOperators,b=new JU.Lst),b.addLast(this));this.crystalClass=JS.SpaceGroup.toCap(JU.PT.split(a[2],"^")[0],1);this.setHMSymbol(a[3]);this.hallSymbol=a[4];1<this.hallSymbol.length&&(this.hallSymbol=JS.SpaceGroup.toCap(this.hallSymbol,2));a=this.intlTableNumber+this.hallSymbol;"0"!=this.intlTableNumber.charAt(0)&&JS.SpaceGroup.lastInfo.equals(a)&&
(JS.SpaceGroup.ambiguousNames+=this.hmSymbol+";");JS.SpaceGroup.lastInfo=a;this.name=this.hallSymbol+" ["+this.hmSymbolFull+"] #"+this.intlTableNumber},"~S");d(c$,"setHMSymbol",function(a){this.hmSymbolFull=JS.SpaceGroup.toCap(a,1);this.latticeType=this.hmSymbolFull.charAt(0);a=JU.PT.split(this.hmSymbolFull,":");this.hmSymbol=a[0];this.hmSymbolExt=1==a.length?"":a[1];a=this.hmSymbol.indexOf(" -3");1<=a&&0<="admn".indexOf(this.hmSymbol.charAt(a-1))&&(this.hmSymbolAlternative=(this.hmSymbol.substring(0,
a)+" 3"+this.hmSymbol.substring(a+3)).toLowerCase());this.hmSymbolAbbr=JU.PT.rep(this.hmSymbol," ","");this.hmSymbolAbbrShort=JU.PT.rep(this.hmSymbol," 1","");this.hmSymbolAbbrShort=JU.PT.rep(this.hmSymbolAbbrShort," ","")},"~S");c$.toCap=d(c$,"toCap",function(a,b){return a.substring(0,b).toUpperCase()+a.substring(b)},"~S,~N");d(c$,"toString",function(){return this.asString()});d(c$,"asString",function(){return""+this.intlTableNumberFull+" HM:"+this.hmSymbolFull+" Hall:"+this.hallSymbol});c$.getSpaceGroups=
d(c$,"getSpaceGroups",function(){return null==JS.SpaceGroup.SG?JS.SpaceGroup.SG=JS.SpaceGroup.createSpaceGroups():JS.SpaceGroup.SG});c$.createSpaceGroups=d(c$,"createSpaceGroups",function(){var a=JS.SpaceGroup.STR_SG.length;JS.SpaceGroup.nameToGroup=new java.util.Hashtable;for(var b=Array(a),c=0;c<a;c++)b[c]=new JS.SpaceGroup(c,JS.SpaceGroup.STR_SG[c],!0),JS.SpaceGroup.nameToGroup.put(b[c].intlTableNumberFull,b[c]);JS.SpaceGroup.STR_SG=null;return b});d(c$,"addLatticeVectors",function(a){if(0<=this.latticeOp||
0==a.size())return!1;for(var b=this.latticeOp=this.operationCount,c=a.get(0).length==this.modDim+4,e=-2,h=0;h<a.size();h++){var f=a.get(h);c&&(e=v(f[this.modDim+3]),f=JU.AU.arrayCopyF(f,this.modDim+3));if(f.length>this.modDim+3)return!1;for(var d=0;d<b;d++){var j=new JS.SymmetryOperation(null,0,!0);j.modDim=this.modDim;var k=this.operations[d];j.divisor=k.divisor;j.linearRotTrans=JU.AU.arrayCopyF(k.linearRotTrans,-1);j.setFromMatrix(f,!1);-2!=e&&j.setTimeReversal(k.timeReversal*e);j.xyzOriginal=j.xyz;
this.addOp(j,j.xyz,!0)}}return!0},"JU.Lst");d(c$,"getSiteMultiplicity",function(a,b){for(var c=this.finalOperations.length,e=new JU.Lst,h=c;0<=--h;){var f=JU.P3.newP(a);this.finalOperations[h].rotTrans(f);b.unitize(f);for(var d=e.size();0<=--d;){var j=e.get(d);if(1E-6>f.distanceSquared(j)){f=null;break}}null!=f&&e.addLast(f)}return L(c/e.size())},"JU.P3,JS.UnitCell");d(c$,"setName",function(a){this.name=a;null!=a&&a.startsWith("HM:")&&this.setHMSymbol(a.substring(3))},"~S");d(c$,"getNameType",function(a,
b){var c=null,c=a.equals("HM")?this.hmSymbol:a.equals("ITA")?this.intlTableNumber:a.equals("Hall")?this.hallSymbol:"?";if(null!=c)return c;null==this.info&&(this.info=JS.SpaceGroup.getInfo(this,this.hmSymbol,b.getUnitCellParams(),!0,!1));if(R(this.info,String))return null;c=this.info.get(a.equals("Hall")?"HallSymbol":a.equals("ITA")?"ita":"HermannMauguinSymbol");return null==c?null:c.toString()},"~S,J.api.SymmetryInterface");c$.getSpaceGroupFromITAName=d(c$,"getSpaceGroupFromITAName",function(a){JS.SpaceGroup.getSpaceGroups();
for(var b=JS.SpaceGroup.SG.length,c=0;c<b;c++)if(a.equals(JS.SpaceGroup.SG[c].intlTableNumberFull))return JS.SpaceGroup.SG[c];for(c=0;c<b;c++)if(a.equals(JS.SpaceGroup.SG[c].intlTableNumber))return JS.SpaceGroup.SG[c];return null},"~S");d(c$,"checkHallOperators",function(){null!=this.nHallOperators&&this.nHallOperators.intValue()!=this.operationCount&&this.generateAllOperators(this.hallInfo)});T(c$,"canonicalSeitzList",null,"NAME_UNK",0,"NAME_HM",3,"NAME_HALL",5,"sgIndex",-1,"ambiguousNames","","lastInfo",
"","SG",null);c$.htByOpCount=c$.prototype.htByOpCount=new java.util.Hashtable;T(c$,"nameToGroup",null,"STR_SG",S(-1,'1;1;c1^1;p 1;p 1,2;2;ci^1;p -1;-p 1,3:b;2;c2^1;p 1 2 1;p 2y,3:b;2;c2^1;p 2;p 2y,3:c;2;c2^1;p 1 1 2;p 2,3:a;2;c2^1;p 2 1 1;p 2x,4:b;2;c2^2;p 1 21 1;p 2yb,4:b;2;c2^2;p 21;p 2yb,4:b*;2;c2^2;p 1 21 1*;p 2y1,4:c;2;c2^2;p 1 1 21;p 2c,4:c*;2;c2^2;p 1 1 21*;p 21,4:a;2;c2^2;p 21 1 1;p 2xa,4:a*;2;c2^2;p 21 1 1*;p 2x1,5:b1;4;c2^3;c 1 2 1;c 2y,5:b1;4;c2^3;c 2;c 2y,5:b2;4;c2^3;a 1 2 1;a 2y,5:b3;4;c2^3;i 1 2 1;i 2y,5:c1;4;c2^3;a 1 1 2;a 2,5:c2;4;c2^3;b 1 1 2;b 2,5:c3;4;c2^3;i 1 1 2;i 2,5:a1;4;c2^3;b 2 1 1;b 2x,5:a2;4;c2^3;c 2 1 1;c 2x,5:a3;4;c2^3;i 2 1 1;i 2x,6:b;2;cs^1;p 1 m 1;p -2y,6:b;2;cs^1;p m;p -2y,6:c;2;cs^1;p 1 1 m;p -2,6:a;2;cs^1;p m 1 1;p -2x,7:b1;2;cs^2;p 1 c 1;p -2yc,7:b1;2;cs^2;p c;p -2yc,7:b2;2;cs^2;p 1 n 1;p -2yac,7:b2;2;cs^2;p n;p -2yac,7:b3;2;cs^2;p 1 a 1;p -2ya,7:b3;2;cs^2;p a;p -2ya,7:c1;2;cs^2;p 1 1 a;p -2a,7:c2;2;cs^2;p 1 1 n;p -2ab,7:c3;2;cs^2;p 1 1 b;p -2b,7:a1;2;cs^2;p b 1 1;p -2xb,7:a2;2;cs^2;p n 1 1;p -2xbc,7:a3;2;cs^2;p c 1 1;p -2xc,8:b1;4;cs^3;c 1 m 1;c -2y,8:b1;4;cs^3;c m;c -2y,8:b2;4;cs^3;a 1 m 1;a -2y,8:b3;4;cs^3;i 1 m 1;i -2y,8:b3;4;cs^3;i m;i -2y,8:c1;4;cs^3;a 1 1 m;a -2,8:c2;4;cs^3;b 1 1 m;b -2,8:c3;4;cs^3;i 1 1 m;i -2,8:a1;4;cs^3;b m 1 1;b -2x,8:a2;4;cs^3;c m 1 1;c -2x,8:a3;4;cs^3;i m 1 1;i -2x,9:b1;4;cs^4;c 1 c 1;c -2yc,9:b1;4;cs^4;c c;c -2yc,9:b2;4;cs^4;a 1 n 1;a -2yab,9:b3;4;cs^4;i 1 a 1;i -2ya,9:-b1;4;cs^4;a 1 a 1;a -2ya,9:-b2;4;cs^4;c 1 n 1;c -2yac,9:-b3;4;cs^4;i 1 c 1;i -2yc,9:c1;4;cs^4;a 1 1 a;a -2a,9:c2;4;cs^4;b 1 1 n;b -2ab,9:c3;4;cs^4;i 1 1 b;i -2b,9:-c1;4;cs^4;b 1 1 b;b -2b,9:-c2;4;cs^4;a 1 1 n;a -2ab,9:-c3;4;cs^4;i 1 1 a;i -2a,9:a1;4;cs^4;b b 1 1;b -2xb,9:a2;4;cs^4;c n 1 1;c -2xac,9:a3;4;cs^4;i c 1 1;i -2xc,9:-a1;4;cs^4;c c 1 1;c -2xc,9:-a2;4;cs^4;b n 1 1;b -2xab,9:-a3;4;cs^4;i b 1 1;i -2xb,10:b;4;c2h^1;p 1 2/m 1;-p 2y,10:b;4;c2h^1;p 2/m;-p 2y,10:c;4;c2h^1;p 1 1 2/m;-p 2,10:a;4;c2h^1;p 2/m 1 1;-p 2x,11:b;4;c2h^2;p 1 21/m 1;-p 2yb,11:b;4;c2h^2;p 21/m;-p 2yb,11:b*;4;c2h^2;p 1 21/m 1*;-p 2y1,11:c;4;c2h^2;p 1 1 21/m;-p 2c,11:c*;4;c2h^2;p 1 1 21/m*;-p 21,11:a;4;c2h^2;p 21/m 1 1;-p 2xa,11:a*;4;c2h^2;p 21/m 1 1*;-p 2x1,12:b1;8;c2h^3;c 1 2/m 1;-c 2y,12:b1;8;c2h^3;c 2/m;-c 2y,12:b2;8;c2h^3;a 1 2/m 1;-a 2y,12:b3;8;c2h^3;i 1 2/m 1;-i 2y,12:b3;8;c2h^3;i 2/m;-i 2y,12:c1;8;c2h^3;a 1 1 2/m;-a 2,12:c2;8;c2h^3;b 1 1 2/m;-b 2,12:c3;8;c2h^3;i 1 1 2/m;-i 2,12:a1;8;c2h^3;b 2/m 1 1;-b 2x,12:a2;8;c2h^3;c 2/m 1 1;-c 2x,12:a3;8;c2h^3;i 2/m 1 1;-i 2x,13:b1;4;c2h^4;p 1 2/c 1;-p 2yc,13:b1;4;c2h^4;p 2/c;-p 2yc,13:b2;4;c2h^4;p 1 2/n 1;-p 2yac,13:b2;4;c2h^4;p 2/n;-p 2yac,13:b3;4;c2h^4;p 1 2/a 1;-p 2ya,13:b3;4;c2h^4;p 2/a;-p 2ya,13:c1;4;c2h^4;p 1 1 2/a;-p 2a,13:c2;4;c2h^4;p 1 1 2/n;-p 2ab,13:c3;4;c2h^4;p 1 1 2/b;-p 2b,13:a1;4;c2h^4;p 2/b 1 1;-p 2xb,13:a2;4;c2h^4;p 2/n 1 1;-p 2xbc,13:a3;4;c2h^4;p 2/c 1 1;-p 2xc,14:b1;4;c2h^5;p 1 21/c 1;-p 2ybc,14:b1;4;c2h^5;p 21/c;-p 2ybc,14:b2;4;c2h^5;p 1 21/n 1;-p 2yn,14:b2;4;c2h^5;p 21/n;-p 2yn,14:b3;4;c2h^5;p 1 21/a 1;-p 2yab,14:b3;4;c2h^5;p 21/a;-p 2yab,14:c1;4;c2h^5;p 1 1 21/a;-p 2ac,14:c2;4;c2h^5;p 1 1 21/n;-p 2n,14:c3;4;c2h^5;p 1 1 21/b;-p 2bc,14:a1;4;c2h^5;p 21/b 1 1;-p 2xab,14:a2;4;c2h^5;p 21/n 1 1;-p 2xn,14:a3;4;c2h^5;p 21/c 1 1;-p 2xac,15:b1;8;c2h^6;c 1 2/c 1;-c 2yc,15:b1;8;c2h^6;c 2/c;-c 2yc,15:b2;8;c2h^6;a 1 2/n 1;-a 2yab,15:b3;8;c2h^6;i 1 2/a 1;-i 2ya,15:b3;8;c2h^6;i 2/a;-i 2ya,15:-b1;8;c2h^6;a 1 2/a 1;-a 2ya,15:-b2;8;c2h^6;c 1 2/n 1;-c 2yac,15:-b2;8;c2h^6;c 2/n;-c 2yac,15:-b3;8;c2h^6;i 1 2/c 1;-i 2yc,15:-b3;8;c2h^6;i 2/c;-i 2yc,15:c1;8;c2h^6;a 1 1 2/a;-a 2a,15:c2;8;c2h^6;b 1 1 2/n;-b 2ab,15:c3;8;c2h^6;i 1 1 2/b;-i 2b,15:-c1;8;c2h^6;b 1 1 2/b;-b 2b,15:-c2;8;c2h^6;a 1 1 2/n;-a 2ab,15:-c3;8;c2h^6;i 1 1 2/a;-i 2a,15:a1;8;c2h^6;b 2/b 1 1;-b 2xb,15:a2;8;c2h^6;c 2/n 1 1;-c 2xac,15:a3;8;c2h^6;i 2/c 1 1;-i 2xc,15:-a1;8;c2h^6;c 2/c 1 1;-c 2xc,15:-a2;8;c2h^6;b 2/n 1 1;-b 2xab,15:-a3;8;c2h^6;i 2/b 1 1;-i 2xb,16;4;d2^1;p 2 2 2;p 2 2,17;4;d2^2;p 2 2 21;p 2c 2,17*;4;d2^2;p 2 2 21*;p 21 2,17:cab;4;d2^2;p 21 2 2;p 2a 2a,17:bca;4;d2^2;p 2 21 2;p 2 2b,18;4;d2^3;p 21 21 2;p 2 2ab,18:cab;4;d2^3;p 2 21 21;p 2bc 2,18:bca;4;d2^3;p 21 2 21;p 2ac 2ac,19;4;d2^4;p 21 21 21;p 2ac 2ab,20;8;d2^5;c 2 2 21;c 2c 2,20*;8;d2^5;c 2 2 21*;c 21 2,20:cab;8;d2^5;a 21 2 2;a 2a 2a,20:cab*;8;d2^5;a 21 2 2*;a 2a 21,20:bca;8;d2^5;b 2 21 2;b 2 2b,21;8;d2^6;c 2 2 2;c 2 2,21:cab;8;d2^6;a 2 2 2;a 2 2,21:bca;8;d2^6;b 2 2 2;b 2 2,22;16;d2^7;f 2 2 2;f 2 2,23;8;d2^8;i 2 2 2;i 2 2,24;8;d2^9;i 21 21 21;i 2b 2c,25;4;c2v^1;p m m 2;p 2 -2,25:cab;4;c2v^1;p 2 m m;p -2 2,25:bca;4;c2v^1;p m 2 m;p -2 -2,26;4;c2v^2;p m c 21;p 2c -2,26*;4;c2v^2;p m c 21*;p 21 -2,26:ba-c;4;c2v^2;p c m 21;p 2c -2c,26:ba-c*;4;c2v^2;p c m 21*;p 21 -2c,26:cab;4;c2v^2;p 21 m a;p -2a 2a,26:-cba;4;c2v^2;p 21 a m;p -2 2a,26:bca;4;c2v^2;p b 21 m;p -2 -2b,26:a-cb;4;c2v^2;p m 21 b;p -2b -2,27;4;c2v^3;p c c 2;p 2 -2c,27:cab;4;c2v^3;p 2 a a;p -2a 2,27:bca;4;c2v^3;p b 2 b;p -2b -2b,28;4;c2v^4;p m a 2;p 2 -2a,28*;4;c2v^4;p m a 2*;p 2 -21,28:ba-c;4;c2v^4;p b m 2;p 2 -2b,28:cab;4;c2v^4;p 2 m b;p -2b 2,28:-cba;4;c2v^4;p 2 c m;p -2c 2,28:-cba*;4;c2v^4;p 2 c m*;p -21 2,28:bca;4;c2v^4;p c 2 m;p -2c -2c,28:a-cb;4;c2v^4;p m 2 a;p -2a -2a,29;4;c2v^5;p c a 21;p 2c -2ac,29:ba-c;4;c2v^5;p b c 21;p 2c -2b,29:cab;4;c2v^5;p 21 a b;p -2b 2a,29:-cba;4;c2v^5;p 21 c a;p -2ac 2a,29:bca;4;c2v^5;p c 21 b;p -2bc -2c,29:a-cb;4;c2v^5;p b 21 a;p -2a -2ab,30;4;c2v^6;p n c 2;p 2 -2bc,30:ba-c;4;c2v^6;p c n 2;p 2 -2ac,30:cab;4;c2v^6;p 2 n a;p -2ac 2,30:-cba;4;c2v^6;p 2 a n;p -2ab 2,30:bca;4;c2v^6;p b 2 n;p -2ab -2ab,30:a-cb;4;c2v^6;p n 2 b;p -2bc -2bc,31;4;c2v^7;p m n 21;p 2ac -2,31:ba-c;4;c2v^7;p n m 21;p 2bc -2bc,31:cab;4;c2v^7;p 21 m n;p -2ab 2ab,31:-cba;4;c2v^7;p 21 n m;p -2 2ac,31:bca;4;c2v^7;p n 21 m;p -2 -2bc,31:a-cb;4;c2v^7;p m 21 n;p -2ab -2,32;4;c2v^8;p b a 2;p 2 -2ab,32:cab;4;c2v^8;p 2 c b;p -2bc 2,32:bca;4;c2v^8;p c 2 a;p -2ac -2ac,33;4;c2v^9;p n a 21;p 2c -2n,33*;4;c2v^9;p n a 21*;p 21 -2n,33:ba-c;4;c2v^9;p b n 21;p 2c -2ab,33:ba-c*;4;c2v^9;p b n 21*;p 21 -2ab,33:cab;4;c2v^9;p 21 n b;p -2bc 2a,33:cab*;4;c2v^9;p 21 n b*;p -2bc 21,33:-cba;4;c2v^9;p 21 c n;p -2n 2a,33:-cba*;4;c2v^9;p 21 c n*;p -2n 21,33:bca;4;c2v^9;p c 21 n;p -2n -2ac,33:a-cb;4;c2v^9;p n 21 a;p -2ac -2n,34;4;c2v^10;p n n 2;p 2 -2n,34:cab;4;c2v^10;p 2 n n;p -2n 2,34:bca;4;c2v^10;p n 2 n;p -2n -2n,35;8;c2v^11;c m m 2;c 2 -2,35:cab;8;c2v^11;a 2 m m;a -2 2,35:bca;8;c2v^11;b m 2 m;b -2 -2,36;8;c2v^12;c m c 21;c 2c -2,36*;8;c2v^12;c m c 21*;c 21 -2,36:ba-c;8;c2v^12;c c m 21;c 2c -2c,36:ba-c*;8;c2v^12;c c m 21*;c 21 -2c,36:cab;8;c2v^12;a 21 m a;a -2a 2a,36:cab*;8;c2v^12;a 21 m a*;a -2a 21,36:-cba;8;c2v^12;a 21 a m;a -2 2a,36:-cba*;8;c2v^12;a 21 a m*;a -2 21,36:bca;8;c2v^12;b b 21 m;b -2 -2b,36:a-cb;8;c2v^12;b m 21 b;b -2b -2,37;8;c2v^13;c c c 2;c 2 -2c,37:cab;8;c2v^13;a 2 a a;a -2a 2,37:bca;8;c2v^13;b b 2 b;b -2b -2b,38;8;c2v^14;a m m 2;a 2 -2,38:ba-c;8;c2v^14;b m m 2;b 2 -2,38:cab;8;c2v^14;b 2 m m;b -2 2,38:-cba;8;c2v^14;c 2 m m;c -2 2,38:bca;8;c2v^14;c m 2 m;c -2 -2,38:a-cb;8;c2v^14;a m 2 m;a -2 -2,39;8;c2v^15;a e m 2;a 2 -2b,39;8;c2v^15;a b m 2;a 2 -2b,39:ba-c;8;c2v^15;b m a 2;b 2 -2a,39:cab;8;c2v^15;b 2 c m;b -2a 2,39:-cba;8;c2v^15;c 2 m b;c -2a 2,39:bca;8;c2v^15;c m 2 a;c -2a -2a,39:a-cb;8;c2v^15;a c 2 m;a -2b -2b,40;8;c2v^16;a m a 2;a 2 -2a,40:ba-c;8;c2v^16;b b m 2;b 2 -2b,40:cab;8;c2v^16;b 2 m b;b -2b 2,40:-cba;8;c2v^16;c 2 c m;c -2c 2,40:bca;8;c2v^16;c c 2 m;c -2c -2c,40:a-cb;8;c2v^16;a m 2 a;a -2a -2a,41;8;c2v^17;a e a 2;a 2 -2ab,41;8;c2v^17;a b a 2;a 2 -2ab;-b,41:ba-c;8;c2v^17;b b a 2;b 2 -2ab,41:cab;8;c2v^17;b 2 c b;b -2ab 2,41:-cba;8;c2v^17;c 2 c b;c -2ac 2,41:bca;8;c2v^17;c c 2 a;c -2ac -2ac,41:a-cb;8;c2v^17;a c 2 a;a -2ab -2ab,42;16;c2v^18;f m m 2;f 2 -2,42:cab;16;c2v^18;f 2 m m;f -2 2,42:bca;16;c2v^18;f m 2 m;f -2 -2,43;16;c2v^19;f d d 2;f 2 -2d,43:cab;16;c2v^19;f 2 d d;f -2d 2,43:bca;16;c2v^19;f d 2 d;f -2d -2d,44;8;c2v^20;i m m 2;i 2 -2,44:cab;8;c2v^20;i 2 m m;i -2 2,44:bca;8;c2v^20;i m 2 m;i -2 -2,45;8;c2v^21;i b a 2;i 2 -2c,45:cab;8;c2v^21;i 2 c b;i -2a 2,45:bca;8;c2v^21;i c 2 a;i -2b -2b,46;8;c2v^22;i m a 2;i 2 -2a,46:ba-c;8;c2v^22;i b m 2;i 2 -2b,46:cab;8;c2v^22;i 2 m b;i -2b 2,46:-cba;8;c2v^22;i 2 c m;i -2c 2,46:bca;8;c2v^22;i c 2 m;i -2c -2c,46:a-cb;8;c2v^22;i m 2 a;i -2a -2a,47;8;d2h^1;p m m m;-p 2 2,48:1;8;d2h^2;p n n n:1;p 2 2 -1n;-b,48:2;8;d2h^2;p n n n:2;-p 2ab 2bc,49;8;d2h^3;p c c m;-p 2 2c,49:cab;8;d2h^3;p m a a;-p 2a 2,49:bca;8;d2h^3;p b m b;-p 2b 2b,50:1;8;d2h^4;p b a n:1;p 2 2 -1ab;-b,50:2;8;d2h^4;p b a n:2;-p 2ab 2b,50:1cab;8;d2h^4;p n c b:1;p 2 2 -1bc,50:2cab;8;d2h^4;p n c b:2;-p 2b 2bc,50:1bca;8;d2h^4;p c n a:1;p 2 2 -1ac,50:2bca;8;d2h^4;p c n a:2;-p 2a 2c,51;8;d2h^5;p m m a;-p 2a 2a,51:ba-c;8;d2h^5;p m m b;-p 2b 2,51:cab;8;d2h^5;p b m m;-p 2 2b,51:-cba;8;d2h^5;p c m m;-p 2c 2c,51:bca;8;d2h^5;p m c m;-p 2c 2,51:a-cb;8;d2h^5;p m a m;-p 2 2a,52;8;d2h^6;p n n a;-p 2a 2bc,52:ba-c;8;d2h^6;p n n b;-p 2b 2n,52:cab;8;d2h^6;p b n n;-p 2n 2b,52:-cba;8;d2h^6;p c n n;-p 2ab 2c,52:bca;8;d2h^6;p n c n;-p 2ab 2n,52:a-cb;8;d2h^6;p n a n;-p 2n 2bc,53;8;d2h^7;p m n a;-p 2ac 2,53:ba-c;8;d2h^7;p n m b;-p 2bc 2bc,53:cab;8;d2h^7;p b m n;-p 2ab 2ab,53:-cba;8;d2h^7;p c n m;-p 2 2ac,53:bca;8;d2h^7;p n c m;-p 2 2bc,53:a-cb;8;d2h^7;p m a n;-p 2ab 2,54;8;d2h^8;p c c a;-p 2a 2ac,54:ba-c;8;d2h^8;p c c b;-p 2b 2c,54:cab;8;d2h^8;p b a a;-p 2a 2b,54:-cba;8;d2h^8;p c a a;-p 2ac 2c,54:bca;8;d2h^8;p b c b;-p 2bc 2b,54:a-cb;8;d2h^8;p b a b;-p 2b 2ab,55;8;d2h^9;p b a m;-p 2 2ab,55:cab;8;d2h^9;p m c b;-p 2bc 2,55:bca;8;d2h^9;p c m a;-p 2ac 2ac,56;8;d2h^10;p c c n;-p 2ab 2ac,56:cab;8;d2h^10;p n a a;-p 2ac 2bc,56:bca;8;d2h^10;p b n b;-p 2bc 2ab,57;8;d2h^11;p b c m;-p 2c 2b,57:ba-c;8;d2h^11;p c a m;-p 2c 2ac,57:cab;8;d2h^11;p m c a;-p 2ac 2a,57:-cba;8;d2h^11;p m a b;-p 2b 2a,57:bca;8;d2h^11;p b m a;-p 2a 2ab,57:a-cb;8;d2h^11;p c m b;-p 2bc 2c,58;8;d2h^12;p n n m;-p 2 2n,58:cab;8;d2h^12;p m n n;-p 2n 2,58:bca;8;d2h^12;p n m n;-p 2n 2n,59:1;8;d2h^13;p m m n:1;p 2 2ab -1ab;-b,59:2;8;d2h^13;p m m n:2;-p 2ab 2a,59:1cab;8;d2h^13;p n m m:1;p 2bc 2 -1bc,59:2cab;8;d2h^13;p n m m:2;-p 2c 2bc,59:1bca;8;d2h^13;p m n m:1;p 2ac 2ac -1ac,59:2bca;8;d2h^13;p m n m:2;-p 2c 2a,60;8;d2h^14;p b c n;-p 2n 2ab,60:ba-c;8;d2h^14;p c a n;-p 2n 2c,60:cab;8;d2h^14;p n c a;-p 2a 2n,60:-cba;8;d2h^14;p n a b;-p 2bc 2n,60:bca;8;d2h^14;p b n a;-p 2ac 2b,60:a-cb;8;d2h^14;p c n b;-p 2b 2ac,61;8;d2h^15;p b c a;-p 2ac 2ab,61:ba-c;8;d2h^15;p c a b;-p 2bc 2ac,62;8;d2h^16;p n m a;-p 2ac 2n,62:ba-c;8;d2h^16;p m n b;-p 2bc 2a,62:cab;8;d2h^16;p b n m;-p 2c 2ab,62:-cba;8;d2h^16;p c m n;-p 2n 2ac,62:bca;8;d2h^16;p m c n;-p 2n 2a,62:a-cb;8;d2h^16;p n a m;-p 2c 2n,63;16;d2h^17;c m c m;-c 2c 2,63:ba-c;16;d2h^17;c c m m;-c 2c 2c,63:cab;16;d2h^17;a m m a;-a 2a 2a,63:-cba;16;d2h^17;a m a m;-a 2 2a,63:bca;16;d2h^17;b b m m;-b 2 2b,63:a-cb;16;d2h^17;b m m b;-b 2b 2,64;16;d2h^18;c m c e;-c 2ac 2,64;16;d2h^18;c m c a;-c 2ac 2,64:ba-c;16;d2h^18;c c m b;-c 2ac 2ac,64:cab;16;d2h^18;a b m a;-a 2ab 2ab,64:-cba;16;d2h^18;a c a m;-a 2 2ab,64:bca;16;d2h^18;b b c m;-b 2 2ab,64:a-cb;16;d2h^18;b m a b;-b 2ab 2,65;16;d2h^19;c m m m;-c 2 2,65:cab;16;d2h^19;a m m m;-a 2 2,65:bca;16;d2h^19;b m m m;-b 2 2,66;16;d2h^20;c c c m;-c 2 2c,66:cab;16;d2h^20;a m a a;-a 2a 2,66:bca;16;d2h^20;b b m b;-b 2b 2b,67;16;d2h^21;c m m e;-c 2a 2,67;16;d2h^21;c m m a;-c 2a 2,67:ba-c;16;d2h^21;c m m b;-c 2a 2a,67:cab;16;d2h^21;a b m m;-a 2b 2b,67:-cba;16;d2h^21;a c m m;-a 2 2b,67:bca;16;d2h^21;b m c m;-b 2 2a,67:a-cb;16;d2h^21;b m a m;-b 2a 2,68:1;16;d2h^22;c c c e:1;c 2 2 -1ac;-b,68:1;16;d2h^22;c c c a:1;c 2 2 -1ac;-b,68:2;16;d2h^22;c c c e:2;-c 2a 2ac,68:2;16;d2h^22;c c c a:2;-c 2a 2ac,68:1ba-c;16;d2h^22;c c c b:1;c 2 2 -1ac,68:2ba-c;16;d2h^22;c c c b:2;-c 2a 2c,68:1cab;16;d2h^22;a b a a:1;a 2 2 -1ab,68:2cab;16;d2h^22;a b a a:2;-a 2a 2b,68:1-cba;16;d2h^22;a c a a:1;a 2 2 -1ab,68:2-cba;16;d2h^22;a c a a:2;-a 2ab 2b,68:1bca;16;d2h^22;b b c b:1;b 2 2 -1ab,68:2bca;16;d2h^22;b b c b:2;-b 2ab 2b,68:1a-cb;16;d2h^22;b b a b:1;b 2 2 -1ab,68:2a-cb;16;d2h^22;b b a b:2;-b 2b 2ab,69;32;d2h^23;f m m m;-f 2 2,70:1;32;d2h^24;f d d d:1;f 2 2 -1d;-b,70:2;32;d2h^24;f d d d:2;-f 2uv 2vw,71;16;d2h^25;i m m m;-i 2 2,72;16;d2h^26;i b a m;-i 2 2c,72:cab;16;d2h^26;i m c b;-i 2a 2,72:bca;16;d2h^26;i c m a;-i 2b 2b,73;16;d2h^27;i b c a;-i 2b 2c,73:ba-c;16;d2h^27;i c a b;-i 2a 2b,74;16;d2h^28;i m m a;-i 2b 2,74:ba-c;16;d2h^28;i m m b;-i 2a 2a,74:cab;16;d2h^28;i b m m;-i 2c 2c,74:-cba;16;d2h^28;i c m m;-i 2 2b,74:bca;16;d2h^28;i m c m;-i 2 2a,74:a-cb;16;d2h^28;i m a m;-i 2c 2,75;4;c4^1;p 4;p 4,76;4;c4^2;p 41;p 4w,76*;4;c4^2;p 41*;p 41,77;4;c4^3;p 42;p 4c,77*;4;c4^3;p 42*;p 42,78;4;c4^4;p 43;p 4cw,78*;4;c4^4;p 43*;p 43,79;8;c4^5;i 4;i 4,80;8;c4^6;i 41;i 4bw,81;4;s4^1;p -4;p -4,82;8;s4^2;i -4;i -4,83;8;c4h^1;p 4/m;-p 4,84;8;c4h^2;p 42/m;-p 4c,84*;8;c4h^2;p 42/m*;-p 42,85:1;8;c4h^3;p 4/n:1;p 4ab -1ab;-b,85:2;8;c4h^3;p 4/n:2;-p 4a,86:1;8;c4h^4;p 42/n:1;p 4n -1n;-b,86:2;8;c4h^4;p 42/n:2;-p 4bc,87;16;c4h^5;i 4/m;-i 4,88:1;16;c4h^6;i 41/a:1;i 4bw -1bw;-b,88:2;16;c4h^6;i 41/a:2;-i 4ad,89;8;d4^1;p 4 2 2;p 4 2,90;8;d4^2;p 4 21 2;p 4ab 2ab,91;8;d4^3;p 41 2 2;p 4w 2c,91*;8;d4^3;p 41 2 2*;p 41 2c,92;8;d4^4;p 41 21 2;p 4abw 2nw,93;8;d4^5;p 42 2 2;p 4c 2,93*;8;d4^5;p 42 2 2*;p 42 2,94;8;d4^6;p 42 21 2;p 4n 2n,95;8;d4^7;p 43 2 2;p 4cw 2c,95*;8;d4^7;p 43 2 2*;p 43 2c,96;8;d4^8;p 43 21 2;p 4nw 2abw,97;16;d4^9;i 4 2 2;i 4 2,98;16;d4^10;i 41 2 2;i 4bw 2bw,99;8;c4v^1;p 4 m m;p 4 -2,100;8;c4v^2;p 4 b m;p 4 -2ab,101;8;c4v^3;p 42 c m;p 4c -2c,101*;8;c4v^3;p 42 c m*;p 42 -2c,102;8;c4v^4;p 42 n m;p 4n -2n,103;8;c4v^5;p 4 c c;p 4 -2c,104;8;c4v^6;p 4 n c;p 4 -2n,105;8;c4v^7;p 42 m c;p 4c -2,105*;8;c4v^7;p 42 m c*;p 42 -2,106;8;c4v^8;p 42 b c;p 4c -2ab,106*;8;c4v^8;p 42 b c*;p 42 -2ab,107;16;c4v^9;i 4 m m;i 4 -2,108;16;c4v^10;i 4 c m;i 4 -2c,109;16;c4v^11;i 41 m d;i 4bw -2,110;16;c4v^12;i 41 c d;i 4bw -2c,111;8;d2d^1;p -4 2 m;p -4 2,112;8;d2d^2;p -4 2 c;p -4 2c,113;8;d2d^3;p -4 21 m;p -4 2ab,114;8;d2d^4;p -4 21 c;p -4 2n,115;8;d2d^5;p -4 m 2;p -4 -2,116;8;d2d^6;p -4 c 2;p -4 -2c,117;8;d2d^7;p -4 b 2;p -4 -2ab,118;8;d2d^8;p -4 n 2;p -4 -2n,119;16;d2d^9;i -4 m 2;i -4 -2,120;16;d2d^10;i -4 c 2;i -4 -2c,121;16;d2d^11;i -4 2 m;i -4 2,122;16;d2d^12;i -4 2 d;i -4 2bw,123;16;d4h^1;p 4/m m m;-p 4 2,124;16;d4h^2;p 4/m c c;-p 4 2c,125:1;16;d4h^3;p 4/n b m:1;p 4 2 -1ab;-b,125:2;16;d4h^3;p 4/n b m:2;-p 4a 2b,126:1;16;d4h^4;p 4/n n c:1;p 4 2 -1n;-b,126:2;16;d4h^4;p 4/n n c:2;-p 4a 2bc,127;16;d4h^5;p 4/m b m;-p 4 2ab,128;16;d4h^6;p 4/m n c;-p 4 2n,129:1;16;d4h^7;p 4/n m m:1;p 4ab 2ab -1ab;-b,129:2;16;d4h^7;p 4/n m m:2;-p 4a 2a,130:1;16;d4h^8;p 4/n c c:1;p 4ab 2n -1ab;-b,130:2;16;d4h^8;p 4/n c c:2;-p 4a 2ac,131;16;d4h^9;p 42/m m c;-p 4c 2,132;16;d4h^10;p 42/m c m;-p 4c 2c,133:1;16;d4h^11;p 42/n b c:1;p 4n 2c -1n;-b,133:2;16;d4h^11;p 42/n b c:2;-p 4ac 2b,134:1;16;d4h^12;p 42/n n m:1;p 4n 2 -1n;-b,134:2;16;d4h^12;p 42/n n m:2;-p 4ac 2bc,135;16;d4h^13;p 42/m b c;-p 4c 2ab,135*;16;d4h^13;p 42/m b c*;-p 42 2ab,136;16;d4h^14;p 42/m n m;-p 4n 2n,137:1;16;d4h^15;p 42/n m c:1;p 4n 2n -1n;-b,137:2;16;d4h^15;p 42/n m c:2;-p 4ac 2a,138:1;16;d4h^16;p 42/n c m:1;p 4n 2ab -1n;-b,138:2;16;d4h^16;p 42/n c m:2;-p 4ac 2ac,139;32;d4h^17;i 4/m m m;-i 4 2,140;32;d4h^18;i 4/m c m;-i 4 2c,141:1;32;d4h^19;i 41/a m d:1;i 4bw 2bw -1bw;-b,141:2;32;d4h^19;i 41/a m d:2;-i 4bd 2,142:1;32;d4h^20;i 41/a c d:1;i 4bw 2aw -1bw;-b,142:2;32;d4h^20;i 41/a c d:2;-i 4bd 2c,143;3;c3^1;p 3;p 3,144;3;c3^2;p 31;p 31,145;3;c3^3;p 32;p 32,146:h;9;c3^4;r 3:h;r 3,146:r;3;c3^4;r 3:r;p 3*,147;6;c3i^1;p -3;-p 3,148:h;18;c3i^2;r -3:h;-r 3,148:r;6;c3i^2;r -3:r;-p 3*,149;6;d3^1;p 3 1 2;p 3 2,150;6;d3^2;p 3 2 1;p 3 2",151;6;d3^3;p 31 1 2;p 31 2 (0 0 4),152;6;d3^4;p 31 2 1;p 31 2",153;6;d3^5;p 32 1 2;p 32 2 (0 0 2),154;6;d3^6;p 32 2 1;p 32 2",154:_2;6;d3^6;p 32 2 1;p 32 2" (0 0 4);-b,155:h;18;d3^7;r 3 2:h;r 3 2",155:r;6;d3^7;r 3 2:r;p 3* 2,156;6;c3v^1;p 3 m 1;p 3 -2",157;6;c3v^2;p 3 1 m;p 3 -2,158;6;c3v^3;p 3 c 1;p 3 -2"c,159;6;c3v^4;p 3 1 c;p 3 -2c,160:h;18;c3v^5;r 3 m:h;r 3 -2",160:r;6;c3v^5;r 3 m:r;p 3* -2,161:h;18;c3v^6;r 3 c:h;r 3 -2"c,161:r;6;c3v^6;r 3 c:r;p 3* -2n,162;12;d3d^1;p -3 1 m;-p 3 2,163;12;d3d^2;p -3 1 c;-p 3 2c,164;12;d3d^3;p -3 m 1;-p 3 2",165;12;d3d^4;p -3 c 1;-p 3 2"c,166:h;36;d3d^5;r -3 m:h;-r 3 2",166:r;12;d3d^5;r -3 m:r;-p 3* 2,167:h;36;d3d^6;r -3 c:h;-r 3 2"c,167:r;12;d3d^6;r -3 c:r;-p 3* 2n,168;6;c6^1;p 6;p 6,169;6;c6^2;p 61;p 61,170;6;c6^3;p 65;p 65,171;6;c6^4;p 62;p 62,172;6;c6^5;p 64;p 64,173;6;c6^6;p 63;p 6c,173*;6;c6^6;p 63*;p 63 ,174;6;c3h^1;p -6;p -6,175;12;c6h^1;p 6/m;-p 6,176;12;c6h^2;p 63/m;-p 6c,176*;12;c6h^2;p 63/m*;-p 63,177;12;d6^1;p 6 2 2;p 6 2,178;12;d6^2;p 61 2 2;p 61 2 (0 0 5),179;12;d6^3;p 65 2 2;p 65 2 (0 0 1),180;12;d6^4;p 62 2 2;p 62 2 (0 0 4),181;12;d6^5;p 64 2 2;p 64 2 (0 0 2),182;12;d6^6;p 63 2 2;p 6c 2c,182*;12;d6^6;p 63 2 2*;p 63 2c,183;12;c6v^1;p 6 m m;p 6 -2,184;12;c6v^2;p 6 c c;p 6 -2c,185;12;c6v^3;p 63 c m;p 6c -2,185*;12;c6v^3;p 63 c m*;p 63 -2,186;12;c6v^4;p 63 m c;p 6c -2c,186*;12;c6v^4;p 63 m c*;p 63 -2c,187;12;d3h^1;p -6 m 2;p -6 2,188;12;d3h^2;p -6 c 2;p -6c 2,189;12;d3h^3;p -6 2 m;p -6 -2,190;12;d3h^4;p -6 2 c;p -6c -2c,191;24;d6h^1;p 6/m m m;-p 6 2,192;24;d6h^2;p 6/m c c;-p 6 2c,193;24;d6h^3;p 63/m c m;-p 6c 2,193*;24;d6h^3;p 63/m c m*;-p 63 2,194;24;d6h^4;p 63/m m c;-p 6c 2c,194*;24;d6h^4;p 63/m m c*;-p 63 2c,195;12;t^1;p 2 3;p 2 2 3,196;48;t^2;f 2 3;f 2 2 3,197;24;t^3;i 2 3;i 2 2 3,198;12;t^4;p 21 3;p 2ac 2ab 3,199;24;t^5;i 21 3;i 2b 2c 3,200;24;th^1;p m -3;-p 2 2 3,201:1;24;th^2;p n -3:1;p 2 2 3 -1n;-b,201:2;24;th^2;p n -3:2;-p 2ab 2bc 3,202;96;th^3;f m -3;-f 2 2 3,203:1;96;th^4;f d -3:1;f 2 2 3 -1d;-b,203:2;96;th^4;f d -3:2;-f 2uv 2vw 3,204;48;th^5;i m -3;-i 2 2 3,205;24;th^6;p a -3;-p 2ac 2ab 3,206;48;th^7;i a -3;-i 2b 2c 3,207;24;o^1;p 4 3 2;p 4 2 3,208;24;o^2;p 42 3 2;p 4n 2 3,209;96;o^3;f 4 3 2;f 4 2 3,210;96;o^4;f 41 3 2;f 4d 2 3,211;48;o^5;i 4 3 2;i 4 2 3,212;24;o^6;p 43 3 2;p 4acd 2ab 3,213;24;o^7;p 41 3 2;p 4bd 2ab 3,214;48;o^8;i 41 3 2;i 4bd 2c 3,215;24;td^1;p -4 3 m;p -4 2 3,216;96;td^2;f -4 3 m;f -4 2 3,217;48;td^3;i -4 3 m;i -4 2 3,218;24;td^4;p -4 3 n;p -4n 2 3,219;96;td^5;f -4 3 c;f -4a 2 3,220;48;td^6;i -4 3 d;i -4bd 2c 3,221;48;oh^1;p m -3 m;-p 4 2 3,222:1;48;oh^2;p n -3 n:1;p 4 2 3 -1n;-b,222:2;48;oh^2;p n -3 n:2;-p 4a 2bc 3,223;48;oh^3;p m -3 n;-p 4n 2 3,224:1;48;oh^4;p n -3 m:1;p 4n 2 3 -1n;-b,224:2;48;oh^4;p n -3 m:2;-p 4bc 2bc 3,225;192;oh^5;f m -3 m;-f 4 2 3,226;192;oh^6;f m -3 c;-f 4a 2 3,227:1;192;oh^7;f d -3 m:1;f 4d 2 3 -1d;-b,227:2;192;oh^7;f d -3 m:2;-f 4vw 2vw 3,228:1;192;oh^8;f d -3 c:1;f 4d 2 3 -1ad;-b,228:2;192;oh^8;f d -3 c:2;-f 4ud 2vw 3,229;96;oh^9;i m -3 m;-i 4 2 3,230;96;oh^10;i a -3 d;-i 4bd 2c 3'.split(",")))});
$("JS");V(null,"JS.HallInfo",["JU.P3i","$.SB","JS.HallRotationTerm","$.HallTranslation","JU.Logger"],function(){c$=N(function(){this.primitiveHallSymbol=this.hallSymbol=null;this.latticeCode="\x00";this.latticeExtension=null;this.isCentrosymmetric=!1;this.nRotations=0;this.vectorCode=this.vector12ths=this.rotationTerms=null;F(this,arguments)},JS,"HallInfo");Y(c$,function(){this.rotationTerms=Array(16)});O(c$,function(a){try{a.startsWith("Hall:")&&(a=a.substring(5).trim());var b=this.hallSymbol=a.trim(),
b=this.extractLatticeInfo(b);if(0!=JS.HallTranslation.getLatticeIndex(this.latticeCode)){this.latticeExtension=JS.HallTranslation.getLatticeExtension(this.latticeCode,this.isCentrosymmetric);b=this.extractVectorInfo(b)+this.latticeExtension;JU.Logger.debugging&&JU.Logger.debug("Hallinfo: "+a+" "+b);a=0;var c="\x00";for(this.primitiveHallSymbol="P";0<b.length&&16>this.nRotations;){var b=this.extractRotationInfo(b,a,c),e=this.rotationTerms[this.nRotations-1];a=e.order;c=e.axisType;this.primitiveHallSymbol+=
" "+e.primitiveCode}this.primitiveHallSymbol+=this.vectorCode}}catch(h){if(U(h,Exception))JU.Logger.error("Invalid Hall symbol "+h),this.nRotations=0;else throw h;}},"~S");d(c$,"dumpInfo",function(){var a=new JU.SB;a.append("\nHall symbol: ").append(this.hallSymbol).append("\nprimitive Hall symbol: ").append(this.primitiveHallSymbol).append("\nlattice type: ").append(this.getLatticeDesignation());for(var b=0;b<this.nRotations;b++)a.append("\n\nrotation term ").appendI(b+1).append(this.rotationTerms[b].dumpInfo(this.vectorCode));
return a.toString()});d(c$,"getLatticeDesignation",function(){return JS.HallTranslation.getLatticeDesignation2(this.latticeCode,this.isCentrosymmetric)});d(c$,"extractLatticeInfo",function(a){var b=a.indexOf(" ");if(0>b)return"";var c=a.substring(0,b).toUpperCase();this.latticeCode=c.charAt(0);"-"==this.latticeCode&&(this.isCentrosymmetric=!0,this.latticeCode=c.charAt(1));return a.substring(b+1).trim()},"~S");d(c$,"extractVectorInfo",function(a){this.vector12ths=new JU.P3i;this.vectorCode="";var b=
a.indexOf("("),c=a.indexOf(")",b);0<b&&c>b&&(c=a.substring(b+1,c),this.vectorCode=" ("+c+")",a=a.substring(0,b).trim(),b=c.indexOf(" "),0<=b&&(this.vector12ths.x=Integer.parseInt(c.substring(0,b)),c=c.substring(b+1).trim(),b=c.indexOf(" "),0<=b&&(this.vector12ths.y=Integer.parseInt(c.substring(0,b)),c=c.substring(b+1).trim())),this.vector12ths.z=Integer.parseInt(c));return a},"~S");d(c$,"extractRotationInfo",function(a,b,c){var e=a.indexOf(" "),h;0<=e?(h=a.substring(0,e),a=a.substring(e+1).trim()):
(h=a,a="");this.rotationTerms[this.nRotations]=new JS.HallRotationTerm(this,h,b,c);this.nRotations++;return a},"~S,~N,~S");l(c$,"toString",function(){return this.hallSymbol})});$("JS");V(["JU.M4"],"JS.HallRotationTerm",["JU.SB","JS.HallRotation","$.HallTranslation","$.SymmetryOperation","JU.Logger"],function(){c$=N(function(){this.seitzMatrix12ths=this.translation=this.rotation=this.translationString=this.lookupCode=this.primitiveCode=this.inputCode=null;this.isImproper=!1;this.order=0;this.diagonalReferenceAxis=
this.axisType="\x00";this.allPositive=!0;F(this,arguments)},JS,"HallRotationTerm");Y(c$,function(){this.seitzMatrix12ths=new JU.M4});O(c$,function(a,b,c,e){this.inputCode=b;b+="   ";"-"==b.charAt(0)&&(this.isImproper=!0,b=b.substring(1));this.primitiveCode="";this.order=b.charCodeAt(0)-48;this.axisType=this.diagonalReferenceAxis="\x00";var h=2,f;switch(f=b.charAt(1)){case "x":case "y":case "z":switch(b.charAt(2)){case "'":case '"':this.diagonalReferenceAxis=f,f=b.charAt(2),h++}case "*":this.axisType=
f;break;case "'":case '"':this.axisType=f;switch(b.charAt(2)){case "x":case "y":case "z":this.diagonalReferenceAxis=b.charAt(2);h++;break;default:this.diagonalReferenceAxis=e}break;default:this.axisType=1==this.order?"_":0==a.nRotations?"z":2==a.nRotations?"*":2==c||4==c?"x":"'",b=b.substring(0,1)+this.axisType+b.substring(1)}this.primitiveCode+="_"==this.axisType?"1":b.substring(0,2);"\x00"!=this.diagonalReferenceAxis&&(b=b.substring(0,1)+this.diagonalReferenceAxis+this.axisType+b.substring(h),this.primitiveCode+=
this.diagonalReferenceAxis,h=3);this.lookupCode=b.substring(0,h);this.rotation=JS.HallRotation.lookup(this.lookupCode);if(null==this.rotation)JU.Logger.error("Rotation lookup could not find "+this.inputCode+" ? "+this.lookupCode);else{this.translation=new JS.HallTranslation("\x00",null);this.translationString="";for(c=b.length;h<c;h++)e=b.charAt(h),e=JS.HallTranslation.getHallTranslation(e,this.order),null!=e&&(this.translationString+=""+e.translationCode,this.translation.rotationShift12ths+=e.rotationShift12ths,
this.translation.vectorShift12ths.add(e.vectorShift12ths));this.primitiveCode=(this.isImproper?"-":"")+this.primitiveCode+this.translationString;this.seitzMatrix12ths.setM4(this.isImproper?this.rotation.seitzMatrixInv:this.rotation.seitzMatrix);this.seitzMatrix12ths.m03=this.translation.vectorShift12ths.x;this.seitzMatrix12ths.m13=this.translation.vectorShift12ths.y;this.seitzMatrix12ths.m23=this.translation.vectorShift12ths.z;switch(this.axisType){case "x":this.seitzMatrix12ths.m03+=this.translation.rotationShift12ths;
break;case "y":this.seitzMatrix12ths.m13+=this.translation.rotationShift12ths;break;case "z":this.seitzMatrix12ths.m23+=this.translation.rotationShift12ths}0<a.vectorCode.length&&(h=JU.M4.newM4(null),c=JU.M4.newM4(null),a=a.vector12ths,h.m03=a.x,h.m13=a.y,h.m23=a.z,c.m03=-a.x,c.m13=-a.y,c.m23=-a.z,this.seitzMatrix12ths.mul2(h,this.seitzMatrix12ths),this.seitzMatrix12ths.mul(c));JU.Logger.debugging&&JU.Logger.debug("code = "+b+"; primitive code ="+this.primitiveCode+"\n Seitz Matrix(12ths):"+this.seitzMatrix12ths)}},
"JS.HallInfo,~S,~N,~S");d(c$,"dumpInfo",function(a){var b=new JU.SB;b.append("\ninput code: ").append(this.inputCode).append("; primitive code: ").append(this.primitiveCode).append("\norder: ").appendI(this.order).append(this.isImproper?" (improper axis)":"");"_"!=this.axisType&&(b.append("; axisType: ").appendC(this.axisType),"\x00"!=this.diagonalReferenceAxis&&b.appendC(this.diagonalReferenceAxis));0<this.translationString.length&&b.append("; translation: ").append(this.translationString);0<a.length&&
b.append("; vector offset: ").append(a);null!=this.rotation&&b.append("\noperator: ").append(this.getXYZ(this.allPositive)).append("\nSeitz matrix:\n").append(JS.SymmetryOperation.dumpSeitz(this.seitzMatrix12ths,!1));return b.toString()},"~S");d(c$,"getXYZ",function(a){return JS.SymmetryOperation.getXYZFromMatrix(this.seitzMatrix12ths,!0,a,!0)},"~B")});$("JS");V(["JU.M4"],"JS.HallRotation",null,function(){c$=N(function(){this.seitzMatrixInv=this.seitzMatrix=this.rotCode=null;F(this,arguments)},JS,
"HallRotation");Y(c$,function(){this.seitzMatrix=new JU.M4;this.seitzMatrixInv=new JU.M4});O(c$,function(a,b){this.rotCode=a;var c=H(16,0),e=H(16,0);c[15]=e[15]=1;for(var h=0,f=0;11>f;h++){var d=0;switch(b.charAt(h)){case " ":f++;continue;case "+":case "1":d=1;break;case "-":d=-1}c[f]=d;e[f]=-d;f++}this.seitzMatrix.setA(c);this.seitzMatrixInv.setA(e)},"~S,~S");c$.lookup=d(c$,"lookup",function(a){for(var b=JS.HallRotation.getHallTerms().length;0<=--b;)if(JS.HallRotation.hallRotationTerms[b].rotCode.equals(a))return JS.HallRotation.hallRotationTerms[b];
return null},"~S");c$.getHallTerms=d(c$,"getHallTerms",function(){return null==JS.HallRotation.hallRotationTerms?JS.HallRotation.hallRotationTerms=S(-1,[new JS.HallRotation("1_","+00 0+0 00+"),new JS.HallRotation("2x","+00 0-0 00-"),new JS.HallRotation("2y","-00 0+0 00-"),new JS.HallRotation("2z","-00 0-0 00+"),new JS.HallRotation("2'","0-0 -00 00-"),new JS.HallRotation('2"',"0+0 +00 00-"),new JS.HallRotation("2x'","-00 00- 0-0"),new JS.HallRotation('2x"',"-00 00+ 0+0"),new JS.HallRotation("2y'",
"00- 0-0 -00"),new JS.HallRotation('2y"',"00+ 0-0 +00"),new JS.HallRotation("2z'","0-0 -00 00-"),new JS.HallRotation('2z"',"0+0 +00 00-"),new JS.HallRotation("3x","+00 00- 0+-"),new JS.HallRotation("3y","-0+ 0+0 -00"),new JS.HallRotation("3z","0-0 +-0 00+"),new JS.HallRotation("3*","00+ +00 0+0"),new JS.HallRotation("4x","+00 00- 0+0"),new JS.HallRotation("4y","00+ 0+0 -00"),new JS.HallRotation("4z","0-0 +00 00+"),new JS.HallRotation("6x","+00 0+- 0+0"),new JS.HallRotation("6y","00+ 0+0 -0+"),new JS.HallRotation("6z",
"+-0 +00 00+")]):JS.HallRotation.hallRotationTerms});T(c$,"hallRotationTerms",null)});$("JS");V(null,"JS.HallTranslation",["JU.P3i"],function(){c$=N(function(){this.translationCode="\x00";this.rotationShift12ths=this.rotationOrder=0;this.vectorShift12ths=null;F(this,arguments)},JS,"HallTranslation");O(c$,function(a,b){this.translationCode=a;if(null!=b){if(0<=b.z){this.vectorShift12ths=b;return}this.rotationOrder=b.x;this.rotationShift12ths=b.y}this.vectorShift12ths=new JU.P3i},"~S,JU.P3i");c$.getHallLatticeEquivalent=
d(c$,"getHallLatticeEquivalent",function(a){var b=JS.HallTranslation.getLatticeCode(a);return(0<a?"-":"")+b+" 1"},"~N");c$.getLatticeIndex=d(c$,"getLatticeIndex",function(a){for(var b=1,c=3;b<=JS.HallTranslation.nLatticeTypes;b++,c+=3)if(JS.HallTranslation.latticeTranslationData[c].charAt(0)==a)return b;return 0},"~S");c$.getLatticeCode=d(c$,"getLatticeCode",function(a){0>a&&(a=-a);return 0==a?"\x00":a>JS.HallTranslation.nLatticeTypes?JS.HallTranslation.getLatticeCode(JS.HallTranslation.getLatticeIndex(String.fromCharCode(a))):
JS.HallTranslation.latticeTranslationData[3*a].charAt(0)},"~N");c$.getLatticeDesignation=d(c$,"getLatticeDesignation",function(a){var b=0<a;0>a&&(a=-a);return 0==a||a>JS.HallTranslation.nLatticeTypes?"":(b?"-":"")+JS.HallTranslation.getLatticeCode(a)+": "+(b?"centrosymmetric ":"")+JS.HallTranslation.latticeTranslationData[3*a+1]},"~N");c$.getLatticeDesignation2=d(c$,"getLatticeDesignation2",function(a,b){var c=JS.HallTranslation.getLatticeIndex(a);b||(c=-c);return JS.HallTranslation.getLatticeDesignation(c)},
"~S,~B");c$.getLatticeExtension=d(c$,"getLatticeExtension",function(a,b){for(var c=1,e=3;c<=JS.HallTranslation.nLatticeTypes;c++,e+=3)if(JS.HallTranslation.latticeTranslationData[e].charAt(0)==a)return JS.HallTranslation.latticeTranslationData[e+2]+(b?" -1":"");return""},"~S,~B");c$.getHallTerms=d(c$,"getHallTerms",function(){return null==JS.HallTranslation.hallTranslationTerms?JS.HallTranslation.hallTranslationTerms=S(-1,[new JS.HallTranslation("a",JU.P3i.new3(6,0,0)),new JS.HallTranslation("b",
JU.P3i.new3(0,6,0)),new JS.HallTranslation("c",JU.P3i.new3(0,0,6)),new JS.HallTranslation("n",JU.P3i.new3(6,6,6)),new JS.HallTranslation("u",JU.P3i.new3(3,0,0)),new JS.HallTranslation("v",JU.P3i.new3(0,3,0)),new JS.HallTranslation("w",JU.P3i.new3(0,0,3)),new JS.HallTranslation("d",JU.P3i.new3(3,3,3)),new JS.HallTranslation("1",JU.P3i.new3(2,6,-1)),new JS.HallTranslation("1",JU.P3i.new3(3,4,-1)),new JS.HallTranslation("2",JU.P3i.new3(3,8,-1)),new JS.HallTranslation("1",JU.P3i.new3(4,3,-1)),new JS.HallTranslation("3",
JU.P3i.new3(4,9,-1)),new JS.HallTranslation("1",JU.P3i.new3(6,2,-1)),new JS.HallTranslation("2",JU.P3i.new3(6,4,-1)),new JS.HallTranslation("4",JU.P3i.new3(6,8,-1)),new JS.HallTranslation("5",JU.P3i.new3(6,10,-1)),new JS.HallTranslation("r",JU.P3i.new3(4,8,8)),new JS.HallTranslation("s",JU.P3i.new3(8,8,4)),new JS.HallTranslation("t",JU.P3i.new3(8,4,8))]):JS.HallTranslation.hallTranslationTerms});c$.getHallTranslation=d(c$,"getHallTranslation",function(a,b){for(var c=null,e=JS.HallTranslation.getHallTerms().length;0<=
--e;){var h=JS.HallTranslation.hallTranslationTerms[e];if(h.translationCode==a&&(0==h.rotationOrder||h.rotationOrder==b)){c=new JS.HallTranslation(a,null);c.translationCode=a;c.rotationShift12ths=h.rotationShift12ths;c.vectorShift12ths=h.vectorShift12ths;break}}return c},"~S,~N");T(c$,"latticeTranslationData",S(-1,"\x00;unknown;;P;primitive;;I;body-centered; 1n;R;rhombohedral; 1r 1r;F;face-centered; 1ab 1bc 1ac;A;A-centered; 1bc;B;B-centered; 1ac;C;C-centered; 1ab;S;rhombohedral(S); 1s 1s;T;rhombohedral(T); 1t 1t".split(";")));
c$.nLatticeTypes=c$.prototype.nLatticeTypes=L(JS.HallTranslation.latticeTranslationData.length/3)-1;T(c$,"hallTranslationTerms",null)});$("JS");V(["JU.M4"],"JS.SymmetryOperation","java.lang.Boolean $.Character $.Float java.util.Hashtable JU.Lst $.Matrix $.P3 $.PT $.SB $.V3 JS.Symmetry JU.Logger $.Parser".split(" "),function(){c$=N(function(){this.xyz=this.xyzCanonical=this.xyzOriginal=null;this.doNormalize=!0;this.isFinalized=!1;this.opId=0;this.myLabels=this.centering=null;this.modDim=0;this.rsvs=
this.linearRotTrans=null;this.isBio=!1;this.sigma=null;this.number=0;this.subsystemCode=null;this.timeReversal=0;this.isCenteringOp=this.unCentered=!1;this.magOp=3.4028235E38;this.divisor=12;this.info=null;F(this,arguments)},JS,"SymmetryOperation",JU.M4);d(c$,"setSigma",function(a,b){this.subsystemCode=a;this.sigma=b},"~S,JU.Matrix");O(c$,function(a,b,c){ga(this,JS.SymmetryOperation,[]);this.doNormalize=c;null==a?this.opId=b:(this.xyzOriginal=a.xyzOriginal,this.xyz=a.xyz,this.divisor=a.divisor,this.opId=
a.opId,this.modDim=a.modDim,this.myLabels=a.myLabels,this.number=a.number,this.linearRotTrans=a.linearRotTrans,this.sigma=a.sigma,this.subsystemCode=a.subsystemCode,this.timeReversal=a.timeReversal,this.setMatrix(!1),a.isFinalized||this.doFinalize())},"JS.SymmetryOperation,~N,~B");d(c$,"setGamma",function(a){for(var b=3+this.modDim,c=(this.rsvs=new JU.Matrix(null,b+1,b+1)).getArray(),e=fa(b,0),h=0,f=0;f<b;f++){for(var d=0;d<b;d++)c[f][d]=this.linearRotTrans[h++];e[f]=(a?-1:1)*this.linearRotTrans[h++]}c[b][b]=
1;a&&(this.rsvs=this.rsvs.inverse());for(f=0;f<b;f++)c[f][b]=e[f];c=this.rsvs.getSubmatrix(0,0,3,3).getArray();for(f=0;3>f;f++)for(d=0;4>d;d++)this.setElement(f,d,3>d?c[f][d]:e[f]);this.setElement(3,3,1)},"~B");d(c$,"doFinalize",function(){JS.SymmetryOperation.div12(this,this.divisor);if(0<this.modDim)for(var a=this.rsvs.getArray(),b=a.length-1;0<=--b;)a[b][3+this.modDim]=JS.SymmetryOperation.finalizeD(a[b][3+this.modDim],this.divisor);this.isFinalized=!0});c$.div12=d(c$,"div12",function(a,b){a.m03=
JS.SymmetryOperation.finalizeF(a.m03,b);a.m13=JS.SymmetryOperation.finalizeF(a.m13,b);a.m23=JS.SymmetryOperation.finalizeF(a.m23,b);return a},"JU.M4,~N");c$.finalizeF=d(c$,"finalizeF",function(a,b){if(0==b){if(0==a)return 0;var c=v(a);return 1*(c>>8)/(c&255)}return a/b},"~N,~N");c$.finalizeD=d(c$,"finalizeD",function(a,b){if(0==b){if(0==a)return 0;var c=L(a);return 1*(c>>8)/(c&255)}return a/b},"~N,~N");d(c$,"getXyz",function(a){return a&&0==this.modDim||null==this.xyzOriginal?this.xyz:this.xyzOriginal},
"~B");d(c$,"getxyzTrans",function(a){var b=JU.M4.newM4(this);b.add(a);return JS.SymmetryOperation.getXYZFromMatrix(b,!1,!1,!1)},"JU.P3");d(c$,"dumpInfo",function(){return"\n"+this.xyz+"\ninternal matrix representation:\n"+this.toString()});c$.dumpSeitz=d(c$,"dumpSeitz",function(a,b){for(var c=new JU.SB,e=H(4,0),h=0;3>h;h++){a.getRow(h,e);c.append("[\t");for(var f=0;3>f;f++)c.appendI(v(e[f])).append("\t");f=e[3];f!=v(f)&&(f*=12);c.append(JS.SymmetryOperation.twelfthsOf(b?JS.SymmetryOperation.normalizeTwelfths(f/
12,12,!0):v(f))).append("\t]\n")}return c.toString()},"JU.M4,~B");d(c$,"setMatrixFromXYZ",function(a,b,c){if(null==a)return!1;this.xyzOriginal=a;this.divisor=JS.SymmetryOperation.setDivisor(a);a=a.toLowerCase();this.setModDim(b);var e=a.startsWith("!");e&&(a=a.substring(1));if(0==a.indexOf("xyz matrix:"))return this.xyz=a,JU.Parser.parseStringInfestedFloatArray(a,null,this.linearRotTrans),this.setFromMatrix(null,e);if(0==a.indexOf("[[")){a=a.$replace("["," ").$replace("]"," ").$replace(","," ");JU.Parser.parseStringInfestedFloatArray(a,
null,this.linearRotTrans);for(b=this.linearRotTrans.length;0<=--b;)if(Float.isNaN(this.linearRotTrans[b]))return!1;this.setMatrix(e);this.isFinalized=!0;this.xyz=(this.isBio=0<=a.indexOf("bio"))?this.xyzOriginal=ea(this,JS.SymmetryOperation,"toString",[]):JS.SymmetryOperation.getXYZFromMatrix(this,!1,!1,!1);return!0}if(0==b&&0<=a.indexOf("x4"))for(b=14;4<=--b;)if(0<=a.indexOf("x"+b)){this.setModDim(b-3);break}b=null;a.endsWith("m")?(this.timeReversal=0<=a.indexOf("-m")?-1:1,c=!0):0<=a.indexOf("mz)")&&
(c=a.indexOf("("),b=a.substring(c+1,a.length-1),a=a.substring(0,c),c=!1);c=JS.SymmetryOperation.getMatrixFromString(this,a,this.linearRotTrans,c);if(null==c)return!1;this.xyzCanonical=c;if(null!=b){var h=1==JU.M4.newA16(this.linearRotTrans).determinant3();this.timeReversal=0>a.indexOf("-x")==0>b.indexOf("-mx")==h?1:-1}this.setMatrix(e);this.xyz=e?JS.SymmetryOperation.getXYZFromMatrix(this,!0,!1,!1):this.doNormalize?c:a;0!=this.timeReversal&&(this.xyz+=1==this.timeReversal?",m":",-m");JU.Logger.debugging&&
JU.Logger.debug(""+this);return!0},"~S,~N,~B");c$.setDivisor=d(c$,"setDivisor",function(a){for(var b=a.indexOf("/"),c=a.length;0<b&&b<c-1;){var e=a.charAt(b+1);if(0>"2346".indexOf(e)||b<c-2&&Character.isDigit(a.charAt(b+2)))return 0;b=a.indexOf("/",b+1)}return 12},"~S");d(c$,"setModDim",function(a){this.modDim=a;0<a&&(this.myLabels=JS.SymmetryOperation.labelsXn);this.linearRotTrans=H((a+4)*(a+4),0)},"~N");d(c$,"setMatrix",function(a){16<this.linearRotTrans.length?this.setGamma(a):(this.setA(this.linearRotTrans),
a&&(a=JU.P3.new3(this.m03,this.m13,this.m23),this.invert(),this.rotate(a),a.scale(-1),this.setTranslation(a)))},"~B");d(c$,"setFromMatrix",function(a,b){var c=0,e=0;this.myLabels=0==this.modDim?JS.SymmetryOperation.labelsXYZ:JS.SymmetryOperation.labelsXn;for(var h=0,f=3+this.modDim,d=0;h<f;d++){if(Float.isNaN(this.linearRotTrans[d]))return!1;c=this.linearRotTrans[d];1E-5>Math.abs(c)&&(c=0);if(0==(d+1)%(f+1)){var j=0==this.divisor?v(c)&255:this.divisor;0==j&&(j=12);c=JS.SymmetryOperation.finalizeF(c,
this.divisor);null!=a&&e<a.length&&(c+=a[e++]);c=JS.SymmetryOperation.normalizeTwelfths((0>c?-1:1)*Math.abs(c*j)/j,j,this.doNormalize);0==this.divisor&&(c=JS.SymmetryOperation.toDivisor(c,j));h++}this.linearRotTrans[d]=c}this.linearRotTrans[this.linearRotTrans.length-1]=this.divisor;this.setMatrix(b);this.isFinalized=null==a;this.xyz=JS.SymmetryOperation.getXYZFromMatrix(this,!0,!1,!1);return!0},"~A,~B");c$.getMatrixFromXYZ=d(c$,"getMatrixFromXYZ",function(a){var b=H(16,0);a=JS.SymmetryOperation.getMatrixFromString(null,
"!"+a,b,!1);return null==a?null:JS.SymmetryOperation.div12(JU.M4.newA16(b),JS.SymmetryOperation.setDivisor(a))},"~S");c$.getJmolCanonicalXYZ=d(c$,"getJmolCanonicalXYZ",function(a){try{return JS.SymmetryOperation.getMatrixFromString(null,a,null,!1)}catch(b){if(U(b,Exception))return null;throw b;}},"~S");c$.getMatrixFromString=d(c$,"getMatrixFromString",function(a,b,c,e){var h=!1,f=!1,d=!1;b=JU.PT.rep(b,"[bio[","");var j=null==a?0:a.modDim,k=4+j,p=null==a?JS.SymmetryOperation.setDivisor(b):a.divisor,
m=null==a?!b.startsWith("!"):a.doNormalize,q=0<j?3:0;null!=c&&(c[c.length-1]=1);var n=b.indexOf(";")+1;0!=n&&(e=!0,n==b.length&&(b+="0,0,0"));var l=-1;a=null==a||0==j?null:a.myLabels;null==a&&(a=JS.SymmetryOperation.labelsXYZ);b=b.toLowerCase()+",";b=b.$replace("(",",");0<j&&(b=JS.SymmetryOperation.replaceXn(b,j+3));for(var u=0,r=0,t=0,x,w=0,y=0,L=0,P=1,G="",A="",E=M(1,0),D=b.length,B=0;B<D;B++){switch(x=b.charAt(B)){case ";":break;case "'":case " ":case "{":case "}":case "!":continue;case "-":d=
!0;continue;case "+":d=!1;continue;case "/":y=0;h=!0;continue;case "x":case "y":case "z":case "a":case "b":case "c":case "d":case "e":case "f":case "g":case "h":r=t*k;h="x"<=x?x.charCodeAt(0)-120:x.charCodeAt(0)-97+q;u=r+h;d=d?-1:1;e&&0!=w?(null!=c&&(c[u]=w),d=v(w),w=0):null!=c&&(c[u]=d);G+=JS.SymmetryOperation.plusMinus(G,d,a[h]);break;case ",":if(0!=n){if(0<n){l=B;B=n-1;n=-B;y=w=0;continue}n=B+1;B=l}w=JS.SymmetryOperation.normalizeTwelfths(w,0==y?12:0==p?y:p,m);null!=c&&(c[r+k-1]=0==p&&0<y?w=JS.SymmetryOperation.toDivisor(L,
y):w);G+=JS.SymmetryOperation.xyzFraction12(w,0==p?y:p,!1,!0);A+=(""===A?"":",")+G;if(t==k-2)return A;y=L=w=0;G="";if(2<t++&&0==j)return JU.Logger.warn("Symmetry Operation? "+b),null;break;case ".":f=!0;P=1;continue;case "0":if(!f&&12==p&&(h||!e))continue;default:var H=x.charCodeAt(0)-48;if(0<=H&&9>=H){if(f){P/=10;0>w&&(d=!0);w+=P*H*(d?-1:1);continue}if(h){E[0]=B;y=JU.PT.parseIntNext(b,E);if(0>y)return null;B=E[0]-1;0==w?null!=c&&(c[u]/=y):(L=v(w),w/=y)}else w=10*w+(d?-1:1)*H}else JU.Logger.warn("symmetry character?"+
x)}f=h=d=!1}return null},"JS.SymmetryOperation,~S,~A,~B");c$.replaceXn=d(c$,"replaceXn",function(a,b){for(var c=b;0<=--c;)a=JU.PT.rep(a,JS.SymmetryOperation.labelsXn[c],JS.SymmetryOperation.labelsXnSub[c]);return a},"~S,~N");c$.toDivisor=d(c$,"toDivisor",function(a,b){var c=v(a);c!=a&&(c=a-c,b=v(Math.abs(b/c)),c=v(Math.abs(a)/c));return(c<<8)+b},"~N,~N");c$.xyzFraction12=d(c$,"xyzFraction12",function(a,b,c,e){12!=b&&(a=v(a),b=a&255,a>>=8);var h=L(b/2);if(c)for(;0>a;)a+=b;else if(e){for(;a>h;)a-=b;
for(;a<-h;)a+=b}b=12==b?JS.SymmetryOperation.twelfthsOf(a):0==a?"0":a+"/"+b;return"0"==b.charAt(0)?"":0<a?"+"+b:b},"~N,~N,~B,~B");c$.twelfthsOf=d(c$,"twelfthsOf",function(a){var b="";0>a&&(a=-a,b="-");var c=12,e=Math.round(a);if(0.01<Math.abs(e-a)){a/=12;for(c=3;20>c;c++){var h=a*c,e=Math.round(h);if(0.01>Math.abs(e-h))break}if(20==c)return b+a}else{if(12==e)return b+"1";if(12>e)return b+JS.SymmetryOperation.twelfths[e%12];switch(e%12){case 0:return""+L(e/12);case 2:case 10:c=6;break;case 3:case 9:c=
4;break;case 4:case 8:c=3;break;case 6:c=2}e=L(e*c/12)}return b+e+"/"+c},"~N");c$.plusMinus=d(c$,"plusMinus",function(a,b,c){return 0==b?"":(0>b?"-":0==a.length?"":"+")+(1==b||-1==b?"":""+v(Math.abs(b)))+c},"~S,~N,~S");c$.normalizeTwelfths=d(c$,"normalizeTwelfths",function(a,b,c){a*=b;var e=L(b/2);if(c){for(;a>e;)a-=b;for(;a<=-e;)a+=b}return a},"~N,~N,~B");c$.getXYZFromMatrix=d(c$,"getXYZFromMatrix",function(a,b,c,e){var h="",f=R(a,JS.SymmetryOperation)?a:null;if(null!=f&&0<f.modDim)return JS.SymmetryOperation.getXYZFromRsVs(f.rsvs.getRotation(),
f.rsvs.getTranslation(),b);var f=H(4,0),d=v(a.getElement(3,3));1==d?d=12:a.setElement(3,3,1);for(var j=0;3>j;j++){var k=3>j?0:3;a.getRow(j,f);for(var p="",m=0;3>m;m++)0!=JS.SymmetryOperation.approxF(f[m])&&(p+=JS.SymmetryOperation.plusMinus(p,f[m],JS.SymmetryOperation.labelsXYZ[m+k]));0!=JS.SymmetryOperation.approxF(f[3])&&(p+=JS.SymmetryOperation.xyzFraction12(b?f[3]:f[3]*d,d,c,e));h+=","+p}return h.substring(1)},"JU.M4,~B,~B,~B");d(c$,"rotateAxes",function(a,b,c,e){var d=Array(3);this.getRotationScale(e);
for(var f=a.length;0<=--f;)c.setT(a[f]),b.toFractional(c,!0),e.rotate(c),b.toCartesian(c,!0),d[f]=JU.V3.newV(c);return d},"~A,JS.UnitCell,JU.P3,JU.M3");d(c$,"fcoord2",function(a){return 12==this.divisor?JS.SymmetryOperation.fcoord(a):this.fc2(this.linearRotTrans[3])+" "+this.fc2(this.linearRotTrans[7])+" "+this.fc2(this.linearRotTrans[11])},"JU.T3");d(c$,"fc2",function(a){a=v(a);var b=a&255;a>>=8;return 0==a?"0":a+"/"+b},"~N");c$.fcoord=d(c$,"fcoord",function(a){return JS.SymmetryOperation.fc(a.x)+
" "+JS.SymmetryOperation.fc(a.y)+" "+JS.SymmetryOperation.fc(a.z)},"JU.T3");c$.fc=d(c$,"fc",function(a){var b=Math.abs(a);a=0>a?"-":"";b=v(JS.SymmetryOperation.approxF(24*b));return b/24==v(b/24)?a+L(b/24):0!=b%8?a+JS.SymmetryOperation.twelfthsOf(b>>1):0==b?"0":24==b?a+"1":a+L(b/8)+"/3"},"~N");c$.approxF=d(c$,"approxF",function(a){return JU.PT.approx(a,100)},"~N");c$.getXYZFromRsVs=d(c$,"getXYZFromRsVs",function(a,b,c){a=a.getArray();b=b.getArray();for(var e=a.length,d="",f=0;f<e;f++){for(var d=d+
",",g=0;g<e;g++){var j=a[f][g];0!=j&&(d+=(0>j?"-":d.endsWith(",")?"":"+")+(1==Math.abs(j)?"":""+L(Math.abs(j)))+"x"+(g+1))}d+=JS.SymmetryOperation.xyzFraction12(L(b[f][0]*(c?1:12)),12,!1,!0)}return JU.PT.rep(d.substring(1),",+",",")},"JU.Matrix,JU.Matrix,~B");d(c$,"toString",function(){return null==this.rsvs?ea(this,JS.SymmetryOperation,"toString",[]):ea(this,JS.SymmetryOperation,"toString",[])+" "+this.rsvs.toString()});d(c$,"getMagneticOp",function(){return 3.4028235E38==this.magOp?this.magOp=this.determinant3()*
this.timeReversal:this.magOp});d(c$,"setTimeReversal",function(a){this.timeReversal=a;0<=this.xyz.indexOf("m")&&(this.xyz=this.xyz.substring(0,this.xyz.indexOf("m")));0!=a&&(this.xyz+=1==a?",m":",-m")},"~N");d(c$,"getCentering",function(){this.isFinalized||this.doFinalize();null==this.centering&&!this.unCentered&&(0==this.modDim&&1==this.m00&&1==this.m11&&1==this.m22&&0==this.m01&&0==this.m02&&0==this.m10&&0==this.m12&&0==this.m20&&0==this.m21&&(0!=this.m03||0!=this.m13||0!=this.m23)?(this.isCenteringOp=
!0,this.centering=JU.V3.new3(this.m03,this.m13,this.m23)):(this.unCentered=!0,this.centering=null));return this.centering});d(c$,"fixMagneticXYZ",function(a,b,c){if(0==this.timeReversal)return b;var e=b.indexOf("m"),e=e-L((3-this.timeReversal)/2);b=0>e?b:b.substring(0,e);if(!c)return b+(0<this.timeReversal?" +1":" -1");a=JU.M4.newM4(a);a.m03=a.m13=a.m23=0;0>this.getMagneticOp()&&a.scale(-1);return b+="("+JU.PT.rep(JU.PT.rep(JU.PT.rep(JS.SymmetryOperation.getXYZFromMatrix(a,!1,!1,!1),"x","mx"),"y",
"my"),"z","mz")+")"},"JU.M4,~S,~B");d(c$,"getInfo",function(){null==this.info&&(this.info=new java.util.Hashtable,this.info.put("xyz",this.xyz),null!=this.centering&&this.info.put("centering",this.centering),this.info.put("index",Integer.$valueOf(this.number-1)),this.info.put("isCenteringOp",Boolean.$valueOf(this.isCenteringOp)),null!=this.linearRotTrans&&this.info.put("linearRotTrans",this.linearRotTrans),this.info.put("modulationDimension",Integer.$valueOf(this.modDim)),this.info.put("matrix",JU.M4.newM4(this)),
3.4028235E38!=this.magOp&&this.info.put("magOp",Float.$valueOf(this.magOp)),this.info.put("id",Integer.$valueOf(this.opId)),this.info.put("timeReversal",Integer.$valueOf(this.timeReversal)),null!=this.xyzOriginal&&this.info.put("xyzOriginal",this.xyzOriginal));return this.info});c$.normalizeOperationToCentroid=d(c$,"normalizeOperationToCentroid",function(a,b,c,e,d){if(!(0>=d)){var f=0,g=0,j=0;null==JS.SymmetryOperation.atomTest&&(JS.SymmetryOperation.atomTest=new JU.P3);for(var k=e+d;e<k;e++)JS.Symmetry.newPoint(b,
c[e],0,0,0,JS.SymmetryOperation.atomTest),f+=JS.SymmetryOperation.atomTest.x,g+=JS.SymmetryOperation.atomTest.y,j+=JS.SymmetryOperation.atomTest.z;f/=d;g/=d;for(j/=d;-0.001>f||1.001<=f;)b.m03+=0>f?1:-1,f+=0>f?1:-1;if(1<a)for(;-0.001>g||1.001<=g;)b.m13+=0>g?1:-1,g+=0>g?1:-1;if(2<a)for(;-0.001>j||1.001<=j;)b.m23+=0>j?1:-1,j+=0>j?1:-1}},"~N,JU.M4,~A,~N,~N");c$.getLatticeCentering=d(c$,"getLatticeCentering",function(a){for(var b=new JU.Lst,c=0;c<a.length;c++){var e=null==a[c]?null:a[c].getCentering();
null!=e&&b.addLast(JU.P3.newP(e))}return b},"~A");T(c$,"DIVISOR_MASK",255,"DIVISOR_OFFSET",8,"twelfths",S(-1,"0 1/12 1/6 1/4 1/3 5/12 1/2 7/12 2/3 3/4 5/6 11/12".split(" ")));c$.labelsXYZ=c$.prototype.labelsXYZ=S(-1,["x","y","z"]);c$.labelsXn=c$.prototype.labelsXn=S(-1,"x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13".split(" "));c$.labelsXnSub=c$.prototype.labelsXnSub=S(-1,"xyzabcdefghij".split(""));T(c$,"atomTest",null)});$("JS");V(null,"JS.SymmetryInfo",["JU.PT","JU.SimpleUnitCell"],function(){c$=N(function(){this.isMultiCell=
this.coordinatesAreFractional=!1;this.cellRange=this.infoStr=this.symmetryOperations=this.sgName=null;this.latticeType="P";this.intlTableNo=null;F(this,arguments)},JS,"SymmetryInfo");O(c$,function(){});d(c$,"setSymmetryInfo",function(a,b,c){var e;if(null==c){this.cellRange=a.get("unitCellRange");this.sgName=a.get("spaceGroup");if(null==this.sgName||""===this.sgName)this.sgName="spacegroup unspecified";this.intlTableNo=a.get("intlTableNo");c=a.get("latticeType");this.latticeType=null==c?"P":c.charAt(0);
e=a.containsKey("symmetryCount")?a.get("symmetryCount").intValue():0;this.symmetryOperations=a.remove("symmetryOps");this.isMultiCell=(this.coordinatesAreFractional=a.containsKey("coordinatesAreFractional")?a.get("coordinatesAreFractional").booleanValue():!1)&&null!=this.symmetryOperations}else this.cellRange=null,this.sgName=c.getName(),this.intlTableNo=c.intlTableNumber,this.latticeType=c.latticeType,e=c.getOperationCount(),this.symmetryOperations=c.finalOperations,this.coordinatesAreFractional=
!0;this.infoStr="Spacegroup: "+this.sgName;if(null!=this.symmetryOperations){var d="";c="\nNumber of symmetry operations: "+(0==e?1:e)+"\nSymmetry Operations:";for(var f=0;f<e;f++){var g=this.symmetryOperations[f];c+="\n"+g.fixMagneticXYZ(g,g.xyz,!0);g.isCenteringOp&&(d+=" ("+JU.PT.rep(JU.PT.replaceAllCharacters(g.xyz,"xyz","0"),"0+","")+")")}0<d.length&&(this.infoStr+="\nCentering: "+d);this.infoStr+=c;this.infoStr+="\n"}null==b&&(b=a.get("unitCellParams"));return!JU.SimpleUnitCell.isValid(b)?null:
b},"java.util.Map,~A,JS.SpaceGroup")});$("JS");V(["JU.P3","$.V3"],"JS.SymmetryDesc","java.lang.Float java.util.Hashtable JU.BS $.Lst $.M4 $.Measure $.P4 $.PT $.Quat $.SB JM.Atom JS.T JS.SpaceGroup $.Symmetry $.SymmetryOperation JU.Escape $.Logger".split(" "),function(){c$=N(function(){this.modelSet=null;F(this,arguments)},JS,"SymmetryDesc");O(c$,function(){});d(c$,"set",function(a){this.modelSet=a;return this},"JM.ModelSet");c$.getType=d(c$,"getType",function(a){var b;if(null==a)return 1073742001;
if(a.equalsIgnoreCase("matrix"))return 12;if(a.equalsIgnoreCase("description"))return 1825200146;if(a.equalsIgnoreCase("axispoint"))return 134217751;if(a.equalsIgnoreCase("time"))return 268435633;if(a.equalsIgnoreCase("info"))return 1275068418;if(a.equalsIgnoreCase("element"))return 1086326789;if(a.equalsIgnoreCase("invariant"))return 36868;b=JS.T.getTokFromName(a);if(0!=b)return b;b=JS.SymmetryDesc.getKeyType(a);return 0>b?b:1073742327},"~S");c$.getKeyType=d(c$,"getKeyType",function(a){"type".equals(a)&&
(a="_type");for(var b=0;b<JS.SymmetryDesc.keys.length;b++)if(a.equalsIgnoreCase(JS.SymmetryDesc.keys[b]))return-1-b;return 0},"~S");c$.nullReturn=d(c$,"nullReturn",function(a){switch(a){case 135176:return"draw ID sym_* delete";case 1073741961:case 1825200146:case 1073741974:case 1145047050:case 1145047053:case 11:case 1073742078:return"";case 1140850689:return new JU.BS;default:return null}},"~N");c$.getInfo=d(c$,"getInfo",function(a,b){if(0==a.length)return"";if(0>b&&-b<=JS.SymmetryDesc.keys.length&&
-b<=a.length)return a[-1-b];switch(b){case 1073742327:case 1073741982:return a;case 1275068418:for(var c=new java.util.Hashtable,e=0,d=a.length;e<d;e++){var f=3==e?"draw":7==e?"axispoint":JS.SymmetryDesc.keys[e];null!=a[e]&&c.put(f,a[e])}return c;case 1073741961:return a[0]+"  \t"+a[2];case 1145047050:return a[0];case 1145047053:return a[19];case 1073742078:return a[1];default:case 1825200146:return a[2];case 135176:return a[3]+"\nprint "+JU.PT.esc(a[0]+" "+a[2]);case 1145047051:return a[4];case 1073742178:return a[5];
case 12289:return a[6];case 134217751:return a[7];case 1073741854:return a[8];case 134217729:return a[9];case 12:return a[10];case 1814695966:return a[11];case 4160:return a[12];case 268435633:return a[13];case 134217750:return a[14];case 1140850696:return a[15];case 1073741974:return a[16];case 1086326789:return S(-1,[a[6],a[7],a[8],a[14],a[5]]);case 36868:return null!=a[5]?"none":null!=a[6]?a[6]:null!=a[8]?S(-1,[a[7],a[8]]):null!=a[14]?a[14]:"identity"}},"~A,~N");c$.getInfoBS=d(c$,"getInfoBS",function(a){var b=
new JU.BS;if(0>a&&-a<=JS.SymmetryDesc.keys.length)return b.set(-1-a),b;switch(a){case 0:case 1140850689:case 1073742001:case 1073742327:case 1073741982:case 1275068418:b.setBits(0,JS.SymmetryDesc.keys.length);break;case 1073741961:b.set(0);b.set(2);break;case 1145047050:b.set(0);break;case 1145047053:b.set(19);break;case 1073742078:b.set(1);break;default:case 1825200146:b.set(2);break;case 135176:b.set(0);b.set(2);b.set(3);break;case 1145047051:b.set(4);break;case 1073742178:b.set(5);break;case 12289:b.set(6);
break;case 134217751:b.set(7);break;case 1073741854:b.set(8);break;case 134217729:b.set(9);break;case 12:b.set(10);break;case 1814695966:b.set(11);break;case 4160:b.set(12);break;case 268435633:b.set(13);break;case 134217750:b.set(14);break;case 1140850696:b.set(15);break;case 1073741974:b.set(16);break;case 1086326789:case 36868:b.set(5),b.set(6),b.set(7),b.set(8),b.set(14),b.set(22)}return b},"~N");d(c$,"createInfoArray",function(a,b,c,e,d,f,g,j,k){a.isFinalized||a.doFinalize();var p=1==k.cardinality()&&
k.get(10),m=-1==a.timeReversal;0==f&&(f=1);JS.SymmetryDesc.ptemp.set(0,0,0);JS.SymmetryDesc.vtrans.set(0,0,0);var q=null,n=null==c||Float.isNaN(c.x)?new JU.P3:c;if(null!=e){JS.SymmetryDesc.pta01.setT(n);JS.SymmetryDesc.pta02.setT(e);b.toFractional(JS.SymmetryDesc.pta01,!0);b.toFractional(JS.SymmetryDesc.pta02,!0);a.rotTrans(JS.SymmetryDesc.pta01);JS.SymmetryDesc.ptemp.setT(JS.SymmetryDesc.pta01);b.unitize(JS.SymmetryDesc.pta01);JS.SymmetryDesc.vtrans.setT(JS.SymmetryDesc.pta02);b.unitize(JS.SymmetryDesc.pta02);
if(1.96E-6<=JS.SymmetryDesc.pta01.distanceSquared(JS.SymmetryDesc.pta02))return null;JS.SymmetryDesc.vtrans.sub(JS.SymmetryDesc.ptemp)}var l=JU.M4.newM4(a);l.add(JS.SymmetryDesc.vtrans);var u=0!=a.timeReversal;if(p&&!u)return a=JS.SymmetryDesc.getKeyType("matrix"),b=Array(-a),b[-1-a]=l,b;p=new JU.V3;JS.SymmetryDesc.pta01.set(1,0,0);JS.SymmetryDesc.pta02.set(0,1,0);var r=JU.P3.new3(0,0,1);JS.SymmetryDesc.pta01.add(n);JS.SymmetryDesc.pta02.add(n);r.add(n);var t=JS.SymmetryDesc.rotTransCart(a,b,n,JS.SymmetryDesc.vtrans),
x=JS.SymmetryDesc.rotTransCart(a,b,JS.SymmetryDesc.pta01,JS.SymmetryDesc.vtrans),w=JS.SymmetryDesc.rotTransCart(a,b,JS.SymmetryDesc.pta02,JS.SymmetryDesc.vtrans),y=JS.SymmetryDesc.rotTransCart(a,b,r,JS.SymmetryDesc.vtrans),H=JU.V3.newVsub(x,t),P=JU.V3.newVsub(w,t),G=JU.V3.newVsub(y,t);JS.SymmetryDesc.approx(JS.SymmetryDesc.vtrans);JS.SymmetryDesc.vtemp.cross(H,P);var A=0>JS.SymmetryDesc.vtemp.dot(G);A&&(x.sub2(t,H),w.sub2(t,P),y.sub2(t,G));var E=JU.Measure.computeHelicalAxis(n,t,JU.Quat.getQuaternionFrame(t,
x,w).div(JU.Quat.getQuaternionFrame(n,JS.SymmetryDesc.pta01,JS.SymmetryDesc.pta02))),D=E[0],B=E[1],N=v(Math.abs(JU.PT.approx(E[3].x,1))),X=JS.SymmetryOperation.approxF(E[3].y);A&&(x.add2(t,H),w.add2(t,P),y.add2(t,G));E=JU.V3.newVsub(t,n);0.1>E.length()&&(E=null);var M=null,aa=null,F=null,O=0,Q=0,S=0==N,O=!S,T=!1,Z=!1,$=!O&&!A;if(O||A)E=null;if(A&&S)aa=JU.P3.newP(n),aa.add(t),aa.scale(0.5),M=t,T=!0;else if(A){var C=0==X?new JU.V3:B,z=0;switch(N){case 60:z=0.6666667;break;case 120:z=2;break;case 90:z=
1;break;case 180:F=JU.P3.newP(n);F.add(C);D.scaleAdd2(0.5,C,n);0.1<F.distance(t)?(E=JU.V3.newVsub(t,F),JS.SymmetryDesc.setFractional(b,E,JS.SymmetryDesc.ptemp,null),p.setT(JS.SymmetryDesc.ptemp)):E=null;JS.SymmetryDesc.vtemp.setT(B);JS.SymmetryDesc.vtemp.normalize();O=-JS.SymmetryDesc.vtemp.x*D.x-JS.SymmetryDesc.vtemp.y*D.y-JS.SymmetryDesc.vtemp.z*D.z;q=JU.P4.new4(JS.SymmetryDesc.vtemp.x,JS.SymmetryDesc.vtemp.y,JS.SymmetryDesc.vtemp.z,O);Q=0.01>Math.abs(O)&&0.4<JS.SymmetryDesc.vtemp.x*JS.SymmetryDesc.vtemp.y?
1.3:1.05;A=O=!1;Z=!0;break;default:A=!1}0!=z&&(JS.SymmetryDesc.vtemp.sub2(n,D),JS.SymmetryDesc.vtemp.add(t),JS.SymmetryDesc.vtemp.sub(D),JS.SymmetryDesc.vtemp.sub(C),JS.SymmetryDesc.vtemp.scale(z),D.add(JS.SymmetryDesc.vtemp),aa=new JU.P3,aa.scaleAdd2(0.5,C,D),M=new JU.P3,M.scaleAdd2(-2,aa,t),M.scale(-1))}else null!=E&&(JS.SymmetryDesc.ptemp.setT(E),b.toFractional(JS.SymmetryDesc.ptemp,!1),p.setT(JS.SymmetryDesc.ptemp),b.toCartesian(JS.SymmetryDesc.ptemp,!1),E.setT(JS.SymmetryDesc.ptemp));C=N;JS.SymmetryDesc.approx0(B);
if(O){var I=new JU.P3;JS.SymmetryDesc.vtemp.setT(B);z=N;A?(I.setT(M),z=M):0==X?(z=t,I.setT(D)):(z=t,I.scaleAdd2(0.5,JS.SymmetryDesc.vtemp,D));JS.SymmetryDesc.ptemp.add2(D,JS.SymmetryDesc.vtemp);z=Math.round(JU.Measure.computeTorsion(n,D,JS.SymmetryDesc.ptemp,z,!0));0!=JS.SymmetryOperation.approxF(z)&&(N=z)}var K=z=null;if(k.get(2)||k.get(15)){z=K="identity";if(T)JS.SymmetryDesc.ptemp.setT(aa),b.toFractional(JS.SymmetryDesc.ptemp,!1),z="Ci: "+JS.SymmetryDesc.strCoord(a,JS.SymmetryDesc.ptemp,a.isBio),
K="inversion center";else if(O)A?K=z=L(360/C)+"-bar axis":0!=X?(K=z=L(360/C)+"-fold screw axis",JS.SymmetryDesc.ptemp.setT(B),b.toFractional(JS.SymmetryDesc.ptemp,!1),z+="|translation: "+JS.SymmetryDesc.strCoord(a,JS.SymmetryDesc.ptemp,a.isBio)):K=z="C"+L(360/C)+" axis";else if(null!=E){var s=" "+JS.SymmetryDesc.strCoord(a,p,a.isBio);S?(K=z="translation",z+=":"+s):Z&&(z=Math.abs(JS.SymmetryOperation.approxF(p.x)),K=Math.abs(JS.SymmetryOperation.approxF(p.y)),C=Math.abs(JS.SymmetryOperation.approxF(p.z)),
s=" "+JS.SymmetryDesc.strCoord(a,p,a.isBio),z=0!=z&&0!=K&&0!=C?0.25==z&&0.25==K&&0.25==C?"d-":0.5==z&&0.5==K&&0.5==C?"n-":"g-":0!=z&&0!=K||0!=K&&0!=C||0!=C&&0!=z?0.25==z&&0.25==K||0.25==z&&0.25==C||0.25==K&&0.25==C?"d-":0.5==z&&0.5==K||0.5==z&&0.5==C||0.5==K&&0.5==C?0==z&&0==B.x||0==K&&0==B.y||0==C&&0==B.z?"g-":"n-":"g-":0!=z?"a-":0!=K?"b-":"c-",K=z+="glide plane",z+="|translation:"+s)}else Z&&(K=z="mirror plane");A&&!T&&(JS.SymmetryDesc.ptemp.setT(aa),b.toFractional(JS.SymmetryDesc.ptemp,!1),z+=
"|inversion center at "+JS.SymmetryDesc.strCoord(a,JS.SymmetryDesc.ptemp,a.isBio));m&&(z+="|time-reversed",K+=" (time-reversed)")}s=null;if(null!=d&&k.get(3)){C=null;d="\ndraw ID "+d+"_";s=new JU.SB;s.append(d).append("* delete");JS.SymmetryDesc.drawLine(s,d+"frame1X",0.15,n,JS.SymmetryDesc.pta01,"red");JS.SymmetryDesc.drawLine(s,d+"frame1Y",0.15,n,JS.SymmetryDesc.pta02,"green");JS.SymmetryDesc.drawLine(s,d+"frame1Z",0.15,n,r,"blue");var ba,r=0.2>n.distance(t);if(O){I=new JU.P3;ba="red";C=N;Q=1;JS.SymmetryDesc.vtemp.setT(B);
if(0!=X&&!A)ba="orange",JS.SymmetryDesc.drawLine(s,d+"rotLine1",0.1,n,D,"red"),JS.SymmetryDesc.ptemp.add2(D,JS.SymmetryDesc.vtemp),JS.SymmetryDesc.drawLine(s,d+"rotLine2",0.1,t,JS.SymmetryDesc.ptemp,"red"),I.scaleAdd2(0.5,JS.SymmetryDesc.vtemp,D);else{I.setT(D);var V,U,Y;JS.SymmetryDesc.ptemp.set(1,0,0);b.toCartesian(JS.SymmetryDesc.ptemp,!1);V=JS.SymmetryDesc.approx0f(JS.SymmetryDesc.ptemp.dot(B));JS.SymmetryDesc.ptemp.set(0,1,0);b.toCartesian(JS.SymmetryDesc.ptemp,!1);U=JS.SymmetryDesc.approx0f(JS.SymmetryDesc.ptemp.dot(B));
JS.SymmetryDesc.ptemp.set(0,0,1);b.toCartesian(JS.SymmetryDesc.ptemp,!1);Y=JS.SymmetryDesc.approx0f(JS.SymmetryDesc.ptemp.dot(B));if(!(0==V?0==U?0<Y:0<U:0==Y?0<V:0==U?0<Y:0<V*U*Y))r||D.add2(D,JS.SymmetryDesc.vtemp),JS.SymmetryDesc.vtemp.scale(-1),C=-C;0>C&&(C=360+C);A?0==X?(I.setT(aa),JS.SymmetryDesc.vtemp.scale(3*f),r?(JS.SymmetryDesc.ptemp.scaleAdd2(0.25,JS.SymmetryDesc.vtemp,D),D.scaleAdd2(-0.24,JS.SymmetryDesc.vtemp,D),I.scaleAdd2(0.31,JS.SymmetryDesc.vtemp,I),ba="cyan"):(JS.SymmetryDesc.ptemp.scaleAdd2(-1,
JS.SymmetryDesc.vtemp,D),JS.SymmetryDesc.drawLine(s,d+"rotLine1",0.1,n,aa,"red"),JS.SymmetryDesc.drawLine(s,d+"rotLine2",0.1,M,aa,"red"))):r||(Q=n.distance(I),JS.SymmetryDesc.drawLine(s,d+"rotLine1",0.1,n,I,"red"),JS.SymmetryDesc.drawLine(s,d+"rotLine2",0.1,M,I,"red")):(JS.SymmetryDesc.vtemp.scale(3*f),r||(JS.SymmetryDesc.drawLine(s,d+"rotLine1",0.1,n,I,"red"),JS.SymmetryDesc.drawLine(s,d+"rotLine2",0.1,t,I,"red")),I.setT(D),0==X&&r&&I.scaleAdd2(0.25,JS.SymmetryDesc.vtemp,I))}JS.SymmetryDesc.ptemp.add2(I,
JS.SymmetryDesc.vtemp);s.append(d).append("rotRotArrow arrow width 0.1 scale "+JU.PT.escF(Q)+" arc ").append(JU.Escape.eP(I)).append(JU.Escape.eP(JS.SymmetryDesc.ptemp));JS.SymmetryDesc.ptemp.setT(n);0.1>JS.SymmetryDesc.ptemp.distance(t)&&JS.SymmetryDesc.ptemp.set(Math.random(),Math.random(),Math.random());s.append(JU.Escape.eP(JS.SymmetryDesc.ptemp));JS.SymmetryDesc.ptemp.set(0,C-5*Math.signum(C),0);s.append(JU.Escape.eP(JS.SymmetryDesc.ptemp)).append(" color red");0==X&&!A&&(JS.SymmetryDesc.ptemp.scaleAdd2(0.5,
JS.SymmetryDesc.vtemp,D),D.scaleAdd2(-0.45,JS.SymmetryDesc.vtemp,D));JS.SymmetryDesc.drawVector(s,d,"rotVector1","vector","0.1",D,JS.SymmetryDesc.vtemp,m?"gray":ba)}else if(Z){JS.SymmetryDesc.ptemp.sub2(F,n);0.2<n.distance(F)&&JS.SymmetryDesc.drawVector(s,d,"planeVector","vector","0.05",n,JS.SymmetryDesc.ptemp,m?"gray":"cyan");null!=E&&(C=d+"glide",JS.SymmetryDesc.drawFrameLine("X",F,H,0.15,JS.SymmetryDesc.ptemp,s,C,"red"),JS.SymmetryDesc.drawFrameLine("Y",F,P,0.15,JS.SymmetryDesc.ptemp,s,C,"green"),
JS.SymmetryDesc.drawFrameLine("Z",F,G,0.15,JS.SymmetryDesc.ptemp,s,C,"blue"));ba=null==E?"green":"blue";Q=this.modelSet.vwr.getTriangulator().intersectPlane(q,b.getCanonicalCopy(Q,!0),3);if(null!=Q)for(f=Q.size();0<=--f;)C=Q.get(f),s.append(d).append("planep").appendI(f).append(" ").append(JU.Escape.eP(C[0])).append(JU.Escape.eP(C[1])),3==C.length&&s.append(JU.Escape.eP(C[2])),s.append(" color translucent ").append(ba);if(null==Q||0==Q.size())JS.SymmetryDesc.ptemp.add2(D,B),s.append(d).append("planeCircle scale 2.0 circle ").append(JU.Escape.eP(D)).append(JU.Escape.eP(JS.SymmetryDesc.ptemp)).append(" color translucent ").append(ba).append(" mesh fill")}A&&
(C=d+"inv",s.append(d).append("invPoint diameter 0.4 ").append(JU.Escape.eP(aa)),T?(JS.SymmetryDesc.ptemp.sub2(M,n),JS.SymmetryDesc.drawVector(s,d,"invArrow","vector","0.05",n,JS.SymmetryDesc.ptemp,m?"gray":"cyan")):(s.append(" color cyan"),r||(JS.SymmetryDesc.ptemp.sub2(t,M),JS.SymmetryDesc.drawVector(s,d,"invArrow","vector","0.05",M,JS.SymmetryDesc.ptemp,m?"gray":"cyan")),1073742066!=g&&(JS.SymmetryDesc.vtemp.setT(H),JS.SymmetryDesc.vtemp.scale(-1),JS.SymmetryDesc.drawFrameLine("X",M,JS.SymmetryDesc.vtemp,
0.15,JS.SymmetryDesc.ptemp,s,C,"red"),JS.SymmetryDesc.vtemp.setT(P),JS.SymmetryDesc.vtemp.scale(-1),JS.SymmetryDesc.drawFrameLine("Y",M,JS.SymmetryDesc.vtemp,0.15,JS.SymmetryDesc.ptemp,s,C,"green"),JS.SymmetryDesc.vtemp.setT(G),JS.SymmetryDesc.vtemp.scale(-1),JS.SymmetryDesc.drawFrameLine("Z",M,JS.SymmetryDesc.vtemp,0.15,JS.SymmetryDesc.ptemp,s,C,"blue"))));null!=E&&(null==F&&(F=JU.P3.newP(n)),JS.SymmetryDesc.drawVector(s,d,"transVector","vector",$?"0.1":"0.05",F,E,m&&!A&&!Z&&!O?"darkGray":"gold"));
JS.SymmetryDesc.ptemp2.setT(t);JS.SymmetryDesc.ptemp.sub2(x,t);JS.SymmetryDesc.ptemp.scaleAdd2(0.9,JS.SymmetryDesc.ptemp,JS.SymmetryDesc.ptemp2);JS.SymmetryDesc.drawLine(s,d+"frame2X",0.2,JS.SymmetryDesc.ptemp2,JS.SymmetryDesc.ptemp,"red");JS.SymmetryDesc.ptemp.sub2(w,t);JS.SymmetryDesc.ptemp.scaleAdd2(0.9,JS.SymmetryDesc.ptemp,JS.SymmetryDesc.ptemp2);JS.SymmetryDesc.drawLine(s,d+"frame2Y",0.2,JS.SymmetryDesc.ptemp2,JS.SymmetryDesc.ptemp,"green");JS.SymmetryDesc.ptemp.sub2(y,t);JS.SymmetryDesc.ptemp.scaleAdd2(0.9,
JS.SymmetryDesc.ptemp,JS.SymmetryDesc.ptemp2);JS.SymmetryDesc.drawLine(s,d+"frame2Z",0.2,JS.SymmetryDesc.ptemp2,JS.SymmetryDesc.ptemp,"purple");s.append("\nsym_point = "+JU.Escape.eP(n));s.append("\nvar p0 = "+JU.Escape.eP(JS.SymmetryDesc.ptemp2));R(n,JM.Atom)?(s.append("\nvar set2 = within(0.2,p0);if(!set2){set2 = within(0.2,p0.uxyz.xyz)}"),s.append("\n set2 &= {_"+n.getElementSymbol()+"}")):s.append("\nvar set2 = p0.uxyz");s.append("\nsym_target = set2;if (set2) {");!r&&(1073742066!=g&&null==e&&
!j)&&(s.append(d).append("offsetFrameX diameter 0.20 @{set2.xyz} @{set2.xyz + ").append(JU.Escape.eP(H)).append("*0.9} color red"),s.append(d).append("offsetFrameY diameter 0.20 @{set2.xyz} @{set2.xyz + ").append(JU.Escape.eP(P)).append("*0.9} color green"),s.append(d).append("offsetFrameZ diameter 0.20 @{set2.xyz} @{set2.xyz + ").append(JU.Escape.eP(G)).append("*0.9} color purple"));s.append("\n}\n");s=s.toString();JU.Logger.debugging&&JU.Logger.info(s)}null==E&&(p=null);O&&(!A&&0!=X)&&(E=JU.V3.newV(B),
JS.SymmetryDesc.ptemp.setT(E),b.toFractional(JS.SymmetryDesc.ptemp,!1),p=JU.V3.newV(JS.SymmetryDesc.ptemp));Z&&(N=0);A?T&&(p=E=B=D=null):S&&(B=D=null);null!=B&&B.normalize();g=null;if(k.get(0)||k.get(17))g=a.isBio?l.toString():0<a.modDim?a.xyzOriginal:JS.SymmetryOperation.getXYZFromMatrix(l,!1,!1,!1),u&&(g=a.fixMagneticXYZ(l,g,!0));j=Array(20);for(f=k.nextSetBit(0);0<=f;f=k.nextSetBit(f+1))switch(f){case 0:j[f]=g;break;case 19:null!=c&&(null==e&&!a.isBio&&0==a.modDim)&&(JS.SymmetryDesc.pta02.setT(c),
b.toFractional(JS.SymmetryDesc.pta02,!0),l.rotTrans(JS.SymmetryDesc.pta02),JS.SymmetryDesc.ptemp.setT(JS.SymmetryDesc.pta02),b.unitize(JS.SymmetryDesc.pta02),JS.SymmetryDesc.vtrans.sub2(JS.SymmetryDesc.pta02,JS.SymmetryDesc.ptemp),l=JU.M4.newM4(a),l.add(JS.SymmetryDesc.vtrans),m=JS.SymmetryOperation.getXYZFromMatrix(l,!1,!1,!1),u&&(m=a.fixMagneticXYZ(l,m,!0)),j[f]=m);break;case 1:j[f]=a.xyzOriginal;break;case 2:j[f]=z;break;case 3:j[f]=s;break;case 4:j[f]=JS.SymmetryDesc.approx0(p);break;case 5:j[f]=
JS.SymmetryDesc.approx0(E);break;case 6:j[f]=JS.SymmetryDesc.approx0(aa);break;case 7:j[f]=JS.SymmetryDesc.approx0(null!=D&&k.get(22)?n:D);break;case 8:j[f]=null==q?JS.SymmetryDesc.approx0(B):null;break;case 9:j[f]=0!=N?Integer.$valueOf(N):null;break;case 10:j[f]=l;break;case 11:j[f]=0<JS.SymmetryDesc.vtrans.lengthSquared()?JS.SymmetryDesc.vtrans:null;break;case 12:j[f]=a.getCentering();break;case 13:j[f]=Integer.$valueOf(a.timeReversal);break;case 14:null!=q&&k.get(22)&&(C=JU.Measure.distanceToPlane(q,
n),q.w-=C);j[f]=q;break;case 15:j[f]=K;break;case 16:j[f]=Integer.$valueOf(a.number);break;case 17:m=null;!a.isBio&&!g.equals(a.xyzOriginal)&&0<a.number&&(t=JS.SymmetryOperation.getMatrixFromXYZ(a.xyzOriginal),t.sub(l),m=new JU.P3,t.getTranslation(m));j[f]=(0>a.number?0:a.number)+(null==m?" [0 0 0]":" ["+v(-m.x)+" "+v(-m.y)+" "+v(-m.z)+"]");break;case 18:j[f]=a.xyzCanonical}return j},"JS.SymmetryOperation,J.api.SymmetryInterface,JU.P3,JU.P3,~S,~N,~N,~B,JU.BS");c$.drawLine=d(c$,"drawLine",function(a,
b,c,e,d,f){a.append(b).append(" diameter ").appendF(c).append(JU.Escape.eP(e)).append(JU.Escape.eP(d)).append(" color ").append(f)},"JU.SB,~S,~N,JU.P3,JU.P3,~S");c$.drawFrameLine=d(c$,"drawFrameLine",function(a,b,c,e,d,f,g,j){d.setT(b);d.add(c);JS.SymmetryDesc.drawLine(f,g+"Pt"+a,e,b,d,"translucent "+j)},"~S,JU.P3,JU.V3,~N,JU.P3,JU.SB,~S,~S");c$.drawVector=d(c$,"drawVector",function(a,b,c,e,d,f,g,j){e.equals("vline")&&(JS.SymmetryDesc.ptemp2.add2(f,g),e="",g=JS.SymmetryDesc.ptemp2);a.append(b).append(c).append(" diameter ").append(d+
" ").append(e).append(JU.Escape.eP(f)).append(JU.Escape.eP(g)).append(" color ").append(j)},"JU.SB,~S,~S,~S,~S,JU.T3,JU.T3,~S");c$.setFractional=d(c$,"setFractional",function(a,b,c,e){c.setT(b);null!=e&&a.toUnitCell(c,e);a.toFractional(c,!1)},"J.api.SymmetryInterface,JU.T3,JU.P3,JU.P3");c$.rotTransCart=d(c$,"rotTransCart",function(a,b,c,e){c=JU.P3.newP(c);b.toFractional(c,!1);a.rotTrans(c);c.add(e);b.toCartesian(c,!1);return c},"JS.SymmetryOperation,J.api.SymmetryInterface,JU.P3,JU.V3");c$.strCoord=
d(c$,"strCoord",function(a,b,c){JS.SymmetryDesc.approx0(b);return c?b.x+" "+b.y+" "+b.z:a.fcoord2(b)},"JS.SymmetryOperation,JU.T3,~B");c$.approx0=d(c$,"approx0",function(a){null!=a&&(a.x=JS.SymmetryDesc.approx0f(a.x),a.y=JS.SymmetryDesc.approx0f(a.y),a.z=JS.SymmetryDesc.approx0f(a.z));return a},"JU.T3");c$.approx0f=d(c$,"approx0f",function(a){return 1E-4>Math.abs(a)?0:a},"~N");c$.approx=d(c$,"approx",function(a){null!=a&&(a.x=JS.SymmetryOperation.approxF(a.x),a.y=JS.SymmetryOperation.approxF(a.y),
a.z=JS.SymmetryOperation.approxF(a.z));return a},"JU.T3");d(c$,"getSymmetryInfo",function(a,b,c,e,d,f,g,j,k,p,m,l,n,v){var u=0,r=JS.SymmetryDesc.nullReturn(m);switch(m){case 1073741994:return""+e.getLatticeType();case 1073742001:u=1825200146;break;case 135176:u=135176;break;case 1275068418:switch(u=JS.SymmetryDesc.getType(p),u){case 1140850689:case 1073741961:case 1073742001:case 134217751:case 1086326789:case 36868:m=u;break;default:u=JS.SymmetryDesc.getKeyType(p)}}var t=JS.SymmetryDesc.getInfoBS(u),
x=f,w=1073742066==v&&(1140850689==m||134217751==m)?k:null;null!=w&&(k=null);var y=null,y=null;if(null==k){if(null==d){k=e.getSymmetryOperations();if(null==k||0==f||Math.abs(f)>k.length)return r;x=Math.abs(f)-1;d=null==g?k[x].xyz:k[x].getxyzTrans(g);y=k[x].xyzOriginal}else x=f=0;k=new JS.Symmetry;k.setSpaceGroup(!1);d=(a=e.isBio())?k.addBioMoleculeOperation(e.getSpaceGroup().finalOperations[x],0>f):k.addSpaceGroupOperation((0>f?"!":"=")+d,Math.abs(f));if(0>d)return r;x=k.getSpaceGroupOperation(d);
null!=y&&(x.xyzOriginal=y);x.number=f;a||x.getCentering();null==j&&0<=c&&(j=this.modelSet.at[c]);if(134217751==m||1140850689==m){if(a)return r;k.setUnitCell(e);j=JU.P3.newP(j);e.toFractional(j,!1);if(Float.isNaN(j.x))return r;u=new JU.P3;k.newSpaceGroupPoint(j,d,null,0,0,0,u);1073742066==v&&(e.unitize(u),u.add(w));k.toCartesian(u,!1);return 1140850689==m?this.getAtom(e,b,c,u):u}y=this.createInfoArray(x,e,j,null,null==p?"sym":p,l,v,null!=g,t);1275068418==m&&null!=p&&(u=JS.SymmetryDesc.getKeyType(p))}else{d=
"info";w=!1;switch(m){case 1275068418:u=JS.SymmetryDesc.getKeyType(p);p=d=null;0==n&&(n=-1);break;case 1073742001:p=d=null;0==n&&(n=-1);w=!0;t.set(21);t.set(0);t.set(19);break;case 135176:null==p&&(p="sym");d="all";w=!0;break;case 1140850689:p=d=null;default:0==n&&(n=1)}v=this.getSymopInfoForPoints(a,b,f,g,j,k,p,d,l,n,v,t);if(w)return v;if(R(v,String))return r;y=v;if(1140850689==m)return!R(j,JM.Atom)&&!R(k,JM.Atom)&&(c=-1),null==y?r:this.getAtom(e,b,c,y[7])}if(null==y)return r;b=0<y.length&&R(y[0],
Array);if(0>n&&0>=f&&(1275068418==m||b)){1275068418==m&&(0<y.length&&!R(y[0],Array))&&(y=S(-1,[y]));b=new JU.Lst;for(d=0;d<y.length;d++)b.addLast(JS.SymmetryDesc.getInfo(y[d],0>u?u:m));return b}if(0>u&&(0<=n||0<f))m=u;0<n&&b&&(y=y[0]);return JS.SymmetryDesc.getInfo(y,m)},"J.api.SymmetryInterface,~N,~N,J.api.SymmetryInterface,~S,~N,JU.P3,JU.P3,JU.P3,~S,~N,~N,~N,~N");d(c$,"getAtom",function(a,b,c,e){var d=null;0<=c&&this.modelSet.getAtomBitsMDa(1094715402,Integer.$valueOf(this.modelSet.at[c].getElementNumber()),
d=new JU.BS);c=new JU.BS;this.modelSet.getAtomsWithin(0.02,e,c,b);null!=d&&c.and(d);c.isEmpty()&&(e=JU.P3.newP(e),a.toUnitCell(e,null),a.toCartesian(e,!1),this.modelSet.getAtomsWithin(0.02,e,c,b),null!=d&&c.and(d));return c},"J.api.SymmetryInterface,~N,~N,JU.T3");d(c$,"getSymopInfoForPoints",function(a,b,c,e,d,f,g,j,k,p,m,l){e=l.get(21)||l.get(3)&&3==l.cardinality();l.clear(21);var n=e?"":null;f=this.getSpaceGroupInfo(a,b,null,c,d,f,g,k,p,!1,!0,m,null,l);if(null==f)return n;a=f.get("operations");
if(null==a)return n;b=e?new JU.SB:null;c--;d=!e&&0>c;f=f.get("symmetryInfo");p="label".equals(j);for(k=j=0;k<a.length;k++)if(!(null==a[k]||0<=c&&c!=k))if(e){if(null!=g)return a[k][3]+"\nprint "+JU.PT.esc(f);0<b.length()&&b.appendC("\n");p||(0>c&&b.appendI(k+1).appendC("\t"),b.append(a[k][0]).appendC("\t"));b.append(a[k][2])}else{if(!d)return a[k];a[j++]=a[k]}if(!e){c=Array(j);for(k=0;k<j;k++)c[k]=a[k];return c}return 0==b.length()?null!=g?"draw "+g+"* delete":n:b.toString()},"J.api.SymmetryInterface,~N,~N,JU.P3,JU.P3,JU.P3,~S,~S,~N,~N,~N,JU.BS");
d(c$,"getSymopInfo",function(a,b,c,e,d,f,g,j,k,p,m){0==j&&(j=JS.SymmetryDesc.getType(g));var l=1140850689==j?new JU.BS:"";if(0>a)return l;var n=this.modelSet.at[a].mi,v=this.modelSet.am[n].biosymmetry;if(null==v&&null==(v=this.modelSet.getUnitCell(n)))return l;if(135176!=j||2147483647!=c)return this.getSymmetryInfo(v,n,a,v,b,c,e,d,f,g,j,k,p,m);j="";c=v.getSymmetryOperations();if(null!=c){null==g&&(g="sg");l=c.length;for(c=1;c<=l;c++)j+=this.getSymmetryInfo(v,n,a,v,b,c,e,d,f,g+c,135176,k,p,m)}return j},
"~N,~S,~N,JU.P3,JU.P3,JU.P3,~S,~N,~N,~N,~N");d(c$,"getSpaceGroupInfo",function(a,b,c,e,d,f,g,j,k,p,m,l,n,v){null==v&&(v=new JU.BS,v.setBits(0,JS.SymmetryDesc.keys.length),v.clear(19));var u=1==v.cardinality()&&v.get(10),r=null,t=!u&&null==d&&null==g&&0>=k&&v.cardinality()>=JS.SymmetryDesc.keys.length,x=!1,w=null,y=null!=c&&0<c.length,H=y&&0<=c.indexOf("[--]");if(m||!y){var L=t&&0==e;if(u)n=a;else{0>b&&(b=R(d,JM.Atom)?d.mi:this.modelSet.vwr.am.cmi);if(0>b)w="no single current model";else if(null==
n&&!(x=null!=(n=this.modelSet.am[b].biosymmetry))&&null==(n=this.modelSet.getUnitCell(b)))w="not applicable";null!=w?(r=new java.util.Hashtable,r.put("spaceGroupInfo",""),r.put("spaceGroupNote",w),r.put("symmetryInfo","")):t&&(r=this.modelSet.getInfo(b,"spaceGroupInfo"));if(null!=r)return r;c=n.getSpaceGroupName()}var r=new java.util.Hashtable,w=n.getSymmetryOperations(),G=x?n.spaceGroup:null,t=H?"":null,A=0;if(null!=w){u||(x?a.setSpaceGroupTo(JS.SpaceGroup.getNull(!1,!1,!1)):a.setSpaceGroup(!1));
0!=w[0].timeReversal&&(a.getSpaceGroupOperation(0).timeReversal=1);for(var E=Array(w.length),D="",B=0,M=0;B<w.length&&M!=k;B++){var F=w[B],O=F.xyzOriginal,N;if(u)N=B;else{N=!(0==B&&0<=F.xyz.indexOf("x4"))&&null!=a.getSpaceGroupOperation(B)?B:x?a.addBioMoleculeOperation(G.finalOperations[B],!1):a.addSpaceGroupOperation("="+F.xyz,B+1);if(0>N)continue;F=a.getSpaceGroupOperation(B);if(null==F)continue;F.xyzOriginal=O}null!=t&&(t+=";"+F.xyz);F=0<e&&e-1!=N?null:this.createInfoArray(F,n,d,f,g,j,l,!1,v);
null!=F&&!(0<k&&++M!=k)&&(E[B]=F,u||(D+="\n"+(B+1)+"\t"+F[v.get(19)?19:0]+"\t"+F[2]),A++)}r.put("operations",E);u||r.put("symmetryInfo",0==D.length?"":D.substring(1))}if(u)return r;w=0==A?"\n no symmetry operations":0>=k&&0>=e?"\n"+A+" symmetry operation"+(1==A?":\n":"s:\n"):"";null!=t&&(c=t.substring(t.indexOf(";")+1));L&&this.modelSet.setInfo(b,"spaceGroupInfo",r)}else r=new java.util.Hashtable;r.put("spaceGroupName",c);r.put("spaceGroupNote",null==w?"":w);if(x)a=c;else if(y&&!H&&a.setSpaceGroupName(c),
a=a.getSpaceGroupInfoObj(c,null==n?null:n.getUnitCellParams(),p,!m),null==a||a.equals("?"))a="?",r.put("spaceGroupNote","could not identify space group from name: "+c+'\nformat: show spacegroup "2" or "P 2c" or "C m m m" or "x, y, z;-x ,-y, -z"');r.put("spaceGroupInfo",a);return r},"J.api.SymmetryInterface,~N,~S,~N,JU.P3,JU.P3,~S,~N,~N,~B,~B,~N,J.api.SymmetryInterface,JU.BS");d(c$,"getTransform",function(a,b,c,e,d){null==JS.SymmetryDesc.pta01&&(JS.SymmetryDesc.pta01=new JU.P3,JS.SymmetryDesc.pta02=
new JU.P3,JS.SymmetryDesc.ptemp=new JU.P3,JS.SymmetryDesc.vtrans=new JU.V3);JS.SymmetryDesc.pta02.setT(e);JS.SymmetryDesc.vtrans.setT(JS.SymmetryDesc.pta02);a.unitize(JS.SymmetryDesc.pta02);e=3.4028235E38;for(var f=-1,g=0,j=b.length;g<j;g++){var k=b[g];JS.SymmetryDesc.pta01.setT(c);k.rotTrans(JS.SymmetryDesc.pta01);JS.SymmetryDesc.ptemp.setT(JS.SymmetryDesc.pta01);a.unitize(JS.SymmetryDesc.pta01);var p=JS.SymmetryDesc.pta01.distanceSquared(JS.SymmetryDesc.pta02);if(1.96E-6>p){JS.SymmetryDesc.vtrans.sub(JS.SymmetryDesc.ptemp);
a.normalize(JS.SymmetryDesc.vtrans);k=JU.M4.newM4(k);k.add(JS.SymmetryDesc.vtrans);JS.SymmetryDesc.pta01.setT(c);k.rotTrans(JS.SymmetryDesc.pta01);a.unitize(JS.SymmetryDesc.pta01);p=JS.SymmetryDesc.pta01.distanceSquared(JS.SymmetryDesc.pta02);if(1.96E-6<=p)continue;return k}p<e&&(e=p,f=g)}d&&(k=b[f],JS.SymmetryDesc.pta01.setT(c),k.rotTrans(JS.SymmetryDesc.pta01),a.unitize(JS.SymmetryDesc.pta01),System.err.println(""+f+" "+JS.SymmetryDesc.pta01.distance(JS.SymmetryDesc.pta02)+" "+JS.SymmetryDesc.pta01+
" "+JS.SymmetryDesc.pta02+" "+JU.V3.newVsub(JS.SymmetryDesc.pta02,JS.SymmetryDesc.pta01)));return null},"JS.UnitCell,~A,JU.P3,JU.P3,~B");T(c$,"THIN_LINE","0.05","THICK_LINE","0.1","RET_XYZ",0,"RET_XYZORIGINAL",1,"RET_LABEL",2,"RET_DRAW",3,"RET_FTRANS",4,"RET_CTRANS",5,"RET_INVCTR",6,"RET_POINT",7,"RET_AXISVECTOR",8,"RET_ROTANGLE",9,"RET_MATRIX",10,"RET_UNITTRANS",11,"RET_CTRVECTOR",12,"RET_TIMEREV",13,"RET_PLANE",14,"RET_TYPE",15,"RET_ID",16,"RET_CIF2",17,"RET_XYZCANON",18,"RET_XYZNORMALIZED",19,
"RET_COUNT",20,"RET_LIST",21,"RET_INVARIANT",22,"keys",S(-1,["xyz","xyzOriginal","label",null,"fractionalTranslation","cartesianTranslation","inversionCenter",null,"axisVector","rotationAngle","matrix","unitTranslation","centeringVector","timeReversal","plane","_type","id","cif2","xyzCanonical","xyzNormalized"]));c$.vtemp=c$.prototype.vtemp=new JU.V3;c$.ptemp=c$.prototype.ptemp=new JU.P3;c$.ptemp2=c$.prototype.ptemp2=new JU.P3;c$.pta01=c$.prototype.pta01=new JU.P3;c$.pta02=c$.prototype.pta02=new JU.P3;
c$.vtrans=c$.prototype.vtrans=new JU.V3});$("JS");V(["JU.SimpleUnitCell","JU.P3","JV.JC"],"JS.UnitCell","java.lang.Double $.Float java.util.Hashtable JU.Lst $.M3 $.M4 $.P4 $.PT $.Quat $.T4 $.V3 J.api.Interface JS.Symmetry JU.BoxInfo $.Escape".split(" "),function(){c$=N(function(){this.fractionalOffset=this.vertices=null;this.allFractionalRelative=!1;this.moreInfo=this.unitCellMultiplied=this.unitCellMultiplier=this.cartesianOffset=null;this.name="";F(this,arguments)},JS,"UnitCell",JU.SimpleUnitCell,
Cloneable);Y(c$,function(){this.cartesianOffset=new JU.P3});c$.fromOABC=d(c$,"fromOABC",function(a,b){var c=new JS.UnitCell;3==a.length&&(a=S(-1,[new JU.P3,a[0],a[1],a[2]]));var e=H(-1,[-1,0,0,0,0,0,a[1].x,a[1].y,a[1].z,a[2].x,a[2].y,a[2].z,a[3].x,a[3].y,a[3].z]);c.init(e);c.allFractionalRelative=b;c.initUnitcellVertices();c.setCartesianOffset(a[0]);return c},"~A,~B");c$.fromParams=d(c$,"fromParams",function(a,b){var c=new JS.UnitCell;c.init(a);c.initUnitcellVertices();c.allFractionalRelative=b;return c},
"~A,~B");d(c$,"initOrientation",function(a){if(null!=a){var b=new JU.M4;b.setToM3(a);this.matrixFractionalToCartesian.mul2(b,this.matrixFractionalToCartesian);this.matrixCartesianToFractional.setM4(this.matrixFractionalToCartesian).invert();this.initUnitcellVertices()}},"JU.M3");d(c$,"toUnitCell",function(a,b){null!=this.matrixCartesianToFractional&&(null==b?(this.matrixCartesianToFractional.rotTrans(a),this.unitize(a),this.matrixFractionalToCartesian.rotTrans(a)):(this.matrixCtoFNoOffset.rotTrans(a),
this.unitize(a),a.add(b),this.matrixFtoCNoOffset.rotTrans(a)))},"JU.T3,JU.T3");d(c$,"toUnitCellRnd",function(a,b){null!=this.matrixCartesianToFractional&&(null==b?(this.matrixCartesianToFractional.rotTrans(a),this.unitizeRnd(a),this.matrixFractionalToCartesian.rotTrans(a)):(this.matrixCtoFNoOffset.rotTrans(a),this.unitizeRnd(a),a.add(b),this.matrixFtoCNoOffset.rotTrans(a)))},"JU.T3,JU.T3");d(c$,"unitize",function(a){JU.SimpleUnitCell.unitizeDim(this.dimension,a)},"JU.T3");d(c$,"unitizeRnd",function(a){JU.SimpleUnitCell.unitizeDimRnd(this.dimension,
a)},"JU.T3");d(c$,"reset",function(){this.unitCellMultiplied=this.unitCellMultiplier=null;this.setOffset(JU.P3.new3(0,0,0))});d(c$,"setOffset",function(a){if(null!=a){this.unitCellMultiplied=null;var b=R(a,JU.T4)?a:null,c=null==b?1.4E-45:b.w,e=999999<c;if(null!=b?0>=c||e:100<=a.x||100<=a.y)if(this.unitCellMultiplier=0==a.z&&a.x==a.y&&!e?null:e?JU.P4.newPt(b):JU.P3.newP(a),this.unitCellMultiplied=null,null==b||0==b.w||e)return;if(this.hasOffset()||0<a.lengthSquared())this.fractionalOffset=new JU.P3,
this.fractionalOffset.setT(a);this.matrixCartesianToFractional.m03=-a.x;this.matrixCartesianToFractional.m13=-a.y;this.matrixCartesianToFractional.m23=-a.z;this.cartesianOffset.setT(a);this.matrixFractionalToCartesian.m03=0;this.matrixFractionalToCartesian.m13=0;this.matrixFractionalToCartesian.m23=0;this.matrixFractionalToCartesian.rotTrans(this.cartesianOffset);this.matrixFractionalToCartesian.m03=this.cartesianOffset.x;this.matrixFractionalToCartesian.m13=this.cartesianOffset.y;this.matrixFractionalToCartesian.m23=
this.cartesianOffset.z;this.allFractionalRelative&&(this.matrixCtoFNoOffset.setM4(this.matrixCartesianToFractional),this.matrixFtoCNoOffset.setM4(this.matrixFractionalToCartesian))}},"JU.T3");d(c$,"setCartesianOffset",function(a){this.cartesianOffset.setT(a);this.matrixFractionalToCartesian.m03=this.cartesianOffset.x;this.matrixFractionalToCartesian.m13=this.cartesianOffset.y;this.matrixFractionalToCartesian.m23=this.cartesianOffset.z;a=this.hasOffset();this.fractionalOffset=new JU.P3;this.fractionalOffset.setT(this.cartesianOffset);
this.matrixCartesianToFractional.m03=0;this.matrixCartesianToFractional.m13=0;this.matrixCartesianToFractional.m23=0;this.matrixCartesianToFractional.rotTrans(this.fractionalOffset);this.matrixCartesianToFractional.m03=-this.fractionalOffset.x;this.matrixCartesianToFractional.m13=-this.fractionalOffset.y;this.matrixCartesianToFractional.m23=-this.fractionalOffset.z;this.allFractionalRelative&&(this.matrixCtoFNoOffset.setM4(this.matrixCartesianToFractional),this.matrixFtoCNoOffset.setM4(this.matrixFractionalToCartesian));
!a&&0==this.fractionalOffset.lengthSquared()&&(this.fractionalOffset=null)},"JU.T3");d(c$,"getInfo",function(){var a=this.getUnitCellMultiplied();if(a!==this)return a.getInfo();a=new java.util.Hashtable;a.put("params",this.unitCellParams);a.put("oabc",this.getUnitCellVectors());a.put("volume",Double.$valueOf(this.volume));a.put("matFtoC",this.matrixFractionalToCartesian);a.put("matCtoF",this.matrixCartesianToFractional);return a});d(c$,"dumpInfo",function(a,b){var c=b?this.getUnitCellMultiplied():
this;return c!==this?c.dumpInfo(a,!1):"a="+this.a+", b="+this.b+", c="+this.c+", alpha="+this.alpha+", beta="+this.beta+", gamma="+this.gamma+"\noabc="+JU.Escape.eAP(this.getUnitCellVectors())+"\nvolume="+this.volume+(a?"\nfractional to cartesian: "+this.matrixFractionalToCartesian+"\ncartesian to fractional: "+this.matrixCartesianToFractional:"")},"~B,~B");d(c$,"getUnitCellMultiplied",function(){if(null==this.unitCellMultiplier||0<this.unitCellMultiplier.z&&this.unitCellMultiplier.z==v(this.unitCellMultiplier.z))return this;
if(null==this.unitCellMultiplied){var a=JU.BoxInfo.toOABC(this.getScaledCell(!0),null);this.unitCellMultiplied=JS.UnitCell.fromOABC(a,!1)}return this.unitCellMultiplied});d(c$,"getVertices",function(){return this.vertices});d(c$,"getCartesianOffset",function(){return this.cartesianOffset});d(c$,"getFractionalOffset",function(){return this.fractionalOffset});d(c$,"getTensor",function(a,b){var c=J.api.Interface.getUtil("Tensor",a,"file");if(0==b[0]&&0==b[1]&&0==b[2]){var e=b[7],d=H(-1,[e,e,e]);return c.setFromEigenVectors(JS.UnitCell.unitVectors,
d,"iso","Uiso="+e,null)}c.parBorU=b;var e=fa(6,0),f=v(b[6]);if(12==f)e[0]=19.739208802178716*b[0],e[1]=19.739208802178716*b[1],e[2]=19.739208802178716*b[2],e[3]=39.47841760435743*b[3],e[4]=39.47841760435743*b[4],e[5]=39.47841760435743*b[5],b[7]=(b[0]+b[1]+b[3])/3;else{var d=4==f||5==f||8==f||9==f,g=2-f%2,j=8==f||9==f||10==f?19.739208802178716:4==f||5==f?0.25:2==f||3==f?Math.log(2):1,f=b[0]*j*(d?this.a_*this.a_:1),k=b[1]*j*(d?this.b_*this.b_:1),p=b[2]*j*(d?this.c_*this.c_:1),m=b[3]*j*(d?this.a_*this.b_:
1)*g,l=b[4]*j*(d?this.a_*this.c_:1)*g,d=b[5]*j*(d?this.b_*this.c_:1)*g;b[7]=Math.pow(f/19.739208802178716/this.a_/this.a_*k/19.739208802178716/this.b_/this.b_*p/19.739208802178716/this.c_/this.c_,0.3333);e[0]=this.a*this.a*f+this.b*this.b*this.cosGamma*this.cosGamma*k+this.c*this.c*this.cosBeta*this.cosBeta*p+this.a*this.b*this.cosGamma*m+this.b*this.c*this.cosGamma*this.cosBeta*d+this.a*this.c*this.cosBeta*l;e[1]=this.b*this.b*this.sinGamma*this.sinGamma*k+this.c*this.c*this.cA_*this.cA_*p+this.b*
this.c*this.cA_*this.sinGamma*d;e[2]=this.c*this.c*this.cB_*this.cB_*p;e[3]=2*this.b*this.b*this.cosGamma*this.sinGamma*k+2*this.c*this.c*this.cA_*this.cosBeta*p+this.a*this.b*this.sinGamma*m+this.b*this.c*(this.cA_*this.cosGamma+this.sinGamma*this.cosBeta)*d+this.a*this.c*this.cA_*l;e[4]=2*this.c*this.c*this.cB_*this.cosBeta*p+this.b*this.c*this.cosGamma*d+this.a*this.c*this.cB_*l;e[5]=2*this.c*this.c*this.cA_*this.cB_*p+this.b*this.c*this.cB_*this.sinGamma*d}return c.setFromThermalEquation(e,JU.Escape.eAF(b))},
"JV.Viewer,~A");d(c$,"getCanonicalCopy",function(a,b){var c=this.getScaledCell(b);return JU.BoxInfo.getCanonicalCopy(c,a)},"~N,~B");d(c$,"getScaledCell",function(a){var b=Array(8),c=null,e=null;a&&(null!=this.unitCellMultiplier&&0==this.unitCellMultiplier.z)&&(c=new JU.P3,e=new JU.P3,JU.SimpleUnitCell.ijkToPoint3f(v(this.unitCellMultiplier.x),c,0,0),JU.SimpleUnitCell.ijkToPoint3f(v(this.unitCellMultiplier.y),e,0,0),e.sub(c));for(var d=null==this.unitCellMultiplier||0==this.unitCellMultiplier.z?1:
Math.abs(this.unitCellMultiplier.z),f=0;8>f;f++){var g=b[f]=JU.P3.newP(JU.BoxInfo.unitCubePoints[f]);null!=c&&b[f].add3(c.x+e.x*g.x,c.y+e.y*g.y,c.z+e.z*g.z);b[f].scale(d);this.matrixFractionalToCartesian.rotTrans(g);a||g.sub(this.cartesianOffset)}return b},"~B");d(c$,"initUnitcellVertices",function(){if(null!=this.matrixFractionalToCartesian){this.matrixCtoFNoOffset=JU.M4.newM4(this.matrixCartesianToFractional);this.matrixFtoCNoOffset=JU.M4.newM4(this.matrixFractionalToCartesian);this.vertices=Array(8);
for(var a=8;0<=--a;)this.vertices[a]=this.matrixFractionalToCartesian.rotTrans2(JU.BoxInfo.unitCubePoints[a],new JU.P3)}});d(c$,"checkDistance",function(a,b,c,e,d,f,g,j){a=JU.P3.newP(a);this.toCartesian(a,!0);for(var k=-d;k<=d;k++)for(var l=-f;l<=f;l++)for(var m=-g;m<=g;m++){j.set(b.x+k,b.y+l,b.z+m);this.toCartesian(j,!0);var q=a.distance(j);if(0<e?Math.abs(q-c)<=e:q<=c&&0.1<q)return j.set(k,l,m),!0}return!1},"JU.P3,JU.P3,~N,~N,~N,~N,~N,JU.P3");d(c$,"getUnitCellMultiplier",function(){return this.unitCellMultiplier});
d(c$,"getUnitCellVectors",function(){var a=this.matrixFractionalToCartesian;return S(-1,[JU.P3.newP(this.cartesianOffset),JU.P3.new3(this.fix(a.m00),this.fix(a.m10),this.fix(a.m20)),JU.P3.new3(this.fix(a.m01),this.fix(a.m11),this.fix(a.m21)),JU.P3.new3(this.fix(a.m02),this.fix(a.m12),this.fix(a.m22))])});d(c$,"fix",function(a){return 0.001>Math.abs(a)?0:a},"~N");d(c$,"isSameAs",function(a){if(a.unitCellParams.length!=this.unitCellParams.length)return!1;for(var b=this.unitCellParams.length;0<=--b;)if(this.unitCellParams[b]!=
a.unitCellParams[b]&&(!Float.isNaN(this.unitCellParams[b])||!Float.isNaN(a.unitCellParams[b])))return!1;return null==this.fractionalOffset?!a.hasOffset():null==a.fractionalOffset?!this.hasOffset():0==this.fractionalOffset.distanceSquared(a.fractionalOffset)},"JS.UnitCell");d(c$,"hasOffset",function(){return null!=this.fractionalOffset&&0!=this.fractionalOffset.lengthSquared()});d(c$,"getQuaternionRotation",function(a){var b=JU.V3.newVsub(this.vertices[4],this.vertices[0]),c=JU.V3.newVsub(this.vertices[2],
this.vertices[0]),e=JU.V3.newVsub(this.vertices[1],this.vertices[0]),d=new JU.V3,f=new JU.V3,g="-"==a.charAt(0)?-1:1;0>g&&(a=a.substring(1));var j=a;a=JU.PT.rep(JU.PT.rep(JU.PT.rep(JU.PT.rep(JU.PT.rep(JU.PT.rep(a,"ab","A"),"bc","B"),"ca","C"),"ba","D"),"cb","E"),"ac","F");var k=(j=!j.equals(a))?1:0;2==a.length&&(k=a.charCodeAt(1)-48,a=a.substring(0,1));var l=0==k%2;switch("abcABCDEF".indexOf(a)){case 7:g=-g;case 4:b.cross(e,c),k=(5-k)%4+1;default:a=b;b=e;break;case 8:g=-g;case 5:g=-g,c.cross(e,b),
k=(2+k)%4+1;case 1:a=c;c=e;g=-g;break;case 3:g=-g;case 6:e.cross(b,c),l&&(k=6-k);case 2:a=e,!j&&0<k&&(k=5-k)}0<k&&0<g!=l&&(b=c,a.scale(-1));switch(k){case 2:a.scale(-1);b.scale(-1);break;case 3:b.scale(-1);break;case 4:a.scale(-1)}d.cross(a,b);f.cross(d,a);return JU.Quat.getQuaternionFrame(null,f,d).inv()},"~S");d(c$,"getV0abc",function(a,b){if(R(a,Array))return a;var c,e=!1,d=Array(4),f=d[0]=JU.V3.new3(0,0,0);d[1]=JU.V3.new3(1,0,0);d[2]=JU.V3.new3(0,1,0);d[3]=JU.V3.new3(0,0,1);var g=new JU.M3;if(R(a,
String)){c=a;var j="0,0,0";if(0==c.indexOf("a="))return JU.SimpleUnitCell.setOabc(c,null,d);e=c.indexOf(";");0<=e&&(j=c.substring(e+1),c=c.substring(0,e));c+=";0,0,0";(e=c.startsWith("!"))&&(c=c.substring(1));var k=new JS.Symmetry;k.setSpaceGroup(!1);c=k.addSpaceGroupOperation("="+c,0);if(0>c)return null;c=k.getSpaceGroupOperation(c);c.doFinalize();j=JU.PT.split(j,",");k=H(3,0);if(3==j.length)for(var l=0;3>l;l++){var m=j[l],q=m.indexOf("/");k[l]=0<=q?JU.PT.parseFloat(m.substring(0,q))/JU.PT.parseFloat(m.substring(q+
1)):JU.PT.parseFloat(m)}j=JU.P3.new3(k[0],k[1],k[2]);c.setTranslation(j);null!=b&&b.setM4(c)}else if(R(a,JU.M3))c=JU.M4.newMV(a,new JU.P3);else if(R(a,JU.M4))c=a;else{c=a[0];c.getRotationScale(g);this.toCartesian(f,!1);c.rotTrans(f);for(c=1;4>c;c++)this.toCartesian(d[c],!0),g.rotate(d[c]);return d}c.getRotationScale(g);c.getTranslation(f);e?(g.invert(),g.transpose(),g.rotate(f),f.scale(-1)):g.transpose();this.toCartesian(f,!1);for(c=1;4>c;c++)g.rotate(d[c]),this.toCartesian(d[c],!0);return d},"~O,JU.M4");
d(c$,"toFromPrimitive",function(a,b,c,d){var h=c.length-3,f=null;if("r"==b||null==d){switch(b){default:return!1;case "r":return JU.SimpleUnitCell.getReciprocal(c,c,1),!0;case "P":a=!0;f=JU.M3.newA9(H(-1,[1,0,0,0,1,0,0,0,1]));break;case "A":f=JU.M3.newA9(H(-1,[1,0,0,0,0.5,0.5,0,-0.5,0.5]));break;case "B":f=JU.M3.newA9(H(-1,[0.5,0,0.5,0,1,0,-0.5,0,0.5]));break;case "C":f=JU.M3.newA9(H(-1,[0.5,0.5,0,-0.5,0.5,0,0,0,1]));break;case "R":f=JU.M3.newA9(H(-1,[0.6666667,-0.33333334,-0.33333334,0.33333334,0.33333334,
-0.6666667,0.33333334,0.33333334,0.33333334]));break;case "I":f=JU.M3.newA9(H(-1,[-0.5,0.5,0.5,0.5,-0.5,0.5,0.5,0.5,-0.5]));break;case "F":f=JU.M3.newA9(H(-1,[0,0.5,0.5,0.5,0,0.5,0.5,0.5,0]))}a||f.invert()}else f=JU.M3.newM3(d),a&&f.invert();for(a=c.length;--a>=h;)b=c[a],this.toFractional(b,!1),f.rotate(b),this.toCartesian(b,!1);return!0},"~B,~S,~A,JU.M3");d(c$,"getConventionalUnitCell",function(a,b){var c=this.getUnitCellVectors();(!a.equals("P")||null!=b)&&this.toFromPrimitive(!1,a.charAt(0),c,
b);return c},"~S,JU.M3");c$.cloneUnitCell=d(c$,"cloneUnitCell",function(a){var b=null;try{b=a.clone()}catch(c){if(!U(c,CloneNotSupportedException))throw c;}return b},"JS.UnitCell");d(c$,"getEquivPoints",function(a,b,c,d,h,f){var g=0<=b.indexOf("fromfractional"),j=0<=b.indexOf("tofractional");b=0<=b.indexOf("packed");null==d&&(d=new JU.Lst);a=JU.P3.newP(a);g||this.toFractional(a,!0);for(var g=d.size(),k=0,l=c.length;k<l;k++){var m=JU.P3.newP(a);c[k].rotTrans(m);m.x-=Math.floor(m.x);m.y-=Math.floor(m.y);
m.z-=Math.floor(m.z);d.addLast(m);g++}if(b)for(k=f;k<g;k++)a.setT(d.get(k)),this.unitizeRnd(a),0==a.x&&(d.addLast(JU.P3.new3(0,a.y,a.z)),d.addLast(JU.P3.new3(1,a.y,a.z)),0==a.y&&(d.addLast(JU.P3.new3(1,1,a.z)),d.addLast(JU.P3.new3(0,0,a.z)),0==a.z&&(d.addLast(JU.P3.new3(1,1,1)),d.addLast(JU.P3.new3(0,0,0))))),0==a.y&&(d.addLast(JU.P3.new3(a.x,0,a.z)),d.addLast(JU.P3.new3(a.x,1,a.z)),0==a.z&&(d.addLast(JU.P3.new3(a.x,0,0)),d.addLast(JU.P3.new3(a.x,1,1)))),0==a.z&&(d.addLast(JU.P3.new3(a.x,a.y,0)),
d.addLast(JU.P3.new3(a.x,a.y,1)),0==a.x&&(d.addLast(JU.P3.new3(0,a.y,0)),d.addLast(JU.P3.new3(1,a.y,1))));JS.UnitCell.checkDuplicate(d,h,f,-1);if(!j)for(k=d.size();--k>=f;)this.toCartesian(d.get(k),!0);return d},"JU.P3,~S,~A,JU.Lst,~N,~N");c$.checkDuplicate=d(c$,"checkDuplicate",function(a,b,c,d){for(0>d&&(d=a.size());b<d;b++)for(var h=a.get(b),f=Math.max(b+1,c);f<d;f++)1.96E-6>a.get(f).distanceSquared(h)&&(a.removeItemAt(f),d--,f--)},"JU.Lst,~N,~N,~N");d(c$,"normalize",function(a){a.x=JU.SimpleUnitCell.normalizeXRnd(a.x);
a.y=JU.SimpleUnitCell.normalizeXRnd(a.y);a.z=JU.SimpleUnitCell.normalizeXRnd(a.z)},"JU.V3");d(c$,"getState",function(){var a="";null!=this.fractionalOffset&&0!=this.fractionalOffset.lengthSquared()&&(a+="  unitcell offset "+JU.Escape.eP(this.fractionalOffset)+";\n");null!=this.unitCellMultiplier&&(a+="  unitcell range "+JU.SimpleUnitCell.escapeMultiplier(this.unitCellMultiplier)+";\n");return a});T(c$,"twoP2",19.739208802178716);c$.unitVectors=c$.prototype.unitVectors=S(-1,[JV.JC.axisX,JV.JC.axisY,
JV.JC.axisZ])})})(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);
