(function(rb,sb,tb,ub,E,vb,aa,R,N,S,I,y,wb,$,xb,ba,O,F,bb,pa,Ma,yb,cb,zb,ja,sa,Fa,C,Ab,Bb,Ga,Cb,db,Db,Eb,Na,Fb,Gb,Hb,Ib,Jb,Kb,Lb,Mb,Nb,Ob,Pb,Qb,Rb,Sb,Tb,Ub,Vb,Wb,Xb,d,m,qb){aa("J.adapter.smarter");N(["JS.Symmetry","JU.P3","$.SB"],"J.adapter.smarter.XtalSymmetry","java.util.Hashtable JU.A4 $.BS $.Lst $.M3 $.M4 $.P3i $.PT $.V3 J.adapter.smarter.Atom JS.SpaceGroup $.SymmetryOperation $.UnitCell JU.BSUtil $.Logger $.SimpleUnitCell".split(" "),function(){var b=I(function(){this.acr=null;this.applySymmetryToBonds=
!1;this.baseSymmetry=this.asc=null;this.bondCount0=0;this.bondsFound=null;this.crystalReaderLatticeOpsOnly=this.checkNearAtoms=this.checkAll=this.centroidPacked=!1;this.disorderMap=null;this.disorderMapMax=0;this.doCentroidUnitCell=!1;this.doNormalize=!0;this.doPackUnitCell=!1;this.filterSymop=null;this.firstAtom=0;this.latticeCells=null;this.latticeOp=0;this.mTemp=this.maxXYZ0=this.minXYZ0=this.maxXYZ=this.minXYZ=this.mident=null;this.ndims=3;this.packingRange=this.noSymmetryCount=0;this.symmetry=
this.rmax=this.rmin=this.ptTemp=this.ptOffset=null;this.symmetryRange=0;this.unitCellTranslations=this.unitCellParams=this.trajectoryUnitCells=null;S(this,arguments)},J.adapter.smarter,"XtalSymmetry",null);pa(b,function(){this.bondsFound=new JU.SB;this.ptOffset=new JU.P3});$(b,function(){});d(b,"addRotatedTensor",function(a,c,f,e,v){null==this.ptTemp&&(this.ptTemp=new JU.P3,this.mTemp=new JU.M3);return a.addTensor(this.acr.getInterface("JU.Tensor").setFromEigenVectors(v.rotateAxes(f,c.eigenVectors,
this.ptTemp,this.mTemp),c.eigenValues,c.isIsotropic?"iso":c.type,c.id,c),null,e)},"J.adapter.smarter.Atom,JU.Tensor,~N,~B,J.adapter.smarter.XtalSymmetry.FileSymmetry");d(b,"applySymmetryBio",function(a,c,f){var e=a.get("biomts"),v=e.size();null==this.mident&&(this.mident=new JU.M4,this.mident.setIdentity());this.acr.lstNCS=null;this.setLatticeCells();var b=null!=this.latticeCells&&0!=this.latticeCells[0]?O(3,0):null;if(null!=b)for(var h=0;3>h;h++)b[h]=this.latticeCells[h];this.latticeCells=null;var k=
"",b=this.acr.getFilterWithCase("BMCHAINS"),l=-1;if(null!=b&&0<(b=b.trim()).length)"="==b.charAt(0)&&(b=b.substring(1).trim()),b.equals("_")?(k="_",l=0):(l=0==b.length?0:JU.PT.parseInt(b),-2147483648==l&&(l=-b.charAt(0).charCodeAt(0)));var j=0<=f.indexOf("BYCHAIN")?1:0<=f.indexOf("BYSYMOP")?2:0;this.doNormalize=!1;var d=a.get("chains");(this.symmetry=new J.adapter.smarter.XtalSymmetry.FileSymmetry).setSpaceGroup(this.doNormalize);this.addSpaceGroupOperation("x,y,z",!1);b=a.get("name");this.setAtomSetSpaceGroupName(this.acr.sgName=
b);this.applySymmetryToBonds=c;this.bondCount0=this.asc.bondCount;this.firstAtom=this.asc.getLastAtomSetAtomIndex();var b=this.asc.ac,p=new java.util.Hashtable,t=0,s=this.asc.atoms;c=this.bondCount0>this.asc.bondIndex0&&c;switch(j){case 1:for(h=b;--h>=this.firstAtom;){var r=Integer.$valueOf(s[h].chainID),n=p.get(r);null==n&&(t++,p.put(r,n=new JU.BS));n.set(h)}this.asc.bsAtoms=new JU.BS;for(h=0;h<t;h++)this.asc.bsAtoms.set(b+h),c=new J.adapter.smarter.Atom,c.set(0,0,0),c.radius=16,this.asc.addAtom(c);
for(var z=0,u,p=p.entrySet().iterator();p.hasNext()&&((u=p.next())||1);){c=s[b+z++];n=u.getValue();for(h=n.nextSetBit(0);0<=h;h=n.nextSetBit(h+1))c.add(s[h]);c.scale(1/n.cardinality());c.atomName="Pt"+z;c.chainID=u.getKey().intValue()}this.firstAtom=b;b+=t;c=!1;break;case 2:this.asc.bsAtoms=new JU.BS;this.asc.bsAtoms.set(b);c=s[b]=new J.adapter.smarter.Atom;c.set(0,0,0);for(h=b;--h>=this.firstAtom;)c.add(s[h]);c.scale(1/(b-this.firstAtom));c.atomName="Pt";c.radius=16;this.asc.addAtom(c);this.firstAtom=
b++;c=!1}t=a.get("asemblyIdAtoms");0<=f.indexOf("#<")&&(v=Math.min(v,JU.PT.parseInt(f.substring(f.indexOf("#<")+2))-1),f=JU.PT.rep(f,"#<","_<"));h=0;for(p=this.firstAtom;p<b;p++)s[p].bsSymmetry=new JU.BS,a=s[p].chainID,a>h&&(h=a);a=this.asc.bsAtoms;n=c?O(this.asc.ac,0):null;for(z=null==d?1:0;z<v;z++){if(0<=f.indexOf("!#")){if(0<=f.indexOf("!#"+(z+1)+";"))continue}else if(0<=f.indexOf("#")&&0>f.indexOf("#"+(z+1)+";"))continue;var w=e.get(z),m=!w.equals(this.mident),B=null==d?null:d.get(z);if(null!=
B&&null!=t){a=new JU.BS;for(p=t.entrySet().iterator();p.hasNext()&&((u=p.next())||1);)0<=B.indexOf(":"+u.getKey()+";")&&a.or(u.getValue());null!=this.asc.bsAtoms&&a.and(this.asc.bsAtoms);B=null}for(var x=-1,D=!1,p=this.firstAtom;p<b;p++){if(null!=a)D=!a.get(p);else if(null!=B&&(r=s[p].chainID)!=x)D=0>B.indexOf(":"+this.acr.vwr.getChainIDStr(x=r)+";");if(!D)try{var A=s[p].atomSite,P;c&&(n[A]=this.asc.ac);P=this.asc.newCloneAtom(s[p]);P.bondingRadius=z;this.asc.atomSymbolicMap.put(""+P.atomSerial,P);
null!=this.asc.bsAtoms&&this.asc.bsAtoms.set(P.index);P.atomSite=A;m&&w.rotTrans(P);P.bsSymmetry=JU.BSUtil.newAndSetBit(z)}catch(y){if(ba(y,Exception))this.asc.errorMessage="appendAtomCollection error: "+y;else throw y;}}m&&this.symmetry.addBioMoleculeOperation(w,!1);if(c)for(w=this.asc.bondIndex0;w<this.bondCount0;w++)p=this.asc.bonds[w],this.asc.addNewBondWithOrder(n[s[p.atomIndex1].atomSite],n[s[p.atomIndex2].atomSite],p.order)}if(null!=d){null==this.asc.bsAtoms&&(this.asc.bsAtoms=JU.BSUtil.newBitSet2(0,
this.asc.ac));this.asc.bsAtoms.clearBits(this.firstAtom,b);if(0==j){if(-1!=l){r=(e=0!=l)?new JU.BS:null;s=this.asc.atoms;A=0;e&&(A=0>l?Math.max(-l,h+1):Math.max(h+l,65),r.setBits(0,A-1),r.setBits(91,97),r.setBits(123,200));j=1==this.asc.structureCount?this.asc.structures[0].bsAll:null;d=new java.util.Hashtable;P=new java.util.Hashtable;p=null==j?null:new java.util.Hashtable;t=null;h=b;for(n=this.asc.ac;h<n;h++)z=s[h].chainID,m=s[h].bsSymmetry.nextSetBit(0),l=this.acr.vwr.getChainIDStr(z),w=0==m?l:
l+k+m,f=d.get(w),null==f&&(e&&0!=m&&(m=200>A?r.nextClearBit(A):200,200>m&&(r.set(m),f=Integer.$valueOf(this.acr.vwr.getChainID(""+String.fromCharCode(m),!0)),A=m)),null==f&&(f=Integer.$valueOf(this.acr.vwr.getChainID(w,!0))),w!==l&&(P.put(f,Integer.$valueOf(z)),null!=j&&(null!=t&&(t[1]=h),p.put(f,t=O(-1,[h,n])))),d.put(w,f)),s[h].chainID=f.intValue();if(0<this.asc.structureCount){k=this.asc.structures;s=this.asc.structureCount;for(p=P.entrySet().iterator();p.hasNext()&&((u=p.next())||1);){f=u.getKey();
f=f.intValue();l=u.getValue().intValue();for(h=0;h<s;h++)e=k[h],null==e.bsAll&&(e.startChainID==e.endChainID?e.startChainID==l&&(e=e.clone(),e.startChainID=e.endChainID=f,this.asc.addStructure(e)):System.err.println("XtalSymmetry not processing biomt chain structure "+this.acr.vwr.getChainIDStr(l)+" to "+this.acr.vwr.getChainIDStr(f)))}}}u=this.asc.getAtomSetAuxiliaryInfoValue(-1,"PDB_CONECT_bonds");if(!c&&null!=u)for(h=u.size();0<=--h;)if(p=u.get(h),c=this.asc.getAtomFromName(""+p[0]),k=this.asc.getAtomFromName(""+
p[1]),null!=c&&null!=k&&c.bondingRadius!=k.bondingRadius&&(null==a||a.get(c.index)&&a.get(k.index))&&25<c.distanceSquared(k))u.removeItemAt(h),System.out.println("XtalSymmetry: long interchain bond removed for @"+c.atomSerial+"-@"+k.atomSerial)}h=b;for(n=this.asc.ac;h<n;h++)this.asc.atoms[h].bondingRadius=NaN}this.noSymmetryCount=b-this.firstAtom;this.finalizeSymmetry(this.symmetry);this.setCurrentModelInfo(v,null,null);this.reset()},"java.util.Map,~B,~S");d(b,"getBaseSymmetry",function(){return null==
this.baseSymmetry?this.symmetry:this.baseSymmetry});d(b,"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(b,"getSymmetry",function(){return null==this.symmetry?this.symmetry=new J.adapter.smarter.XtalSymmetry.FileSymmetry:this.symmetry});b.isWithinSupercell=d(b,"isWithinSupercell",function(a,c,f,e,v,b,h,k,d){return c.x>f-d&&c.x<e+d&&(2>a||c.y>v-d&&c.y<b+
d)&&(3>a||c.z>h-d&&c.z<k+d)},"~N,JU.P3,~N,~N,~N,~N,~N,~N,~N");d(b,"set",function(a){this.acr=a;this.asc=a.asc;this.getSymmetry();return this},"J.adapter.smarter.AtomSetCollectionReader");d(b,"setLatticeParameter",function(a){this.symmetry.setSpaceGroup(this.doNormalize);this.symmetry.setLattice(a)},"~N");d(b,"addSpaceGroupOperation",function(a,c){this.symmetry.setSpaceGroup(this.doNormalize);c&&1==this.symmetry.getSpaceGroupOperationCount()&&this.setLatticeCells();return this.symmetry.addSpaceGroupOperation(a,
0)},"~S,~B");d(b,"setSymmetryFromAuditBlock",function(a){return this.symmetry=a},"J.adapter.smarter.XtalSymmetry.FileSymmetry");d(b,"applySymmetryFromReader",function(a){this.asc.setCoordinatesAreFractional(this.acr.iHaveFractionalCoordinates);this.setAtomSetSpaceGroupName(this.acr.sgName);this.symmetryRange=this.acr.symmetryRange;this.asc.setInfo("symmetryRange",Float.$valueOf(this.symmetryRange));if(this.acr.doConvertToFractional||this.acr.fileCoordinatesAreFractional){this.setLatticeCells();var c=
!0;if(this.acr.ignoreFileSpaceGroupName||!this.acr.iHaveSymmetryOperators){if(!this.acr.merging||null==a)a=new J.adapter.smarter.XtalSymmetry.FileSymmetry;0==this.acr.unitCellParams[0]&&0==this.acr.unitCellParams[2]&&JU.SimpleUnitCell.fillParams(null,null,null,this.acr.unitCellParams);c=a.createSpaceGroup(this.acr.desiredSpaceGroupIndex,0<=this.acr.sgName.indexOf("!")?"P1":this.acr.sgName,this.acr.unitCellParams,this.acr.modDim)}else this.acr.doPreSymmetry(c),a=null;this.packingRange=this.acr.getPackingRangeValue(0);
c?(null!=a&&this.getSymmetry().setSpaceGroupTo(a.getSpaceGroup()),this.applySymmetryLattice(),null!=a&&null==this.filterSymop&&this.setAtomSetSpaceGroupName(a.getSpaceGroupName())):this.setUnitCellSafely()}if(this.acr.iHaveFractionalCoordinates&&this.acr.merging&&null!=a){for(var c=this.asc.atoms,f=this.asc.getLastAtomSetAtomIndex(),e=this.asc.ac;f<e;f++)a.toCartesian(c[f],!0);this.asc.setCoordinatesAreFractional(!1);this.acr.addVibrations=!1}return this.symmetry},"J.adapter.smarter.XtalSymmetry.FileSymmetry");
d(b,"finalizeMoments",function(a,c){this.getSymmetry().preSymmetryFinalizeMoments(this.acr,this.asc,a,c)},"~S,~S");d(b,"setMagneticMoments",function(a){return 0>this.asc.iSet||!this.acr.vibsFractional?0:this.getBaseSymmetry().postSymmetrySetMagneticMoments(this.asc,a)},"~B");d(b,"setTensors",function(){for(var a=this.asc.ac,c=this.asc.getLastAtomSetAtomIndex();c<a;c++){var f=this.asc.atoms[c];null!=f.anisoBorU&&(f.addTensor(this.symmetry.getTensor(this.acr.vwr,f.anisoBorU),null,!1),Float.isNaN(f.bfactor)&&
(f.bfactor=100*f.anisoBorU[7]),f.anisoBorU=null)}});d(b,"adjustRangeMinMax",function(a){this.symmetry.adjustRangeMinMax(a,this.acr.forcePacked?this.packingRange:NaN,this.minXYZ,this.maxXYZ,this.rmin,this.rmax,this.minXYZ,this.maxXYZ)},"~A");d(b,"applyAllSymmetry",function(a,c){if(!(0==this.asc.ac||null!=c&&c.isEmpty())){var f=this.noSymmetryCount=0<this.asc.baseSymmetryAtomCount?this.asc.baseSymmetryAtomCount:null==c?this.asc.getLastAtomSetAtomCount():this.asc.ac-c.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=JU.SimpleUnitCell.getDimensionFromParams(this.acr.unitCellParams);this.finalizeSymmetry(this.symmetry);var e=this.symmetry.getSpaceGroupOperationCount(),v=null==this.acr.thisBiomolecule?null:new JU.BS;this.checkNearAtoms=this.acr.checkNearAtoms||null!=v;JU.SimpleUnitCell.setMinMaxLatticeParameters(this.ndims,
this.minXYZ,this.maxXYZ,0);this.latticeOp=this.symmetry.getLatticeOp();this.crystalReaderLatticeOpsOnly=this.asc.crystalReaderLatticeOpsOnly&&0<=this.latticeOp;this.doCentroidUnitCell&&this.asc.setInfo("centroidMinMax",O(-1,[this.minXYZ.x,this.minXYZ.y,this.minXYZ.z,this.maxXYZ.x,this.maxXYZ.y,this.maxXYZ.z,this.centroidPacked?y(100*this.packingRange):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(y(this.minXYZ0.x),y(this.minXYZ0.y),y(this.minXYZ0.z)),this.maxXYZ.set(y(this.maxXYZ0.x),y(this.maxXYZ0.y),y(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 b=
(this.maxXYZ.x-this.minXYZ.x)*(this.maxXYZ.y-this.minXYZ.y)*(this.maxXYZ.z-this.minXYZ.z),h=f*(this.crystalReaderLatticeOpsOnly?4:e),h=this.checkNearAtoms||null!=this.acr.thisBiomolecule?h*b:0<this.symmetryRange?h:1,k=Array(h),d=this.asc.atoms,j=0;j<f;j++)d[this.firstAtom+j].bsSymmetry=JU.BS.newN(e*(b+1));var q=0;this.unitCellTranslations=Array(b);var p=0,t=0,s=Math.abs(this.symmetryRange),r=0!=this.symmetryRange,n=0>this.symmetryRange,z=0<this.symmetryRange;r&&(this.rmin.x=this.rmin.y=this.rmin.z=
3.4028235E38,this.rmax.x=this.rmax.y=this.rmax.z=-3.4028235E38);var u=this.symmetry,w=u;this.checkAll=this.crystalReaderLatticeOpsOnly||1==this.asc.atomSetCount&&this.checkNearAtoms&&0<=this.latticeOp;var m=this.acr.lstNCS;if(null!=m&&0==m.get(0).m33){for(var B=u.getSpaceGroupOperationCount(),x=m.size(),j=x;0<=--j;){var D=m.get(j);D.m33=1;u.toFractionalM(D)}for(j=1;j<B;j++)for(var A=u.getSpaceGroupOperation(j),P=0;P<x;P++)D=JU.M4.newM4(m.get(P)),D.mul2(A,D),this.doNormalize&&0<this.noSymmetryCount&&
JS.SymmetryOperation.normalizeOperationToCentroid(3,D,d,this.firstAtom,this.noSymmetryCount),m.addLast(D)}j=null;m=u.getSpaceGroupOperation(0);this.doPackUnitCell&&(j=new JU.P3,this.ptOffset.set(0,0,0));B=this.bondCount0>this.asc.bondIndex0&&this.applySymmetryToBonds?O(f,0):null;b=O(b,0);for(x=this.minXYZ.x;x<this.maxXYZ.x;x++)for(D=this.minXYZ.y;D<this.maxXYZ.y;D++)for(A=this.minXYZ.z;A<this.maxXYZ.z;A++)if(this.unitCellTranslations[p]=JU.V3.new3(x,D,A),b[p++]=555+100*x+10*D+A,!(0!=x||0!=D||0!=A||
0==k.length)){for(q=0;q<f;q++){t=d[this.firstAtom+q];null!=a&&(u=a.getAtomSymmetry(t,this.symmetry),u!==w&&(0==u.getSpaceGroupOperationCount()&&this.finalizeSymmetry(u),w=u,m=u.getSpaceGroupOperation(0)));P=JU.P3.newP(t);m.rotTrans(P);u.toCartesian(P,!1);if(this.doPackUnitCell)if(u.toUnitCellRnd(P,this.ptOffset),j.setT(P),u.toFractional(j,!1),this.acr.fixFloatPt(j,1E5),null==c)t.setT(j);else if(1E-4>t.distance(j))c.set(t.index);else{c.clear(t.index);continue}null!=c&&t.bsSymmetry.clearAll();t.bsSymmetry.set(p*
e);t.bsSymmetry.set(0);r&&JS.UnitCell.setSymmetryMinMax(P,this.rmin,this.rmax);q<h&&(k[q]=P)}n&&(this.rmin.x-=s,this.rmin.y-=s,this.rmin.z-=s,this.rmax.x+=s,this.rmax.y+=s,this.rmax.z+=s);t=q=this.symmetryAddAtoms(0,0,0,0,q,p*e,k,a,v,B)}z&&(this.rmin.x-=s,this.rmin.y-=s,this.rmin.z-=s,this.rmax.x+=s,this.rmax.y+=s,this.rmax.z+=s);p=0;for(x=this.minXYZ.x;x<this.maxXYZ.x;x++)for(D=this.minXYZ.y;D<this.maxXYZ.y;D++)for(A=this.minXYZ.z;A<this.maxXYZ.z;A++)if(p++,0!=x||0!=D||0!=A)q=this.symmetryAddAtoms(x,
D,A,t,q,p*e,k,a,v,B);p*f==this.asc.ac-this.firstAtom&&this.duplicateAtomProperties(p);this.setCurrentModelInfo(f,u,b);this.unitCellParams=null;this.reset()}},"J.adapter.smarter.MSInterface,JU.BS");d(b,"applyRangeSymmetry",function(a){var c=this.acr.fillRange;a=this.updateBSAtoms();this.acr.forcePacked=!0;this.doPackUnitCell=!1;for(var f=JU.P3i.new3(this.minXYZ.x,this.minXYZ.y,this.minXYZ.z),e=JU.P3i.new3(this.maxXYZ.x,this.maxXYZ.y,this.maxXYZ.z),v=Array(4),b=0;4>b;b++)v[b]=JU.P3.newP(c[b]);this.setUnitCellSafely();
this.adjustRangeMinMax(v);c=new J.adapter.smarter.XtalSymmetry.FileSymmetry;c.getUnitCell(this.acr.fillRange,!1,null);this.applyAllSymmetry(this.acr.ms,a);for(var v=new JU.P3,h=this.asc.atoms,b=this.asc.ac;--b>=this.firstAtom;)v.setT(h[b]),this.symmetry.toCartesian(v,!1),c.toFractional(v,!1),(this.acr.noPack?!J.adapter.smarter.XtalSymmetry.removePacking(this.ndims,v,f.x,e.x,f.y,e.y,f.z,e.z,this.packingRange):!J.adapter.smarter.XtalSymmetry.isWithinSupercell(this.ndims,v,f.x,e.x,f.y,e.y,f.z,e.z,this.packingRange))&&
a.clear(b)},"JU.BS");d(b,"applySuperSymmetry",function(a,c,f,e,v,b,h){this.asc.setGlobalBoolean(7);var k=this.doPackUnitCell;this.doPackUnitCell=k;this.applyAllSymmetry(this.acr.ms,null);this.doPackUnitCell=k;for(var k=this.asc.atoms,d=this.asc.ac,j=f;j<d;j++)this.symmetry.toCartesian(k[j],!0),c.set(j);this.asc.setCurrentModelInfo("unitcell_conventional",this.symmetry.getV0abc("a,b,c",null));c=b[0];j=b[1];b=b[2];this.symmetry=new J.adapter.smarter.XtalSymmetry.FileSymmetry;this.setUnitCell(F(-1,[0,
0,0,0,0,0,c.x,c.y,c.z,j.x,j.y,j.z,b.x,b.y,b.z,0,0,0,0,0,0,NaN,NaN,NaN,NaN,NaN,h]),null,null);a=null==e||null==a?"P1":"cell="+a;this.setAtomSetSpaceGroupName(a);this.symmetry.setSpaceGroupName(a);this.symmetry.setSpaceGroup(this.doNormalize);this.symmetry.addSpaceGroupOperation("x,y,z",0);null!=v&&0==v.length()&&(v=null);null!=v&&this.symmetry.toFractional(v,!0);for(j=f;j<d;j++)this.symmetry.toFractional(k[j],!0),null!=v&&k[j].sub(v);this.asc.haveAnisou=!1;this.asc.setCurrentModelInfo("matUnitCellOrientation",
null)},"~S,JU.BS,~N,~A,JU.P3,~A,~N");d(b,"applySymmetryLattice",function(){if(this.asc.coordinatesAreFractional&&null!=this.symmetry.getSpaceGroup()){var a=this.latticeCells[0],c=this.latticeCells[1],f=Math.abs(this.latticeCells[2]),e=this.latticeCells[3];this.firstAtom=this.asc.getLastAtomSetAtomIndex();var v=this.asc.bsAtoms;null!=v&&(this.updateBSAtoms(),this.firstAtom=v.nextSetBit(this.firstAtom));this.rmin=JU.P3.new3(3.4028235E38,3.4028235E38,3.4028235E38);this.rmax=JU.P3.new3(-3.4028235E38,
-3.4028235E38,-3.4028235E38);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)));this.setUnitCellSafely();this.asc.setCurrentModelInfo("f2c",this.symmetry.getUnitCellF2C());
var b=this.symmetry.getSpaceGroupTitle();0>b.indexOf("--")&&this.asc.setCurrentModelInfo("f2cTitle",b);this.asc.setCurrentModelInfo("f2cParams",this.symmetry.getUnitCellParams());null!=this.acr.latticeType&&(this.asc.setCurrentModelInfo("latticeType",this.acr.latticeType),"string"==typeof this.acr.fillRange&&(b=this.setLatticeRange(this.acr.latticeType,this.acr.fillRange),null==b?(this.acr.appendLoadNote(this.acr.fillRange+" symmetry could not be implemented"),this.acr.fillRange=null):this.acr.fillRange=
b));this.baseSymmetry=this.symmetry;if(null!=this.acr.fillRange)this.setMinMax(this.ndims,e,a,c,f),this.applyRangeSymmetry(v);else{var b=null,h=1E-6;this.baseSymmetry.nSpins=0;var k=this.acr.strSupercell,d=null!=k&&0<=k.indexOf(","),j=null,q=null,p=Array(3);d&&(j=new JU.M4,null==this.mident&&(this.mident=new JU.M4),this.setUnitCellSafely(),b=this.symmetry.getV0abc(k,j),j.transpose33(),null!=b&&!j.equals(this.mident)&&(this.setMinMax(this.ndims,e,a,c,f),q=JU.P3.newP(b[0]),p[0]=JU.V3.newV(b[1]),p[1]=
JU.V3.newV(b[2]),p[2]=JU.V3.newV(b[3]),this.adjustRangeMinMax(b)));d=this.asc.getLastAtomSetAtomIndex();null!=v&&(d=v.nextSetBit(d));3.4028235E38==this.rmin.x?b=null:(v=this.updateBSAtoms(),h=this.symmetry.getPrecision(),this.applySuperSymmetry(k,v,d,b,q,p,h));this.setMinMax(this.ndims,e,a,c,f);if(null==b){this.applyAllSymmetry(this.acr.ms,v);if(!this.acr.noPack&&(!this.applySymmetryToBonds||!this.acr.doPackUnitCell))return;this.setMinMax(this.ndims,e,a,c,f)}(this.acr.forcePacked||this.acr.doPackUnitCell||
this.acr.noPack)&&this.trimToUnitCell(d);this.updateSupercellAtomSites(j,v,h)}}});d(b,"duplicateAtomProperties",function(a){var c=this.asc.getAtomSetAuxiliaryInfoValue(-1,"atomProperties");if(null!=c)for(var f,e=c.entrySet().iterator();e.hasNext()&&((f=e.next())||1);){var v=f.getKey(),b=f.getValue();if("string"==typeof b){for(var h=b,k=new JU.SB,b=a;0<=--b;)k.append(h);c.put(v,k.toString())}else{v=b;h=F(v.length*a,0);for(b=a;0<=--b;)System.arraycopy(v,0,h,b*v.length,v.length)}}},"~N");d(b,"finalizeSymmetry",
function(a){var c=this.asc.getAtomSetAuxiliaryInfoValue(-1,"spaceGroup");a.setFinalOperations(this.ndims,c,this.asc.atoms,this.firstAtom,this.noSymmetryCount,this.doNormalize,this.filterSymop);(null!=this.filterSymop||null==c||c.equals("unspecified!"))&&this.setAtomSetSpaceGroupName(a.getUnitCellDisplayName());null!=this.unitCellParams||Float.isNaN(this.acr.unitCellParams[0])||(a.fixUnitCell(this.acr.unitCellParams)&&this.acr.appendLoadNote("Unit cell parameters were adjusted to match space group!"),
this.setUnitCellSafely())},"J.adapter.smarter.XtalSymmetry.FileSymmetry");b.removePacking=d(b,"removePacking",function(a,c,f,e,v,b,h,k,d){return c.x>f-d&&c.x<e-d&&(2>a||c.y>v-d&&c.y<b-d)&&(3>a||c.z>h-d&&c.z<k-d)},"~N,JU.P3,~N,~N,~N,~N,~N,~N,~N");d(b,"reset",function(){this.asc.coordinatesAreFractional=!1;this.asc.setCurrentModelInfo("hasSymmetry",Boolean.TRUE);this.asc.setGlobalBoolean(1)});d(b,"setAtomSetSpaceGroupName",function(a){this.symmetry.setSpaceGroupName(a);a+="";this.asc.setCurrentModelInfo("f2cTitle",
a);this.asc.setCurrentModelInfo("spaceGroup",a)},"~S");d(b,"setCurrentModelInfo",function(a,c,f){null==c?(this.asc.setCurrentModelInfo("presymmetryAtomCount",Integer.$valueOf(this.noSymmetryCount)),this.asc.setCurrentModelInfo("biosymmetryCount",Integer.$valueOf(a)),this.asc.setCurrentModelInfo("bioSymmetry",this.symmetry)):(this.asc.setCurrentModelInfo("fileSymmetry",this.symmetry),this.asc.setCurrentModelInfo("presymmetryAtomCount",Integer.$valueOf(a)),this.asc.setCurrentModelInfo("latticeDesignation",
c.getLatticeDesignation()),this.asc.setCurrentModelInfo("ML_unitCellRange",f),this.acr.isSUPERCELL&&this.asc.setCurrentModelInfo("supercell",this.acr.strSupercell));this.asc.setCurrentModelInfo("presymmetryAtomIndex",Integer.$valueOf(this.firstAtom));a=this.symmetry.getSpaceGroupOperationCount();0<a&&(this.asc.setCurrentModelInfo("symmetryOperations",this.symmetry.getSymopList(this.doNormalize)),this.asc.setCurrentModelInfo("symOpsTemp",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());this.asc.setCurrentModelInfo("intlTableIndex",this.symmetry.getSpaceGroupInfoObj("itaIndex",null,!1,!1));this.asc.setCurrentModelInfo("intlTableTransform",this.symmetry.getSpaceGroupInfoObj("itaTransform",null,!1,!1));this.asc.setCurrentModelInfo("intlTableJmolId",this.symmetry.getSpaceGroupJmolId());this.asc.setCurrentModelInfo("spaceGroupIndex",
Integer.$valueOf(this.symmetry.getSpaceGroupIndex()));this.asc.setCurrentModelInfo("spaceGroupTitle",this.symmetry.getSpaceGroupTitle());if(null==this.acr.sgName||0<=this.acr.sgName.indexOf("?")||0<=this.acr.sgName.indexOf("!"))this.setAtomSetSpaceGroupName(this.acr.sgName=this.symmetry.getSpaceGroupName())},"~N,J.adapter.smarter.XtalSymmetry.FileSymmetry,~A");d(b,"setCurrentModelUCInfo",function(a,c,f){null!=a&&this.asc.setCurrentModelInfo("unitCellParams",a);null!=c&&this.asc.setCurrentModelInfo("unitCellOffset",
c);null!=f&&this.asc.setCurrentModelInfo("matUnitCellOrientation",f)},"~A,JU.P3,JU.M3");d(b,"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(b,"setLatticeRange",function(a,c){var f=null,e="R".equals(a);if(c.equals("conventional"))f=this.symmetry.getConventionalUnitCell(a,this.acr.primitiveToCrystal);else if(c.equals("primitive"))f=this.symmetry.getUnitCellVectors(),this.symmetry.toFromPrimitive(!0,a.charAt(0),f,this.acr.primitiveToCrystal);else if(e&&c.equals("rhombohedral"))c=1==this.symmetry.getUnitCellInfoType(8)?"2/3a+1/3b+1/3c,-1/3a+1/3b+1/3c,-1/3a-2/3b+1/3c":
null;else if(e&&c.equals("trigonal"))c=1==this.symmetry.getUnitCellInfoType(9)?"a-b,b-c,a+b+c":null;else if(c.equals("spin"))c=this.getBaseSymmetry().spinFrameStr;else if(c.startsWith("unitcell_"))c=this.asc.getAtomSetAuxiliaryInfoValue(-1,c);else if(0>c.indexOf(",")||0>c.indexOf("a")||0>c.indexOf("b")||0>c.indexOf("c"))c=null;if(null!=c&&null==f&&null==(f=this.symmetry.getV0abc(c,null)))c=null;if(null==c)return null;this.acr.addJmolScript("unitcell "+JU.PT.esc(c));return f},"~S,~S");d(b,"setMinMax",
function(a,c,f,e,v){this.minXYZ=new JU.P3i;this.maxXYZ=JU.P3i.new3(f,e,v);JU.SimpleUnitCell.setMinMaxLatticeParameters(a,this.minXYZ,this.maxXYZ,c)},"~N,~N,~N,~N,~N");d(b,"setUnitCell",function(a,c,f){this.unitCellParams=F(a.length,0);for(var e=0;e<a.length;e++)this.unitCellParams[e]=a[e];this.asc.haveUnitCell=!0;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().setUnitCellFromParams(this.unitCellParams,!1,this.unitCellParams[26]);null!=f&&this.symmetry.setOffsetPt(f);null!=c&&this.symmetry.initializeOrientation(c);this.setCurrentModelUCInfo(this.unitCellParams,f,c)},"~A,JU.M3,JU.P3");d(b,"setUnitCellSafely",function(){null==this.unitCellParams&&this.setUnitCell(this.acr.unitCellParams,this.acr.matUnitCellOrientation,this.acr.unitCellOffset)});d(b,"symmetryAddAtoms",function(a,c,f,e,v,b,h,k,d,j){var q=0==e,
p=null!=j;this.doPackUnitCell&&this.ptOffset.set(a,c,f);var t=this.symmetryRange*this.symmetryRange,s=0>this.symmetryRange,r=0<this.symmetryRange,n=q&&r,r=(new Boolean(r&!q)).valueOf(),z=this.symmetry.getSpaceGroupOperationCount(),u=this.acr.lstNCS,m=null==u?0:u.size(),y=z+m,m=E(m/z),B=this.checkNearAtoms&&(1<y||this.doPackUnitCell),x=s||r,D=B||x,A=null!=d,P=B||n,va=this.acr.isMolecular?null:this.asc.bsAtoms,Q=this.symmetry;s&&(e=this.noSymmetryCount);var s=this.firstAtom+this.noSymmetryCount,F=0>
this.asc.firstAtomToBond?s:this.asc.firstAtomToBond,Y=new JU.P3,L=null,G=A?0.01:1E-4,W="\x00",R=null==va?this.firstAtom:va.nextSetBit(this.firstAtom),C=0;a:for(;C<y;C++)if(!(q&&0==C||this.crystalReaderLatticeOpsOnly&&0<C&&0!=C%this.latticeOp||null!=d&&d.get(C))){for(var S=this.firstAtom+(B?v:r?e:0),M=C>=z?0:0==this.asc.vibScale?Q.getSpinOp(C):this.asc.vibScale,T=Math.max(this.firstAtom,null==va?0:va.nextSetBit(0)),I=D,O=C>=z?E((C-z)/m):C,U=O+b;T<s;T++){var V=this.asc.atoms[T];if(null==va||va.get(T)){null==
k?Q.newSpaceGroupPoint(V,C,C>=z?u.get(C-z):null,a,c,f,Y):(Q=k.getAtomSymmetry(V,this.symmetry),Q.newSpaceGroupPoint(V,C,null,a,c,f,Y),L=Q.getSpaceGroupOperationCode(C),null!=L&&(W=L.charAt(0),Q=k.getSymmetryFromCode(L),0==Q.getSpaceGroupOperationCount()&&this.finalizeSymmetry(Q)));this.acr.fixFloatPt(Y,1E5);var Z=JU.P3.newP(Y);Q.toCartesian(Z,!1);if(this.doPackUnitCell&&(Q.toUnitCellRnd(Z,this.ptOffset),Y.setT(Z),Q.toFractional(Y,!1),this.acr.fixFloatPt(Y,1E5),!J.adapter.smarter.XtalSymmetry.isWithinSupercell(this.ndims,
Y,this.minXYZ0.x,this.maxXYZ0.x,this.minXYZ0.y,this.maxXYZ0.y,this.minXYZ0.z,this.maxXYZ0.z,this.packingRange)))continue;n&&JS.UnitCell.setSymmetryMinMax(Z,this.rmin,this.rmax);var K=null;if(I){if(x&&(Z.x<this.rmin.x||Z.y<this.rmin.y||Z.z<this.rmin.z||Z.x>this.rmax.x||Z.y>this.rmax.y||Z.z>this.rmax.z))continue;for(var ca=3.4028235E38,$=this.checkAll?this.asc.ac:S,ba=V.atomName,aa=null==L?V.altLoc:W,ea=R;ea<$;ea++)if(null==va||va.get(ea)){var N=h[ea-this.firstAtom];if(null!=N){N=Z.distanceSquared(N);
if(B&&N<G){if(A){d.set(C);continue a}K=this.asc.atoms[ea];if((null==K.atomName||K.atomName.equals(ba))&&K.altLoc==aa)break;K=null}r&&(ea<e&&N<ca)&&(ca=N)}}if(r&&ca>t)continue}A&&(I=!1);ea=V.atomSite;if(null!=K)p&&(j[ea]=K.index),K.bsSymmetry.set(U),K.bsSymmetry.set(O);else{p&&(j[ea]=this.asc.ac);K=V.copyTo(Y,this.asc);null!=this.asc.bsAtoms&&this.asc.bsAtoms.set(K.index);0!=M&&null!=K.vib&&Q.getSpaceGroupOperation(C).rotateSpin(K.vib);if(0>K.part){var ma=Integer.$valueOf(1E3*C+500+K.part);null==this.disorderMap&&
(this.disorderMap=new java.util.Hashtable);ca=this.disorderMap.get(ma);null==ca&&($=Integer.$valueOf(K.part),ba=null==this.disorderMap.get($),0==this.disorderMapMax||122==this.disorderMapMax?this.disorderMapMax=64:90==this.disorderMapMax&&(this.disorderMapMax=96),ca=new Character(ba?K.altLoc:String.fromCharCode(++this.disorderMapMax)),this.disorderMap.put(ma,ca),ba&&this.disorderMap.put($,ca));K.altLoc=ca.charValue()}K.atomSite=ea;null!=L&&(K.altLoc=W);K.bsSymmetry=JU.BSUtil.newAndSetBit(U);K.bsSymmetry.set(O);
P&&(h[v++]=Z);V=V.tensors;if(null!=V){K.tensors=null;for(ea=V.size();0<=--ea;)Z=V.get(ea),null!=Z&&(1==z?K.addTensor(Z.copyTensor(),null,!1):this.addRotatedTensor(K,Z,C,!1,Q))}}}}if(p){S=this.asc.bonds;M=this.asc.atoms;for(I=this.asc.bondIndex0;I<this.bondCount0;I++)if(O=S[I],K=M[O.atomIndex1],T=M[O.atomIndex2],!(null==K||null==T||T.atomSetIndex<K.atomSetIndex))if(U=j[K.atomSite],V=j[T.atomSite],U>V&&(T=U,U=V,V=T),U!=V&&(U>=F||V>=F)&&0>this.bondsFound.indexOf(ma="-"+U+","+V))this.bondsFound.append(ma),
this.asc.addNewBondWithOrder(U,V,O.order)}}return v},"~N,~N,~N,~N,~N,~N,~A,J.adapter.smarter.MSInterface,JU.BS,~A");d(b,"setPartProperty",function(){for(var a=this.asc.atomSetCount;0<=--a;){for(var c=F(this.asc.getAtomSetAtomCount(a),0),f=0,e=this.asc.getAtomSetAtomIndex(a),v=c.length;f<v;f++){var b=this.asc.atoms[e++];c[f]=b.part}this.asc.setAtomProperties("part",c,a,!1)}});d(b,"trimToUnitCell",function(a){var c=this.asc.atoms,f=this.updateBSAtoms();if(this.acr.noPack)for(a=f.nextSetBit(a);0<=a;a=
f.nextSetBit(a+1))J.adapter.smarter.XtalSymmetry.removePacking(this.ndims,c[a],this.minXYZ.x,this.maxXYZ.x,this.minXYZ.y,this.maxXYZ.y,this.minXYZ.z,this.maxXYZ.z,this.packingRange)||f.clear(a);else for(a=f.nextSetBit(a);0<=a;a=f.nextSetBit(a+1))J.adapter.smarter.XtalSymmetry.isWithinSupercell(this.ndims,c[a],this.minXYZ.x,this.maxXYZ.x,this.minXYZ.y,this.maxXYZ.y,this.minXYZ.z,this.maxXYZ.z,this.packingRange)||f.clear(a)},"~N");d(b,"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(b,"updateSupercellAtomSites",function(a,c,f){for(var e=c.cardinality(),e=Array(e),v=0,b=f*f,h=c.nextSetBit(0);0<=h;h=c.nextSetBit(h+1)){var k=this.asc.atoms[h],d=new J.adapter.smarter.Atom;d.setT(k);null!=a&&(a.rotTrans(d),JU.SimpleUnitCell.unitizeDimRnd(3,d,f));d.atomSerial=k.atomSite;d.atomSite=k.atomSite;this.symmetry.unitize(d);for(var j=!1,q=0;q<v;q++){var p=e[q];if(d.atomSerial==
p.atomSerial&&d.distanceSquared(p)<b){j=!0;k.atomSite=p.atomSite;break}}j||(k.atomSite=d.atomSite=v,e[v++]=d)}},"JU.M4,JU.BS,~N");d(b,"newFileSymmetry",function(){return new J.adapter.smarter.XtalSymmetry.FileSymmetry});b=I(function(){this.spinFrameRotationMatrix=this.spinFrameExt=this.spinFrameStr=null;this.nSpins=0;this.spinPointGroupAxesXYZ=null;this.doNormalizeSpinFrame=!1;S(this,arguments)},J.adapter.smarter.XtalSymmetry,"FileSymmetry",JS.Symmetry);d(b,"mapSpins",function(a){this.spaceGroup.mapSpins(a)},
"java.util.Map");d(b,"addMagLatticeVectors",function(a){return this.spaceGroup.addMagLatticeVectors(a)},"JU.Lst");d(b,"addSpinLattice",function(a,c){this.spaceGroup.addSpinLattice(a,c)},"JU.Lst,java.util.Map");d(b,"setSpinList",function(a){return this.spaceGroup.setSpinList(a)},"~S");d(b,"createSpaceGroup",function(a,c,f,e){this.spaceGroup=JS.SpaceGroup.createSpaceGroup(a,c,f,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");d(b,"fcoord",function(a){return JS.SymmetryOperation.fcoord(a," ")},"JU.T3");d(b,"getRotTransArrayAndXYZ",function(a,c){JS.SymmetryOperation.getRotTransArrayAndXYZ(null,a,c,!1,!0,!1,null)},"~S,~A");d(b,"getSpaceGroupOperationCode",function(a){return this.spaceGroup.symmetryOperations[a].subsystemCode},"~N");d(b,"getTensor",function(a,c){if(null==c)return null;null==this.unitCell&&(this.unitCell=JS.UnitCell.fromParams(F(-1,[1,1,1,90,90,90]),!0,1E-4));return this.unitCell.getTensor(a,
c)},"JV.Viewer,~A");d(b,"getSpaceGroupTitle",function(){var a=this.getSpaceGroupName();return a.startsWith("cell=")?a:null!=this.spaceGroup?this.spaceGroup.asString():null!=this.unitCell&&0<this.unitCell.name.length?"cell="+this.unitCell.name:""});d(b,"setPrecision",function(a){this.unitCell.setPrecision(a)},"~N");d(b,"toFractionalM",function(a){this.$isBio||this.unitCell.toFractionalM(a)},"JU.M4");d(b,"toUnitCellRnd",function(a,c){this.unitCell.toUnitCellRnd(a,c)},"JU.T3,JU.T3");d(b,"twelfthify",
function(a){this.unitCell.twelfthify(a)},"JU.P3");d(b,"getConventionalUnitCell",function(a,c){return null==this.unitCell||null==a?null:this.unitCell.getConventionalUnitCell(a,c)},"~S,JU.M3");d(b,"getSpaceGroupIndex",function(){return this.spaceGroup.getIndex()});d(b,"getUnitCellF2C",function(){return this.unitCell.getF2C()});d(b,"addInversion",function(){var a=this.spaceGroup.symmetryOperations,c=new JU.M4;c.m00=c.m11=c.m22=-1;c.m33=1;for(var f=this.getSpaceGroupOperationCount(),e=new JU.M4,v=0;v<
f;v++){e.mul2(c,a[v]);var b=JS.SymmetryOperation.getXYZFromMatrix(e,!0,!0,!1);this.addSpaceGroupOperation(b,0)}});d(b,"rotateAxes",function(a,c,f,e){return 0==a?c:this.spaceGroup.symmetryOperations[a].rotateAxes(c,this.unitCell,f,e)},"~N,~A,JU.P3,JU.M3");d(b,"preSymmetryFinalizeMoments",function(a,c,f,e){this.spinFrameStr=f;this.spinFrameExt=e;this.spinFrameToCartXYZ=null;var v=a.unitCellParams[0],b=a.unitCellParams[1],h=a.unitCellParams[2];this.doNormalizeSpinFrame=a.checkFilterKey("SPINNORM");if(null!=
f){var d=this.preSymmetrySetSpinFrameMatrices(a),v=d[1].length(),b=d[2].length(),h=d[3].length();this.spinFrameToCartXYZ=new JU.M3;for(e=4;0<--e;)this.spinFrameToCartXYZ.setColumnV(e-1,d[e]);null!=this.spinFrameRotationMatrix&&this.spinFrameToCartXYZ.mul2(this.spinFrameRotationMatrix,this.spinFrameToCartXYZ);this.spinPointGroupAxesXYZ=C(-1,[new JU.P3,new JU.P3,new JU.P3]);this.spinPointGroupAxesXYZ[0].setP(d[1]).scale(1/v);this.spinPointGroupAxesXYZ[1].setP(d[2]).scale(1/b);this.spinPointGroupAxesXYZ[2].setP(d[3]).scale(1/
h);System.out.println("XtalSymmetry spinFramePp=\n "+f+"\nrotation=\n "+this.spinFrameRotationMatrix+"\nspinFrameCartXYZ=\n "+this.spinFrameToCartXYZ);null!=this.spinFrameRotationMatrix&&c.setCurrentModelInfo("spinFrameRotationMatrix",this.spinFrameRotationMatrix);c.setCurrentModelInfo("pointGroupAxes",this.spinPointGroupAxesXYZ)}f=JU.P3.new3(1/v,1/b,1/h);v=c.getAtomSetAtomIndex(c.iSet);b=new JU.P3;for(e=c.ac;--e>=v;)h=c.atoms[e].vib,null!=h&&(h.scaleT(f),h.isFractional&&0==h.magMoment&&(null==this.unitCell&&
this.setUnitCellFromParams(a.unitCellParams,!1,NaN),this.toCartesian(b.setP(h),!0),h.magMoment=b.length()))},"J.adapter.smarter.AtomSetCollectionReader,J.adapter.smarter.AtomSetCollection,~S,~S");d(b,"preSymmetrySetSpinFrameMatrices",function(a){System.out.println("XtalSymmetry.setSpinFrameMatrices using frame "+this.spinFrameStr);this.setUnitCellFromParams(a.unitCellParams,!1,NaN);var c=JS.UnitCell.getMatrixAndUnitCell(a.vwr,this.unitCell,this.spinFrameStr,null);this.doNormalizeSpinFrame&&(c[1].normalize(),
c[2].normalize(),c[3].normalize());var f=this.getSpinExt(this.spinFrameExt,"axis");if(null!=f){var e=JU.PT.parseFloat(this.getSpinExt(this.spinFrameExt,"angle"));Float.isNaN(e)||(f=this.getAxis(f),null!=f&&(a.addMoreUnitCellInfo("rotation_axis_xyz="+f.x+","+f.y+","+f.z),this.spinFrameRotationMatrix=(new JU.M3).setAA(JU.A4.newVA(f,0.017453292519943295*e))))}return c},"J.adapter.smarter.AtomSetCollectionReader");d(b,"getVariableAxis",function(a){var c=JU.P3.new3(1,1,1);a.$replace("n"," ").$replace("u",
"x").$replace("v","y").$replace("w","z");this.convertTransform(a,null).rotate(c);return F(-1,[c.x,c.y,c.z])},"~S");d(b,"getAxis",function(a){var c=null,f=null,e=!1;0<=a.indexOf("n")?f=this.getVariableAxis(a):a.startsWith("[")?(a=a.$replace("["," ").$replace("]"," ").$replace(","," ").trim(),a=JU.PT.rep(a,"  "," "),c=JU.PT.split(a," "),e=!0):c=a.$plit(",");if(null==f&&3==c.length){f=F(3,0);for(a=3;0<=--a;)if(f[a]=JU.PT.parseFloat(c[a].trim()),Float.isNaN(f[a]))return null}if(null==f)return null;c=
JU.V3.new3(f[0],f[1],f[2]);e||this.unitCell.toCartesian(c,!0);c.normalize();return c},"~S");d(b,"getSpinExt",function(a,c){if(null==a)return null;c=";"+c+"=";var f=a.indexOf(c);return 0>f?null:a.substring(f+c.length,a.indexOf(";",f+1))},"~S,~S");d(b,"postSymmetrySetMagneticMoments",function(a,c){if(0<this.nSpins)return this.nSpins;for(var f=a.getAtomSetAtomIndex(a.iSet),e=a.ac;--e>=f;){var v=a.atoms[e].vib;null!=v&&(0<v.modDim?(v.setMoment(),this.nSpins++):(v=v.clone(),null!=this.spinFrameToCartXYZ?
this.spinFrameToCartXYZ.rotate(v):c||this.toCartesian(v,!0),0<v.lengthSquared()?(0!=v.magMoment&&v.scale(v.magMoment/v.length()),this.nSpins++):0==v.modDim&&(v=null),a.atoms[e].vib=v))}return this.nSpins},"J.adapter.smarter.AtomSetCollection,~B")});aa("JS");N(["J.api.SymmetryInterface"],"JS.Symmetry","java.util.Hashtable JU.AU $.BS $.JSJSONParser $.Lst $.M4 $.P3 $.PT $.Quat $.Rdr $.SB J.api.Interface J.bspt.Bspt JS.PointGroup $.SpaceGroup $.SymmetryInfo $.SymmetryOperation $.UnitCell JU.BSUtil $.Escape $.Logger $.SimpleUnitCell JV.FileManager".split(" "),
function(){var b=I(function(){this.unitCell=this.spaceGroup=null;this.$isBio=!1;this.spinFrameToCartXYZ=this.transformMatrix=this.desc=this.symmetryInfo=this.cip=this.pointGroup=this.spinSym=this.vwr=this.id=null;S(this,arguments)},JS,"Symmetry",null,J.api.SymmetryInterface);m(b,"getSymopList",function(a){for(var c=this.spaceGroup.operationCount,f=Array(c),e=0;e<c;e++)f[e]=""+this.getSpaceGroupXyzOriginal(e,a);return f},"~B");m(b,"isBio",function(){return this.$isBio});m(b,"setPointGroup",function(a,
c,f,e,v,b,h,d,l,j){this.pointGroup=JS.PointGroup.getPointGroup(null==c?null:c.pointGroup,f,e,v,b,h,d,l,j,a.getBoolean(603979956),a.getScalePixelsPerAngstrom(!1));return this},"JV.Viewer,J.api.SymmetryInterface,JU.T3,~A,JU.BS,~B,~N,~N,~N,~B");m(b,"getPointGroupName",function(){return this.pointGroup.getName()});m(b,"getPointGroupInfo",function(a,c,f,e,v,b){return this.pointGroup.getInfo(a,null,null,c,f,e,v,b)},"~N,~S,~B,~S,~N,~N");m(b,"setSpaceGroup",function(a){null==this.spaceGroup&&(this.spaceGroup=
JS.SpaceGroup.getNull(!0,a,!1))},"~B");m(b,"addSpaceGroupOperation",function(a,c){return this.spaceGroup.addSymmetry(a,c,!0)},"~S,~N");m(b,"addBioMoleculeOperation",function(a,c){this.$isBio=this.spaceGroup.isBio=!0;return this.spaceGroup.addSymmetry((c?"!":"")+"[[bio"+a,0,!1)},"JU.M4,~B");m(b,"setLattice",function(a){this.spaceGroup.setLatticeParam(a)},"~N");m(b,"getSpaceGroup",function(){return this.spaceGroup});m(b,"getSpaceGroupInfoObj",function(a,c,f,e){var v=!1;switch(a){case "list":return this.getSpaceGroupList(c);
case "opsCtr":return this.spaceGroup.getOpsCtr(c);case "itaTransform":case "itaNumber":v=!0;case "nameToXYZList":case "itaIndex":case "hmName":case "hmNameShort":f=null;if(null!=c){if(c.endsWith("'"))return c=JS.SpaceGroup.convertWyckoffHMCleg(c,null),v&&null!=c?(f=c.indexOf(":"),"itaNumber".equals(a)?c.substring(0,f):c.substring(f+1)):null;if(1<c.length&&"/"==c.charAt(1)){f=JS.SpaceGroup.getExplicitSpecialGroupType(c);f=JS.Symmetry.getSpecialSettingInfo(this.vwr,c,f);if(null!=f)switch(a){case "itaData":return f;
case "hmName":case "hmNameShort":return f.get("hm");case "nameToXYZList":return f.get("gp");case "itaIndex":return""+f.get("sg")+"."+f.get("set");case "itaTransform":return f.get("trm");case "itaNumber":return""+f.get("sg")}return null}c.startsWith("ITA/")&&(c=c.substring(4));f=JS.SpaceGroup.determineSpaceGroupN(c);null==f&&"nameToXYZList".equals(a)&&(f=JS.SpaceGroup.createSpaceGroupN(c,!0))}else null!=this.spaceGroup?f=this.spaceGroup:null!=this.symmetryInfo&&(f=this.symmetryInfo.getDerivedSpaceGroup());
switch(null==f?"":a){case "hmName":return f.getHMName();case "hmNameShort":return f.getHMNameShort();case "nameToXYZList":a=new JU.Lst;f.setFinalOperationsSafely();v=0;for(c=f.getOperationCount();v<c;v++)a.addLast(f.getOperation(v).xyz);return a;case "itaIndex":return f.getItaIndex();case "itaTransform":return f.itaTransform;case "itaNumber":return f.itaNumber}return null;default:return JS.SpaceGroup.getInfo(this.spaceGroup,a,c,f,e)}},"~S,~O,~B,~B");d(b,"getSpaceGroupList",function(a){for(var c=new JU.SB,
f=this.getSpaceGroupJSON("ITA","ALL",0),e=0,v=f.size();e<v;e++){var b=f.get(e),h=b.get("sg");(null==a||h.equals(a))&&c.appendO(h).appendC(".").appendO(b.get("set")).appendC("\t").appendO(b.get("hm")).appendC("\t").appendO(b.get("sg")).appendC(":").appendO(b.get("trm")).appendC("\n")}return c.toString()},"Integer");m(b,"getLatticeDesignation",function(){return this.spaceGroup.getShelxLATTDesignation()});m(b,"setFinalOperations",function(a,c,f,e,v,b,h){null!=c&&(c.startsWith("bio")||0<=c.indexOf(" *("))&&
this.spaceGroup.setName(c);var d="unspecified!".equals(c);d&&(h="calculated");if(null!=h){var l=new JU.Lst;l.addLast(this.spaceGroup.symmetryOperations[0]);for(var j=1;j<this.spaceGroup.operationCount;j++)(d||h.contains(" "+(j+1)+" "))&&l.addLast(this.spaceGroup.symmetryOperations[j]);this.spaceGroup=JS.SpaceGroup.createSpaceGroup(-1,c+" *("+h.trim()+")",l,-1)}this.spaceGroup.setFinalOperationsForAtoms(a,f,e,v,b)},"~N,~S,~A,~N,~N,~B,~S");m(b,"getSpaceGroupOperation",function(a){return null==this.spaceGroup||
null==this.spaceGroup.symmetryOperations||a>=this.spaceGroup.symmetryOperations.length?null:null==this.spaceGroup.finalOperations?this.spaceGroup.symmetryOperations[a]:this.spaceGroup.finalOperations[a]},"~N");m(b,"getSpaceGroupXyzOriginal",function(a,c){return this.spaceGroup.getXyz(a,c)},"~N,~B");m(b,"newSpaceGroupPoint",function(a,c,f,e,v,b,h){null==f&&null==this.spaceGroup.finalOperations&&(f=this.spaceGroup.symmetryOperations[c],f.doFinalize());JS.SymmetryOperation.rotateAndTranslatePoint(null==
f?this.spaceGroup.finalOperations[c]:f,a,e,v,b,h)},"JU.P3,~N,JU.M4,~N,~N,~N,JU.P3");m(b,"getSpinOp",function(a){return this.spaceGroup.symmetryOperations[a].getMagneticOp()},"~N");m(b,"getLatticeOp",function(){return this.spaceGroup.latticeOp});m(b,"getLatticeCentering",function(){return JS.SymmetryOperation.getLatticeCentering(this.getSymmetryOperations())});m(b,"getOperationRsVs",function(a){return(null==this.spaceGroup.finalOperations?this.spaceGroup.symmetryOperations:this.spaceGroup.finalOperations)[a].rsvs},
"~N");m(b,"getSiteMultiplicity",function(a){return this.spaceGroup.getSiteMultiplicity(a,this.unitCell)},"JU.P3");m(b,"getSpaceGroupName",function(){return null!=this.spaceGroup?this.spaceGroup.getName():null!=this.symmetryInfo?this.symmetryInfo.sgName:null!=this.unitCell&&0<this.unitCell.name.length?"cell="+this.unitCell.name:""});m(b,"geCIFWriterValue",function(a){return null==this.spaceGroup?null:this.spaceGroup.getCIFWriterValue(a,this)},"~S");m(b,"getLatticeType",function(){return null!=this.symmetryInfo?
this.symmetryInfo.latticeType:null==this.spaceGroup?"P":this.spaceGroup.latticeType});m(b,"getIntTableNumber",function(){return null!=this.symmetryInfo?this.symmetryInfo.intlTableNo:null==this.spaceGroup?null:this.spaceGroup.itaNumber});m(b,"getIntTableIndex",function(){return null!=this.symmetryInfo?this.symmetryInfo.intlTableIndexNdotM:null==this.spaceGroup?null:this.spaceGroup.getItaIndex()});m(b,"getIntTableTransform",function(){return null!=this.symmetryInfo?this.symmetryInfo.intlTableTransform:
null==this.spaceGroup?null:this.spaceGroup.itaTransform});m(b,"getSpaceGroupClegId",function(){return null!=this.symmetryInfo?this.symmetryInfo.getClegId():this.spaceGroup.getClegId()});m(b,"getSpaceGroupJmolId",function(){return null!=this.symmetryInfo?this.symmetryInfo.intlTableJmolId:null==this.spaceGroup?null:this.spaceGroup.jmolId});m(b,"getCoordinatesAreFractional",function(){return null==this.symmetryInfo||this.symmetryInfo.coordinatesAreFractional});m(b,"getCellRange",function(){return null==
this.symmetryInfo?null:this.symmetryInfo.cellRange});m(b,"getSymmetryInfoStr",function(){if(null!=this.symmetryInfo)return this.symmetryInfo.infoStr;if(null==this.spaceGroup)return"";(this.symmetryInfo=new JS.SymmetryInfo(this.spaceGroup)).setSymmetryInfoFromModelkit(this.spaceGroup);return this.symmetryInfo.infoStr});m(b,"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:this.spaceGroup.operationCount:0});m(b,"getSymmetryOperations",function(){if(null!=this.symmetryInfo)return this.symmetryInfo.symmetryOperations;null==this.spaceGroup&&(this.spaceGroup=JS.SpaceGroup.getNull(!0,!1,!0));this.spaceGroup.setFinalOperationsSafely();return this.spaceGroup.finalOperations});m(b,"getAdditionalOperationsCount",function(){return null!=this.symmetryInfo&&null!=this.symmetryInfo.symmetryOperations&&
null!=this.symmetryInfo.getAdditionalOperations()?this.symmetryInfo.additionalOperations.length:null!=this.spaceGroup&&null!=this.spaceGroup.finalOperations?this.spaceGroup.getAdditionalOperationsCount():0});m(b,"getAdditionalOperations",function(){if(null!=this.symmetryInfo)return this.symmetryInfo.getAdditionalOperations();this.getSymmetryOperations();return this.spaceGroup.getAdditionalOperations()});m(b,"isSimple",function(){return null==this.spaceGroup&&(null==this.symmetryInfo||null==this.symmetryInfo.symmetryOperations)});
m(b,"haveUnitCell",function(){return null!=this.unitCell});m(b,"setUnitCellFromParams",function(a,c,f){null==a&&(a=F(-1,[1,1,1,90,90,90]));this.unitCell=JS.UnitCell.fromParams(a,c,f);return this},"~A,~B,~N");m(b,"unitCellEquals",function(a){return a.unitCell.isSameAs(this.unitCell.getF2C())},"J.api.SymmetryInterface");m(b,"isSymmetryCell",function(a){a=a.unitCell;var c=!a.isStandard()?null:null!=this.symmetryInfo?this.symmetryInfo.spaceGroupF2C:this.unitCell.getF2C();a=a.isSameAs(c);null!=this.symmetryInfo&&
this.symmetryInfo.setIsCurrentCell(a)&&this.setUnitCellFromParams(this.symmetryInfo.spaceGroupF2CParams,!1,NaN);return a},"J.api.SymmetryInterface");m(b,"getUnitCellState",function(){return null==this.unitCell?"":this.unitCell.getState()});m(b,"getMoreInfo",function(){return this.unitCell.getMoreInfo()});m(b,"initializeOrientation",function(a){this.unitCell.initOrientation(a)},"JU.M3");m(b,"unitize",function(a){this.unitCell.unitize(a)},"JU.T3");m(b,"toUnitCell",function(a,c){this.unitCell.toUnitCell(a,
c)},"JU.T3,JU.T3");m(b,"toSupercell",function(a){return this.unitCell.toSupercell(a)},"JU.P3");d(b,"toFractional",function(a,c){this.$isBio||this.unitCell.toFractional(a,c)},"JU.T3,~B");m(b,"toCartesian",function(a,c){this.$isBio||this.unitCell.toCartesian(a,c)},"JU.T3,~B");m(b,"getUnitCellParams",function(){return this.unitCell.getUnitCellParams()});m(b,"getUnitCellAsArray",function(a){return this.unitCell.getUnitCellAsArray(a)},"~B");m(b,"getUnitCellVerticesNoOffset",function(){return this.unitCell.getVertices()});
m(b,"getCartesianOffset",function(){return this.unitCell.getCartesianOffset()});m(b,"getFractionalOffset",function(a){var c=this.unitCell.getFractionalOffset();return a&&null!=c&&c.x==y(c.x)&&c.y==y(c.y)&&c.z==y(c.z)?null:c},"~B");m(b,"setOffsetPt",function(a){this.unitCell.setOffset(a)},"JU.T3");m(b,"setOffset",function(a){var c=new JU.P3;JU.SimpleUnitCell.ijkToPoint3f(a,c,0,0);this.unitCell.setOffset(c)},"~N");m(b,"getUnitCellMultiplier",function(){return this.unitCell.getUnitCellMultiplier()});
m(b,"getUnitCellMultiplied",function(){var a=this.unitCell.getUnitCellMultiplied();if(a===this.unitCell)return this;var c=(new JS.Symmetry).setViewer(this.vwr,"getUCM");c.unitCell=a;return c});m(b,"getCanonicalCopy",function(a,c){return this.unitCell.getCanonicalCopy(a,c)},"~N,~B");m(b,"getUnitCellInfoType",function(a){return this.unitCell.getInfo(a)},"~N");m(b,"getUnitCellInfoStr",function(a){return this.unitCell.getInfoStr(a)},"~S");m(b,"getUnitCellInfo",function(a){return null==this.unitCell?null:
this.unitCell.dumpInfo(!1,a)},"~B");m(b,"isSlab",function(){return this.unitCell.isSlab()});m(b,"isPolymer",function(){return this.unitCell.isPolymer()});d(b,"getUnitCellVectors",function(){return this.unitCell.getUnitCellVectors()});m(b,"getUnitCell",function(a,c,f){if(null==a)return null;this.unitCell=JS.UnitCell.fromOABC(a,c);null!=f&&(this.unitCell.name=f);return this},"~A,~B,~S");m(b,"isSupercell",function(){return this.unitCell.isSupercell()});m(b,"notInCentroid",function(a,c,f){try{var e=new JU.BS,
v=c.nextSetBit(0),b=a.getMolecules(),h=b.length,d=a.at,l=b[h-1].firstAtomIndex==a.am[d[v].mi].firstAtomIndex,j=new JU.P3,q=f[6]/100;a=0!=q;a:for(;0<=--h&&c.get(b[h].firstAtomIndex);){var p=b[h].atomList;j.set(0,0,0);for(var v=0,t=p.nextSetBit(0);0<=t;t=p.nextSetBit(t+1))if(l||a)if(j.setT(d[t]),this.isNotCentroid(j,1,f,q))l&&e.set(t);else{if(!l)continue a}else j.add(d[t]),v++;(a||0<v&&this.isNotCentroid(j,v,f,0))&&e.or(p)}return e}catch(s){if(ba(s,Exception))return null;throw s;}},"JM.ModelSet,JU.BS,~A");
d(b,"isNotCentroid",function(a,c,f,e){a.scale(1/c);this.toFractional(a,!1);return 0!=e?(c=0<=e?e:5E-6,a.x+c<=f[0]||a.x-c>f[3]||a.y+c<=f[1]||a.y-c>f[4]||a.z+c<=f[2]||a.z-c>f[5]):a.x+5E-6<=f[0]||a.x+5E-5>f[3]||a.y+5E-6<=f[1]||a.y+5E-5>f[4]||a.z+5E-6<=f[2]||a.z+5E-5>f[5]},"JU.P3,~N,~A,~N");d(b,"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");m(b,"getSymmetryInfoAtom",function(a,c,f,e,v,b,h,d,l,j,q,p,t){return this.getDesc(a).getSymopInfo(c,f,e,v,b,h,d,l,j,q,p,t)},"JM.ModelSet,~N,~S,~N,JU.P3,JU.P3,JU.P3,~S,~N,~N,~N,~N,~A");m(b,"getSpaceGroupInfo",function(a,c,f,e,v){var b=null==c;if(null==c){0>f&&(f=a.vwr.am.cmi);var h=a.getModelAuxiliaryInfo(f);null!=h&&(c=h.get("spaceGroup"))}h=null;null!=v&&(h=(new JS.Symmetry).setViewer(this.vwr,"getSGI").setUnitCellFromParams(v,!1,NaN));return this.getDesc(a).getSpaceGroupInfo(this,
f,c,0,null,null,null,0,-1,e,b,0,h,null)},"JM.ModelSet,~S,~N,~B,~A");m(b,"getV0abc",function(a,c){var f=null,f=a&&a[0]?a[0]:null;return(null!=f?R(f,"JU.T3"):R(a,Array))?a:JS.UnitCell.getMatrixAndUnitCell(this.vwr,this.unitCell,a,c)},"~O,JU.M4");m(b,"getQuaternionRotation",function(a){return null==this.unitCell?null:this.unitCell.getQuaternionRotation(a)},"~S");m(b,"getFractionalOrigin",function(){return this.unitCell.getFractionalOrigin()});m(b,"getState",function(a,c,f){var e=null!=a.getInfo(c,"spaceGroupAssigned"),
v=this.getFractionalOffset(!1),b=!1;if(null!=v&&(0!=v.x||0!=v.y||0!=v.z))f.append("; set unitcell ").append(JU.Escape.eP(v)),b=!0;v=this.getUnitCellMultiplier();null!=v&&(f.append("; set unitcell ").append(JU.SimpleUnitCell.escapeMultiplier(v)),b=!0);v=a.getInfo(c,"spaceGroup");e&&null!=v&&(b=v.indexOf("#"),0<=b&&(v=v.substring(b+1)),b="\n UNITCELL "+JU.Escape.e(a.getUnitCell(c).getUnitCellVectors()),f.append(b),f.append("\n MODELKIT SPACEGROUP "+JU.PT.esc(v)),f.append(b),b=!0);a=a.getInfo(c,"spinRotationMatrixApplied");
null!=a&&(f.append("\n rotate VECTORS "+JU.Quat.newM(a)),b=!0);return b},"JM.ModelSet,~N,JU.SB");m(b,"getIterator",function(a,c,f,e){return J.api.Interface.getInterface("JS.UnitCellIterator",a,"script").set(this,c,a.ms.at,f,e)},"JV.Viewer,JM.Atom,JU.BS,~N");m(b,"toFromPrimitive",function(a,c,f,e){null==this.unitCell&&(this.unitCell=JS.UnitCell.fromOABC(f,!1));return this.unitCell.toFromPrimitive(a,c,f,e)},"~B,~S,~A,JU.M3");m(b,"generateCrystalClass",function(a){if(null==this.symmetryInfo||!this.symmetryInfo.isCurrentCell)return null;
var c=this.getSymmetryOperations(),f=new JU.Lst,e=null==a,v=0,b=0,h=0;e?(v=2.718281828459045,b=3.141592653589793,h=Math.log10(2E3),a=JU.P3.new3(v+1,b+2,h+3)):a=JU.P3.newP(a);if(null==c||null==this.unitCell)f.addLast(a);else{this.unitCell.toFractional(a,!0);var d=null,l=null;e&&(d=JU.P3.new3(b+4,h+5,v+6),this.unitCell.toFractional(d,!0),l=JU.P3.new3(h+7,v+8,b+9),this.unitCell.toFractional(l,!0));var b=new J.bspt.Bspt(3,0),h=b.allocateCubeIterator(),v=new JU.P3,j=c.length;a:for(;0<=--j;){c[j].rotate2(a,
v);h.initialize(v,0.001,!1);if(h.hasMoreElements())continue a;var q=JU.P3.newP(v);f.addLast(q);b.addTuple(q);e&&(null!=l&&(c[j].rotate2(l,v),f.addLast(JU.P3.newP(v))),null!=d&&(c[j].rotate2(d,v),f.addLast(JU.P3.newP(v))))}for(c=f.size();0<=--c;)v=f.get(c),e&&v.scale(0.5),this.unitCell.toCartesian(v,!0)}return f},"JU.P3");m(b,"calculateCIPChiralityForAtoms",function(a,c){a.setCursor(3);var f=this.getCIPChirality(a),e=a.getBoolean(603979960)?"CIPData":"CIPDataTracker",e=J.api.Interface.getInterface("JS."+
e,a,"script").set(a,c);e.setRule6Full(a.getBoolean(603979823));f.getChiralityForAtoms(e);a.setCursor(0)},"JV.Viewer,JU.BS");m(b,"calculateCIPChiralityForSmiles",function(a){this.vwr.setCursor(3);var c=this.getCIPChirality(this.vwr);a=J.api.Interface.getInterface("JS.CIPDataSmiles",this.vwr,"script").setAtomsForSmiles(this.vwr,a);c.getChiralityForAtoms(a);this.vwr.setCursor(0);return a.getSmilesChiralityArray()},"~S");d(b,"getCIPChirality",function(a){return null==this.cip?this.cip=J.api.Interface.getInterface("JS.CIPChirality",
a,"script"):this.cip},"JV.Viewer");m(b,"getUnitCellInfoMap",function(){return null==this.unitCell?null:this.unitCell.getInfo()});m(b,"setUnitCell",function(a){this.unitCell=JS.UnitCell.cloneUnitCell(a.unitCell)},"J.api.SymmetryInterface");m(b,"findSpaceGroup",function(a,c,f,e,v,b){return J.api.Interface.getInterface("JS.SpaceGroupFinder",this.vwr,"eval").findSpaceGroup(this.vwr,a,c,f,e,v,this,b)},"JU.BS,~S,~A,JU.T3,~A,~N");m(b,"setSpaceGroupName",function(a){this.clearSymmetryInfo();null!=this.spaceGroup&&
this.spaceGroup.setName(a)},"~S");m(b,"setSpaceGroupTo",function(a){R(a,"JS.Symmetry")?(this.spaceGroup=a.spaceGroup,this.symmetryInfo=a.symmetryInfo,null==this.spaceGroup&&null!=this.symmetryInfo&&(this.spaceGroup=this.symmetryInfo.fileSpaceGroup)):this.spaceGroup=R(a,"JS.SpaceGroup")?a:JS.SpaceGroup.getSpaceGroupFromJmolClegOrITA(this.vwr,a.toString());this.clearSymmetryInfo()},"~O");d(b,"clearSymmetryInfo",function(){null!=this.symmetryInfo&&(this.symmetryInfo=null)});m(b,"removeDuplicates",function(a,
c,f){var e=this.unitCell,v=a.at;a=a.occupancies;for(var b=null!=a,h=Array(c.length()),d=c.nextSetBit(0);0<=d;d=c.nextSetBit(d+1)){var l=h[d]=JU.P3.newP(v[d]);e.toFractional(l,!1);f?e.unitizeRnd(l):e.unitize(l)}for(d=c.nextSetBit(0);0<=d;d=c.nextSetBit(d+1)){f=v[d];l=h[d];f=f.getAtomicAndIsotopeNumber();for(var e=b?a[d]:0,j=c.nextSetBit(d+1);0<=j;j=c.nextSetBit(j+1))f!=v[j].getAtomicAndIsotopeNumber()||b&&e!=a[j]||1.96E-6>l.distanceSquared(h[j])&&c.clear(j)}return c},"JM.ModelSet,JU.BS,~B");m(b,"getPeriodicity",
function(){return null==this.spaceGroup?7:this.spaceGroup.periodicity});m(b,"getDimensionality",function(){return null==this.spaceGroup?3:this.spaceGroup.nDim});m(b,"getGroupType",function(){return null==this.spaceGroup?0:this.spaceGroup.groupType});m(b,"getEquivPoints",function(a,c,f){var e=this.getSymmetryOperations();return null==e||null==this.unitCell?null:this.unitCell.getEquivalentPoints(a,c,e,new JU.Lst,0,0,0,this.getPeriodicity(),f)},"JU.Point3fi,~S,~N");m(b,"getEquivPointList",function(a,
c,f,e,b,g){var h=null==f?this.getSymmetryOperations():f,d=0<=c.indexOf("newpt"),l=0<=c.indexOf("zapped"),j=b.size(),q=0<=c.indexOf("tofractional");if(0>c.indexOf("fromfractional"))for(var p=0;p<b.size();p++)this.toFractional(b.get(p),!1);c+=",fromfractional,tofractional";var t=0<a?0:j,s=a==j,r=0<a?a:j;s&&(a--,r--);l&&(r=0);var n=0<a?b.get(a):null;f=null==f?r:t;if(null!=h||null!=this.unitCell)for(var m=this.getPeriodicity(),p=a;p<j;p++)this.unitCell.getEquivalentPoints(b.get(p),c,h,b,t,r,f,m,e);!l&&
(b.size()==a||b.get(a)!==n||s||d)&&j--;for(p=j-a;0<=--p;)b.removeItemAt(a);if(!q){c=null==g?null:new JU.P3;for(p=b.size();--p>=a;)h=b.get(p),this.toCartesian(h,!1),null!=g&&(g.toFractional(c.setP(h),!1),g.isWithinUnitCell(c,1,1,1,e)||b.removeItemAt(p))}},"~N,~S,~A,~N,JU.Lst,J.api.SymmetryInterface");m(b,"adjustRangeMinMax",function(a,c,f,e,b,g,h,d){this.unitCell.adjustRangeMinMax(a,c,f,e,b,g,h,d)},"~A,~N,JU.P3i,JU.P3i,JU.P3,JU.P3,JU.P3i,JU.P3i");m(b,"getInvariantSymops",function(a,c){var f=this.getSymmetryOperations();
if(null==f)return O(0,0);for(var e=new JU.BS,b=new JU.P3,g=new JU.P3,h=f.length,d=1;d<h;d++)b.setT(a),this.unitCell.toFractional(b,!1),this.unitCell.unitize(b),g.setT(b),f[d].rotTrans(b),this.unitCell.unitize(b),1.96E-6>g.distanceSquared(b)&&e.set(d);f=O(e.cardinality(),0);if(null!=c&&f.length!=c.length)return null;b=0;for(d=1;d<h;d++)if(e.get(d)){if(null!=c&&c[b]!=d+1)return null;f[b++]=d+1}return f},"JU.P3,~A");m(b,"getWyckoffPosition",function(a,c){if(null==this.unitCell)return"";var f=this.spaceGroup;
null==f&&null!=this.symmetryInfo&&(f=JS.SpaceGroup.determineSpaceGroupN(this.symmetryInfo.sgName),null==f&&(f=this.getSpaceGroupJmolId(),null==f&&(f=this.getSpaceGroupClegId()),f=JS.SpaceGroup.getSpaceGroupFromJmolClegOrITA(this.vwr,f)));if(null==f||null==f.itaNumber)return"?";null==a?a=JU.P3.new3(0.53,0.2,0.16):"L".equals(c)||(a=JU.P3.newP(a),this.unitCell.toFractional(a,!1),this.unitCell.unitize(a));try{var e=this.getWyckoffFinder().getWyckoffFinder(this.vwr,f),b=null!=c&&"M"==c.charAt(0);b&&(c=
1==c.length?null:c.substring(1));var g=null==c?-1:"L".equals(c)?-4:c.equalsIgnoreCase("coord")?-2:c.equalsIgnoreCase("coords")?-3:c.endsWith("*")?c.charAt(0).charCodeAt(0):0;if(0!=g)return null==e?"?":e.getInfo(this.unitCell,a,g,b,this.vwr.is2D());if(null==e.findPositionFor(a,c))return null;this.unitCell.toCartesian(a,!1);return a}catch(h){if(ba(h,Exception))return h.printStackTrace(),null==c?"?":null;throw h;}},"JU.P3,~S");d(b,"getWyckoffFinder",function(){null==JS.Symmetry.wyckoffFinder&&(JS.Symmetry.wyckoffFinder=
J.api.Interface.getInterface("JS.WyckoffFinder",null,"symmetry"));return JS.Symmetry.wyckoffFinder});m(b,"getTransform",function(a,c,f){return this.getDesc(null).getTransform(this.unitCell,this.getSymmetryOperations(),a,c,f)},"JU.P3,JU.P3,~B");d(b,"isWithinUnitCell",function(a,c,f,e,b){return this.unitCell.isWithinUnitCell(c,f,e,b,a)},"JU.P3,~N,~N,~N,~N");m(b,"checkPeriodic",function(a,c,f){return this.unitCell.checkPeriodic(a,c,f)},"JU.P3,~N,~N");m(b,"staticConvertOperation",function(a,c,f){return JS.SymmetryOperation.staticConvertOperation(a,
c,f)},"~S,JU.M34,~S");m(b,"getSubgroupJSON",function(a,c,f,e,b,g,h){a.startsWith("ITA/")&&(a=a.substring(4));null!=c&&c.startsWith("ITA/")&&(c=c.substring(4));var d=JS.SpaceGroup.getExplicitSpecialGroupType(a);if(-1==d||(null==c||0==c.length?d:JS.SpaceGroup.getExplicitSpecialGroupType(a))!=d)return null;var l=0==d?a:a.substring(2);if(l.equalsIgnoreCase("all"))return this.getAllITSubData(d);l=JU.PT.parseInt(this.getSpaceGroupInfoObj("itaNumber",l,!1,!1));c=null==c?-1:0==c.length?0:JU.PT.parseInt(this.getSpaceGroupInfoObj("itaNumber",
0==d?c:c.substring(2),!1,!1));if(0!=b){f=JS.SpaceGroup.getGroupTypePrefix(d);var j=b>>24&255,q=b>>16&255,p=b>>8&255,t=b&255,s=this.getSubgroupIndexData(d);e=null==h?null:new JU.Lst;var r=new JU.Lst,l=this.findSubTransform(l,c,j,q,p,t,s,1,1,1,JU.BSUtil.newAndSetBit(l),r,e);if(null==l?null==e:l.endsWith("!"))return l;c=l;t=0;for(q=null==e?1:e.size();t<q;t++){s=null==g?new java.util.Hashtable:g;null!=h&&s!==g&&h.addLast(s);null!=e&&(l=e.get(t));for(var r=l.$plit(">"),p=r.length,n=Array(p),m="",u="",
w=1,y=0,j=p-3;0<=j;j-=2){y++;var B=f+r[j],x=r[j+2]=f+r[j+2],w=w*Integer.parseInt(r[j+1].substring(1,r[j+1].length-1));c=r[j+1]=this.getSubgroupJSON(B,x,0,1,0,null,null);m+=">"+c;n[j]=this.getSpaceGroupInfoObj("hmNameShort",B,!1,!1);n[j+1]="";j==p-3&&(n[j+2]=this.getSpaceGroupInfoObj("hmNameShort",x,!1,!1))}r[0]=f+r[0];for(j=0;j<p;j+=2)u+=">"+n[j];u=u.substring(1);p=this.convertTransform(m.substring(1),null);s.put("trm",this.convertTransform(null,p));s.put("trmat",p);s.put("index",Integer.$valueOf(w));
s.put("depth",Integer.$valueOf(y));s.put("indexPath",l);s.put("cleg",JU.PT.join(r,">",0));s.put("bcsPath",JU.PT.rep(u," ",""))}return c}var D=0>c,A=0==c&&0==f,P=0==c&&0>f;g=0==c&&0<f&&0>e;h=0==c&&0<f&&0<e;d=0<c&&0>f;b=0<c&&0<f&&0>e;var C=0<c&&0<f&&0<e;try{t=this.getSpaceGroupJSON("subgroups",a,l);for(a=0;null!=t;){if(D)return t;if(A||P){s=t.get("subgroups");q=s.size();m=A?JU.AU.newInt2(q):null;r=P?new JU.BS:null;for(j=q;0<=--j;)if(t=s.get(j),u=t.get("subgroup").intValue(),P)r.set(u);else{var B=t.get("subgroupIndex").intValue(),
x="k".equals(t.get("trType"))?2:1,Q=1==x?t.get("trSubtype"):"",F=t.get("det").doubleValue(),Y=E(1>F?-1/F:F);Q.equals("ct")?x=3:Q.equals("eu")&&(x=4);var L=t.get("trm").size();m[j]=O(-1,[u,L,B,Y,x])}if(P){w=O(r.cardinality(),0);q=0;for(j=r.nextSetBit(0);0<=j;j=r.nextSetBit(j+1))w[q++]=j;return w}return m}s=t.get("subgroups");r=0;q=s.size();if(g||h){if(f>q)throw new ArrayIndexOutOfBoundsException("no map.subgroups["+f+"]!");r=f-1;if(g)return s.get(r);q=f}y=d?new JU.Lst:null;for(j=r;j<q;j++)if(t=s.get(j),
u=t.get("sg").intValue(),h||u==c){if(++a==f){if(b)return t}else if(C)continue;if(d)y.addLast(t);else{n=t.get("trms");q=n.size();if(1>e||e>q)return null;p=n.get(e-1);return p.get("trm")}}if(d&&!y.isEmpty())return y;break}if(0==f)return null;if(C&&0<a)throw new ArrayIndexOutOfBoundsException("only "+a+" maximal subgroup information for "+l+">>"+c+"!");throw new ArrayIndexOutOfBoundsException("no subgroup information for "+l+">>"+c+"!");}catch(G){if(ba(G,Exception))return G.getMessage();throw G;}},"~S,~S,~N,~N,~N,java.util.Map,JU.Lst");
d(b,"findSubTransform",function(a,c,f,e,b,g,h,d,l,j,q,p,t){l=h[a];if(0<b&&d>b)return null;for(var s=a==c&&1==d,r=s?2:3,n=0<d&&d<g?2:1;n<r;n++){var m=0,u=l.length;a:for(;m<u;m++){var w=l[m][0];if(!q.get(w)||s){var y=l[m][1],B=y*j;if(!(B>f))switch(n){case 1:if(w==c){if(B<e)continue;B="";m=0;for(u=p.size();m<u;m++)var x=p.get(m),B=B+(x[0]+">["+x[1]+"]>");B+=a+">["+y+"]>"+w;if(null!=t){t.addLast(B);break a}return B}break;case 2:if(w!=c&&!q.get(w)){var D=JU.BSUtil.copy(q);D.set(w);x=p.size();p.addLast(O(-1,
[a,y]));B=this.findSubTransform(w,c,f,e,b,g,h,d+1,y,B,D,p,t);p.removeItemAt(x);if(null!=B&&null==t)return B}}}}}return null},"~N,~N,~N,~N,~N,~N,~A,~N,~N,~N,JU.BS,JU.Lst,JU.Lst");m(b,"getSpaceGroupJSON",function(a,c,f){var e=f,b=a.equals("setting"),g=a.equals("settings"),h=a.equalsIgnoreCase("AFLOWLIB"),d=!g&&a.equals("subgroups"),l=(b||g||d)&&-2147483648==f,j=!g&&!b&&!d?a:l?this.getSpaceGroupName():""+f;try{var q,p=null==c?0:JS.SpaceGroup.getExplicitSpecialGroupType(c);0<p&&(c=c.substring(2));var t=
null,s,r,n;if(b&&null==c||g||d)if(r=!0,n=b?c:null,l){if(q=JU.PT.parseInt(this.getIntTableNumber()),b||g)if(null==this.spaceGroup){var m=this.symmetryInfo.getDerivedSpaceGroup();if(null==m)return new java.util.Hashtable;n=m.jmolId}else n=this.getSpaceGroupClegId(),b?t=n.substring(n.indexOf(":")+1):g&&(f=0)}else q=f;else{h||(f=0);n=c;var u=n.indexOf("(");0>u&&(u=n.indexOf(":"));if(s=0<=u&&n.indexOf(",")>u)t=n.substring(u+1,n.length-(n.endsWith(")")?1:0)),n=n.substring(0,u),l=!0;q=n.equalsIgnoreCase("ALL")?
0:JU.PT.parseInt(n);r=-2147483648!=q;u=n.indexOf(".");!s&&(r&&0==f&&0<u)&&(f=JU.PT.parseInt(n.substring(u+1)),n=n.substring(0,u))}if(r&&(q>JS.SpaceGroup.getMax(p)||(g||b?1>q:0>q)))throw new ArrayIndexOutOfBoundsException(q);if(d){var w=this.getITSubJSONResource(p,q);if(null!=w)return w}else if(b||g||a.equalsIgnoreCase("ITA")){if(0==q)return JS.Symmetry.getAllITAData(this.vwr,p,!0);var y=0<p,w=JS.Symmetry.getITJSONResource(this.vwr,p,1>q?e:q,c);if(null!=w){if(0==f&&null==t)return g?w.get("its"):w;
var B=w.get("its");if(null!=B){if(g&&!l)return B;var x=B.size(),D=b?Math.max(f,1):r&&!l?f:x;if(D>x)return null;if(b)return B.get(D-1);for(var x=null,A=D;0<=--A;){x=B.get(A);if(A==f-1||(null==t?y?JS.SpaceGroup.hmMatches(x.get("hm"),n,p):n.equals(x.get("jmolId")):t.equals(x.get("trm")))){if(!x.containsKey("more"))return x;break}x=null}if(null!=x)return JS.SpaceGroup.fillMoreData(this.vwr,x,c,q,B.get(0))}}}else if(h&&null==t){null==JS.Symmetry.aflowStructures&&(JS.Symmetry.aflowStructures=JS.Symmetry.getResource(this.vwr,
"sg/json/aflow_structures.json"));if(0==q)return JS.Symmetry.aflowStructures;if(-2147483648==q){c=null;n.endsWith("*")&&(c=new JU.Lst,n=n.substring(0,n.length-1));for(f=1;230>=f;f++){y=JS.Symmetry.aflowStructures.get(""+f);A=0;for(x=y.size();A<x;A++){var P=y.get(A);if(null!=c&&P.startsWith(n))c.addLast("=aflowlib/"+f+"."+(A+1)+"\t"+P);else if(P.equalsIgnoreCase(n))return f+"."+(A+1)}}return null!=c&&0<c.size()?c:null}var C=JS.Symmetry.aflowStructures.get(""+n);if(f<=C.size())return 0==f?C:C.get(f-
1)}if(l)return new java.util.Hashtable;throw new IllegalArgumentException(j);}catch(Q){if(ba(Q,Exception))return Q.getMessage();throw Q;}},"~S,~S,~N");b.getITJSONResource=d(b,"getITJSONResource",function(a,c,f,e){if(0==c)return null==JS.Symmetry.itaData&&(JS.Symmetry.itaData=Array(230)),c=JS.Symmetry.itaData[f-1],null==c&&(JS.Symmetry.itaData[f-1]=c=JS.Symmetry.getResource(a,"sg/json/ita_"+f+".json")),c;a=JS.Symmetry.getAllITAData(a,c,!1);return 0<f?a[f-1]:JS.Symmetry.getSpecialSettingJSON(a,e,c,
!1)},"JV.Viewer,~N,~N,~S");b.getSpecialSettingJSON=d(b,"getSpecialSettingJSON",function(a,c,f,e){var b=null,g=Character.isDigit(c.charAt(2));g&&c.endsWith(";0,0,0")&&(c=c.substring(0,c.length-6));var d=g?"clegId":"hm";g||(c=c.substring(2));for(var k=a.length;0<=--k;)for(var l=a[k].get("its"),j=l.size();0<=--j;){var b=l.get(j),q=b.get(d);if(g?c.equals(q):JS.SpaceGroup.hmMatches(q,c,f))return e?b:a[k]}return null},"~A,~S,~N,~B");b.getAllITAData=d(b,"getAllITAData",function(a,c,f){switch(c){case 0:return null==
JS.Symmetry.allDataITA&&(JS.Symmetry.allDataITA=JS.Symmetry.getResource(a,"sg/json/ita_all.json")),JS.Symmetry.allDataITA;default:var e="sg/json/it"+(300==c?"a":"e")+"_all_"+JS.SpaceGroup.getSpecialGroupName(c)+".json";switch(c){case 300:return null==JS.Symmetry.allPlaneData&&(JS.Symmetry.allPlaneData=JS.Symmetry.getResource(a,e),JS.Symmetry.planeData=JS.Symmetry.createSpecialData(c,JS.Symmetry.allPlaneData)),f?JS.Symmetry.allPlaneData:JS.Symmetry.planeData;case 400:return null==JS.Symmetry.allLayerData&&
(JS.Symmetry.allLayerData=JS.Symmetry.getResource(a,e),JS.Symmetry.layerData=JS.Symmetry.createSpecialData(c,JS.Symmetry.allLayerData)),f?JS.Symmetry.allLayerData:JS.Symmetry.layerData;case 500:return null==JS.Symmetry.allRodData&&(JS.Symmetry.allRodData=JS.Symmetry.getResource(a,e),JS.Symmetry.rodData=JS.Symmetry.createSpecialData(c,JS.Symmetry.allRodData)),f?JS.Symmetry.allRodData:JS.Symmetry.rodData;case 600:return null==JS.Symmetry.allFriezeData&&(JS.Symmetry.allFriezeData=JS.Symmetry.getResource(a,
e),JS.Symmetry.friezeData=JS.Symmetry.createSpecialData(c,JS.Symmetry.allFriezeData)),f?JS.Symmetry.allFriezeData:JS.Symmetry.friezeData}}return null},"JV.Viewer,~N,~B");b.createSpecialData=d(b,"createSpecialData",function(a,c){for(var f=JS.SpaceGroup.getMax(a),e=Array(f),b=0;b<f;b++)e[b]=new java.util.Hashtable,e[b].put("sg",Integer.$valueOf(b+1)),e[b].put("its",new JU.Lst);for(var b=0,g=c.size();b<g;b++){var d=c.get(b),k=d.get("sg").intValue();e[k-1].get("its").addLast(d)}for(b=0;b<f;b++)e[b].put("n",
Integer.$valueOf(e[b].get("its").size()));return e},"~N,JU.Lst");d(b,"getAllITSubData",function(a){switch(a){default:case 0:return null;case 300:return null==JS.Symmetry.planeSubData&&(JS.Symmetry.planeSubData=JS.Symmetry.getResource(this.vwr,"sg/json/sub_all_plane.json")),JS.Symmetry.planeSubData;case 400:return null==JS.Symmetry.layerSubData&&(JS.Symmetry.layerSubData=JS.Symmetry.getResource(this.vwr,"sg/json/sub_all_layer.json")),JS.Symmetry.layerSubData;case 500:return null==JS.Symmetry.rodSubData&&
(JS.Symmetry.rodSubData=JS.Symmetry.getResource(this.vwr,"sg/json/sub_all_rod.json")),JS.Symmetry.rodSubData;case 600:return null==JS.Symmetry.friezeSubData&&(JS.Symmetry.friezeSubData=JS.Symmetry.getResource(this.vwr,"sg/json/sub_all_frieze.json")),JS.Symmetry.friezeSubData}},"~N");d(b,"getITSubJSONResource",function(a,c){if(0==a){null==JS.Symmetry.itaSubData&&(JS.Symmetry.itaSubData=Array(230));var f=JS.Symmetry.itaSubData[c-1];null==f&&(JS.Symmetry.itaSubData[c-1]=f=JS.Symmetry.getResource(this.vwr,
"sg/json/sub_"+c+".json"));return f}return this.getAllITSubData(a).get(c-1)},"~N,~N");d(b,"getSubgroupIndexData",function(a){var c=JS.SpaceGroup.getSpecialGroupName(a),f=JS.SpaceGroup.getMax(a);switch(a){default:case 0:null==JS.Symmetry.itaSubList&&(JS.Symmetry.itaSubList=JU.AU.newInt3(f+1,0));f=JS.Symmetry.itaSubList;break;case 300:null==JS.Symmetry.planeSubList&&(JS.Symmetry.planeSubList=JU.AU.newInt3(f+1,0));f=JS.Symmetry.planeSubList;break;case 400:null==JS.Symmetry.layerSubList&&(JS.Symmetry.layerSubList=
JU.AU.newInt3(f+1,0));f=JS.Symmetry.layerSubList;break;case 500:null==JS.Symmetry.rodSubList&&(JS.Symmetry.rodSubList=JU.AU.newInt3(f+1,0));f=JS.Symmetry.rodSubList;break;case 600:null==JS.Symmetry.friezeSubList&&(JS.Symmetry.friezeSubList=JU.AU.newInt3(f+1,0)),f=JS.Symmetry.friezeSubList}a=JS.Symmetry.getResource(this.vwr,"sg/json/sub_"+(0==a?"":c+"_")+"index.json");for(c=a.size();0<=--c;)for(var e=a.get(c),b=E(e.size()/2),g=f[c+1]=JU.AU.newInt2(b),d=0,k=0;d<b;d++)g[d]=O(-1,[e.get(k++).intValue(),
e.get(k++).intValue()]);return f},"~N");b.getResource=d(b,"getResource",function(a,c){try{var f=JV.FileManager.getBufferedReaderForResource(a,JS.Symmetry,"JS/",c),e=Array(1);if(JU.Rdr.readAllAsString(f,2147483647,!1,e,0))return(new JU.JSJSONParser).parse(e[0],!0)}catch(b){System.err.println(b.getMessage())}return null},"JV.Viewer,~S");m(b,"getCellWeight",function(a){return this.unitCell.getCellWeight(a)},"JU.P3");m(b,"getPrecision",function(){return null==this.unitCell?NaN:this.unitCell.getPrecision()});
m(b,"fixUnitCell",function(a){return this.spaceGroup.createCompatibleUnitCell(a,null,!0)},"~A");m(b,"staticGetTransformABC",function(a,c){return JS.SymmetryOperation.getTransformABC(a,c)},"JU.M4,~B");d(b,"setCartesianOffset",function(a){this.unitCell.setCartesianOffset(a)},"JU.T3");d(b,"setSymmetryInfoFromFile",function(a,c,f){var e=a.getModelAuxiliaryInfo(c),b=e.get("fileSymmetry");this.symmetryInfo=new JS.SymmetryInfo(null==b?null:b.spaceGroup);f=this.symmetryInfo.setSymmetryInfoFromFile(e,f);null!=
f&&(this.setUnitCellFromParams(f,e.containsKey("jmolData"),this.symmetryInfo.slop),this.unitCell.spinFrameToCartXYZ=b.spinFrameToCartXYZ,this.setSpinSym(),this.unitCell.setMoreInfo(e.get("moreUnitCellInfo")),e.put("infoUnitCell",this.getUnitCellAsArray(!1)),this.setOffsetPt(e.get("unitCellOffset")),e=e.get("matUnitCellOrientation"),null!=e&&this.initializeOrientation(e),null!=this.symmetryInfo.strSUPERCELL&&(e=this.unitCell.getUnitCellVectors(),e[0]=new JU.P3,a.setModelCagePts(c,e,"conventional")),
JU.Logger.debugging&&JU.Logger.debug("symmetryInfos["+c+"]:\n"+this.unitCell.dumpInfo(!0,!0)))},"JM.ModelSet,~N,~A");d(b,"transformUnitCell",function(a){null==a&&(a=JS.UnitCell.toTrm(this.spaceGroup.itaTransform,null));var c=JU.M4.newM4(a);c.invert();for(var f=this.getUnitCellVectors(),e=1;3>=e;e++)this.toFractional(f[e],!0),c.rotate(f[e]),this.toCartesian(f[e],!0);c=new JU.P3;a.getTranslation(c);this.toCartesian(c,!0);f[0].add(c);this.unitCell=JS.UnitCell.fromOABC(f,!1)},"JU.M4");m(b,"staticCleanTransform",
function(a){return JS.SymmetryOperation.getTransformABC(JS.UnitCell.toTrm(a,null),!0)},"~S");m(b,"saveOrRetrieveTransformMatrix",function(a){var c=this.transformMatrix;this.transformMatrix=a;return c},"JU.M4");m(b,"getUnitCellDisplayName",function(){var a=null!=this.spaceGroup?this.spaceGroup.getDisplayName():null!=this.symmetryInfo?this.symmetryInfo.getDisplayName(this):null;return 0<a.length?a:null});m(b,"staticToRationalXYZ",function(a,c){var f=JS.SymmetryOperation.fcoord(a,c);return",".equals(c)?
f:"("+f+")"},"JU.P3,~S");m(b,"getFinalOperationCount",function(){this.setFinalOperations(3,null,null,-1,-1,!1,null);return this.spaceGroup.getOperationCount()});m(b,"convertTransform",function(a,c){if(null==a)return this.staticGetTransformABC(c,!1);if(a.equals("xyz"))return null==c?null:JS.SymmetryOperation.getXYZFromMatrix(c,!1,!1,!1);null==c&&(c=new JU.M4);JS.UnitCell.getMatrixAndUnitCell(this.vwr,0<=a.indexOf("*")?this.unitCell:null,a,c);return c},"~S,JU.M4");m(b,"staticGetMatrixTransform",function(a,
c){return this.getCLEGInstance().getMatrixTransform(this.vwr,a,c)},"~S,~O");m(b,"staticTransformSpaceGroup",function(a,c,f,e){return this.getCLEGInstance().transformSpaceGroup(this.vwr,a,c,f,e)},"JU.BS,~S,~O,JU.SB");d(b,"getCLEGInstance",function(){null==JS.Symmetry.clegInstance&&(JS.Symmetry.clegInstance=J.api.Interface.getInterface("JS.CLEG",null,"symmetry"));return JS.Symmetry.clegInstance});m(b,"setViewer",function(a,c){null==this.vwr&&(this.vwr=a,this.id=c);return this},"JV.Viewer,~S");m(b,"getUnitCellCenter",
function(){return this.unitCell.getCenter(this.getPeriodicity())});b.getSGFactory=d(b,"getSGFactory",function(){null==JS.Symmetry.groupFactory&&(JS.Symmetry.groupFactory=J.api.Interface.getInterface("JS.SpecialGroupFactory",null,"symmetry"));return JS.Symmetry.groupFactory});b.getSpecialSettingInfo=d(b,"getSpecialSettingInfo",function(a,c,f){var e=c.substring(2),b=e.indexOf(":"),g=e.indexOf(","),d=e.indexOf("."),d=0<b&&g>b?b:d,g=JS.SpaceGroup.getITNo(e,d),e=0<d&&d==b||0>g?0:0<d?JS.SpaceGroup.getITNo(e.substring(d+
1),0):1;a=JS.Symmetry.getAllITAData(a,f,!1);if(0>=e)return JS.Symmetry.getSpecialSettingJSON(a,c,f,!0);c=a[g-1].get("its");return e<=c.size()?c.get(e-1):null},"JV.Viewer,~S,~N");m(b,"getConstrainableEquivAtom",function(a){for(var c=this.vwr.ms.getSymmetryEquivAtoms(JU.BSUtil.newAndSetBit(a.i),this,null),f=this.getSymmetryOperations(),e=a,b=9999;0<=b;b=c.nextSetBit(b+1)){if(null==e){if(e=this.vwr.ms.at[b],e===a)continue}else 9999==b&&(b=-1);var g=this.getInvariantSymops(e,null);if(0<g.length)switch(f[g[0]-
1].getOpType()){case 2:case 8:return e}e=null}return a},"JM.Atom");m(b,"setSpinAxisAngle",function(a){null!=this.unitCell&&this.unitCell.setSpinAxisAngle(a)},"JU.A4");m(b,"getSpinIndex",function(a){var c=this.getSymmetryOperations();return null==c||a>=c.length?-1:c[a].spinIndex},"~N");d(b,"setSpinSym",function(){null==this.spinSym&&(this.spinSym=new JS.Symmetry,this.spinSym.spaceGroup=this.spaceGroup,this.spinSym.unitCell=this.unitCell)});m(b,"getSpinSym",function(){return null==this.spinSym?this:
this.spinSym});m(b,"updatePointGroup",function(){return null==this.pointGroup?null:this.pointGroup.updateDraw()});m(b,"toFractionalSpin",function(a){this.unitCell.toFractionalSpin(a)},"JU.T3");m(b,"toCartesianSpin",function(a){this.unitCell.toCartesianSpin(a)},"JU.T3");b.nullDesc=null;b.aflowStructures=null;b.itaData=null;b.itaSubData=null;b.planeData=null;b.layerData=null;b.rodData=null;b.friezeData=null;b.itaSubList=null;b.planeSubList=null;b.layerSubList=null;b.rodSubList=null;b.friezeSubList=
null;b.allDataITA=null;b.allPlaneData=null;b.allLayerData=null;b.allRodData=null;b.allFriezeData=null;b.planeSubData=null;b.layerSubData=null;b.rodSubData=null;b.friezeSubData=null;b.wyckoffFinder=null;b.clegInstance=null;b.groupFactory=null});aa("JS");N(["java.util.Hashtable","JU.M3","$.V3"],"JS.PointGroup","JU.Lst $.P3 $.PT $.Quat $.SB J.bspt.Bspt JS.SymmetryOperation JU.BSUtil $.Escape $.Logger $.Point3fi".split(" "),function(){var b=I(function(){this.operations=null;sa("JS.PointGroup.Operation")||
JS.PointGroup.$PointGroup$Operation$();sa("JS.PointGroup.Operator")||JS.PointGroup.$PointGroup$Operator$();this.maxAtoms=250;this.maxElement=0;this.eCounts=null;this.nOps=0;this.isAtoms=!1;this.iter=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.textInfo=this.info=this.drawInfo=this.highOperations=this.principalPlane=this.principalAxis=
null;this.convention=0;this.vTemp=null;this.centerAtomIndex=-1;this.haveInversionCenter=!1;this.bsAtoms=this.atomMap=this.elements=this.points=this.center=null;this.$isLinear=this.localEnvOnly=this.haveVibration=!1;this.sppa=0;this.isSpinGroup=!1;this.modelIndex=this.highestOrder=0;this.type=this.drawID=null;this.scaleFactor=this.index=0;S(this,arguments)},JS,"PointGroup",null);pa(b,function(){this.nAxes=O(JS.PointGroup.maxAxis,0);this.axes=Array(JS.PointGroup.maxAxis);this.vTemp=new JU.V3});$(b,
function(a){this.convention=a?1:0},"~B");d(b,"newInversionCenter",function(a){return ja(JS.PointGroup.Operator,this,null,a,null,-1)},"~N");d(b,"newPlane",function(a,c){return ja(JS.PointGroup.Operator,this,null,a,c,-1)},"~N,JU.V3");d(b,"newAxis",function(a,c,f){return ja(JS.PointGroup.Operator,this,null,a,c,f)},"~N,JU.V3,~N");b.getUniqueFractions=d(b,"getUniqueFractions",function(a){var c=JS.PointGroup.bsUnique.get(Integer.$valueOf(a));if(null!=c)return c;for(var c=JU.BSUtil.newBitSet2(1,a),f=E(a/
2),e=1;e<=f;e++){var b=E(a/e);if(b*e==a&&c.get(b))for(var g=b;g<=f;g+=b)c.clear(g),c.clear(a-g)}JS.PointGroup.bsUnique.put(Integer.$valueOf(a),c);return c},"~N");b.getPointGroup=d(b,"getPointGroup",function(a,c,f,e,b,g,d,k,l,j,q){j=new JS.PointGroup(j);0>=g&&(g=0.01);0>=d&&(d=0.5);0>=k&&(k=250);j.distanceTolerance=g;j.distanceTolerance2=g*g;j.linearTolerance=d;j.maxAtoms=k;j.isAtoms=null!=e;j.bsAtoms=j.isAtoms?e:JU.BSUtil.newBitSet2(0,f.length);j.haveVibration=b;j.center=c;j.localEnvOnly=l;j.sppa=
q;JU.Logger.debugging&&(a=null);return j.set(a,f)?j:a},"JS.PointGroup,JU.T3,~A,JU.BS,~B,~N,~N,~N,~B,~B,~N");d(b,"set",function(a,c){this.cosTolerance=Math.cos(3.141592653589793*(this.linearTolerance/180));if(!this.getPointsAndElements(c))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();for(var f=Array(this.points.length),e=0;e<this.points.length;e++){f[e]=
JU.P3.newP(this.points[e]);var b=this.points[e].getVibrationVector();if(null!=b){if(b.isFrom000){this.isSpinGroup=!0;f=null;this.haveVibration=!0;break}else if(!this.haveVibration)break;f[e].add(b)}}this.haveVibration&&null!=f&&(this.points=f);if(this.isEqual(a))return!1;try{this.findInversionCenter();if(this.$isLinear=this.isLinear(this.points))return this.name=this.haveInversionCenter?"D\u221eh":"C\u221ev",this.vTemp.sub2(this.points[1],this.points[0]),this.addAxis(22,this.vTemp),this.principalAxis=
this.axes[22][0],this.haveInversionCenter&&(this.axes[0]=C(-1,[this.principalPlane=this.newPlane(++this.nOps,this.vTemp)]),this.nAxes[0]=1),!0;this.axes[0]=Array(JS.PointGroup.axesMaxN[0]);f=0;this.findCAxes();f=this.findPlanes();this.findAdditionalAxes(f);var g=this.getHighestOrder();if(1<this.nAxes[23])this.name=1<this.nAxes[25]?this.haveInversionCenter?"Ih":"I":1<this.nAxes[24]?this.haveInversionCenter?"Oh":"O":0<f?this.haveInversionCenter?"Th":"Td":"T";else{var d=this.nAxes[22];if(2>g){if(1==
f)return this.name="Cs",!0;if(this.haveInversionCenter)return this.name="Ci",!0;this.name="C1"}else 1==g%2&&0<d||0==g%2&&1<d?(this.principalAxis=this.setPrincipalAxis(g,f),0==f?this.name=20>g?"S"+g:"D"+(g-20):(e=g,g=20>g?E(g/2):g-20,d>g+1&&(this.addHighOperations(d,f,e,g),g=null==this.principalPlane?f:f-1),this.name=f==g?"D"+g+"d":"D"+g+"h")):0==f?(this.principalAxis=this.axes[g][0],this.name=20>g?"S"+g:"C"+(g-20)):1<f?(this.principalAxis=this.axes[g][0],this.name="C"+f+"v"):(this.principalPlane=
this.axes[0][0],this.principalAxis=this.axes[20>g?g+20:g][0],this.name="C"+(20>g?g/2:g-20)+"h")}}catch(k){if(ba(k,Exception))this.name="??";else throw k;}finally{JU.Logger.info("Point group found: "+this.name)}return!0},"JS.PointGroup,~A");d(b,"addHighOperations",function(){},"~N,~N,~N,~N");d(b,"getPointsAndElements",function(a){var c=this.bsAtoms.cardinality();if(this.isAtoms&&c>this.maxAtoms)return!1;this.points=Array(c);this.elements=O(c,0);if(0==c)return!0;for(var f=0,c=this.bsAtoms.nextSetBit(0);0<=
c;c=this.bsAtoms.nextSetBit(c+1)){var e=a[c];R(e,"JU.Node")&&(f=Math.max(f,e.i))}this.atomMap=O(f+1,0);this.nAtoms=0;if(f=null==this.center)this.center=new JU.P3;for(var b=new J.bspt.Bspt(3,0),c=this.bsAtoms.nextSetBit(0);0<=c;c=this.bsAtoms.nextSetBit(c+1),this.nAtoms++){e=a[c];if(R(e,"JU.Node")){var g=this.localEnvOnly?1:1+Math.max(3,e.getCovalentBondCount());this.elements[this.nAtoms]=e.getElementNumber()*g;this.atomMap[e.i]=this.nAtoms+1}else g=JU.Point3fi.newPF(e,-1-this.nAtoms),R(e,"JU.Point3fi")&&
(this.elements[this.nAtoms]=Math.max(0,e.sD)),e=g;b.addTuple(e);f&&this.center.add(e);this.points[this.nAtoms]=e}this.iter=b.allocateCubeIterator();f&&this.center.scale(1/this.nAtoms);for(c=this.nAtoms;0<=--c;)a=this.center.distanceSquared(this.points[c]),this.isAtoms&&a<this.distanceTolerance2&&(this.centerAtomIndex=c),this.radius=Math.max(this.radius,a);this.radius=Math.sqrt(this.radius);90<this.radius&&(this.distanceTolerance=0.3);if(90<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(b,"checkOperation",function(a,c,f){var e=new JU.P3,b=0;f=20>f;var g=this.points.length,d=g;a:for(;0<=--d&&b<g;)if(d!=this.centerAtomIndex){var k=this.points[d],l=this.elements[d];null!=a?(e.sub2(k,c),a.transform2(e,e).add(c)):e.setT(k);f&&(this.vTemp.sub2(c,e),e.scaleAdd2(2,this.vTemp,e));if((null!=
a||f)&&e.distanceSquared(k)<this.distanceTolerance2)b++;else{for(this.iter.initialize(e,this.distanceTolerance,!1);this.iter.hasMoreElements();){var j=this.iter.nextElement();if(j!==k){var q=this.getPointIndex(j.i);if(!(0<=this.centerAtomIndex&&q==this.centerAtomIndex||q>=this.elements.length||this.elements[q]!=l)&&e.distanceSquared(j)<this.distanceTolerance2){b++;continue a}}}return!1}}return!0},"JU.Quat,JU.T3,~N");d(b,"findInversionCenter",function(){if(this.haveInversionCenter=this.checkOperation(null,
this.center,-1))this.axes[1]=C(-1,[this.newInversionCenter(++this.nOps)]),this.nAxes[1]=1});d(b,"setPrincipalAxis",function(a,c){this.principalPlane=this.setPrincipalPlane(a,c);if(0==c&&20>a||1==this.nAxes[a])return this.axes[a][0];if(null==this.principalPlane)return null;for(var f=this.axes[22],e=0;e<this.nAxes[22];e++)if(this.isParallel(this.principalPlane.normalOrAxis,f[e].normalOrAxis)){if(0!=e){var b=f[0];f[0]=f[e];f[e]=b}return f[0]}return null},"~N,~N");d(b,"setPrincipalPlane",function(a,c){var f=
this.axes[0];if(1==c)return this.principalPlane=f[0];if(0==c||c==a-20)return null;for(var e=0;e<c;e++)for(var b=0,g=0;b<c;b++)if(this.isPerpendicular(f[e].normalOrAxis,f[b].normalOrAxis)&&2<++g)return 0!=e&&(b=f[0],f[0]=f[e],f[e]=b),this.principalPlane=f[0];return null},"~N,~N");d(b,"getPointIndex",function(a){return(0>a?-a:this.atomMap[a])-1},"~N");d(b,"getElementCounts",function(){for(var a=this.points.length;0<=--a;){var c=this.elements[a];c>this.maxElement&&(this.maxElement=c)}this.eCounts=O(++this.maxElement,
0);for(a=this.points.length;0<=--a;)this.eCounts[this.elements[a]]++});d(b,"findCAxes",function(){for(var a=new JU.V3,c=new JU.V3,f=new JU.V3,e=this.points.length;0<=--e;)if(e!=this.centerAtomIndex)for(var b=this.points[e],g=this.elements[e],d=this.points.length;--d>e;){var k=this.points[d];if(this.elements[d]==g)if(a.sub2(b,this.center),c.sub2(k,this.center),a.normalize(),c.normalize(),this.isParallel(a,c))this.getAllAxes(a);else{this.nAxes[22]<JS.PointGroup.axesMaxN[22]&&(f.ave(b,k),f.sub(this.center),
this.getAllAxes(f));var k=6.283185307179586/a.angle(c),l=E(Math.floor(k+0.01)),j=l+20;0.02>=k-l&&!(j>=JS.PointGroup.maxAxis)&&this.nAxes[j]<JS.PointGroup.axesMaxN[j]&&(f.cross(a,c),this.checkForAxis(j,f))}}b=Array(2*this.nAxes[22]);for(e=0;e<b.length;e++)b[e]=new JU.V3;for(e=d=0;e<this.nAxes[22];e++)b[d++].setT(this.axes[22][e].normalOrAxis),b[d].setT(this.axes[22][e].normalOrAxis),b[d++].scale(-1);for(e=b.length;2<=--e;)for(d=e;1<=--d;)for(g=d;0<=--g;)f.add2(b[e],b[d]),f.add(b[g]),1>f.length()||
this.checkForAxis(23,f);d=2147483647;b=-1;for(e=0;e<this.maxElement;e++)this.eCounts[e]<d&&2<this.eCounts[e]&&(d=this.eCounts[e],b=e);e=0;a:for(;e<this.points.length-2;e++)if(this.elements[e]==b)for(d=e+1;d<this.points.length-1;d++)if(this.elements[d]==b)for(g=d+1;g<this.points.length;g++)if(this.elements[g]==b&&(a.sub2(this.points[e],this.points[d]),c.sub2(this.points[e],this.points[g]),a.normalize(),c.normalize(),f.cross(a,c),this.getAllAxes(f),a.add2(this.points[e],this.points[d]),a.add(this.points[g]),
a.normalize(),this.isParallel(a,f)||this.getAllAxes(a),this.nAxes[25]==JS.PointGroup.axesMaxN[25]))break a;b=Array(this.maxElement);for(e=this.points.length;0<=--e;){g=this.elements[e];if(null==b[g])b[g]=new JU.V3;else if(this.haveInversionCenter)continue;b[g].add(this.points[e])}if(!this.haveInversionCenter)for(e=0;e<this.maxElement;e++)null!=b[e]&&b[e].scale(1/this.eCounts[e]);for(e=0;e<this.maxElement;e++)if(null!=b[e])for(d=0;d<this.maxElement;d++)e==d||null==b[d]||(this.haveInversionCenter?a.cross(b[e],
b[d]):a.sub2(b[e],b[d]),this.checkForAxis(22,a));return this.getHighestOrder()});d(b,"getAllAxes",function(a){for(var c=22;c<JS.PointGroup.maxAxis;c++)this.nAxes[c]<JS.PointGroup.axesMaxN[c]&&this.checkForAxis(c,a)},"JU.V3");d(b,"getHighestOrder",function(){for(var a=0,a=20;1<--a&&0==this.nAxes[a];);if(1<a)return a+20<JS.PointGroup.maxAxis&&0<this.nAxes[a+20]?a+20:a;for(a=JS.PointGroup.maxAxis;1<--a&&0==this.nAxes[a];);return a});d(b,"checkForAxis",function(a,c){if(!this.isCompatible(a))return!1;
c.normalize();if(this.haveAxis(a,c))return!1;var f=JS.PointGroup.getQuaternion(c,a);if(!this.checkOperation(f,this.center,a))return!1;this.addAxis(a,c);this.checkForAssociatedAxes(a,c);return!0},"~N,JU.V3");d(b,"checkForAssociatedAxes",function(a,c){switch(a){case 22:this.checkForAxis(4,c);break;case 23:this.checkForAxis(3,c);this.haveInversionCenter&&this.addAxis(6,c);break;case 24:this.addAxis(22,c);this.checkForAxis(4,c);this.checkForAxis(8,c);break;case 25:this.checkForAxis(5,c);this.haveInversionCenter&&
this.addAxis(10,c);break;case 26:this.addAxis(22,c);this.addAxis(23,c);this.checkForAxis(3,c);this.checkForAxis(6,c);this.checkForAxis(12,c);break;case 27:this.checkForAxis(6,c);this.haveInversionCenter&&this.addAxis(14,c);break;case 28:this.addAxis(22,c),this.addAxis(24,c),this.checkForAxis(4,c),this.checkForAxis(8,c),this.checkForAxis(16,c)}},"~N,JU.V3");d(b,"isCompatible",function(a){switch(a){case 28:if(0<this.nAxes[7]||0<this.nAxes[23])return!1;case 26:case 24:if(0<this.nAxes[27]||0<this.nAxes[25])return!1;
break;case 23:if(0<this.nAxes[27]||0<this.nAxes[28])return!1;break;case 25:if(0<this.nAxes[24]||0<this.nAxes[26]||0<this.nAxes[27]||0<this.nAxes[28])return!1;break;case 27:if(0<this.nAxes[23]||0<this.nAxes[24]||0<this.nAxes[25]||0<this.nAxes[26]||0<this.nAxes[28])return!1}return!0},"~N");d(b,"haveAxis",function(a,c){if(this.nAxes[a]==JS.PointGroup.axesMaxN[a])return!0;if(0<this.nAxes[a])for(var f=this.nAxes[a];0<=--f;)if(this.isParallel(c,this.axes[a][f].normalOrAxis))return!0;return!1},"~N,JU.V3");
d(b,"addAxis",function(a,c){this.haveAxis(a,c)||(null==this.axes[a]&&(this.axes[a]=Array(JS.PointGroup.axesMaxN[a])),this.axes[a][this.nAxes[a]++]=this.newAxis(++this.nOps,c,a))},"~N,JU.V3");d(b,"findPlanes",function(){for(var a=new JU.P3,c=new JU.V3,f=new JU.V3,e=new JU.V3,b=0,g=1<this.getHighestOrder(),d=this.points.length;0<=--d;)if(d!=this.centerAtomIndex)for(var k=this.points[d],l=this.elements[d],j=this.points.length;--j>d;)if(!(g&&this.elements[j]!=l)&&(b=this.points[j],a.add2(k,b),a.scale(0.5),
c.sub2(k,this.center),f.sub2(b,this.center),c.normalize(),f.normalize(),this.isParallel(c,f)||(e.cross(c,f),e.normalize(),this.addPlane(e)),e.sub2(b,k),e.normalize(),b=this.addPlane(e),b==JS.PointGroup.axesMaxN[0]))return b;if(g)for(d=22;d<JS.PointGroup.maxAxis;d++)for(j=0;j<this.nAxes[d];j++)b=this.addPlane(this.axes[d][j].normalOrAxis);return b});d(b,"findAdditionalAxes",function(a){var c=this.axes[0],f=0;if(1<a&&(f=a+20)<JS.PointGroup.maxAxis&&0==this.nAxes[f])this.vTemp.cross(c[0].normalOrAxis,
c[1].normalOrAxis),!this.checkForAxis(f,this.vTemp)&&2<a&&(this.vTemp.cross(c[1].normalOrAxis,c[2].normalOrAxis),this.checkForAxis(f-1,this.vTemp));if(0==this.nAxes[22]&&2<a)for(f=0;f<a-1;f++)for(var e=f+1;e<a;e++)this.vTemp.add2(c[1].normalOrAxis,c[2].normalOrAxis),this.checkForAxis(22,this.vTemp)},"~N");d(b,"addPlane",function(a){!this.haveAxis(0,a)&&this.checkOperation(JU.Quat.newVA(a,180),this.center,-1)&&(this.axes[0][this.nAxes[0]++]=this.newPlane(++this.nOps,a));return this.nAxes[0]},"JU.V3");
d(b,"getName",function(){return this.getNameByConvention(this.name)});d(b,"updateDraw",function(){return null});d(b,"getInfo",function(a,c,f,e,b,g,d,k){if(null==e&&null==g&&!b&&null!=this.textInfo)return this.textInfo;null!=e&&(this.modelIndex=a,this.drawID=e,this.type=g,this.index=d,this.scaleFactor=k);this.operations=new JU.Lst;var l=null!=g&&0<=g.indexOf("u");if(null==c&&null==f&&null==e&&null!=this.drawInfo&&this.drawIndex==d&&this.scale==this.scale&&this.drawType.equals(null==g?"":g))return this.drawInfo;
if(b&&null!=this.info)return this.info;var j=null!=e,q=this.info=null,p=new JU.V3,t;0==k&&(k=1);this.scale=k;for(var s=O(4,2,0),r=1;r<JS.PointGroup.maxAxis;r++)for(var n=this.nAxes[r];0<=--n;)s[this.axes[r][n].type][0]++;var m=(new JU.SB).append("# ").appendI(this.nAtoms).append(" atoms\n"),u=this.getNameByConvention(this.name),w=!1,r=this.haveInversionCenter?ja(JS.PointGroup.Operation,this,null,null):null;null!=r&&this.operations.addLast(r);if(j){this.drawType=g=(q=null!=g&&0<g.length)?g:"";this.drawIndex=
d;var y=g.equalsIgnoreCase(this.getNameByConvention("Cn")),j=g.equalsIgnoreCase(this.getNameByConvention("Sn"));b="set perspectivedepth off;draw "+e+" delete;\n";var B="_"+a+"_";(l||!q)&&m.append(this.getDrawID("pg0"+B+"* delete;")+this.getDrawID("pgva"+B+"* delete;")+this.getDrawID("pgvp"+B+"* delete;"));if(!q||g.equalsIgnoreCase("Ci")||g.equalsIgnoreCase("-u,-v,-w")){var x=m.length();m.append(this.getDrawID("pg0"+B+(this.haveInversionCenter?"inv":"")));null!=r&&(r.drawID=m.substring(x),w=l);m.append(" ").append(JU.Escape.eP(this.center)).append(this.haveInversionCenter?
'"i";\n':";\n");null!=r&&(r.drawStr=m.substring(x),System.out.println(r))}for(var D=0.1,A=this.isSpinGroup?1.9:0.05,r=2;r<JS.PointGroup.maxAxis&&!w;r++)if(20==r&&(D=0.1),0!=this.nAxes[r]){a=this.$isLinear?"C\u221e":this.getOpName(this.axes[r][0],!1);e=this.$isLinear?"\u221e":this.getOpName(this.axes[r][0],!0);var D=D+0.25,P=1.05*k*this.radius+80*D/this.sppa,C=20<=r;this.highestOrder=this.getHighestOrder();if(l||!q||g.equalsIgnoreCase(e)||y&&C||j&&!C)for(n=0;n<this.nAxes[r];n++)if(!(0<d&&n+1!=d)&&
(t=this.axes[r][n],!l||t.isUVW(g))){w=l;this.operations.addLast(t.operation=ja(JS.PointGroup.Operation,this,null,t));var x=m.length(),Q=this.getDrawID("pgva"+B+a.$replace("\u221e","infinity")+(n+1)+"\u0001");t.operation.drawID=m.substring(x).$replace("\u0001"," ");this.drawAxis(m,t,Q,e,A,P,C,"a",p);this.drawAxis(m,t,Q,e,A,P,C,"b",p);t.operation.drawStr=m.substring(x);JU.Logger.debugging&&JU.Logger.debug(t.operation.toString())}}if(l||!q||g.equalsIgnoreCase(this.getNameByConvention("Cs"))){for(n=0;n<
this.nAxes[0]&&!w;n++)if(!(0<d&&n+1!=d)&&(t=this.axes[0][n],!l||t.isUVW(g)))w=l,this.operations.addLast(t.operation=ja(JS.PointGroup.Operation,this,null,t)),Q=t.operation.drawID=this.getDrawID("pgvp"+B+(n+1)+"\u0001"),x=m.length(),this.drawPlane(m,t,Q,k,p),t.operation.drawStr=m.substring(x),JU.Logger.debugging&&JU.Logger.debug(t.operation.toString());l&&(null!=c&&null!=f)&&(g=this.getDrawID("pg0"+B+"_line"),m.append(g).append(" width "+A/2+" "+c+f+" color yellow;"))}m.append("# name=").append(u);
m.append(", n"+this.getNameByConvention("Ci")+"=").appendI(this.haveInversionCenter?1:0);m.append(", n"+this.getNameByConvention("Cs")+"=").appendI(this.nAxes[0]);m.append(", n"+this.getNameByConvention("Cn")+"=").appendI(s[1][0]);m.append(", n"+this.getNameByConvention("Sn")+"=").appendI(s[2][0]);m.append(": ");for(r=JS.PointGroup.maxAxis;2<=--r;)0<this.nAxes[r]&&(s=this.getNameByConvention((20>r?"S":"C")+r%20),m.append(" n").append(s),m.append("=").appendI(this.nAxes[r]));m.append(";\n");m.append("print '"+
u+"';\n");this.drawInfo=b+m.toString();JU.Logger.debugging&&JU.Logger.info(this.drawInfo);return this.drawInfo}n=0;c=1;f=0;r=this.haveInversionCenter?this.getNameByConvention("Ci"):"center";this.haveInversionCenter&&(c++,f++);b?(this.info=new java.util.Hashtable,q=new JU.Lst,null!=this.center&&(this.info.put(r,this.center),this.haveInversionCenter&&this.info.put("center",this.center),this.info.put(r,this.center)),this.info.put("elements",q),this.haveInversionCenter&&(this.info.put("Ci_m",JU.M3.newM3(JS.PointGroup.mInv)),
d=new java.util.Hashtable,this.axes[1][0].setInfo(null,null,d),d.put("location",this.center),d.put("type",this.getNameByConvention("Ci")),q.addLast(d))):m.append("\n\n").append(u).append("\t").append(r).append("\t").append(JU.Escape.eP(this.center));for(r=JS.PointGroup.maxAxis;0<=--r;)if(!(1==r||0==this.nAxes[r])){n=JS.PointGroup.nUnique[r];k=this.axes[r];a=this.getOpName(k[0],!1);e=this.getOpName(k[0],!0);l=this.nAxes[r];b?this.info.put("n"+a,Integer.$valueOf(this.nAxes[r])):m.append("\n\n").append(u).append("\tn").append(e).append("\t").appendI(l).append("\t").appendI(n);
n*=l;c+=n;f+=l;s[k[0].type][1]+=n;p=b?new JU.Lst:null;w=b?new JU.Lst:null;for(n=0;n<l;n++)if(B=k[n],null==g||B.isUVW(g))!j&&null==B.operation&&this.operations.addLast(B.operation=ja(JS.PointGroup.Operation,this,null,B)),b?(d=new java.util.Hashtable,B.setInfo(p,w,d),d.put("type",e),q.addLast(d)):m.append("\n").append(u).append("\t").append(a).append("_").appendI(n+1).append("\t").appendO(B.normalOrAxis);b&&(this.info.put(a,p),this.info.put(a+"_m",w))}if(b&&null!=this.highOperations)for(u=this.highOperations.iterator();u.hasNext()&&
((y=u.next())||1);)d=new java.util.Hashtable,y.setInfo(null,null,d),d.put("type",this.getNameByConvention(y.schName)),q.addLast(d);if(!b)return this.textInfo=this.getTextInfo(m,s,c);this.info.put("name",this.name);this.info.put("hmName",this.getHermannMauguinName());this.info.put("nAtoms",Integer.$valueOf(this.nAtoms));this.info.put("nTotal",Integer.$valueOf(c));this.info.put("nElements",Integer.$valueOf(f));this.info.put("nCi",Integer.$valueOf(this.nAxes[1]));this.info.put("nC2",Integer.$valueOf(this.nAxes[22]));
this.info.put("nC3",Integer.$valueOf(this.nAxes[23]));this.info.put("nCs",Integer.$valueOf(this.nAxes[0]));this.info.put("nCn",Integer.$valueOf(s[1][0]));this.info.put("nSn",Integer.$valueOf(s[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",m.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,JU.T3,JU.T3,~S,~B,~S,~N,~N");d(b,"getDrawID",function(a){var c=a.indexOf(" ");0>c&&(c=a.length);a=a.substring(0,c)+'"'+a.substring(c);return"draw"+(0<=a.indexOf("*")?"":" model "+this.modelIndex)+' ID "'+a},"~S");d(b,"drawPlane",function(a,c,f,e,b){a.append(f.$replace("\u0001","disk"));a.append(" scale ").appendD(2*e*this.radius).append(" CIRCLE PLANE ").append(JU.Escape.eP(this.center));
b.add2(c.normalOrAxis,this.center);a.append(JU.Escape.eP(b)).append(" color translucent yellow;\n");b.add2(c.normalOrAxis,this.center);a.append(f.$replace("\u0001","ring"));a.append(" width 0.05 scale ").appendD(2*e*this.radius).append(" arc ").append(JU.Escape.eP(b));b.scaleAdd2(-2,c.normalOrAxis,b);a.append(JU.Escape.eP(b));b.add3(0.011,0.012,0.013);a.append(JU.Escape.eP(b)).append("{0 360 0.5} color ").append(null!=this.principalPlane&&c.index==this.principalPlane.index?"red":"blue").append(";\n")},
"JU.SB,JS.PointGroup.Operator,~S,~N,JU.V3");d(b,"drawAxis",function(a,c,f,e,b,d,h,k,l){var j=!this.$isLinear&&null!=this.principalAxis&&c.index==this.principalAxis.index,q=a.length();a.append(" color ").append(j?"red":2==c.type?"blue":"orange").append(";\n");j=a.substring(q);a.setLength(q);a.append(f.$replace("\u0001",k));l.scaleAdd2(("a"==k?1:-1)*d,c.normalOrAxis,this.center);a.append(" width "+b).append(" ").append(JU.Escape.eP(this.center)).append(JU.Escape.eP(l));if(h&&2!=c.order&&"a"==k||2==
c.order||!h&&"b"==k)e=JU.PT.esc(">"+this.getAxisLabelOffset(c,this.highestOrder)+e),a.append(e);a.append(j)},"JU.SB,JS.PointGroup.Operator,~S,~S,~N,~N,~B,~S,JU.V3");d(b,"getAxisLabelOffset",function(a,c){switch(a.type){case 2:case 1:switch(a.order){case 3:return 0==c%6?"   ":"";case 4:return 0==c%12?"       ":"   ";case 6:return 0==c%12?"           ":"";case 8:return"       ";case 12:return"               ";default:return""}default:case 0:case 3:return""}},"JS.PointGroup.Operator,~N");d(b,"getTextInfo",
function(a,c,f){a.append("\n");a.append("\n").append(this.name).append("\ttype\tnElements\tnUnique");a.append("\n").append(this.name).append("\t"+this.getNameByConvention("E")+"\t  1\t  1");a.append("\n").append(this.name).append("\t"+this.getNameByConvention("Ci")+"\t  ").appendI(this.nAxes[1]).append("\t  ").appendI(this.nAxes[1]);a.append("\n").append(this.name).append("\t"+this.getNameByConvention("Cs")+"\t");JU.PT.rightJustify(a,"    ",this.nAxes[0]+"\t");JU.PT.rightJustify(a,"    ",this.nAxes[0]+
"\n");a.append(this.name).append("\t"+this.getNameByConvention("Cn")+"\t");JU.PT.rightJustify(a,"    ",c[1][0]+"\t");JU.PT.rightJustify(a,"    ",c[1][1]+"\n");a.append(this.name).append("\t"+this.getNameByConvention("Sn")+"\t");JU.PT.rightJustify(a,"    ",c[2][0]+"\t");JU.PT.rightJustify(a,"    ",c[2][1]+"\n");a.append(this.name).append("\t\tTOTAL\t");JU.PT.rightJustify(a,"    ",f+"\n");return a.toString()},"JU.SB,~A,~N");b.getQuaternion=d(b,"getQuaternion",function(a,c){return JU.Quat.newVA(a,(20>
c?180:0)+(0==c?0:E(360/(c%20))))},"JU.V3,~N");d(b,"isLinear",function(a){var c=null;if(2>a.length)return!1;for(var f=a.length;0<=--f;)if(f!=this.centerAtomIndex)if(null==c)c=new JU.V3,c.sub2(a[f],this.center),c.normalize(),this.vTemp.setT(c);else if(this.vTemp.sub2(a[f],this.center),this.vTemp.normalize(),!this.isParallel(c,this.vTemp))return!1;return!0},"~A");d(b,"isParallel",function(a,c){return Math.abs(a.dot(c))>=this.cosTolerance},"JU.V3,JU.V3");d(b,"isPerpendicular",function(a,c){return Math.abs(a.dot(c))<=
1-this.cosTolerance},"JU.V3,JU.V3");d(b,"isEqual",function(a){if(null==a||(this.convention!=a.convention||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 c=0;c<this.nAtoms;c++)if(this.elements[c]!=a.elements[c]||!this.points[c].equals(a.points[c]))return!1;return!0},"JS.PointGroup");
d(b,"getHermannMauguinName",function(){return JS.PointGroup.getHMfromSFName(this.name)});d(b,"getNameByConvention",function(a){switch(this.convention){default:case 0:return a;case 1:return JS.PointGroup.getHMfromSFName(a)}},"~S");d(b,"getOpName",function(a,c){return c?this.getNameByConvention(a.schName):a.schName},"JS.PointGroup.Operator,~B");b.getHMfromSFName=d(b,"getHMfromSFName",function(a){if(null==JS.PointGroup.htSFToHM){JS.PointGroup.htSFToHM=new java.util.Hashtable;var c=JS.PointGroup.SF2HM;
JS.PointGroup.addNames("E","1");JS.PointGroup.addNames("Ci","-1");JS.PointGroup.addNames("Cn","n");JS.PointGroup.addNames("Sn","-n");for(var f=0;f<c.length;f++){var e=c[f].$plit(","),b=e[0];if(2==e.length)JS.PointGroup.addNames(b,e[1]);else{for(var d=b.substring(0,1),b=b.substring(2,b.length),h=1;13>h;h++){var k=e[h];0<k.length&&(JS.PointGroup.addNames(d+h+b,k),JU.Logger.debugging&&JU.Logger.debug(d+h+b+"\t"+k))}14==e.length&&JS.PointGroup.addNames(d+"\u221e"+b,e[13])}}}c=JS.PointGroup.htSFToHM.get(a);
return null==c?a:c},"~S");b.addNames=d(b,"addNames",function(a,c){JS.PointGroup.htSFToHM.put(a,c);JS.PointGroup.htSFToHM.put(c,a)},"~S,~S");b.$PointGroup$Operation$=function(){var a=I(function(){Fa(this,arguments);this.drawStr=this.drawID=this.operator=null;this.isTrivial=!1;this.typeName=null;this.type=0;S(this,arguments)},JS.PointGroup,"Operation",null);$(a,function(c){this.operator=c;this.type=null==c?3:c.type;this.typeName=null==c?"Ci":c.schName;this.isTrivial=this.checkTrivial()},"JS.PointGroup.Operator");
d(a,"checkTrivial",function(){for(var c=this.b$["JS.PointGroup"].distanceTolerance,a=this.b$["JS.PointGroup"].points.length;0<=--a;){var e;switch(this.type){case 0:case 2:case 1:e=this.operator.distance(this.b$["JS.PointGroup"].points[a]);break;default:case 3:e=this.b$["JS.PointGroup"].points[a].length()}if(e>c)return!1}System.out.println(this+" is trivial");return!0});m(a,"toString",function(){return"[op "+this.typeName+" "+this.drawID+" "+this.isTrivial+"]"})};b.$PointGroup$Operator$=function(){var a=
I(function(){Fa(this,arguments);this.index=this.type=0;this.mat=this.normalOrAxis=null;this.axisArrayIndex=this.order=0;this.uniqueUVWs=this.operation=this.mats=this.uniqueMats=this.uvws=this.schName=null;S(this,arguments)},JS.PointGroup,"Operator",null);$(a,function(c,a,e){this.index=c;null==a?(this.type=3,this.axisArrayIndex=1,this.order=2,this.schName="Ci",this.mat=JS.PointGroup.mInv):(this.normalOrAxis=JU.Quat.newVA(a,180).getNormal(),-1==e?(this.axisArrayIndex=this.type=0,this.order=2,this.schName=
"Cs"):(this.type=20>e?2:1,this.axisArrayIndex=e,this.order=e%20,this.schName=(2==this.type?"S":"C")+this.order));JU.Logger.debugging&&JU.Logger.debug("new operation -- "+c+" "+this.schName+(null==this.normalOrAxis?"":" "+this.normalOrAxis))},"~N,JU.V3,~N");d(a,"getM3",function(){if(null!=this.mat)return this.mat;var c=JU.M3.newM3(JS.PointGroup.getQuaternion(this.normalOrAxis,this.axisArrayIndex).getMatrix());(0==this.type||2==this.type)&&c.mul(JS.PointGroup.mInv);this.cleanMatrix(c);return this.mat=
c});d(a,"distance",function(c){var a=JU.P3.newP(c);this.getM3().rotate(a);return a.distance(c)},"JU.T3");d(a,"cleanMatrix",function(c){for(var a=0;3>a;a++)for(var e=0;3>e;e++)c.setElement(a,e,this.approx0(c.getElement(a,e)))},"JU.M3");d(a,"approx0",function(c){return 1E-15<c||-1E-15>c?c:0},"~N");d(a,"getMatrices",function(c){if(c&&null!=this.uniqueMats)return this.uniqueMats;if(!c&&null!=this.mats)return this.mats;var a=new JU.Lst,e=new JU.M3;e.m00=e.m11=e.m22=1;for(var b=c?JS.PointGroup.getUniqueFractions(this.order):
null,d=1;d<this.order;d++)e.mul(this.getM3()),(!c||b.get(d))&&a.addLast(JU.M3.newM3(e));c?this.uniqueMats=a:this.mats=a;return a},"~B");m(a,"toString",function(){return this.schName+" "+this.normalOrAxis});d(a,"setInfo",function(c,a,e){null!=c&&(c.addLast(this.normalOrAxis),a.addLast(this.getM3()));e.put("order",Integer.$valueOf(this.order));e.put("typeSch",this.schName);e.put("typeHM",JS.PointGroup.getHMfromSFName(this.schName));null!=this.normalOrAxis&&e.put("direction",this.normalOrAxis);c=this.getMatrices(!0);
e.put("uniqueOperations",c);e.put("uniqueOperationUVWs",this.getUVWs(c,!0));c.size()!=this.order-1&&e.put("matrixIndices",JS.PointGroup.bsUnique.get(Integer.$valueOf(this.order)));c=this.getMatrices(!1);e.put("operations",c);e.put("operationUVWs",this.getUVWs(c,!1))},"JU.Lst,JU.Lst,java.util.Map");d(a,"getUVWs",function(c,a){var e=a?this.uniqueUVWs:this.uvws;if(null!=e)return e;for(var e=new JU.Lst,b=0;b<c.size();b++)e.addLast(JS.SymmetryOperation.staticConvertOperation(null,c.get(b),"uvw"));a&&(this.uniqueUVWs=
e);return e},"JU.Lst,~B");d(a,"isUVW",function(c){for(var a=this.getUVWs(this.getMatrices(!0),!0),e=0,b=a.size();e<b;e++)if(a.get(e).equals(c))return!0;return!1},"~S")};b.bsUnique=new java.util.Hashtable;b.typeNames=C(-1,["plane","proper axis","improper axis","center of inversion"]);b.mInv=JU.M3.newA9(F(-1,[-1,0,0,0,-1,0,0,0,-1]));b.axesMaxN=O(-1,[49,0,0,1,3,1,10,1,1,0,6,0,1,0,1,0,1,0,0,0,0,0,49,10,6,6,10,1,1]);b.nUnique=O(-1,[1,0,0,2,2,4,2,1,1,0,6,0,1,0,1,0,1,0,0,0,0,0,1,2,2,4,2,6,4]);b.maxAxis=
JS.PointGroup.axesMaxN.length;b.SF2HM="Cn,1,2,3,4,5,6,7,8,9,10,11,12|Cnv,m,2m,3m,4mm,5m,6mm,7m,8mm,9m,10mm,11m,12mm,\u221em|Sn,,-1,-6,-4,(-10),-3,(-14),-8,(-18),-5,(-22),(-12)|Cnh,m,2/m,-6,4/m,-10,6/m,-14,8/m,-18,10/m,-22,12/m|Dn,,222,32,422,52,622,72,822,92,(10)22,(11)2,(12)22|Dnd,,-42m,-3m,-82m,-5m,(-12)2m,-7m,(-16)2m,-9m,(-20)2m,(-11)m,(-24)2m|Dnh,,mmm,-6m2,4/mmm,(-10)m2,6/mmm,(-14)m2,8/mmm,(-18)m2,10/mmm,(-22)m2,12/mmm,\u221e/mm|Ci,-1|Cs,m|T,23|Th,m-3|Td,-43m|O,432|Oh,m-3m".$plit("\\|");b.htSFToHM=
null});aa("JS");N(["JS.HallInfo","java.util.Hashtable"],"JS.SpaceGroup","java.util.Arrays JU.AU $.Lst $.M3 $.M4 $.P3 $.PT $.SB JS.Symmetry $.SymmetryOperation $.UnitCell JU.Logger $.SimpleUnitCell".split(" "),function(){var b=I(function(){this.specialPrefix="";this.ssgNumber=this.spinConfiguration=this.spinList=this.displayName=this.strName=this.spinFrameTransform=null;this.groupType=0;this.xyzList=this.allOperations=this.finalOperations=this.symmetryOperations=null;this.axisChoice=this.uniqueAxis=
"\x00";this.jmolId=this.itaNumber=null;this.operationCount=0;this.latticeOp=-1;this.isBio=!1;this.latticeType="P";this.itaTransform=null;this.setNo=this.itaNo=0;this.sfIndex=-1;this.itaIndex=null;this.nDim=3;this.periodicity=7;this.canonicalCLEG=this.clegId=null;this.index=0;this.referenceIndex=-1;this.isSSG=!1;this.name="unknown!";this.hallInfo=this.jmolIdExt=this.hmSymbol=this.crystalClass=this.hallSymbolAlt=this.hallSymbol=null;this.modDim=this.latticeParameter=0;this.doNormalize=!0;this.hmSymbolAbbrShort=
this.hmSymbolAlternative=this.hmSymbolAbbr=this.hmSymbolExt=this.hmSymbolFull=this.nHallOperators=this.info=null;this.ambiguityType="\x00";this.isSpinSpaceGroup=!1;S(this,arguments)},JS,"SpaceGroup",null,[Cloneable,JS.HallInfo.HallReceiver]);$(b,function(c,a,e){++JS.SpaceGroup.sgIndex;0>c&&(c=JS.SpaceGroup.sgIndex);this.index=c;this.init(e&&null==a);e&&null!=a&&this.buildSelf(a)},"~N,~S,~B");d(b,"getSpecialPrefix",function(){return this.specialPrefix});d(b,"setFrom",function(c,a){a?(this.setName(c.isSpinSpaceGroup?
c.name:c.itaNumber.equals("0")?this.clegId:"HM:"+c.hmSymbolFull+" #"+c.clegId),this.referenceIndex=-2):(this.setName(c.getName()),this.referenceIndex=c.index);this.latticeType=c.latticeType;this.specialPrefix=c.specialPrefix;this.periodicity=c.periodicity;this.groupType=c.groupType;this.setClegId(c.getClegId());this.isSpinSpaceGroup=c.isSpinSpaceGroup;this.itaIndex=c.itaIndex;this.itaNumber=c.itaNumber;this.ssgNumber=c.ssgNumber;this.itaTransform=c.itaTransform;this.crystalClass=c.crystalClass;this.hallSymbol=
c.hallSymbol;this.hmSymbol=c.hmSymbol;this.hmSymbolAbbr=c.hmSymbolAbbr;this.hmSymbolAbbrShort=c.hmSymbolAbbrShort;this.hmSymbolAlternative=c.hmSymbolAlternative;this.hmSymbolExt=c.hmSymbolExt;this.hmSymbolFull=c.hmSymbolFull;this.spinFrameTransform=c.spinFrameTransform;this.strName=this.displayName=this.jmolIdExt=this.jmolId=null;return this},"JS.SpaceGroup,~B");b.getNull=d(b,"getNull",function(c,a,e){c=new JS.SpaceGroup(-1,null,c);c.doNormalize=a;e&&c.setFinalOperations();return c},"~B,~B,~B");d(b,
"init",function(c){this.xyzList=new java.util.Hashtable;this.operationCount=0;c&&this.addSymmetry("x,y,z",0,!1)},"~B");b.createSpaceGroup=d(b,"createSpaceGroup",function(c,a,e,b){var d=null;0<=c?d=JS.SpaceGroup.SG[c]:(d=R(e,"JU.Lst")?JS.SpaceGroup.createSGFromList(a,e):JS.SpaceGroup.determineSpaceGroupNA(a,e),null==d&&(d=JS.SpaceGroup.createSpaceGroupN(0>=b?a:"x1,x2,x3,x4,x5,x6,x7,x8,x9".substring(0,3*b+8),!0)));null!=d&&d.generateMatrixOperators(null);return d},"~N,~S,~O,~N");d(b,"getItaIndex",function(){return null!=
this.itaIndex&&!"--".equals(this.itaIndex)?this.itaIndex:!"0".equals(this.itaNumber)?this.itaNumber:!"--".equals(this.hallSymbol)?"["+this.hallSymbol+"]":"?"});d(b,"getIndex",function(){return 0<=this.referenceIndex?this.referenceIndex:this.index});d(b,"setClegId",function(c){null==c&&(c=this.itaNumber+":"+this.itaTransform);this.clegId=c;this.canonicalCLEG=JS.SpaceGroup.canonicalizeCleg(c)},"~S");d(b,"getClegId",function(){return this.clegId});b.createSGFromList=d(b,"createSGFromList",function(c,
a){var e=new JS.SpaceGroup(-1,"0;--;--;0;--;--;--",!0);e.doNormalize=!1;e.setName(c);var b=a.size();if(0==b)return e;for(var d=0;d<b;d++){var h=a.get(d);if(R(h,"JS.SymmetryOperation")){var k=e.addOp(h,h.xyz,!1);e.symmetryOperations[k].setTimeReversal(h.timeReversal)}else e.addSymmetrySM("xyz matrix:"+h,h)}e.setFinalOperationsSafely();b=e.getReferenceSpaceGroup();null!=b&&(e=b);return e},"~S,JU.Lst");d(b,"addSymmetry",function(c,a,e){c=c.toLowerCase();return 0>c.indexOf("[[")&&0>c.indexOf("x4")&&0>
c.indexOf(";")&&0>c.indexOf("u")&&(0>c.indexOf("x")||0>c.indexOf("y")||0>c.indexOf("z"))?-1:this.addOperation(c,a,e)},"~S,~N,~B");d(b,"setFinalOperationsSafely",function(){null==this.finalOperations&&this.setFinalOperations()});d(b,"setFinalOperations",function(){this.setFinalOperationsForAtoms(0==this.nDim?3:this.nDim,null,0,0,!1)});d(b,"setFinalOperationsForAtoms",function(c,a,e,b,d){if(null==this.hallInfo&&0!=this.latticeParameter){var h=new JS.HallInfo(JS.HallInfo.getHallLatticeEquivalent(this.latticeParameter));
this.generateMatrixOperators(h)}else this.checkCreateFromHall();this.finalOperations=null;this.isBio=0<=this.name.indexOf("bio");!this.isBio&&(this.index>=JS.SpaceGroup.SG.length&&this.allowCheckForReference())&&(h=this.getReferenceSpaceGroup(),null!=h&&h!==this&&this.setFrom(h,!1));0==this.operationCount&&this.addOperation("x,y,z",1,!1);this.finalOperations=Array(this.operationCount);var h=d&&0<b&&null!=a,k=null;if(h){k=this.finalOperations[0]=new JS.SymmetryOperation(this.symmetryOperations[0],
0,!0);null==k.sigma&&JS.SymmetryOperation.normalizeOperationToCentroid(c,k,a,e,b);var l=a[e],j=JU.P3.newP(l);k.rotTrans(j);if(1E-4<j.distance(l))for(var q=0;q<b;q++)l=a[e+q],j.setT(l),k.rotTrans(j),l.setT(j);d||(k=null)}for(q=0;q<this.operationCount;q++){if(0<q||null==k)k=this.finalOperations[q]=new JS.SymmetryOperation(this.symmetryOperations[q],0,d);h&&null==k.sigma&&JS.SymmetryOperation.normalizeOperationToCentroid(c,k,a,e,b);k.getCentering()}},"~N,~A,~N,~N,~B");d(b,"allowCheckForReference",function(){return 0==
this.modDim&&0==this.groupType&&null!=this.symmetryOperations&&0<this.symmetryOperations.length&&0==this.symmetryOperations[0].timeReversal&&0>this.name.indexOf("[subsystem")});b.newHallInfo=d(b,"newHallInfo",function(c){c.startsWith("Hall:")&&(c=c.substring(5).trim());return new JS.HallInfo(c)},"~S");d(b,"getOperationCount",function(){this.setFinalOperationsSafely();return this.finalOperations.length});d(b,"getOperation",function(c){return this.finalOperations[c]},"~N");d(b,"getAdditionalOperationsCount",
function(){this.setFinalOperationsSafely();null==this.allOperations&&(this.allOperations=JS.SymmetryOperation.getAdditionalOperations(this.finalOperations,this.periodicity<<4|this.nDim));return this.allOperations.length-this.getOperationCount()});d(b,"getAdditionalOperations",function(){this.getAdditionalOperationsCount();return this.allOperations});d(b,"getAllOperation",function(c){return this.allOperations[c]},"~N");d(b,"getXyz",function(c,a){return null==this.finalOperations?this.symmetryOperations[c].getXyz(a):
this.finalOperations[c].getXyz(a)},"~N,~B");b.findSpaceGroupFromXYZ=d(b,"findSpaceGroupFromXYZ",function(c){var a=new JS.SpaceGroup(-1,"0;--;--;0;--;--;--",!0);a.doNormalize=!1;c=c.$plit(";");for(var e=0,b=c.length;e<b;e++){var d=new JS.SymmetryOperation(null,e,!1);d.setMatrixFromXYZ(c[e],0,!1);a.addOp(d,c[e],!1)}return JS.SpaceGroup.findReferenceSpaceGroup(a.operationCount,a.getCanonicalSeitzList(),null)},"~S");b.getInfo=d(b,"getInfo",function(c,a,e,b,d){try{if(null!=c&&c.index>=JS.SpaceGroup.SG.length&&
c.allowCheckForReference()){var h=JS.SpaceGroup.findReferenceSpaceGroup(c.operationCount,c.getCanonicalSeitzList(),c.clegId);null!=h&&(c=h)}if(null!=e){if(null==c){0<=a.indexOf("[")&&(a=a.substring(0,a.indexOf("[")).trim());if(a.equals("unspecified!"))return"no space group identified in file";c=JS.SpaceGroup.determineSpaceGroupNA(a,e)}}else{if(a.equalsIgnoreCase("ALL"))return JS.SpaceGroup.dumpAll(b);if(a.equalsIgnoreCase("MAP"))return JS.SpaceGroup.dumpAll(!0);if(a.equalsIgnoreCase("ALLSEITZ"))return JS.SpaceGroup.dumpAllSeitz();
c=JS.SpaceGroup.determineSpaceGroupN(a)}if(null==c){var k=JS.SpaceGroup.createSpaceGroupN(a,!0);null!=k&&(k=JS.SpaceGroup.findReferenceSpaceGroup(k.operationCount,k.getCanonicalSeitzList(),k.clegId));null!=k&&(c=k)}if(null!=c){if(b)return c.dumpInfoObj();for(var l=new JU.SB;null!=c&&0==c.groupType&&!(c.index<JS.SpaceGroup.SG.length||d)&&d;)c.index<JS.SpaceGroup.SG.length&&(c=JS.SpaceGroup.SG[c.index]);c.getOperationCount();l.append(c.dumpInfo());return l.toString()}return b?null:"?"}catch(j){if(ba(j,
Exception))return"?";throw j;}},"JS.SpaceGroup,~S,~A,~B,~B");d(b,"dumpInfo",function(){var c=new JU.SB;0!=this.groupType&&c.append("\ngroupType: ").append(JS.SpaceGroup.getSpecialGroupName(this.groupType));c.append("\nHermann-Mauguin symbol: ");null==this.hmSymbol||null==this.hmSymbolExt?c.append("?"):c.append(this.hmSymbol).append(0<this.hmSymbolExt.length?":"+this.hmSymbolExt:"");null!=this.itaNumber&&!"0".equals(this.itaNumber)&&c.append("\ninternational table number: ").append(this.itaNumber);
null!=this.crystalClass&&c.append("\ncrystal class: "+this.crystalClass);null!=this.jmolId&&c.append("\nJmol_ID: ").append(this.jmolId).append(" ("+this.itaIndex+")");null!=this.clegId&&c.append("\nCLEG: "+this.clegId);if(0==this.groupType){c.append("\n\n").append(null==this.hallInfo?"Hall symbol unknown":JU.Logger.debugging?this.hallInfo.dumpInfo():"");c.append("\n\n").appendI(this.operationCount).append(" operators").append(null!=this.hallInfo&&!this.hallInfo.getHallSymbol().equals("--")?" from Hall symbol "+
this.hallInfo.getHallSymbol():"").append(": ");for(var a=0;a<this.operationCount;a++)c.append("\n").append(this.symmetryOperations[a].xyz)}return c.toString()});d(b,"dumpInfoObj",function(){var c=this.dumpCanonicalSeitzList();if(R(c,"JS.SpaceGroup"))return c.dumpInfoObj();c=new java.util.Hashtable;if(null!=this.itaNumber&&!this.itaNumber.equals("0")){var a=null==this.hmSymbol||null==this.hmSymbolExt?"?":this.hmSymbol+(0<this.hmSymbolExt.length?":"+this.hmSymbolExt:"");c.put("index",Integer.$valueOf(this.index));
c.put("hm",a);c.put("HermannMauguinSymbol",a);c.put("ita",Integer.$valueOf(JU.PT.parseInt(this.itaNumber)));null!=this.hallInfo&&null!=this.hallInfo.getHallSymbol()&&c.put("HallSymbol",this.hallInfo.getHallSymbol());null!=this.hallSymbolAlt&&c.put("HallSymbolAlt",this.hallSymbolAlt);c.put("itaIndex",null==this.itaIndex?"n/a":this.itaIndex);c.put("clegId",null==this.itaIndex?"n/a":this.clegId);null!=this.jmolId&&c.put("jmolId",this.jmolId);null!=this.crystalClass&&c.put("crystalClass",this.crystalClass);
c.put("operationCount",Integer.$valueOf(this.operationCount))}else null!=this.hallInfo&&(null!=this.hallInfo.getHallSymbol()&&c.put("HallSymbol",this.hallInfo.getHallSymbol()),null!=this.hallSymbolAlt&&c.put("HallSymbolAlt",this.hallSymbolAlt),c.put("operationCount",Integer.$valueOf(this.operationCount)));for(var a=new JU.Lst,e=0;e<this.operationCount;e++)a.addLast(this.symmetryOperations[e].xyz);c.put("operationsXYZ",a);return c});d(b,"getCIFWriterValue",function(c,a){var e=null;switch(c){case "HermannMauguinSymbol":e=
this.hmSymbol;break;case "ita":e=this.itaNumber;break;case "HallSymbol":e=this.hallSymbol}if(null!=e)return e;null==this.info&&(this.info=JS.SpaceGroup.getInfo(this,this.hmSymbol,a.getUnitCellParams(),!0,!1));if("string"==typeof this.info)return null;e=this.info.get(c);return null==e?null:e.toString()},"~S,J.api.SymmetryInterface");d(b,"getName",function(){return this.name});d(b,"getShelxLATTDesignation",function(){return JS.HallInfo.getLatticeDesignation(this.latticeParameter)});d(b,"setLatticeParam",
function(c){this.latticeParameter=c;10<c&&(this.latticeParameter=-JS.HallInfo.getLatticeIndexFromCode(c))},"~N");d(b,"dumpCanonicalSeitzList",function(){this.checkCreateFromHall();var c=this.getCanonicalSeitzList();if(this.index>=JS.SpaceGroup.SG.length){var a=JS.SpaceGroup.findReferenceSpaceGroup(this.operationCount,c,this.clegId);if(null!=a)return a.getCanonicalSeitzList()}return(0<=this.index&&this.index<JS.SpaceGroup.SG.length?this.hallSymbol+" = ":"")+c});d(b,"checkCreateFromHall",function(){null!=
this.nHallOperators&&null!=this.hallSymbol&&(this.hallInfo=JS.SpaceGroup.newHallInfo(this.hallSymbol),this.generateMatrixOperators(null))});d(b,"getReferenceSpaceGroup",function(){if(-2==this.referenceIndex||0<=this.index&&this.index<JS.SpaceGroup.SG.length||!this.allowCheckForReference())return this;var c=this.getCanonicalSeitzList();return null==c?null:JS.SpaceGroup.findReferenceSpaceGroup(this.operationCount,c,this.clegId)});d(b,"getCanonicalSeitzList",function(){return JS.SpaceGroup.getCanonicalSeitzForOperations(this.symmetryOperations,
this.operationCount)});b.getCanonicalSeitzForOperations=d(b,"getCanonicalSeitzForOperations",function(c,a){for(var e=Array(a),b=0;b<a;b++)e[b]=JS.SymmetryOperation.dumpSeitz(c[b],!0);java.util.Arrays.sort(e,0,a);for(var d=(new JU.SB).append("\n["),b=0;b<a;b++)d.append(e[b].$replace("\t"," ").$replace("\n"," ")).append("; ");d.append("]");return d.toString()},"~A,~N");b.findReferenceSpaceGroup=d(b,"findReferenceSpaceGroup",function(c,a,e){c=JS.SpaceGroup.htByOpCount.get(Integer.$valueOf(c));if(null!=
c)for(var b=0,d=c.size();b<d;b++){var h=c.get(b);if(null!=e&&e.equals(h.clegId)||(null==h.clegId||null==e||e.equals("0:a,b,c"))&&0<=JS.SpaceGroup.getCanonicalSeitz(h.index).indexOf(a))return JS.SpaceGroup.SG[h.index]}return null},"~N,~S,~S");b.dumpAll=d(b,"dumpAll",function(c){if(c){var a=new JU.Lst;for(c=0;c<JS.SpaceGroup.SG.length;c++)a.addLast(JS.SpaceGroup.SG[c].dumpInfoObj());return a}a=new JU.SB;for(c=0;c<JS.SpaceGroup.SG.length;c++)a.append("\n----------------------\n"+JS.SpaceGroup.SG[c].dumpInfo());
return a.toString()},"~B");b.dumpAllSeitz=d(b,"dumpAllSeitz",function(){for(var c=new JU.SB,a=0;a<JS.SpaceGroup.SG.length;a++)c.append("\n").appendO(JS.SpaceGroup.getCanonicalSeitz(a));return c.toString()});b.getCanonicalSeitz=d(b,"getCanonicalSeitz",function(c){null==JS.SpaceGroup.canonicalSeitzList&&(JS.SpaceGroup.canonicalSeitzList=Array(JS.SpaceGroup.SG.length));var a=JS.SpaceGroup.canonicalSeitzList[c];return null==a?JS.SpaceGroup.canonicalSeitzList[c]=JS.SpaceGroup.SG[c].dumpCanonicalSeitzList().toString():
a},"~N");d(b,"setLattice",function(c,a){this.latticeParameter=JS.HallInfo.getLatticeIndex(c);a||(this.latticeParameter=-this.latticeParameter)},"~S,~B");b.createSpaceGroupN=d(b,"createSpaceGroupN",function(c,a){c=c.trim();var e=JS.SpaceGroup.determineSpaceGroupN(c);if(null==e&&a){var b=JS.SpaceGroup.newHallInfo(c);b.isGenerated()?(e=new JS.SpaceGroup(-1,"0;--;--;0;--;--;"+c,!0),e.hallInfo=b,e.hallSymbol=b.getHallSymbol(),e.setName("["+e.hallSymbol+"]"),e.jmolId=null):0<=c.indexOf(",")&&(e=new JS.SpaceGroup(-1,
"0;--;--;0;--;--;--",!0),e.doNormalize=!1,e.generateOperatorsFromXyzInfo(c))}if(null!=e)try{return e.generateMatrixOperators(null),e}catch(d){if(!ba(d,Exception))throw d;}return null},"~S,~B");d(b,"addOperation",function(c,a,e){if(null==c||3>c.length)return this.init(!1),-1;c=JU.PT.rep(c," ","");var b="="==c.charAt(0);b&&(c=c.substring(1));var d=this.checkXYZlist(c);if(0<=d)return d;if(c.startsWith("x1,x2,x3,x4")&&0==this.modDim)this.xyzList.clear(),this.operationCount=0,this.modDim=JU.PT.parseInt(c.substring(c.lastIndexOf("x")+
1))-3;else if(0<=c.indexOf("m")||0<=c.indexOf("u"))if(c=JU.PT.rep(c,"+m","m"),c.equals("x,y,z,m")||c.equals("x,y,z(mx,my,mz)")||c.startsWith("x,y,z(")&&1==this.operationCount&&null==this.symmetryOperations[0].suvw)this.xyzList.clear(),this.operationCount=0;a=new JS.SymmetryOperation(null,a,this.doNormalize);if(!a.setMatrixFromXYZ(c,this.modDim,e))return-1;"!"==c.charAt(0)&&(c=c.substring(c.lastIndexOf("!")+1));return this.addOp(a,c,b)},"~S,~N,~B");d(b,"checkXYZlist",function(c){return this.xyzList.containsKey(c)?
this.xyzList.get(c).intValue():-1},"~S");d(b,"addOp",function(c,a,e){var b=c.xyz;if(!e){e=this.checkXYZlist(b);if(0<=e)return e;0>this.latticeOp&&(e=JU.PT.replaceAllCharacters(0<this.modDim?JS.SymmetryOperation.replaceXn(b,this.modDim+3):b,"+123/",""),this.xyzList.containsKey(e+"!")?this.latticeOp=this.operationCount:this.xyzList.put(e+"!",Integer.$valueOf(this.operationCount)));this.xyzList.put(b,Integer.$valueOf(this.operationCount))}b.equals(a)||this.xyzList.put(a,Integer.$valueOf(this.operationCount));
null==this.symmetryOperations&&(this.symmetryOperations=Array(4));this.operationCount==this.symmetryOperations.length&&(this.symmetryOperations=JU.AU.arrayCopyObject(this.symmetryOperations,2*this.operationCount));this.symmetryOperations[this.operationCount++]=c;c.number=this.operationCount;0!=c.timeReversal&&(this.symmetryOperations[0].timeReversal=1);JU.Logger.debugging&&JU.Logger.debug("\naddOperation "+this.operationCount+c.dumpInfo());return this.operationCount-1},"JS.SymmetryOperation,~S,~B");
d(b,"generateOperatorsFromXyzInfo",function(c){this.init(!0);c=JU.PT.split(c.toLowerCase(),";");for(var a=0;a<c.length;a++)this.addSymmetry(c[a],0,!1)},"~S");d(b,"generateMatrixOperators",function(c){if(null==c){if(0<this.operationCount)return;if(null==this.hallSymbol||this.hallSymbol.endsWith("?")){this.checkHallOperators();return}this.symmetryOperations=Array(4);if(null==this.hallInfo||!this.hallInfo.isGenerated())this.hallInfo=JS.SpaceGroup.newHallInfo(this.hallSymbol);this.setLattice(this.hallInfo.getLatticeCode(),
this.hallInfo.isCentrosymmetric());this.init(!0);c=this.hallInfo}c.generateAllOperators(this);null==this.hmSymbol&&(this.hmSymbol="--");this.hmSymbol.equals("--")&&(this.hallSymbol=c.getHallSymbol(),this.nHallOperators=Integer.$valueOf(this.operationCount));null!=this.nHallOperators&&this.operationCount!=this.nHallOperators.intValue()&&JU.Logger.error("Operator mismatch "+this.operationCount+" for "+this);c=c.getLatticeCode();switch(c.charCodeAt(0)){case 0:case 83:case 84:case 80:this.latticeType=
"P";break;default:this.latticeType=c}},"JS.HallInfo");d(b,"addSymmetrySM",function(c,a){var e=this.addOperation(c,0,!1);0<=e&&this.symmetryOperations[e].setM4(a);return e},"~S,JU.M4");b.determineSpaceGroupN=d(b,"determineSpaceGroupN",function(c){return JS.SpaceGroup.determineSpaceGroup(c,0,0,0,0,0,0,-1)},"~S");b.determineSpaceGroupNS=d(b,"determineSpaceGroupNS",function(c,a){return JS.SpaceGroup.determineSpaceGroup(c,0,0,0,0,0,0,a.index)},"~S,JS.SpaceGroup");b.determineSpaceGroupNA=d(b,"determineSpaceGroupNA",
function(c,a){return null==a?JS.SpaceGroup.determineSpaceGroup(c,0,0,0,0,0,0,-1):JS.SpaceGroup.determineSpaceGroup(c,a[0],a[1],a[2],a[3],a[4],a[5],-1)},"~S,~A");b.determineSpaceGroup=d(b,"determineSpaceGroup",function(c,a,e,b,d,h,k,l){c=JS.SpaceGroup.determineSpaceGroupIndex(c,a,e,b,d,h,k,l);return 0<=c?JS.SpaceGroup.SG[c]:null},"~S,~N,~N,~N,~N,~N,~N,~N");b.isXYZList=d(b,"isXYZList",function(c){return null!=c&&0<=c.indexOf(",")&&0>c.indexOf("(")&&0>c.indexOf(":")},"~S");b.determineSpaceGroupIndex=
d(b,"determineSpaceGroupIndex",function(c,a,e,b,d,h,k,l){if(JS.SpaceGroup.isXYZList(c))return-1;0>l&&(l=JS.SpaceGroup.SG.length);if(0<JS.SpaceGroup.getExplicitSpecialGroupType(c))return-1;c=c.trim().toLowerCase();c.startsWith("bilbao:")&&(c=c.substring(7));var j;j=c.indexOf("hall:");0<j&&(c=c.substring(j));var q=0<=c.indexOf(",")?6:c.startsWith("ita/")?4:c.startsWith("hall:")?5:c.startsWith("hm:")?3:0;switch(q){case 6:c=JS.SpaceGroup.canonicalizeCleg(c);break;case 3:case 5:case 4:c=c.substring(q);
break;case 0:c.contains("[")?(q=5,c=c.substring(0,c.indexOf("[")).trim()):0<c.indexOf(".")&&(q=4)}switch(q){case 6:for(j=0;j<l;j++)if(c.equals(JS.SpaceGroup.SG[j].canonicalCLEG))return j;return-1;case 5:for(j=0;j<l;j++)if(JS.SpaceGroup.SG[j].hallSymbol.equalsIgnoreCase(c))return j;return-1}var p=c,t=!1;4!=q&&(c=c.$replace("_"," "),2<=c.length&&(j=0==c.indexOf("-")?2:1,j<c.length&&" "!=c.charAt(j)&&(c=c.substring(0,j)+" "+c.substring(j)),c=JS.SpaceGroup.toCap(c,2)));var m="";if(0<(j=c.indexOf(":")))m=
c.substring(j+1),c=c.substring(0,j).trim(),t=0<m.length;4!=q&&(5!=q&&!t&&JU.PT.isOneOf(c,JS.SpaceGroup.ambiguousHMNames))&&(m="?",t=!0);var r=JU.PT.replaceAllCharacters(c," ()",""),n;switch(q){case 4:if(t)for(j=0;j<l;j++){if(p.equalsIgnoreCase(JS.SpaceGroup.SG[j].itaIndex))return j}else for(j=0;j<l;j++)if(c.equalsIgnoreCase(JS.SpaceGroup.SG[j].itaIndex))return j;break;case 6:case 5:break;default:case 3:if(3!=q)for(j=0;j<l;j++)if(JS.SpaceGroup.SG[j].jmolId.equalsIgnoreCase(p))return j;for(j=0;j<l;j++)if(JS.SpaceGroup.SG[j].hmSymbolFull.equalsIgnoreCase(p))return j;
for(j=0;j<l;j++)if(null!=(n=JS.SpaceGroup.SG[j]).hmSymbolAlternative&&n.hmSymbolAlternative.equalsIgnoreCase(p))return j;if(t){for(j=0;j<l;j++)if((n=JS.SpaceGroup.SG[j]).hmSymbolAbbr.equalsIgnoreCase(r)&&(n.hmSymbolExt.equalsIgnoreCase(m)||n.jmolIdExt.equalsIgnoreCase(m)))return j;for(j=0;j<l;j++)if((n=JS.SpaceGroup.SG[j]).hmSymbolAbbrShort.equalsIgnoreCase(r)&&(n.hmSymbolExt.equalsIgnoreCase(m)||n.jmolIdExt.equalsIgnoreCase(m)))return j}c=JS.SpaceGroup.determineUniqueAxis(a,e,b,d,h,k);if(!t||"?"==
m.charAt(0))for(j=0;j<l;j++)if((n=JS.SpaceGroup.SG[j]).hmSymbolAbbr.equalsIgnoreCase(r)||n.hmSymbolAbbrShort.equalsIgnoreCase(r)||n.itaNumber.equals(r))switch(n.ambiguityType.charCodeAt(0)){case 0:case 45:return j;case 97:if(n.uniqueAxis==c||"\x00"==c)return j;break;case 111:if(0==m.length){if(n.hmSymbolExt.equals("2"))return j}else if(n.hmSymbolExt.equalsIgnoreCase(m))return j;break;case 116:if(0==m.length){if("h"==n.axisChoice)return j}else if((n.axisChoice+"").equalsIgnoreCase(m))return j}}if(0==
m.length)for(j=0;j<l;j++)if(JS.SpaceGroup.SG[j].itaNumber.equals(p))return j;return-1},"~S,~N,~N,~N,~N,~N,~N,~N");d(b,"setJmolCode",function(c){this.jmolId=c;c=JU.PT.split(c,":");this.itaNumber=c[0];this.jmolIdExt=1==c.length?"":c[1];this.ambiguityType="\x00";0<this.jmolIdExt.length&&(c=this.jmolIdExt.charAt(0),this.jmolIdExt.equals("h")||this.jmolIdExt.equals("r")?(this.ambiguityType="t",this.axisChoice=this.jmolIdExt.charAt(0)):"1"==c||"2"==c?this.ambiguityType="o":2>=this.jmolIdExt.length||3==
this.jmolIdExt.length&&"-"==c?(this.ambiguityType="a",this.uniqueAxis=this.jmolIdExt.charAt("-"==c?1:0)):this.jmolIdExt.contains("-")&&(this.ambiguityType="-"))},"~S");b.determineUniqueAxis=d(b,"determineUniqueAxis",function(c,a,e,b,d,h){return c==a?a==e?"\x00":"c":a==e?"a":e==c?"b":b==d?d==h?"\x00":"c":d==h?"a":h==b?"b":"\x00"},"~N,~N,~N,~N,~N,~N");d(b,"buildSelf",function(c){c=JU.PT.split(c.toLowerCase(),";");this.jmolId=c[0].trim();this.setJmolCode(this.jmolId);var a=this.jmolId.endsWith("*");
a&&(this.jmolId=this.jmolId.substring(0,this.jmolId.length-1));this.itaIndex=c[1].$replace("|",";");var e=this.itaIndex.indexOf(".");0>e?(this.setNo=2147483647,e=this.itaIndex.indexOf(":")):this.setNo=Integer.parseInt(this.itaIndex.substring(e+1));this.itaNo=0>e?0:Integer.parseInt(this.itaIndex.substring(0,e));e=c[2];this.itaTransform=0==e.length||e.equals("--")?"a,b,c":e.equals("r")?"2/3a+1/3b+1/3c,-1/3a+1/3b+1/3c,-1/3a-2/3b+1/3c":JU.PT.rep(e,"ab","a-b,a+b,c").$replace("|",";");this.setClegId(null);
0<c[3].length&&(this.nHallOperators=Integer.$valueOf(c[3]),e=JS.SpaceGroup.htByOpCount.get(this.nHallOperators),null==e&&JS.SpaceGroup.htByOpCount.put(this.nHallOperators,e=new JU.Lst),e.addLast(this));this.crystalClass=JS.SpaceGroup.toCap(JU.PT.split(c[4],"^")[0],1);e=c[5];e.endsWith("*")&&(e=e.substring(0,e.length-1));this.setHMSymbol(e);"xyz".equals(c[6])?(c=this.hmSymbol,this.hallSymbol=""+this.latticeType+"?"):(this.hallSymbol=c[6],1<this.hallSymbol.length&&(this.hallSymbol=JS.SpaceGroup.toCap(this.hallSymbol,
2)),a&&(this.hallSymbolAlt=this.hallSymbol,this.hallSymbol=JS.SpaceGroup.lastHallSymbol),c=this.itaNumber+this.hallSymbol,"0"!=this.itaNumber.charAt(0)&&c.equals(JS.SpaceGroup.lastInfo)&&(JS.SpaceGroup.ambiguousHMNames+=this.hmSymbol+";"));JS.SpaceGroup.lastHallSymbol=this.hallSymbol;JS.SpaceGroup.lastInfo=c;this.name="HM:"+this.hmSymbolFull+" "+(null==this.hallSymbol||"?"===this.hallSymbol?"["+this.hallSymbol+"]":"")+" #"+this.itaIndex},"~S");d(b,"setHMSymbol",function(c){var a=c.indexOf("#");0<=
a&&(c=c.substring(0,a).trim());this.hmSymbolFull=0==this.groupType?JS.SpaceGroup.toCap(c,1):c.toLowerCase();this.latticeType=Character.toUpperCase(this.hmSymbolFull.charAt(0));c=JU.PT.split(this.hmSymbolFull,":");this.hmSymbol=c[0];this.hmSymbolExt=1==c.length?"":c[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=3<this.hmSymbol.length&&"3"!=this.hmSymbol.charAt(2)&&"3"!=this.hmSymbol.charAt(3)?JU.PT.rep(this.hmSymbol," 1",""):this.hmSymbolAbbr;this.hmSymbolAbbrShort=JU.PT.rep(this.hmSymbolAbbrShort," ","");this.strName=null},"~S");b.toCap=d(b,"toCap",function(c,a){return c.substring(0,a).toUpperCase()+c.substring(a)},"~S,~N");d(b,"toString",function(){return this.asString()});d(b,"asString",function(){return null==this.strName?this.strName=null==this.jmolId||this.jmolId.equals("0")?
this.name:this.jmolId+" HM:"+this.hmSymbolFull+(null==this.getClegId()?"":" #"+this.getClegId()):this.strName});d(b,"getDisplayName",function(){if(null==this.displayName){var c=null;null==this.jmolId||"--".equals(this.hallSymbol)?(c="",null!=this.hmSymbolFull&&!"--".equals(this.hmSymbol)&&(c=this.hmSymbolFull)):this.jmolId.equals("0")||(c=this.hmSymbolFull);null==c?c="["+this.hallSymbol+"]":this.isSpinSpaceGroup?c="spinSG:"+this.ssgNumber+":"+this.itaTransform:null!=this.getClegId()&&(c+=" #"+this.getClegId());
c.endsWith("2/3a+1/3b+1/3c,-1/3a+1/3b+1/3c,-1/3a-2/3b+1/3c")&&(c=JU.PT.rep(c,"2/3a+1/3b+1/3c,-1/3a+1/3b+1/3c,-1/3a-2/3b+1/3c","r"));0<=c.indexOf("-- [--]")&&(c="");c.endsWith(":a,b,c")&&(c=c.substring(0,c.length-6));this.displayName=c}return this.displayName});b.getSpaceGroups=d(b,"getSpaceGroups",function(){if(null==JS.SpaceGroup.SG){var c=JS.SpaceGroup.STR_SG.length;JS.SpaceGroup.nameToGroup=new java.util.Hashtable;for(var a=Array(c),e=0;e<c;e++)a[e]=new JS.SpaceGroup(e,JS.SpaceGroup.STR_SG[e],
!0),JS.SpaceGroup.nameToGroup.put(a[e].jmolId,a[e]);System.out.println("SpaceGroup - "+c+" settings generated");JS.SpaceGroup.STR_SG=null;JS.SpaceGroup.SG=a}return JS.SpaceGroup.SG});d(b,"addMagLatticeVectors",function(c){if(0<=this.latticeOp||0==c.size())return!1;for(var a=this.latticeOp=this.operationCount,e=c.get(0).length==this.modDim+4,b=-2,d=0;d<c.size();d++){var h=c.get(d);e&&(b=y(h[this.modDim+3]),h=JU.AU.arrayCopyF(h,this.modDim+3));if(h.length>this.modDim+3)return!1;for(var k=0;k<a;k++){var l=
new JS.SymmetryOperation(null,0,!0);l.modDim=this.modDim;var j=this.symmetryOperations[k];l.divisor=j.divisor;l.linearRotTrans=JU.AU.arrayCopyF(j.linearRotTrans,-1);l.setFromMatrix(h,!1);-2!=b&&l.setTimeReversal(j.timeReversal*b);l.xyzOriginal=l.xyz;this.addOp(l,l.xyz,!0)}}return!0},"JU.Lst");d(b,"addSpinLattice",function(c,a){if(!(null==c||0==c.size())){for(var e=this.operationCount,b=0;b<c.size();b++){var d=c.get(b);if(null!=a){var h=d.indexOf("(");if(0>d.indexOf(",",h))var k=a.get(d.substring(h+
1,d.length-1)),d=d.substring(0,h+1)+k+")"}if(!d.equals("x,y,z(u,v,w)")){h=new JS.SymmetryOperation(null,0,!0);h.setMatrixFromXYZ(d,0,!0);h.doFinalize();for(var d=JU.M3.newM3(h.spinU),k=new JU.M3,l=this.operationCount,j=0;j<e;j++){var q=this.symmetryOperations[j];q.doFinalize();var p=new JS.SymmetryOperation(q,0,!0);p.mul2(q,h);if(null==q.spinU)throw new RuntimeException("SpaceGroup operation "+(j+1)+" no spin indicated!");k.mul2(q.spinU,d);p.modDim=this.modDim;p.divisor=q.divisor;q=JS.SymmetryOperation.getXYZFromMatrix(p,
!1,!0,!1)+JS.SymmetryOperation.getSpinString(k,!0,!0);q=this.addOperation(q,l,!0);this.symmetryOperations[q].doFinalize();l++}}}this.latticeOp=e}},"JU.Lst,java.util.Map");d(b,"getSiteMultiplicity",function(c,a){for(var e=this.finalOperations.length,b=new JU.Lst,d=e;0<=--d;){var h=JU.P3.newP(c);this.finalOperations[d].rotTrans(h);a.unitize(h);for(var k=b.size();0<=--k;){var l=b.get(k);if(1.96E-6>h.distanceSquared(l)){h=null;break}}null!=h&&b.addLast(h)}return E(e/b.size())},"JU.P3,JS.UnitCell");d(b,
"setName",function(c){this.name=c;null!=c&&(c.equals("spinSG:")?(this.itaNumber=this.ssgNumber="0",this.isSpinSpaceGroup=!0,this.hallSymbol="--",this.itaTransform="a,b,c",this.setClegId(null),this.spinFrameTransform=JU.M3.newM3(null)):c.startsWith("HM:")?this.setHMSymbol(c.substring(3)):this.isSpinSpaceGroup&&(this.name=c.startsWith("spinSG:")?c:"spinSG:"+c,this.itaTransform=this.name.substring(this.name.indexOf(":",7)+1)));this.strName=this.displayName=null},"~S");b.getSpaceGroupFromJmolClegOrITA=
d(b,"getSpaceGroupFromJmolClegOrITA",function(c,a){var e=JS.SpaceGroup.getExplicitSpecialGroupType(a);if(0<e)return JS.Symmetry.getSGFactory().getSpecialGroup(c,null,a,e);var e=a.indexOf(":"),b=a.indexOf(","),d=a.indexOf("."),h=0<e&&b>e?e:d,b=JS.SpaceGroup.SG.length;if(0<h&&h==e)for(e=0;e<b;e++){if(a.equals(JS.SpaceGroup.SG[e].clegId))return JS.SpaceGroup.SG[e]}else if(0<e)for(e=0;e<b;e++){if(a.equals(JS.SpaceGroup.SG[e].jmolId))return JS.SpaceGroup.SG[e]}else if(0<d)for(e=0;e<b;e++){if(a.equals(JS.SpaceGroup.SG[e].itaIndex))return JS.SpaceGroup.SG[e]}else for(e=
0;e<b;e++)if(a.equals(JS.SpaceGroup.SG[e].itaNumber))return JS.SpaceGroup.SG[e];return null},"JV.Viewer,~S");d(b,"checkHallOperators",function(){null!=this.nHallOperators&&this.nHallOperators.intValue()!=this.operationCount&&(null==this.hallInfo||this.hallInfo.isGenerated()?this.generateMatrixOperators(this.hallInfo):(this.init(!1),this.doNormalize=!0,JS.SpaceGroup.transformSpaceGroup(0,this,JS.SpaceGroup.getSpaceGroupFromJmolClegOrITA(null,this.itaNumber),null,this.itaTransform,null),this.hallInfo=
null))});d(b,"getOpsCtr",function(c){var a=JS.SpaceGroup.getNull(!0,!0,!1);JS.SpaceGroup.transformSpaceGroup(this.groupType,a,this,null,"!"+c,null);a.setFinalOperations();var e=JS.SpaceGroup.getNull(!0,!1,!1);JS.SpaceGroup.transformSpaceGroup(this.groupType,e,a,null,c,null);e.setFinalOperations();return e.finalOperations},"~S");b.getSpaceGroupFromIndex=d(b,"getSpaceGroupFromIndex",function(c){return null!=JS.SpaceGroup.SG&&0<=c&&c<JS.SpaceGroup.SG.length?JS.SpaceGroup.SG[c]:null},"~N");d(b,"setITATableNames",
function(c,a,e,b){this.itaNumber=".".equals(a)?"0":a;this.itaIndex=null!=b?a+":"+b:0<=e.indexOf(".")?e:a+"."+e;this.itaTransform=b;this.setClegId(this.specialPrefix+a+":"+b);this.strName=this.displayName=null;this.jmolId=c;null==c?(this.name=this.clegId,this.info=this.dumpInfoObj()):this.setJmolCode(c)},"~S,~S,~S,~S");b.transformCoords=d(b,"transformCoords",function(c,a,e,b,d,h){null==h&&(h=new JU.Lst);for(var k=0,l=c.size();k<l;k++){var j=JS.SymmetryOperation.transformStr(c.get(k),null,a,b,d,null,
e,!0,!0);h.contains(j)||h.addLast(j)}return h},"JU.Lst,JU.M4,JU.P3,JU.M4,~A,JU.Lst");b.getTransformRange=d(b,"getTransformRange",function(c){for(var a=F(2,3,0),e=F(4,0),b=0;3>b;b++){c.getRow(b,e);for(var d=0;3>d;d++){var h=e[d];0>h?a[0][b]+=-e[d]:0<h&&(a[1][b]+=e[d])}}c=!0;for(e=b=0;2>b;b++,e++)for(d=0;3>d;d++)h=E(Math.ceil(a[b][d])),h>e&&(c=!1),a[b][d]=0==b?-h:h;return c?null:a},"JU.M4");b.getTransformedCentering=d(b,"getTransformedCentering",function(c,a){var e=JU.M4.newM4(c);e.invert();var b=a.size(),
d=new JU.P3,h=new JU.P3,k=JS.SpaceGroup.getTransformRange(c);if(null!=k)for(var l=JS.SpaceGroup.addCentering(e,k,d,h,a,0);0<=--b&&3>l;)JS.SymmetryOperation.toPoint(a.removeItemAt(b),d),l=JS.SpaceGroup.addCentering(e,k,d,h,a,l);return e},"JU.M4,JU.Lst");b.addCentering=d(b,"addCentering",function(c,a,e,b,d,h){for(var k=y(a[0][0]);k<=a[1][0];k++)for(var l=y(a[0][1]);l<=a[1][1];l++)for(var j=y(a[0][2]);j<=a[1][2];j++)if(b.set(k,l,j),b.add(e),c.rotTrans(b),0!=b.length()%1){b.x%=1;b.y%=1;b.z%=1;var q=JS.SymmetryOperation.norm3(b);
if(!q.equals("0,0,0")&&!d.contains(q)&&(d.addLast(q),3==++h))return 3}return h},"JU.M4,~A,JU.P3,JU.P3,JU.Lst,~N");b.fillMoreData=d(b,"fillMoreData",function(c,a,e,b,d){var h=e.indexOf(":"),h=0>h?"a,b,c":e.substring(h+1),k=JS.UnitCell.toTrm(h,null),l=d.get("gp"),j=d.get("wpos"),q=j.get("cent");d=new JU.Lst;null!=q&&d.addAll(q);for(var p=d.size(),m=JS.SpaceGroup.getTransformedCentering(k,d),q=d.size(),s=j.get("pos"),j=new JU.Lst,r=new JU.M4,n=F(16,0),z=(q+1)/(p+1),p=0,u=s.size();p<u;p++){var w=s.get(p),
C=new java.util.Hashtable;C.putAll(w);var B=w.get("coord");null!=B&&(B=JS.SpaceGroup.transformCoords(B,m,null,r,n,null),C.put("coord",B));w=w.get("mult").intValue();C.put("mult",Integer.$valueOf(y(w*z)));j.addLast(C)}s=new JU.Lst;JS.SpaceGroup.transformCoords(l,m,null,r,n,s);if(0<q)for(p=0;p<q;p++)C=new JU.P3,JS.SpaceGroup.transformCoords(l,m,JS.SymmetryOperation.toPoint(d.get(p),C),r,n,s);null==a?(a=new java.util.Hashtable,a.put("sg",Integer.$valueOf(b)),a.put("trm",h),a.put("clegId",b+":"+h),a.put("det",
Float.$valueOf(k.determinant3()))):a.remove("more");b=new java.util.Hashtable;0<q&&b.put("cent",d);b.put("pos",j);a.put("wpos",b);s=new JU.Lst;c=JS.SpaceGroup.getSpaceGroupFromJmolClegOrITA(c,e);c=JS.SpaceGroup.transformSpaceGroup(0,null,c,l,h,new JU.M4);p=0;for(u=c.getOperationCount();p<u;p++)s.addLast(c.getOperation(p).xyz);a.put("gp",s);return a},"JV.Viewer,java.util.Map,~S,~N,java.util.Map");b.transformSpaceGroup=d(b,"transformSpaceGroup",function(c,a,e,b,d,h){if(null==b){e.setFinalOperationsSafely();
b=new JU.Lst;for(var k=0,l=e.getOperationCount();k<l;k++)b.addLast(e.getXyz(k,!1))}b=JS.SpaceGroup.addTransformXYZList(a,b,d,h,null==a||a.doNormalize);if(null==a)return JS.SpaceGroup.createITASpaceGroup(c,b,e);null==d?a.setFrom(e,!0):a.setITATableNames(a.jmolId,a.itaNumber,"1",d);return a},"~N,JS.SpaceGroup,JS.SpaceGroup,JU.Lst,~S,JU.M4");b.createITASpaceGroup=d(b,"createITASpaceGroup",function(c,a,e){c=0==c?new JS.SpaceGroup(-1,"0;--;--;0;--;--;--",!0):JS.Symmetry.getSGFactory().createSpecialGroup(e,
null,null,c);c.doNormalize=!1;for(var b=0,d=a.size();b<d;b++){var h=new JS.SymmetryOperation(null,b,!1),k=a.get(b);h.setMatrixFromXYZ(k,0,!1);c.addOp(h,k,!1)}null!=e&&c.setFrom(e,!0);c.setFinalOperationsSafely();return c},"~N,JU.Lst,JS.SpaceGroup");b.addTransformXYZList=d(b,"addTransformXYZList",function(c,a,e,b,d){var h=null,k=null,l=null,j=null,q=a.size();null!=e&&(e.equals("r")&&(e="2/3a+1/3b+1/3c,-1/3a+1/3b+1/3c,-1/3a-2/3b+1/3c"),b=JS.UnitCell.toTrm(e,b),h=JU.M4.newM4(b),h.invert(),k=Math.round(b.determinant3()),
1<k&&(j=JS.SpaceGroup.getTransformRange(b),q*=k),l=F(16,0),k=new JU.M4);e=JS.SpaceGroup.addTransformedOperations(c,a,b,h,k,l,null==c?new JU.Lst:null,null,d);if(null!=j)for(var p=new JU.P3,m=y(j[0][2]);m<=j[1][2];m++)for(var s=y(j[0][1]);s<=j[1][1];s++)for(var r=y(j[0][0]);r<j[1][0];r++)if(!(0==r&&0==s&&0==m)&&(p.set(r,s,m),null!=JS.SpaceGroup.addTransformedOperations(c,a,b,h,k,l,e,p,d)&&e.size()==q))return e;return null==c?e:null},"JS.SpaceGroup,JU.Lst,~S,JU.M4,~B");b.addTransformedOperations=d(b,
"addTransformedOperations",function(c,a,e,b,d,h,k,l,j){null!=c&&(c.latticeOp=0);for(var q=0,p=a.size();q<p;q++){var m=a.get(q);if(null!=e&&(0<q||null!=l))m=JS.SymmetryOperation.transformStr(m,e,b,d,h,l,null,j,!1);null!=c?c.addOperation(m,0,!1):k.contains(m)||k.addLast(m)}return k},"JS.SpaceGroup,JU.Lst,JU.M4,JU.M4,JU.M4,~A,JU.Lst,JU.P3,~B");m(b,"getMatrixOperation",function(c){return this.symmetryOperations[c]},"~N");m(b,"getMatrixOperationCount",function(){return this.operationCount});m(b,"addHallOperationCheckDuplicates",
function(c){var a=JS.SymmetryOperation.getXYZFromMatrix(c,!0,!0,!1);if(0<=this.checkXYZlist(a))return!1;this.addSymmetrySM("!nohalf!"+a,c);return!0},"JU.M4");b.canonicalizeCleg=d(b,"canonicalizeCleg",function(c){if(null==c)return null;0>c.indexOf(":")?c+=":a,b,c;0,0,0":0<c.indexOf(",")&&0>c.indexOf(";")&&(c+=";0,0,0");return c},"~S");b.convertWyckoffHMCleg=d(b,"convertWyckoffHMCleg",function(c,a){if(null==JS.SpaceGroup.HMtoCleg){JS.SpaceGroup.HMtoCleg=new java.util.Hashtable;JS.SpaceGroup.ClegtoHM=
new java.util.Hashtable;for(var e=JS.SpaceGroup.moreSettings.length;0<=--e;){var b=JS.SpaceGroup.moreSettings[e],d=JS.SpaceGroup.moreSettings[--e],d=JU.PT.rep(d," ","");JS.SpaceGroup.ClegtoHM.put(b,d);JS.SpaceGroup.HMtoCleg.put(d,b)}}return null!=c?JS.SpaceGroup.HMtoCleg.get(JU.PT.rep(c," ","")):JS.SpaceGroup.ClegtoHM.get(a)},"~S,~S");d(b,"getHMName",function(){return this.hmSymbol});d(b,"getHMNameShort",function(){return null==this.hmSymbolAbbrShort?this.hmSymbol:this.hmSymbolAbbrShort});b.getITNo=
d(b,"getITNo",function(c,a){0>=a&&(a=c.length);for(var e=a;0<=--e;)if(!JU.PT.isDigit(c.charAt(e)))return-2147483648;return Integer.parseInt(c.substring(0,a))},"~S,~N");b.isInRange=d(b,"isInRange",function(c,a,e,b){var d=JS.SpaceGroup.getMax(a);switch(a){case 0:if(b)return a=y(c),b=JS.SpaceGroup.getImplicitSpecialGroupType(a),300==b&&(e=!1),-1!=b&&(e||a==c);break;case 300:e=!1}return 1<=c&&(e?c<d+1:c<=d)},"~N,~N,~B,~B");b.getMax=d(b,"getMax",function(a){switch(a){case 0:return 230;case 300:return 17;
case 400:return 80;case 500:return 75;case 600:return 7;default:return 0}},"~N");b.getGroupTypePrefix=d(b,"getGroupTypePrefix",function(a){switch(a-a%100){case 300:return"p/";case 400:return"l/";case 500:return"r/";case 600:return"f/"}return""},"~N");b.getExplicitSpecialGroupType=d(b,"getExplicitSpecialGroupType",function(a){if(2>a.length||"/"!=a.charAt(1))return 0;switch(a.substring(0,2)){case "p/":return 300;case "l/":return 400;case "r/":return 500;case "f/":return 600;default:return-1}},"~S");
b.getSpecialGroupName=d(b,"getSpecialGroupName",function(a){switch(a){case 0:return"";case 300:return"plane";case 400:return"layer";case 500:return"rod";case 600:return"frieze";default:return null}},"~N");b.getImplicitSpecialGroupType=d(b,"getImplicitSpecialGroupType",function(a){return 1>a?-1:230>=a?0:300<a&&317>=a?300:400<a&&480>=a?400:500<a&&575>=a?500:600<a&&607>=a?600:-1},"~N");b.hmMatches=d(b,"hmMatches",function(a,f,e){"/"==a.charAt(1)&&(a=a.substring(2));if(a.charAt(0)!=f.charAt(0))return!1;
0>f.indexOf(" ")&&(a=JU.PT.rep(a," ",""));if(a.equals(f))return!0;if(300==e){e=a.length;if(e<=f.length)return!1;var b=f.charAt(1);switch(f.length){case 2:return 4==e&&"1"==a.charAt(1)&&b==a.charAt(2);case 3:return"2"==a.charAt(1)?a.charAt(2)==b&&a.charAt(3)==f.charAt(2):"m"==a.charAt(e-1)&&a.startsWith(f)}}return!1},"~S,~S,~N");d(b,"createCompatibleUnitCell",function(a,f,e){var b=null==this.itaNumber?0:JU.PT.parseInt(this.itaNumber),d=!1,h=!1,k=!1,l=!1,h=(d=0!=b&&this.isHexagonalSG(b,null))&&this.isHexagonalSG(-1,
a),l=(k=0!=b&&"r"==this.axisChoice)&&JU.SimpleUnitCell.isRhombohedral(a);if(d&&h||k&&l)e=!0;var j=new JS.SpaceGroup.ParamCheck(a,e,!0);if(b>(e?2:0))if(d){if(!(k?l:h))"r"==this.axisChoice?(j.c=j.b=j.a,!e&&(85<j.alpha&&95>j.alpha)&&(j.alpha=80),j.gamma=j.beta=j.alpha):(j.b=j.a,j.alpha=j.beta=90,j.gamma=120)}else if(195<=b)j.c=j.b=j.a,j.alpha=j.beta=j.gamma=90;else if(75<=b)j.b=j.a,j.acsame&&!e&&(j.c=1.5*j.a),j.alpha=j.beta=j.gamma=90;else if(16<=b)j.alpha=j.beta=j.gamma=90;else if(3<=b)switch(this.uniqueAxis.charCodeAt(0)){case 97:j.beta=
j.gamma=90;break;default:case 98:j.alpha=j.gamma=90;break;case 99:j.alpha=j.beta=90}return j.checkNew(a,null==f?a:f)},"~A,~A,~B");d(b,"isHexagonalSG",function(a,f){return 1>a?JU.SimpleUnitCell.isHexagonal(f):143<=a&&194>=a},"~N,~A");d(b,"mapSpins",function(a){for(var f,e=this.operationCount;0<=--e;){f=this.symmetryOperations[e];var b=null==f.suvwId?null:a.get(f.suvwId);null!=f.suvwId&&null==b?System.err.println("SpaceGroup key "+f.suvwId):f.setSpin(b)}},"java.util.Map");d(b,"setMatrixOperationCount",
function(a){if(a!=this.operationCount){for(var f=Array(a),e=a;0<=--e;)f[e]=this.symmetryOperations[e];this.symmetryOperations=f;this.operationCount=a}},"~N");d(b,"setSpinList",function(a){if(null!=this.spinList)return this.spinList;this.spinConfiguration=a;var f=new JU.Lst;f.addLast("u,v,w");a="Coplanar".equals(a);for(var e=0;e<this.operationCount;e++){var b=this.symmetryOperations[e];if(null==b.suvw)break;if(!(a&&0>b.timeReversal)){var d=f.indexOf(b.suvw);0>d&&(d=f.size(),f.addLast(b.suvw));b.spinIndex=
d}}return this.spinList=f},"~S");var a=I(function(){this.gamma=this.beta=this.alpha=this.c=this.b=this.a=0;this.acsame=!1;S(this,arguments)},JS.SpaceGroup,"ParamCheck",null);$(a,function(a,f,e){this.a=a[0];this.b=a[1];this.c=a[2];this.alpha=a[3];this.beta=a[4];this.gamma=a[5];f||this.checkParams(e)},"~A,~B,~B");d(a,"checkParams",function(a){if(0<this.b&&this.a>this.b){var f=this.a;this.a=this.b;this.b=f}a&&(0<this.c&&JU.SimpleUnitCell.approx0(this.b-this.c))&&(this.c=1.5*this.b);JU.SimpleUnitCell.approx0(this.a-
this.b)&&(this.b=1.2*this.a);JU.SimpleUnitCell.approx0(this.gamma-90)&&(this.gamma=130);if(a){if(this.acsame=0<this.c&&JU.SimpleUnitCell.approx0(this.c-this.a))this.c=1.1*this.a;JU.SimpleUnitCell.approx0(this.alpha-90)&&(this.alpha=80);JU.SimpleUnitCell.approx0(this.beta-90)&&(this.beta=100);this.alpha>this.beta&&(f=this.alpha,this.alpha=this.beta,this.beta=f);a=JU.SimpleUnitCell.approx0(this.alpha-this.beta);var f=JU.SimpleUnitCell.approx0(this.beta-this.gamma),e=JU.SimpleUnitCell.approx0(this.gamma-
this.alpha);a&&(this.beta=1.2*this.alpha);f&&(this.gamma=1.3*this.beta);e&&(this.gamma=1.4*this.alpha)}},"~B");d(a,"checkNew",function(a,f){var e=!(this.a==a[0]&&this.b==a[1]&&this.c==a[2]&&this.alpha==a[3]&&this.beta==a[4]&&this.gamma==a[5]);f[0]=this.a;f[1]=this.b;f[2]=this.c;f[3]=this.alpha;f[4]=this.beta;f[5]=this.gamma;return e},"~A,~A");b.canonicalSeitzList=null;b.sgIndex=-1;b.lastInfo=null;b.ambiguousHMNames="";b.lastHallSymbol="";b.SG=null;b.htByOpCount=new java.util.Hashtable;b.nameToGroup=
null;b.nSG=0;b.STR_SG=C(-1,'1;1.1;;1;c1^1;p 1;p 1{2;2.1;;2;ci^1;p -1;-p 1{3:b;3.1;;2;c2^1;p 1 2 1;p 2y{3:b;3.1;;2;c2^1;p 2;p 2y{3:c;3.2;c,a,b;2;c2^1;p 1 1 2;p 2{3:a;3.3;b,c,a;2;c2^1;p 2 1 1;p 2x{4:b;4.1;;2;c2^2;p 1 21 1;p 2yb{4:b;4.1;;2;c2^2;p 21;p 2yb{4:c;4.2;c,a,b;2;c2^2;p 1 1 21;p 2c{4:a;4.3;b,c,a;2;c2^2;p 21 1 1;p 2xa{5:b1;5.1;;4;c2^3;c 1 2 1;c 2y{5:b1;5.1;;4;c2^3;c 2;c 2y{5:b2;5.2;-a-c,b,a;4;c2^3;a 1 2 1;a 2y{5:b3;5.3;c,b,-a-c;4;c2^3;i 1 2 1;i 2y{5:c1;5.4;c,a,b;4;c2^3;a 1 1 2;a 2{5:c2;5.5;a,-a-c,b;4;c2^3;b 1 1 2;b 2{5:c3;5.6;-a-c,c,b;4;c2^3;i 1 1 2;i 2{5:a1;5.7;b,c,a;4;c2^3;b 2 1 1;b 2x{5:a2;5.8;b,a,-a-c;4;c2^3;c 2 1 1;c 2x{5:a3;5.9;b,-a-c,c;4;c2^3;i 2 1 1;i 2x{6:b;6.1;;2;cs^1;p 1 m 1;p -2y{6:b;6.1;;2;cs^1;p m;p -2y{6:c;6.2;c,a,b;2;cs^1;p 1 1 m;p -2{6:a;6.3;b,c,a;2;cs^1;p m 1 1;p -2x{7:b1;7.1;;2;cs^2;p 1 c 1;p -2yc{7:b1;7.1;;2;cs^2;p c;p -2yc{7:b2;7.2;-a-c,b,a;2;cs^2;p 1 n 1;p -2yac{7:b2;7.2;-a-c,b,a;2;cs^2;p n;p -2yac{7:b3;7.3;c,b,-a-c;2;cs^2;p 1 a 1;p -2ya{7:b3;7.3;c,b,-a-c;2;cs^2;p a;p -2ya{7:c1;7.4;c,a,b;2;cs^2;p 1 1 a;p -2a{7:c2;7.5;a,-a-c,b;2;cs^2;p 1 1 n;p -2ab{7:c3;7.6;-a-c,c,b;2;cs^2;p 1 1 b;p -2b{7:a1;7.7;b,c,a;2;cs^2;p b 1 1;p -2xb{7:a2;7.8;b,a,-a-c;2;cs^2;p n 1 1;p -2xbc{7:a3;7.9;b,-a-c,c;2;cs^2;p c 1 1;p -2xc{8:b1;8.1;;4;cs^3;c 1 m 1;c -2y{8:b1;8.1;;4;cs^3;c m;c -2y{8:b2;8.2;-a-c,b,a;4;cs^3;a 1 m 1;a -2y{8:b3;8.3;c,b,-a-c;4;cs^3;i 1 m 1;i -2y{8:b3;8.3;c,b,-a-c;4;cs^3;i m;i -2y{8:c1;8.4;c,a,b;4;cs^3;a 1 1 m;a -2{8:c2;8.5;a,-a-c,b;4;cs^3;b 1 1 m;b -2{8:c3;8.6;-a-c,c,b;4;cs^3;i 1 1 m;i -2{8:a1;8.7;b,c,a;4;cs^3;b m 1 1;b -2x{8:a2;8.8;b,a,-a-c;4;cs^3;c m 1 1;c -2x{8:a3;8.9;b,-a-c,c;4;cs^3;i m 1 1;i -2x{9:b1;9.1;;4;cs^4;c 1 c 1;c -2yc{9:b1;9.1;;4;cs^4;c c;c -2yc{9:b2;9.2;-a-c,b,a;4;cs^4;a 1 n 1;a -2yab{9:b3;9.3;c,b,-a-c;4;cs^4;i 1 a 1;i -2ya{9:-b1;9.4;c,-b,a;4;cs^4;a 1 a 1;a -2ya{9:-b2;9.5;a,-b,-a-c;4;cs^4;c 1 n 1;c -2yac{9:-b3;9.6;-a-c,-b,c;4;cs^4;i 1 c 1;i -2yc{9:c1;9.7;c,a,b;4;cs^4;a 1 1 a;a -2a{9:c2;9.8;a,-a-c,b;4;cs^4;b 1 1 n;b -2ab{9:c3;9.9;-a-c,c,b;4;cs^4;i 1 1 b;i -2b{9:-c1;9.10;a,c,-b;4;cs^4;b 1 1 b;b -2b{9:-c2;9.11;-a-c,a,-b;4;cs^4;a 1 1 n;a -2ab{9:-c3;9.12;c,-a-c,-b;4;cs^4;i 1 1 a;i -2a{9:a1;9.13;b,c,a;4;cs^4;b b 1 1;b -2xb{9:a2;9.14;b,a,-a-c;4;cs^4;c n 1 1;c -2xac{9:a3;9.15;b,-a-c,c;4;cs^4;i c 1 1;i -2xc{9:-a1;9.16;-b,a,c;4;cs^4;c c 1 1;c -2xc{9:-a2;9.17;-b,-a-c,a;4;cs^4;b n 1 1;b -2xab{9:-a3;9.18;-b,c,-a-c;4;cs^4;i b 1 1;i -2xb{10:b;10.1;;4;c2h^1;p 1 2/m 1;-p 2y{10:b;10.1;;4;c2h^1;p 2/m;-p 2y{10:c;10.2;c,a,b;4;c2h^1;p 1 1 2/m;-p 2{10:a;10.3;b,c,a;4;c2h^1;p 2/m 1 1;-p 2x{11:b;11.1;;4;c2h^2;p 1 21/m 1;-p 2yb{11:b;11.1;;4;c2h^2;p 21/m;-p 2yb{11:c;11.2;c,a,b;4;c2h^2;p 1 1 21/m;-p 2c{11:a;11.3;b,c,a;4;c2h^2;p 21/m 1 1;-p 2xa{12:b1;12.1;;8;c2h^3;c 1 2/m 1;-c 2y{12:b1;12.1;;8;c2h^3;c 2/m;-c 2y{12:b2;12.2;-a-c,b,a;8;c2h^3;a 1 2/m 1;-a 2y{12:b3;12.3;c,b,-a-c;8;c2h^3;i 1 2/m 1;-i 2y{12:b3;12.3;c,b,-a-c;8;c2h^3;i 2/m;-i 2y{12:c1;12.4;c,a,b;8;c2h^3;a 1 1 2/m;-a 2{12:c2;12.5;a,-a-c,b;8;c2h^3;b 1 1 2/m;-b 2{12:c3;12.6;-a-c,c,b;8;c2h^3;i 1 1 2/m;-i 2{12:a1;12.7;b,c,a;8;c2h^3;b 2/m 1 1;-b 2x{12:a2;12.8;b,a,-a-c;8;c2h^3;c 2/m 1 1;-c 2x{12:a3;12.9;b,-a-c,c;8;c2h^3;i 2/m 1 1;-i 2x{13:b1;13.1;;4;c2h^4;p 1 2/c 1;-p 2yc{13:b1;13.1;;4;c2h^4;p 2/c;-p 2yc{13:b2;13.2;-a-c,b,a;4;c2h^4;p 1 2/n 1;-p 2yac{13:b2;13.2;-a-c,b,a;4;c2h^4;p 2/n;-p 2yac{13:b3;13.3;c,b,-a-c;4;c2h^4;p 1 2/a 1;-p 2ya{13:b3;13.3;c,b,-a-c;4;c2h^4;p 2/a;-p 2ya{13:c1;13.4;c,a,b;4;c2h^4;p 1 1 2/a;-p 2a{13:c2;13.5;a,-a-c,b;4;c2h^4;p 1 1 2/n;-p 2ab{13:c3;13.6;-a-c,c,b;4;c2h^4;p 1 1 2/b;-p 2b{13:a1;13.7;b,c,a;4;c2h^4;p 2/b 1 1;-p 2xb{13:a2;13.8;b,a,-a-c;4;c2h^4;p 2/n 1 1;-p 2xbc{13:a3;13.9;b,-a-c,c;4;c2h^4;p 2/c 1 1;-p 2xc{14:b1;14.1;;4;c2h^5;p 1 21/c 1;-p 2ybc{14:b1;14.1;;4;c2h^5;p 21/c;-p 2ybc{14:b2;14.2;-a-c,b,a;4;c2h^5;p 1 21/n 1;-p 2yn{14:b2;14.2;-a-c,b,a;4;c2h^5;p 21/n;-p 2yn{14:b3;14.3;c,b,-a-c;4;c2h^5;p 1 21/a 1;-p 2yab{14:b3;14.3;c,b,-a-c;4;c2h^5;p 21/a;-p 2yab{14:c1;14.4;c,a,b;4;c2h^5;p 1 1 21/a;-p 2ac{14:c2;14.5;a,-a-c,b;4;c2h^5;p 1 1 21/n;-p 2n{14:c3;14.6;-a-c,c,b;4;c2h^5;p 1 1 21/b;-p 2bc{14:a1;14.7;b,c,a;4;c2h^5;p 21/b 1 1;-p 2xab{14:a2;14.8;b,a,-a-c;4;c2h^5;p 21/n 1 1;-p 2xn{14:a3;14.9;b,-a-c,c;4;c2h^5;p 21/c 1 1;-p 2xac{15:b1;15.1;;8;c2h^6;c 1 2/c 1;-c 2yc{15:b1;15.1;;8;c2h^6;c 2/c;-c 2yc{15:b2;15.2;-a-c,b,a;8;c2h^6;a 1 2/n 1;-a 2yab{15:b3;15.3;c,b,-a-c;8;c2h^6;i 1 2/a 1;-i 2ya{15:b3;15.3;c,b,-a-c;8;c2h^6;i 2/a;-i 2ya{15:-b1;15.4;c,-b,a;8;c2h^6;a 1 2/a 1;-a 2ya{15:-b2;15.5;a,-b,-a-c;8;c2h^6;c 1 2/n 1;-c 2yac{15:-b2;15.5;a,-b,-a-c;8;c2h^6;c 2/n;-c 2yac{15:-b3;15.6;-a-c,-b,c;8;c2h^6;i 1 2/c 1;-i 2yc{15:-b3;15.6;-a-c,-b,c;8;c2h^6;i 2/c;-i 2yc{15:c1;15.7;c,a,b;8;c2h^6;a 1 1 2/a;-a 2a{15:c2;15.8;a,-a-c,b;8;c2h^6;b 1 1 2/n;-b 2ab{15:c3;15.9;-a-c,c,b;8;c2h^6;i 1 1 2/b;-i 2b{15:-c1;15.10;a,c,-b;8;c2h^6;b 1 1 2/b;-b 2b{15:-c2;15.11;-a-c,a,-b;8;c2h^6;a 1 1 2/n;-a 2ab{15:-c3;15.12;c,-a-c,-b;8;c2h^6;i 1 1 2/a;-i 2a{15:a1;15.13;b,c,a;8;c2h^6;b 2/b 1 1;-b 2xb{15:a2;15.14;b,a,-a-c;8;c2h^6;c 2/n 1 1;-c 2xac{15:a3;15.15;b,-a-c,c;8;c2h^6;i 2/c 1 1;-i 2xc{15:-a1;15.16;-b,a,c;8;c2h^6;c 2/c 1 1;-c 2xc{15:-a2;15.17;-b,-a-c,a;8;c2h^6;b 2/n 1 1;-b 2xab{15:-a3;15.18;-b,c,-a-c;8;c2h^6;i 2/b 1 1;-i 2xb{16;16.1;;4;d2^1;p 2 2 2;p 2 2{17;17.1;;4;d2^2;p 2 2 21;p 2c 2{17:cab;17.2;c,a,b;4;d2^2;p 21 2 2;p 2a 2a{17:bca;17.3;b,c,a;4;d2^2;p 2 21 2;p 2 2b{18;18.1;;4;d2^3;p 21 21 2;p 2 2ab{18:cab;18.2;c,a,b;4;d2^3;p 2 21 21;p 2bc 2{18:bca;18.3;b,c,a;4;d2^3;p 21 2 21;p 2ac 2ac{19;19.1;;4;d2^4;p 21 21 21;p 2ac 2ab{20;20.1;;8;d2^5;c 2 2 21;c 2c 2{20:cab;20.2;c,a,b;8;d2^5;a 21 2 2;a 2a 2a{20:cab*;20.2;c,a,b;8;d2^5;a 21 2 2*;a 2a 21{20:bca;20.3;b,c,a;8;d2^5;b 2 21 2;b 2 2b{21;21.1;;8;d2^6;c 2 2 2;c 2 2{21:cab;21.2;c,a,b;8;d2^6;a 2 2 2;a 2 2{21:bca;21.3;b,c,a;8;d2^6;b 2 2 2;b 2 2{22;22.1;;16;d2^7;f 2 2 2;f 2 2{23;23.1;;8;d2^8;i 2 2 2;i 2 2{24;24.1;;8;d2^9;i 21 21 21;i 2b 2c{25;25.1;;4;c2v^1;p m m 2;p 2 -2{25:cab;25.2;c,a,b;4;c2v^1;p 2 m m;p -2 2{25:bca;25.3;b,c,a;4;c2v^1;p m 2 m;p -2 -2{26;26.1;;4;c2v^2;p m c 21;p 2c -2{26:ba-c;26.2;b,a,-c;4;c2v^2;p c m 21;p 2c -2c{26:ba-c*;26.2;b,a,-c;4;c2v^2;p c m 21*;p 21 -2c{26:cab;26.3;c,a,b;4;c2v^2;p 21 m a;p -2a 2a{26:-cba;26.4;-c,b,a;4;c2v^2;p 21 a m;p -2 2a{26:bca;26.5;b,c,a;4;c2v^2;p b 21 m;p -2 -2b{26:a-cb;26.6;a,-c,b;4;c2v^2;p m 21 b;p -2b -2{27;27.1;;4;c2v^3;p c c 2;p 2 -2c{27:cab;27.2;c,a,b;4;c2v^3;p 2 a a;p -2a 2{27:bca;27.3;b,c,a;4;c2v^3;p b 2 b;p -2b -2b{28;28.1;;4;c2v^4;p m a 2;p 2 -2a{28:ba-c;28.2;b,a,-c;4;c2v^4;p b m 2;p 2 -2b{28:cab;28.3;c,a,b;4;c2v^4;p 2 m b;p -2b 2{28:-cba;28.4;-c,b,a;4;c2v^4;p 2 c m;p -2c 2{28:-cba*;28.4;-c,b,a;4;c2v^4;p 2 c m*;p -21 2{28:bca;28.5;b,c,a;4;c2v^4;p c 2 m;p -2c -2c{28:a-cb;28.6;a,-c,b;4;c2v^4;p m 2 a;p -2a -2a{29;29.1;;4;c2v^5;p c a 21;p 2c -2ac{29:ba-c;29.2;b,a,-c;4;c2v^5;p b c 21;p 2c -2b{29:cab;29.3;c,a,b;4;c2v^5;p 21 a b;p -2b 2a{29:-cba;29.4;-c,b,a;4;c2v^5;p 21 c a;p -2ac 2a{29:bca;29.5;b,c,a;4;c2v^5;p c 21 b;p -2bc -2c{29:a-cb;29.6;a,-c,b;4;c2v^5;p b 21 a;p -2a -2ab{30;30.1;;4;c2v^6;p n c 2;p 2 -2bc{30:ba-c;30.2;b,a,-c;4;c2v^6;p c n 2;p 2 -2ac{30:cab;30.3;c,a,b;4;c2v^6;p 2 n a;p -2ac 2{30:-cba;30.4;-c,b,a;4;c2v^6;p 2 a n;p -2ab 2{30:bca;30.5;b,c,a;4;c2v^6;p b 2 n;p -2ab -2ab{30:a-cb;30.6;a,-c,b;4;c2v^6;p n 2 b;p -2bc -2bc{31;31.1;;4;c2v^7;p m n 21;p 2ac -2{31:ba-c;31.2;b,a,-c;4;c2v^7;p n m 21;p 2bc -2bc{31:cab;31.3;c,a,b;4;c2v^7;p 21 m n;p -2ab 2ab{31:-cba;31.4;-c,b,a;4;c2v^7;p 21 n m;p -2 2ac{31:bca;31.5;b,c,a;4;c2v^7;p n 21 m;p -2 -2bc{31:a-cb;31.6;a,-c,b;4;c2v^7;p m 21 n;p -2ab -2{32;32.1;;4;c2v^8;p b a 2;p 2 -2ab{32:cab;32.2;c,a,b;4;c2v^8;p 2 c b;p -2bc 2{32:bca;32.3;b,c,a;4;c2v^8;p c 2 a;p -2ac -2ac{33;33.1;;4;c2v^9;p n a 21;p 2c -2n{33:ba-c;33.2;b,a,-c;4;c2v^9;p b n 21;p 2c -2ab{33:cab;33.3;c,a,b;4;c2v^9;p 21 n b;p -2bc 2a{33:-cba;33.4;-c,b,a;4;c2v^9;p 21 c n;p -2n 2a{33:bca;33.5;b,c,a;4;c2v^9;p c 21 n;p -2n -2ac{33:a-cb;33.6;a,-c,b;4;c2v^9;p n 21 a;p -2ac -2n{34;34.1;;4;c2v^10;p n n 2;p 2 -2n{34:cab;34.2;c,a,b;4;c2v^10;p 2 n n;p -2n 2{34:bca;34.3;b,c,a;4;c2v^10;p n 2 n;p -2n -2n{35;35.1;;8;c2v^11;c m m 2;c 2 -2{35:cab;35.2;c,a,b;8;c2v^11;a 2 m m;a -2 2{35:bca;35.3;b,c,a;8;c2v^11;b m 2 m;b -2 -2{36;36.1;;8;c2v^12;c m c 21;c 2c -2{36:ba-c;36.2;b,a,-c;8;c2v^12;c c m 21;c 2c -2c{36:cab;36.3;c,a,b;8;c2v^12;a 21 m a;a -2a 2a{36:-cba;36.4;-c,b,a;8;c2v^12;a 21 a m;a -2 2a{36:bca;36.5;b,c,a;8;c2v^12;b b 21 m;b -2 -2b{36:a-cb;36.6;a,-c,b;8;c2v^12;b m 21 b;b -2b -2{37;37.1;;8;c2v^13;c c c 2;c 2 -2c{37:cab;37.2;c,a,b;8;c2v^13;a 2 a a;a -2a 2{37:bca;37.3;b,c,a;8;c2v^13;b b 2 b;b -2b -2b{38;38.1;;8;c2v^14;a m m 2;a 2 -2{38:ba-c;38.2;b,a,-c;8;c2v^14;b m m 2;b 2 -2{38:cab;38.3;c,a,b;8;c2v^14;b 2 m m;b -2 2{38:-cba;38.4;-c,b,a;8;c2v^14;c 2 m m;c -2 2{38:bca;38.5;b,c,a;8;c2v^14;c m 2 m;c -2 -2{38:a-cb;38.6;a,-c,b;8;c2v^14;a m 2 m;a -2 -2{39;39.1;;8;c2v^15;a e m 2;a 2 -2b{39;39.1;;8;c2v^15;a b m 2;a 2 -2b{39:ba-c;39.2;b,a,-c;8;c2v^15;b m e 2;b 2 -2a{39:ba-c;39.2;b,a,-c;8;c2v^15;b m a 2;b 2 -2a{39:cab;39.3;c,a,b;8;c2v^15;b 2 e m;b -2a 2{39:cab;39.3;c,a,b;8;c2v^15;b 2 c m;b -2a 2{39:-cba;39.4;-c,b,a;8;c2v^15;c 2 m e;c -2a 2{39:-cba;39.4;-c,b,a;8;c2v^15;c 2 m b;c -2a 2{39:bca;39.5;b,c,a;8;c2v^15;c m 2 e;c -2a -2a{39:bca;39.5;b,c,a;8;c2v^15;c m 2 a;c -2a -2a{39:a-cb;39.6;a,-c,b;8;c2v^15;a e 2 m;a -2b -2b{39:a-cb;39.6;a,-c,b;8;c2v^15;a c 2 m;a -2b -2b{40;40.1;;8;c2v^16;a m a 2;a 2 -2a{40:ba-c;40.2;b,a,-c;8;c2v^16;b b m 2;b 2 -2b{40:cab;40.3;c,a,b;8;c2v^16;b 2 m b;b -2b 2{40:-cba;40.4;-c,b,a;8;c2v^16;c 2 c m;c -2c 2{40:bca;40.5;b,c,a;8;c2v^16;c c 2 m;c -2c -2c{40:a-cb;40.6;a,-c,b;8;c2v^16;a m 2 a;a -2a -2a{41;41.1;;8;c2v^17;a e a 2;a 2 -2ab{41;41.1;;8;c2v^17;a b a 2;a 2 -2ab{41:ba-c;41.2;b,a,-c;8;c2v^17;b b e 2;b 2 -2ab{41:ba-c;41.2;b,a,-c;8;c2v^17;b b a 2;b 2 -2ab{41:cab;41.3;c,a,b;8;c2v^17;b 2 e b;b -2ab 2{41:cab;41.3;c,a,b;8;c2v^17;b 2 c b;b -2ab 2{41:-cba;41.4;-c,b,a;8;c2v^17;c 2 c e;c -2ac 2{41:-cba;41.4;-c,b,a;8;c2v^17;c 2 c b;c -2ac 2{41:bca;41.5;b,c,a;8;c2v^17;c c 2 e;c -2ac -2ac{41:bca;41.5;b,c,a;8;c2v^17;c c 2 a;c -2ac -2ac{41:a-cb;41.6;a,-c,b;8;c2v^17;a e 2 a;a -2ab -2ab{41:a-cb;41.6;a,-c,b;8;c2v^17;a c 2 a;a -2ab -2ab{42;42.1;;16;c2v^18;f m m 2;f 2 -2{42:cab;42.2;c,a,b;16;c2v^18;f 2 m m;f -2 2{42:bca;42.3;b,c,a;16;c2v^18;f m 2 m;f -2 -2{43;43.1;;16;c2v^19;f d d 2;f 2 -2d{43:cab;43.2;c,a,b;16;c2v^19;f 2 d d;f -2d 2{43:bca;43.3;b,c,a;16;c2v^19;f d 2 d;f -2d -2d{44;44.1;;8;c2v^20;i m m 2;i 2 -2{44:cab;44.2;c,a,b;8;c2v^20;i 2 m m;i -2 2{44:bca;44.3;b,c,a;8;c2v^20;i m 2 m;i -2 -2{45;45.1;;8;c2v^21;i b a 2;i 2 -2c{45:cab;45.2;c,a,b;8;c2v^21;i 2 c b;i -2a 2{45:bca;45.3;b,c,a;8;c2v^21;i c 2 a;i -2b -2b{46;46.1;;8;c2v^22;i m a 2;i 2 -2a{46:ba-c;46.2;b,a,-c;8;c2v^22;i b m 2;i 2 -2b{46:cab;46.3;c,a,b;8;c2v^22;i 2 m b;i -2b 2{46:-cba;46.4;-c,b,a;8;c2v^22;i 2 c m;i -2c 2{46:bca;46.5;b,c,a;8;c2v^22;i c 2 m;i -2c -2c{46:a-cb;46.6;a,-c,b;8;c2v^22;i m 2 a;i -2a -2a{47;47.1;;8;d2h^1;p m m m;-p 2 2{48:2;48.1;;8;d2h^2;p n n n :2;-p 2ab 2bc{48:1;48.2;a,b,c|1/4,1/4,1/4;8;d2h^2;p n n n :1;p 2 2 -1n{49;49.1;;8;d2h^3;p c c m;-p 2 2c{49:cab;49.2;c,a,b;8;d2h^3;p m a a;-p 2a 2{49:bca;49.3;b,c,a;8;d2h^3;p b m b;-p 2b 2b{50:2;50.1;;8;d2h^4;p b a n :2;-p 2ab 2b{50:2cab;50.2;c,a,b;8;d2h^4;p n c b :2;-p 2b 2bc{50:2bca;50.3;b,c,a;8;d2h^4;p c n a :2;-p 2a 2c{50:1;50.4;a,b,c|1/4,1/4,0;8;d2h^4;p b a n :1;p 2 2 -1ab{50:1cab;50.5;c,a,b|1/4,1/4,0;8;d2h^4;p n c b :1;p 2 2 -1bc{50:1bca;50.6;b,c,a|1/4,1/4,0;8;d2h^4;p c n a :1;p 2 2 -1ac{51;51.1;;8;d2h^5;p m m a;-p 2a 2a{51:ba-c;51.2;b,a,-c;8;d2h^5;p m m b;-p 2b 2{51:cab;51.3;c,a,b;8;d2h^5;p b m m;-p 2 2b{51:-cba;51.4;-c,b,a;8;d2h^5;p c m m;-p 2c 2c{51:bca;51.5;b,c,a;8;d2h^5;p m c m;-p 2c 2{51:a-cb;51.6;a,-c,b;8;d2h^5;p m a m;-p 2 2a{52;52.1;;8;d2h^6;p n n a;-p 2a 2bc{52:ba-c;52.2;b,a,-c;8;d2h^6;p n n b;-p 2b 2n{52:cab;52.3;c,a,b;8;d2h^6;p b n n;-p 2n 2b{52:-cba;52.4;-c,b,a;8;d2h^6;p c n n;-p 2ab 2c{52:bca;52.5;b,c,a;8;d2h^6;p n c n;-p 2ab 2n{52:a-cb;52.6;a,-c,b;8;d2h^6;p n a n;-p 2n 2bc{53;53.1;;8;d2h^7;p m n a;-p 2ac 2{53:ba-c;53.2;b,a,-c;8;d2h^7;p n m b;-p 2bc 2bc{53:cab;53.3;c,a,b;8;d2h^7;p b m n;-p 2ab 2ab{53:-cba;53.4;-c,b,a;8;d2h^7;p c n m;-p 2 2ac{53:bca;53.5;b,c,a;8;d2h^7;p n c m;-p 2 2bc{53:a-cb;53.6;a,-c,b;8;d2h^7;p m a n;-p 2ab 2{54;54.1;;8;d2h^8;p c c a;-p 2a 2ac{54:ba-c;54.2;b,a,-c;8;d2h^8;p c c b;-p 2b 2c{54:cab;54.3;c,a,b;8;d2h^8;p b a a;-p 2a 2b{54:-cba;54.4;-c,b,a;8;d2h^8;p c a a;-p 2ac 2c{54:bca;54.5;b,c,a;8;d2h^8;p b c b;-p 2bc 2b{54:a-cb;54.6;a,-c,b;8;d2h^8;p b a b;-p 2b 2ab{55;55.1;;8;d2h^9;p b a m;-p 2 2ab{55:cab;55.2;c,a,b;8;d2h^9;p m c b;-p 2bc 2{55:bca;55.3;b,c,a;8;d2h^9;p c m a;-p 2ac 2ac{56;56.1;;8;d2h^10;p c c n;-p 2ab 2ac{56:cab;56.2;c,a,b;8;d2h^10;p n a a;-p 2ac 2bc{56:bca;56.3;b,c,a;8;d2h^10;p b n b;-p 2bc 2ab{57;57.1;;8;d2h^11;p b c m;-p 2c 2b{57:ba-c;57.2;b,a,-c;8;d2h^11;p c a m;-p 2c 2ac{57:cab;57.3;c,a,b;8;d2h^11;p m c a;-p 2ac 2a{57:-cba;57.4;-c,b,a;8;d2h^11;p m a b;-p 2b 2a{57:bca;57.5;b,c,a;8;d2h^11;p b m a;-p 2a 2ab{57:a-cb;57.6;a,-c,b;8;d2h^11;p c m b;-p 2bc 2c{58;58.1;;8;d2h^12;p n n m;-p 2 2n{58:cab;58.2;c,a,b;8;d2h^12;p m n n;-p 2n 2{58:bca;58.3;b,c,a;8;d2h^12;p n m n;-p 2n 2n{59:2;59.1;;8;d2h^13;p m m n :2;-p 2ab 2a{59:2cab;59.2;c,a,b;8;d2h^13;p n m m :2;-p 2c 2bc{59:2bca;59.3;b,c,a;8;d2h^13;p m n m :2;-p 2c 2a{59:1;59.4;a,b,c|1/4,1/4,0;8;d2h^13;p m m n :1;p 2 2ab -1ab{59:1cab;59.5;c,a,b|1/4,1/4,0;8;d2h^13;p n m m :1;p 2bc 2 -1bc{59:1bca;59.6;b,c,a|1/4,1/4,0;8;d2h^13;p m n m :1;p 2ac 2ac -1ac{60;60.1;;8;d2h^14;p b c n;-p 2n 2ab{60:ba-c;60.2;b,a,-c;8;d2h^14;p c a n;-p 2n 2c{60:cab;60.3;c,a,b;8;d2h^14;p n c a;-p 2a 2n{60:-cba;60.4;-c,b,a;8;d2h^14;p n a b;-p 2bc 2n{60:bca;60.5;b,c,a;8;d2h^14;p b n a;-p 2ac 2b{60:a-cb;60.6;a,-c,b;8;d2h^14;p c n b;-p 2b 2ac{61;61.1;;8;d2h^15;p b c a;-p 2ac 2ab{61:ba-c;61.2;b,a,-c;8;d2h^15;p c a b;-p 2bc 2ac{62;62.1;;8;d2h^16;p n m a;-p 2ac 2n{62:ba-c;62.2;b,a,-c;8;d2h^16;p m n b;-p 2bc 2a{62:cab;62.3;c,a,b;8;d2h^16;p b n m;-p 2c 2ab{62:-cba;62.4;-c,b,a;8;d2h^16;p c m n;-p 2n 2ac{62:bca;62.5;b,c,a;8;d2h^16;p m c n;-p 2n 2a{62:a-cb;62.6;a,-c,b;8;d2h^16;p n a m;-p 2c 2n{63;63.1;;16;d2h^17;c m c m;-c 2c 2{63:ba-c;63.2;b,a,-c;16;d2h^17;c c m m;-c 2c 2c{63:cab;63.3;c,a,b;16;d2h^17;a m m a;-a 2a 2a{63:-cba;63.4;-c,b,a;16;d2h^17;a m a m;-a 2 2a{63:bca;63.5;b,c,a;16;d2h^17;b b m m;-b 2 2b{63:a-cb;63.6;a,-c,b;16;d2h^17;b m m b;-b 2b 2{64;64.1;;16;d2h^18;c m c e;-c 2ac 2{64;64.1;;16;d2h^18;c m c a;-c 2ac 2{64:ba-c;64.2;b,a,-c;16;d2h^18;c c m e;-c 2ac 2ac{64:ba-c;64.2;b,a,-c;16;d2h^18;c c m b;-c 2ac 2ac{64:cab;64.3;c,a,b;16;d2h^18;a e m a;-a 2ab 2ab{64:cab;64.3;c,a,b;16;d2h^18;a b m a;-a 2ab 2ab{64:-cba;64.4;-c,b,a;16;d2h^18;a e a m;-a 2 2ab{64:-cba;64.4;-c,b,a;16;d2h^18;a c a m;-a 2 2ab{64:bca;64.5;b,c,a;16;d2h^18;b b e m;-b 2 2ab{64:bca;64.5;b,c,a;16;d2h^18;b b c m;-b 2 2ab{64:a-cb;64.6;a,-c,b;16;d2h^18;b m e b;-b 2ab 2{64:a-cb;64.6;a,-c,b;16;d2h^18;b m a b;-b 2ab 2{65;65.1;;16;d2h^19;c m m m;-c 2 2{65:cab;65.2;c,a,b;16;d2h^19;a m m m;-a 2 2{65:bca;65.3;b,c,a;16;d2h^19;b m m m;-b 2 2{66;66.1;;16;d2h^20;c c c m;-c 2 2c{66:cab;66.2;c,a,b;16;d2h^20;a m a a;-a 2a 2{66:bca;66.3;b,c,a;16;d2h^20;b b m b;-b 2b 2b{67;67.1;;16;d2h^21;c m m e;-c 2a 2{67;67.1;;16;d2h^21;c m m a;-c 2a 2{67:ba-c;67.2;b,a,-c;16;d2h^21;c m m b;-c 2a 2a{67:cab;67.3;c,a,b;16;d2h^21;a b m m;-a 2b 2b{67:-cba;67.4;-c,b,a;16;d2h^21;a c m m;-a 2 2b{67:bca;67.5;b,c,a;16;d2h^21;b m c m;-b 2 2a{67:a-cb;67.6;a,-c,b;16;d2h^21;b m a m;-b 2a 2{68:2;68.1;;16;d2h^22;c c c e :2;-c 2a 2ac{68:2;68.1;;16;d2h^22;c c c a :2;-c 2a 2ac{68:2ba-c;68.2;b,a,-c;16;d2h^22;c c c b :2;-c 2a 2c{68:2cab;68.3;c,a,b;16;d2h^22;a b a a :2;-a 2a 2b{68:2-cba;68.4;-c,b,a;16;d2h^22;a c a a :2;-a 2ab 2b{68:2bca;68.5;b,c,a;16;d2h^22;b b c b :2;-b 2ab 2b{68:2a-cb;68.6;a,-c,b;16;d2h^22;b b a b :2;-b 2b 2ab{68:1;68.7;a,b,c|0,1/4,1/4;16;d2h^22;c c c e :1;c 2 2 -1ac{68:1;68.7;a,b,c|0,1/4,1/4;16;d2h^22;c c c a :1;c 2 2 -1ac{68:1ba-c;68.8;b,a,-c|0,1/4,1/4;16;d2h^22;c c c b :1;c 2 2 -1ac{68:1cab;68.9;c,a,b|0,1/4,1/4;16;d2h^22;a b a a :1;a 2 2 -1ab{68:1-cba;68.10;-c,b,a|0,1/4,1/4;16;d2h^22;a c a a :1;a 2 2 -1ab{68:1bca;68.11;b,c,a|0,1/4,1/4;16;d2h^22;b b c b :1;b 2 2 -1ab{68:1a-cb;68.12;a,-c,b|0,1/4,1/4;16;d2h^22;b b a b :1;b 2 2 -1ab{69;69.1;;32;d2h^23;f m m m;-f 2 2{70:2;70.1;;32;d2h^24;f d d d :2;-f 2uv 2vw{70:1;70.2;a,b,c|-1/8,-1/8,-1/8;32;d2h^24;f d d d :1;f 2 2 -1d{71;71.1;;16;d2h^25;i m m m;-i 2 2{72;72.1;;16;d2h^26;i b a m;-i 2 2c{72:cab;72.2;c,a,b;16;d2h^26;i m c b;-i 2a 2{72:bca;72.3;b,c,a;16;d2h^26;i c m a;-i 2b 2b{73;73.1;;16;d2h^27;i b c a;-i 2b 2c{73:ba-c;73.2;b,a,-c;16;d2h^27;i c a b;-i 2a 2b{74;74.1;;16;d2h^28;i m m a;-i 2b 2{74:ba-c;74.2;b,a,-c;16;d2h^28;i m m b;-i 2a 2a{74:cab;74.3;c,a,b;16;d2h^28;i b m m;-i 2c 2c{74:-cba;74.4;-c,b,a;16;d2h^28;i c m m;-i 2 2b{74:bca;74.5;b,c,a;16;d2h^28;i m c m;-i 2 2a{74:a-cb;74.6;a,-c,b;16;d2h^28;i m a m;-i 2c 2{75;75.1;;4;c4^1;p 4;p 4{75:c;75.2;ab;8;c4^1;c 4;c 4{76;76.1;;4;c4^2;p 41;p 4w{76:c;76.2;ab;8;c4^2;c 41;c 4w{77;77.1;;4;c4^3;p 42;p 4c{77:c;77.2;ab;8;c4^3;c 42;c 4c{78;78.1;;4;c4^4;p 43;p 4cw{78:c;78.2;ab;8;c4^4;c 43;c 4cw{79;79.1;;8;c4^5;i 4;i 4{79:f;79.2;ab;16;c4^5;f 4;f 4{80;80.1;;8;c4^6;i 41;i 4bw{80:f;80.2;ab;16;c4^6;f 41;xyz{81;81.1;;4;s4^1;p -4;p -4{81:c;81.2;ab;8;s4^1;c -4;c -4{82;82.1;;8;s4^2;i -4;i -4{82:f;82.2;ab;16;s4^2;f -4;f -4{83;83.1;;8;c4h^1;p 4/m;-p 4{83:f;83.2;ab;16;c4h^1;c 4/m;-c 4{84;84.1;;8;c4h^2;p 42/m;-p 4c{84:c;84.2;ab;16;c4h^2;c 42/m;-c 4c{85:2;85.1;;8;c4h^3;p 4/n :2;-p 4a{85:c2;85.2;ab;16;c4h^3;c 4/e :2;xyz{85:1;85.3;a,b,c|-1/4,1/4,0;8;c4h^3;p 4/n :1;p 4ab -1ab{85:c1;85.4;ab|-1/4,1/4,0;16;c4h^3;c 4/e :1;xyz{86:2;86.1;;8;c4h^4;p 42/n :2;-p 4bc{86:1;86.3;a,b,c|-1/4,-1/4,-1/4;8;c4h^4;p 42/n :1;p 4n -1n{86:c1;86.4;ab|-1/4,-1/4,-1/4;16;c4h^4;c 42/e :1;xyz{86:c2;86.2;ab;16;c4h^4;c 42/e :2;xyz{87;87.1;;16;c4h^5;i 4/m;-i 4{87:f;87.2;ab;32;c4h^5;f 4/m;xyz{88:2;88.1;;16;c4h^6;i 41/a :2;-i 4ad{88:f2;88.2;ab;32;c4h^6;f 41/d :2;xyz{88:1;88.3;a,b,c|0,-1/4,-1/8;16;c4h^6;i 41/a :1;i 4bw -1bw{88:f1;88.4;ab|0,-1/4,-1/8;32;c4h^6;f 41/d :1;xyz{89;89.1;;8;d4^1;p 4 2 2;p 4 2{89:c;89.2;ab;16;d4^1;c 4 2 2;xyz{90;90.1;;8;d4^2;p 4 21 2;p 4ab 2ab{90:c;90.2;ab;16;d4^2;c 4 2 21;xyz{91;91.1;;8;d4^3;p 41 2 2;p 4w 2c{91:c;91.2;ab;16;d4^3;c 41 2 2;xyz{92;92.1;;8;d4^4;p 41 21 2;p 4abw 2nw{92:c;92.2;ab;16;d4^4;c 41 2 21;xyz{93;93.1;;8;d4^5;p 42 2 2;p 4c 2{93:c;93.2;ab;16;d4^5;c 42 2 2;xyz{94;94.1;;8;d4^6;p 42 21 2;p 4n 2n{94:c;94.2;ab;16;d4^6;c 42 2 21;xyz{95;95.1;;8;d4^7;p 43 2 2;p 4cw 2c{95:c;95.2;ab;16;d4^7;c 43 2 2;xyz{96;96.1;;8;d4^8;p 43 21 2;p 4nw 2abw{96:c;96.2;ab;16;d4^8;c 43 2 21;xyz{97;97.1;;16;d4^9;i 4 2 2;i 4 2{97:f;97.2;ab;32;d4^9;f 4 2 2;f 4 2{98;98.1;;16;d4^10;i 41 2 2;i 4bw 2bw{98:f;98.2;ab;32;d4^10;f 41 2 2;xyz{99;99.1;;8;c4v^1;p 4 m m;p 4 -2{99:c;99.2;ab;16;c4v^1;c 4 m m;c 4 -2{100;100.1;;8;c4v^2;p 4 b m;p 4 -2ab{100:c;100.2;ab;16;c4v^2;c 4 m g1;xyz{101;101.1;;8;c4v^3;p 42 c m;p 4c -2c{101:c;101.2;ab;16;c4v^3;c 42 m c;xyz{102;102.1;;8;c4v^4;p 42 n m;p 4n -2n{102:c;102.2;ab;16;c4v^4;c 42 m g2;xyz{103;103.1;;8;c4v^5;p 4 c c;p 4 -2c{103:c;103.2;ab;16;c4v^5;c 4 c c;c 4 -2c{104;104.1;;8;c4v^6;p 4 n c;p 4 -2n{104:c;104.2;ab;16;c4v^6;c 4 c g2;xyz{105;105.1;;8;c4v^7;p 42 m c;p 4c -2{105:c;105.2;ab;16;c4v^7;c 42 c m;xyz{106;106.1;;8;c4v^8;p 42 b c;p 4c -2ab{106:c;106.2;ab;16;c4v^8;c 42 c g1;xyz{107;107.1;;16;c4v^9;i 4 m m;i 4 -2{107:f;107.2;ab;32;c4v^9;f 4 m m;f 4 -2{108;108.1;;16;c4v^10;i 4 c m;i 4 -2c{108:f;108.2;ab;32;c4v^10;f 4 m c;xyz{109;109.1;;16;c4v^11;i 41 m d;i 4bw -2{109:f;109.2;ab;32;c4v^11;f 41 d m;xyz{110;110.1;;16;c4v^12;i 41 c d;i 4bw -2c{110:f;110.2;ab;32;c4v^12;f 41 d c;xyz{111;111.1;;8;d2d^1;p -4 2 m;p -4 2{111:c;111.2;ab;16;d2d^1;c -4 m 2;xyz{112;112.1;;8;d2d^2;p -4 2 c;p -4 2c{112:c;112.2;ab;16;d2d^2;c -4 c 2;xyz{113;113.1;;8;d2d^3;p -4 21 m;p -4 2ab{113:c;113.2;ab;16;d2d^3;c -4 m 21;xyz{114;114.1;;8;d2d^4;p -4 21 c;p -4 2n{114:c;114.2;ab;16;d2d^4;c -4 c 21;xyz{115;115.1;;8;d2d^5;p -4 m 2;p -4 -2{115:c;115.2;ab;16;d2d^5;c -4 2 m;xyz{116;116.1;;8;d2d^6;p -4 c 2;p -4 -2c{116:c;116.2;ab;16;d2d^6;c -4 2 c;xyz{117;117.1;;8;d2d^7;p -4 b 2;p -4 -2ab{117:c;117.2;ab;16;d2d^7;c -4 2 g1;xyz{118;118.1;;8;d2d^8;p -4 n 2;p -4 -2n{118:c;118.2;ab;16;d2d^8;c -4 2 g2;xyz{119;119.1;;16;d2d^9;i -4 m 2;i -4 -2{119:f;119.2;ab;32;d2d^9;f -4 2 m;xyz{120;120.1;;16;d2d^10;i -4 c 2;i -4 -2c{120:f;120.2;ab;32;d2d^10;f -4 2 c;xyz{121;121.1;;16;d2d^11;i -4 2 m;i -4 2{121:f;121.2;ab;32;d2d^11;f -4 m 2;xyz{122;122.1;;16;d2d^12;i -4 2 d;i -4 2bw{122:f;122.2;ab;32;d2d^12;f -4 d 2;xyz{123;123.1;;16;d4h^1;p 4/m m m;-p 4 2{123:c;123.2;ab;32;d4h^1;c 4/m m m;xyz{124;124.1;;16;d4h^2;p 4/m c c;-p 4 2c{124:c;124.2;ab;32;d4h^2;c 4/m c c;xyz{125:2;125.1;;16;d4h^3;p 4/n b m :2;-p 4a 2b{125:c2;125.2;ab;32;d4h^3;c 4/e m g1 :2;xyz{125:1;125.3;a,b,c|-1/4,-1/4,0;16;d4h^3;p 4/n b m :1;p 4 2 -1ab{125:c1;125.4;ab|-1/4,-1/4,0;32;d4h^3;c 4/e m g1 :1;xyz{126:2;126.1;;16;d4h^4;p 4/n n c :2;-p 4a 2bc{126:c1;126.2;ab;32;d4h^4;c 4/e c g2 :2;xyz{126:1;126.3;a,b,c|-1/4,-1/4,-1/4;16;d4h^4;p 4/n n c :1;p 4 2 -1n{126:c4;126.4;ab|-1/4,-1/4,-1/4;32;d4h^4;c 4/e c g2 :1;xyz{127;127.1;;16;d4h^5;p 4/m b m;-p 4 2ab{127:c;127.2;ab;32;d4h^5;c 4/m m g1;xyz{128;128.1;;16;d4h^6;p 4/m n c;-p 4 2n{128:c;128.2;ab;32;d4h^6;c 4/m c g2;xyz{129:2;129.1;;16;d4h^7;p 4/n m m :2;-p 4a 2a{129:c2;129.2;ab;32;d4h^7;c 4/e m m :2;xyz{129:1;129.3;a,b,c|-1/4,1/4,0;16;d4h^7;p 4/n m m :1;p 4ab 2ab -1ab{129:c1;129.4;ab|-1/4,1/4,0;32;d4h^7;c 4/e m m :1;xyz{130:2;130.1;;16;d4h^8;p 4/n c c :2;-p 4a 2ac{130:c2;130.2;ab;32;d4h^8;c 4/e c c :2;xyz{130:1;130.3;a,b,c|-1/4,1/4,0;16;d4h^8;p 4/n c c :1;p 4ab 2n -1ab{130:c1;130.4;ab|-1/4,1/4,0;32;d4h^8;c 4/e c c :1;xyz{131;131.1;;16;d4h^9;p 42/m m c;-p 4c 2{131:c;131.2;ab;32;d4h^9;c 42/m c m;xyz{132;132.1;;16;d4h^10;p 42/m c m;-p 4c 2c{132:c;132.2;ab;32;d4h^10;c 42/m m c;xyz{133:2;133.1;;16;d4h^11;p 42/n b c :2;-p 4ac 2b{133:c1;133.2;ab;32;d4h^11;c 42/e c g1 :2;xyz{133:1;133.3;a,b,c|-1/4,1/4,-1/4;16;d4h^11;p 42/n b c :1;p 4n 2c -1n{133:c2;133.4;ab|-1/4,1/4,-1/4;32;d4h^11;c 42/e c g1 :1;xyz{134:2;134.1;;16;d4h^12;p 42/n n m :2;-p 4ac 2bc{134:c2;134.2;ab;32;d4h^12;c 42/e m g2 :2;xyz{134:1;134.3;a,b,c|-1/4,1/4,-1/4;16;d4h^12;p 42/n n m :1;p 4n 2 -1n{134:c1;134.4;ab|-1/4,1/4,-1/4;32;d4h^12;c 42/e m g2 :1;xyz{135;135.1;;16;d4h^13;p 42/m b c;-p 4c 2ab{135:c;135.2;ab;32;d4h^13;c 42/m c g1;xyz{136;136.1;;16;d4h^14;p 42/m n m;-p 4n 2n{136:c;136.2;ab;32;d4h^14;c 42/m m g2;xyz{137:2;137.1;;16;d4h^15;p 42/n m c :2;-p 4ac 2a{137:c1;137.2;ab;32;d4h^15;c 42/e c m :2;xyz{137:1;137.3;a,b,c|-1/4,1/4,-1/4;16;d4h^15;p 42/n m c :1;p 4n 2n -1n{137:c2;137.4;ab|-1/4,1/4,-1/4;32;d4h^15;c 42/e c m :1;xyz{138:2;138.1;;16;d4h^16;p 42/n c m :2;-p 4ac 2ac{138:c2;138.2;ab;32;d4h^16;c 42/e m c :2;xyz{138:1;138.3;a,b,c|-1/4,1/4,-1/4;16;d4h^16;p 42/n c m :1;p 4n 2ab -1n{138:c1;138.4;ab|-1/4,1/4,-1/4;32;d4h^16;c 42/e m c :1;xyz{139;139.1;;32;d4h^17;i 4/m m m;-i 4 2{139:f;139.2;ab;64;d4h^17;f 4/m m m;xyz{140;140.1;;32;d4h^18;i 4/m c m;-i 4 2c{140:f;140.2;ab;64;d4h^18;f 4/m m c;xyz{141:2;141.1;;32;d4h^19;i 41/a m d :2;-i 4bd 2{141:f2;141.2;ab;64;d4h^19;f 41/d d m :2;xyz{141:1;141.3;a,b,c|0,1/4,-1/8;32;d4h^19;i 41/a m d :1;i 4bw 2bw -1bw{141:f1;141.4;ab|0,1/4,-1/8;64;d4h^19;f 41/d d m :1;xyz{142:2;142.1;;32;d4h^20;i 41/a c d :2;-i 4bd 2c{142:f2;142.2;ab;64;d4h^20;f 41/d d c :2;xyz{142:1;142.3;a,b,c|0,1/4,-1/8;32;d4h^20;i 41/a c d :1;i 4bw 2aw -1bw{142:f1;142.4;ab|0,1/4,-1/8;64;d4h^20;f 41/d d c :1;xyz{143;143.1;;3;c3^1;p 3;p 3{144;144.1;;3;c3^2;p 31;p 31{145;145.1;;3;c3^3;p 32;p 32{146:h;146.1;;9;c3^4;r 3 :h;r 3{146:r;146.2;r;3;c3^4;r 3 :r;p 3*{147;147.1;;6;c3i^1;p -3;-p 3{148:h;148.1;;18;c3i^2;r -3 :h;-r 3{148:r;148.2;r;6;c3i^2;r -3 :r;-p 3*{149;149.1;;6;d3^1;p 3 1 2;p 3 2{150;150.1;;6;d3^2;p 3 2 1;p 3 2"{151;151.1;;6;d3^3;p 31 1 2;p 31 2 (0 0 4){152;152.1;;6;d3^4;p 31 2 1;p 31 2"{152:_2;152:a,b,c|0,0,-1/3;a,b,c|0,0,-1/3;6;d3^4;p 31 2 1;p 31 2" (0 0 4){153;153.1;;6;d3^5;p 32 1 2;p 32 2 (0 0 2){154;154.1;;6;d3^6;p 32 2 1;p 32 2"{154:_2;154:a,b,c|0,0,-1/3;a,b,c|0,0,-1/3;6;d3^6;p 32 2 1;p 32 2" (0 0 4){155:h;155.1;;18;d3^7;r 3 2 :h;r 3 2"{155:r;155.2;r;6;d3^7;r 3 2 :r;p 3* 2{156;156.1;;6;c3v^1;p 3 m 1;p 3 -2"{157;157.1;;6;c3v^2;p 3 1 m;p 3 -2{158;158.1;;6;c3v^3;p 3 c 1;p 3 -2"c{159;159.1;;6;c3v^4;p 3 1 c;p 3 -2c{160:h;160.1;;18;c3v^5;r 3 m :h;r 3 -2"{160:r;160.2;r;6;c3v^5;r 3 m :r;p 3* -2{161:h;161.1;;18;c3v^6;r 3 c :h;r 3 -2"c{161:r;161.2;r;6;c3v^6;r 3 c :r;p 3* -2n{162;162.1;;12;d3d^1;p -3 1 m;-p 3 2{163;163.1;;12;d3d^2;p -3 1 c;-p 3 2c{164;164.1;;12;d3d^3;p -3 m 1;-p 3 2"{165;165.1;;12;d3d^4;p -3 c 1;-p 3 2"c{166:h;166.1;;36;d3d^5;r -3 m :h;-r 3 2"{166:r;166.2;r;12;d3d^5;r -3 m :r;-p 3* 2{167:h;167.1;;36;d3d^6;r -3 c :h;-r 3 2"c{167:r;167.2;r;12;d3d^6;r -3 c :r;-p 3* 2n{168;168.1;;6;c6^1;p 6;p 6{169;169.1;;6;c6^2;p 61;p 61{170;170.1;;6;c6^3;p 65;p 65{171;171.1;;6;c6^4;p 62;p 62{172;172.1;;6;c6^5;p 64;p 64{173;173.1;;6;c6^6;p 63;p 6c{174;174.1;;6;c3h^1;p -6;p -6{175;175.1;;12;c6h^1;p 6/m;-p 6{176;176.1;;12;c6h^2;p 63/m;-p 6c{177;177.1;;12;d6^1;p 6 2 2;p 6 2{178;178.1;;12;d6^2;p 61 2 2;p 61 2 (0 0 5){179;179.1;;12;d6^3;p 65 2 2;p 65 2 (0 0 1){180;180.1;;12;d6^4;p 62 2 2;p 62 2 (0 0 4){181;181.1;;12;d6^5;p 64 2 2;p 64 2 (0 0 2){182;182.1;;12;d6^6;p 63 2 2;p 6c 2c{183;183.1;;12;c6v^1;p 6 m m;p 6 -2{184;184.1;;12;c6v^2;p 6 c c;p 6 -2c{185;185.1;;12;c6v^3;p 63 c m;p 6c -2{186;186.1;;12;c6v^4;p 63 m c;p 6c -2c{187;187.1;;12;d3h^1;p -6 m 2;p -6 2{188;188.1;;12;d3h^2;p -6 c 2;p -6c 2{189;189.1;;12;d3h^3;p -6 2 m;p -6 -2{190;190.1;;12;d3h^4;p -6 2 c;p -6c -2c{191;191.1;;24;d6h^1;p 6/m m m;-p 6 2{192;192.1;;24;d6h^2;p 6/m c c;-p 6 2c{193;193.1;;24;d6h^3;p 63/m c m;-p 6c 2{194;194.1;;24;d6h^4;p 63/m m c;-p 6c 2c{195;195.1;;12;t^1;p 2 3;p 2 2 3{196;196.1;;48;t^2;f 2 3;f 2 2 3{197;197.1;;24;t^3;i 2 3;i 2 2 3{198;198.1;;12;t^4;p 21 3;p 2ac 2ab 3{199;199.1;;24;t^5;i 21 3;i 2b 2c 3{200;200.1;;24;th^1;p m -3;-p 2 2 3{201:2;201.1;;24;th^2;p n -3 :2;-p 2ab 2bc 3{201:1;201.2;a,b,c|-1/4,-1/4,-1/4;24;th^2;p n -3 :1;p 2 2 3 -1n{202;202.1;;96;th^3;f m -3;-f 2 2 3{203:2;203.1;;96;th^4;f d -3 :2;-f 2uv 2vw 3{203:1;203.2;a,b,c|-1/8,-1/8,-1/8;96;th^4;f d -3 :1;f 2 2 3 -1d{204;204.1;;48;th^5;i m -3;-i 2 2 3{205;205.1;;24;th^6;p a -3;-p 2ac 2ab 3{206;206.1;;48;th^7;i a -3;-i 2b 2c 3{207;207.1;;24;o^1;p 4 3 2;p 4 2 3{208;208.1;;24;o^2;p 42 3 2;p 4n 2 3{209;209.1;;96;o^3;f 4 3 2;f 4 2 3{210;210.1;;96;o^4;f 41 3 2;f 4d 2 3{211;211.1;;48;o^5;i 4 3 2;i 4 2 3{212;212.1;;24;o^6;p 43 3 2;p 4acd 2ab 3{213;213.1;;24;o^7;p 41 3 2;p 4bd 2ab 3{214;214.1;;48;o^8;i 41 3 2;i 4bd 2c 3{215;215.1;;24;td^1;p -4 3 m;p -4 2 3{216;216.1;;96;td^2;f -4 3 m;f -4 2 3{217;217.1;;48;td^3;i -4 3 m;i -4 2 3{218;218.1;;24;td^4;p -4 3 n;p -4n 2 3{219;219.1;;96;td^5;f -4 3 c;f -4a 2 3{220;220.1;;48;td^6;i -4 3 d;i -4bd 2c 3{221;221.1;;48;oh^1;p m -3 m;-p 4 2 3{222:2;222.1;;48;oh^2;p n -3 n :2;-p 4a 2bc 3{222:1;222.2;a,b,c|-1/4,-1/4,-1/4;48;oh^2;p n -3 n :1;p 4 2 3 -1n{223;223.1;;48;oh^3;p m -3 n;-p 4n 2 3{224:2;224.1;;48;oh^4;p n -3 m :2;-p 4bc 2bc 3{224:1;224.2;a,b,c|-1/4,-1/4,-1/4;48;oh^4;p n -3 m :1;p 4n 2 3 -1n{225;225.1;;192;oh^5;f m -3 m;-f 4 2 3{226;226.1;;192;oh^6;f m -3 c;-f 4a 2 3{227:2;227.1;;192;oh^7;f d -3 m :2;-f 4vw 2vw 3{227:1;227.2;a,b,c|-1/8,-1/8,-1/8;192;oh^7;f d -3 m :1;f 4d 2 3 -1d{228:2;228.1;;192;oh^8;f d -3 c :2;-f 4ud 2vw 3{228:1;228.2;a,b,c|-3/8,-3/8,-3/8;192;oh^8;f d -3 c :1;f 4d 2 3 -1ad{229;229.1;;96;oh^9;i m -3 m;-i 4 2 3{230;230.1;;96;oh^10;i a -3 d;-i 4bd 2c 3'.split("{"));
b.moreSettings=C(-1,"A 1 1 2 :2'{5:-a-c,a,-b{A 1 2 1 :1'{5:c,-b,a{B 1 1 2 :1'{5:a,c,-b{B 2 1 1 :2'{5:-b,-a-c,a{C 1 2 1 :2'{5:a,-b,-a-c{C 2 1 1 :1'{5:-b,a,c{I 1 1 2 :3'{5:c,-a-c,-b{I 1 2 1 :3'{5:-a-c,-b,c{I 2 1 1 :3'{5:-b,c,-a-c{P 1 1 a :3'{7:c,-a-c,-b{P 1 1 b :1'{7:a,c,-b{P 1 1 n :2'{7:-a-c,a,-b{P 1 a 1 :1'{7:c,-b,a{P 1 c 1 :3'{7:-a-c,-b,c{P 1 n 1 :2'{7:a,-b,-a-c{P b 1 1 :3'{7:-b,c,-a-c{P c 1 1 :1'{7:-b,a,c{P n 1 1 :2'{7:-b,-a-c,a{A 1 1 m :2'{8:-a-c,a,-b{A 1 m 1 :1'{8:c,-b,a{B 1 1 m :1'{8:a,c,-b{B m 1 1 :2'{8:-b,-a-c,a{C 1 m 1 :2'{8:a,-b,-a-c{C m 1 1 :1'{8:-b,a,c{I 1 1 m :3'{8:c,-a-c,-b{I 1 m 1 :3'{8:-a-c,-b,c{I m 1 1 :3'{8:-b,c,-a-c{A 1 1 2/m :2'{12:-a-c,a,-b{A 1 2/m 1 :1'{12:c,-b,a{B 1 1 2/m :1'{12:a,c,-b{B 2/m 1 1 :2'{12:-b,-a-c,a{C 1 2/m 1 :2'{12:a,-b,-a-c{C 2/m 1 1 :1'{12:-b,a,c{I 1 1 2/m :3'{12:c,-a-c,-b{I 1 2/m 1 :3'{12:-a-c,-b,c{I 2/m 1 1 :3'{12:-b,c,-a-c{P 1 1 2/a :3'{13:c,-a-c,-b{P 1 1 2/b :1'{13:a,c,-b{P 1 1 2/n :2'{13:-a-c,a,-b{P 1 2/a 1 :1'{13:c,-b,a{P 1 2/c 1 :3'{13:-a-c,-b,c{P 1 2/n 1 :2'{13:a,-b,-a-c{P 2/b 1 1 :3'{13:-b,c,-a-c{P 2/c 1 1 :1'{13:-b,a,c{P 2/n 1 1 :2'{13:-b,-a-c,a{P 1 1 21/a :3'{14:c,-a-c,-b{P 1 1 21/b :1'{14:a,c,-b{P 1 1 21/n :2'{14:-a-c,a,-b{P 1 21/a 1 :1'{14:c,-b,a{P 1 21/c 1 :3'{14:-a-c,-b,c{P 1 21/n 1 :2'{14:a,-b,-a-c{P 21/b 1 1 :3'{14:-b,c,-a-c{P 21/c 1 1 :1'{14:-b,a,c{P 21/n 1 1 :2'{14:-b,-a-c,a{C 4'{75:a+b,-a+b,c{C 41'{76:a+b,-a+b,c{C 42'{77:a+b,-a+b,c{C 43'{78:a+b,-a+b,c{F 4'{79:a+b,-a+b,c{F 41'{80:a+b,-a+b,c{C -4'{81:a+b,-a+b,c{F -4'{82:a+b,-a+b,c{C 4/m'{83:a+b,-a+b,c{C 42/m'{84:a+b,-a+b,c{C 4/e :1'{85:a+b,-a+b,c;-1/4,1/4,0{C 4/e :2'{85:a+b,-a+b,c{C 42/e :1'{86:a+b,-a+b,c;-1/4,-1/4,-1/4{C 42/e :2'{86:a+b,-a+b,c{F 4/m'{87:a+b,-a+b,c{F 41/d :1'{88:a+b,-a+b,c;0,-1/4,-1/8{F 41/d :2'{88:a+b,-a+b,c{C 4 2 2'{89:a+b,-a+b,c{C 4 2 21'{90:a+b,-a+b,c{C 41 2 2'{91:a+b,-a+b,c{C 41 2 21'{92:a+b,-a+b,c{C 42 2 2'{93:a+b,-a+b,c{C 42 2 21'{94:a+b,-a+b,c{C 43 2 2'{95:a+b,-a+b,c{C 43 2 21'{96:a+b,-a+b,c{F 4 2 2'{97:a+b,-a+b,c{F 41 2 2'{98:a+b,-a+b,c{C 4 m m'{99:a+b,-a+b,c{C 4 m g1'{100:a+b,-a+b,c{C 42 m c'{101:a+b,-a+b,c{C 42 m g2'{102:a+b,-a+b,c{C 4 c c'{103:a+b,-a+b,c{C 4 c g2'{104:a+b,-a+b,c{C 42 c m'{105:a+b,-a+b,c{C 42 c g1'{106:a+b,-a+b,c{F 4 m m'{107:a+b,-a+b,c{F 4 m c'{108:a+b,-a+b,c{F 41 d m'{109:a+b,-a+b,c{F 41 d c'{110:a+b,-a+b,c{C -4 m 2'{111:a+b,-a+b,c{C -4 c 2'{112:a+b,-a+b,c{C -4 m 21'{113:a+b,-a+b,c{C -4 c 21'{114:a+b,-a+b,c{C -4 2 m'{115:a+b,-a+b,c{C -4 2 c'{116:a+b,-a+b,c{C -4 2 g1'{117:a+b,-a+b,c{C -4 2 g2'{118:a+b,-a+b,c{F -4 2 m'{119:a+b,-a+b,c{F -4 2 c'{120:a+b,-a+b,c{F -4 m 2'{121:a+b,-a+b,c{F -4 d 2'{122:a+b,-a+b,c{C 4/m m m'{123:a+b,-a+b,c{C 4/m c c'{124:a+b,-a+b,c{C 4/e m g1 :1'{125:a+b,-a+b,c;-1/4,-1/4,0{C 4/e m g1 :2'{125:a+b,-a+b,c{C 4/e c g2 :1'{126:a+b,-a+b,c;-1/4,-1/4,-1/4{C 4/e c g2 :2'{126:a+b,-a+b,c{C 4/m m g1'{127:a+b,-a+b,c{C 4/m c g2'{128:a+b,-a+b,c{C 4/e m m :1'{129:a+b,-a+b,c;-1/4,1/4,0{C 4/e m m :2'{129:a+b,-a+b,c{C 4/e c c :1'{130:a+b,-a+b,c;-1/4,1/4,0{C 4/e c c :2'{130:a+b,-a+b,c{C 42/m c m'{131:a+b,-a+b,c{C 42/m m c'{132:a+b,-a+b,c{C 42/e c g1 :1'{133:a+b,-a+b,c;-1/4,1/4,-1/4{C 42/e c g1 :2'{133:a+b,-a+b,c{C 42/e m g2 :1'{134:a+b,-a+b,c;-1/4,1/4,-1/4{C 42/e m g2 :2'{134:a+b,-a+b,c{C 42/m c g1'{135:a+b,-a+b,c{C 42/m m g2'{136:a+b,-a+b,c{C 42/e c m :1'{137:a+b,-a+b,c;-1/4,1/4,-1/4{C 42/e c m :2'{137:a+b,-a+b,c{C 42/e m c :1'{138:a+b,-a+b,c;-1/4,1/4,-1/4{C 42/e m c :2'{138:a+b,-a+b,c{F 4/m m m'{139:a+b,-a+b,c{F 4/m m c'{140:a+b,-a+b,c{F 41/d d m :1'{141:a+b,-a+b,c;0,1/4,-1/8{F 41/d d m :2'{141:a+b,-a+b,c{F 41/d d c :1'{142:a+b,-a+b,c;0,1/4,-1/8{F 41/d d c :2'{142:a+b,-a+b,c".split("{"));
b.HMtoCleg=null;b.ClegtoHM=null;JS.SpaceGroup.getSpaceGroups()});aa("JS");N(["JU.P3"],"JS.SpaceGroupFinder","java.util.Arrays JU.BS $.Lst $.M4 $.Measure $.PT $.V3 J.api.Interface JS.SpaceGroup $.SymmetryOperation $.UnitCell JU.BSUtil JV.FileManager".split(" "),function(){var b=I(function(){this.atoms=this.cartesians=this.sg=this.uc=this.vwr=null;this.nAtoms=0;this.unitCellParams=this.xyzList=null;this.slop=0;this.asString=this.isSupercell=this.$checkSupercell=this.isUnknown=this.isAssign=this.isCalcOnly=
!1;this.pTemp=this.scaling=this.oabc=this.origin=this.targets=this.bsAtoms=this.bsPoints0=null;this.groupType=this.isg=0;this.isSpecialGroup=!1;this.zero=this.vectorBC=this.vectorBA=null;this.isTransformOnly=this.isQuery=!1;sa("JS.SpaceGroupFinder.SGAtom")||JS.SpaceGroupFinder.$SpaceGroupFinder$SGAtom$();S(this,arguments)},JS,"SpaceGroupFinder",null);pa(b,function(){this.pTemp=new JU.P3});$(b,function(){});d(b,"findSpaceGroup",function(a,c,f,e,b,d,h,k){this.vwr=a;this.xyzList=f;this.unitCellParams=
e;this.origin=b;this.oabc=d;this.uc=h;this.isCalcOnly=0!=(k&16);this.isAssign=0!=(k&2);this.$checkSupercell=0!=(k&8);this.asString=0!=(k&1);f=0!=(k&4);d=this.uc.getPrecision();this.slop=!Float.isNaN(d)?d:null!=e&&26<e.length?e[26]:1E-4;Float.isNaN(this.slop)&&(this.slop=1E-6);this.cartesians=a.ms.at;this.bsPoints0=new JU.BS;if(null==this.xyzList||this.isAssign)this.bsAtoms=JU.BSUtil.copy(c),this.nAtoms=this.bsAtoms.cardinality();this.isQuery=null!=this.xyzList&&0<=this.xyzList.indexOf("&");this.isTransformOnly=
null!=this.xyzList&&this.xyzList.startsWith(".:");this.targets=JU.BS.newN(this.nAtoms);this.scaling=JU.P3.new3(1,1,1);this.isUnknown=!0;a=this.isTransformOnly||null!=this.xyzList&&this.xyzList.toUpperCase().startsWith("ITA/");d=null!=this.xyzList&&!a&&(this.xyzList.startsWith("[")||this.xyzList.startsWith("Hall:"));if(this.isAssign&&d||!d&&(a||(a=this.checkWyckoffHM()))){this.isUnknown=!1;this.xyzList=a?JU.PT.rep(this.isTransformOnly?this.xyzList:this.xyzList.substring(4)," ",""):this.xyzList.startsWith("Hall:")?
this.xyzList.substring(5):JU.PT.replaceAllCharacters(this.xyzList,"[]","");this.sg=this.setITA(d);if(null==this.sg)return null;this.sg.getName()}else if(null!=this.oabc||d){if(a=this.xyzList,null!=a&&(this.sg=JS.SpaceGroup.createSpaceGroupN(a,d)),this.isUnknown=null==this.sg,d&&!this.isUnknown)return this.sg.dumpInfoObj()}else if(!this.isQuery&&JS.SpaceGroup.isXYZList(this.xyzList)&&(this.sg=JS.SpaceGroup.findSpaceGroupFromXYZ(this.xyzList),null!=this.sg))return this.sg.dumpInfoObj();if(f){if(null==
this.sg&&null==(this.sg=JS.SpaceGroup.determineSpaceGroupNA(this.xyzList,e))&&null==(this.sg=JS.SpaceGroup.createSpaceGroupN(this.xyzList,!1)))return null;f=new JU.BS;a=this.sg.asString();null==this.oabc?(this.uc=this.setSpaceGroupAndUnitCell(this.sg,e,null,6==e.length),this.oabc=this.uc.getUnitCellVectors(),null!=b&&this.oabc[0].setT(b)):(this.uc=this.setSpaceGroupAndUnitCell(this.sg,null,this.oabc,!1),this.uc.transformUnitCell(h.saveOrRetrieveTransformMatrix(null)))}else{e=this.findGroupByOperations();
if(!this.isAssign||!R(e,"JS.SpaceGroup"))return e;this.sg=e;a=this.sg.asString();f=JU.BSUtil.copy(this.bsAtoms);for(e=this.targets.nextSetBit(0);0<=e;e=this.targets.nextSetBit(e+1))f.clear(this.atoms[e].index);e=f.cardinality();if(!this.isCalcOnly&&(c=a+(null==c||0==e?"":"\nbasis is "+e+" atom"+(1==e?"":"s")+": "+f),System.out.println("SpaceGroupFinder chose "+c),this.asString))return c}c=this.sg.dumpInfoObj();null!=this.uc&&!this.isCalcOnly&&System.out.println("unitcell is "+this.uc.getUnitCellInfo(!0));
this.isAssign||(e=JU.BS.copy(this.bsPoints0),e.andNot(this.targets),this.dumpBasis(JS.SpaceGroupFinder.bsGroupOps[this.isg],e,this.bsPoints0));c.put("name",a);c.put("basis",f);this.isSupercell&&c.put("supercell",this.scaling);this.oabc[1].scale(1/this.scaling.x);this.oabc[2].scale(1/this.scaling.y);this.oabc[3].scale(1/this.scaling.z);c.put("unitcell",this.oabc);this.isAssign&&c.put("sg",this.sg);return c},"JV.Viewer,JU.BS,~S,~A,JU.T3,~A,J.api.SymmetryInterface,~N");d(b,"checkWyckoffHM",function(){if(null!=
this.xyzList&&0>this.xyzList.indexOf(",")){var a=JS.SpaceGroup.convertWyckoffHMCleg(this.xyzList,null);if(null!=a)return this.xyzList="ITA/"+a,!0}return!1});d(b,"setITA",function(a){var c=null,f=null,e=this.xyzList.lastIndexOf(":"),b=this.xyzList.indexOf(","),b=0<e&&b>e,d=null,h=0<e&&!b,k=null;b&&(k=this.uc.staticCleanTransform(this.xyzList.substring(e+1)),this.xyzList=this.xyzList.substring(0,e),d=this.xyzList+":"+k,k.equals("a,b,c")&&(k=null,b=!1));e=this.xyzList.indexOf(".");if(0<e&&(b||h))this.xyzList=
this.xyzList.substring(0,e),e=-1;var l=this.xyzList;0<JS.SpaceGroup.getExplicitSpecialGroupType(l)&&(l=l.substring(2),this.isSpecialGroup=!0,e-=2);!h&&(!a&&!b&&!(0<e)&&-2147483648!=JU.PT.parseInt(l))&&(this.xyzList+=".1");var j=null,j=this.xyzList,e=null;if(a){if(h=this.uc.getSpaceGroupInfoObj("nameToXYZList","Hall:"+this.xyzList,!1,!1),null==h)return null}else if(c=b?k:j,this.isTransformOnly)this.sg=this.uc.spaceGroup,e=this.sg.itaTransform,h=null;else{this.sg=JS.SpaceGroup.getSpaceGroupFromJmolClegOrITA(this.vwr,
b?d:j);f=this.uc.getSpaceGroupJSON("ITA",j,0);if(null==f||"string"==typeof f)return null;if(h||b){a=f.get("its");if(null==a)return null;for(var f=null,d=0,q=a.size();d<q;d++)if(j=a.get(d),c.equals(j.get(b?"trm":"jmolId"))){f=j;break}if(null==f||!this.isSpecialGroup&&!f.containsKey("jmolId")){if(h)return null;null!=f&&(k=f.get("trm"));b=!0;f=a.get(0)}else b=!1,k=null}else f.get("jmolId");h=f.get("gp")}if(null!=this.sg&&null==k)return this.sg=JS.SpaceGroup.createITASpaceGroup(this.sg.groupType,h,this.sg);
this.sg=JS.SpaceGroup.transformSpaceGroup(this.groupType,null,this.sg,h,b?k:null,b?new JU.M4:null);if(null==this.sg)return null;this.sg.itaNumber.equals("0")&&(null==k?(f.get("trm"),f=f.get("hm"),this.sg.setHMSymbol(f)):(this.isTransformOnly&&(k=this.multiplyTransforms(e,k)),this.sg.setITATableNames(null,l,null,k)),System.out.println("SpaceGroupFinder: new setting: "+this.sg.asString()));return this.sg},"~B");d(b,"multiplyTransforms",function(a,c){var f=JS.SpaceGroupFinder.matFor(a),b=JS.SpaceGroupFinder.matFor(c);
b.mul(f);return JS.SpaceGroupFinder.abcFor(b)},"~S,~S");b.abcFor=d(b,"abcFor",function(a){return JS.SymmetryOperation.getTransformABC(a,!1)},"JU.M4");b.matFor=d(b,"matFor",function(a){var c=new JU.M4;JS.UnitCell.getMatrixAndUnitCell(null,null,a,c);return c},"~S");d(b,"findGroupByOperations",function(){var a=new JU.BS,c=new JU.BS,f=0,b=0;try{this.isUnknown?null==JS.SpaceGroupFinder.bsOpGroups&&JS.SpaceGroupFinder.loadData(this.vwr):c.set(0);if(null!=this.xyzList){if(this.isUnknown){var d=this.getGroupsWithOps();
if(!this.isAssign||null==d)return d;this.sg=d}null==this.oabc&&this.uc.setUnitCellFromParams(this.unitCellParams,!1,this.slop)}var g=this.uc;null==this.oabc?(this.oabc=this.uc.getUnitCellVectors(),this.uc=this.uc.getUnitCellMultiplied(),null!=this.origin&&!this.origin.equals(this.uc.getCartesianOffset())&&(this.oabc[0].setT(this.origin),this.uc.setCartesianOffset(this.origin))):this.uc.getUnitCell(this.oabc,!1,"finder");if(this.isUnknown)this.filterGroups(c,this.uc.getUnitCellParams());else if(0==
this.nAtoms)return this.sg;if(null!=this.bsAtoms){this.atoms=Array(this.bsAtoms.cardinality());System.out.println("bsAtoms = "+this.bsAtoms);for(var h=0,k=this.bsAtoms.nextSetBit(0);0<=k;k=this.bsAtoms.nextSetBit(k+1),h++){var l=this.cartesians[k],j=l.getAtomicAndIsotopeNumber();(this.atoms[h]=ja(JS.SpaceGroupFinder.SGAtom,this,null,j,k,l.getAtomName(),l.getOccupancy100())).setT(this.toFractional(l,this.uc))}}var q=JU.BSUtil.newBitSet2(0,this.nAtoms);this.nAtoms=q.cardinality();g=this.uc;if(0<this.nAtoms){for(k=
q.nextSetBit(0);0<=k;k=q.nextSetBit(k+1))this.uc.unitize(this.atoms[k]);this.removeDuplicates(q);if(this.$checkSupercell&&(this.uc=this.checkSupercell(this.vwr,this.uc,q,1,this.scaling),this.uc=this.checkSupercell(this.vwr,this.uc,q,2,this.scaling),this.uc=this.checkSupercell(this.vwr,this.uc,q,3,this.scaling),this.isSupercell=this.uc!==g))1!=this.scaling.x&&System.out.println("supercell found; a scaled by 1/"+this.scaling.x),1!=this.scaling.y&&System.out.println("supercell found; b scaled by 1/"+
this.scaling.y),1!=this.scaling.z&&System.out.println("supercell found; c scaled by 1/"+this.scaling.z)}f=q.cardinality();this.bsAtoms=new JU.BS;for(var p=Array(f),h=0,k=q.nextSetBit(0);0<=k;k=q.nextSetBit(k+1))l=this.atoms[k],p[h++]=l,this.isSupercell&&(l.setT(this.toFractional(this.cartesians[l.index],this.uc)),this.uc.unitize(l)),this.bsAtoms.set(this.atoms[k].index);this.atoms=p;this.nAtoms=f;q.clearAll();q.setBits(0,this.nAtoms);this.bsPoints0=JU.BS.copy(q);var m=JU.BS.newN(JS.SpaceGroupFinder.OP_COUNT),
s=JU.BS.newN(this.nAtoms);a.setBits(1,null==this.sg?JS.SpaceGroupFinder.OP_COUNT:this.sg.getOperationCount());0==this.nAtoms&&(c.clearBits(1,JS.SpaceGroupFinder.GROUP_COUNT),a.clearAll());var r=JU.BS.newN(JS.SpaceGroupFinder.OP_COUNT),n=JU.BS.newN(JS.SpaceGroupFinder.OP_COUNT);n.set(0);for(var h=!1,d=0,z=a.nextSetBit(1);0<z&&!c.isEmpty();z=a.nextSetBit(z+1)){var u=null==this.sg?JS.SpaceGroupFinder.getOp(z):this.sg.getOperation(z);null==this.sg&&(System.out.println("\n"+ ++d+" Checking operation "+
z+" "+JS.SpaceGroupFinder.opXYZ[z]),System.out.println("bsGroups = "+c),System.out.println("bsOps = "+a),b++);g=!0;q.clearAll();q.or(this.bsPoints0);s.clearAll();for(k=q.nextSetBit(0);0<=k;k=q.nextSetBit(k+1)){q.clear(k);var w=this.findEquiv(z,u,k,q,!0);if(0>w&&null==this.sg){System.out.println("failed op "+z+" for atom "+k+" "+this.atoms[k].name+" "+this.atoms[k]+" looking for "+this.pTemp+"\n"+u);g=!1;break}0<=w&&k!=w&&s.set(w)}if(null==this.sg){var y=JS.SpaceGroupFinder.bsOpGroups[z];a.clear(z);
n.set(z);if(g)1==z&&(h=!0),this.targets.or(s);else{c.andNot(y);m.clearAll();for(k=c.nextSetBit(0);0<=k;k=c.nextSetBit(k+1))m.or(JS.SpaceGroupFinder.bsGroupOps[k]);a.and(m)}}else this.targets.or(s)}if(null==this.sg&&(f=c.cardinality(),0==f&&(c.set(h?1:0),f=1,h&&!this.asString&&(r.clearAll(),r.set(1),n.clearAll(),this.targets.clearAll(),q.or(this.bsPoints0))),this.isg=c.nextSetBit(0),1==f&&0<this.isg)){var B=JS.SpaceGroupFinder.bsGroupOps[this.isg];n.and(B);r.and(B);r.andNot(n);r.or(B);r.clear(0);q.or(this.bsPoints0);
this.checkBasis(r,q)||(System.out.println("failed checkBasis"),this.isg=0)}}catch(x){if(ba(x,Exception))x.printStackTrace(),c.clearAll();else throw x;}if(null==this.sg){System.out.println("checked "+b+" operations; now "+f+" groups="+c+" ops="+a);a=Array(c.cardinality());h=0;for(k=c.nextSetBit(0);0<=k;k=c.nextSetBit(k+1))(a[h++]=JS.SpaceGroupFinder.nameToGroup(JS.SpaceGroupFinder.groupNames[k])).sfIndex=k;java.util.Arrays.sort(a,(sa("JS.SpaceGroupFinder$1")?0:JS.SpaceGroupFinder.$SpaceGroupFinder$1$(),
ja(JS.SpaceGroupFinder$1,this,null)));for(k=a.length;0<=--k&&!this.checkUnitCell(a[k]);)System.out.println("SpaceGroupFinder unit cell check failed for "+JS.SpaceGroupFinder.nameToGroup(JS.SpaceGroupFinder.groupNames[k])),f--,c.clear(a[k].sfIndex);System.out.println("SpaceGroupFinder found "+c.cardinality()+" possible groups");this.isg=c.length()-1;if(0>this.isg)return null;this.sg=JS.SpaceGroupFinder.nameToGroup(JS.SpaceGroupFinder.groupNames[this.isg])}return this.sg});d(b,"checkUnitCell",function(a){if(3>
a.itaNo||16<=a.itaNo)return!0;null==this.zero&&(this.vectorBA=new JU.V3,this.vectorBC=new JU.V3,this.zero=new JU.P3);a=a.getClegId();a=a.substring(a.indexOf(":")+1);var c=this.uc.staticConvertOperation("!"+a,null,null);a=JU.P3.new3(1,0,0);var f=JU.P3.new3(0,1,0),b=JU.P3.new3(0,0,1);c.rotTrans(a);c.rotTrans(f);c.rotTrans(b);this.uc.toCartesian(a,!0);this.uc.toCartesian(f,!0);this.uc.toCartesian(b,!0);c=JU.Measure.computeAngle(a,this.zero,f,this.vectorBA,this.vectorBC,!0);a=JU.Measure.computeAngle(a,
this.zero,f,this.vectorBA,this.vectorBC,!0);return this.approx0(c-90)&&this.approx0(a-90)},"JS.SpaceGroup");b.nameToGroup=d(b,"nameToGroup",function(a){var c="0"!=a.charAt(0)?0:"0"!=a.charAt(1)?1:2;return JS.SpaceGroup.nameToGroup.get(a.substring(c))},"~S");d(b,"setSpaceGroupAndUnitCell",function(a,c,f,b){var d=J.api.Interface.getSymmetry(this.vwr,"sgf");d.setSpaceGroupTo(a);null==f?(f=F(6,0),a.createCompatibleUnitCell(c,f,b)||(f=c),d.setUnitCellFromParams(f,!1,NaN)):d.getUnitCell(f,!1,"modelkit");
return d},"JS.SpaceGroup,~A,~A,~B");d(b,"removeDuplicates",function(a){for(var c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))for(var f=this.atoms[c],b=a.nextSetBit(0);b<c;b=a.nextSetBit(b+1)){var d=this.atoms[b];if(f.typeAndOcc==d.typeAndOcc&&1.96E-6>f.distanceSquared(d)){a.clear(c);break}}},"JU.BS");d(b,"dumpBasis",function(){},"JU.BS,JU.BS,JU.BS");d(b,"checkBasis",function(a,c){var f=a.cardinality();if(0==f)return!0;var b=new JU.BS;b.or(c);System.out.println("finishing check for basis for "+f+" operations");
for(f=a.nextSetBit(0);0<=f;f=a.nextSetBit(f+1)){var d=JS.SpaceGroupFinder.getOp(f);b.or(c);for(var g=b.nextSetBit(0);0<=g;g=b.nextSetBit(g+1))if(0>this.findEquiv(-1,d,g,b,!1))return!1}return!0},"JU.BS,JU.BS");d(b,"filterGroups",function(a,c){var f=!1,b=!1,d=!1,g=!1,h=!1,k=this.approx001(c[0]-c[1]),l=this.approx001(c[1]-c[2]);90==c[3]?90==c[4]&&(k&&c[0]!=c[1]&&System.out.println("OHOH - very close a,b distance"),d=k&&this.approx001(c[5]-120),90==c[5]&&(h=k&&c[1]==c[2],b=!h&&k,f=!h&&!b)):k&&(l&&this.approx001(c[3]-
c[4])&&this.approx001(c[4]-c[5]))&&(g=!0);a.setBits(0,2);for(l=k=2;;){l=JS.SpaceGroupFinder.scanTo(l,"16");if(!f&&!b&&!d&&!g&&!h)break;l=JS.SpaceGroupFinder.scanTo(l,"75");if(!b&&!d&&!g&&!h)break;l=JS.SpaceGroupFinder.scanTo(l,"143");if(!d&&!g&&!h)break;for(k=l;;l++){f=JS.SpaceGroupFinder.groupNames[l];if(0<=f.indexOf(":r")){if(!g)continue;a.set(l)}if(f.startsWith("195")){if(g)return;break}}if(!h)break;a.setBits(2,k);k=l;l=JS.SpaceGroupFinder.GROUP_COUNT;break}a.setBits(k,l)},"JU.BS,~A");d(b,"approx001",
function(a){return 0.001>Math.abs(a)},"~N");b.scanTo=d(b,"scanTo",function(a,c){c="000"+c;for(c=c.substring(c.length-3);!JS.SpaceGroupFinder.groupNames[a].startsWith(c);a++);return a},"~N,~S");d(b,"getGroupsWithOps",function(){var a=new JU.BS;null==this.unitCellParams?a.setBits(0,JS.SpaceGroupFinder.GROUP_COUNT):this.filterGroups(a,this.unitCellParams);var c=null;if(!JS.SpaceGroup.isXYZList(this.xyzList)){c=JS.SpaceGroup.determineSpaceGroupNA(this.xyzList,this.unitCellParams);if(null==c)return null;
c.checkHallOperators();for(var f="00"+c.jmolId,b=f.indexOf(":"),f=f.substring((0>b?f.length:b)-3),b=0;b<JS.SpaceGroupFinder.GROUP_COUNT;b++)if(JS.SpaceGroupFinder.groupNames[b].equals(f)){if(!a.get(b))break;if(null!=this.unitCellParams&&(this.uc.setUnitCellFromParams(this.unitCellParams,!1,this.slop),!this.checkUnitCell(c)))break;return c}return null}for(var c=!this.isQuery||this.isAssign,f=JU.PT.split(JU.PT.trim(this.xyzList.trim().$replace("&",";"),";="),";"),d=f.length;0<=--d;){var g=f[d];if(null==
g)return"?"+f[d]+"?";g=JS.SymmetryOperation.getJmolCanonicalXYZ(g);for(b=JS.SpaceGroupFinder.opXYZ.length;0<=--b;){if(JS.SpaceGroupFinder.opXYZ[b].equals(g)){a.and(JS.SpaceGroupFinder.bsOpGroups[b]);break}0==b&&a.clearAll()}}if(a.isEmpty())return this.isAssign?JS.SpaceGroup.createSpaceGroupN(this.xyzList,!0):null;if(c){c=f.length;for(b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1))if(JS.SpaceGroupFinder.bsGroupOps[b].cardinality()==c)return this.sg=JS.SpaceGroupFinder.nameToGroup(JS.SpaceGroupFinder.groupNames[b]),
this.uc.setUnitCellFromParams(this.unitCellParams,!1,this.slop),!this.checkUnitCell(this.sg)&&this.isAssign?JS.SpaceGroup.createSpaceGroupN(JS.SpaceGroupFinder.groupNames[b],!0):JS.SpaceGroup.getInfo(null,JS.SpaceGroupFinder.groupNames[b],this.unitCellParams,!0,!1);return null}c=new JU.Lst;this.uc.setUnitCellFromParams(this.unitCellParams,!1,this.slop);for(b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1))f=JS.SpaceGroupFinder.nameToGroup(JS.SpaceGroupFinder.groupNames[b]),this.checkUnitCell(f)&&c.addLast(f.getClegId());
return c});d(b,"toFractional",function(a,c){this.pTemp.setT(a);c.toFractional(this.pTemp,!1);return this.pTemp},"JM.Atom,J.api.SymmetryInterface");b.getOp=d(b,"getOp",function(a){var c=JS.SpaceGroupFinder.ops[a];null==c&&(JS.SpaceGroupFinder.ops[a]=c=new JS.SymmetryOperation(null,a,!1),c.setMatrixFromXYZ(JS.SpaceGroupFinder.opXYZ[a],0,!1),c.doFinalize());return c},"~N");d(b,"checkSupercell",function(a,c,f,b,d){if(f.isEmpty())return c;for(var g=2147483647,h=-2147483648,k=O(101,0),l=f.cardinality(),
j=f.nextSetBit(0);0<=j;j=f.nextSetBit(j+1))for(var q=this.atoms[j],p=q.typeAndOcc,m,s,r=f.nextSetBit(0);0<=r;r=f.nextSetBit(r+1))if(!(r==j||(m=this.atoms[r]).typeAndOcc!=p)){this.pTemp.sub2(m,q);switch(b){case 1:if(this.approx0(s=this.pTemp.x)||!this.approx0(this.pTemp.y)||!this.approx0(this.pTemp.z))continue;break;case 2:if(this.approx0(s=this.pTemp.y)||!this.approx0(this.pTemp.x)||!this.approx0(this.pTemp.z))continue;break;default:case 3:if(this.approx0(s=this.pTemp.z)||!this.approx0(this.pTemp.x)||
!this.approx0(this.pTemp.y))continue}var n=this.approxInt(1/s);0==n||(E(l/n)!=1*l/n||100<n)||(n>h&&(h=n),n<g&&(g=n),k[n]++)}for(n=h;n>=g&&!(0<k[n]&&k[n]==E((n-1)*l/n));)--n;if(n<g)return c;g=c.getUnitCellVectors();g[b].scale(1/n);switch(b){case 1:d.x=n;break;case 2:d.y=n;break;case 3:d.z=n}(c=J.api.Interface.getSymmetry(a,"sgf")).getUnitCell(g,!1,"scaled");s=0;for(j=f.nextSetBit(0);0<=j;j=f.nextSetBit(j+1)){switch(b){case 1:s=this.approxInt(n*this.atoms[j].x);break;case 2:s=this.approxInt(n*this.atoms[j].y);
break;case 3:s=this.approxInt(n*this.atoms[j].z)}0!=s&&(this.atoms[j]=null,f.clear(j))}f.cardinality();return c},"JV.Viewer,JS.Symmetry,JU.BS,~N,JU.P3");d(b,"approx0",function(a){return Math.abs(a)<this.slop},"~N");d(b,"approxInt",function(a){var c=y(a+this.slop);return this.approx0(a-c)?c:0},"~N");d(b,"findEquiv",function(a,c,f,b,d){a=this.atoms[f];this.pTemp.setT(a);c.rotTrans(this.pTemp);this.uc.unitize(this.pTemp);if(0==this.pTemp.distanceSquared(a))return f;c=a.typeAndOcc;for(a=this.nAtoms;0<=
--a;){var g=this.atoms[a];if(g.typeAndOcc==c){var h=g.distance(this.pTemp);if(1.96E-6>h*h||1.96E-6>(1-h)*(1-h)&&this.latticeShift(this.pTemp,g))return d&&(a=Math.max(f,a),f!=a&&b.clear(a)),a}}return-1},"~N,JS.SymmetryOperation,~N,JU.BS,~B");d(b,"latticeShift",function(a,c){return this.approx0(Math.abs(a.x-c.x)-1)||this.approx0(Math.abs(a.y-c.y)-1)||this.approx0(Math.abs(a.z-c.z)-1)},"JU.P3,JU.P3");b.main=d(b,"main",function(){JS.SpaceGroupFinder.loadData(null)&&System.out.println("OK")},"~A");b.loadData=
d(b,"loadData",function(a){try{JS.SpaceGroupFinder.groupNames=JS.SpaceGroupFinder.getList(a,null,"sggroups_ordered.txt");JS.SpaceGroupFinder.GROUP_COUNT=JS.SpaceGroupFinder.groupNames.length;JS.SpaceGroupFinder.opXYZ=JS.SpaceGroupFinder.getList(a,null,"sgops_ordered.txt");JS.SpaceGroupFinder.OP_COUNT=JS.SpaceGroupFinder.opXYZ.length;var c=JS.SpaceGroupFinder.getList(a,Array(JS.SpaceGroupFinder.OP_COUNT),"sgmap.txt");JS.SpaceGroupFinder.bsGroupOps=Array(JS.SpaceGroupFinder.GROUP_COUNT);JS.SpaceGroupFinder.bsOpGroups=
Array(JS.SpaceGroupFinder.OP_COUNT);for(a=0;a<JS.SpaceGroupFinder.GROUP_COUNT;a++)JS.SpaceGroupFinder.bsGroupOps[a]=JU.BS.newN(JS.SpaceGroupFinder.OP_COUNT);for(var f=0;f<JS.SpaceGroupFinder.OP_COUNT;f++){var b=c[f],d=b.length;JS.SpaceGroupFinder.bsOpGroups[f]=JU.BS.newN(JS.SpaceGroupFinder.GROUP_COUNT);for(a=0;a<d;a++)"1"==b.charAt(a)&&(JS.SpaceGroupFinder.bsGroupOps[a].set(f),JS.SpaceGroupFinder.bsOpGroups[f].set(a))}JS.SpaceGroupFinder.ops=Array(JS.SpaceGroupFinder.OP_COUNT);return!0}catch(g){if(ba(g,
Exception))return g.printStackTrace(),!1;throw g;}finally{if(null!=JS.SpaceGroupFinder.rdr)try{JS.SpaceGroupFinder.rdr.close()}catch(h){if(!ba(h,"java.io.IOException"))throw h;}}},"JV.Viewer");b.getList=d(b,"getList",function(a,c,b){JS.SpaceGroupFinder.rdr=JV.FileManager.getBufferedReaderForResource(a,JS.SpaceGroupFinder,"JS/","sg/"+b);if(null==c){for(c=new JU.Lst;null!=(a=JS.SpaceGroupFinder.rdr.readLine());)0<a.length&&c.addLast(a);c.toArray(c=Array(c.size()))}else for(a=0;a<c.length;a++)c[a]=JS.SpaceGroupFinder.rdr.readLine();
JS.SpaceGroupFinder.rdr.close();return c},"JV.Viewer,~A,~S");b.$SpaceGroupFinder$SGAtom$=function(){var a=I(function(){Fa(this,arguments);this.index=this.typeAndOcc=0;this.name=null;S(this,arguments)},JS.SpaceGroupFinder,"SGAtom",JU.P3);$(a,function(a,b,e,d){Ma(this,JS.SpaceGroupFinder.SGAtom,[]);this.typeAndOcc=a+1E3*d;this.index=b;this.name=e},"~N,~N,~S,~N")};b.$SpaceGroupFinder$1$=function(){var a=qb(JS,"SpaceGroupFinder$1",null,java.util.Comparator);m(a,"compare",function(a,b){return a.itaNo!=
b.itaNo?a.itaNo-b.itaNo:b.setNo-a.setNo},"JS.SpaceGroup,JS.SpaceGroup")};b.GROUP_COUNT=0;b.OP_COUNT=0;b.bsOpGroups=null;b.bsGroupOps=null;b.groupNames=null;b.opXYZ=null;b.ops=null;b.rdr=null});aa("JS");N(["JU.M4"],"JS.HallInfo",["JU.P3i","$.SB","JS.SymmetryOperation","JU.Logger"],function(){var b=I(function(){this.primitiveHallSymbol=this.hallSymbol=null;this.latticeCode="\x00";this.latticeExtension=null;this.$isCentrosymmetric=!1;this.rotationTerms=null;this.nRotations=0;this.vectorCode=this.vector12ths=
null;S(this,arguments)},JS,"HallInfo",null);pa(b,function(){this.rotationTerms=Array(16)});$(b,function(a){this.init(a)},"~S");d(b,"getRotationCount",function(){return this.nRotations});d(b,"isGenerated",function(){return 0<this.nRotations});d(b,"getLatticeCode",function(){return this.latticeCode});d(b,"isCentrosymmetric",function(){return this.$isCentrosymmetric});d(b,"getHallSymbol",function(){return this.hallSymbol});d(b,"init",function(a){try{var c=this.hallSymbol=a.trim(),c=this.extractLatticeInfo(c);
if(0!=JS.HallInfo.HallTranslation.getLatticeIndex(this.latticeCode)){this.latticeExtension=JS.HallInfo.HallTranslation.getLatticeExtension(this.latticeCode,this.$isCentrosymmetric);c=this.extractVectorInfo(c)+this.latticeExtension;JU.Logger.debugging&&JU.Logger.debug("Hallinfo: "+a+" "+c);a=0;var b="\x00";for(this.primitiveHallSymbol="P";0<c.length&&16>this.nRotations;){var c=this.extractRotationInfo(c,a,b),e=this.rotationTerms[this.nRotations-1];a=e.order;b=e.axisType;this.primitiveHallSymbol+=" "+
e.primitiveCode}this.primitiveHallSymbol+=this.vectorCode}}catch(d){if(ba(d,Exception))JU.Logger.error("Invalid Hall symbol "+d),this.nRotations=0;else throw d;}},"~S");d(b,"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 c=0;c<this.nRotations;c++)a.append("\n\nrotation term ").appendI(c+1).append(this.rotationTerms[c].dumpInfo(this.vectorCode));
return a.toString()});d(b,"getLatticeDesignation",function(){return JS.HallInfo.HallTranslation.getLatticeDesignation2(this.latticeCode,this.$isCentrosymmetric)});d(b,"extractLatticeInfo",function(a){var c=a.indexOf(" ");if(0>c)return"";var b=a.substring(0,c).toUpperCase();this.latticeCode=b.charAt(0);"-"==this.latticeCode&&(this.$isCentrosymmetric=!0,this.latticeCode=b.charAt(1));return a.substring(c+1).trim()},"~S");d(b,"extractVectorInfo",function(a){this.vector12ths=new JU.P3i;this.vectorCode=
"";var c=a.indexOf("("),b=a.indexOf(")",c);0<c&&b>c&&(b=a.substring(c+1,b),this.vectorCode=" ("+b+")",a=a.substring(0,c).trim(),c=b.indexOf(" "),0<=c&&(this.vector12ths.x=Integer.parseInt(b.substring(0,c)),b=b.substring(c+1).trim(),c=b.indexOf(" "),0<=c&&(this.vector12ths.y=Integer.parseInt(b.substring(0,c)),b=b.substring(c+1).trim())),this.vector12ths.z=Integer.parseInt(b));return a},"~S");d(b,"extractRotationInfo",function(a,c,b){var e=a.indexOf(" "),d;0<=e?(d=a.substring(0,e),a=a.substring(e+1).trim()):
(d=a,a="");this.rotationTerms[this.nRotations]=new JS.HallInfo.HallRotationTerm(this,d,c,b);this.nRotations++;return a},"~S,~N,~S");m(b,"toString",function(){return this.hallSymbol});d(b,"generateAllOperators",function(a){for(var c=new JU.M4,b=new JU.M4,e=Array(7),d=0;7>d;d++)e[d]=new JU.M4;for(var g=a.getMatrixOperationCount(),d=0;d<this.nRotations;d++){var h=this.rotationTerms[d];c.setM4(h.seitzMatrix12ths);h=h.order;e[0].setIdentity();for(var k=1;k<=h;k++){var l=e[k];l.mul2(c,e[0]);e[0].setM4(l);
for(var j=0,q=0;q<g;q++)b.mul2(l,a.getMatrixOperation(q)),b.m03=(y(b.m03)+12)%12,b.m13=(y(b.m13)+12)%12,b.m23=(y(b.m23)+12)%12,a.addHallOperationCheckDuplicates(b)&&j++;g+=j}}},"JS.HallInfo.HallReceiver");b.getHallLatticeEquivalent=d(b,"getHallLatticeEquivalent",function(a){var c=JS.HallInfo.HallTranslation.getLatticeCode(a);return(0<a?"-":"")+c+" 1"},"~N");b.getLatticeDesignation=d(b,"getLatticeDesignation",function(a){return JS.HallInfo.HallTranslation.getLatticeDesignation(a)},"~N");b.getLatticeIndex=
d(b,"getLatticeIndex",function(a){return JS.HallInfo.HallTranslation.getLatticeIndex(a)},"~S");b.getLatticeIndexFromCode=d(b,"getLatticeIndexFromCode",function(a){return JS.HallInfo.getLatticeIndex(JS.HallInfo.HallTranslation.getLatticeCode(a))},"~N");cb(JS.HallInfo,"HallReceiver");b=I(function(){this.seitzMatrixInv=this.seitzMatrix=this.rotCode=null;S(this,arguments)},JS.HallInfo,"HallRotation",null);pa(b,function(){this.seitzMatrix=new JU.M4;this.seitzMatrixInv=new JU.M4});$(b,function(a,c){this.rotCode=
a;var b=F(16,0),e=F(16,0);b[15]=e[15]=1;for(var d=0,g=0;11>g;d++){var h=0;switch(c.charAt(d).charCodeAt(0)){case 32:g++;continue;case 43:case 49:h=1;break;case 45:h=-1}b[g]=h;e[g]=-h;g++}this.seitzMatrix.setA(b);this.seitzMatrixInv.setA(e)},"~S,~S");b.lookup=d(b,"lookup",function(a){for(var c=JS.HallInfo.HallRotation.getHallTerms().length;0<=--c;)if(JS.HallInfo.HallRotation.hallRotationTerms[c].rotCode.equals(a))return JS.HallInfo.HallRotation.hallRotationTerms[c];return null},"~S");b.getHallTerms=
d(b,"getHallTerms",function(){return null==JS.HallInfo.HallRotation.hallRotationTerms?JS.HallInfo.HallRotation.hallRotationTerms=C(-1,[new JS.HallInfo.HallRotation("1_","+00 0+0 00+"),new JS.HallInfo.HallRotation("2x","+00 0-0 00-"),new JS.HallInfo.HallRotation("2y","-00 0+0 00-"),new JS.HallInfo.HallRotation("2z","-00 0-0 00+"),new JS.HallInfo.HallRotation("2'","0-0 -00 00-"),new JS.HallInfo.HallRotation('2"',"0+0 +00 00-"),new JS.HallInfo.HallRotation("2x'","-00 00- 0-0"),new JS.HallInfo.HallRotation('2x"',
"-00 00+ 0+0"),new JS.HallInfo.HallRotation("2y'","00- 0-0 -00"),new JS.HallInfo.HallRotation('2y"',"00+ 0-0 +00"),new JS.HallInfo.HallRotation("2z'","0-0 -00 00-"),new JS.HallInfo.HallRotation('2z"',"0+0 +00 00-"),new JS.HallInfo.HallRotation("3x","+00 00- 0+-"),new JS.HallInfo.HallRotation("3y","-0+ 0+0 -00"),new JS.HallInfo.HallRotation("3z","0-0 +-0 00+"),new JS.HallInfo.HallRotation("3*","00+ +00 0+0"),new JS.HallInfo.HallRotation("4x","+00 00- 0+0"),new JS.HallInfo.HallRotation("4y","00+ 0+0 -00"),
new JS.HallInfo.HallRotation("4z","0-0 +00 00+"),new JS.HallInfo.HallRotation("6x","+00 0+- 0+0"),new JS.HallInfo.HallRotation("6y","00+ 0+0 -0+"),new JS.HallInfo.HallRotation("6z","+-0 +00 00+")]):JS.HallInfo.HallRotation.hallRotationTerms});b.hallRotationTerms=null;b=I(function(){this.translationCode="\x00";this.rotationShift12ths=this.rotationOrder=0;this.vectorShift12ths=null;S(this,arguments)},JS.HallInfo,"HallTranslation",null);$(b,function(a,c){this.translationCode=a;if(null!=c){if(0<=c.z){this.vectorShift12ths=
c;return}this.rotationOrder=c.x;this.rotationShift12ths=c.y}this.vectorShift12ths=new JU.P3i},"~S,JU.P3i");b.getLatticeIndex=d(b,"getLatticeIndex",function(a){for(var c=1,b=3;c<=JS.HallInfo.HallTranslation.nLatticeTypes;c++,b+=3)if(JS.HallInfo.HallTranslation.latticeTranslationData[b].charAt(0)==a)return c;return 0},"~S");b.getLatticeCode=d(b,"getLatticeCode",function(a){0>a&&(a=-a);return 0==a?"\x00":a>JS.HallInfo.HallTranslation.nLatticeTypes?JS.HallInfo.HallTranslation.getLatticeCode(JS.HallInfo.HallTranslation.getLatticeIndex(String.fromCharCode(a))):
JS.HallInfo.HallTranslation.latticeTranslationData[3*a].charAt(0)},"~N");b.getLatticeDesignation=d(b,"getLatticeDesignation",function(a){var c=0<a;0>a&&(a=-a);return 0==a||a>JS.HallInfo.HallTranslation.nLatticeTypes?"":(c?"-":"")+JS.HallInfo.HallTranslation.getLatticeCode(a)+": "+(c?"centrosymmetric ":"")+JS.HallInfo.HallTranslation.latticeTranslationData[3*a+1]},"~N");b.getLatticeDesignation2=d(b,"getLatticeDesignation2",function(a,c){var b=JS.HallInfo.HallTranslation.getLatticeIndex(a);c||(b=-b);
return JS.HallInfo.HallTranslation.getLatticeDesignation(b)},"~S,~B");b.getLatticeExtension=d(b,"getLatticeExtension",function(a,c){for(var b=1,e=3;b<=JS.HallInfo.HallTranslation.nLatticeTypes;b++,e+=3)if(JS.HallInfo.HallTranslation.latticeTranslationData[e].charAt(0)==a)return JS.HallInfo.HallTranslation.latticeTranslationData[e+2]+(c?" -1":"");return""},"~S,~B");b.getHallTerms=d(b,"getHallTerms",function(){return null==JS.HallInfo.HallTranslation.hallTranslationTerms?JS.HallInfo.HallTranslation.hallTranslationTerms=
C(-1,[new JS.HallInfo.HallTranslation("a",JU.P3i.new3(6,0,0)),new JS.HallInfo.HallTranslation("b",JU.P3i.new3(0,6,0)),new JS.HallInfo.HallTranslation("c",JU.P3i.new3(0,0,6)),new JS.HallInfo.HallTranslation("n",JU.P3i.new3(6,6,6)),new JS.HallInfo.HallTranslation("u",JU.P3i.new3(3,0,0)),new JS.HallInfo.HallTranslation("v",JU.P3i.new3(0,3,0)),new JS.HallInfo.HallTranslation("w",JU.P3i.new3(0,0,3)),new JS.HallInfo.HallTranslation("d",JU.P3i.new3(3,3,3)),new JS.HallInfo.HallTranslation("1",JU.P3i.new3(2,
6,-1)),new JS.HallInfo.HallTranslation("1",JU.P3i.new3(3,4,-1)),new JS.HallInfo.HallTranslation("2",JU.P3i.new3(3,8,-1)),new JS.HallInfo.HallTranslation("1",JU.P3i.new3(4,3,-1)),new JS.HallInfo.HallTranslation("3",JU.P3i.new3(4,9,-1)),new JS.HallInfo.HallTranslation("1",JU.P3i.new3(6,2,-1)),new JS.HallInfo.HallTranslation("2",JU.P3i.new3(6,4,-1)),new JS.HallInfo.HallTranslation("4",JU.P3i.new3(6,8,-1)),new JS.HallInfo.HallTranslation("5",JU.P3i.new3(6,10,-1)),new JS.HallInfo.HallTranslation("r",JU.P3i.new3(4,
8,8)),new JS.HallInfo.HallTranslation("s",JU.P3i.new3(8,8,4)),new JS.HallInfo.HallTranslation("t",JU.P3i.new3(8,4,8))]):JS.HallInfo.HallTranslation.hallTranslationTerms});b.getHallTranslation=d(b,"getHallTranslation",function(a,c){for(var b=null,e=JS.HallInfo.HallTranslation.getHallTerms().length;0<=--e;){var d=JS.HallInfo.HallTranslation.hallTranslationTerms[e];if(d.translationCode==a&&(0==d.rotationOrder||d.rotationOrder==c)){b=new JS.HallInfo.HallTranslation(a,null);b.translationCode=a;b.rotationShift12ths=
d.rotationShift12ths;b.vectorShift12ths=d.vectorShift12ths;break}}return b},"~S,~N");b.latticeTranslationData=C(-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(";"));b.nLatticeTypes=E(JS.HallInfo.HallTranslation.latticeTranslationData.length/3)-1;b.hallTranslationTerms=null;b=I(function(){this.seitzMatrix12ths=this.primitiveCode=null;
this.order=0;this.axisType="\x00";this.translation=this.rotation=this.translationString=this.lookupCode=this.inputCode=null;this.isImproper=!1;this.diagonalReferenceAxis="\x00";this.allPositive=!0;S(this,arguments)},JS.HallInfo,"HallRotationTerm",null);pa(b,function(){this.seitzMatrix12ths=new JU.M4});$(b,function(a,c,b,e){this.inputCode=c;c+="   ";"-"==c.charAt(0)&&(this.isImproper=!0,c=c.substring(1));this.primitiveCode="";this.order=c.charAt(0).charCodeAt(0)-48;this.axisType=this.diagonalReferenceAxis=
"\x00";var d=2,g;switch((g=c.charAt(1)).charCodeAt(0)){case 120:case 121:case 122:switch(c.charAt(2).charCodeAt(0)){case 39:case 34:this.diagonalReferenceAxis=g,g=c.charAt(2),d++}case 42:this.axisType=g;break;case 39:case 34:this.axisType=g;switch(c.charAt(2).charCodeAt(0)){case 120:case 121:case 122:this.diagonalReferenceAxis=c.charAt(2);d++;break;default:this.diagonalReferenceAxis=e}break;default:this.axisType=1==this.order?"_":0==a.nRotations?"z":2==a.nRotations?"*":2==b||4==b?"x":"'",c=c.substring(0,
1)+this.axisType+c.substring(1)}this.primitiveCode+="_"==this.axisType?"1":c.substring(0,2);"\x00"!=this.diagonalReferenceAxis&&(c=c.substring(0,1)+this.diagonalReferenceAxis+this.axisType+c.substring(d),this.primitiveCode+=this.diagonalReferenceAxis,d=3);this.lookupCode=c.substring(0,d);this.rotation=JS.HallInfo.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.HallInfo.HallTranslation("\x00",
null);this.translationString="";for(b=c.length;d<b;d++)e=c.charAt(d),e=JS.HallInfo.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.charCodeAt(0)){case 120:this.seitzMatrix12ths.m03+=this.translation.rotationShift12ths;break;case 121:this.seitzMatrix12ths.m13+=this.translation.rotationShift12ths;break;case 122:this.seitzMatrix12ths.m23+=this.translation.rotationShift12ths}0<a.vectorCode.length&&(d=JU.M4.newM4(null),b=JU.M4.newM4(null),a=a.vector12ths,
d.m03=a.x,d.m13=a.y,d.m23=a.z,b.m03=-a.x,b.m13=-a.y,b.m23=-a.z,this.seitzMatrix12ths.mul2(d,this.seitzMatrix12ths),this.seitzMatrix12ths.mul(b));JU.Logger.debugging&&JU.Logger.debug("code = "+c+"; primitive code ="+this.primitiveCode+"\n Seitz Matrix(12ths):"+this.seitzMatrix12ths)}},"JS.HallInfo,~S,~N,~S");d(b,"dumpInfo",function(a){var c=new JU.SB;c.append("\ninput code: ").append(this.inputCode).append("; primitive code: ").append(this.primitiveCode).append("\norder: ").appendI(this.order).append(this.isImproper?
" (improper axis)":"");"_"!=this.axisType&&(c.append("; axisType: ").appendC(this.axisType),"\x00"!=this.diagonalReferenceAxis&&c.appendC(this.diagonalReferenceAxis));0<this.translationString.length&&c.append("; translation: ").append(this.translationString);0<a.length&&c.append("; vector offset: ").append(a);null!=this.rotation&&c.append("\noperator: ").append(this.getXYZ(this.allPositive)).append("\nSeitz matrix:\n").append(JS.SymmetryOperation.dumpSeitz(this.seitzMatrix12ths,!1));return c.toString()},
"~S");d(b,"getXYZ",function(a){return JS.SymmetryOperation.getXYZFromMatrix(this.seitzMatrix12ths,!0,a,!0)},"~B")});aa("JS");N(["JU.M4","$.P3"],"JS.SymmetryOperation","java.util.Hashtable JU.Lst $.M3 $.Matrix $.Measure $.P4 $.PT $.SB $.V3 JU.BoxInfo $.Logger $.Parser".split(" "),function(){var b=I(function(){this.xyz=this.xyzCanonical=this.xyzOriginal=null;this.doNormalize=!0;this.isFinalized=!1;this.opId=0;this.info=this.centering=null;this.opType=-1;this.opOrder=0;this.suvwId=this.suvw=this.spinU=
this.opIsCCW=this.opPlane=this.opAxis=this.opPoint2=this.opPoint=this.opGlide=this.opTrans=null;this.spinIndex=-1;this.opPerDim=0;this.isIrrelevant=!1;this.iCoincident=0;this.myLabels=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=2147483647;this.divisor=12;this.opAxisCode=this.opX=null;this.isPointGroupOp=this.opIsLong=!1;S(this,arguments)},JS,"SymmetryOperation",
JU.M4);$(b,function(a,c,b){Ma(this,JS.SymmetryOperation,[]);this.doNormalize=b;null==a?this.opId=c:(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.spinU=a.spinU,this.spinIndex=a.spinIndex,this.suvw=a.suvw,this.setMatrix(!1),this.doFinalize())},"JS.SymmetryOperation,~N,~B");
d(b,"getOpDesc",function(){-1==this.opType&&this.setOpTypeAndOrder();switch(this.opType){case 0:return"I";case 1:return"Trans";case 2:return"Rot"+this.opOrder;case 4:return"Inv";case 8:return"Plane";case 3:return"Screw"+this.opOrder;case 6:return"Nbar"+this.opOrder;case 9:return"Glide"}return null});d(b,"getOpName",function(a){-1==this.opType&&this.setOpTypeAndOrder();switch(this.opType){case 0:return"I";case 1:return"Trans"+JS.SymmetryOperation.op48(this.opTrans);case 2:return"Rot"+this.opOrder+
JS.SymmetryOperation.op48(this.opPoint)+JS.SymmetryOperation.op48(this.opAxis)+this.opIsCCW;case 4:return"Inv"+JS.SymmetryOperation.op48(this.opPoint);case 8:return(0==a?"":"Plane")+this.opRound(this.opPlane);case 3:return 0==a?"S"+JS.SymmetryOperation.op48(this.opPoint)+JS.SymmetryOperation.op48(this.opAxis):"Screw"+this.opOrder+JS.SymmetryOperation.op48(this.opPoint)+JS.SymmetryOperation.op48(this.opAxis)+JS.SymmetryOperation.op48(this.opTrans)+this.opIsCCW;case 6:return"Nbar"+this.opOrder+JS.SymmetryOperation.op48(this.opPoint)+
JS.SymmetryOperation.op48(this.opAxis)+this.opIsCCW;case 9:return(0==a?"":"Glide")+this.opRound(this.opPlane)+(2==a?JS.SymmetryOperation.op48(this.opTrans):"")}System.out.println("SymmetryOperation REJECTED TYPE FOR "+this);return""},"~N");d(b,"opRound",function(a){return Math.round(1E3*a.x)+","+Math.round(1E3*a.y)+","+Math.round(1E3*a.z)+","+Math.round(1E3*a.w)},"JU.P4");d(b,"getOpTitle",function(){-1==this.opType&&this.setOpTypeAndOrder();switch(this.opType){case 0:return"identity ";case 1:return"translation "+
JS.SymmetryOperation.opFrac(this.opTrans);case 2:return"rotation "+this.opOrder;case 4:return"inversion center "+JS.SymmetryOperation.opFrac(this.opPoint);case 8:return"reflection ";case 3:return"screw rotation "+this.opOrder+(null==this.opIsCCW?"":this.opIsCCW===Boolean.TRUE?"(+) ":"(-) ")+JS.SymmetryOperation.opFrac(this.opTrans);case 6:return this.opOrder+"-bar "+(null==this.opIsCCW?"":this.opIsCCW===Boolean.TRUE?"(+) ":"(-) ")+JS.SymmetryOperation.opFrac(this.opPoint);case 9:return"glide reflection "+
JS.SymmetryOperation.opFrac(this.opTrans)}return""});b.opFrac=d(b,"opFrac",function(a){return"{"+JS.SymmetryOperation.opF(a.x)+" "+JS.SymmetryOperation.opF(a.y)+" "+JS.SymmetryOperation.opF(a.z)+"}"},"JU.T3");b.opF=d(b,"opF",function(a){if(0==a)return"0";var c=0>a;c&&(a=-a);var b=0;1<=a&&(b=y(a),a-=b);var e=Math.round(48*a);if(0!=JU.PT.approx(e/48-a,1E3))return(c?"-":"")+JU.PT.approx(a,1E3);a=0==e%48?1:0==e%24?2:0==e%16?3:0==e%12?4:0==e%8?6:0==e%6?8:0==e%4?12:0==e%3?16:0==e%2?24:48;return(c?"-":"")+
(b*a+E(e*a/48))+(1==a?"":"/"+a)},"~N");b.op48=d(b,"op48",function(a){return null==a?(System.err.println("SymmetryOperation.op48 null"),"(null)"):"{"+Math.round(48*a.x)+" "+Math.round(48*a.y)+" "+Math.round(48*a.z)+"}"},"JU.T3");d(b,"setSigma",function(a,c){this.subsystemCode=a;this.sigma=c},"~S,JU.Matrix");d(b,"setGamma",function(a){for(var c=3+this.modDim,b=(this.rsvs=new JU.Matrix(null,c+1,c+1)).getArray(),e=Na(c,0),d=0,g=0;g<c;g++){for(var h=0;h<c;h++)b[g][h]=this.linearRotTrans[d++];e[g]=(a?-1:
1)*this.linearRotTrans[d++]}b[c][c]=1;a&&(this.rsvs=this.rsvs.inverse());for(g=0;g<c;g++)b[g][c]=e[g];b=this.rsvs.getSubmatrix(0,0,3,3).getArray();for(g=0;3>g;g++)for(h=0;4>h;h++)this.setElement(g,h,3>h?b[g][h]:e[g]);this.setElement(3,3,1)},"~B");d(b,"doFinalize",function(){if(!this.isFinalized){JS.SymmetryOperation.div12(this,this.divisor);if(0<this.modDim)for(var a=this.rsvs.getArray(),c=a.length-1;0<=--c;)a[c][3+this.modDim]=JS.SymmetryOperation.finalizeD(a[c][3+this.modDim],this.divisor);this.isFinalized=
!0}});b.div12=d(b,"div12",function(a,c){a.m03=JS.SymmetryOperation.finalizeF(a.m03,c);a.m13=JS.SymmetryOperation.finalizeF(a.m13,c);a.m23=JS.SymmetryOperation.finalizeF(a.m23,c);return a},"JU.M4,~N");b.finalizeF=d(b,"finalizeF",function(a,c){if(0==c){if(0==a)return 0;var b=y(a);return 1*(b>>8)/(b&255)}return a/c},"~N,~N");b.finalizeD=d(b,"finalizeD",function(a,c){if(0==c){if(0==a)return 0;var b=E(a);return 1*(b>>8)/(b&255)}return a/c},"~N,~N");d(b,"getXyz",function(a){return a&&0==this.modDim||null==
this.xyzOriginal?this.xyz:this.xyzOriginal},"~B");d(b,"getxyzTrans",function(a){var c=JU.M4.newM4(this);c.add(a);return JS.SymmetryOperation.getXYZFromMatrix(c,!1,!1,!1)},"JU.T3");d(b,"dumpInfo",function(){return"\n"+this.xyz+"\ninternal matrix representation:\n"+this.toString()});b.dumpSeitz=d(b,"dumpSeitz",function(a,c){for(var b=new JU.SB,e=F(4,0),d=0;3>d;d++){a.getRow(d,e);b.append("[\t");for(var g=0;3>g;g++)b.appendI(y(e[g])).append("\t");g=e[3];0==g?b.append("0"):(g*=g==y(g)?4:48,b.append(JS.SymmetryOperation.twelfthsOf(c?
JS.SymmetryOperation.normalizeTwelfths(g/48,48,!0):y(g))));b.append("\t]\n")}return b.toString()},"JU.M4,~B");d(b,"setMatrixFromXYZ",function(a,c,b){if(null==a)return!1;this.xyzOriginal=a;this.divisor=JS.SymmetryOperation.setDivisor(a);a=a.toLowerCase();this.setModDim(c);var e=!1,d=!0;a.startsWith("!")&&(a.startsWith("!nohalf!")?(d=!1,this.xyzOriginal=a=a.substring(8)):(e=!1,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(c=this.linearRotTrans.length;0<=--c;)if(Float.isNaN(this.linearRotTrans[c]))return!1;this.setMatrix(e);this.isFinalized=!0;this.xyz=(this.isBio=0<=a.indexOf("bio"))?this.xyzOriginal=Ga(this,JS.SymmetryOperation,"toString",[]):JS.SymmetryOperation.getXYZFromMatrix(this,!1,!1,!1);return!0}if(0==c&&0<=a.indexOf("x4"))for(c=
14;4<=--c;)if(0<=a.indexOf("x"+c)){this.setModDim(c-3);break}c=null;if(a.endsWith("m"))this.timeReversal=0<=a.indexOf("-m")?-1:1,b=!0;else if(0<=a.indexOf("mz)"))b=a.indexOf("("),c=a.substring(b+1,a.length-1),a=a.substring(0,b),b=!1;else if(0<=a.indexOf("u")){var g=a.endsWith("+");b=a.indexOf("(");var h;0>b?(h=a,this.isPointGroupOp=!0):(h=a.substring(b+1,a.length-(g?2:1)),a=a.substring(0,b));if(0>h.indexOf(","))this.suvwId=h;else if(this.setSpin(h),g&&0>this.timeReversal)return!1;b=!0}d=JS.SymmetryOperation.getRotTransArrayAndXYZ(this,
a,this.linearRotTrans,b,d,!0,null);if(null==d)return!1;this.xyzCanonical=d;null!=c&&(b=1==JU.M4.newA16(this.linearRotTrans).determinant3(),this.timeReversal=0>a.indexOf("-x")==0>c.indexOf("-mx")==b?1:-1);this.setMatrix(e);this.xyz=e?JS.SymmetryOperation.getXYZFromMatrix(this,!0,!1,!1):this.doNormalize?d:a;null==this.spinU&&0!=this.timeReversal&&(this.xyz+=1==this.timeReversal?",m":",-m");JU.Logger.debugging&&(JU.Logger.debug(""+this),null!=this.spinU&&JU.Logger.debug(""+this.spinU.toString().$replace("\n",
" ")));return!0},"~S,~N,~B");d(b,"setSpin",function(a){this.suvw=a;var c=F(16,0);JS.SymmetryOperation.getRotTransArrayAndXYZ(null,a,c,!0,!1,!1,"uvw");this.spinU=new JU.M3;JU.M4.newA16(c).getRotationScale(this.spinU);this.timeReversal=y(this.spinU.determinant3());this.suvwId=null},"~S");b.setDivisor=d(b,"setDivisor",function(a){for(var c=a.indexOf("/"),b=a.length;0<c&&c<b-1;){var e=a.charAt(c+1);if(0>"2346".indexOf(e)||c<b-2&&Character.isDigit(a.charAt(c+2)))return 0;c=a.indexOf("/",c+1)}return 12},
"~S");d(b,"setModDim",function(a){this.modDim=a;0<a&&(this.myLabels=JS.SymmetryOperation.labelsXn);this.linearRotTrans=F((a+4)*(a+4),0)},"~N");d(b,"setMatrix",function(a){16<this.linearRotTrans.length?this.setGamma(a):(0==this.linearRotTrans[15]?(this.m33=1,this.isPointGroupOp=!0,this.setRotationScale(this.spinU=JU.M3.newA9(this.linearRotTrans))):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(b,
"setFromMatrix",function(a,c){var b=0,e=0;this.myLabels=0==this.modDim?JS.SymmetryOperation.labelsXYZ:JS.SymmetryOperation.labelsXn;for(var d=0,g=3+this.modDim,h=0;d<g;h++){if(Float.isNaN(this.linearRotTrans[h]))return!1;b=this.linearRotTrans[h];1E-5>Math.abs(b)&&(b=0);if(0==(h+1)%(g+1)){var k=0==this.divisor?y(b)&255:this.divisor;0==k&&(k=12);b=JS.SymmetryOperation.finalizeF(b,this.divisor);null!=a&&e<a.length&&(b+=a[e++]);b=JS.SymmetryOperation.normalizeTwelfths((0>b?-1:1)*Math.abs(b*k)/k,k,this.doNormalize);
0==this.divisor&&(b=JS.SymmetryOperation.toDivisor(b,k));d++}this.linearRotTrans[h]=b}this.linearRotTrans[this.linearRotTrans.length-1]=this.divisor;this.setMatrix(c);this.isFinalized=null==a;this.xyz=JS.SymmetryOperation.getXYZFromMatrix(this,!0,!1,!1);return!0},"~A,~B");b.getMatrixFromXYZ=d(b,"getMatrixFromXYZ",function(a,c,b){return JS.SymmetryOperation.getMatrixFromXYZScaled(a,c,b)},"~S,~A,~B");b.getMatrixFromXYZScaled=d(b,"getMatrixFromXYZScaled",function(a,c,b){null==c&&(c=F(16,0));a=JS.SymmetryOperation.getRotTransArrayAndXYZ(null,
a,c,!1,b,!0,null);if(null==a)return null;b=new JU.M4;b.setA(c);return JS.SymmetryOperation.div12(b,JS.SymmetryOperation.setDivisor(a))},"~S,~A,~B");b.getJmolCanonicalXYZ=d(b,"getJmolCanonicalXYZ",function(a){try{return JS.SymmetryOperation.getRotTransArrayAndXYZ(null,a,null,!1,!0,!0,null)}catch(c){if(ba(c,Exception))return null;throw c;}},"~S");b.getRotTransArrayAndXYZ=d(b,"getRotTransArrayAndXYZ",function(a,c,b,e,d,g,h){var k=!1,l=!1,j=!1;c=JU.PT.rep(c,"[bio[","");var q=null==a?0:a.modDim,p=4+q,
m=null==a?JS.SymmetryOperation.setDivisor(c):a.divisor,s=d&&(null==a?!c.startsWith("!"):a.doNormalize),r=0<q?3:0;if(null!=b){for(var n=b.length-1,z=n;0<=--z;)b[z]=0;b[n]=1}n=c.indexOf(";")+1;0!=n&&(e=!0,n==c.length&&(c+="0,0,0"));var u=-1;a=JS.SymmetryOperation.getLabels(h,null==a||0==q?null:a.myLabels);c=c.toLowerCase()+",";c=c.$replace("(",",");0<q&&(c=JS.SymmetryOperation.replaceXn(c,q+3));h=-1;for(var w=0,C=0,B,x=0,D=0,A=0,P=0,F=0,Q=1,E="",Y=g?"":null,L=O(1,0),G=c.length,W=-1,z=0;z<G;z++){switch((B=
c.charAt(z)).charCodeAt(0)){case 59:break;case 39:case 32:case 123:case 125:case 33:continue;case 45:case 43:j="-"==B;W=z;0!=x&&(0>h?F=x:P=x);x=0;continue;case 47:D=0;k=!0;continue;case 120:case 121:case 122:case 117:case 118:case 119:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:w=C*p;k="x"<=B?B.charCodeAt(0)-120:"u"<=B?B.charCodeAt(0)-117:B.charCodeAt(0)-97+r;h=w+k;j=j?-1:1;if(e&&0!=x&&W!=z-1){null!=b&&(b[h]=x);if(x!=y(x)){null!=Y&&(E+=JS.SymmetryOperation.plusMinus(E,x,a[k],
!1,!1));x=0;break}j=y(x);x=0}else null!=b&&(b[h]=j);null!=Y&&(E+=JS.SymmetryOperation.plusMinus(E,j,a[k],!1,!1));break;case 44:if(0!=n){if(0<n){u=z;z=n-1;n=-z;D=x=P=F=0;continue}n=z+1;z=u}else if(0!=P||0!=F)x=P+F;x=JS.SymmetryOperation.normalizeTwelfths(x,0==D?12:0==m?D:m,s);null!=b&&(b[w+p-1]=0==m&&0<D?x=JS.SymmetryOperation.toDivisor(A,D):x);null!=Y&&(E+=JS.SymmetryOperation.xyzFraction12(x,0==m?D:m,!1,d),Y+=(""===Y?"":",")+E);if(C==p-2)return g?Y:"ok";D=A=x=P=F=0;E="";w+=4;h=-1;if(2<C++&&0==q)return JU.Logger.warn("Symmetry Operation? "+
c),null;break;case 46:l=!0;Q=1;continue;case 48:if(!l&&12==m&&(k||!e))continue;default:var R=B.charCodeAt(0)-48;if(0<=R&&9>=R){if(l){Q/=10;0>x&&(j=!0);x+=Q*R*(j?-1:1);continue}else if(j&&"0"==B)continue;if(k){L[0]=z;D=JU.PT.parseIntNext(c,L);if(0>D)return null;z=L[0]-1;0==x?null!=b&&(b[h]/=D):(A=y(x),x/=D)}else x=10*x+(j?-1:1)*R}else JU.Logger.warn("symmetry character?"+B)}l=k=j=!1}return null},"JS.SymmetryOperation,~S,~A,~B,~B,~B,~S");b.replaceXn=d(b,"replaceXn",function(a,c){for(var b=c;0<=--b;)a=
JU.PT.rep(a,JS.SymmetryOperation.labelsXn[b],JS.SymmetryOperation.labelsXnSub[b]);return a},"~S,~N");b.toDivisor=d(b,"toDivisor",function(a,c){var b=y(a);b!=a&&(b=a-b,c=y(Math.abs(c/b)),b=y(Math.abs(a)/b));return(b<<8)+c},"~N,~N");b.xyzFraction12=d(b,"xyzFraction12",function(a,c,b,e){if(0==a)return"";12!=c&&(a=y(a),c=a&255,a>>=8);var d=E(c/2);if(b)for(;0>a;)a+=c;else if(e){for(;a>d;)a-=c;for(;a<-d;)a+=c}c=12==c?JS.SymmetryOperation.twelfthsOf(a):0==a?"0":a+"/"+c;return"0"==c.charAt(0)?"":0<a?"+"+
c:c},"~N,~N,~B,~B");b.twelfthsOf=d(b,"twelfthsOf",function(a){var c="";0>a&&(a=-a,c="-");var b=12,e=Math.round(a);if(0.01<Math.abs(e-a)){a/=12;for(b=3;20>b;b++){var d=a*b,e=Math.round(d);if(0.01>Math.abs(e-d))break}if(20==b)return c+a}else{if(12==e)return c+"1";if(12>e)return c+JS.SymmetryOperation.twelfths[e%12];switch(e%12){case 0:return c+E(e/12);case 2:case 10:b=6;break;case 3:case 9:b=4;break;case 4:case 8:b=3;break;case 6:b=2}e=E(e*b/12)}return c+e+"/"+b},"~N");b.plusMinus=d(b,"plusMinus",function(a,
c,b,e,d){var g=Math.abs(c);if(1E-4>g)return"";e=0.9999<g&&1.0001>=g?"":0.001>=g%1&&!e?""+y(g):d?""+g:JS.SymmetryOperation.twelfthsOf(12*g);return(0>c?"-":0==a.length?"":"+")+(e.equals("1")?"":e)+b},"~S,~N,~S,~B,~B");b.normalizeTwelfths=d(b,"normalizeTwelfths",function(a,c,b){a*=c;var e=E(c/2);if(b){for(;a>e;)a-=c;for(;a<=-e;)a+=c}return a},"~N,~N,~B");b.getXYZFromMatrix=d(b,"getXYZFromMatrix",function(a,c,b,e){return JS.SymmetryOperation.getXYZFromMatrixFrac(a,c,b,e,!1,!1,null)},"JU.M4,~B,~B,~B");
b.getXYZFromMatrixFrac=d(b,"getXYZFromMatrixFrac",function(a,c,b,e,d,g,h){var k="",l=R(a,"JS.SymmetryOperation")?a:null;if(null!=l&&0<l.modDim)return JS.SymmetryOperation.getXYZFromRsVs(l.rsvs.getRotation(),l.rsvs.getTranslation(),c);var l=F(4,0),j=y(a.getElement(3,3));1==j?j=12:a.setElement(3,3,1);h=JS.SymmetryOperation.getLabels(h,JS.SymmetryOperation.labelsXYZ);for(var q=0;3>q;q++){var p=3>q?0:3;a.getRow(q,l);for(var m="",s=0;3>s;s++){var r=l[s];0!=JS.SymmetryOperation.approx(r)&&(m+=JS.SymmetryOperation.plusMinus(m,
r,h[s+p],d,g))}if(0!=(c?l[3]:JS.SymmetryOperation.approx(l[3])))p=g?JS.SymmetryOperation.plusMinus(m,l[3],"",!0,!0):JS.SymmetryOperation.xyzFraction12(c?l[3]:l[3]*j,j,b,e),""===m&&(p="+"==p.charAt(0)?p.substring(1):p),m+=p;k+=","+(""===m?"0":m)}return k.substring(1)},"JU.M4,~B,~B,~B,~B,~B,~S");b.getLabels=d(b,"getLabels",function(a,c){if(null!=a)switch(a){case "abc":return JS.SymmetryOperation.labelsABC;case "uvw":return JS.SymmetryOperation.labelsUVW;case "mxyz":return JS.SymmetryOperation.labelsMXYZ}return null==
c?JS.SymmetryOperation.labelsXYZ:c},"~S,~A");d(b,"rotateAxes",function(a,c,b,e){var d=Array(3);this.getRotationScale(e);for(var g=a.length;0<=--g;)b.setT(a[g]),c.toFractional(b,!0),e.rotate(b),c.toCartesian(b,!0),d[g]=JU.V3.newV(b);return d},"~A,JS.UnitCell,JU.P3,JU.M3");b.fcoord=d(b,"fcoord",function(a,c){return JS.SymmetryOperation.opF(a.x)+c+JS.SymmetryOperation.opF(a.y)+c+JS.SymmetryOperation.opF(a.z)},"JU.T3,~S");b.approx=d(b,"approx",function(a){return JU.PT.approx(a,100)},"~N");b.approx6=d(b,
"approx6",function(a){return JU.PT.approx(a,1E6)},"~N");b.getXYZFromRsVs=d(b,"getXYZFromRsVs",function(a,c,b){a=a.getArray();c=c.getArray();for(var e=a.length,d="",g=0;g<e;g++){for(var d=d+",",h=0;h<e;h++){var k=a[g][h];0!=k&&(d+=(0>k?"-":d.endsWith(",")?"":"+")+(1==Math.abs(k)?"":""+Math.abs(k))+"x"+(h+1))}d+=JS.SymmetryOperation.xyzFraction12(E(c[g][0]*(b?1:12)),12,!1,!0)}return JU.PT.rep(d.substring(1),",+",",")},"JU.Matrix,JU.Matrix,~B");d(b,"getMagneticOp",function(){return 2147483647==this.magOp?
this.magOp=y(null!=this.spinU?1:this.determinant3()*this.timeReversal):this.magOp});d(b,"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(b,"getCentering",function(){this.doFinalize();null==this.centering&&!this.unCentered&&(0==this.modDim&&JS.SymmetryOperation.isTranslation(this)?(this.isCenteringOp=!0,this.centering=JU.V3.new3(this.m03,this.m13,this.m23)):(this.unCentered=
!0,this.centering=null));return this.centering});b.isTranslation=d(b,"isTranslation",function(a){return 1==a.m00&&0==a.m01&&0==a.m02&&0==a.m10&&1==a.m11&&0==a.m12&&0==a.m20&&0==a.m21&&1==a.m22&&(0!=a.m03||0!=a.m13||0!=a.m23)},"JU.M4");d(b,"fixMagneticXYZ",function(a,c){if(null!=this.spinU)return c+JS.SymmetryOperation.getSpinString(this.spinU,!0,!0);if(0==this.timeReversal)return c;var b=c.indexOf("m"),b=b-E((3-this.timeReversal)/2);c=0>b?c:c.substring(0,b);b=new JU.M3;a.getRotationScale(b);0>this.getMagneticOp()&&
b.scale(-1);return c+JS.SymmetryOperation.getSpinString(b,!1,!0)},"JU.M4,~S");b.getSpinString=d(b,"getSpinString",function(a,c,b){var e;R(a,"JU.M3")?(e=new JU.M4,e.setRotationScale(a)):e=a;a=JS.SymmetryOperation.getXYZFromMatrixFrac(e,!1,!1,!1,c,c,c?"uvw":"mxyz");return b?"("+a+")":a},"JU.M34,~B,~B");d(b,"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)),null==this.spinU&&3.4028235E38!=this.magOp&&this.info.put("magOp",Float.$valueOf(this.magOp)),this.info.put("id",Integer.$valueOf(this.opId)),0!=this.timeReversal&&this.info.put("timeReversal",Integer.$valueOf(this.timeReversal)),null!=this.spinU&&
(this.info.put("spinU",this.spinU),this.info.put("uvw",this.xyz.$replace("x","u").$replace("y","v").$replace("z","w"))),null!=this.xyzOriginal&&this.info.put("xyzOriginal",this.xyzOriginal));return this.info});b.normalizeOperationToCentroid=d(b,"normalizeOperationToCentroid",function(a,c,b,e,d){if(!(0>=d)){var g=0,h=0,k=0;null==JS.SymmetryOperation.atomTest&&(JS.SymmetryOperation.atomTest=new JU.P3);for(var l=e+d;e<l;e++)c.rotTrans2(b[e],JS.SymmetryOperation.atomTest),g+=JS.SymmetryOperation.atomTest.x,
h+=JS.SymmetryOperation.atomTest.y,k+=JS.SymmetryOperation.atomTest.z;g/=d;h/=d;for(k/=d;-0.001>g||1.001<=g;)c.m03+=0>g?1:-1,g+=0>g?1:-1;if(1<a)for(;-0.001>h||1.001<=h;)c.m13+=0>h?1:-1,h+=0>h?1:-1;if(2<a)for(;-0.001>k||1.001<=k;)c.m23+=0>k?1:-1,k+=0>k?1:-1}},"~N,JU.M4,~A,~N,~N");b.getLatticeCentering=d(b,"getLatticeCentering",function(a){for(var c=new JU.Lst,b=0;b<a.length;b++){var e=null==a[b]?null:a[b].getCentering();null!=e&&c.addLast(JU.P3.newP(e))}return c},"~A");b.getLatticeCenteringStrings=
d(b,"getLatticeCenteringStrings",function(a){for(var c=new JU.Lst,b=0;b<a.length;b++)null!=(null==a[b]?null:a[b].getCentering())&&c.addLast(a[b].xyzOriginal);return c},"~A");d(b,"getOpIsCCW",function(){-1==this.opType&&this.setOpTypeAndOrder();return this.opIsCCW});d(b,"getOpType",function(){-1==this.opType&&this.setOpTypeAndOrder();return this.opType});d(b,"getOpOrder",function(){-1==this.opType&&this.setOpTypeAndOrder();return this.opOrder});d(b,"getOpPoint",function(){-1==this.opType&&this.setOpTypeAndOrder();
return this.opPoint});d(b,"getOpAxis",function(){-1==this.opType&&this.setOpTypeAndOrder();return this.opAxis});d(b,"getOpPoint2",function(){return this.opPoint2});d(b,"getOpTrans",function(){-1==this.opType&&this.setOpTypeAndOrder();return null==this.opTrans?this.opTrans=new JU.V3:this.opTrans});b.opGet3code=d(b,"opGet3code",function(a){for(var c=0,b=F(4,0),e=0;3>e;e++){a.getRow(e,b);for(var d=0;3>d;d++)switch(y(b[d])){case 1:c|=d+1<<(2-e<<3);break;case -1:c|=16+d+1<<(2-e<<3)}}return c},"JU.M4");
b.opGet3x=d(b,"opGet3x",function(a){if(0!=a.m22)return JS.SymmetryOperation.x;a=JS.SymmetryOperation.opGet3code(a);for(var c=0;8>c;c++)if(a==JS.SymmetryOperation.C3codes[c])return null==JS.SymmetryOperation.xneg&&(JS.SymmetryOperation.xneg=JU.V3.newV(JS.SymmetryOperation.x),JS.SymmetryOperation.xneg.scale(-1)),JS.SymmetryOperation.xneg;return JS.SymmetryOperation.x},"JU.M4");d(b,"setOpTypeAndOrder",function(){this.clearOp();var a=Math.round(this.determinant3()),c=Math.round(this.m00+this.m11+this.m22),
b=0,e=0,d=JS.SymmetryOperation.x;switch(c){case 3:JS.SymmetryOperation.hasTrans(this)?(this.opType=1,this.opTrans=new JU.V3,this.getTranslation(this.opTrans),this.opOrder=2):(this.opType=0,this.opOrder=1);return;case -3:this.opType=4;b=2;break;default:b=c*a+3,5==b&&(b=6),0<a?(this.opType=2,e=E(180*Math.acos((c-1)/2)/3.141592653589793),120==e&&(null==this.opX&&(this.opX=JS.SymmetryOperation.opGet3x(this)),d=this.opX)):2==b?this.opType=8:(this.opType=6,3==b&&(b=6),e=E(180*Math.acos((-c-1)/2)/3.141592653589793),
120==e&&(null==this.opX&&(this.opX=JS.SymmetryOperation.opGet3x(this)),d=this.opX))}this.opOrder=b;var g=new JU.M4,a=new JU.P3,c=JU.P3.newP(d);g.setM4(this);for(var h=new JU.P3,k=JU.P3.newP(c),l=new JU.P3,j=JU.P3.newP(c),q=new JU.P3,m=1;m<b;m++)g.mul(this),this.rotTrans(a),this.rotTrans(c),1==m&&q.setT(c),h.add(a),k.add(c),6==this.opType&&(0==m%2?j.add(c):l.add(c));this.opTrans=new JU.V3;g.getTranslation(this.opTrans);this.opTrans.scale(1/b);m=JS.SymmetryOperation.approx6(this.opTrans.length());this.opPoint=
new JU.P3;var t=null,g=!0;switch(this.opType){case 4:k.add2(c,d);k.scale(0.5);this.opPoint=JU.P3.newP(JS.SymmetryOperation.opClean6(k));g=JS.SymmetryOperation.checkOpPoint(this.opPoint);break;case 6:l.scale(2/b);j.scale(2/b);t=JU.V3.newVsub(l,j);t.normalize();this.opAxis=JS.SymmetryOperation.opClean6(t);h.add2(l,j);k.scale(1/b);this.opPoint.setT(JS.SymmetryOperation.opClean6(k));g=JS.SymmetryOperation.checkOpPoint(this.opPoint);180!=e&&(c.cross(d,c),this.opIsCCW=Boolean.$valueOf(0>c.dot(t)));break;
case 2:t=JU.V3.newVsub(k,h);t.normalize();this.opAxis=JS.SymmetryOperation.opClean6(t);h.scale(1/b);a.setT(h);0<m&&h.sub(this.opTrans);this.opPoint.setT(h);JS.SymmetryOperation.opClean6(this.opPoint);180!=e&&(c.cross(d,c),this.opIsCCW=Boolean.$valueOf(0>c.dot(t)));if(g=(new Boolean(g&JS.SymmetryOperation.checkOpAxis(a,0==m?this.opAxis:this.opTrans,h,new JU.V3,new JU.V3,null))).valueOf())this.opPoint.setT(h),JS.SymmetryOperation.checkOpAxis(this.opPoint,this.opAxis,c,new JU.V3,new JU.V3,this.opPoint)&&
(this.opPoint2=JU.P3.newP(c)),0<m&&(h.scaleAdd2(0.5,this.opTrans,this.opPoint),g=JS.SymmetryOperation.checkOpPoint(h),null!=this.opPoint2&&(h.scaleAdd2(0.5,this.opTrans,this.opPoint2),JS.SymmetryOperation.checkOpPoint(h)||(this.opPoint2=null)),0>t.dot(a)&&(g=!1));break;case 8:a.sub(this.opTrans),a.scale(0.5),this.opPoint.setT(a),q.sub(this.opTrans),this.opAxis=JU.V3.newVsub(q,d),c.scaleAdd2(0.5,this.opAxis,d),this.opAxis.normalize(),this.opPlane=new JU.P4,a.set(d.x+1.1,d.y+1.7,d.z+2.1),a.scale(0.5),
this.rotTrans(a),a.sub(this.opTrans),a.scaleAdd2(0.5,d,a),a.scale(0.5),t=new JU.V3,g=JS.SymmetryOperation.checkOpPlane(this.opPoint,a,c,this.opPlane,t,new JU.V3),JS.SymmetryOperation.opClean6(this.opPlane),0==JS.SymmetryOperation.approx6(this.opPlane.w)&&(this.opPlane.w=0),JS.SymmetryOperation.approx6Pt(this.opAxis),JS.SymmetryOperation.normalizePlane(this.opPlane)}if(0<m){JS.SymmetryOperation.opClean6(this.opTrans);b=1;if(8==this.opType){if(0==this.opTrans.z&&1.25==this.opTrans.lengthSquared()||
0.5==this.opTrans.z&&1.5==this.opTrans.lengthSquared()?(b=1.25,this.opIsLong=!0):b=0.78,this.opGlide=JU.V3.newV(this.opTrans),this.fixNegTrans(this.opGlide),0==this.opGlide.length()&&(this.opGlide=null),(1==this.opTrans.x||1==this.opTrans.y||1==this.opTrans.z)&&-1==this.m22)g=!1}else 0==this.opTrans.z&&1.25==this.opTrans.lengthSquared()&&(b=1.25,this.opIsLong=!0);this.opType|=1;if(Math.abs(JS.SymmetryOperation.approx(this.opTrans.x))>=b||Math.abs(JS.SymmetryOperation.approx(this.opTrans.y))>=b||Math.abs(JS.SymmetryOperation.approx(this.opTrans.z))>=
b)g=!1}else this.opTrans=null;g||(this.isIrrelevant=!0)});d(b,"fixNegTrans",function(a){a.x=JS.SymmetryOperation.normHalf(a.x);a.y=JS.SymmetryOperation.normHalf(a.y);a.z=JS.SymmetryOperation.normHalf(a.z)},"JU.V3");b.normalizePlane=d(b,"normalizePlane",function(a){JS.SymmetryOperation.approx6Pt(a);a.w=JS.SymmetryOperation.approx6(a.w);(0<a.w||0==a.w&&(0>a.x||0==a.x&&0>a.y||0==a.y&&0>a.z))&&a.scale4(-1);JS.SymmetryOperation.opClean6(a);a.w=JS.SymmetryOperation.approx6(a.w)},"JU.P4");b.isCoaxial=d(b,
"isCoaxial",function(a){return 1==Math.abs(JS.SymmetryOperation.approx(a.x))||1==Math.abs(JS.SymmetryOperation.approx(a.y))||1==Math.abs(JS.SymmetryOperation.approx(a.z))},"JU.T3");d(b,"clearOp",function(){this.doFinalize();this.isIrrelevant=!1;this.opIsCCW=this.opPlane=this.opPoint=this.opPoint2=this.opTrans=null;this.opIsLong=!1});b.hasTrans=d(b,"hasTrans",function(a){return 0!=JS.SymmetryOperation.approx6(a.m03)||0!=JS.SymmetryOperation.approx6(a.m13)||0!=JS.SymmetryOperation.approx6(a.m23)},"JU.M4");
b.checkOpAxis=d(b,"checkOpAxis",function(a,c,b,e,d,g){null==JS.SymmetryOperation.opPlanes&&(JS.SymmetryOperation.opPlanes=JU.BoxInfo.getBoxFacesFromOABC(null));for(var h=JU.BoxInfo.faceOrder,k=null==g?1:-1,l=0;6>l;l++){var j=JU.Measure.getIntersection(a,c,JS.SymmetryOperation.opPlanes[h[l]],b,e,d);if(null!=j&&JS.SymmetryOperation.checkOpPoint(j)&&0>c.dot(e)*k&&(null==g||0<=JS.SymmetryOperation.approx(g.distance(j)-0.5)))return!0}return!1},"JU.P3,JU.V3,JU.P3,JU.V3,JU.V3,JU.P3");b.opClean6=d(b,"opClean6",
function(a){0==JS.SymmetryOperation.approx6(a.x)&&(a.x=0);0==JS.SymmetryOperation.approx6(a.y)&&(a.y=0);0==JS.SymmetryOperation.approx6(a.z)&&(a.z=0);return a},"JU.T3");b.checkOpPoint=d(b,"checkOpPoint",function(a){return JS.SymmetryOperation.checkOK(a.x,0)&&JS.SymmetryOperation.checkOK(a.y,0)&&JS.SymmetryOperation.checkOK(a.z,0)},"JU.T3");b.checkOK=d(b,"checkOK",function(a,c){return 0!=c||0<=JS.SymmetryOperation.approx(a)&&1>=JS.SymmetryOperation.approx(a)},"~N,~N");b.checkOpPlane=d(b,"checkOpPlane",
function(a,c,b,e,d,g){JU.Measure.getPlaneThroughPoints(a,c,b,d,g,e);c=JU.BoxInfo.unitCubePoints;g=b=0;for(var h=8;0<=--h;){var k=JU.Measure.getPlaneProjection(c[h],e,a,d);switch(y(Math.signum(JS.SymmetryOperation.approx6(k)))){case 1:if(0<g)return!0;b++;break;case -1:if(0<b)return!0;g++}}return!(8==g||8==b)},"JU.P3,JU.P3,JU.P3,JU.P4,JU.V3,JU.V3");b.getAdditionalOperations=d(b,"getAdditionalOperations",function(a,c){for(var b=a.length,e=new JU.Lst,d=new JU.SB,g=new java.util.Hashtable,h=new JU.V3,
k=0;k<b;k++){var l=a[k];l.opPerDim=c;e.addLast(l);var j=l.getOpName(1);d.append(j).appendC(";");0!=(l.getOpType()&8)?JS.SymmetryOperation.addCoincidentMap(g,l,8,h):3==l.getOpType()&&JS.SymmetryOperation.addCoincidentMap(g,l,3,null)}for(k=1;k<b;k++)a[k].addOps(d,e,g,b,k,h);return e.toArray(Array(e.size()))},"~A,~N");d(b,"addOps",function(a,c,b,e,d,g){var h=new JU.V3;this.getTranslation(h);var k=8==(this.getOpType()&8),l=3==this.getOpType(),j=new JU.V3,q=null,m=5,t=-2,s=5,r=-2,n=5,z=-2;switch(this.opPerDim){case 51:case 34:n=
1;z=0;break;case 18:case 19:s=1;r=0;n=1;z=0;break;case 67:m=1;t=0;s=1;r=0;break;case 35:m=1,t=0,n=1,z=0}for(;--m>=t;)for(var u=s;--u>=r;)for(var w=n;--w>=z;)null==q&&(q=new JS.SymmetryOperation(null,0,!1)),j.set(m,u,w),!this.checkOpSimilar(j,g)&&q.opCheckAdd(this,h,e,j,a,c,d+1)&&(k?JS.SymmetryOperation.addCoincidentMap(b,q,8,g):l&&JS.SymmetryOperation.addCoincidentMap(b,q,3,null),q=null)},"JU.SB,JU.Lst,java.util.Map,~N,~N,JU.V3");b.addCoincidentMap=d(b,"addCoincidentMap",function(a,c,b,e){if(!c.isIrrelevant){var d=
c.getOpName(0),g=a.get(d);c.iCoincident=0;b=3==b;if(null==g)a.put(d,g=new JU.Lst);else if(b){if(6==c.opOrder)for(a=g.size();0<=--a;)if(e=g.get(a),!e.isIrrelevant)switch(e.opOrder){case 3:e.isIrrelevant=!0}c.iCoincident=1}else{d=null;for(a=g.size();0<=--a;)if(d=g.get(a),null!=c.opGlide&&null!=d.opGlide){e.sub2(c.opGlide,d.opGlide);if(1E-6>e.lengthSquared()){c.isIrrelevant=!0;return}e.add2(c.opGlide,d.opGlide);if(1E-6>e.lengthSquared()){c.isIrrelevant=!0;return}e.add2(c.opAxis,d.opAxis);if(1E-6>e.lengthSquared()){c.isIrrelevant=
!0;return}}else if(null==c.opGlide&&null==d.opGlide){e.add2(c.opAxis,d.opAxis);if(1E-6>e.lengthSquared()){c.isIrrelevant=!0;return}e.sub2(c.opAxis,d.opAxis);if(1E-6>e.lengthSquared()){c.isIrrelevant=!0;return}}0==d.iCoincident?(c.iCoincident=1,d.iCoincident=-1):c.iCoincident=-d.iCoincident}g.addLast(c)}},"java.util.Map,JS.SymmetryOperation,~N,JU.V3");d(b,"checkOpSimilar",function(a,c){switch(this.getOpType()&-2){default:return!1;case 0:return!0;case 2:return 0==JS.SymmetryOperation.approx6(a.dot(this.opAxis)-
a.length());case 8:return c.cross(a,this.opAxis),0==JS.SymmetryOperation.approx6(c.length())?!1:0==JS.SymmetryOperation.approx6(a.dot(this.opAxis))}},"JU.V3,JU.V3");d(b,"opCheckAdd",function(a,c,b,e,d,g){this.setM4(a);b=JU.V3.newV(e);b.add(c);this.setTranslation(b);this.isFinalized=!0;this.setOpTypeAndOrder();if(this.isIrrelevant||0==this.opType||1==this.opType)return!1;c=this.getOpName(1)+";";if(0==(this.opType&8)&&0<=d.indexOf(c))return!1;d.append(c);this.spinU=a.spinU;this.suvw=a.suvw;this.timeReversal=
a.timeReversal;g.addLast(this);this.isFinalized=!0;this.xyz=JS.SymmetryOperation.getXYZFromMatrix(this,!1,!1,!1);return!0},"JS.SymmetryOperation,JU.V3,~N,JU.V3,JU.SB,JU.Lst,~N");b.approx6Pt=d(b,"approx6Pt",function(a){null!=a&&(a.x=JS.SymmetryOperation.approx6(a.x),a.y=JS.SymmetryOperation.approx6(a.y),a.z=JS.SymmetryOperation.approx6(a.z))},"JU.T3");b.normalize12ths=d(b,"normalize12ths",function(a){a.x=JU.PT.approx(a.x,12);a.y=JU.PT.approx(a.y,12);a.z=JU.PT.approx(a.z,12)},"JU.V3");d(b,"getCode",
function(){if(null!=this.opAxisCode)return this.opAxisCode;var a=this.getOpName(2).charAt(0),c=this.opOrder,b=null==this.opIsCCW?0:this.opIsCCW===Boolean.TRUE?1:2;switch(a.charCodeAt(0)){case 71:a=JS.SymmetryOperation.getGlideFromTrans(this.opTrans,this.opPlane);case 80:JS.SymmetryOperation.isCoaxial(this.opAxis)||(a="P"==a?"p":String.fromCharCode(a.charCodeAt(0)-32));break;case 83:var e=this.opTrans.length();if(null!=this.opIsCCW&&e<(1<e?6:0.5)==(this.opIsCCW===Boolean.TRUE))a="w";break;case 82:JS.SymmetryOperation.isCoaxial(this.opAxis)||
(a="o"),0==this.opPoint.length()&&(a="o"==a?"q":"Q")}return this.opAxisCode=""+a+"."+String.fromCharCode(48+c)+"."+b+"."});b.getGlideFromTrans=d(b,"getGlideFromTrans",function(a,c){var b=Math.abs(JS.SymmetryOperation.approx(12*a.x)),e=Math.abs(JS.SymmetryOperation.approx(12*a.y)),d=Math.abs(JS.SymmetryOperation.approx(12*a.z));9==b&&(b=3);9==e&&(e=3);9==d&&(d=3);var g=3;0==b&&g--;0==e&&g--;0==d&&g--;d=y(b+e+d);switch(g){default:case 1:return 0!=b?"a":0!=e?"b":"c";case 2:switch(d){case 6:return"d";
case 12:if(b=JU.P3.newP(c),b.normalize(),1==Math.abs(JS.SymmetryOperation.approx(b.x+b.y+b.z)))return"n"}break;case 3:switch(d){case 9:return"d";case 18:return"n"}}return"g"},"JU.T3,JU.T3");b.rotateAndTranslatePoint=d(b,"rotateAndTranslatePoint",function(a,c,b,e,d,g){a.rotTrans2(c,g);g.add3(b,e,d)},"JU.M4,JU.P3,~N,~N,~N,JU.P3");b.transformStr=d(b,"transformStr",function(a,c,b,e,d,g,h,k,l){null==b&&(b=JU.M4.newM4(c),b.invert());null==e&&(e=new JU.M4);null==d&&(d=F(16,0));var j=JS.SymmetryOperation.getMatrixFromXYZ(a,
d,!0);null!=g&&j.add(g);e.setM4(b);e.mul(j);null!=c&&e.mul(c);null!=h&&j.add(h);if(k){e.getColumn(3,d);for(c=0;3>c;c++)d[c]=(10+d[c])%1;e.setColumnA(3,d)}e=JS.SymmetryOperation.getXYZFromMatrixFrac(e,!1,!0,!1,l,!1,null);d=a.indexOf("(");0<d&&(e+=a.substring(d));return e},"~S,JU.M4,JU.M4,JU.M4,~A,JU.T3,JU.T3,~B,~B");b.stringToMatrix=d(b,"stringToMatrix",function(a,c){var b=JS.SymmetryOperation.setDivisor(a),e=F(16,0);JS.SymmetryOperation.getRotTransArrayAndXYZ(null,a,e,!0,!1,!1,c);return JS.SymmetryOperation.div12(JU.M4.newA16(e),
b)},"~S,~S");b.getTransformXYZ=d(b,"getTransformXYZ",function(a){return JS.SymmetryOperation.getXYZFromMatrixFrac(a,!1,!1,!1,!0,!0,"xyz")},"JU.M4");b.getTransformUVW=d(b,"getTransformUVW",function(a){return JS.SymmetryOperation.getXYZFromMatrixFrac(a,!1,!1,!1,!1,!0,"uvw")},"JU.M4");b.getTransformABC=d(b,"getTransformABC",function(a,c){if(null==a)return"a,b,c";var b=JU.M4.newM4(a),e=new JU.V3;b.getTranslation(e);e.scale(-1);b.add(e);b.transpose();b=JS.SymmetryOperation.getXYZFromMatrixFrac(b,!1,!0,
!1,!0,!1,"abc");if(1E-12>e.lengthSquared())return b;e.scale(-1);return b+";"+(c?JS.SymmetryOperation.norm3(e):JS.SymmetryOperation.opF(e.x)+","+JS.SymmetryOperation.opF(e.y)+","+JS.SymmetryOperation.opF(e.z))},"JU.M4,~B");b.norm3=d(b,"norm3",function(a){return JS.SymmetryOperation.norm(a.x)+","+JS.SymmetryOperation.norm(a.y)+","+JS.SymmetryOperation.norm(a.z)},"JU.T3");b.norm=d(b,"norm",function(a){return JS.SymmetryOperation.opF(JS.SymmetryOperation.normHalf(a))},"~N");b.normHalf=d(b,"normHalf",
function(a){for(;-0.5>=a;)a+=1;for(;0.5<a;)a-=1;return a},"~N");b.toPoint=d(b,"toPoint",function(a,c){null==c&&(c=new JU.P3);var b=JU.PT.split(a,",");c.set(JU.PT.parseFloatFraction(b[0]),JU.PT.parseFloatFraction(b[1]),JU.PT.parseFloatFraction(b[2]));return c},"~S,JU.P3");b.matrixToRationalString=d(b,"matrixToRationalString",function(a){for(var c=R(a,"JU.M4")?4:3,b="(",e=0;3>e;e++)for(var b=b+"\n",d=0;d<c;d++){0<d&&(b+="\t");3==d&&4==c&&(b+="|  ");var g=a.getElement(e,d);if(g==y(g))b+=0>g?" "+y(g):
"  "+y(g);else{var h=Math.round(48*g);0!=JS.SymmetryOperation.approx6(48*g-h)?b+=g:(h=JS.SymmetryOperation.opF(g),b+=0<g?" "+h:h)}}return b+"\n)"},"JU.M34");d(b,"rotateSpin",function(a){null==this.spinU?(this.rotate(a),-1==this.getMagneticOp()&&a.scale(-1)):this.spinU.rotate(a)},"JU.T3");b.staticConvertOperation=d(b,"staticConvertOperation",function(a,c,b){var e=null==c,d=null;e?(d=JS.SymmetryOperation.stringToMatrix(a,b),0<=a.indexOf("u")?(c=new JU.M3,d.getRotationScale(c)):c=d):R(c,"JU.M3")?(d=
new JU.M4,d.setRotationScale(c)):d=c;null==b&&(b="xyz");if("rxyz".equalsIgnoreCase(b))return JS.SymmetryOperation.matrixToRationalString(c);a=b.equals(b.toUpperCase());return e?c:JS.SymmetryOperation.getXYZFromMatrixFrac(d,!1,!1,!1,!0,a,b.toLowerCase())},"~S,JU.M34,~S");d(b,"toString",function(){return null==this.rsvs?Ga(this,JS.SymmetryOperation,"toString",[]):Ga(this,JS.SymmetryOperation,"toString",[])+" "+this.rsvs.toString()});d(b,"getSUVW",function(){null==this.suvw&&null!=this.spinU&&(this.suvw=
JS.SymmetryOperation.getSpinString(this.spinU,!0,!1));return this.suvw});b.atomTest=null;b.twelfths=C(-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(" "));b.labelsXYZ=C(-1,["x","y","z"]);b.labelsUVW=C(-1,["u","v","w"]);b.labelsABC=C(-1,["a","b","c"]);b.labelsMXYZ=C(-1,["mx","my","mz"]);b.labelsXn=C(-1,"x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13".split(" "));b.labelsXnSub=C(-1,"xyzabcdefghij".split(""));b.x=JU.P3.new3(3.141592653589793,2.718281828459045,8.539734222673566);b.C3codes=
O(-1,[200978,1184513,1245458,135953,1245442,131857,200962,1180417]);b.xneg=null;b.opPlanes=null});aa("JS");N(null,"JS.SymmetryInfo",["JU.PT","JS.SpaceGroup","$.SymmetryOperation","JU.SimpleUnitCell"],function(){var b=I(function(){this.isCurrentCell=!0;this.displayName=null;this.isMultiCell=this.coordinatesAreFractional=!1;this.cellRange=this.infoStr=this.additionalOperations=this.symmetryOperations=this.sgTitle=this.sgName=null;this.latticeType="P";this.intlTableJmolId=this.intlTableNo=null;this.spaceGroupIndex=
0;this.itaNo=null;this.isSpinSpaceGroup=!1;this.intlTableTransform=this.intlTableIndexNdotM=this.strSUPERCELL=this.spaceGroupF2CParams=this.spaceGroupF2C=this.spaceGroupF2CTitle=null;this.slop=0;this.sgDerived=this.fileSpaceGroup=null;S(this,arguments)},JS,"SymmetryInfo",null);$(b,function(a){this.fileSpaceGroup=a},"JS.SpaceGroup");d(b,"setSymmetryInfoFromModelkit",function(a){this.fileSpaceGroup=a;this.cellRange=null;this.sgName=a.getName();this.intlTableJmolId=a.jmolId;this.intlTableNo=a.itaNumber;
this.latticeType=a.latticeType;this.symmetryOperations=a.finalOperations;this.coordinatesAreFractional=!0;this.setInfo(a.getOperationCount())},"JS.SpaceGroup");d(b,"setSymmetryInfoFromFile",function(a,c){var b=a.remove("spaceGroupIndex");this.spaceGroupIndex=null==b?0:b.intValue();this.cellRange=a.remove("ML_unitCellRange");this.sgName=a.get("spaceGroup");this.isSpinSpaceGroup=null!=this.sgName&&this.sgName.startsWith("spinSG:");this.spaceGroupF2C=a.remove("f2c");this.spaceGroupF2CTitle=a.remove("f2cTitle");
this.spaceGroupF2CParams=a.remove("f2cParams");this.sgTitle=a.remove("spaceGroupTitle");this.strSUPERCELL=a.remove("supercell");if(null==this.sgName||""===this.sgName)this.sgName="spacegroup unspecified";this.intlTableNo=a.get("intlTableNo");this.intlTableIndexNdotM=a.get("intlTableIndex");this.intlTableTransform=a.get("intlTableTransform");this.intlTableJmolId=a.remove("intlTableJmolId");b=a.get("latticeType");this.latticeType=null==b?"P":b.charAt(0);this.symmetryOperations=a.remove("symOpsTemp");
this.isMultiCell=(this.coordinatesAreFractional=a.containsKey("coordinatesAreFractional")?a.get("coordinatesAreFractional").booleanValue():!1)&&null!=this.symmetryOperations;null==c&&(c=a.get("unitCellParams"));c=JU.SimpleUnitCell.isValid(c)?c:null;null==c?(this.coordinatesAreFractional=!1,this.cellRange=this.symmetryOperations=null,this.infoStr="",a.remove("unitCellParams"),this.slop=NaN):26<c.length&&(this.slop=c[26]);b=a.containsKey("symmetryCount")?a.get("symmetryCount").intValue():0;this.setInfo(b);
return c},"java.util.Map,~A");d(b,"setInfo",function(a){var c="Spacegroup: "+this.sgName;if(null!=this.symmetryOperations){for(var b="",e="\nNumber of symmetry operations: "+(0==a?1:a)+"\nSymmetry Operations:",d=0;d<a;d++){var g=this.symmetryOperations[d],e=e+("\n"+g.fixMagneticXYZ(g,g.xyz));g.isCenteringOp&&(b+=" ("+JU.PT.rep(JU.PT.replaceAllCharacters(g.xyz,"xyz","0"),"0+","")+")")}0<b.length&&(c+="\nCentering: "+b);c=c+e+"\n"}this.infoStr=c},"~N");d(b,"getAdditionalOperations",function(){null==
this.additionalOperations&&null!=this.symmetryOperations&&(this.additionalOperations=JS.SymmetryOperation.getAdditionalOperations(this.symmetryOperations,115));return this.additionalOperations});d(b,"getDerivedSpaceGroup",function(){null==this.sgDerived&&(this.sgDerived=JS.SpaceGroup.getSpaceGroupFromIndex(this.spaceGroupIndex));return this.sgDerived});d(b,"setIsCurrentCell",function(a){return this.isCurrentCell!=a&&!0==(this.isCurrentCell=a)},"~B");d(b,"getSpaceGroupTitle",function(){return this.isCurrentCell&&
null!=this.spaceGroupF2CTitle?this.spaceGroupF2CTitle:this.sgName.startsWith("cell=")?this.sgName:this.sgTitle});d(b,"getDisplayName",function(a){if(null==this.displayName){var c=a.isPolymer(),b=a.isSlab();a=c?"polymer":b?"slab":this.getSpaceGroupTitle();if(null==a)return null;a.startsWith("cell=!")&&(a="cell=inverse["+a.substring(6)+"]");a=JU.PT.rep(a,";0,0,0","");if(!this.isSpinSpaceGroup&&0>a.indexOf("#")){var e=this.intlTableTransform,d=this.intlTableIndexNdotM;!b&&(!c&&null!=d)&&(null!=e&&(c=
a.indexOf(e),0<=c&&(a=JU.PT.rep(a,"("+e+")","")),0>d.indexOf(e)&&(c=d.indexOf("."),0<c&&(d=d.substring(0,c)),d+=":"+e)),a=(a.startsWith("0")?"":a.equals("unspecified!")?"#":a+" #")+d)}0<=a.indexOf("-- [--]")&&(a="");this.displayName=a}return this.displayName},"JS.Symmetry");d(b,"getClegId",function(){if(null==this.itaNo){this.itaNo=this.intlTableIndexNdotM;if(null==this.itaNo||0<this.itaNo.indexOf(":"))return this.itaNo;var a=this.itaNo.indexOf(".");this.itaNo=(0<a?this.itaNo.substring(0,a):this.itaNo)+
":"+this.intlTableTransform}return this.itaNo});d(b,"getFileSpaceGroup",function(){return this.fileSpaceGroup})});aa("JS");N(["JU.P3","$.V3"],"JS.SymmetryDesc","java.util.Hashtable JU.A4 $.BS $.Lst $.M3 $.M4 $.Measure $.P4 $.PT $.Quat $.SB J.api.Interface JS.T JS.SpaceGroup $.Symmetry $.SymmetryOperation JU.Escape $.Logger $.Vibration".split(" "),function(){var b=I(function(){this.drawID=this.modelSet=null;this.iModelSpin=this.iModel=0;S(this,arguments)},JS,"SymmetryDesc",null);d(b,"set",function(a){this.modelSet=
a;return this},"JM.ModelSet");d(b,"getSymopInfoForPoints",function(a,c,b,e,d,g,h,k,l,j,q,m){e=m.get(22)||m.get(3)&&3==m.cardinality();m.clear(22);var t=e?"":null;l=this.getSpaceGroupInfo(a,c,null,b,d,g,h,l,j,!1,!0,q,null,m);if(null==l)return t;a=l.get("operations");if(null==a)return t;c=e?new JU.SB:null;b--;d=!e&&0>b;g=l.get("symmetryInfo");l=l.get("spaceGroupNote");g+=null==l?"":"\n"+l.$replace(":"," ");j="label".equals(k);for(l=k=0;l<a.length;l++)if(!(null==a[l]||0<=b&&b!=l))if(e){if(null!=h)return a[l][3]+
"\nprint "+JU.PT.esc(g);0<c.length()&&c.appendC("\n");j||(0>b&&c.appendI(l+1).appendC("\t"),c.append(a[l][0]).appendC("\t"));c.append(a[l][2])}else{if(!d)return a[l];a[k++]=a[l]}if(!e){b=Array(k);for(l=0;l<k;l++)b[l]=a[l];return b}return 0==c.length()?null!=h?'draw ID "'+h+'*" delete':t:c.toString()},"J.api.SymmetryInterface,~N,~N,JU.P3,JU.P3,JU.P3,~S,~S,~N,~N,~N,JU.BS");d(b,"getDrawID",function(a){return this.drawID+a+'" '},"~S");d(b,"getSymopInfo",function(a,c,b,e,d,g,h,k,l,j,q,m){0==k&&(k=JS.SymmetryDesc.getType(h));
var t=1153433601==k?new JU.BS:"";this.iModel=0<=a?this.modelSet.at[a].mi:this.modelSet.vwr.am.cmi;if(0>this.iModel)return t;this.iModelSpin=this.modelSet.getJmolDataFrameInt(this.iModel,1095241729);var s=this.modelSet.am[this.iModel].biosymmetry;if(null==s&&null==(s=this.modelSet.getUnitCell(this.iModel)))s=(new JS.Symmetry).setUnitCellFromParams(null,!1,NaN);if(135176!=k||2147483647!=b&&null==m)return this.getSymmetryInfo(a,s,c,b,e,d,g,h,k,l,j,q,!1);if(null==s)return t;k="";b=null==c&&(0>j&&null==
m)&&-2==j?s.getAdditionalOperations():s.getSymmetryOperations();if(null!=b)if(null==h&&(h="sg"),t=b.length,null!=d&&null==g||null!=m){null==m&&(m=s.getInvariantSymops(d,null));for(var t=m.length,r=0;r<t;r++)0<j&&j!=r+1||(b=m[r],k+=this.getSymmetryInfo(a,s,c,b,e,d,g,h+b,135176,l,j,q,null==d))}else for(b=1;b<=t;b++)k+=this.getSymmetryInfo(a,s,c,b,e,d,g,h+b,135176,l,j,q,!0);return k},"~N,~S,~N,JU.P3,JU.P3,JU.P3,~S,~N,~N,~N,~N,~A");d(b,"getSpaceGroupInfo",function(a,c,b,e,d,g,h,k,l,j,m,p,t,s){null==s&&
(s=new JU.BS,s.setBits(0,JS.SymmetryDesc.keys.length),s.clear(19));var r=1==s.cardinality()&&s.get(10),n=null,z=!r&&null==d&&null==h&&0>=l&&s.cardinality()>=JS.SymmetryDesc.keys.length,u=!1,w=null,y=null!=b&&0<b.length,B=y&&0<=b.indexOf("[--]");if(m||!y){var x=z&&0==e;if(r)t=a;else{0>c&&(c=R(d,"JM.Atom")?d.mi:this.modelSet.vwr.am.cmi);if(0>c)w="no single current model";else if(null==t&&!(u=null!=(t=this.modelSet.am[c].biosymmetry))&&null==(t=this.modelSet.getUnitCell(c)))w="not applicable";null!=
w?(n=new java.util.Hashtable,n.put("spaceGroupInfo",""),n.put("spaceGroupNote",w),n.put("symmetryInfo","")):z&&(n=this.modelSet.getInfo(c,"spaceGroupInfo"));if(null!=n)return n;b=t.getSpaceGroupName()}var w=t.getDimensionality(),n=new java.util.Hashtable,D=t.getSymmetryOperations(),A=u?t.spaceGroup:null,z=B?"":null,C=0;if(null!=D){a=J.api.Interface.getSymmetry(null,"desc");if(!r)if(u)a.setSpaceGroupTo(JS.SpaceGroup.getNull(!1,!1,!1));else if(a.setSpaceGroup(!1),0!=t.getGroupType()){var E=t.getSpaceGroup(),
F=a.getSpaceGroup();F.nDim=w;F.groupType=E.groupType;F.setClegId(E.getClegId())}for(var E=Array(D.length),F="",I=null==h||null==d||null==g&&0>l?0:1,Y=0;I<D.length&&Y!=l;I++){var L=D[I],G=L.xyzOriginal,W=L.xyzCanonical,O=L.spinU,S=L.timeReversal,$=L.spinIndex,M;if(r)M=I;else{M=!(0==I&&0<=L.xyz.indexOf("x4"))&&null!=a.getSpaceGroupOperation(I)?I:u?a.addBioMoleculeOperation(A.finalOperations[I],!1):a.addSpaceGroupOperation("="+L.xyz,I+1);if(0>M)continue;L=a.getSpaceGroupOperation(I);if(null==L)continue;
L.xyzOriginal=G;L.xyzCanonical=W;L.spinU=O;L.spinIndex=$;L.timeReversal=S}null!=z&&(z+=";"+L.xyz);L=0<e&&e-1!=M?null:this.createInfoArray(L,t,d,g,h,k,p,!1,s,!1,!1,w);if(null!=L&&(Y++,!(0<l&&Y!=l)&&(E[I]=L,r||(F+="\n"+(I+1)+(null!=h&&1==Y?"*":"")+"\t"+L[s.get(19)?19:2==w?18:0]+"\t  "+L[2]),C++,0<e)))break}n.put("operations",E);r||n.put("symmetryInfo",0==F.length?"":F.substring(1))}if(r)return n;w=0==C?"\n no symmetry operations":0>=l&&0>=e?"\n"+C+" symmetry operation"+(1==C?":\n":"s:\n"):"";null!=
z&&(b=z.substring(z.indexOf(";")+1));x&&this.modelSet.setInfo(c,"spaceGroupInfo",n)}else n=new java.util.Hashtable;n.put("spaceGroupName",b);n.put("spaceGroupNote",null==w?"":w);if(u)a=b;else if(y&&!B&&a.setSpaceGroupName(b),a=a.getSpaceGroupInfoObj(b,null==t?null:t.getUnitCellParams(),j,!m),null==a||a.equals("?"))a="?",n.put("spaceGroupNote","could not identify space group from name: "+b+'\nformat: show spacegroup "2" or "P 2c" or "C m m m" or "x, y, z;-x ,-y, -z"\n');n.put("spaceGroupInfo",a);return n},
"J.api.SymmetryInterface,~N,~S,~N,JU.P3,JU.P3,~S,~N,~N,~B,~B,~N,J.api.SymmetryInterface,JU.BS");d(b,"getTransform",function(a,c,b,e,d){JS.SymmetryDesc.pta02.setT(e);JS.SymmetryDesc.vtrans.setT(JS.SymmetryDesc.pta02);a.unitize(JS.SymmetryDesc.pta02);e=3.4028235E38;for(var g=-1,h=0,k=c.length;h<k;h++){var l=c[h];JS.SymmetryDesc.pta01.setT(b);l.rotTrans(JS.SymmetryDesc.pta01);JS.SymmetryDesc.ptemp.setT(JS.SymmetryDesc.pta01);a.unitize(JS.SymmetryDesc.pta01);var j=JS.SymmetryDesc.pta01.distanceSquared(JS.SymmetryDesc.pta02);
if(1.96E-6>j){JS.SymmetryDesc.vtrans.sub(JS.SymmetryDesc.ptemp);JS.SymmetryOperation.normalize12ths(JS.SymmetryDesc.vtrans);l=JU.M4.newM4(l);l.add(JS.SymmetryDesc.vtrans);JS.SymmetryDesc.pta01.setT(b);l.rotTrans(JS.SymmetryDesc.pta01);a.unitize(JS.SymmetryDesc.pta01);j=JS.SymmetryDesc.pta01.distanceSquared(JS.SymmetryDesc.pta02);if(1.96E-6<=j)continue;return l}j<e&&(e=j,g=h)}d&&(l=c[g],JS.SymmetryDesc.pta01.setT(b),l.rotTrans(JS.SymmetryDesc.pta01),a.unitize(JS.SymmetryDesc.pta01));return null},"JS.UnitCell,~A,JU.P3,JU.P3,~B");
b.getType=d(b,"getType",function(a){var c;if(null==a)return 1073742001;switch(a.toLowerCase()){case "xyzcanonical":return 1111492629;case "xyzoriginal":return 1073742078;case "matrix":return 12;case "description":return 1825200146;case "axispoint":return 134217751;case "time":return 268441089;case "info":return 1275068418;case "element":return 1086326789;case "invariant":return 36868}c=JS.T.getTokFromName(a);if(0!=c)return c;c=JS.SymmetryDesc.getKeyType(a);return 0>c?c:1073742327},"~S");b.getKeyType=
d(b,"getKeyType",function(a){"type".equals(a)&&(a="_type");for(var c=0;c<JS.SymmetryDesc.keys.length;c++)if(a.equalsIgnoreCase(JS.SymmetryDesc.keys[c]))return-1-c;return 0},"~S");b.nullReturn=d(b,"nullReturn",function(a){switch(a){case 135176:return";draw ID sym* delete;draw ID sg* delete;";case 1073741961:case 1825200146:case 1073741974:case 1145047049:case 1145047053:case 11:case 1111492629:case 1073742078:case 1145045003:case 1095241729:return"";case 1153433601:return new JU.BS;default:return null}},
"~N");b.getInfo=d(b,"getInfo",function(a,c,b){if(0==a.length)return"";if(0>c&&-c<=JS.SymmetryDesc.keys.length&&-c<=a.length)return a[-1-c];switch(c){case 1073742327:case 1073741982:return a;case 1275068418:c=new java.util.Hashtable;b=0;for(var e=a.length;b<e;b++){var d=3==b?"draw":7==b?"axispoint":JS.SymmetryDesc.keys[b];null!=a[b]&&c.put(d,a[b])}return c;case 1073742001:return a[16]+"\t"+a[2==b?18:0]+"  \t"+a[2];case 1073741961:return a[0]+"  \t"+a[2];case 1145047049:return a[0];case 1145047053:return a[19];
case 1111492629:return a[18];case 1073742078:return a[1];default:case 1825200146:return a[2];case 134217764:if(!JU.Logger.debugging)return a[3];case 135176:return a[3]+"\nprint "+JU.PT.esc(a[0]+" "+a[2]);case 1145047050:return a[4];case 1073742178:return a[5];case 12289:return a[6];case 134217751:return a[7];case 1095241729:return a[20];case 1073741854:return a[8];case 134217729:return a[9];case 1145045003:case 12:return a[10];case 1814695966:return a[11];case 4160:return a[12];case 268441089:return a[13];
case 134217750:return a[14];case 1140850696:return a[15];case 1073741974:return a[16];case 1086326789:return C(-1,[a[6],a[7],a[8],a[14],a[5]]);case 36868:return null!=a[6]?a[6]:null!=a[8]?C(-1,[a[7],a[8],a[5]]):null!=a[5]?"none":null!=a[14]?a[14]:"identity"}},"~A,~N,~N");b.getInfoBS=d(b,"getInfoBS",function(a){var c=new JU.BS;if(0>a&&-a<=JS.SymmetryDesc.keys.length)return c.set(-1-a),c;switch(a){case 0:case 1153433601:case 1073742001:case 1073742327:case 1073741982:case 1275068418:c.setBits(0,JS.SymmetryDesc.keys.length);
break;case 1073741961:c.set(0);c.set(2);break;case 1145047049:c.set(0);break;case 1145047053:c.set(19);break;case 1111492629:c.set(18);break;case 1073742078:c.set(1);break;default:case 1825200146:c.set(2);break;case 135176:c.set(0);c.set(2);c.set(3);break;case 1145047050:c.set(4);break;case 1073742178:c.set(5);break;case 12289:c.set(6);break;case 134217751:c.set(7);break;case 1095241729:c.set(20);break;case 1073741854:c.set(8);break;case 134217729:c.set(9);break;case 12:c.set(10);break;case 1814695966:c.set(11);
break;case 4160:c.set(12);break;case 268441089:c.set(13);break;case 134217750:c.set(14);break;case 1140850696:c.set(15);break;case 1073741974:c.set(16);break;case 1086326789:case 36868:c.set(5),c.set(6),c.set(7),c.set(8),c.set(14),c.set(23)}return c},"~N");d(b,"createInfoArray",function(a,c,b,e,d,g,h,k,l,j,m,p){a.doFinalize();var t=(new Boolean(l.get(10)&l.cardinality()==(l.get(24)?2:1))).valueOf(),s=-1==a.timeReversal,r=null!=a.spinU,n=0!=a.timeReversal||r;0==g&&(g=1);JS.SymmetryDesc.vtrans.set(0,
0,0);var z=null,u=null==b||Float.isNaN(b.x)?c.getCartesianOffset():b;if(null!=e){JS.SymmetryDesc.pta01.setT(u);JS.SymmetryDesc.pta02.setT(e);c.toFractional(JS.SymmetryDesc.pta01,!1);c.toFractional(JS.SymmetryDesc.pta02,!1);a.rotTrans(JS.SymmetryDesc.pta01);JS.SymmetryDesc.ptemp.setT(JS.SymmetryDesc.pta01);c.unitize(JS.SymmetryDesc.pta01);JS.SymmetryDesc.vtrans.setT(JS.SymmetryDesc.pta02);c.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 w=JU.M4.newM4(a);w.add(JS.SymmetryDesc.vtrans);l.get(10)&&(null!=e&&u.equals(e))&&(w.m00=Math.round(w.m00),w.m01=Math.round(w.m01),w.m02=Math.round(w.m02),w.m03=Math.round(w.m03),w.m10=Math.round(w.m10),w.m11=Math.round(w.m11),w.m12=Math.round(w.m12),w.m13=Math.round(w.m13),w.m20=Math.round(w.m20),w.m21=Math.round(w.m21),w.m22=Math.round(w.m22),w.m23=Math.round(w.m23));if(t&&!n){var C=JS.SymmetryDesc.getKeyType("matrix"),B=Array(-C);B[-1-C]=l.get(24)?
JS.SymmetryOperation.matrixToRationalString(w):w;return B}var x=new JU.V3;JS.SymmetryDesc.pta01.set(1,0,0);JS.SymmetryDesc.pta02.set(0,1,0);var D=JU.P3.new3(0,0,1);JS.SymmetryDesc.pta01.add(u);JS.SymmetryDesc.pta02.add(u);D.add(u);var A=JS.SymmetryDesc.rotTransCart(a,c,u,JS.SymmetryDesc.vtrans),F=JS.SymmetryDesc.rotTransCart(a,c,JS.SymmetryDesc.pta01,JS.SymmetryDesc.vtrans),I=JS.SymmetryDesc.rotTransCart(a,c,JS.SymmetryDesc.pta02,JS.SymmetryDesc.vtrans),Q=JS.SymmetryDesc.rotTransCart(a,c,D,JS.SymmetryDesc.vtrans),
O=JU.V3.newVsub(F,A),Y=JU.V3.newVsub(I,A),L=JU.V3.newVsub(Q,A);JS.SymmetryOperation.approx6Pt(JS.SymmetryDesc.vtrans);var G=new JU.V3;G.cross(O,Y);var W=0>G.dot(L);W&&(F.sub2(A,O),I.sub2(A,Y),Q.sub2(A,L));var S=JU.Quat.getQuaternionFrame(A,F,I).div(JU.Quat.getQuaternionFrame(u,JS.SymmetryDesc.pta01,JS.SymmetryDesc.pta02)),$=JU.Quat.new4(S.q1,S.q2,S.q3,S.q0),ba=JU.Measure.computeHelicalAxis(u,A,$),M=JU.P3.newP(ba[0]),T=JU.P3.newP(ba[1]),N=y(Math.abs(JU.PT.approx(ba[3].x,1))),aa=JS.SymmetryOperation.approx(ba[3].y);
W&&(F.add2(A,O),I.add2(A,Y),Q.add2(A,L));var U=JU.V3.newVsub(A,u);0.1>U.length()&&(U=null);var V=null,Z=null,K=null,ca=null,ja=0,pa=0,sa=0==N,ea=!sa,Oa=!1,ma=!1,Fa=!ea&&!W;if(ea||W)U=null;var xa=!1,Ua=c.getPeriodicity(),Va=0==(Ua&1),Pa=0==(Ua&2),Ha=0==(Ua&4),ca=JU.V3.new3(0,0,1);if(3==p)switch(Ua){case 1:ca=JU.V3.new3(1,0,0);xa=!0;break;case 2:xa=!0;ca=JU.V3.new3(0,1,0);break;case 4:xa=!0}var Ga=!(Va||Pa||Ha),ya=Math.abs(T.dot(ca)/ca.length()/T.length());0.001>Math.abs(ya-1)?(xa=!1,ca=null):Ga=!xa;
if(W&&sa)Z=JU.P3.newP(u),Z.add(A),Z.scale(0.5),V=A,Oa=!0;else if(W){var wa=0==aa?new JU.V3:T,Qa=0;switch(N){case 60:Qa=0.6666667;break;case 120:Qa=2;break;case 90:Qa=1;break;case 180:K=JU.P3.newP(u);K.add(wa);M.scaleAdd2(0.5,wa,u);0.1<K.distance(A)?(U=JU.V3.newVsub(A,K),x.setT(U),c.toFractional(x,!0)):U=null;G.setT(T);G.normalize();ja=-G.x*M.x-G.y*M.y-G.z*M.z;z=JU.P4.new4(G.x,G.y,G.z,ja);pa=0.01>Math.abs(ja)&&0.4<G.x*G.y?1.3:1.05;W=ea=!1;ma=!0;if(Ha&&(ca=JU.V3.newVsub(u,D),ya=Math.abs(T.dot(ca)/ca.length()/
T.length()),Ha=0.001>ya))ca.scale(0.5),c.toCartesian(ca,!0);if(Pa){var ka=JU.V3.newVsub(u,JS.SymmetryDesc.pta02),ya=xa?0:Math.abs(T.dot(ka)/ka.length()/T.length());if(Pa=0.001>ya)ka.scale(0.5),c.toCartesian(ka,!0),Ha?ca.add(ka):ca=ka}if(Va&&(ka=JU.V3.newVsub(u,JS.SymmetryDesc.pta01),ya=xa?0:Math.abs(T.dot(ka)/ka.length()/T.length()),Va=0.001>ya))ka.scale(0.5),c.toCartesian(ka,!0),Pa||Ha?ca.add(ka):ca=ka;break;default:W=!1}0!=Qa&&(G.sub2(u,M),G.add(A),G.sub(M),G.sub(wa),G.scale(Qa),M.add(G),Z=new JU.P3,
Z.scaleAdd2(0.5,wa,M),V=new JU.P3,V.scaleAdd2(-2,Z,A),V.scale(-1))}else null!=U&&(JS.SymmetryDesc.ptemp.setT(U),c.toFractional(JS.SymmetryDesc.ptemp,!1),x.setT(JS.SymmetryDesc.ptemp),c.toCartesian(JS.SymmetryDesc.ptemp,!1),U.setT(JS.SymmetryDesc.ptemp));var za=N;JS.SymmetryDesc.approx0(T);if(ea){var da=new JU.P3;G.setT(T);var eb=N,Wa;W?(da.setT(V),Wa=V):0==aa?(Wa=A,da.setT(M)):(Wa=A,da.scaleAdd2(0.5,G,M));JS.SymmetryDesc.ptemp.add2(M,G);eb=Math.round(JU.Measure.computeTorsion(u,M,JS.SymmetryDesc.ptemp,
Wa,!0));0!=JS.SymmetryOperation.approx(eb)&&(N=eb,0>N&&(N=360+N))}var ga=null,ta=null,Aa=String.fromCharCode(0),Ma=a.isIrrelevant,qa=a.getOpOrder();a.isIrrelevant=(new Boolean(a.isIrrelevant|Ma)).valueOf();var na=a.getOpIsCCW(),la=0,ua=0;if(l.get(2)||l.get(15)){ga=ta="identity";if(Oa)JS.SymmetryDesc.ptemp.setT(Z),c.toFractional(JS.SymmetryDesc.ptemp,!1),ga="Ci: "+JS.SymmetryDesc.strCoord(JS.SymmetryDesc.ptemp,a.isBio),ta="inversion center";else if(ea){var Xa="";null!=na&&(Xa=na===Boolean.TRUE?"(+)":
"(-)",la=na===Boolean.TRUE?1:-1,W&&-1==la&&(Ma=!0));ua=E(360/za);W?ga=ua+"-bar"+Xa+" axis":0!=aa?(JS.SymmetryDesc.ptemp.setT(T),c.toFractional(JS.SymmetryDesc.ptemp,!0),ga=ua+Xa+" ("+JS.SymmetryDesc.strCoord(JS.SymmetryDesc.ptemp,a.isBio)+") screw axis"):(ga=ua+Xa+" axis",0==qa%2&&(la*=E(qa/2)));ta=ga}else if(null!=U){var ha=" "+JS.SymmetryDesc.strCoord(x,a.isBio);2==p&&(ha=ha.substring(0,ha.lastIndexOf(" ")));sa?(ta=ga="translation",ga+=":"+ha):ma&&(j&&(JS.SymmetryDesc.fixGlideTrans(x),U.setT(x),
c.toCartesian(U,!0)),ha=" "+JS.SymmetryDesc.strCoord(x,a.isBio),2==p&&(ha=ha.substring(0,ha.lastIndexOf(" "))),Aa=JS.SymmetryOperation.getGlideFromTrans(x,T),ta=ga=Aa+"-glide plane",ga+="|translation:"+ha)}else ma&&(ta=ga="mirror plane");W&&!Oa&&(JS.SymmetryDesc.ptemp.setT(Z),c.toFractional(JS.SymmetryDesc.ptemp,!1),ga+="|at "+JS.SymmetryDesc.strCoord(JS.SymmetryDesc.ptemp,a.isBio));s&&(ga+="|time-reversed",ta+=" (time-reversed)")}var fb=!0,Na=ea&&!W&&0!=aa;Na||(la=0,fb=JS.SymmetryDesc.checkHandedness(c,
T),fb||(N=-N,0>N&&(N=360+N),T.scale(-1)));for(var Ia=!1,Ja=null,bb=0<=this.iModelSpin&&r;null!=d&&l.get(3);){if(0==a.getOpType()||m&&a.isIrrelevant){JU.Logger.debugging&&System.out.println("!!SD irrelevent "+a.getOpTitle()+a.getOpPoint());Ja="";break}var ra=null;this.drawID='\ndraw ID "'+d;var H=new JU.SB;H.append(this.getDrawID("*")).append(" delete");var Ra=3==p;j||(this.drawLine(H,"frame1X",0.15,u,JS.SymmetryDesc.pta01,"red"),this.drawLine(H,"frame1Y",0.15,u,JS.SymmetryDesc.pta02,"green"),Ra&&
this.drawLine(H,"frame1Z",0.15,u,D,"blue"));var ia,Sa=null,gb=0,Ba=0.2>u.distance(A),oa=j?"<hover>"+d+": "+(2==p?a.xyz.$replace(",z",""):a.xyz)+"|"+ga+"</hover>":null;if(ea){ia=2==ua?"red":3==ua?"[xA00040]":4==ua?"[x800080]":"[x4000A0]";var za=N,ib=1;G.setT(T);var Ya="";j&&(M.setT(a.getOpPoint()),c.toCartesian(M,!1));da=new JU.P3;0!=aa&&!W?(ra="screw",ia=na===Boolean.TRUE?"orange":na===Boolean.FALSE?"blue":4==qa?"lightgray":"grey",j||(this.drawLine(H,"rotLine1",0.1,u,M,"red"),JS.SymmetryDesc.ptemp.add2(M,
G),this.drawLine(H,"rotLine2",0.1,A,JS.SymmetryDesc.ptemp,"red"),da.scaleAdd2(0.5,G,M))):(da.setT(M),fb||!Ba&&!j&&M.sub2(M,G),W?(ra="bar",j?(G.normalize(),na===Boolean.TRUE&&G.scale(-1)):0==aa?(da.setT(Z),G.scale(3*g),Ba?(JS.SymmetryDesc.ptemp.scaleAdd2(0.25,G,M),M.scaleAdd2(-0.24,G,M),da.scaleAdd2(0.31,G,da),ia="cyan"):(JS.SymmetryDesc.ptemp.scaleAdd2(-1,G,M),this.drawLine(H,"rotLine1",0.1,u,Z,"red"),this.drawLine(H,"rotLine2",0.1,V,Z,"red"))):Ba||(ib=u.distance(da),this.drawLine(H,"rotLine1",0.1,
u,da,"red"),this.drawLine(H,"rotLine2",0.1,V,da,"red"))):(ra="rot",G.scale(3*g),!Ba&&!j&&(this.drawLine(H,"rotLine1",0.1,u,da,"red"),this.drawLine(H,"rotLine2",0.1,A,da,"red")),da.setT(M),0==aa&&Ba&&da.scaleAdd2(0.25,G,da)));j||(180<za&&(za=180-za),JS.SymmetryDesc.ptemp.add2(da,G),H.append(this.getDrawID("rotRotArrow")).append(" arrow width 0.1 scale "+JU.PT.escF(ib)+" arc ").append(JU.Escape.eP(da)).append(JU.Escape.eP(JS.SymmetryDesc.ptemp)),JS.SymmetryDesc.ptemp.setT(u),0.1>JS.SymmetryDesc.ptemp.distance(A)&&
JS.SymmetryDesc.ptemp.set(Math.random(),Math.random(),Math.random()),H.append(JU.Escape.eP(JS.SymmetryDesc.ptemp)),JS.SymmetryDesc.ptemp.set(0,za-5*Math.signum(za),0),H.append(JU.Escape.eP(JS.SymmetryDesc.ptemp)).append(" color red"));var Za=0;!a.opIsLong&&(m&&0<aa&&!W)&&(Ia=(Za=a.getOpTrans().length())>(2==qa?0.71:3==qa?0.578:0.51));Ia&&JU.Logger.debugging&&System.out.println("SD ignoring "+a.getOpTrans().length()+" "+a.getOpTitle()+a.xyz);var hb=null;if(0==aa&&!W){JS.SymmetryDesc.ptemp.scaleAdd2(0.5,
G,M);M.scaleAdd2(j?-0.5:-0.45,G,M);if(m&&Ga&&null!=(hb=a.getOpPoint2()))da.setT(hb),c.toCartesian(da,!1),da.scaleAdd2(-0.5,G,da);j&&this.scaleByOrder(G,qa,na)}else m&&0!=aa&&!W&&0.4<(wa=a.getOpTrans().length())?na!==Boolean.TRUE&&null!=na&&0.5==wa&&(Ia=!0):j&&W&&(this.scaleByOrder(G,qa,na),Ya="80");0<aa&&!W&&(Ya=""+(90-y(90*(G.length()/aa))));if(!Ia){if(0!=la){switch(qa){case 4:0.49<Za&&(la=-2);break;case 6:0.49<Za?la=-3:0.33<Za&&(la*=2)}ia=0>la?"blue":"orange"}var jb=(j?ra+"_"+ua:"")+"rotvector1";
this.drawOrderVector(H,jb,"vector","0.1"+Ya,M,ua,la,W&&m,na===Boolean.TRUE,G,s?"orange":ia,oa,m);null!=hb&&this.drawOrderVector(H,jb+"2","vector","0.1"+Ya,da,qa,la,W,na===Boolean.TRUE,G,s?"gray":ia,oa,m)}}else if(ma){JS.SymmetryDesc.ptemp.sub2(K,u);!j&&0.2<u.distance(K)&&this.drawVector(H,"planeVector","vector","0.05",u,JS.SymmetryDesc.ptemp,s?"gray":"cyan",null);ra="plane";if(null==U)ia="magenta";else{ra="glide";switch(Aa.charCodeAt(0)){case 97:ia="[x4080ff]";break;case 98:ia="blue";break;case 99:ia=
"cyan";break;case 110:ia="orange";break;case 100:ia="grey";break;default:ia="lightgreen"}j||(this.drawFrameLine("X",K,O,0.15,JS.SymmetryDesc.ptemp,H,"glideframe","red"),this.drawFrameLine("Y",K,Y,0.15,JS.SymmetryDesc.ptemp,H,"glideframe","green"),Ra&&this.drawFrameLine("Z",K,L,0.15,JS.SymmetryDesc.ptemp,H,"glideframe","blue"))}var kb=c.getCanonicalCopy(pa,!0);if(Va||Pa||Ha)for(var X=8;0<=--X;)kb[X].add(ca);var Ta=this.modelSet.vwr.getTriangulator().intersectPlane(z,kb,3);if(null!=Ta)for(var lb=j?
a.iCoincident:0,Sa=new JU.P3,mb=X=0,cb=Ta.size();X<cb;X++){var Ka=Ta.get(X);H.append(this.getDrawID((null==U?"mirror_":Aa+"_g")+"planep"+X)).append(JU.Escape.eP(Ka[0])).append(JU.Escape.eP(Ka[1]));3==Ka.length?((0==lb||0==mb%2!=(1==lb))&&H.append(JU.Escape.eP(Ka[2])),mb++):(Sa.add(Ka[0]),Sa.add(Ka[1]),gb+=2);H.append(" color translucent ").append(ia);null!=oa&&H.append(" ").append(JU.PT.esc(oa))}if(null==Ta||0==Ta.size())m?Ia=!0:(JS.SymmetryDesc.ptemp.add2(M,T),H.append(this.getDrawID("planeCircle")).append(" scale 2.0 circle ").append(JU.Escape.eP(M)).append(JU.Escape.eP(JS.SymmetryDesc.ptemp)).append(" color translucent ").append(ia).append(" mesh fill"),
null!=oa&&H.append(" ").append(JU.PT.esc(oa)))}W&&(ra="inv",Oa?(H.append(this.getDrawID("inv_point")).append(" diameter 0.4 ").append(JU.Escape.eP(Z)),null!=oa&&H.append(" ").append(JU.PT.esc(oa)),JS.SymmetryDesc.ptemp.sub2(V,u),j||this.drawVector(H,"Arrow","vector","0.05",u,JS.SymmetryDesc.ptemp,s?"gray":"cyan",null)):(4==qa&&(H.append(this.getDrawID("RotPoint")).append(" diameter 0.3 color red").append(JU.Escape.eP(Z)),null!=oa&&H.append(" ").append(JU.PT.esc(oa))),j||(H.append(" color cyan"),Ba||
(JS.SymmetryDesc.ptemp.sub2(A,V),this.drawVector(H,"Arrow","vector","0.05",V,JS.SymmetryDesc.ptemp,s?"gray":"cyan",null)),1073742066!=h&&(G.setT(O),G.scale(-1),this.drawFrameLine("X",V,G,0.15,JS.SymmetryDesc.ptemp,H,ra,"red"),G.setT(Y),G.scale(-1),this.drawFrameLine("Y",V,G,0.15,JS.SymmetryDesc.ptemp,H,ra,"green"),G.setT(L),G.scale(-1),Ra&&this.drawFrameLine("Z",V,G,0.15,JS.SymmetryDesc.ptemp,H,ra,"blue")))));if(null!=U&&(ma&&j?null!=Sa&&(K=Sa,K.scale(1/gb),K.scaleAdd2(-0.5,U,K)):null==K&&(K=j?u:
JU.P3.newP(u)),null!=K&&!Ia)){var nb="\x00"==Aa,$a=j&&!nb&&!Fa;$a?(JS.SymmetryDesc.ptemp.scaleAdd2(0.5,U,K),JS.SymmetryDesc.vtrans.setT(U),JS.SymmetryDesc.vtrans.scale(0.5)):(JS.SymmetryDesc.ptemp.setT(K),JS.SymmetryDesc.vtrans.setT(U));ia=$a?s?"orange":"green":s&&(r||!W&&!ma&&!ea)?"darkgray":"gold";this.drawVector(H,(nb?"centering_":Aa+"_g")+"trans_vector","vector",$a||Fa?"0.1":"0.05",JS.SymmetryDesc.ptemp,JS.SymmetryDesc.vtrans,ia,oa);$a&&(JS.SymmetryDesc.vtrans.scale(-1),this.drawVector(H,Aa+"_gtrans_vector2",
"vector","0.1",JS.SymmetryDesc.ptemp,JS.SymmetryDesc.vtrans,ia,oa))}j||(JS.SymmetryDesc.ptemp2.setT(A),JS.SymmetryDesc.ptemp.sub2(F,A),JS.SymmetryDesc.ptemp.scaleAdd2(0.9,JS.SymmetryDesc.ptemp,JS.SymmetryDesc.ptemp2),this.drawLine(H,"frame2X",0.2,JS.SymmetryDesc.ptemp2,JS.SymmetryDesc.ptemp,"red"),JS.SymmetryDesc.ptemp.sub2(I,A),JS.SymmetryDesc.ptemp.scaleAdd2(0.9,JS.SymmetryDesc.ptemp,JS.SymmetryDesc.ptemp2),this.drawLine(H,"frame2Y",0.2,JS.SymmetryDesc.ptemp2,JS.SymmetryDesc.ptemp,"green"),JS.SymmetryDesc.ptemp.sub2(Q,
A),JS.SymmetryDesc.ptemp.scaleAdd2(0.9,JS.SymmetryDesc.ptemp,JS.SymmetryDesc.ptemp2),Ra&&this.drawLine(H,"frame2Z",0.2,JS.SymmetryDesc.ptemp2,JS.SymmetryDesc.ptemp,"purple"),H.append("\nsym_point = "+JU.Escape.eP(u)),H.append("\nvar p0 = "+JU.Escape.eP(JS.SymmetryDesc.ptemp2)),R(u,"JM.Atom")?(H.append("\nvar set2 = within(0.2,p0);if(!set2){set2 = within(0.2,p0.uxyz.xyz)}"),H.append("\n set2 &= {_"+u.getElementSymbol()+"}")):H.append("\nvar set2 = p0.uxyz"),H.append("\nsym_target = set2;if (set2) {"),
!Ba&&(1073742066!=h&&null==e&&!k)&&(H.append(this.getDrawID("offsetFrameX")).append(" diameter 0.20 @{set2.xyz} @{set2.xyz + ").append(JU.Escape.eP(O)).append("*0.9} color red"),H.append(this.getDrawID("offsetFrameY")).append(" diameter 0.20 @{set2.xyz} @{set2.xyz + ").append(JU.Escape.eP(Y)).append("*0.9} color green"),Ra&&H.append(this.getDrawID("offsetFrameZ")).append(" diameter 0.20 @{set2.xyz} @{set2.xyz + ").append(JU.Escape.eP(L)).append("*0.9} color purple")),H.append("\n}\n"));Ja=H.toString();
JU.Logger.debugging&&JU.Logger.info(Ja);H=null;if(bb){var db=this.modelSet.getUnitCell(this.iModel),Ca=R(b,"JM.Atom")?b:null,Da=R(e,"JM.Atom")?e:null;if(null!=Ca&&null!=Da)var ob=this.modelSet.vwr.getModelUndeletedAtomsBitSet(this.iModelSpin),Ca=JU.Vibration.find(this.modelSet,ob,this.modelSet.getVibration(Ca.i,!1)),Da=JU.Vibration.find(this.modelSet,ob,this.modelSet.getVibration(Da.i,!1));if(null==Ca||null==Da)Ca=Da=null;ha=db.pointGroup.getInfo(this.iModelSpin,null==Ca?null:JU.P3.newP(Ca),null==
Da?null:JU.P3.newP(Da),d+"_pg",!1,a.getSUVW(),0,1);null!=ha&&(Ja+=";\n"+ha)}break}null==U&&(x=null);Na&&(U=JU.V3.newV(T),JS.SymmetryDesc.ptemp.setT(U),c.toFractional(JS.SymmetryDesc.ptemp,!1),x=JU.V3.newV(JS.SymmetryDesc.ptemp));ma&&(N=0);W?Oa&&(x=U=T=M=null):sa&&(T=M=null);null!=T&&T.normalize();var Ea=null;if(l.get(0)||l.get(17))Ea=a.isBio?w.toString():0<a.modDim?a.xyzOriginal:JS.SymmetryOperation.getXYZFromMatrix(w,!1,!1,!1),n?Ea=a.fixMagneticXYZ(w,Ea):2==p&&(Ea=Ea.$replace(",z",""));for(var fa=
Array(21),X=l.nextSetBit(0);0<=X;X=l.nextSetBit(X+1))switch(X){case 0:fa[X]=Ea;break;case 19:if(null!=b&&null==e&&!a.isBio&&0==a.modDim){var ab;JS.SymmetryDesc.pta02.setT(b);c.toFractional(JS.SymmetryDesc.pta02,!0);w.rotTrans(JS.SymmetryDesc.pta02);JS.SymmetryDesc.ptemp.setT(JS.SymmetryDesc.pta02);c.unitize(JS.SymmetryDesc.pta02);JS.SymmetryDesc.vtrans.sub2(JS.SymmetryDesc.pta02,JS.SymmetryDesc.ptemp);w=JU.M4.newM4(a);w.add(JS.SymmetryDesc.vtrans);ab=JS.SymmetryOperation.getXYZFromMatrix(w,!1,!1,
!1);n&&(ab=a.fixMagneticXYZ(w,ab));fa[X]=ab}break;case 1:fa[X]=a.xyzOriginal;break;case 2:fa[X]=ga;break;case 3:fa[X]=Ja;break;case 4:fa[X]=JS.SymmetryDesc.approx0(x);break;case 5:fa[X]=JS.SymmetryDesc.approx0(U);break;case 6:fa[X]=JS.SymmetryDesc.approx0(Z);break;case 7:fa[X]=JS.SymmetryDesc.approx0(null!=M&&l.get(23)?u:M);break;case 8:fa[X]=null==z?JS.SymmetryDesc.approx0(T):null;break;case 9:fa[X]=0!=N?Integer.$valueOf(N):null;break;case 10:fa[X]=w;break;case 11:fa[X]=0<JS.SymmetryDesc.vtrans.lengthSquared()?
JS.SymmetryDesc.vtrans:null;break;case 12:fa[X]=a.getCentering();break;case 13:fa[X]=Integer.$valueOf(a.timeReversal);break;case 14:null!=z&&l.get(23)&&(wa=JU.Measure.distanceToPlane(z,u),z.w-=wa);fa[X]=z;break;case 20:fa[X]=a.spinU;break;case 15:fa[X]=ta;break;case 16:fa[X]=Integer.$valueOf(a.number);break;case 17:var La=null;if(!a.isBio&&!Ea.equals(a.xyzOriginal)&&0<a.number){var pb=JS.SymmetryOperation.getMatrixFromXYZ(a.xyzOriginal,null,!1);pb.sub(w);La=new JU.P3;pb.getTranslation(La)}fa[X]=(0>
a.number?0:a.number)+(null==La?" [0 0 0]":" ["+y(-La.x)+" "+y(-La.y)+" "+y(-La.z)+"]");break;case 18:ha=a.xyzCanonical,null==ha&&(ha=a.xyz),2==p&&(ha=ha.$replace(",z","")),fa[X]=ha}return fa},"JS.SymmetryOperation,J.api.SymmetryInterface,JU.P3,JU.P3,~S,~N,~N,~B,JU.BS,~B,~B,~N");b.fixGlideTrans=d(b,"fixGlideTrans",function(a){a.x=JS.SymmetryDesc.fixGlideX(a.x);a.y=JS.SymmetryDesc.fixGlideX(a.y);a.z=JS.SymmetryDesc.fixGlideX(a.z)},"JU.V3");b.fixGlideX=d(b,"fixGlideX",function(a){switch(Math.round(48.001*
a)){case 36:return-0.25;case -36:return 0.25;default:return a}},"~N");d(b,"scaleByOrder",function(a,c,b){a.scale(1+0.3/c+(null==b?0:b===Boolean.TRUE?0.02:-0.02))},"JU.V3,~N,Boolean");b.checkHandedness=d(b,"checkHandedness",function(a,c){var b,e,d;JS.SymmetryDesc.ptemp.set(1,0,0);a.toCartesian(JS.SymmetryDesc.ptemp,!1);b=JS.SymmetryDesc.approx0d(JS.SymmetryDesc.ptemp.dot(c));JS.SymmetryDesc.ptemp.set(0,1,0);a.toCartesian(JS.SymmetryDesc.ptemp,!1);e=JS.SymmetryDesc.approx0d(JS.SymmetryDesc.ptemp.dot(c));
JS.SymmetryDesc.ptemp.set(0,0,1);a.toCartesian(JS.SymmetryDesc.ptemp,!1);d=JS.SymmetryDesc.approx0d(JS.SymmetryDesc.ptemp.dot(c));return 0==b?0==e?0<d:0<e:0==d?0<b:0==e?0<d:0<b*e*d},"J.api.SymmetryInterface,JU.P3");d(b,"drawLine",function(a,c,b,e,d,g){a.append(this.getDrawID(c)).append(" diameter ").appendD(b).append(JU.Escape.eP(e)).append(JU.Escape.eP(d)).append(" color ").append(g)},"JU.SB,~S,~N,JU.P3,JU.P3,~S");d(b,"drawFrameLine",function(a,c,b,e,d,g,h,k){d.setT(c);d.add(b);this.drawLine(g,h+
"Pt"+a,e,c,d,"translucent "+k)},"~S,JU.P3,JU.V3,~N,JU.P3,JU.SB,~S,~S");d(b,"drawVector",function(a,c,b,e,d,g,h,k){b.equals("vline")&&(JS.SymmetryDesc.ptemp2.add2(d,g),b="",g=JS.SymmetryDesc.ptemp2);a.append(this.getDrawID(c)).append(" diameter ").append(e+" ").append(b).append(JU.Escape.eP(d)).append(JU.Escape.eP(g)).append(" color ").append(h);null!=k&&a.append(' "'+k+'"')},"JU.SB,~S,~S,~S,JU.T3,JU.T3,~S,~S");d(b,"drawOrderVector",function(a,c,b,e,d,g,h,k,l,j,m,p,t){this.drawVector(a,c,b,e,d,j,m,
p);if(!(2==g||k&&!l)){b=JS.SymmetryDesc.getPolygon(g,!k?0:l?1:-1,k,d,j);e=b[0];a.append(this.getDrawID(c+"_key")).append(" POLYGON ").appendI(e.size());l=0;for(p=e.size();l<p;l++)a.appendO(e.get(l));a.append(" color ").append(m);if(0!=h&&t){b=JS.SymmetryDesc.getPolygon(g,h,k,d,j);a.append(this.getDrawID(c+"_key2"));e=b[0];a.append(" POLYGON ").appendI(e.size());l=0;for(p=e.size();l<p;l++)a.appendO(e.get(l));e=b[1];a.appendI(e.size());l=0;for(p=e.size();l<p;l++)a.appendO(JU.PT.toJSON(null,e.get(l)));
a.append(" color ").append(m)}}},"JU.SB,~S,~S,~S,JU.P3,~N,~N,~B,~B,JU.V3,~S,~S,~B");b.getPolygon=d(b,"getPolygon",function(a,c,b,e,d){var g=b?0.6:0.4,h=new JU.Lst,k=new JU.Lst,l=JU.V3.newV(d);l.scale(0);l.add(e);var j=JU.V3.new3(0,0,1),m=new JU.V3;e=new JU.M3;m.cross(j,d);0.01>m.length()?e.m00=e.m11=e.m22=1:(m.normalize(),d=j.angle(d),e.setAA(JU.A4.newVA(m,d)));d=6.283185307179586/a*(0>c?-1:1);for(var m=new JU.V3,p=null,t=j=0,s=0,r=0==c?a:a+1;s<r;s++){var n=new JU.P3;n.x=Math.cos(d*s)*g;n.y=Math.sin(d*
s)*g;e.rotate(n);n.add(l);s<a&&h.addLast(n);if(!b&&0!=c&&0==s%c&&null!=p){m.sub2(n,p);var p=s<a?t++:0,z=JU.P3.newP(n);z.scaleAdd2(1,n,z);z.scaleAdd2(-1,l,z);h.addLast(z);k.addLast(O(-1,[j,t++,p,0]));j=p}else j=t++;p=n}return C(-1,[h,k])},"~N,~N,~B,JU.P3,JU.V3");b.rotTransCart=d(b,"rotTransCart",function(a,c,b,e){b=JU.P3.newP(b);c.toFractional(b,!1);a.rotTrans(b);b.add(e);c.toCartesian(b,!1);return b},"JS.SymmetryOperation,J.api.SymmetryInterface,JU.P3,JU.V3");b.strCoord=d(b,"strCoord",function(a,
c){JS.SymmetryDesc.approx0(a);return c?"("+a.x+" "+a.y+" "+a.z+")":JS.SymmetryOperation.fcoord(a," ")},"JU.T3,~B");b.approx0=d(b,"approx0",function(a){null!=a&&(a.x=JS.SymmetryDesc.approx0d(a.x),a.y=JS.SymmetryDesc.approx0d(a.y),a.z=JS.SymmetryDesc.approx0d(a.z));return a},"JU.T3");b.approx0d=d(b,"approx0d",function(a){return 1E-4>Math.abs(a)?0:a},"~N");d(b,"getSymmetryInfo",function(a,c,b,e,d,g,h,k,l,j,m,p,t){var s=0,r=JS.SymmetryDesc.nullReturn(l),n=0;switch(l){case 1073741994:return""+c.getLatticeType();
case 1073742001:s=1073742001;break;case 135176:s=135176;break;case 1145045003:s=JS.SymmetryDesc.getKeyType("matrix");n=24;break;case 1275068418:switch(s=JS.SymmetryDesc.getType(k),s){case 1145045003:s=JS.SymmetryDesc.getKeyType("matrix");n=24;break;case 1095241729:case 1153433601:case 1073741961:case 1073742001:case 134217751:case 1086326789:case 36868:case 1111492629:case 1073742078:l=s;break;default:s=JS.SymmetryDesc.getKeyType(k)}}var z=JS.SymmetryDesc.getInfoBS(s);21<n&&z.set(n);var u=-2==m,w=
e,y=e,B=1073742066==p&&(1153433601==l||134217751==l)?h:null;null!=B&&(h=null);var x=w=null,D=null,n=null==c?3:c.getDimensionality();if(null==h){if(null==b){D=u?c.getAdditionalOperations():c.getSymmetryOperations();if(null==D||Math.abs(e)>D.length||0==e)return r;w=Math.abs(e)-1;b=null==d?D[w].xyz:D[w].getxyzTrans(d);x=D[w].xyzOriginal}else w=e=0;var A=new JS.Symmetry;A.setSpaceGroup(!1);var F=null!=c&&c.isBio();h=F?A.addBioMoleculeOperation(c.getSpaceGroup().finalOperations[w],0>e):A.addSpaceGroupOperation((0>
e?"!":"=")+(0<=b.indexOf("x")&&0>b.indexOf("z")?b+",z":b),Math.abs(e));if(0>h)return r;var E=A.getSpaceGroupOperation(h);t&&(E.iCoincident=D[w].iCoincident);u&&(E.isIrrelevant=D[w].isIrrelevant);null!=x&&(E.xyzOriginal=x,E.timeReversal=D[w].timeReversal,E.spinU=D[w].spinU);E.number=0==e?y:e;F||E.getCentering();null==g&&0<=a&&(g=this.modelSet.at[a]);if(134217751==l||1153433601==l){if(F||null==g)return r;A.setUnitCell(c);JS.SymmetryDesc.ptemp.setT(g);c.toFractional(JS.SymmetryDesc.ptemp,!1);if(Float.isNaN(JS.SymmetryDesc.ptemp.x))return r;
s=new JU.P3;A.newSpaceGroupPoint(JS.SymmetryDesc.ptemp,h,null,0,0,0,s);1073742066==p&&(c.unitize(s),s.add(B));A.toCartesian(s,!1);return 1153433601==l?this.getAtom(c,this.iModel,a,s):s}w=this.createInfoArray(E,c,g,null,null==k||k.equals("array")?"sym_":k,j,p,null!=d,z,t,u,n);1275068418==l&&(null!=k&&-11!=s)&&(s=JS.SymmetryDesc.getKeyType(k))}else{u="info";B=!1;switch(l){case 1275068418:-11!=s&&(s=JS.SymmetryDesc.getKeyType(k));k=u=null;0==m&&(m=-1);break;case 1073742001:k=u=null;0==m&&(m=-1);B=!0;
z.set(22);z.set(0);z.set(19);break;case 135176:null==k&&(k=t?"sg":"sym_");u="all";B=!0;break;case 1153433601:k=u=null;default:0==m&&(m=1)}p=this.getSymopInfoForPoints(c,this.iModel,e,d,g,h,k,u,j,m,p,z);if(B)return p;if("string"==typeof p)return r;w=p;if(1153433601==l)return!R(g,"JM.Atom")&&!R(h,"JM.Atom")&&(a=-1),null==w?r:this.getAtom(c,this.iModel,a,w[7])}if(null==w)return r;a=0<w.length&&R(w[0],Array);if(0>m&&0>=e&&null==b&&(1275068418==l||a)){1275068418==l&&(0<w.length&&!R(w[0],Array))&&(w=C(-1,
[w]));a=new JU.Lst;for(h=0;h<w.length;h++)a.addLast(JS.SymmetryDesc.getInfo(w[h],0>s?s:l,n));return a}if(0>s&&(0<=m||0<e||null!=b))l=s;0<m&&a&&(w=w[0]);135176==l&&(t&&-2==m)&&(l=134217764);return JS.SymmetryDesc.getInfo(w,l,n)},"~N,J.api.SymmetryInterface,~S,~N,JU.P3,JU.P3,JU.P3,~S,~N,~N,~N,~N,~B");d(b,"getAtom",function(a,c,b,e){var d=null;0<=b&&this.modelSet.getAtomBitsMDa(1094715402,Integer.$valueOf(this.modelSet.at[b].getElementNumber()),d=new JU.BS);b=new JU.BS;this.modelSet.getAtomsWithin(0.02,
e,b,c);null!=d&&b.and(d);b.isEmpty()&&(e=JU.P3.newP(e),a.toUnitCell(e,null),a.toCartesian(e,!1),this.modelSet.getAtomsWithin(0.02,e,b,c),null!=d&&b.and(d));return b},"J.api.SymmetryInterface,~N,~N,JU.T3");b.ptemp=new JU.P3;b.ptemp2=new JU.P3;b.pta01=new JU.P3;b.pta02=new JU.P3;b.vtrans=new JU.V3;b.keys=C(-1,["xyz","xyzOriginal","label",null,"fractionalTranslation","cartesianTranslation","inversionCenter",null,"axisVector","rotationAngle","matrix","unitTranslation","centeringVector","timeReversal",
"plane","_type","id","cif2","xyzCanonical","xyzNormalized","spin"])});aa("JS");N(["JU.SimpleUnitCell","JU.P3","JV.JC"],"JS.UnitCell","java.util.Hashtable JU.AU $.Lst $.M3 $.M4 $.P4 $.PT $.Quat $.V3 J.api.Interface JS.Symmetry JU.BoxInfo $.Escape $.Point3fi".split(" "),function(){var b=I(function(){this.moreInfo=null;this.name="";this.fractionalOffset=this.vertices=null;this.allFractionalRelative=!1;this.spinFrameToCartXYZ=this.spinFrameFromCartXYZ=this.f2c=this.unitCellMultiplied=this.unitCellMultiplier=
this.cartesianOffset=null;S(this,arguments)},JS,"UnitCell",JU.SimpleUnitCell,Cloneable);pa(b,function(){this.cartesianOffset=new JU.P3});b.fromOABC=d(b,"fromOABC",function(a,c){var b=new JS.UnitCell;3==a.length&&(a=C(-1,[new JU.P3,a[0],a[1],a[2]]));var e=F(-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]);b.init(e);b.allFractionalRelative=c;b.initUnitcellVertices();b.setCartesianOffset(a[0]);return b},"~A,~B");b.fromParams=d(b,"fromParams",function(a,c,b){var e=new JS.UnitCell;
e.init(a);e.initUnitcellVertices();e.allFractionalRelative=c;e.setPrecision(b);26<a.length&&(a[26]=b);return e},"~A,~B,~N");b.cloneUnitCell=d(b,"cloneUnitCell",function(a){var c=null;try{c=a.clone()}catch(b){if(!ba(b,"CloneNotSupportedException"))throw b;}return c},"JS.UnitCell");d(b,"checkPeriodic",function(a,c,b){c=Float.isNaN(c)?-this.slop:-c;b=Float.isNaN(b)?1-this.slop:1+b;switch(this.dimension){case 3:if(a.z<c||a.z>b)return!1;case 2:if(a.y<c||a.y>b)return!1;case 1:if(a.x<c||a.x>b)return!1}return!0},
"JU.P3,~N,~N");d(b,"isWithinUnitCell",function(a,c,b,e,d){Float.isNaN(e)&&(e=this.slop);switch(this.dimension){case 3:if(d.z<b-1-e||d.z>b+e)return!1;case 2:if(d.y<c-1-e||d.y>c+e)return!1;case 1:if(d.x<a-1-e||d.x>a+e)return!1}return!0},"~N,~N,~N,~N,JU.P3");d(b,"dumpInfo",function(a,c){var b=c?this.getUnitCellMultiplied():this;return b!==this?b.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(b,"fix000",function(a){return 0.001>Math.abs(a)?0:a},"~N");d(b,"fixFloor",function(a){return 1==a?0:a},"~N");d(b,"getCanonicalCopy",function(a,c){var b=this.getScaledCell(c);return JU.BoxInfo.getCanonicalCopy(b,a)},"~N,~B");d(b,"getCanonicalCopyTrimmed",function(a,c){var b=this.getScaledCellMult(a,!0);return JU.BoxInfo.getCanonicalCopy(b,
c)},"JU.P3,~N");d(b,"getCartesianOffset",function(){return this.cartesianOffset});d(b,"getCellWeight",function(a){var c=1;if(a.x<=this.slop||a.x>=1-this.slop)c/=2;if(a.y<=this.slop||a.y>=1-this.slop)c/=2;if(a.z<=this.slop||a.z>=1-this.slop)c/=2;return c},"JU.P3");d(b,"getConventionalUnitCell",function(a,c){var b=this.getUnitCellVectors();(!a.equals("P")||null!=c)&&this.toFromPrimitive(!1,a.charAt(0),b,c);return b},"~S,JU.M3");d(b,"getEquivalentPoints",function(a,c,b,e,d,g,h,k,l){var j=0<=c.indexOf("fromfractional");
c=0<=c.indexOf("tofractional");var m=0!=(k&1),p=0!=(k&2);k=0!=(k&4);var t=0<=a.sD,s=t?new JU.V3:null;null==e&&(e=new JU.Lst);var r=e.size(),n=JU.Point3fi.newPF(a,a.i);j||this.toFractional(n,!0);for(var j=0,z=b.length;j<z;j++){var u=JU.Point3fi.newPF(n,a.i);b[j].rotTrans(u);m&&(u.x=this.fixFloor(u.x-E(Math.floor(u.x))));p&&(u.y=this.fixFloor(u.y-E(Math.floor(u.y))));k&&(u.z=this.fixFloor(u.z-E(Math.floor(u.z))));t&&(s.set(a.sX,a.sY,a.sZ),b[j].rotateSpin(s),u.sX=Math.round(s.x),u.sY=Math.round(s.y),
u.sZ=Math.round(s.z),u.sD=a.sD);e.addLast(u);r++}if(0<=l){if(!k){b=JU.P3.new3(0,0,0.5);for(j=g;j<r;j++)e.get(j).add(b)}if(!p){b=JU.P3.new3(0,0.5,0);for(j=g;j<r;j++)e.get(j).add(b)}if(!m){b=JU.P3.new3(0.5,0,0);for(j=g;j<r;j++)e.get(j).add(b)}for(j=g;j<r;j++)n.setPF(a=e.get(j)),this.unitizeRnd(n),0==n.x&&(e.addLast(JS.UnitCell.newPt(a,0,n.y,n.z,n.i)),e.addLast(JS.UnitCell.newPt(a,1,n.y,n.z,n.i)),0==n.y&&(e.addLast(JS.UnitCell.newPt(a,1,1,n.z,n.i)),e.addLast(JS.UnitCell.newPt(a,0,0,n.z,n.i)),0==n.z&&
(e.addLast(JS.UnitCell.newPt(a,1,1,1,n.i)),e.addLast(JS.UnitCell.newPt(a,0,0,0,n.i))))),0==n.y&&(e.addLast(JS.UnitCell.newPt(a,n.x,0,n.z,n.i)),e.addLast(JS.UnitCell.newPt(a,n.x,1,n.z,n.i)),0==n.z&&(e.addLast(JS.UnitCell.newPt(a,n.x,0,0,n.i)),e.addLast(JS.UnitCell.newPt(a,n.x,1,1,n.i)))),0==n.z&&(e.addLast(JS.UnitCell.newPt(a,n.x,n.y,0,n.i)),e.addLast(JS.UnitCell.newPt(a,n.x,n.y,1,n.i)),0==n.x&&(e.addLast(JS.UnitCell.newPt(a,0,n.y,0,n.i)),e.addLast(JS.UnitCell.newPt(a,1,n.y,1,n.i))));if(0<l){if(m){r=
e.size();for(j=g;j<r;j++)n.setT(a=e.get(j)),n.x<l&&e.addLast(a=JS.UnitCell.newPt(a,n.x+1,n.y,n.z,n.i)),n.x>1-l&&e.addLast(a=JS.UnitCell.newPt(a,n.x-1,n.y,n.z,n.i))}if(p){r=e.size();for(j=g;j<r;j++)n.setT(e.get(j)),n.y<l&&e.addLast(JS.UnitCell.newPt(a,n.x,n.y+1,n.z,n.i)),n.y>1-l&&e.addLast(JS.UnitCell.newPt(a,n.x,n.y-1,n.z,n.i))}if(k){r=e.size();for(j=g;j<r;j++)n.setT(e.get(j)),n.z<l&&e.addLast(JS.UnitCell.newPt(a,n.x,n.y,n.z+1,n.i)),n.z>1-l&&e.addLast(JS.UnitCell.newPt(a,n.x,n.y,n.z-1,n.i))}}r=e.size();
if(!m){b=JU.P3.new3(-0.5,0,0);for(j=g;j<r;j++)e.get(j).add(b)}if(!p){b=JU.P3.new3(0,-0.5,0);for(j=g;j<r;j++)e.get(j).add(b)}if(!k){b=JU.P3.new3(0,0,-0.5);for(j=g;j<r;j++)e.get(j).add(b)}}JS.UnitCell.removeDuplicates(e,d,h,-1);if(!c)for(j=e.size();--j>=g;)this.toCartesian(e.get(j),!0);return e},"JU.Point3fi,~S,~A,JU.Lst,~N,~N,~N,~N,~N");b.newPt=d(b,"newPt",function(a,c,b,e,d){c=JU.Point3fi.new4(c,b,e,d);c.sX=a.sX;c.sY=a.sY;c.sZ=a.sZ;c.sD=a.sD;return c},"JU.Point3fi,~N,~N,~N,~N");d(b,"getFractionalOffset",
function(){return this.fractionalOffset});d(b,"getInfo",function(){var a=this.getUnitCellMultiplied();if(a!==this)return a.getInfo();var a=new java.util.Hashtable,c=F(18,0);System.arraycopy(this.getUnitCellAsArray(!1),0,c,0,18);a.put("params",c);a.put("oabc",this.getUnitCellVectors());a.put("volume",Float.$valueOf(this.volume));a.put("matFtoC",this.matrixFractionalToCartesian);a.put("matCtoF",this.matrixCartesianToFractional);a.put("dimension",Integer.$valueOf(this.dimension));a.put("dimensionType",
Integer.$valueOf(this.dimensionType));a.put("isHexagonal",Boolean.$valueOf(0!=this.getInfo(8)));a.put("isRhombohedral",Boolean.$valueOf(0!=this.getInfo(9)));null!=this.fractionalOffset&&(a.put("cartesianOffset",this.cartesianOffset),a.put("fractionalOffset",this.fractionalOffset));null!=this.unitCellMultiplier&&a.put("unitCellMultiplier",this.unitCellMultiplier);null!=this.unitCellMultiplied&&a.put("unitCellMultiplied",this.unitCellMultiplied);a.put("slop",Float.$valueOf(this.slop));return a});d(b,
"getQuaternionRotation",function(a){var c=JU.V3.newVsub(this.vertices[4],this.vertices[0]),b=JU.V3.newVsub(this.vertices[2],this.vertices[0]),e=JU.V3.newVsub(this.vertices[1],this.vertices[0]),d=new JU.P3,g=new JU.P3,h="-"==a.charAt(0)?-1:1;0>h&&(a=a.substring(1));var k=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 l=(k=!k.equals(a))?1:0;2==a.length&&(l=a.charAt(1).charCodeAt(0)-48,a=a.substring(0,1));var j=0==l%2;
switch("abcABCDEF".indexOf(a)){case 7:h=-h;case 4:c.cross(e,b),l=(5-l)%4+1;default:a=c;c=e;break;case 8:h=-h;case 5:h=-h,b.cross(e,c),l=(2+l)%4+1;case 1:a=b;b=e;h=-h;break;case 3:h=-h;case 6:e.cross(c,b),j&&(l=6-l);case 2:a=e,!k&&0<l&&(l=5-l)}0<l&&0<h!=j&&(c=b,a.scale(-1));switch(l){case 2:a.scale(-1);c.scale(-1);break;case 3:c.scale(-1);break;case 4:a.scale(-1)}d.cross(a,c);g.cross(d,a);return JU.Quat.getQuaternionFrame(null,g,d).inv()},"~S");d(b,"getScaledCell",function(a){return this.getScaledCellMult(null,
a)},"~B");d(b,"getScaledCellMult",function(a,c){var b=Array(8),e=null,d=null,g=null!=a;g||(a=this.unitCellMultiplier);c&&(null!=a&&0==a.z)&&(e=new JU.P3,d=new JU.P3,JU.SimpleUnitCell.ijkToPoint3f(y(a.x),e,0,0),JU.SimpleUnitCell.ijkToPoint3f(y(a.y),d,0,0),d.sub(e));for(var h=g||null==a||0==a.z?1:Math.abs(a.z),k=0;8>k;k++){var l=b[k]=JU.P3.newP(JU.BoxInfo.unitCubePoints[k]);null!=e?b[k].add3(e.x+d.x*l.x,e.y+d.y*l.y,e.z+d.z*l.z):g&&l.scaleT(a);b[k].scale(h);this.matrixFractionalToCartesian.rotTrans(l);
c||l.sub(this.cartesianOffset)}return b},"JU.T3,~B");d(b,"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});d(b,"getTensor",function(a,c){var b=J.api.Interface.getUtil("Tensor",a,"file");if(0==c[0]&&0==c[1]&&0==c[2]){var e=c[7],d=F(-1,[e,e,e]);return b.setFromEigenVectors(JS.UnitCell.unitVectors,
d,"iso","Uiso="+e,null)}b.parBorU=c;var e=Na(6,0),g=y(c[6]);if(12==g)e[0]=19.739208802178716*c[0],e[1]=19.739208802178716*c[1],e[2]=19.739208802178716*c[2],e[3]=39.47841760435743*c[3],e[4]=39.47841760435743*c[4],e[5]=39.47841760435743*c[5],c[7]=(c[0]+c[1]+c[3])/3;else{var d=4==g||5==g||8==g||9==g,h=2-g%2,k=8==g||9==g||10==g?19.739208802178716:4==g||5==g?0.25:2==g||3==g?Math.log(2):1,g=c[0]*k*(d?this.a_*this.a_:1),l=c[1]*k*(d?this.b_*this.b_:1),j=c[2]*k*(d?this.c_*this.c_:1),m=c[3]*k*(d?this.a_*this.b_:
1)*h,p=c[4]*k*(d?this.a_*this.c_:1)*h,d=c[5]*k*(d?this.b_*this.c_:1)*h;c[7]=Math.pow(g/19.739208802178716/this.a_/this.a_*l/19.739208802178716/this.b_/this.b_*j/19.739208802178716/this.c_/this.c_,0.3333);e[0]=this.a*this.a*g+this.b*this.b*this.cosGamma*this.cosGamma*l+this.c*this.c*this.cosBeta*this.cosBeta*j+this.a*this.b*this.cosGamma*m+this.b*this.c*this.cosGamma*this.cosBeta*d+this.a*this.c*this.cosBeta*p;e[1]=this.b*this.b*this.sinGamma*this.sinGamma*l+this.c*this.c*this.cA_*this.cA_*j+this.b*
this.c*this.cA_*this.sinGamma*d;e[2]=this.c*this.c*this.cB_*this.cB_*j;e[3]=2*this.b*this.b*this.cosGamma*this.sinGamma*l+2*this.c*this.c*this.cA_*this.cosBeta*j+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_*p;e[4]=2*this.c*this.c*this.cB_*this.cosBeta*j+this.b*this.c*this.cosGamma*d+this.a*this.c*this.cB_*p;e[5]=2*this.c*this.c*this.cA_*this.cB_*j+this.b*this.c*this.cB_*this.sinGamma*d}return b.setFromThermalEquation(e,JU.Escape.eAF(c))},
"JV.Viewer,~A");d(b,"getUnitCellMultiplied",function(){if(null==this.unitCellMultiplier||0<this.unitCellMultiplier.z&&this.unitCellMultiplier.z==y(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(b,"getUnitCellMultiplier",function(){return this.unitCellMultiplier});d(b,"isStandard",function(){return null==this.unitCellMultiplier||this.unitCellMultiplier.x==
this.unitCellMultiplier.y});d(b,"getUnitCellVectors",function(){var a=this.matrixFractionalToCartesian;return C(-1,[JU.P3.newP(this.cartesianOffset),JU.P3.new3(this.fix000(a.m00),this.fix000(a.m10),this.fix000(a.m20)),JU.P3.new3(this.fix000(a.m01),this.fix000(a.m11),this.fix000(a.m21)),JU.P3.new3(this.fix000(a.m02),this.fix000(a.m12),this.fix000(a.m22))])});b.toTrm=d(b,"toTrm",function(a,c){null==c&&(c=new JU.M4);JS.UnitCell.getMatrixAndUnitCell(null,null,a,c);return c},"~S,JU.M4");b.getMatrixAndUnitCell=
d(b,"getMatrixAndUnitCell",function(a,c,b,e){null==b&&(b="a,b,c");var d=Array(4),g=d[0]=JU.P3.new3(0,0,0);d[1]=JU.P3.new3(1,0,0);d[2]=JU.P3.new3(0,1,0);d[3]=JU.P3.new3(0,0,1);var h=new JU.M3;if(JU.AU.isAD(b))return JU.SimpleUnitCell.setAbcFromParams(b,d);var k="string"==typeof b;k&&0<=b.indexOf("(")&&(b=JU.SimpleUnitCell.parseSimpleMath(a,b));if(k&&"["==b.charAt(0)){b=JU.Escape.unescapeMatrix(b);if(R(b,"JU.M3"))b=JU.M4.newMV(b,new JU.P3);else if(!R(b,"JU.M4"))return null;null!=e&&(e.setM4(b),e=null);
k=!1}if(k){var l=b,j,m=null;if(0==l.indexOf("a="))return JU.SimpleUnitCell.setAbc(l,null,d);if(0<l.indexOf(">")){if(null!=c||null==e)return null;c=l.$plit(">");e.setIdentity();g=new JU.M4;for(a=c.length;0<=--a;)JS.UnitCell.getMatrixAndUnitCell(null,null,c[a],g),e.mul2(g,e);return d}b=Array(1);k=l.indexOf(";");0<=k?(j=l.substring(k+1).trim(),l=l.substring(0,k),b[0]=l,m=JS.UnitCell.fixABC(b),l!==b[0]&&(l=b[0])):l.equals("a,b,c")?j=null:(0<l.indexOf("w")&&(l=l.$replace("u","x").$replace("v","y").$replace("w",
"z")),b[0]=l,j=JS.UnitCell.fixABC(b),l=b[0]);for(l+=";0,0,0";l.startsWith("!!");)l=l.substring(2);(b=l.startsWith("!"))&&(l=l.substring(1));l.equals("r;0,0,0")?l="2/3a+1/3b+1/3c,-1/3a+1/3b+1/3c,-1/3a-2/3b+1/3c"+l.substring(1):l.equals("h;0,0,0")&&(l="a-b,b-c,a+b+c"+l.substring(1));if((k=0>l.indexOf("x")&&(0<=l.indexOf("a")||0<=l.indexOf("b")||0<=l.indexOf("c")))&&0<=l.indexOf("*")&&null!=c)j=JU.M4.newM4(null),m=JS.UnitCell.getMatrixAndUnitCell(a,c,"a,b,c",j),JS.UnitCell.getMatrixAndUnitCell(a,null,
l.$replace("*"," "),j),l=db(-1,[0<=l.indexOf("a*"),0<=l.indexOf("b*"),0<=l.indexOf("c*")]),a=JU.M4.newM4(null),JS.UnitCell.adjustForReciprocal(c,m,j,l,a,d),c=null;else{var p=new JS.Symmetry;p.setSpaceGroup(!1);a=p.addSpaceGroupOperation("="+l,0);if(0>a)return null;a=p.getSpaceGroupOperation(a);a.doFinalize();l=new JU.P3;JS.UnitCell.addTrans(j,l);JS.UnitCell.addTrans(m,l);a.setTranslation(l)}k&&a.transpose33();b&&a.invert();null!=e&&e.setM4(a);if(null==c)return d}else{if(null!=e||null==c)return null;
if(R(b,"JU.M3"))a=JU.M4.newMV(b,new JU.P3);else if(R(b,"JU.M4"))a=b;else{a=b[0];a.getRotationScale(h);a.rotTrans(g);c.toCartesian(g,!1);for(a=1;4>a;a++)h.rotate(d[a]),c.toCartesian(d[a],!0);return d}}a.getRotationScale(h);a.getTranslation(g);c.toCartesian(g,!1);for(a=1;4>a;a++)h.rotate(d[a]),c.toCartesian(d[a],!0);return d},"JV.Viewer,JU.SimpleUnitCell,~O,JU.M4");b.adjustForReciprocal=d(b,"adjustForReciprocal",function(a,c,b,e,d,g){var h=Array(4);JU.SimpleUnitCell.getReciprocal(c,h,1);for(var k=new JU.P3,
l=F(4,0),j=1;3>=j;j++){var m=new JU.P3;b.getColumn(j-1,l);for(var p=0;3>p;p++)0!=l[p]&&m.scaleAdd2(l[p],e[p]?h[1+p]:c[1+p],m);g[j]=m;k.setP(m);a.toFractional(k,!0);d.setColumn4(j-1,JS.UnitCell.fixZero(k.x,1E-10),JS.UnitCell.fixZero(k.y,1E-10),JS.UnitCell.fixZero(k.z,1E-10),0)}},"JU.SimpleUnitCell,~A,JU.M4,~A,JU.M4,~A");b.fixZero=d(b,"fixZero",function(a,c){return Math.abs(a)<c?0:a},"~N,~N");b.addTrans=d(b,"addTrans",function(a,c){if(null!=a){var b=JU.PT.split(a,","),e=F(3,0);if(3==b.length)for(var d=
0;3>d;d++){var g=b[d],h=g.indexOf("/");e[d]=0<=h?JU.PT.parseFloat(g.substring(0,h))/JU.PT.parseFloat(g.substring(h+1)):JU.PT.parseFloat(g)}c.add3(e[0],e[1],e[2])}},"~S,JU.P3");b.fixABC=d(b,"fixABC",function(a){var c=JU.PT.split(a[0],",");if(3!=c.length)return null;for(var b="",e="",d=!1,g=0;3>g;g++){var h=c[g],k,l=0;for(k=h.length;0<=--k;){var j=h.charAt(k);switch(j.charCodeAt(0)){default:"a"<=j&&(k=0);break;case 43:l=1;case 45:k=-k}}k=-1-k;0==k?(b+=",0",e+=","+h):(d=!0,b+=","+h.substring(k+l),e+=
","+h.substring(0,k))}a[0]=e.substring(1);return d?b.substring(1):null},"~A");d(b,"getVertices",function(){return this.vertices});d(b,"hasOffset",function(){return null!=this.fractionalOffset&&0!=this.fractionalOffset.lengthSquared()});d(b,"initOrientation",function(a){if(null!=a){var c=new JU.M4;c.setToM3(a);this.matrixFractionalToCartesian.mul2(c,this.matrixFractionalToCartesian);this.matrixCartesianToFractional.setM4(this.matrixFractionalToCartesian).invert();this.initUnitcellVertices()}},"JU.M3");
d(b,"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(b,"isSameAs",function(a){if(null==a)return!1;for(var c=this.getF2C(),b=0;3>b;b++)for(var e=0;4>e;e++)if(!JU.SimpleUnitCell.approx0(c[b][e]-
a[b][e]))return!1;return!0},"~A");d(b,"getF2C",function(){if(null==this.f2c){this.f2c=F(3,4,0);for(var a=0;3>a;a++)this.matrixFractionalToCartesian.getRow(a,this.f2c[a])}return this.f2c});d(b,"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=JU.P3.newP(this.cartesianOffset);
this.matrixCartesianToFractional.rotate(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);this.f2c=null},"JU.T3");
d(b,"setOffset",function(a){if(null!=a){this.unitCellMultiplied=null;var c=R(a,"JU.T4")?a:null,b=null==c?1.4E-45:c.w,e=999999<b;if(null!=c?0>=b||e:100<=a.x||100<=a.y)if(this.unitCellMultiplier=0==a.z&&a.x==a.y&&!e?null:e?JU.P4.newPt(c):JU.P3.newP(a),this.unitCellMultiplied=null,null==c||0==c.w||e)return;if(this.hasOffset()||0<a.lengthSquared())this.fractionalOffset=JU.P3.newP(a);this.matrixCartesianToFractional.m03=-a.x;this.matrixCartesianToFractional.m13=-a.y;this.matrixCartesianToFractional.m23=
-a.z;this.cartesianOffset.setT(a);this.matrixFractionalToCartesian.rotate(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));this.f2c=null}},"JU.T3");d(b,"toFromPrimitive",function(a,c,b,e){var d=
b.length-3,g=null;if("r"==c||null==e){switch(c.charCodeAt(0)){default:return!1;case 114:return JU.SimpleUnitCell.getReciprocal(b,b,1),!0;case 80:a=!0;case 65:case 66:case 67:case 82:case 73:case 70:g=JS.UnitCell.getPrimitiveTransform(c)}a||g.invert()}else g=JU.M3.newM3(e),a&&g.invert();for(a=b.length;--a>=d;)c=b[a],this.toFractional(c,!0),g.rotate(c),this.toCartesian(c,!0);return!0},"~B,~S,~A,JU.M3");b.getPrimitiveTransform=d(b,"getPrimitiveTransform",function(a){switch(a.charCodeAt(0)){case 80:return JU.M3.newA9(F(-1,
[1,0,0,0,1,0,0,0,1]));case 65:return JU.M3.newA9(F(-1,[1,0,0,0,0.5,0.5,0,-0.5,0.5]));case 66:return JU.M3.newA9(F(-1,[0.5,0,0.5,0,1,0,-0.5,0,0.5]));case 67:return JU.M3.newA9(F(-1,[0.5,0.5,0,-0.5,0.5,0,0,0,1]));case 82:return JU.M3.newA9(F(-1,[0.6666667,-0.33333334,-0.33333334,0.33333334,0.33333334,-0.6666667,0.33333334,0.33333334,0.33333334]));case 73:return JU.M3.newA9(F(-1,[-0.5,0.5,0.5,0.5,-0.5,0.5,0.5,0.5,-0.5]));case 70:return JU.M3.newA9(F(-1,[0,0.5,0.5,0.5,0,0.5,0.5,0.5,0]))}return null},
"~S");d(b,"toUnitCell",function(a,c){null!=this.matrixCartesianToFractional&&(null==c?(this.matrixCartesianToFractional.rotTrans(a),this.unitize(a),this.matrixFractionalToCartesian.rotTrans(a)):(this.matrixCtoFNoOffset.rotTrans(a),this.unitize(a),a.add(c),this.matrixFtoCNoOffset.rotTrans(a)))},"JU.T3,JU.T3");d(b,"toUnitCellRnd",function(a,c){null!=this.matrixCartesianToFractional&&(null==c?(this.matrixCartesianToFractional.rotTrans(a),this.unitizeRnd(a),this.matrixFractionalToCartesian.rotTrans(a)):
(this.matrixCtoFNoOffset.rotTrans(a),this.unitizeRnd(a),a.add(c),this.matrixFtoCNoOffset.rotTrans(a)))},"JU.T3,JU.T3");d(b,"unitize",function(a){this.unitizeDim(this.dimension,a)},"JU.T3");d(b,"unitizeRnd",function(a){JU.SimpleUnitCell.unitizeDimRnd(this.dimension,a,this.slop)},"JU.T3");b.removeDuplicates=d(b,"removeDuplicates",function(a,c,b,e){for(0>e&&(e=a.size());c<e;c++)for(var d=a.get(c),g=Math.max(c+1,b);g<e;g++)1.96E-6>a.get(g).distanceSquared(d)&&(a.removeItemAt(g),e--,g--)},"JU.Lst,~N,~N,~N");
d(b,"getCenter",function(a){var c=new JU.P3,b=this.getCartesianOffset(),e=this.getVertices(),d;switch(a){default:case 7:a=8;d=1;break;case 3:a=8;d=2;break;case 4:a=2;d=1;break;case 2:a=3;d=2;break;case 1:a=8,d=4}for(var g=0,h=0;h<a;h+=d)c.add(e[h]),c.add(b),g++;c.scale(1/g);return c},"~N");d(b,"setSpinAxisAngle",function(a){null==this.moreInfo&&(this.moreInfo=new JU.Lst);for(var c="rotation_axis_xyz=",b=-1,e=-1,d=this.moreInfo.size();0<=--d&&(0>b||0>e);){var g=this.moreInfo.get(d);g.startsWith(c)?
b=d:g.startsWith("rotation_angle=")&&(e=d)}d=JU.Quat.newAA(a);g=new JU.V3;null==JS.UnitCell.v0&&(JS.UnitCell.v0=JU.V3.new3(3.141592653589793,2.718281828459045,Math.sqrt(2)));g=d.getNormalDirected(JS.UnitCell.v0);JU.V3.newV(a);this.toFractional(g,!0);g.normalize();a=this.getAxisMultiplier(g);c+=""+Math.round(g.x*a)+","+Math.round(g.y*a)+","+Math.round(g.z*a);0>b?(this.moreInfo.addLast(c),e>b&&e++):this.moreInfo.set(b,c);a=E(Math.round(1E3*d.getThetaDirectedV(JS.UnitCell.v0))/1E3);c="rotation_angle="+
(a==Math.round(a)?""+Math.round(a):JS.UnitCell.round000(a));0>e?this.moreInfo.addLast(c):this.moreInfo.set(e,c)},"JU.A4");d(b,"getAxisMultiplier",function(a){if(JS.UnitCell.approx00(a.x-Math.round(a.x))&&JS.UnitCell.approx00(a.y-Math.round(a.y))&&JS.UnitCell.approx00(a.z-Math.round(a.z)))return 1;var c=Math.min(JS.UnitCell.approx00(a.x)?1E4:Math.abs(a.x),JS.UnitCell.approx00(a.y)?1E4:Math.min(Math.abs(a.y),JS.UnitCell.approx00(a.z)?1E4:Math.abs(a.z)));return JS.UnitCell.approx01(a.x/c)&&JS.UnitCell.approx01(a.y/
c)&&JS.UnitCell.approx01(a.z/c)?1/c:1E3},"JU.V3");b.approx01=d(b,"approx01",function(a){a%=1;return JS.UnitCell.approx00(a)||0.999<Math.abs(a)},"~N");b.approx00=d(b,"approx00",function(a){return 0.001>Math.abs(a)},"~N");b.round000=d(b,"round000",function(a){a=Math.round(1E3*a)/1E3;return a==Math.round(a)?""+Math.round(a):""+a},"~N");d(b,"setMoreInfo",function(a){this.moreInfo=a},"JU.Lst");d(b,"getMoreInfo",function(){return this.moreInfo});b.setSymmetryMinMax=d(b,"setSymmetryMinMax",function(a,c,
b){c.x>a.x&&(c.x=a.x);c.y>a.y&&(c.y=a.y);c.z>a.z&&(c.z=a.z);b.x<a.x&&(b.x=a.x);b.y<a.y&&(b.y=a.y);b.z<a.z&&(b.z=a.z)},"JU.P3,JU.P3,JU.P3");d(b,"adjustRangeMinMax",function(a,c,b,e,d,g,h,k){null==d&&(d=JU.P3.new3(3.4028235E38,3.4028235E38,3.4028235E38),g=JU.P3.new3(-3.4028235E38,-3.4028235E38,-3.4028235E38));var l=new JU.P3,j=new JU.P3,m=new JU.P3;Float.isNaN(c)||(l.setT(a[1]),j.setT(a[2]),m.setT(a[3]),l.scale(c),j.scale(c),m.scale(c));null!=b&&(a[0].scaleAdd2(b.x,a[1],a[0]),a[0].scaleAdd2(b.y,a[2],
a[0]),a[0].scaleAdd2(b.z,a[3],a[0]));a[0].sub(l);a[0].sub(j);a[0].sub(m);c=JU.P3.newP(a[0]);this.toFractional(c,!0);JS.UnitCell.setSymmetryMinMax(c,d,g);null!=b&&(a[1].scale(e.x-b.x),a[2].scale(e.y-b.y),a[3].scale(e.z-b.z));a[1].scaleAdd2(2,l,a[1]);a[2].scaleAdd2(2,j,a[2]);a[3].scaleAdd2(2,m,a[3]);for(b=0;3>b;b++)for(e=b+1;4>e;e++)c.add2(a[b],a[e]),0!=b&&c.add(a[0]),this.toFractional(c,!1),JS.UnitCell.setSymmetryMinMax(c,d,g);this.toCartesian(c,!1);c.add(a[1]);this.toFractional(c,!1);JS.UnitCell.setSymmetryMinMax(c,
d,g);h.set(E(Math.min(0,Math.floor(d.x+0.001))),E(Math.min(0,Math.floor(d.y+0.001))),E(Math.min(0,Math.floor(d.z+0.001))));k.set(E(Math.max(1,Math.ceil(g.x-0.001))),E(Math.max(1,Math.ceil(g.y-0.001))),E(Math.max(1,Math.ceil(g.z-0.001))))},"~A,~N,JU.P3i,JU.P3i,JU.P3,JU.P3,JU.P3i,JU.P3i");d(b,"toFractionalSpin",function(a){null==this.spinFrameToCartXYZ?this.toFractional(a,!0):(null==this.spinFrameFromCartXYZ&&(this.spinFrameFromCartXYZ=JU.M3.newM3(this.spinFrameToCartXYZ),this.spinFrameFromCartXYZ.invert()),
this.spinFrameFromCartXYZ.rotate(a))},"JU.T3");d(b,"toCartesianSpin",function(a){null==this.spinFrameFromCartXYZ?this.toCartesian(a,!0):this.spinFrameToCartXYZ.rotate(a)},"JU.T3");b.unitVectors=C(-1,[JV.JC.axisX,JV.JC.axisY,JV.JC.axisZ]);b.v0=null});aa("JS");N(["J.api.AtomIndexIterator"],"JS.UnitCellIterator","JU.Lst $.P3 $.P3i JU.BoxInfo $.Logger $.Point3fi".split(" "),function(){var b=I(function(){this.translation=this.center=this.atoms=null;this.distance2=this.maxDistance2=this.nFound=0;this.p=
this.t=this.maxXYZ=this.minXYZ=this.unitCell=null;this.ipt=-2147483648;this.unitList=null;this.done=!1;this.listPt=this.nAtoms=0;S(this,arguments)},JS,"UnitCellIterator",null,J.api.AtomIndexIterator);d(b,"set",function(a,c,b,e,d){this.unitCell=a;this.atoms=b;this.addAtoms(e);this.p=new JU.P3;0<d&&this.setCenter(c,d);return this},"J.api.SymmetryInterface,JM.Atom,~A,JU.BS,~N");m(b,"setModel",function(){},"JM.ModelSet,~N,~N,~N,JU.T3,~N,J.atomdata.RadiusData");m(b,"setCenter",function(a,c){if(0!=c){this.maxDistance2=
c*c;this.center=a;this.translation=new JU.P3;var b=JU.BoxInfo.unitCubePoints,e=JU.P3.new3(3.4028235E38,3.4028235E38,3.4028235E38),d=JU.P3.new3(-3.4028235E38,-3.4028235E38,-3.4028235E38);this.p=new JU.P3;var g=new JU.P3;g.setT(a);this.unitCell.toFractional(g,!0);for(g=0;8>g;g++)this.p.scaleAdd2(-2,b[g],b[7]),this.p.scaleAdd2(c,this.p,a),this.unitCell.toFractional(this.p,!0),e.x>this.p.x&&(e.x=this.p.x),d.x<this.p.x&&(d.x=this.p.x),e.y>this.p.y&&(e.y=this.p.y),d.y<this.p.y&&(d.y=this.p.y),e.z>this.p.z&&
(e.z=this.p.z),d.z<this.p.z&&(d.z=this.p.z);this.minXYZ=JU.P3i.new3(E(Math.floor(e.x)),E(Math.floor(e.y)),E(Math.floor(e.z)));this.maxXYZ=JU.P3i.new3(E(Math.ceil(d.x)),E(Math.ceil(d.y)),E(Math.ceil(d.z)));JU.Logger.debugging&&JU.Logger.info("UnitCellIterator minxyz/maxxyz "+this.minXYZ+" "+this.maxXYZ);this.t=JU.P3i.new3(this.minXYZ.x-1,this.minXYZ.y,this.minXYZ.z);this.nextCell()}},"JU.T3,~N");m(b,"addAtoms",function(a){this.done=null==a;if(!this.done){this.unitList=new JU.Lst;for(var c="",b=this.unitCell.getSymmetryOperations(),
e=b.length,d=a.nextSetBit(0);0<=d;d=a.nextSetBit(d+1))for(var g=this.atoms[d],h=0;h<e;h++){var k=new JU.P3;k.setT(g);0<h?(this.unitCell.toFractional(k,!1),b[h].rotTrans(k),this.unitCell.unitize(k),this.unitCell.toCartesian(k,!1)):this.unitCell.toUnitCell(k,null);var l="_"+y(100*k.x)+"_"+y(100*k.y)+"_"+y(100*k.z)+"_";0<=c.indexOf(l)||(c+=l,this.unitList.addLast(C(-1,[g,k])))}this.nAtoms=this.unitList.size();this.done=0==this.nAtoms;JU.Logger.debugging&&JU.Logger.info("UnitCellIterator "+this.nAtoms+
" unique points found")}},"JU.BS");m(b,"hasNext",function(){for(;this.ipt<this.nAtoms||this.nextCell();)if(this.p.add2(this.unitList.get(this.listPt=this.ipt++)[1],this.translation),(this.distance2=this.p.distanceSquared(this.center))<this.maxDistance2&&0.1<this.distance2)return this.nFound++,!0;return!1});d(b,"nextCell",function(){if(this.done)return!1;if(++this.t.x>=this.maxXYZ.x&&(this.t.x=this.minXYZ.x,++this.t.y>=this.maxXYZ.y&&(this.t.y=this.minXYZ.y,++this.t.z>=this.maxXYZ.z)))return this.done=
!0,this.ipt=this.nAtoms,!1;this.translation.set(this.t.x,this.t.y,this.t.z);this.unitCell.toCartesian(this.translation,!1);this.ipt=0;return!0});m(b,"next",function(){return this.done||0>this.ipt?-1:this.getAtom().i});d(b,"getAtom",function(){return this.unitList.get(this.listPt)[0]});m(b,"foundDistance2",function(){return 0<this.nFound?this.distance2:3.4028235E38});m(b,"getPosition",function(){var a=this.getAtom();JU.Logger.debugging&&JU.Logger.info("draw ID p_"+this.nFound+" "+this.p+" //"+a+" "+
this.t);if(1E-4>this.p.distanceSquared(a))return a;var c=JU.Point3fi.newPF(this.p,a.i);c.sD=a.getElementNumber();return c});m(b,"release",function(){this.translation=this.center=this.atoms=null})});aa("JS");N(["java.util.Hashtable","JU.P3","$.V3"],"JS.WyckoffFinder","JU.Lst $.M4 $.Measure $.P4 $.PT $.SB JS.SpaceGroup $.Symmetry $.SymmetryOperation".split(" "),function(){var b=I(function(){this.positions=null;this.ncent=this.npos=0;this.gpos=this.centeringStr=this.centerings=null;S(this,arguments)},
JS,"WyckoffFinder",null);$(b,function(a){if(null!=a){var b=a.get("gp");this.gpos=new JU.Lst;this.gpos.addAll(b);a=a.get("wpos");this.positions=a.get("pos");this.npos=this.positions.size();a=a.get("cent");if(null!=a){this.ncent=a.size();this.centeringStr=Array(this.ncent);this.centerings=Array(this.ncent);for(b=this.ncent;0<=--b;){var e=a.get(b);this.centeringStr[b]=e;this.centerings[b]=JS.SymmetryOperation.toPoint(e,null)}}}},"java.util.Map");d(b,"getWyckoffFinder",function(a,b){var e=b.getClegId(),
d=JS.WyckoffFinder.helpers.get(e);if(null!=d)return d;d=JS.WyckoffFinder.createHelper(a,e,b.groupType);null==d?(null==JS.WyckoffFinder.nullHelper&&(JS.WyckoffFinder.nullHelper=new JS.WyckoffFinder(null)),JS.WyckoffFinder.helpers.put(e,JS.WyckoffFinder.nullHelper)):JS.WyckoffFinder.helpers.put(e,d);return d},"JV.Viewer,JS.SpaceGroup");d(b,"findPositionFor",function(a,b){if(null!=this.positions)for(var e=b.equals("G"),d=e?1:this.npos;0<=--d;){var g=this.positions.get(d),h=g.get("label");if(e||h.equals(b))return e=
g.get("coord"),null!=e&&JS.WyckoffFinder.getWyckoffCoord(e,0,h).project(a),a}return null},"JU.P3,~S");d(b,"getInfo",function(a,b,e,d,g){a=this.createInfo(a,b,e,d,g);return null==a?"?":a},"JS.UnitCell,JU.P3,~N,~B,~B");b.wrap=d(b,"wrap",function(a,b){return b.appendC("(").append(a).appendC(")")},"~S,JU.SB");d(b,"createInfo",function(a,b,e,d){switch(e){case 83:return this.getCenteringStr(-1," ",null).toString().trim();case 67:d=Array(this.centerings.length);for(var g=d.length;0<=--g;)d[g]=this.centerings[g];
return d;case 42:var h=new JU.SB;this.getCenteringStr(-1,"+",h);for(g=this.npos;0<=--g;){var k=this.positions.get(g),l=(d?""+k.get("mult"):"")+k.get("label");h.appendC("\n").append(l);JS.WyckoffFinder.getList(0==g?this.gpos:k.get("coord"),l,h,0==g?this.ncent:0)}return h.toString();case -4:d=Array(this.npos);for(g=0;g<this.npos;g++)k=this.positions.get(g),d[g]=this.findPositionFor(JU.P3.newP(b),k.get("label")),a.toCartesian(d[g],!1);return C(-1,[d,"AlB C D FeF GaHeI GeK LiMgN OsP CaRhS T U V W XeYbZnAm"]);
case -1:case -2:case -3:for(g=this.npos;0<=--g;){k=this.positions.get(g);l=(d?""+k.get("mult"):"")+k.get("label");if(0==g)switch(e){case -1:return l;case -2:return"(x,y,z)";case -3:return a=new JU.SB,a.append(l).appendC(" "),this.getCenteringStr(-1,"+",a).appendC(" "),JS.WyckoffFinder.getList(this.gpos,l,a,this.ncent),a.toString()}for(var h=k.get("coord"),k=0,j=h.size();k<j;k++){var m=JS.WyckoffFinder.getWyckoffCoord(h,k,l);if(m.contains(this,a,b))switch(e){case -1:return l;case -2:return m.asString(null,
!0).toString();case -3:return a=new JU.SB,a.append(l).appendC(" "),this.getCenteringStr(-1,"+",a).appendC(" "),JS.WyckoffFinder.getList(h,l,a,0),a.toString()}}}break;default:j=""+String.fromCharCode(e);h=71==e;b=new JU.P3;for(g=h?1:this.npos;0<=--g;)if(k=this.positions.get(g),l=k.get("label"),h||l.equals(j)){a=new JU.SB;h&&a.append(l).appendC(" ");h=0==g?this.gpos:k.get("coord");JS.WyckoffFinder.getList(h,(d?k.get("mult"):"")+j,a,0);if(0<g&&0<this.ncent){g=new JU.M4;for(d=0;d<this.ncent;d++)this.addCentering(h,
this.centerings[d],g,b,a)}return a.toString()}}return null},"JS.UnitCell,JU.P3,~N,~B,~B");b.createHelper=d(b,"createHelper",function(a,b,e){var d=0<e?b.substring(2):b,g=d.indexOf(":"),d=JU.PT.parseInt(0>g?d:d.substring(0,g));if(!JS.SpaceGroup.isInRange(d,e,!1,!1))return null;e=JS.Symmetry.getITJSONResource(a,e,d,null);if(null==e)return null;e=e.get("its");for(var g=null,h=!1,k=0,l=e.size();k<l;k++)if(g=e.get(k),b.equals(g.get("clegId"))){h=!0;break}if(!h||g.containsKey("more"))g=JS.SpaceGroup.fillMoreData(a,
h?g:null,b,d,e.get(0));return new JS.WyckoffFinder(g)},"JV.Viewer,~S,~N");d(b,"getCenteringStr",function(a,b,e){null==e&&(e=new JU.SB);if(0==this.ncent)return e;if(0<=a)return e.appendC(b),JS.WyckoffFinder.wrap(this.centeringStr[a],e);for(a=0;a<this.ncent;a++)e.appendC(b),JS.WyckoffFinder.wrap(this.centeringStr[a],e);return e},"~N,~S,JU.SB");b.getList=d(b,"getList",function(a,b,e,d){null==e&&(e=new JU.SB);d=0==d?a.size():E(a.size()/(d+1));for(var g=0;g<d;g++){var h=JS.WyckoffFinder.getWyckoffCoord(a,
g,b);e.append(" ");h.asString(e,!1)}return e},"JU.Lst,~S,JU.SB,~N");d(b,"addCentering",function(a,b,e,d,g){for(var h=a.size(),k=0;k<h;k++){var l=a.get(k);g.append(" ");l.asStringCentered(b,e,d,g)}},"JU.Lst,JU.P3,JU.M4,JU.P3,JU.SB");b.getWyckoffCoord=d(b,"getWyckoffCoord",function(a,b,e){var d=a.get(b);"string"==typeof d&&a.set(b,d=new JS.WyckoffFinder.WyckoffCoord(d,e));return d},"JU.Lst,~N,~S");var a=I(function(){this.type=0;this.label=this.xyz=null;this.thisCentering="";this.plane=this.line=this.point=
this.op=null;S(this,arguments)},JS.WyckoffFinder,"WyckoffCoord",null);$(a,function(a,b){this.xyz=a;this.label=b;this.create(a)},"~S,~S");d(a,"asStringCentered",function(a,b,e,d){b.setM4(this.op);b.add(a);b.getTranslation(e);e.x%=1;e.y%=1;e.z%=1;b.setTranslation(e);d.appendC(" ");a=","+JS.SymmetryOperation.getXYZFromMatrixFrac(b,!1,!0,!1,!0,!1,null)+",";a=JU.PT.rep(a,",,",",0,");a=JU.PT.rep(a,",+",",");d.appendC("(").append(a.substring(1,a.length-1)).appendC(")")},"JU.P3,JU.M4,JU.P3,JU.SB");d(a,"contains",
function(a,b,e){var d=b.getPrecision();this.thisCentering=null;if(this.checkLatticePt(e,d))return!0;if(null==a.centerings)return!1;for(var g=a.centerings.length;0<=--g;)if(JS.WyckoffFinder.WyckoffCoord.pc.add2(e,a.centerings[g]),b.unitize(JS.WyckoffFinder.WyckoffCoord.pc),this.checkLatticePt(JS.WyckoffFinder.WyckoffCoord.pc,d))return this.thisCentering=a.centeringStr[g],!0;return!1},"JS.WyckoffFinder,JS.UnitCell,JU.P3");d(a,"project",function(a){switch(this.type){case 1:a.setT(this.point);break;case 2:JU.Measure.projectOntoAxis(a,
this.point,this.line,JS.WyckoffFinder.WyckoffCoord.vt);break;case 3:JU.Measure.getPlaneProjection(a,this.plane,JS.WyckoffFinder.WyckoffCoord.vt,JS.WyckoffFinder.WyckoffCoord.vt),a.setT(JS.WyckoffFinder.WyckoffCoord.vt)}},"JU.P3");d(a,"asString",function(a,b){null==a&&(a=new JU.SB);JS.WyckoffFinder.wrap(this.xyz,a);b&&null!=this.thisCentering&&(a.appendC("+"),JS.WyckoffFinder.wrap(this.thisCentering,a));return a},"JU.SB,~B");d(a,"checkLatticePt",function(a,b){if(this.checkPoint(a,b))return!0;for(var e=
62,d=-2;3>d;d++)for(var g=-2;3>g;g++)for(var h=-2;3>h;h++,e--)if(0!=e&&(JS.WyckoffFinder.WyckoffCoord.p3.set(d,g,h),JS.WyckoffFinder.WyckoffCoord.p3.add(a),this.checkPoint(JS.WyckoffFinder.WyckoffCoord.p3,b)))return System.out.println(this.label+" "+this.xyz+" found for "+d+" "+g+" "+h),!0;return!1},"JU.P3,~N");d(a,"checkPoint",function(a,b){var e=1;switch(this.type){case 1:e=this.point.distance(a);break;case 2:JS.WyckoffFinder.WyckoffCoord.p1.setT(a);JU.Measure.projectOntoAxis(JS.WyckoffFinder.WyckoffCoord.p1,
this.point,this.line,JS.WyckoffFinder.WyckoffCoord.vt);e=JS.WyckoffFinder.WyckoffCoord.p1.distance(a);break;case 3:e=Math.abs(JU.Measure.getPlaneProjection(a,this.plane,JS.WyckoffFinder.WyckoffCoord.vt,JS.WyckoffFinder.WyckoffCoord.vt))}return e<b},"JU.P3,~N");d(a,"create",function(a){var b=(0<=a.indexOf("x")?1:0)+(0<=a.indexOf("y")?1:0)+(0<=a.indexOf("z")?1:0),e=F(16,0),d=JU.PT.split(this.xyz,",");JS.WyckoffFinder.WyckoffCoord.getRow(d[0],e,0);JS.WyckoffFinder.WyckoffCoord.getRow(d[1],e,4);JS.WyckoffFinder.WyckoffCoord.getRow(d[2],
e,8);e[15]=1;this.op=JU.M4.newA16(e);switch(b){case 0:this.type=1;this.point=JS.SymmetryOperation.toPoint(a,null);break;case 1:this.type=2;JS.WyckoffFinder.WyckoffCoord.p1.set(0.19,0.53,0.71);this.op.rotTrans(JS.WyckoffFinder.WyckoffCoord.p1);JS.WyckoffFinder.WyckoffCoord.p2.set(0.51,0.27,0.64);this.op.rotTrans(JS.WyckoffFinder.WyckoffCoord.p2);JS.WyckoffFinder.WyckoffCoord.p2.sub2(JS.WyckoffFinder.WyckoffCoord.p2,JS.WyckoffFinder.WyckoffCoord.p1);JS.WyckoffFinder.WyckoffCoord.p2.normalize();this.point=
JU.P3.newP(JS.WyckoffFinder.WyckoffCoord.p1);this.line=JU.V3.newV(JS.WyckoffFinder.WyckoffCoord.p2);break;case 2:this.type=3,JS.WyckoffFinder.WyckoffCoord.p1.set(0.19,0.51,0.73),this.op.rotTrans(JS.WyckoffFinder.WyckoffCoord.p1),JS.WyckoffFinder.WyckoffCoord.p2.set(0.23,0.47,0.86),this.op.rotTrans(JS.WyckoffFinder.WyckoffCoord.p2),JS.WyckoffFinder.WyckoffCoord.p3.set(0.1,0.2,0.3),this.op.rotTrans(JS.WyckoffFinder.WyckoffCoord.p3),this.plane=JU.Measure.getPlaneThroughPoints(JS.WyckoffFinder.WyckoffCoord.p1,
JS.WyckoffFinder.WyckoffCoord.p2,JS.WyckoffFinder.WyckoffCoord.p3,null,null,new JU.P4)}},"~S");a.getRow=d(a,"getRow",function(a,b,e){a=JU.PT.rep(a,"-","+-");a=JU.PT.rep(a,"x","*x");a=JU.PT.rep(a,"y","*y");a=JU.PT.rep(a,"z","*z");a=JU.PT.rep(a,"-*","-");a=JU.PT.rep(a,"+*","+");for(var d=JU.PT.split(a,"+"),g=d.length;0<=--g;)if(a=d[g],0!=a.length){var h=3;if(0<=a.indexOf("."))a=JU.PT.parseFloat(a),b[e+h]=a;else{var k=0,l=1;switch(a.charAt(0).charCodeAt(0)){case 45:l=-1;case 42:k++}for(var j=0,m=a.length,
p=0;--m>=k;){var t=a.charAt(m);switch(t.charCodeAt(0)){case 120:h=0;j=1;break;case 121:j=h=1;break;case 122:h=2;j=1;break;case 47:p=1,j=1/j;case 42:l*=j;j=0;break;default:t="0123456789".indexOf(t),0>t&&System.err.println("WH ????"),0==j?j=t:(p=0==p?10:10*p,j+=p*t)}}b[e+h]=l*j}}},"~S,~A,~N");m(a,"toString",function(){return this.asString(null,!1).toString()});a.p1=new JU.P3;a.p2=new JU.P3;a.p3=new JU.P3;a.pc=new JU.P3;a.vt=new JU.V3;b.nullHelper=null;b.helpers=new java.util.Hashtable});aa("JS");N(["JU.M4"],
"JS.CLEG","java.util.Arrays JU.AU $.BS $.P3 $.PT JS.SV JS.SpaceGroup $.UnitCell JV.Viewer".split(" "),function(){var b=bb(JS,"CLEG",null);d(b,"transformSpaceGroup",function(a,b,e,d,g){var h=a.getCurrentUnitCell(),k=a.getOperativeSymmetry();null!=h&&k!==h&&k.getUnitCell(h.getV0abc(null,null),!1,"modelkit");if(null==e)return"!no CLEG id for this space group";0<=e.indexOf("<")&&(e=JU.PT.rep(e,"<<",">super>").$replace("<",">"));if(0==e.length||e.endsWith(">"))e+=".";h=new JS.CLEG.ClegData(a.getSymTemp(),
JU.PT.split(e,">"));a=new JS.CLEG.AssignedSGParams(a,k,b,d,0,!1,g,e.equals("."));b=JS.CLEG.assignSpaceGroup(h,a);if(b.endsWith("!"))return b;a.mkIsAssign&&g.append(b);return b},"JV.Viewer,JU.BS,~S,~O,JU.SB");b.assignSpaceGroup=d(b,"assignSpaceGroup",function(a,b){var e=b.vwr,d=b.mkIndex,g=a.tokens,h=0>d;h&&(d=0);if(d>=g.length)return"invalid CLEG expression!";var k=null!=b.mkParamsOrUC;if(1<g.length&&k)return"invalid syntax - can't mix transformations and UNITCELL option!";0==d&&!h&&JS.CLEG.standardizeTokens(g,
!1);var l=d==g.length-1,j=g[d].trim(),m=j.equals("."),p=l?m:JS.CLEG.isTransformOnly(g[d+1])&&0<g[d+1].length;if(0==d){if(0==j.length||m){if(null==b.mkSym00)return"no starting space group for CLEG!";if(!b.mkIsAssign)return g[0]=b.mkSym00.getSpaceGroupClegId(),b.mkIndex=m&&l?0:1,b.mkWasNode=1==b.mkIndex,b.mkIgnoreAllSettings=p,JS.CLEG.assignSpaceGroup(a,b)}if(b.mkIsAssign&&null==b.mkSym00)return"no starting space group for calculation!"}var t=null!=JS.CLEG.getCalcType(j);if((t||JS.CLEG.isTransformOnly(j))!=
b.mkWasNode)return"invalid CLEG expression, not node>transform>node>transform>....!";b.mkWasNode=!b.mkWasNode;var s=t?j:null;t&&(j=g[++d].trim(),l=d==g.length-1);l&&(m&&null!=a.getPrevNode())&&(j=a.getPrevNode().getCleanITAName());var r=j.lastIndexOf(":"),n=null==b.mkSym00,z=!1,u=JS.CLEG.isTransform(j,!1),w=u&&!(u&&0<=r),y=!1,B=!1,r=a.sym,u=null;if(!w&&(a.setSymmetry(r),u=new JS.CLEG.ClegNode(a,d,j),null!=a.errString))return a.errString;if(null==a.getPrevNode()){if(!JS.CLEG.checkFullSyntax(g,r,JS.CLEG.allow300))return"invalid CLEG expression!";
if(!b.mkCalcOnly&&!w&&n&&!u.isDefaultSetting()){y=C(-1,[u.specialPrefix+u.myIta]);n=b.mkCalcOnly?new JS.CLEG.AssignedSGParams(e,!1):new JS.CLEG.AssignedSGParams(e,null,null,b.mkParamsOrUC,-1,!0,b.mkSb,!1);y=new JS.CLEG.ClegData(e.getSymTemp(),y);n=JS.CLEG.assignSpaceGroup(y,n);if(n.endsWith("!"))return n;b.mkCalcOnly?(r=b.mkSym00=y.sym,a.trMat=y.trMat):b.mkSym00=e.getOperativeSymmetry();if(null==b.mkSym00)return"CLEG spacegroup initialization error!";n=!1;y=!0}var B=0==d&&(!b.mkCalcOnly&&!n&&p||b.mkIsAssign),
p=n?null:b.mkSym00.getSpaceGroupClegId(),x=null;if(!n&&!(null==p||p.equals("0"))){var D=p.indexOf(":");0<D&&(x=p.substring(D+1),p=p.substring(0,D));B&&(x=b.mkSym00.getSpaceGroupInfoObj("itaTransform",null,!1,!1))}null==a.trMat&&(a.trMat=new JU.M4,a.trMat.setIdentity());if(!b.mkIsAssign&&(a.setSymmetry(r),a.setPrevNode(new JS.CLEG.ClegNode(a,-1,null==p?null:p+":"+x)),b.mkIgnoreAllSettings&&a.getPrevNode().disable(),!a.getPrevNode().update(a)))return a.errString}if(t&&!a.getPrevNode().setCalcNext(a,
s))return a.errString;if(w&&(l&&(z=!0),0<j.length&&a.addTransform(d,j),++b.mkIndex,!z))return JS.CLEG.assignSpaceGroup(a,b);if(!B){a.setSymmetry(r);if(!u.update(a))return a.errString;l&&m&&a.setNodeTransform(u);a.updateTokens(u)}if(!l)return b.mkIndex++,a.setPrevNode(u),JS.CLEG.assignSpaceGroup(a,b);t=m=l=null;l=!k||!JU.AU.isAD(b.mkParamsOrUC)?null:b.mkParamsOrUC;n&&(r.setUnitCellFromParams(null==l?F(-1,[10,10,10,90,90,90]):l,!1,NaN),b.mkParamsOrUC=null,k=!1);k?JU.AU.isAD(b.mkParamsOrUC)?l=b.mkParamsOrUC:
(m=b.mkParamsOrUC,t=m[0]):n||(a.setSymmetry(r=b.mkSym00),null==a.trMat&&(a.trMat=new JU.M4,a.trMat.setIdentity()),m=r.getV0abc(C(-1,[a.trMat]),null),t=m[0]);null!=m&&(l=r.getUnitCell(m,!1,"assign").getUnitCellParams(),null==t&&(t=m[0]));k=j.equalsIgnoreCase("P1")||j.equals("ITA/1.1");try{var A,E,s=-1;if(b.mkCalcOnly)b.mkBitset=A=new JU.BS,E=!0;else{if(null!=b.mkBitset&&b.mkBitset.isEmpty())return"no atoms specified!";A=e.getThisModelAtoms();var I=k?A:JS.SV.getBitSet(e.evaluateExpressionAsVariable("{within(unitcell)}"),
!0);null==b.mkBitset&&(b.mkBitset=A);null!=b.mkBitset&&(A.and(b.mkBitset),k||A.and(I));s=(E=A.isEmpty())&&0>e.am.cmi?0:E?e.am.cmi:e.ms.at[A.nextSetBit(0)].getModelIndex();b.mkIsAssign||e.ms.getModelAuxiliaryInfo(s).remove("spaceGroupInfo")}!n&&!b.mkIsAssign&&r.saveOrRetrieveTransformMatrix(a.trMat);null==l&&(l=r.getUnitCellMultiplied().getUnitCellParams());var z=(new Boolean(z|b.mkIsAssign)).valueOf(),Q=E&&z?null:e.findSpaceGroup(r,z?A:null,z?null:u.getName(),l,t,m,2|(b.mkCalcOnly?16:0)|(!n||b.mkIsAssign?
0:4));if(null==Q)return"Space group "+u.getName()+" is unknown or not compatible!";if(null==m||n)m=Q.get("unitcell");var j=Q.get("name"),O=Q.get("jmolId"),N=Q.get("basis"),L=Q.remove("sg");r.getUnitCell(m,!1,null);r.setSpaceGroupTo(null==L?O:L);r.setSpaceGroupName(j);if(b.mkCalcOnly)return a.setSymmetry(r),"OK";null==N&&(N=r.removeDuplicates(e.ms,A,!0));e.ms.setSpaceGroup(s,r,N);if(b.mkIsAssign)return j;(n||y)&&e.runScript("unitcell on; center unitcell;axes unitcell; axes 0.1; axes on;set perspectivedepth false;moveto 0 axis c1;draw delete;show spacegroup");
var G=a.abcFor(a.trMat);g[d]=L.getClegId();if(!h){JS.CLEG.standardizeTokens(g,!0);var R=JU.PT.join(g,">",0)+(N.isEmpty()?"":"\n basis="+N);System.out.println("CLEG="+R);b.mkSb.append(R).append("\n")}return G}catch(S){if(ba(S,Exception))return JV.Viewer.isJS||S.printStackTrace(),S.getMessage()+"!";throw S;}},"JS.CLEG.ClegData,JS.CLEG.AssignedSGParams");b.standardizeTokens=d(b,"standardizeTokens",function(a,b){for(var d=a.length;0<=--d;){var m=a[d];if(0!=m.length){m=JS.CLEG.cleanCleg000(m);if(m.endsWith(":h"))m.startsWith("R")||
(m=m.substring(0,m.length-2));else if(b||!m.endsWith(":2/3a+1/3b+1/3c,-1/3a+1/3b+1/3c,-1/3a-2/3b+1/3c"))m.endsWith(":r")?m.startsWith("R")||(m=m.substring(0,m.length-1)+"2/3a+1/3b+1/3c,-1/3a+1/3b+1/3c,-1/3a-2/3b+1/3c"):m.equals("r")?m="2/3a+1/3b+1/3c,-1/3a+1/3b+1/3c,-1/3a-2/3b+1/3c":m.equals("h")&&(m="a-b,b-c,a+b+c");a[d]=m}}System.out.println("MK StandardizeTokens "+java.util.Arrays.toString(a))},"~A,~B");b.cleanCleg000=d(b,"cleanCleg000",function(a){return a.endsWith(";0,0,0")?a.substring(0,a.length-
6):a},"~S");b.isProbableClegSetting=d(b,"isProbableClegSetting",function(a){var b=a.indexOf(":"),d=JS.SpaceGroup.getExplicitSpecialGroupType(a);return 0<=d&&0<b&&0<JS.SpaceGroup.getITNo(0==d?a:a.substring(2),b)&&a.indexOf(",")>b?b:0},"~S");b.checkFullSyntax=d(b,"checkFullSyntax",function(a,b,d){for(var m=0;m<a.length;m++){var g=a[m].trim();if(!(null==g||0==g.length||g.startsWith("sub")||g.startsWith("super"))){var h=JS.SpaceGroup.getExplicitSpecialGroupType(g);0<h&&(g=g.substring(2));var k=g.indexOf(":"),
l=g.indexOf(",",k+1),j=g.indexOf("."),q=0==g.indexOf("?:")||0==g.indexOf(".:")||0==g.indexOf("0:"),p=0<k&&l>k,t=g.indexOf("]"),t=0<t&&"["==g.charAt(0)&&(0>k||k==t+1),t=q?0:t?1:JU.PT.parseFloatStrict(0<k?g.substring(0,k):g);if(Float.isNaN(t)){if(0<j||p)return!1}else if(!q&&!JS.SpaceGroup.isInRange(t,h,!p,d&&0==h))return!1;if(!(0>l)&&(g=0<k?g.substring(k+1):g,0==b.convertTransform(g,null).determinant3()))return!1}}return!0},"~A,J.api.SymmetryInterface,~B");b.getCalcType=d(b,"getCalcType",function(a){return 0==
a.length||a.equals("sub")?"sub":"s"!=a.charAt(0)?null:a.startsWith("sub(")?"sub(":a.equals("super")?"super":a.startsWith("super(")?"super(":null},"~S");b.isTransformOnly=d(b,"isTransformOnly",function(a){return JS.CLEG.isTransform(a,!1)&&0>a.indexOf(":")},"~S");b.isTransform=d(b,"isTransform",function(a,b){return 0==a.length||(0<a.indexOf(",")||0<="!r!h".indexOf(a))||b&&(a.endsWith(":r")||a.endsWith(":h"))},"~S,~B");d(b,"getMatrixTransform",function(a,b,d){0==b.length&&(b=".");0>b.indexOf(">")&&!b.equals(".")&&
(b=">>"+b);var m=JU.PT.split(b,">");0==m[0].length&&(m[0]="ref");var g=new JS.CLEG.ClegData(a.getSymTemp(),m),h=R(d,"java.util.Map")?d:null;d=null==h&&R(d,"JU.Lst")?d:null;g.setReturnMap(h);g.setReturnLst(d);a=JS.CLEG.assignSpaceGroup(g,new JS.CLEG.AssignedSGParams(a,b.equals(".")));if(0<a.indexOf("!"))return System.err.println(a),null!=h&&h.put("error",a),null;null==d&&null==h&&(System.out.println("CLEG transform: "+JU.PT.join(m,">",0)),b=g.abcFor(g.trMat),System.out.println("CLEG transform: "+m[0]+
">"+b+">"+m[m.length-1]));return g.trMat},"JV.Viewer,~S,~O");var a=I(function(){this.retLst=this.retMap=this.prevNode=this.trTemp=this.trLink=this.errString=this.trMat=this.sym=this.tokens=null;this.asM4=!1;S(this,arguments)},JS.CLEG,"ClegData",null);pa(a,function(){this.trTemp=new JU.M4});$(a,function(a,b){this.tokens=b;this.sym=a},"J.api.SymmetryInterface,~A");d(a,"setSymmetry",function(a){this.sym=a},"J.api.SymmetryInterface");d(a,"addSGTransform",function(a,b){null==this.trMat&&(System.out.println("ClegData reset"),
this.trMat=new JU.M4,this.trMat.setIdentity());null!=a&&this.trMat.mul(this.matFor(a));null!=b&&System.out.println("ClegData adding "+b+" "+a+" now "+this.abcFor(this.trMat));return this.trMat},"~S,~S");d(a,"abcFor",function(a){return this.sym.staticGetTransformABC(a,!1)},"JU.M4");d(a,"matFor",function(a){return this.sym.convertTransform(a,0<a.indexOf(">")?null:this.trTemp)},"~S");d(a,"removePrevNodeTrm",function(){null!=this.prevNode&&(null!=this.prevNode.myTrm&&!this.prevNode.disabled)&&this.addSGTransform("!"+
this.prevNode.myTrm,"!prevNode.myTrm")});d(a,"calculate",function(a){a.invert();var b=JU.M4.newM4(this.trMat);b.mul(a);return this.sym.convertTransform(null,b)},"JU.M4");d(a,"updateTokens",function(a){var b=a.index,d=a.name,d=d.startsWith("ITA/")?d.substring(4):(null==a.myIta?".":a.myIta)+":"+a.myTrm;this.setToken(b,d);null!=a.calculated&&0<b&&this.setToken(b-1,a.calculated)},"JS.CLEG.ClegNode");d(a,"setToken",function(a,b){this.tokens[a]=b},"~N,~S");d(a,"addTransformLink",function(){null==this.trLink&&
(this.trLink=new JU.M4,this.trLink.setIdentity());this.trLink.mul(this.trTemp)});d(a,"setNodeTransform",function(a){a.myTrm=this.abcFor(this.trMat);a.setITAName(a.name)},"JS.CLEG.ClegNode");d(a,"addTransform",function(a,b){this.addSGTransform(b,">t>");this.addTransformLink();System.out.println("CLEG.addTransform index="+a+" trm="+this.trMat)},"~N,~S");d(a,"getPrevNode",function(){return this.prevNode});d(a,"setPrevNode",function(a){return this.prevNode=a},"JS.CLEG.ClegNode");d(a,"addPrimitiveTransform",
function(a,b){var d=this.sym.getSpaceGroupInfoObj("hmName",a+":"+b,!1,!1);if(null==d)return b;d=d.charAt(0);if(0>"ABCFI".indexOf(d))return b;d=JU.M4.newMV(JS.UnitCell.getPrimitiveTransform(d),JU.P3.new3(0,0,0));d.mul(this.matFor(b));return this.abcFor(d)},"~S,~S");d(a,"setReturnMap",function(a){null!=a&&(this.asM4=a.get("ASM4")===Boolean.TRUE,a.clear());this.retMap=a},"java.util.Map");d(a,"setReturnLst",function(a){null!=a&&a.clear();this.retLst=a},"JU.Lst");a=I(function(){this.myTrm=this.myIta=this.name=
null;this.index=0;this.calcNext=null;this.calcIndexMax=this.calcIndexMin=this.calcDepthMax=this.calcDepthMin=this.calcI2=this.calcI1=0;this.calculated=null;this.isThisModelCalc=this.disabled=!1;this.hallSymbol=null;this.specialType=0;this.specialPrefix="";S(this,arguments)},JS.CLEG,"ClegNode",null);$(a,function(a,b,d){null!=d&&(this.index=b,this.init(a,d))},"JS.CLEG.ClegData,~N,~S");d(a,"disable",function(){this.disabled=!0});d(a,"checkSpecial",function(a){switch(this.specialType=JS.SpaceGroup.getExplicitSpecialGroupType(a)){case -1:return null;
case 0:if(!JS.CLEG.allow300)return a;var b=a.indexOf("."),b=0<b?a.substring(0,b):a,d=JS.SpaceGroup.getITNo(b,0);if(300>d)return a;if(600<d)return null;this.specialType=100*E(d/100);this.specialPrefix=JS.SpaceGroup.getGroupTypePrefix(d);return""+(d-this.specialType)+a.substring(b.length);default:return this.specialPrefix=a.substring(0,2),a.substring(2)}},"~S");d(a,"init",function(a,b){var d=JS.CLEG.isProbableClegSetting(b);0<d&&(this.myIta=b.substring(0,d),this.myTrm=b.substring(d+1));b.equals("ref")&&
(this.isThisModelCalc=!0);b=this.checkSpecial(b);var m=b.endsWith(":p");m&&(b=b.substring(0,b.length-2));var g=b.startsWith("ITA/");g&&(b=this.checkSpecial(b.substring(4)));var h=!1,k=this.hallSymbol=null;if(0==this.specialType&&"["==b.charAt(0)){d=b.indexOf("]");if(0>d){a.errString="invalid Hall symbol: "+b+"!";return}this.hallSymbol=b.substring(1,d);d=this.hallSymbol.indexOf("(");0<d&&(k=this.hallSymbol.substring(d+1,this.hallSymbol.length-1)+" ",this.hallSymbol=this.hallSymbol.substring(0,d).trim(),
k=JU.PT.rep(k," ","/12,"),k="a,b,c;"+k.substring(0,k.length-1));d=b.indexOf(":");0<d&&(this.myTrm=b.substring(d+1));b="Hall:"+this.hallSymbol}else b.startsWith("HM:")?h=!0:3>=b.length&&(g=0<JS.SpaceGroup.getITNo(b,0))&&(b=this.checkSpecial(b)+".1");!g&&(null==this.hallSymbol&&!h)&&(d=JU.PT.isDigit(b.charAt(0))?b.indexOf(" "):-1,0<d&&(b=b.substring(0,d)),0<b.indexOf(".")&&!Float.isNaN(JU.PT.parseFloat(b))&&(g=!0));if(g){this.myTrm=b.endsWith(".1")?"a,b,c":a.sym.getSpaceGroupInfoObj("itaTransform",
this.specialPrefix+b,!1,!1);if(null==this.myTrm){a.errString="Unknown ITA setting: "+this.specialPrefix+b+"!";return}this.myIta=JU.PT.split(b,".")[0]}else null==this.myIta&&(this.myIta=a.sym.getSpaceGroupInfoObj("itaNumber",this.specialPrefix+b,!1,!1)),null==this.myTrm&&(this.myTrm=a.sym.getSpaceGroupInfoObj("itaTransform",this.specialPrefix+b,!1,!1)),null!=this.hallSymbol&&null!=k&&(this.myTrm=k+(this.myTrm.equals("a,b,c")?"":">"+this.myTrm));"0".equals(this.myIta)?a.errString="Could not get ITA space group for "+
b+"!":(m&&(this.myTrm=a.addPrimitiveTransform(this.myIta,this.myTrm)),this.setITAName(b))},"JS.CLEG.ClegData,~S");d(a,"setITAName",function(a){return this.name=(".".equals(a)||null==this.myIta?".":"ITA/"+this.specialPrefix+this.myIta)+(null==this.myTrm?"":":"+this.myTrm)},"~S");d(a,"update",function(a){if(null!=a.errString)return!1;if(null==this.name)return!0;var b=a.prevNode;b.isThisModelCalc&&(b.myIta=this.myIta);if(!(null==a.trLink&&null!=this.myIta&&(this.myIta.equals(b.myIta)||null!=b.calcNext)))return!0;
var d=JU.M4.newM4(a.trMat);a.removePrevNodeTrm();var m=null;if(null!=b.calcNext){var g=!0,h=m=!1;switch(b.calcNext){case "super(":case "sub(":h=!0;break;case "super":g=!1;break;case "":case "set":b.calcNext="set",m=!0}var k=JU.PT.parseInt(b.myIta),l=JU.PT.parseInt(this.myIta);if(h||!(null==a.retLst&&(null==a.retMap||a.asM4)&&m&&k==l)){m=a.sym.getSubgroupJSON(g?b.name:this.name,g?this.name:b.name,b.calcI1,b.calcI2,b.calcIndexMax<<24|b.calcIndexMin<<16|b.calcDepthMax<<8|b.calcDepthMin,a.retMap,a.retLst);
if(h=null!=m){if(m.endsWith("!"))return a.errString=m,!1;g||(m="!"+m)}b=b.myIta+">"+(h?m:"?")+">"+this.myIta;if(!h)return a.errString=b+"!",!1;a.addSGTransform(m,"sub")}}this.disabled||a.addSGTransform(this.myTrm,"myTrm");this.calculated=a.calculate(d);System.out.println("calculated is "+this.calculated+(null==a.retMap?"":" for the path "+a.retMap.get("indexPath")));return!0},"JS.CLEG.ClegData");d(a,"getName",function(){return this.name});d(a,"getCleanITAName",function(){if(null==this.name)return this.name=
".";var a=this.name.startsWith("ITA/")?this.name.substring(4):this.name;0!=this.specialType&&!a.startsWith(this.specialPrefix)&&(a=this.specialPrefix+a);return a});d(a,"isDefaultSetting",function(){return null==this.myTrm||JS.CLEG.cleanCleg000(this.myTrm).equals("a,b,c")});d(a,"setCalcNext",function(a,b){var d=b.length;switch(0==d?b:JS.CLEG.getCalcType(b)){case "sub":if(null!=a.retLst||null!=a.retMap){d=0;break}case "super":this.calcI2=this.calcI1=1;d=3;break;case "sub(":d=-3;break;case "super(":d=
-5}for(var m=!0;;){if(0==d)this.calcIndexMin=2,this.calcIndexMax=255,this.calcDepthMin=1,this.calcDepthMax=255,m=!1;else if(0<d)this.calcIndexMin=2,this.calcIndexMax=255,this.calcDepthMax=this.calcDepthMin=1,m=!1;else{if(b.indexOf(")")!=b.length-1)break;var g=JU.PT.split(JU.PT.trim(b.toLowerCase().substring(-d+1),")"),",");try{if(5==b.length||0<=b.indexOf("=")){this.calcIndexMin=2;this.calcIndexMax=255;this.calcDepthMin=1;this.calcDepthMax=255;b=b.substring(0,-d);for(var h=g.length;0<=--h;){var k=
g[h],l=Math.min(255,Integer.parseInt(k.substring(k.indexOf("=")+1)));k.startsWith("indexmax=")?this.calcIndexMax=Math.max(2,l):k.startsWith("indexmin=")?this.calcIndexMin=Math.max(2,l):k.startsWith("index=")&&(this.calcIndexMin=this.calcIndexMax=Math.max(2,l));k.startsWith("depthmax=")?this.calcDepthMax=Math.max(1,l):k.startsWith("depthmin=")?this.calcDepthMin=Math.max(1,l):k.startsWith("depth=")&&(this.calcDepthMin=this.calcDepthMax=Math.max(1,l))}}else switch(g.length){case 2:this.calcI2=Math.max(0,
Integer.parseInt(g[1]))&255;case 1:this.calcI1=Math.max(1,Integer.parseInt(g[0]))&255}b=b.substring(0,-d);m=!1}catch(j){if(!ba(j,Exception))throw j;}}break}if(m)return a.errString="Error parsing CLEG "+b+"!",!1;this.calcNext=b;return!0},"JS.CLEG.ClegData,~S");m(a,"toString",function(){return"[ClegNode #"+this.index+" "+this.name+"   "+this.myIta+":"+this.myTrm+(this.disabled?" disabled":"")+"]"});a=I(function(){this.vwr=null;this.mkIsAssign=this.mkCalcOnly=!1;this.mkSb=null;this.mkIgnoreAllSettings=
!1;this.mkParamsOrUC=this.mkBitset=this.mkSym00=null;this.mkWasNode=!1;this.mkIndex=0;S(this,arguments)},JS.CLEG,"AssignedSGParams",null);$(a,function(a,b){this.vwr=a;this.mkCalcOnly=!0;this.mkIsAssign=!1;this.mkSb=null;b&&(this.mkSym00=a.getOperativeSymmetry())},"JV.Viewer,~B");$(a,function(a,b,d,m,g,h,k,l){this.vwr=a;this.mkCalcOnly=!1;this.mkIndex=g;this.mkSym00=b;this.mkBitset=d;this.mkParamsOrUC=m;this.mkIgnoreAllSettings=h;this.mkSb=k;this.mkIsAssign=l},"JV.Viewer,J.api.SymmetryInterface,JU.BS,~O,~N,~B,JU.SB,~B");
b.allow300=!1})})(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.newFloatArray,Clazz.declareType,Clazz.prepareFields,Clazz.superConstructor,Clazz.newByteArray,Clazz.declareInterface,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);
