(function(ib,jb,kb,lb,z,mb,U,V,da,E,L,u,nb,Q,ob,ba,W,F,Ea,ia,ya,pb,Xa,qb,pa,Fa,Ga,N,rb,sb,za,tb,ub,vb,wb,Ha,xb,yb,zb,Ab,Bb,Cb,Db,Eb,Fb,Gb,Hb,Ib,Jb,Kb,Lb,Mb,Nb,Ob,Pb,d,p){U("J.adapter.smarter");da(["JS.Symmetry","JU.P3","$.SB"],"J.adapter.smarter.XtalSymmetry","java.util.Hashtable JU.BS $.Lst $.M3 $.M4 $.P3i $.PT $.V3 J.adapter.smarter.Atom JS.SpaceGroup $.SymmetryOperation $.UnitCell JU.BSUtil $.Logger $.SimpleUnitCell".split(" "),function(){var b=L(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.nVib=this.noSymmetryCount=0;this.ptTemp=
this.ptOffset=null;this.rmaxz=this.rmaxy=this.rmaxx=this.rminz=this.rminy=this.rminx=0;this.symmetry=null;this.symmetryRange=0;this.unitCellTranslations=this.unitCellParams=this.trajectoryUnitCells=null;E(this,arguments)},J.adapter.smarter,"XtalSymmetry",null);ia(b,function(){this.bondsFound=new JU.SB;this.ptOffset=new JU.P3});Q(b,function(){});d(b,"addRotatedTensor",function(a,c,e,g,l){null==this.ptTemp&&(this.ptTemp=new JU.P3,this.mTemp=new JU.M3);return a.addTensor(this.acr.getInterface("JU.Tensor").setFromEigenVectors(l.rotateAxes(e,
c.eigenVectors,this.ptTemp,this.mTemp),c.eigenValues,c.isIsotropic?"iso":c.type,c.id,c),null,g)},"J.adapter.smarter.Atom,JU.Tensor,~N,~B,J.adapter.smarter.XtalSymmetry.FileSymmetry");d(b,"applySymmetryBio",function(a,c,e){var g=a.get("biomts"),l=g.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]?W(3,0):null;if(null!=b)for(var j=0;3>j;j++)b[j]=this.latticeCells[j];this.latticeCells=
null;var b=this.acr.getFilterWithCase("BMCHAINS"),h=null==b?-1:2>b.length?0:JU.PT.parseInt(b.substring(1));-2147483648==h&&(h=-b.charAt(1).charCodeAt(0));var k=0<=e.indexOf("BYCHAIN")?1:0<=e.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,n=new java.util.Hashtable,t=0,q=this.asc.atoms;c=this.bondCount0>this.asc.bondIndex0&&c;switch(k){case 1:for(j=b;--j>=this.firstAtom;){var A=Integer.$valueOf(q[j].chainID),r=n.get(A);null==r&&(t++,n.put(A,r=new JU.BS));r.set(j)}this.asc.bsAtoms=new JU.BS;for(j=0;j<t;j++)this.asc.bsAtoms.set(b+j),c=new J.adapter.smarter.Atom,c.set(0,0,0),c.radius=16,this.asc.addAtom(c);for(var s=0,p,n=n.entrySet().iterator();n.hasNext()&&
((p=n.next())||1);){c=q[b+s++];r=p.getValue();for(j=r.nextSetBit(0);0<=j;j=r.nextSetBit(j+1))c.add(q[j]);c.scale(1/r.cardinality());c.atomName="Pt"+s;c.chainID=p.getKey().intValue()}this.firstAtom=b;b+=t;c=!1;break;case 2:this.asc.bsAtoms=new JU.BS;this.asc.bsAtoms.set(b);c=q[b]=new J.adapter.smarter.Atom;c.set(0,0,0);for(j=b;--j>=this.firstAtom;)c.add(q[j]);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<=e.indexOf("#<")&&
(l=Math.min(l,JU.PT.parseInt(e.substring(e.indexOf("#<")+2))-1),e=JU.PT.rep(e,"#<","_<"));j=0;for(n=this.firstAtom;n<b;n++)q[n].bsSymmetry=new JU.BS,a=q[n].chainID,a>j&&(j=a);a=this.asc.bsAtoms;r=c?W(this.asc.ac,0):null;for(s=null==d?1:0;s<l;s++){if(0<=e.indexOf("!#")){if(0<=e.indexOf("!#"+(s+1)+";"))continue}else if(0<=e.indexOf("#")&&0>e.indexOf("#"+(s+1)+";"))continue;var v=g.get(s),w=!v.equals(this.mident),C=null==d?null:d.get(s);if(null!=C&&null!=t){a=new JU.BS;for(n=t.entrySet().iterator();n.hasNext()&&
((p=n.next())||1);)0<=C.indexOf(":"+p.getKey()+";")&&a.or(p.getValue());null!=this.asc.bsAtoms&&a.and(this.asc.bsAtoms);C=null}for(var ma=-1,x=!1,n=this.firstAtom;n<b;n++){if(null!=a)x=!a.get(n);else if(null!=C&&(A=q[n].chainID)!=ma)x=0>C.indexOf(":"+this.acr.vwr.getChainIDStr(ma=A)+";");if(!x)try{var B=q[n].atomSite,D;c&&(r[B]=this.asc.ac);D=this.asc.newCloneAtom(q[n]);D.bondingRadius=s;this.asc.atomSymbolicMap.put(""+D.atomSerial,D);null!=this.asc.bsAtoms&&this.asc.bsAtoms.set(D.index);D.atomSite=
B;w&&v.rotTrans(D);D.bsSymmetry=JU.BSUtil.newAndSetBit(s)}catch(u){if(ba(u,Exception))this.asc.errorMessage="appendAtomCollection error: "+u;else throw u;}}w&&this.symmetry.addBioMoleculeOperation(v,!1);if(c)for(v=this.asc.bondIndex0;v<this.bondCount0;v++)n=this.asc.bonds[v],this.asc.addNewBondWithOrder(r[q[n.atomIndex1].atomSite],r[q[n.atomIndex2].atomSite],n.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==k){if(-1!=h){A=(g=0!=h)?new JU.BS:null;q=this.asc.atoms;B=0;g&&(B=0>h?Math.max(-h,j+1):Math.max(j+h,65),A.setBits(0,B-1),A.setBits(91,97),A.setBits(123,200));k=1==this.asc.structureCount?this.asc.structures[0].bsAll:null;d=new java.util.Hashtable;D=new java.util.Hashtable;n=null==k?null:new java.util.Hashtable;t=null;j=b;for(r=this.asc.ac;j<r;j++)s=q[j].chainID,w=q[j].bsSymmetry.nextSetBit(0),h=this.acr.vwr.getChainIDStr(s),v=0==w?h:h+w,e=d.get(v),null==e&&(g&&0!=w&&(w=200>B?A.nextClearBit(B):
200,200>w&&(A.set(w),e=Integer.$valueOf(this.acr.vwr.getChainID(""+String.fromCharCode(w),!0)),B=w)),null==e&&(e=Integer.$valueOf(this.acr.vwr.getChainID(v,!0))),v!==h&&(D.put(e,Integer.$valueOf(s)),null!=k&&(null!=t&&(t[1]=j),n.put(e,t=W(-1,[j,r])))),d.put(v,e)),q[j].chainID=e.intValue();if(0<this.asc.structureCount){q=this.asc.structures;g=this.asc.structureCount;for(n=D.entrySet().iterator();n.hasNext()&&((p=n.next())||1);){e=p.getKey();e=e.intValue();h=p.getValue().intValue();for(j=0;j<g;j++)A=
q[j],null==A.bsAll&&(A.startChainID==A.endChainID?A.startChainID==h&&(A=A.clone(),A.startChainID=A.endChainID=e,this.asc.addStructure(A)):System.err.println("XtalSymmetry not processing biomt chain structure "+this.acr.vwr.getChainIDStr(h)+" to "+this.acr.vwr.getChainIDStr(e)))}}}p=this.asc.getAtomSetAuxiliaryInfoValue(-1,"PDB_CONECT_bonds");if(!c&&null!=p)for(j=p.size();0<=--j;)if(n=p.get(j),c=this.asc.getAtomFromName(""+n[0]),q=this.asc.getAtomFromName(""+n[1]),null!=c&&null!=q&&c.bondingRadius!=
q.bondingRadius&&(null==a||a.get(c.index)&&a.get(q.index))&&25<c.distanceSquared(q))p.removeItemAt(j),System.out.println("long interchain bond removed for @"+c.atomSerial+"-@"+q.atomSerial)}j=b;for(r=this.asc.ac;j<r;j++)this.asc.atoms[j].bondingRadius=NaN}this.noSymmetryCount=b-this.firstAtom;this.finalizeSymmetry(this.symmetry);this.setCurrentModelInfo(l,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});d(b,"isWithinCell",function(a,c,e,g,l,b,j,h,k){return c.x>e-k&&c.x<g+k&&(2>a||c.y>l-k&&c.y<b+k)&&(3>a||c.z>j-k&&c.z<h+k)},"~N,JU.P3,~N,~N,~N,~N,~N,~N,~N");d(b,"scaleFractionalVibs",
function(){for(var a=this.acr.unitCellParams,a=JU.P3.new3(1/a[0],1/a[1],1/a[2]),c=this.asc.getAtomSetAtomIndex(this.asc.iSet),e=this.asc.ac;--e>=c;){var g=this.asc.atoms[e].vib;null!=g&&g.scaleT(a)}});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,"setSpinVectors",function(){if(0<this.nVib||0>this.asc.iSet||
!this.acr.vibsFractional)return this.nVib;for(var a=this.asc.getAtomSetAtomIndex(this.asc.iSet),c=this.getBaseSymmetry(),e=this.asc.ac;--e>=a;){var g=this.asc.atoms[e].vib;null!=g&&(0<g.modDim?g.setMoment():(g=g.clone(),c.toCartesian(g,!0),this.asc.atoms[e].vib=g),this.nVib++)}return this.nVib});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,"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(),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,e=this.asc.getLastAtomSetAtomIndex(),g=this.asc.ac;e<g;e++)a.toCartesian(c[e],!0);this.asc.setCoordinatesAreFractional(!1);this.acr.addVibrations=!1}return this.symmetry},"J.adapter.smarter.XtalSymmetry.FileSymmetry");d(b,"setSymmetry",function(a){return this.symmetry=a},"J.adapter.smarter.XtalSymmetry.FileSymmetry");d(b,"setTensors",function(){for(var a=this.asc.ac,c=this.asc.getLastAtomSetAtomIndex();c<
a;c++){var e=this.asc.atoms[c];null!=e.anisoBorU&&(e.addTensor(this.symmetry.getTensor(this.acr.vwr,e.anisoBorU),null,!1),Float.isNaN(e.bfactor)&&(e.bfactor=100*e.anisoBorU[7]),e.anisoBorU=null)}});d(b,"adjustRangeMinMax",function(a){var c=new JU.P3,e=new JU.P3,g=new JU.P3;this.acr.forcePacked&&(c.setT(a[1]),e.setT(a[2]),g.setT(a[3]),c.scale(this.packingRange),e.scale(this.packingRange),g.scale(this.packingRange));a[0].scaleAdd2(this.minXYZ.x,a[1],a[0]);a[0].scaleAdd2(this.minXYZ.y,a[2],a[0]);a[0].scaleAdd2(this.minXYZ.z,
a[3],a[0]);a[0].sub(c);a[0].sub(e);a[0].sub(g);var l=JU.P3.newP(a[0]);this.symmetry.toFractional(l,!0);this.setSymmetryMinMax(l);a[1].scale(this.maxXYZ.x-this.minXYZ.x);a[2].scale(this.maxXYZ.y-this.minXYZ.y);a[3].scale(this.maxXYZ.z-this.minXYZ.z);a[1].scaleAdd2(2,c,a[1]);a[2].scaleAdd2(2,e,a[2]);a[3].scaleAdd2(2,g,a[3]);for(c=0;3>c;c++)for(e=c+1;4>e;e++)l.add2(a[c],a[e]),0!=c&&l.add(a[0]),this.symmetry.toFractional(l,!1),this.setSymmetryMinMax(l);this.symmetry.toCartesian(l,!1);l.add(a[1]);this.symmetry.toFractional(l,
!1);this.setSymmetryMinMax(l);this.minXYZ=JU.P3i.new3(z(Math.min(0,Math.floor(this.rminx+0.001))),z(Math.min(0,Math.floor(this.rminy+0.001))),z(Math.min(0,Math.floor(this.rminz+0.001))));this.maxXYZ=JU.P3i.new3(z(Math.max(1,Math.ceil(this.rmaxx-0.001))),z(Math.max(1,Math.ceil(this.rmaxy-0.001))),z(Math.max(1,Math.ceil(this.rmaxz-0.001))))},"~A");d(b,"applyAllSymmetry",function(a,c){if(!(0==this.asc.ac||null!=c&&c.isEmpty())){var e=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 g=this.symmetry.getSpaceGroupOperationCount(),l=null==this.acr.thisBiomolecule?null:new JU.BS;
this.checkNearAtoms=this.acr.checkNearAtoms||null!=l;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",W(-1,[this.minXYZ.x,this.minXYZ.y,this.minXYZ.z,this.maxXYZ.x,this.maxXYZ.y,this.maxXYZ.z,this.centroidPacked?u(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(u(this.minXYZ0.x),u(this.minXYZ0.y),u(this.minXYZ0.z)),this.maxXYZ.set(u(this.maxXYZ0.x),u(this.maxXYZ0.y),u(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),j=e*(this.crystalReaderLatticeOpsOnly?4:g),j=this.checkNearAtoms||null!=this.acr.thisBiomolecule?j*b:0<this.symmetryRange?j:1,h=Array(j),k=this.asc.atoms,d=0;d<e;d++)k[this.firstAtom+d].bsSymmetry=JU.BS.newN(g*(b+1));var n=0;this.unitCellTranslations=Array(b);var t=0,q=0,A=Math.abs(this.symmetryRange),r=0!=this.symmetryRange,
s=0>this.symmetryRange,p=0<this.symmetryRange;r&&(this.rminx=this.rminy=this.rminz=3.4028235E38,this.rmaxx=this.rmaxy=this.rmaxz=-3.4028235E38);var v=this.symmetry,w=v;this.checkAll=this.crystalReaderLatticeOpsOnly||1==this.asc.atomSetCount&&this.checkNearAtoms&&0<=this.latticeOp;var C=this.acr.lstNCS;if(null!=C&&0==C.get(0).m33){for(var ma=v.getSpaceGroupOperationCount(),x=C.size(),d=x;0<=--d;){var B=C.get(d);B.m33=1;v.toFractionalM(B)}for(d=1;d<ma;d++)for(var D=v.getSpaceGroupOperation(d),z=0;z<
x;z++)B=JU.M4.newM4(C.get(z)),B.mul2(D,B),this.doNormalize&&0<this.noSymmetryCount&&JS.SymmetryOperation.normalizeOperationToCentroid(3,B,k,this.firstAtom,this.noSymmetryCount),C.addLast(B)}d=null;C=v.getSpaceGroupOperation(0);this.doPackUnitCell&&(d=new JU.P3,this.ptOffset.set(0,0,0));ma=this.bondCount0>this.asc.bondIndex0&&this.applySymmetryToBonds?W(e,0):null;b=W(b,0);for(x=this.minXYZ.x;x<this.maxXYZ.x;x++)for(B=this.minXYZ.y;B<this.maxXYZ.y;B++)for(D=this.minXYZ.z;D<this.maxXYZ.z;D++)if(this.unitCellTranslations[t]=
JU.V3.new3(x,B,D),b[t++]=555+100*x+10*B+D,!(0!=x||0!=B||0!=D||0==h.length)){for(n=0;n<e;n++){q=k[this.firstAtom+n];null!=a&&(v=a.getAtomSymmetry(q,this.symmetry),v!==w&&(0==v.getSpaceGroupOperationCount()&&this.finalizeSymmetry(w=v),C=v.getSpaceGroupOperation(0)));z=JU.P3.newP(q);C.rotTrans(z);v.toCartesian(z,!1);if(this.doPackUnitCell)if(v.toUnitCellRnd(z,this.ptOffset),d.setT(z),v.toFractional(d,!1),this.acr.fixFloatPt(d,1E5),null==c)q.setT(d);else if(1E-4>q.distance(d))c.set(q.index);else{c.clear(q.index);
continue}null!=c&&q.bsSymmetry.clearAll();q.bsSymmetry.set(t*g);q.bsSymmetry.set(0);r&&this.setSymmetryMinMax(z);n<j&&(h[n]=z)}s&&(this.rminx-=A,this.rminy-=A,this.rminz-=A,this.rmaxx+=A,this.rmaxy+=A,this.rmaxz+=A);q=n=this.symmetryAddAtoms(0,0,0,0,n,t*g,h,a,l,ma)}p&&(this.rminx-=A,this.rminy-=A,this.rminz-=A,this.rmaxx+=A,this.rmaxy+=A,this.rmaxz+=A);t=0;for(x=this.minXYZ.x;x<this.maxXYZ.x;x++)for(B=this.minXYZ.y;B<this.maxXYZ.y;B++)for(D=this.minXYZ.z;D<this.maxXYZ.z;D++)if(t++,0!=x||0!=B||0!=
D)n=this.symmetryAddAtoms(x,B,D,q,n,t*g,h,a,l,ma);t*e==this.asc.ac-this.firstAtom&&this.duplicateAtomProperties(t);this.setCurrentModelInfo(e,v,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 e=JU.P3i.new3(this.minXYZ.x,this.minXYZ.y,this.minXYZ.z),g=JU.P3i.new3(this.maxXYZ.x,this.maxXYZ.y,this.maxXYZ.z),l=Array(4),b=0;4>b;b++)l[b]=
JU.P3.newP(c[b]);this.setUnitCellSafely();this.adjustRangeMinMax(l);c=new J.adapter.smarter.XtalSymmetry.FileSymmetry;c.getUnitCell(this.acr.fillRange,!1,null);this.applyAllSymmetry(this.acr.ms,a);for(var l=new JU.P3,j=this.asc.atoms,b=this.asc.ac;--b>=this.firstAtom;)l.setT(j[b]),this.symmetry.toCartesian(l,!1),c.toFractional(l,!1),(this.acr.noPack?!this.removePacking(this.ndims,l,e.x,g.x,e.y,g.y,e.z,g.z,this.packingRange):!this.isWithinCell(this.ndims,l,e.x,g.x,e.y,g.y,e.z,g.z,this.packingRange))&&
a.clear(b)},"JU.BS");d(b,"applySuperSymmetry",function(a,c,e,g,l,b,j){this.asc.setGlobalBoolean(7);var h=this.doPackUnitCell;this.doPackUnitCell=h;this.applyAllSymmetry(this.acr.ms,null);this.doPackUnitCell=h;for(var h=this.asc.atoms,k=this.asc.ac,d=e;d<k;d++)this.symmetry.toCartesian(h[d],!0),c.set(d);this.asc.setCurrentModelInfo("unitcell_conventional",this.symmetry.getV0abc("a,b,c",null));c=b[0];d=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,d.x,d.y,d.z,b.x,b.y,b.z,0,0,0,0,0,0,NaN,NaN,NaN,NaN,NaN,j]),null,null);a=null==g||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!=l&&0==l.length()&&(l=null);null!=l&&this.symmetry.toFractional(l,!0);for(d=e;d<k;d++)this.symmetry.toFractional(h[d],!0),null!=l&&h[d].sub(l);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],e=Math.abs(this.latticeCells[2]),g=this.latticeCells[3];this.firstAtom=this.asc.getLastAtomSetAtomIndex();var l=this.asc.bsAtoms;null!=l&&(this.updateBSAtoms(),this.firstAtom=l.nextSetBit(this.firstAtom));this.rminx=this.rminy=this.rminz=3.4028235E38;this.rmaxx=this.rmaxy=this.rmaxz=-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,g,a,c,e),this.applyRangeSymmetry(l);else{var b=null,j=1E-6;this.nVib=0;var h=this.acr.strSupercell,k=null!=h&&0<=h.indexOf(","),d=null,n=null,t=Array(3);k&&(d=new JU.M4,null==this.mident&&(this.mident=new JU.M4),this.setUnitCellSafely(),b=this.symmetry.getV0abc(h,d),d.transpose33(),null!=b&&!d.equals(this.mident)&&(this.setMinMax(this.ndims,g,a,c,e),n=JU.P3.newP(b[0]),t[0]=JU.V3.newV(b[1]),t[1]=JU.V3.newV(b[2]),t[2]=JU.V3.newV(b[3]),this.adjustRangeMinMax(b)));
k=this.asc.getLastAtomSetAtomIndex();null!=l&&(k=l.nextSetBit(k));3.4028235E38==this.rminx?b=null:(l=this.updateBSAtoms(),j=this.symmetry.getPrecision(),this.applySuperSymmetry(h,l,k,b,n,t,j));this.setMinMax(this.ndims,g,a,c,e);if(null==b){this.applyAllSymmetry(this.acr.ms,l);if(!this.acr.noPack&&(!this.applySymmetryToBonds||!this.acr.doPackUnitCell))return;this.setMinMax(this.ndims,g,a,c,e)}(this.acr.forcePacked||this.acr.doPackUnitCell||this.acr.noPack)&&this.trimToUnitCell(k);this.updateSupercellAtomSites(d,
l,j)}}});d(b,"duplicateAtomProperties",function(a){var c=this.asc.getAtomSetAuxiliaryInfoValue(-1,"atomProperties");if(null!=c)for(var e,g=c.entrySet().iterator();g.hasNext()&&((e=g.next())||1);){var l=e.getKey(),b=e.getValue();if("string"==typeof b){for(var j=b,h=new JU.SB,b=a;0<=--b;)h.append(j);c.put(l,h.toString())}else{l=b;j=F(l.length*a,0);for(b=a;0<=--b;)System.arraycopy(l,0,j,b*l.length,l.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");
d(b,"removePacking",function(a,c,e,g,l,b,j,h,k){return c.x>e-k&&c.x<g-k&&(2>a||c.y>l-k&&c.y<b-k)&&(3>a||c.z>j-k&&c.z<h-k)},"~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,e){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("presymmetryAtomCount",Integer.$valueOf(a)),this.asc.setCurrentModelInfo("latticeDesignation",c.getLatticeDesignation()),this.asc.setCurrentModelInfo("ML_unitCellRange",e),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,e){null!=a&&this.asc.setCurrentModelInfo("unitCellParams",a);null!=c&&this.asc.setCurrentModelInfo("unitCellOffset",c);null!=e&&this.asc.setCurrentModelInfo("matUnitCellOrientation",e)},"~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 e=null,g="R".equals(a);c.equals("conventional")?e=this.symmetry.getConventionalUnitCell(a,this.acr.primitiveToCrystal):c.equals("primitive")?(e=this.symmetry.getUnitCellVectors(),this.symmetry.toFromPrimitive(!0,a.charAt(0),e,this.acr.primitiveToCrystal)):g&&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:g&&c.equals("trigonal")?c=1==this.symmetry.getUnitCellInfoType(9)?
"a-b,b-c,a+b+c":null:(0>c.indexOf(",")||0>c.indexOf("a")||0>c.indexOf("b")||c.indexOf("c"),c=null);if(null!=c&&null==e&&null==(e=this.symmetry.getV0abc(c,null)))c=null;if(null==c)return null;this.acr.addJmolScript("unitcell "+JU.PT.esc(c));return e},"~S,~S");d(b,"setMinMax",function(a,c,e,g,l){this.minXYZ=new JU.P3i;this.maxXYZ=JU.P3i.new3(e,g,l);JU.SimpleUnitCell.setMinMaxLatticeParameters(a,this.minXYZ,this.maxXYZ,c)},"~N,~N,~N,~N,~N");d(b,"setSymmetryMinMax",function(a){this.rminx>a.x&&(this.rminx=
a.x);this.rminy>a.y&&(this.rminy=a.y);this.rminz>a.z&&(this.rminz=a.z);this.rmaxx<a.x&&(this.rmaxx=a.x);this.rmaxy<a.y&&(this.rmaxy=a.y);this.rmaxz<a.z&&(this.rmaxz=a.z)},"JU.P3");d(b,"setUnitCell",function(a,c,e){this.unitCellParams=F(a.length,0);for(var g=0;g<a.length;g++)this.unitCellParams[g]=a[g];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!=e&&this.symmetry.setOffsetPt(e);null!=c&&this.symmetry.initializeOrientation(c);this.setCurrentModelUCInfo(this.unitCellParams,e,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,e,g,l,b,j,h,k,d){var n=0==g,
t=null!=d;this.doPackUnitCell&&this.ptOffset.set(a,c,e);var q=this.symmetryRange*this.symmetryRange,A=0>this.symmetryRange,r=0<this.symmetryRange,s=n&&r,r=(new Boolean(r&!n)).valueOf(),p=this.symmetry.getSpaceGroupOperationCount(),v=this.acr.lstNCS,w=null==v?0:v.size(),C=p+w,w=z(w/p),ma=this.checkNearAtoms&&(1<C||this.doPackUnitCell),x=A||r,B=ma||x,D=null!=k,u=ma||s,O=this.acr.isMolecular?null:this.asc.bsAtoms,H=this.symmetry;A&&(g=this.noSymmetryCount);var A=this.firstAtom+this.noSymmetryCount,F=
0>this.asc.firstAtomToBond?A:this.asc.firstAtomToBond,y=new JU.P3,K=null,W=D?0.01:1E-4,N="\x00",V=null==O?this.firstAtom:O.nextSetBit(this.firstAtom),G=0;a:for(;G<C;G++)if(!(n&&0==G||this.crystalReaderLatticeOpsOnly&&0<G&&0!=G%this.latticeOp||null!=k&&k.get(G))){for(var X=this.firstAtom+(ma?l:r?g:0),$=G>=p?0:0==this.asc.vibScale?H.getSpinOp(G):this.asc.vibScale,aa=Math.max(this.firstAtom,null==O?0:O.nextSetBit(0)),S=B,ca=G>=p?z((G-p)/w):G,Y=ca+b;aa<A;aa++){var M=this.asc.atoms[aa];if(null==O||O.get(aa)){null==
h?H.newSpaceGroupPoint(M,G,G>=p?v.get(G-p):null,a,c,e,y):(H=h.getAtomSymmetry(M,this.symmetry),H.newSpaceGroupPoint(M,G,null,a,c,e,y),K=H.getSpaceGroupOperationCode(G),null!=K&&(N=K.charAt(0),H=h.getSymmetryFromCode(K),0==H.getSpaceGroupOperationCount()&&this.finalizeSymmetry(H)));this.acr.fixFloatPt(y,1E5);var T=JU.P3.newP(y);H.toCartesian(T,!1);if(this.doPackUnitCell&&(H.toUnitCellRnd(T,this.ptOffset),y.setT(T),H.toFractional(y,!1),this.acr.fixFloatPt(y,1E5),!this.isWithinCell(this.ndims,y,this.minXYZ0.x,
this.maxXYZ0.x,this.minXYZ0.y,this.maxXYZ0.y,this.minXYZ0.z,this.maxXYZ0.z,this.packingRange)))continue;s&&this.setSymmetryMinMax(T);var P=null;if(S){if(x&&(T.x<this.rminx||T.y<this.rminy||T.z<this.rminz||T.x>this.rmaxx||T.y>this.rmaxy||T.z>this.rmaxz))continue;for(var E=3.4028235E38,L=this.checkAll?this.asc.ac:X,Q=M.atomName,ba=null==K?M.altLoc:N,ea=V;ea<L;ea++)if(null==O||O.get(ea)){var U=j[ea-this.firstAtom];if(null!=U){U=T.distanceSquared(U);if(ma&&U<W){if(D){k.set(G);continue a}P=this.asc.atoms[ea];
if((null==P.atomName||P.atomName.equals(Q))&&P.altLoc==ba)break;P=null}r&&(ea<g&&U<E)&&(E=U)}}if(r&&E>q)continue}D&&(S=!1);ea=M.atomSite;if(null!=P)t&&(d[ea]=P.index),P.bsSymmetry.set(Y),P.bsSymmetry.set(ca);else{t&&(d[ea]=this.asc.ac);P=M.copyTo(y,this.asc);null!=this.asc.bsAtoms&&this.asc.bsAtoms.set(P.index);0!=$&&null!=P.vib&&(H.getSpaceGroupOperation(G).rotate(P.vib),P.vib.scale($));if(0>P.part){var da=Integer.$valueOf(1E3*G+500+P.part);null==this.disorderMap&&(this.disorderMap=new java.util.Hashtable);
E=this.disorderMap.get(da);null==E&&(L=Integer.$valueOf(P.part),Q=null==this.disorderMap.get(L),0==this.disorderMapMax||122==this.disorderMapMax?this.disorderMapMax=64:90==this.disorderMapMax&&(this.disorderMapMax=96),E=new Character(Q?P.altLoc:String.fromCharCode(++this.disorderMapMax)),this.disorderMap.put(da,E),Q&&this.disorderMap.put(L,E));P.altLoc=E.charValue()}P.atomSite=ea;null!=K&&(P.altLoc=N);P.bsSymmetry=JU.BSUtil.newAndSetBit(Y);P.bsSymmetry.set(ca);u&&(j[l++]=T);M=M.tensors;if(null!=M){P.tensors=
null;for(ea=M.size();0<=--ea;)T=M.get(ea),null!=T&&(1==p?P.addTensor(T.copyTensor(),null,!1):this.addRotatedTensor(P,T,G,!1,H))}}}}if(t){X=this.asc.bonds;$=this.asc.atoms;for(S=this.asc.bondIndex0;S<this.bondCount0;S++)if(ca=X[S],P=$[ca.atomIndex1],aa=$[ca.atomIndex2],!(null==P||null==aa||aa.atomSetIndex<P.atomSetIndex))if(Y=d[P.atomSite],M=d[aa.atomSite],Y>M&&(aa=Y,Y=M,M=aa),Y!=M&&(Y>=F||M>=F)&&0>this.bondsFound.indexOf(da="-"+Y+","+M))this.bondsFound.append(da),this.asc.addNewBondWithOrder(Y,M,
ca.order)}}return l},"~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),e=0,g=this.asc.getAtomSetAtomIndex(a),l=c.length;e<l;e++){var b=this.asc.atoms[g++];c[e]=b.part}this.asc.setAtomProperties("part",c,a,!1)}});d(b,"trimToUnitCell",function(a){var c=this.asc.atoms,e=this.updateBSAtoms();if(this.acr.noPack)for(a=e.nextSetBit(a);0<=a;a=e.nextSetBit(a+1))this.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)||e.clear(a);else for(a=e.nextSetBit(a);0<=a;a=e.nextSetBit(a+1))this.isWithinCell(this.ndims,c[a],this.minXYZ.x,this.maxXYZ.x,this.minXYZ.y,this.maxXYZ.y,this.minXYZ.z,this.maxXYZ.z,this.packingRange)||e.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,e){for(var g=c.cardinality(),g=Array(g),l=0,b=e*e,j=c.nextSetBit(0);0<=j;j=c.nextSetBit(j+1)){var h=this.asc.atoms[j],d=new J.adapter.smarter.Atom;d.setT(h);null!=a&&(a.rotTrans(d),JU.SimpleUnitCell.unitizeDimRnd(3,d,e));d.atomSerial=h.atomSite;d.atomSite=h.atomSite;this.symmetry.unitize(d);for(var m=!1,n=0;n<l;n++){var t=g[n];if(d.atomSerial==t.atomSerial&&d.distanceSquared(t)<b){m=!0;h.atomSite=t.atomSite;break}}m||(h.atomSite=
d.atomSite=l,g[l++]=d)}},"JU.M4,JU.BS,~N");d(b,"newFileSymmetry",function(){return new J.adapter.smarter.XtalSymmetry.FileSymmetry});b=Ea(J.adapter.smarter.XtalSymmetry,"FileSymmetry",JS.Symmetry);Q(b,function(){ya(this,J.adapter.smarter.XtalSymmetry.FileSymmetry,[])});d(b,"addLatticeVectors",function(a){return this.spaceGroup.addLatticeVectors(a)},"JU.Lst");d(b,"addSubSystemOp",function(a,c,e,g){this.spaceGroup.isSSG=!0;c=JS.SymmetryOperation.getXYZFromRsVs(c,e,!1);e=this.spaceGroup.addSymmetry(c,
-1,!0);this.spaceGroup.matrixOperations[e].setSigma(a,g);return c},"~S,JU.Matrix,JU.Matrix,JU.Matrix");d(b,"checkDistance",function(a,c,e,g,l,b,j,h){return this.unitCell.checkDistance(a,c,e,g,l,b,j,h)},"JU.P3,JU.P3,~N,~N,~N,~N,~N,JU.P3");d(b,"createSpaceGroup",function(a,c,e,g){this.spaceGroup=JS.SpaceGroup.createSpaceGroup(a,c,e,g);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,"getMatrixFromString",function(a,c){JS.SymmetryOperation.getMatrixFromString(null,a,c,!1,!0,!1)},"~S,~A");d(b,"getSpaceGroupOperationCode",function(a){return this.spaceGroup.matrixOperations[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.matrixOperations,c=new JU.M4;c.m00=c.m11=c.m22=-1;c.m33=1;for(var e=this.getSpaceGroupOperationCount(),g=new JU.M4,l=0;l<e;l++){g.mul2(c,a[l]);var b=JS.SymmetryOperation.getXYZFromMatrix(g,
!0,!0,!1);this.addSpaceGroupOperation(b,0)}})});U("JS");da(["J.api.SymmetryInterface"],"JS.Symmetry","java.util.Hashtable JU.BS $.JSJSONParser $.Lst $.M4 $.P3 $.PT $.Rdr $.SB J.api.Interface J.bspt.Bspt JS.PointGroup $.SpaceGroup $.SymmetryInfo $.SymmetryOperation $.UnitCell JU.Escape $.Logger $.SimpleUnitCell JV.FileManager".split(" "),function(){var b=L(function(){this.unitCell=this.spaceGroup=null;this.$isBio=!1;this.vwr=this.transformMatrix=this.desc=this.symmetryInfo=this.cip=this.pointGroup=
null;E(this,arguments)},JS,"Symmetry",null,J.api.SymmetryInterface);p(b,"getSymopList",function(a){for(var c=this.spaceGroup.operationCount,e=Array(c),g=0;g<c;g++)e[g]=""+this.getSpaceGroupXyz(g,a);return e},"~B");p(b,"isBio",function(){return this.$isBio});p(b,"setPointGroup",function(a,c,e,g,l,b,j,h,d,m){this.pointGroup=JS.PointGroup.getPointGroup(null==c?null:c.pointGroup,e,g,l,b,j,h,d,m,a.getBoolean(603979956),a.getScalePixelsPerAngstrom(!1));return this},"JV.Viewer,J.api.SymmetryInterface,JU.T3,~A,JU.BS,~B,~N,~N,~N,~B");
p(b,"getPointGroupName",function(){return this.pointGroup.getName()});p(b,"getPointGroupInfo",function(a,c,e,g,l,b){return null==c&&!e&&null!=this.pointGroup.textInfo?this.pointGroup.textInfo:null==c&&this.pointGroup.isDrawType(g,l,b)?this.pointGroup.drawInfo:e&&null!=this.pointGroup.info?this.pointGroup.info:this.pointGroup.getInfo(a,c,e,g,l,b)},"~N,~S,~B,~S,~N,~N");p(b,"setSpaceGroup",function(a){this.symmetryInfo=null;null==this.spaceGroup&&(this.spaceGroup=JS.SpaceGroup.getNull(!0,a,!1))},"~B");
p(b,"addSpaceGroupOperation",function(a,c){return this.spaceGroup.addSymmetry(a,c,!1)},"~S,~N");p(b,"addBioMoleculeOperation",function(a,c){this.$isBio=this.spaceGroup.isBio=!0;return this.spaceGroup.addSymmetry((c?"!":"")+"[[bio"+a,0,!1)},"JU.M4,~B");p(b,"setLattice",function(a){this.spaceGroup.setLatticeParam(a)},"~N");p(b,"getSpaceGroup",function(){return this.spaceGroup});p(b,"getSpaceGroupInfoObj",function(a,c,e,g){var l=!1;switch(a){case "list":return this.getSpaceGroupList(c);case "opsCtr":return this.spaceGroup.getOpsCtr(c);
case "itaTransform":case "itaNumber":l=!0;case "nameToXYZList":case "itaIndex":case "hmName":e=null;if(null!=c){if(c.endsWith("'"))return c=JS.SpaceGroup.convertWyckoffHMCleg(c,null),l&&null!=c?(e=c.indexOf(":"),"itaNumber".equals(a)?c.substring(0,e):c.substring(e+1)):null;if(1<c.length&&"/"==c.charAt(1)){0>c.indexOf(".")&&(0>c.indexOf(":")&&JU.PT.isDigit(c.charAt(2)))&&(c+=".1");e=this.getSpaceGroupJSON(this.vwr,"ITA",c,0);switch(null==e?"":a){case "itaData":return e;case "hmName":return e.get("hm");
case "nameToXYZList":return e.get("gp");case "itaIndex":return""+e.get("sg")+"."+e.get("set");case "itaTransform":return e.get("trm");case "itaNumber":return""+e.get("sg")}return null}c.startsWith("ITA/")&&(c=c.substring(4));e=JS.SpaceGroup.determineSpaceGroupN(c);null==e&&"nameToXYZList".equals(a)&&(e=JS.SpaceGroup.createSpaceGroupN(c,!0))}else null!=this.spaceGroup?e=this.spaceGroup:null!=this.symmetryInfo&&(e=this.symmetryInfo.getDerivedSpaceGroup());switch(null==e?"":a){case "hmName":return e.getHMName();
case "nameToXYZList":a=new JU.Lst;e.setFinalOperations();l=0;for(c=e.getOperationCount();l<c;l++)a.addLast(e.getOperation(l).xyz);return a;case "itaIndex":return e.getItaIndex();case "itaTransform":return e.itaTransform;case "itaNumber":return e.itaNumber}return null;default:return JS.SpaceGroup.getInfo(this.spaceGroup,a,c,e,g)}},"~S,~O,~B,~B");d(b,"getSpaceGroupList",function(a){for(var c=new JU.SB,e=this.getSpaceGroupJSON(this.vwr,"ITA","ALL",0),g=0,l=e.size();g<l;g++){var b=e.get(g),j=b.get("sg");
(null==a||j.equals(a))&&c.appendO(j).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");p(b,"getLatticeDesignation",function(){return this.spaceGroup.getShelxLATTDesignation()});p(b,"setFinalOperations",function(a,c,e,g,l,b,j){null!=c&&(c.startsWith("bio")||0<=c.indexOf(" *("))&&this.spaceGroup.setName(c);var h="unspecified!".equals(c);h&&(j="calculated");if(null!=
j){var d=new JU.Lst;d.addLast(this.spaceGroup.matrixOperations[0]);for(var m=1;m<this.spaceGroup.operationCount;m++)(h||j.contains(" "+(m+1)+" "))&&d.addLast(this.spaceGroup.matrixOperations[m]);this.spaceGroup=JS.SpaceGroup.createSpaceGroup(-1,c+" *("+j.trim()+")",d,-1)}this.spaceGroup.setFinalOperationsForAtoms(a,e,g,l,b)},"~N,~S,~A,~N,~N,~B,~S");p(b,"getSpaceGroupOperation",function(a){return null==this.spaceGroup||null==this.spaceGroup.matrixOperations||a>=this.spaceGroup.matrixOperations.length?
null:null==this.spaceGroup.finalOperations?this.spaceGroup.matrixOperations[a]:this.spaceGroup.finalOperations[a]},"~N");p(b,"getSpaceGroupXyz",function(a,c){return this.spaceGroup.getXyz(a,c)},"~N,~B");p(b,"newSpaceGroupPoint",function(a,c,e,g,l,b,j){null==e&&null==this.spaceGroup.finalOperations&&(e=this.spaceGroup.matrixOperations[c],e.isFinalized||e.doFinalize());JS.SymmetryOperation.rotateAndTranslatePoint(null==e?this.spaceGroup.finalOperations[c]:e,a,g,l,b,j)},"JU.P3,~N,JU.M4,~N,~N,~N,JU.P3");
p(b,"rotateAxes",function(a,c,e,g){return 0==a?c:this.spaceGroup.finalOperations[a].rotateAxes(c,this.unitCell,e,g)},"~N,~A,JU.P3,JU.M3");p(b,"getSpinOp",function(a){return this.spaceGroup.matrixOperations[a].getMagneticOp()},"~N");p(b,"getLatticeOp",function(){return this.spaceGroup.latticeOp});p(b,"getLatticeCentering",function(){return JS.SymmetryOperation.getLatticeCentering(this.getSymmetryOperations())});p(b,"getOperationRsVs",function(a){return(null==this.spaceGroup.finalOperations?this.spaceGroup.matrixOperations:
this.spaceGroup.finalOperations)[a].rsvs},"~N");p(b,"getSiteMultiplicity",function(a){return this.spaceGroup.getSiteMultiplicity(a,this.unitCell)},"JU.P3");p(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:""});p(b,"geCIFWriterValue",function(a){return null==this.spaceGroup?null:this.spaceGroup.getCIFWriterValue(a,this)},"~S");p(b,"getLatticeType",
function(){return null!=this.symmetryInfo?this.symmetryInfo.latticeType:null==this.spaceGroup?"P":this.spaceGroup.latticeType});p(b,"getIntTableNumber",function(){return null!=this.symmetryInfo?this.symmetryInfo.intlTableNo:null==this.spaceGroup?null:this.spaceGroup.itaNumber});p(b,"getIntTableIndex",function(){return null!=this.symmetryInfo?this.symmetryInfo.intlTableIndexNdotM:null==this.spaceGroup?null:this.spaceGroup.getItaIndex()});p(b,"getIntTableTransform",function(){return null!=this.symmetryInfo?
this.symmetryInfo.intlTableTransform:null==this.spaceGroup?null:this.spaceGroup.itaTransform});p(b,"getSpaceGroupClegId",function(){return null!=this.symmetryInfo?this.symmetryInfo.getClegId():this.spaceGroup.getClegId()});p(b,"getSpaceGroupJmolId",function(){return null!=this.symmetryInfo?this.symmetryInfo.intlTableJmolId:null==this.spaceGroup?null:this.spaceGroup.jmolId});p(b,"getCoordinatesAreFractional",function(){return null==this.symmetryInfo||this.symmetryInfo.coordinatesAreFractional});p(b,
"getCellRange",function(){return null==this.symmetryInfo?null:this.symmetryInfo.cellRange});p(b,"getSymmetryInfoStr",function(){if(null!=this.symmetryInfo)return this.symmetryInfo.infoStr;if(null==this.spaceGroup)return"";(this.symmetryInfo=new JS.SymmetryInfo).setSymmetryInfoFromModelkit(this.spaceGroup);return this.symmetryInfo.infoStr});p(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});p(b,"getSymmetryOperations",function(){if(null!=this.symmetryInfo)return this.symmetryInfo.symmetryOperations;null==this.spaceGroup&&(this.spaceGroup=JS.SpaceGroup.getNull(!0,!1,!0));this.spaceGroup.setFinalOperations();return this.spaceGroup.finalOperations});p(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});p(b,"getAdditionalOperations",function(){if(null!=this.symmetryInfo)return this.symmetryInfo.getAdditionalOperations();this.getSymmetryOperations();return this.spaceGroup.getAdditionalOperations()});p(b,"isSimple",function(){return null==this.spaceGroup&&(null==this.symmetryInfo||null==this.symmetryInfo.symmetryOperations)});
p(b,"haveUnitCell",function(){return null!=this.unitCell});p(b,"setUnitCellFromParams",function(a,c,e){null==a&&(a=F(-1,[1,1,1,90,90,90]));this.unitCell=JS.UnitCell.fromParams(a,c,e);return this},"~A,~B,~N");p(b,"unitCellEquals",function(a){return a.unitCell.isSameAs(this.unitCell.getF2C())},"J.api.SymmetryInterface");p(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");p(b,"getUnitCellState",function(){return null==this.unitCell?"":this.unitCell.getState()});p(b,"getMoreInfo",function(){return this.unitCell.moreInfo});p(b,"initializeOrientation",function(a){this.unitCell.initOrientation(a)},"JU.M3");p(b,"unitize",function(a){this.unitCell.unitize(a)},"JU.T3");p(b,"toUnitCell",function(a,c){this.unitCell.toUnitCell(a,
c)},"JU.T3,JU.T3");p(b,"toSupercell",function(a){return this.unitCell.toSupercell(a)},"JU.P3");p(b,"toFractional",function(a,c){this.$isBio||this.unitCell.toFractional(a,c)},"JU.T3,~B");p(b,"toCartesian",function(a,c){this.$isBio||this.unitCell.toCartesian(a,c)},"JU.T3,~B");p(b,"getUnitCellParams",function(){return this.unitCell.getUnitCellParams()});p(b,"getUnitCellAsArray",function(a){return this.unitCell.getUnitCellAsArray(a)},"~B");p(b,"getUnitCellVerticesNoOffset",function(){return this.unitCell.getVertices()});
p(b,"getCartesianOffset",function(){return this.unitCell.getCartesianOffset()});p(b,"getFractionalOffset",function(a){var c=this.unitCell.getFractionalOffset();return a&&null!=c&&c.x==u(c.x)&&c.y==u(c.y)&&c.z==u(c.z)?null:c},"~B");p(b,"setOffsetPt",function(a){this.unitCell.setOffset(a)},"JU.T3");p(b,"setOffset",function(a){var c=new JU.P3;JU.SimpleUnitCell.ijkToPoint3f(a,c,0,0);this.unitCell.setOffset(c)},"~N");p(b,"getUnitCellMultiplier",function(){return this.unitCell.getUnitCellMultiplier()});
p(b,"getUnitCellMultiplied",function(){var a=this.unitCell.getUnitCellMultiplied();if(a===this.unitCell)return this;var c=new JS.Symmetry;c.unitCell=a;return c});p(b,"getCanonicalCopy",function(a,c){return this.unitCell.getCanonicalCopy(a,c)},"~N,~B");p(b,"getCanonicalCopyTrimmed",function(a,c){return this.unitCell.getCanonicalCopyTrimmed(a,c)},"JU.P3,~N");p(b,"getUnitCellInfoType",function(a){return this.unitCell.getInfo(a)},"~N");p(b,"getUnitCellInfo",function(a){return null==this.unitCell?null:
this.unitCell.dumpInfo(!1,a)},"~B");p(b,"isSlab",function(){return this.unitCell.isSlab()});p(b,"isPolymer",function(){return this.unitCell.isPolymer()});d(b,"getUnitCellVectors",function(){return this.unitCell.getUnitCellVectors()});p(b,"getUnitCell",function(a,c,e){if(null==a)return null;this.unitCell=JS.UnitCell.fromOABC(a,c);null!=e&&(this.unitCell.name=e);return this},"~A,~B,~S");p(b,"isSupercell",function(){return this.unitCell.isSupercell()});p(b,"notInCentroid",function(a,c,e){try{var g=new JU.BS,
l=c.nextSetBit(0),b=a.getMolecules(),j=b.length,h=a.at,d=b[j-1].firstAtomIndex==a.am[h[l].mi].firstAtomIndex,m=new JU.P3,n=e[6]/100;a=0!=n;a:for(;0<=--j&&c.get(b[j].firstAtomIndex);){var t=b[j].atomList;m.set(0,0,0);for(var l=0,q=t.nextSetBit(0);0<=q;q=t.nextSetBit(q+1))if(d||a)if(m.setT(h[q]),this.isNotCentroid(m,1,e,n))d&&g.set(q);else{if(!d)continue a}else m.add(h[q]),l++;(a||0<l&&this.isNotCentroid(m,l,e,0))&&g.or(t)}return g}catch(A){if(ba(A,Exception))return null;throw A;}},"JM.ModelSet,JU.BS,~A");
d(b,"isNotCentroid",function(a,c,e,g){a.scale(1/c);this.toFractional(a,!1);return 0!=g?(c=0<=g?g:5E-6,a.x+c<=e[0]||a.x-c>e[3]||a.y+c<=e[1]||a.y-c>e[4]||a.z+c<=e[2]||a.z-c>e[5]):a.x+5E-6<=e[0]||a.x+5E-5>e[3]||a.y+5E-6<=e[1]||a.y+5E-5>e[4]||a.z+5E-6<=e[2]||a.z+5E-5>e[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");p(b,"getSymmetryInfoAtom",function(a,c,e,g,l,b,j,h,d,m,n,t,q){return this.getDesc(a).getSymopInfo(c,e,g,l,b,j,h,d,m,n,t,q)},"JM.ModelSet,~N,~S,~N,JU.P3,JU.P3,JU.P3,~S,~N,~N,~N,~N,~A");p(b,"getSpaceGroupInfo",function(a,c,e,g,l){var b=null==c;if(null==c){0>e&&(e=this.vwr.am.cmi);var j=a.getModelAuxiliaryInfo(e);null!=j&&(c=j.get("spaceGroup"))}j=null;null!=l&&(j=(new JS.Symmetry).setUnitCellFromParams(l,!1,NaN));return this.getDesc(a).getSpaceGroupInfo(this,
e,c,0,null,null,null,0,-1,g,b,0,j,null)},"JM.ModelSet,~S,~N,~B,~A");p(b,"getV0abc",function(a,c){var e=null,e=a&&a[0]?a[0]:null;return(null!=e?V(e,"JU.T3"):V(a,Array))?a:JS.UnitCell.getMatrixAndUnitCell(this.unitCell,a,c)},"~O,JU.M4");p(b,"getQuaternionRotation",function(a){return null==this.unitCell?null:this.unitCell.getQuaternionRotation(a)},"~S");p(b,"getFractionalOrigin",function(){return this.unitCell.getFractionalOrigin()});p(b,"getState",function(a,c,e){var g=null!=a.getInfo(c,"spaceGroupAssigned"),
l=this.getFractionalOffset(!1),b=!1;if(null!=l&&(0!=l.x||0!=l.y||0!=l.z))e.append("; set unitcell ").append(JU.Escape.eP(l)),b=!0;l=this.getUnitCellMultiplier();null!=l&&(e.append("; set unitcell ").append(JU.SimpleUnitCell.escapeMultiplier(l)),b=!0);l=a.getInfo(c,"spaceGroup");g&&null!=l&&(g=l.indexOf("#"),0<=g&&(l=l.substring(g+1)),a="\n UNITCELL "+JU.Escape.e(a.getUnitCell(c).getUnitCellVectors()),e.append(a),e.append("\n MODELKIT SPACEGROUP "+JU.PT.esc(l)),e.append(a),b=!0);return b},"JM.ModelSet,~N,JU.SB");
p(b,"getIterator",function(a,c,e,g){return J.api.Interface.getInterface("JS.UnitCellIterator",a,"script").set(this,c,a.ms.at,e,g)},"JV.Viewer,JM.Atom,JU.BS,~N");p(b,"toFromPrimitive",function(a,c,e,g){null==this.unitCell&&(this.unitCell=JS.UnitCell.fromOABC(e,!1));return this.unitCell.toFromPrimitive(a,c,e,g)},"~B,~S,~A,JU.M3");p(b,"generateCrystalClass",function(a){if(null==this.symmetryInfo||!this.symmetryInfo.isCurrentCell)return null;var c=this.getSymmetryOperations(),e=new JU.Lst,g=null==a,b=
0,f=0,j=0;g?(b=2.718281828459045,f=3.141592653589793,j=Math.log10(2E3),a=JU.P3.new3(b+1,f+2,j+3)):a=JU.P3.newP(a);if(null==c||null==this.unitCell)e.addLast(a);else{this.unitCell.toFractional(a,!0);var h=null,d=null;g&&(h=JU.P3.new3(f+4,j+5,b+6),this.unitCell.toFractional(h,!0),d=JU.P3.new3(j+7,b+8,f+9),this.unitCell.toFractional(d,!0));var f=new J.bspt.Bspt(3,0),j=f.allocateCubeIterator(),b=new JU.P3,m=c.length;a:for(;0<=--m;){c[m].rotate2(a,b);j.initialize(b,0.001,!1);if(j.hasMoreElements())continue a;
var n=JU.P3.newP(b);e.addLast(n);f.addTuple(n);g&&(null!=d&&(c[m].rotate2(d,b),e.addLast(JU.P3.newP(b))),null!=h&&(c[m].rotate2(h,b),e.addLast(JU.P3.newP(b))))}for(c=e.size();0<=--c;)b=e.get(c),g&&b.scale(0.5),this.unitCell.toCartesian(b,!0)}return e},"JU.P3");p(b,"calculateCIPChiralityForAtoms",function(a,c){a.setCursor(3);var e=this.getCIPChirality(a),g=a.getBoolean(603979960)?"CIPData":"CIPDataTracker",g=J.api.Interface.getInterface("JS."+g,a,"script").set(a,c);g.setRule6Full(a.getBoolean(603979823));
e.getChiralityForAtoms(g);a.setCursor(0)},"JV.Viewer,JU.BS");p(b,"calculateCIPChiralityForSmiles",function(a,c){a.setCursor(3);var e=this.getCIPChirality(a),g=J.api.Interface.getInterface("JS.CIPDataSmiles",a,"script").setAtomsForSmiles(a,c);e.getChiralityForAtoms(g);a.setCursor(0);return g.getSmilesChiralityArray()},"JV.Viewer,~S");d(b,"getCIPChirality",function(a){return null==this.cip?this.cip=J.api.Interface.getInterface("JS.CIPChirality",a,"script"):this.cip},"JV.Viewer");p(b,"getUnitCellInfoMap",
function(){return null==this.unitCell?null:this.unitCell.getInfo()});p(b,"setUnitCell",function(a){this.unitCell=JS.UnitCell.cloneUnitCell(a.unitCell)},"J.api.SymmetryInterface");p(b,"findSpaceGroup",function(a,c,e,g,b,f,j){return J.api.Interface.getInterface("JS.SpaceGroupFinder",a,"eval").findSpaceGroup(a,c,e,g,b,f,this,j)},"JV.Viewer,JU.BS,~S,~A,JU.T3,~A,~N");p(b,"setSpaceGroupName",function(a){this.symmetryInfo=null;null!=this.spaceGroup&&this.spaceGroup.setName(a)},"~S");p(b,"setSpaceGroupTo",
function(a){this.symmetryInfo=null;this.spaceGroup=V(a,"JS.SpaceGroup")?a:JS.SpaceGroup.getSpaceGroupFromJmolClegOrITA(this.vwr,a.toString())},"~O");p(b,"removeDuplicates",function(a,c,e){var g=this.unitCell,b=a.at;a=a.occupancies;for(var f=null!=a,j=Array(c.length()),h=c.nextSetBit(0);0<=h;h=c.nextSetBit(h+1)){var d=j[h]=JU.P3.newP(b[h]);g.toFractional(d,!1);e?g.unitizeRnd(d):g.unitize(d)}for(h=c.nextSetBit(0);0<=h;h=c.nextSetBit(h+1)){e=b[h];d=j[h];e=e.getAtomicAndIsotopeNumber();for(var g=f?a[h]:
0,m=c.nextSetBit(h+1);0<=m;m=c.nextSetBit(m+1))e!=b[m].getAtomicAndIsotopeNumber()||f&&g!=a[m]||1.96E-6>d.distanceSquared(j[m])&&c.clear(m)}return c},"JM.ModelSet,JU.BS,~B");p(b,"getEquivPoints",function(a,c,e){var g=this.getSymmetryOperations();return null==g||null==this.unitCell?null:this.unitCell.getEquivPoints(c,e,g,null==a?new JU.Lst:a,0,0,0,this.getPeriodicity())},"JU.Lst,JU.P3,~S");p(b,"getPeriodicity",function(){return null==this.spaceGroup?7:this.spaceGroup.periodicity});p(b,"getDimensionality",
function(){return null==this.spaceGroup?3:this.spaceGroup.nDim});p(b,"getEquivPointList",function(a,c,e,g){var b=null==g?this.getSymmetryOperations():g,f=0<=e.indexOf("newpt"),j=0<=e.indexOf("zapped"),h=a.size(),d=0<=e.indexOf("tofractional");if(0>e.indexOf("fromfractional"))for(var m=0;m<a.size();m++)this.toFractional(a.get(m),!1);e+=",fromfractional,tofractional";var n=0<c?0:h,t=c==h,q=0<c?c:h;t&&(c--,q--);j&&(q=0);var A=0<c?a.get(c):null;g=null==g?q:n;if(null!=b||null!=this.unitCell)for(m=c;m<
h;m++)this.unitCell.getEquivPoints(a.get(m),e,b,a,n,q,g,this.getPeriodicity());!j&&(a.size()==c||a.get(c)!==A||t||f)&&h--;for(m=h-c;0<=--m;)a.removeItemAt(c);if(!d)for(m=a.size();--m>=c;)this.toCartesian(a.get(m),!1)},"JU.Lst,~N,~S,~A");p(b,"getInvariantSymops",function(a,c){var e=this.getSymmetryOperations();if(null==e)return W(0,0);for(var g=new JU.BS,b=new JU.P3,f=new JU.P3,j=e.length,h=1;h<j;h++)b.setT(a),this.unitCell.toFractional(b,!1),this.unitCell.unitize(b),f.setT(b),e[h].rotTrans(b),this.unitCell.unitize(b),
1.96E-6>f.distanceSquared(b)&&g.set(h);e=W(g.cardinality(),0);if(null!=c&&e.length!=c.length)return null;b=0;for(h=1;h<j;h++)if(g.get(h)){if(null!=c&&c[b]!=h+1)return null;e[b++]=h+1}return e},"JU.P3,~A");p(b,"getWyckoffPosition",function(a,c,e){if(null==this.unitCell)return"";var g=this.spaceGroup;null==g&&null!=this.symmetryInfo&&(g=JS.SpaceGroup.determineSpaceGroupN(this.symmetryInfo.sgName),null==g&&(g=this.getSpaceGroupJmolId(),null==g&&(g=this.getSpaceGroupClegId()),g=JS.SpaceGroup.getSpaceGroupFromJmolClegOrITA(a,
g)));if(null==g||null==g.itaNumber)return"?";null==c?c=JU.P3.new3(0.53,0.2,0.16):"L".equals(e)||(c=JU.P3.newP(c),this.unitCell.toFractional(c,!1),this.unitCell.unitize(c));try{var b=this.getWyckoffFinder().getWyckoffFinder(a,g),f=null!=e&&"M"==e.charAt(0);f&&(e=1==e.length?null:e.substring(1));var j=null==e?-1:"L".equals(e)?-4:e.equalsIgnoreCase("coord")?-2:e.equalsIgnoreCase("coords")?-3:e.endsWith("*")?e.charAt(0).charCodeAt(0):0;if(0!=j)return null==b?"?":b.getInfo(this.unitCell,c,j,f,a.is2D());
if(null==b.findPositionFor(c,e))return null;this.unitCell.toCartesian(c,!1);return c}catch(h){if(ba(h,Exception))return h.printStackTrace(),null==e?"?":null;throw h;}},"JV.Viewer,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});p(b,"getTransform",function(a,c,e){return this.getDesc(null).getTransform(this.unitCell,this.getSymmetryOperations(),
a,c,e)},"JU.P3,JU.P3,~B");p(b,"isWithinUnitCell",function(a,c,e,g){return this.unitCell.isWithinUnitCell(c,e,g,a)},"JU.P3,~N,~N,~N");p(b,"checkPeriodic",function(a){return this.unitCell.checkPeriodic(a)},"JU.P3");p(b,"staticConvertOperation",function(a,c){return null==c?JS.SymmetryOperation.stringToMatrix(a):JS.SymmetryOperation.getXYZFromMatrixFrac(c,!1,!1,!1,!0)},"~S,JU.M4");p(b,"getSubgroupJSON",function(a,c,e,g){var b=JS.SpaceGroup.getExplicitSpecialGroupType(a);if(-1==b||(null==c||0==c.length?
b:JS.SpaceGroup.getExplicitSpecialGroupType(a))!=b)return null;b=JU.PT.parseInt(this.getSpaceGroupInfoObj("itaNumber",a,!1,!1));c=null==c?-1:0==c.length?0:JU.PT.parseInt(this.getSpaceGroupInfoObj("itaNumber",c,!1,!1));var f=0>c,j=0==c&&0==e,h=0==c&&0>e,d=0==c&&0<e&&0>g,m=0==c&&0<e&&0<g,n=0<c&&0>e,t=0<c&&0<e&&0>g,q=0<c&&0<e&&0<g;try{var A=this.getSpaceGroupJSON(this.vwr,"subgroups",a,b);a=0;if(null!=A){if(f)return A;if(j||h){for(var r=A.get("subgroups"),s=r.size(),p=j?W(s,0):null,v=h?new JU.BS:null,
w=s;0<=--w;){var A=r.get(w),C=A.get("sg").intValue();if(h)v.set(C);else{var u=A.get("subgroupIndex").intValue(),x="k".equals(A.get("trType"))?2:1,B=1==x?A.get("trSubtype"):"",D=A.get("det").doubleValue(),F=z(1>D?-1/D:D);B.equals("ct")?x=3:B.equals("eu")&&(x=4);var O=A.get("trm").size();p[w]=W(-1,[C,O,u,F,x])}}if(h){var H=W(v.cardinality(),0);e=0;for(w=v.nextSetBit(0);0<=w;w=v.nextSetBit(w+1))H[e++]=w;return H}return p}r=A.get("subgroups");v=0;s=r.size();if(d||m){if(e>s)throw new ArrayIndexOutOfBoundsException("no map.subgroups["+
e+"]!");v=e-1;if(d)return r.get(v);s=e}for(var E=n?new JU.Lst:null,w=v;w<s;w++)if(A=r.get(w),C=A.get("sg").intValue(),m||C==c){if(++a==e){if(t)return A}else if(q)continue;if(n)E.addLast(A);else{var y=A.get("trms"),s=y.size();return 1>g||g>s?null:y.get(g-1).get("trm")}}if(n&&!E.isEmpty())return E}if(0==e)return null;if(q&&0<a)throw new ArrayIndexOutOfBoundsException("only "+a+" maximal subgroup information for "+b+">>"+c+"!");throw new ArrayIndexOutOfBoundsException("no maximal subgroup information for "+
b+">>"+c+"!");}catch(K){if(ba(K,Exception))return K.getMessage();throw K;}},"~S,~S,~N,~N");p(b,"getSpaceGroupJSON",function(a,c,e,g){null==a&&(a=this.vwr);var b=c.equals("setting"),f=c.equals("settings"),j=c.equalsIgnoreCase("AFLOW"),h=!f&&c.equals("subgroups"),d=(b||f||h)&&-2147483648==g,m=!f&&!b&&!h?c:d?this.getSpaceGroupName():""+g;try{var n,t=null==e?0:JS.SpaceGroup.getExplicitSpecialGroupType(e);0<t&&(e=e.substring(2));var q=null,A,r,s;if(b&&null==e||f||h)if(r=!0,s=b?e:null,d){if(n=JU.PT.parseInt(this.getIntTableNumber()),
b||f)if(null==this.spaceGroup){var p=this.symmetryInfo.getDerivedSpaceGroup();if(null==p)return new java.util.Hashtable;s=p.jmolId}else s=this.getSpaceGroupClegId(),b?q=s.substring(s.indexOf(":")+1):f&&(g=0)}else n=g;else{j||(g=0);s=e;var v=s.indexOf("(");0>v&&(v=s.indexOf(":"));if(A=0<=v&&s.indexOf(",")>v)q=s.substring(v+1,s.length-(s.endsWith(")")?1:0)),s=s.substring(0,v),d=!0;n=s.equalsIgnoreCase("ALL")?0:JU.PT.parseInt(s);r=-2147483648!=n;v=s.indexOf(".");!A&&(r&&0==g&&0<v)&&(g=JU.PT.parseInt(s.substring(v+
1)),s=s.substring(0,v))}if(r&&(n>JS.SpaceGroup.getMax(t)||(f||b?1>n:0>n)))throw new ArrayIndexOutOfBoundsException(n);if(h){var w=this.getITSubJSONResource(t,n);if(null!=w)return w}else if(b||f||c.equalsIgnoreCase("ITA")){if(0==n)return JS.Symmetry.getAllITAData(a,t,!0);w=JS.Symmetry.getITJSONResource(a,t,n,e);if(null!=w){if(0==g&&null==q)return f?w.get("its"):w;var C=w.get("its");if(null!=C){if(f&&!d)return C;var u=C.size(),x=b?Math.max(g,1):r&&!d?g:u;if(x>u)return null;if(b)return C.get(x-1);for(var u=
null,B=x;0<=--B;){u=C.get(B);if(B==g-1||(null==q?s.equals(u.get("jmolId")):q.equals(u.get("trm")))){if(!u.containsKey("more"))return u;break}u=null}if(null!=u)return JS.SpaceGroup.fillMoreData(a,u,e,n,C.get(0))}}}else if(j&&null==q){null==JS.Symmetry.aflowStructures&&(JS.Symmetry.aflowStructures=JS.Symmetry.getResource(a,"sg/json/aflow_structures.json"));if(0==n)return JS.Symmetry.aflowStructures;if(-2147483648==n){a=null;s.endsWith("*")&&(a=new JU.Lst,s=s.substring(0,s.length-1));for(e=1;230>=e;e++)for(var D=
JS.Symmetry.aflowStructures.get(""+e),B=0,u=D.size();B<u;B++){var z=D.get(B);if(null!=a&&z.startsWith(s))a.addLast("=aflowlib/"+e+"."+(B+1)+"\t"+z);else if(z.equalsIgnoreCase(s))return e+"."+(B+1)}return null!=a&&0<a.size()?a:null}var O=JS.Symmetry.aflowStructures.get(""+s);if(g<=O.size())return 0==g?O:O.get(g-1)}if(d)return new java.util.Hashtable;throw new IllegalArgumentException(m);}catch(H){if(ba(H,Exception))return H.getMessage();throw H;}},"JV.Viewer,~S,~S,~N");d(b,"getITSubJSONResource",function(a,
c){if(0==a){null==JS.Symmetry.itaSubData&&(JS.Symmetry.itaSubData=Array(230));var e=JS.Symmetry.itaSubData[c-1];null==e&&(JS.Symmetry.itaSubData[c-1]=e=JS.Symmetry.getResource(this.vwr,"sg/json/sub_"+c+".json"));return e}var g=JS.SpaceGroup.getSpecialGroupName(a),e=JS.SpaceGroup.getMax(a),b=null;switch(a){case 300:null==JS.Symmetry.friezeSubData&&(JS.Symmetry.friezeSubData=Array(e));b=JS.Symmetry.friezeSubData;break;case 400:null==JS.Symmetry.layerSubData&&(JS.Symmetry.layerSubData=Array(e));b=JS.Symmetry.layerSubData;
break;case 500:null==JS.Symmetry.rodSubData&&(JS.Symmetry.rodSubData=Array(e));b=JS.Symmetry.rodSubData;break;case 600:null==JS.Symmetry.friezeSubData&&(JS.Symmetry.friezeSubData=Array(e)),b=JS.Symmetry.friezeSubData}e=b[c-1];null==e&&(b[c-1]=e=JS.Symmetry.getResource(this.vwr,"sg/json/sub_"+g+"_"+c+".json"));return e},"~N,~N");b.getITJSONResource=d(b,"getITJSONResource",function(a,c,e,g){if(0==c)return null==JS.Symmetry.itaData&&(JS.Symmetry.itaData=Array(230)),g=JS.Symmetry.itaData[e-1],null==g&&
(JS.Symmetry.itaData[e-1]=g=JS.Symmetry.getResource(a,"sg/json/ita_"+e+".json")),g;a=JS.Symmetry.getAllITAData(a,c,!1);return 0<e?a[e-1]:JS.Symmetry.getSpecialSettingJSON(a,g)},"JV.Viewer,~N,~N,~S");b.getSpecialSettingJSON=d(b,"getSpecialSettingJSON",function(a,c){var e=null;(e=Character.isDigit(c.charAt(2)))&&c.endsWith(";0,0,0")&&(c=c.substring(0,c.length-6));for(var g=e?"clegId":"hm",b=a.length;0<=--b;)for(var f=a[b].get("its"),j=f.size();0<=--j;)if(e=f.get(j),c.equals(e.get(g)))return e;return null},
"~A,~S");b.getAllITAData=d(b,"getAllITAData",function(a,c,e){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 g="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,g),JS.Symmetry.planeData=JS.Symmetry.createSpecialData(c,JS.Symmetry.allPlaneData)),
e?JS.Symmetry.allPlaneData:JS.Symmetry.planeData;case 400:return null==JS.Symmetry.allLayerData&&(JS.Symmetry.allLayerData=JS.Symmetry.getResource(a,g),JS.Symmetry.layerData=JS.Symmetry.createSpecialData(c,JS.Symmetry.allLayerData)),e?JS.Symmetry.allLayerData:JS.Symmetry.layerData;case 500:return null==JS.Symmetry.allRodData&&(JS.Symmetry.allRodData=JS.Symmetry.getResource(a,g),JS.Symmetry.rodData=JS.Symmetry.createSpecialData(c,JS.Symmetry.allRodData)),e?JS.Symmetry.allRodData:JS.Symmetry.rodData;
case 600:return null==JS.Symmetry.allFriezeData&&(JS.Symmetry.allFriezeData=JS.Symmetry.getResource(a,g),JS.Symmetry.friezeData=JS.Symmetry.createSpecialData(c,JS.Symmetry.allFriezeData)),e?JS.Symmetry.allFriezeData:JS.Symmetry.friezeData}}return null},"JV.Viewer,~N,~B");b.createSpecialData=d(b,"createSpecialData",function(a,c){for(var e=JS.SpaceGroup.getMax(a),g=Array(e),b=0;b<e;b++)g[b]=new java.util.Hashtable,g[b].put("sg",Integer.$valueOf(b+1)),g[b].put("its",new JU.Lst);for(var b=0,f=c.size();b<
f;b++){var j=c.get(b),d=j.get("sg").intValue();g[d-1].get("its").addLast(j)}for(b=0;b<e;b++)g[b].put("n",Integer.$valueOf(g[b].get("its").size()));return g},"~N,JU.Lst");b.getResource=d(b,"getResource",function(a,c){try{var e=JV.FileManager.getBufferedReaderForResource(a,JS.Symmetry,"JS/",c),g=Array(1);if(JU.Rdr.readAllAsString(e,2147483647,!1,g,0))return(new JU.JSJSONParser).parse(g[0],!0)}catch(b){System.err.println(b.getMessage())}return null},"JV.Viewer,~S");p(b,"getCellWeight",function(a){return this.unitCell.getCellWeight(a)},
"JU.P3");p(b,"getPrecision",function(){return null==this.unitCell?NaN:this.unitCell.getPrecision()});p(b,"fixUnitCell",function(a){return this.spaceGroup.createCompatibleUnitCell(a,null,!0)},"~A");p(b,"staticGetTransformABC",function(a,c){return JS.SymmetryOperation.getTransformABC(a,c)},"~O,~B");d(b,"setCartesianOffset",function(a){this.unitCell.setCartesianOffset(a)},"JU.T3");d(b,"setSymmetryInfoFromFile",function(a,c,e){var g=a.getModelAuxiliaryInfo(c);this.symmetryInfo=new JS.SymmetryInfo;e=this.symmetryInfo.setSymmetryInfoFromFile(g,
e);null!=e&&(this.setUnitCellFromParams(e,g.containsKey("jmolData"),NaN),this.unitCell.moreInfo=g.get("moreUnitCellInfo"),g.put("infoUnitCell",this.getUnitCellAsArray(!1)),this.setOffsetPt(g.get("unitCellOffset")),g=g.get("matUnitCellOrientation"),null!=g&&this.initializeOrientation(g),null!=this.symmetryInfo.strSUPERCELL&&(g=this.unitCell.getUnitCellVectors(),g[0]=new JU.P3,a.setModelCagePts(c,g,"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 e=this.getUnitCellVectors(),g=1;3>=g;g++)this.toFractional(e[g],!0),c.rotate(e[g]),this.toCartesian(e[g],!0);c=new JU.P3;a.getTranslation(c);this.toCartesian(c,!0);e[0].add(c);this.unitCell=JS.UnitCell.fromOABC(e,!1)},"JU.M4");p(b,"getITASettingValue",function(a,c,e){a=this.getSpaceGroupJSON(a,"ITA",c,0);return V(a,"java.util.Map")?
a.get(e):a},"JV.Viewer,~S,~S");p(b,"staticCleanTransform",function(a){return JS.SymmetryOperation.getTransformABC(JS.UnitCell.toTrm(a,null),!0)},"~S");p(b,"replaceTransformMatrix",function(a){var c=this.transformMatrix;this.transformMatrix=a;return c},"JU.M4");p(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});p(b,"staticToRationalXYZ",function(a,c){var e=
JS.SymmetryOperation.fcoord(a,c);return",".equals(c)?e:"("+e+")"},"JU.P3,~S");p(b,"getFinalOperationCount",function(){this.setFinalOperations(3,null,null,-1,-1,!1,null);return this.spaceGroup.getOperationCount()});p(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(null,a,c);return c},"~S,JU.M4");p(b,"staticGetMatrixTransform",
function(a){return this.getCLEGInstance().getMatrixTransform(this.vwr,a)},"~S");p(b,"staticTransformSpaceGroup",function(a,c,e,g){return this.getCLEGInstance().transformSpaceGroup(this.vwr,a,c,e,g)},"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});p(b,"setViewer",function(a){this.vwr=a;return this},"JV.Viewer");p(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.nullDesc=null;b.aflowStructures=null;b.itaData=null;b.itaSubData=null;b.planeData=null;b.layerData=null;b.rodData=null;b.friezeData=null;b.planeSubData=null;b.layerSubData=null;b.rodSubData=null;b.friezeSubData=null;b.allDataITA=null;b.allPlaneData=null;b.allLayerData=null;b.allRodData=null;
b.allFriezeData=null;b.wyckoffFinder=null;b.clegInstance=null;b.groupFactory=null});U("JS");da(["JU.M3","$.V3"],"JS.PointGroup","java.util.Hashtable JU.Lst $.P3 $.PT $.Quat $.SB J.bspt.Bspt JU.BSUtil $.Escape $.Logger $.Point3fi".split(" "),function(){var b=L(function(){this.isAtoms=!1;this.iter=this.textInfo=this.info=this.drawInfo=null;this.drawType="";this.drawIndex=0;this.scale=NaN;this.axes=this.nAxes=null;this.radius=this.nAtoms=0;this.distanceTolerance=0.25;this.distanceTolerance2=0;this.linearTolerance=
8;this.cosTolerance=0.99;this.name="C_1?";this.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.maxAtoms=250;this.maxElement=0;this.eCounts=null;this.nOps=0;Fa("JS.PointGroup.Operation")||JS.PointGroup.$PointGroup$Operation$();E(this,arguments)},JS,"PointGroup",null);ia(b,function(){this.nAxes=
W(JS.PointGroup.maxAxis,0);this.axes=Array(JS.PointGroup.maxAxis);this.vTemp=new JU.V3});Q(b,function(a){this.convention=a?1:0},"~B");d(b,"getName",function(){return this.getConventionalName(this.name)});d(b,"getHermannMauguinName",function(){return JS.PointGroup.getHMfromSFName(this.name)});d(b,"getConventionalName",function(a){return 1==this.convention?JS.PointGroup.getHMfromSFName(a):a},"~S");b.getPointGroup=d(b,"getPointGroup",function(a,c,e,g,b,f,j,d,k,m,n){m=new JS.PointGroup(m);0>=f&&(f=0.01);
0>=j&&(j=0.5);0>=d&&(d=250);m.distanceTolerance=f;m.distanceTolerance2=f*f;m.linearTolerance=j;m.maxAtoms=d;m.isAtoms=null!=g;m.bsAtoms=m.isAtoms?g:JU.BSUtil.newBitSet2(0,e.length);m.haveVibration=b;m.center=c;m.localEnvOnly=k;m.sppa=n;JU.Logger.debugging&&(a=null);return m.set(a,e)?m:a},"JS.PointGroup,JU.T3,~A,JU.BS,~B,~N,~N,~N,~B,~B,~N");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,"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();if(this.haveVibration){for(var e=Array(this.points.length),g=this.points.length;0<=--g;){e[g]=JU.P3.newP(this.points[g]);var b=this.points[g].getVibrationVector();null!=b&&e[g].add(b)}this.points=e}if(this.isEqual(a))return!1;try{this.findInversionCenter();if(this.$isLinear=this.isLinear(this.points))return this.name=this.haveInversionCenter?"D(infinity)h":"C(infinity)v",this.vTemp.sub2(this.points[1],
this.points[0]),this.addAxis(16,this.vTemp),this.principalAxis=this.axes[16][0],this.haveInversionCenter&&(this.axes[0]=Array(1),this.principalPlane=this.axes[0][this.nAxes[0]++]=pa(JS.PointGroup.Operation,this,null,this.vTemp)),!0;this.axes[0]=Array(15);e=0;this.findCAxes();e=this.findPlanes();this.findAdditionalAxes(e);var f=this.getHighestOrder();if(1<this.nAxes[17])this.name=1<this.nAxes[19]?this.haveInversionCenter?"Ih":"I":1<this.nAxes[18]?this.haveInversionCenter?"Oh":"O":0<e?this.haveInversionCenter?
"Th":"Td":"T";else if(2>f){if(1==e)return this.name="Cs",!0;if(this.haveInversionCenter)return this.name="Ci",!0;this.name="C1"}else 1==f%2&&0<this.nAxes[16]||0==f%2&&1<this.nAxes[16]?(this.principalAxis=this.setPrincipalAxis(f,e),0==e?this.name=14>f?"S"+f:"D"+(f-14):(f=14>f?z(f/2):f-14,this.name=e==f?"D"+f+"d":"D"+f+"h")):0==e?(this.principalAxis=this.axes[f][0],this.name=14>f?"S"+f:"C"+(f-14)):e==f-14?(this.principalAxis=this.axes[f][0],this.name="C"+e+"v"):(this.principalAxis=this.axes[14>f?f+
14:f][0],this.principalPlane=this.axes[0][0],this.name="C"+(14>f?f/2:f-14)+"h")}catch(j){if(ba(j,Exception))this.name="??";else throw j;}finally{JU.Logger.info("Point group found: "+this.name)}return!0},"JS.PointGroup,~A");d(b,"setPrincipalAxis",function(a,c){var e=this.setPrincipalPlane(a,c);if(0==c&&14>a||1==this.nAxes[a])return this.axes[a][0];if(null==e)return null;for(var g=0;g<this.nAxes[16];g++)if(this.isParallel(e.normalOrAxis,this.axes[16][g].normalOrAxis))return 0!=g&&(e=this.axes[16][0],
this.axes[16][0]=this.axes[16][g],this.axes[16][g]=e),this.axes[16][0];return null},"~N,~N");d(b,"setPrincipalPlane",function(a,c){if(1==c)return this.principalPlane=this.axes[0][0];if(0==c||c==a-14)return null;for(var e=0;e<c;e++)for(var g=0,b=0;g<c;g++)if(this.isPerpendicular(this.axes[0][e].normalOrAxis,this.axes[0][g].normalOrAxis)&&2<++b)return 0!=e&&(g=this.axes[0][0],this.axes[0][0]=this.axes[0][e],this.axes[0][e]=g),this.principalPlane=this.axes[0][0];return null},"~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=W(c,0);if(0==c)return!0;for(var e=0,c=this.bsAtoms.nextSetBit(0);0<=c;c=this.bsAtoms.nextSetBit(c+1)){var g=a[c];V(g,"JU.Node")&&(e=Math.max(e,g.i))}this.atomMap=W(e+1,0);this.nAtoms=0;if(e=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++){g=a[c];if(V(g,"JU.Node")){var f=this.localEnvOnly?
1:1+Math.max(3,g.getCovalentBondCount());this.elements[this.nAtoms]=g.getElementNumber()*f;this.atomMap[g.i]=this.nAtoms+1}else f=new JU.Point3fi,f.setT(g),f.i=-1-this.nAtoms,V(g,"JU.Point3fi")&&(this.elements[this.nAtoms]=Math.max(0,g.sD)),g=f;b.addTuple(g);e&&this.center.add(g);this.points[this.nAtoms]=g}this.iter=b.allocateCubeIterator();e&&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);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,"findInversionCenter",function(){if(this.haveInversionCenter=this.checkOperation(null,this.center,-1))this.axes[1]=Array(1),this.axes[1][0]=pa(JS.PointGroup.Operation,
this,null)});d(b,"checkOperation",function(a,c,e){var g=new JU.P3,b=0;e=14>e;var f=this.points.length,j=f;a:for(;0<=--j&&b<f;)if(j!=this.centerAtomIndex){var d=this.points[j],k=this.elements[j];null!=a?(g.sub2(d,c),a.transform2(g,g).add(c)):g.setT(d);e&&(this.vTemp.sub2(c,g),g.scaleAdd2(2,this.vTemp,g));if((null!=a||e)&&g.distanceSquared(d)<this.distanceTolerance2)b++;else{for(this.iter.initialize(g,this.distanceTolerance,!1);this.iter.hasMoreElements();){var m=this.iter.nextElement();if(m!==d){var n=
this.getPointIndex(m.i);if(!(0<=this.centerAtomIndex&&n==this.centerAtomIndex||n>=this.elements.length||this.elements[n]!=k)&&g.distanceSquared(m)<this.distanceTolerance2){b++;continue a}}}return!1}}return!0},"JU.Quat,JU.T3,~N");d(b,"getPointIndex",function(a){return(0>a?-a:this.atomMap[a])-1},"~N");d(b,"isLinear",function(a){var c=null;if(2>a.length)return!1;for(var e=a.length;0<=--e;)if(e!=this.centerAtomIndex)if(null==c)c=new JU.V3,c.sub2(a[e],this.center),c.normalize(),this.vTemp.setT(c);else if(this.vTemp.sub2(a[e],
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,"getElementCounts",function(){for(var a=this.points.length;0<=--a;){var c=this.elements[a];c>this.maxElement&&(this.maxElement=c)}this.eCounts=W(++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,e=new JU.V3,g=this.points.length;0<=--g;)if(g!=this.centerAtomIndex)for(var b=this.points[g],f=this.elements[g],j=this.points.length;--j>g;){var d=this.points[j];if(this.elements[j]==f)if(a.sub2(b,this.center),c.sub2(d,this.center),a.normalize(),c.normalize(),this.isParallel(a,c))this.getAllAxes(a);else{this.nAxes[16]<JS.PointGroup.axesMaxN[16]&&(e.ave(b,d),e.sub(this.center),this.getAllAxes(e));var d=6.283185307179586/a.angle(c),k=z(Math.floor(d+
0.01));if(0.02>=d-k&&!((k+=14)>=JS.PointGroup.maxAxis)&&this.nAxes[k]<JS.PointGroup.axesMaxN[k])e.cross(a,c),this.checkAxisOrder(k,e,this.center)}}b=Array(2*this.nAxes[16]);for(g=0;g<b.length;g++)b[g]=new JU.V3;for(g=j=0;g<this.nAxes[16];g++)b[j++].setT(this.axes[16][g].normalOrAxis),b[j].setT(this.axes[16][g].normalOrAxis),b[j++].scale(-1);for(g=b.length;2<=--g;)for(j=g;1<=--j;)for(f=j;0<=--f;)e.add2(b[g],b[j]),e.add(b[f]),1>e.length()||this.checkAxisOrder(17,e,this.center);j=2147483647;b=-1;for(g=
0;g<this.maxElement;g++)this.eCounts[g]<j&&2<this.eCounts[g]&&(j=this.eCounts[g],b=g);g=0;a:for(;g<this.points.length-2;g++)if(this.elements[g]==b)for(j=g+1;j<this.points.length-1;j++)if(this.elements[j]==b)for(f=j+1;f<this.points.length;f++)if(this.elements[f]==b&&(a.sub2(this.points[g],this.points[j]),c.sub2(this.points[g],this.points[f]),a.normalize(),c.normalize(),e.cross(a,c),this.getAllAxes(e),a.add2(this.points[g],this.points[j]),a.add(this.points[f]),a.normalize(),this.isParallel(a,e)||this.getAllAxes(a),
this.nAxes[19]==JS.PointGroup.axesMaxN[19]))break a;b=Array(this.maxElement);for(g=this.points.length;0<=--g;){f=this.elements[g];if(null==b[f])b[f]=new JU.V3;else if(this.haveInversionCenter)continue;b[f].add(this.points[g])}if(!this.haveInversionCenter)for(g=0;g<this.maxElement;g++)null!=b[g]&&b[g].scale(1/this.eCounts[g]);for(g=0;g<this.maxElement;g++)if(null!=b[g])for(j=0;j<this.maxElement;j++)g==j||null==b[j]||(this.haveInversionCenter?a.cross(b[g],b[j]):a.sub2(b[g],b[j]),this.checkAxisOrder(16,
a,this.center));return this.getHighestOrder()});d(b,"getAllAxes",function(a){for(var c=16;c<JS.PointGroup.maxAxis;c++)this.nAxes[c]<JS.PointGroup.axesMaxN[c]&&this.checkAxisOrder(c,a,this.center)},"JU.V3");d(b,"getHighestOrder",function(){for(var a=0,a=14;1<--a&&0==this.nAxes[a];);if(1<a)return a+14<JS.PointGroup.maxAxis&&0<this.nAxes[a+14]?a+14:a;for(a=JS.PointGroup.maxAxis;1<--a&&0==this.nAxes[a];);return a});d(b,"checkAxisOrder",function(a,c,e){switch(a){case 22:if(0<this.nAxes[17])return!1;case 20:case 18:if(0<
this.nAxes[19])return!1;break;case 17:if(0<this.nAxes[22])return!1;break;case 19:if(0<this.nAxes[18]||0<this.nAxes[20]||0<this.nAxes[22])return!1}c.normalize();if(this.haveAxis(a,c))return!1;var g=JS.PointGroup.getQuaternion(c,a);if(!this.checkOperation(g,e,a))return!1;this.addAxis(a,c);switch(a){case 16:this.checkAxisOrder(4,c,e);break;case 17:this.checkAxisOrder(3,c,e);this.haveInversionCenter&&this.addAxis(6,c);break;case 18:this.addAxis(16,c);this.checkAxisOrder(4,c,e);this.checkAxisOrder(8,c,
e);break;case 19:this.checkAxisOrder(5,c,e);this.haveInversionCenter&&this.addAxis(10,c);break;case 20:this.addAxis(16,c);this.addAxis(17,c);this.checkAxisOrder(3,c,e);this.checkAxisOrder(6,c,e);this.checkAxisOrder(12,c,e);break;case 22:this.addAxis(16,c),this.addAxis(18,c)}return!0},"~N,JU.V3,JU.T3");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]++]=pa(JS.PointGroup.Operation,this,null,c,a))},"~N,JU.V3");
d(b,"haveAxis",function(a,c){if(this.nAxes[a]==JS.PointGroup.axesMaxN[a])return!0;if(0<this.nAxes[a])for(var e=this.nAxes[a];0<=--e;)if(this.isParallel(c,this.axes[a][e].normalOrAxis))return!0;return!1},"~N,JU.V3");d(b,"findPlanes",function(){for(var a=new JU.P3,c=new JU.V3,e=new JU.V3,g=new JU.V3,b=0,f=1<this.getHighestOrder(),j=this.points.length;0<=--j;)if(j!=this.centerAtomIndex)for(var d=this.points[j],k=this.elements[j],m=this.points.length;--m>j;)if(!(f&&this.elements[m]!=k)&&(b=this.points[m],
a.add2(d,b),a.scale(0.5),c.sub2(d,this.center),e.sub2(b,this.center),c.normalize(),e.normalize(),this.isParallel(c,e)||(g.cross(c,e),g.normalize(),this.getPlane(g)),g.sub2(b,d),g.normalize(),b=this.getPlane(g),b==JS.PointGroup.axesMaxN[0]))return b;if(f)for(j=16;j<JS.PointGroup.maxAxis;j++)for(m=0;m<this.nAxes[j];m++)b=this.getPlane(this.axes[j][m].normalOrAxis);return b});d(b,"getPlane",function(a){!this.haveAxis(0,a)&&this.checkOperation(JU.Quat.newVA(a,180),this.center,-1)&&(this.axes[0][this.nAxes[0]++]=
pa(JS.PointGroup.Operation,this,null,a));return this.nAxes[0]},"JU.V3");d(b,"findAdditionalAxes",function(a){var c=this.axes[0],e=0;if(1<a&&(e=a+14)<JS.PointGroup.maxAxis&&0==this.nAxes[e])this.vTemp.cross(c[0].normalOrAxis,c[1].normalOrAxis),!this.checkAxisOrder(e,this.vTemp,this.center)&&2<a&&(this.vTemp.cross(c[1].normalOrAxis,c[2].normalOrAxis),this.checkAxisOrder(e-1,this.vTemp,this.center));if(0==this.nAxes[16]&&2<a)for(e=0;e<a-1;e++)for(var g=e+1;g<a;g++)this.vTemp.add2(c[1].normalOrAxis,c[2].normalOrAxis),
this.checkAxisOrder(16,this.vTemp,this.center)},"~N");b.getQuaternion=d(b,"getQuaternion",function(a,c){return JU.Quat.newVA(a,(14>c?180:0)+(0==c?0:z(360/(c%14))))},"JU.V3,~N");d(b,"getInfo",function(a,c,e,g,b,f){var j=null!=c;this.info=e?new java.util.Hashtable:null;var d=new JU.V3,k;0==f&&(f=1);this.scale=f;for(var m=W(4,2,0),n=1;n<JS.PointGroup.maxAxis;n++)for(var t=this.nAxes[n];0<=--t;)m[this.axes[n][t].type][0]++;var q=(new JU.SB).append("# ").appendI(this.nAtoms).append(" atoms\n"),A=this.getConventionalName(this.name);
if(j){c="draw "+c;this.drawType=g=(e=null!=g&&0<g.length)?g:"";this.drawIndex=b;var r=g.equalsIgnoreCase(this.getConventionalName("Cn")),s=g.equalsIgnoreCase(this.getConventionalName("Sn"));q.append("set perspectivedepth off;\n");var p="_"+a+"_";e||q.append(c+"pg0").append(p).append("* delete;draw pgva").append(p).append("* delete;draw pgvp").append(p).append("* delete;");if(!e||g.equalsIgnoreCase("Ci"))q.append(c+"pg0").append(p).append(this.haveInversionCenter?"inv ":" ").append(JU.Escape.eP(this.center)).append(this.haveInversionCenter?
'"i";\n':";\n");for(var v=0.1,n=2;n<JS.PointGroup.maxAxis;n++)if(14==n&&(v=0.1),0!=this.nAxes[n]){a=!this.$isLinear?this.axes[n][0].getLabel(!1):"C_infinity";var j=!this.$isLinear?this.axes[n][0].getLabel(!0):"C_infinity",v=v+0.25,w=1.05*f*this.radius+80*v/this.sppa,t=14<=n;if(!e||g.equalsIgnoreCase(j)||r&&t||s&&!t)for(t=0;t<this.nAxes[n];t++)if(!(0<b&&t+1!=b)){k=this.axes[n][t];d.add2(k.normalOrAxis,this.center);q.append(c+"pgva").append(p).append(a).append("_").appendI(t+1).append(" width 0.05 scale ").appendF(2==
k.type?-w:w).append(" ").append(JU.Escape.eP(d));d.scaleAdd2(-2,k.normalOrAxis,d);var u=!this.$isLinear&&null!=this.principalAxis&&k.index==this.principalAxis.index;q.append(JU.Escape.eP(d)).append('"').append(j).append("").append('" color ').append(u?"red":2==k.type?"blue":"orange").append(";\n")}}if(!e||g.equalsIgnoreCase(this.getConventionalName("Cs")))for(t=0;t<this.nAxes[0];t++)0<b&&t+1!=b||(k=this.axes[0][t],q.append(c+"pgvp").append(p).appendI(t+1).append("disk scale ").appendF(2*f*this.radius).append(" CIRCLE PLANE ").append(JU.Escape.eP(this.center)),
d.add2(k.normalOrAxis,this.center),q.append(JU.Escape.eP(d)).append(" color translucent yellow;\n"),d.add2(k.normalOrAxis,this.center),q.append(c+"pgvp").append(p).appendI(t+1).append("ring width 0.05 scale ").appendF(2*f*this.radius).append(" arc ").append(JU.Escape.eP(d)),d.scaleAdd2(-2,k.normalOrAxis,d),q.append(JU.Escape.eP(d)),d.add3(0.011,0.012,0.013),q.append(JU.Escape.eP(d)).append("{0 360 0.5} color ").append(null!=this.principalPlane&&k.index==this.principalPlane.index?"red":"blue").append(";\n"));
q.append("# name=").append(A);q.append(", n"+this.getConventionalName("Ci")+"=").appendI(this.haveInversionCenter?1:0);q.append(", n"+this.getConventionalName("Cs")+"=").appendI(this.nAxes[0]);q.append(", n"+this.getConventionalName("Cn")+"=").appendI(m[1][0]);q.append(", n"+this.getConventionalName("Sn")+"=").appendI(m[2][0]);q.append(": ");for(n=JS.PointGroup.maxAxis;2<=--n;)0<this.nAxes[n]&&(m=this.getConventionalName((14>n?"S":"C")+n%14),q.append(" n").append(m),q.append("=").appendI(this.nAxes[n]));
q.append(";\n");q.append("print '"+A+"';\n");this.drawInfo=q.toString();JU.Logger.debugging&&JU.Logger.info(this.drawInfo);return this.drawInfo}t=0;c=1;g=0;n=this.haveInversionCenter?this.getConventionalName("Ci"):"center";this.haveInversionCenter&&(c++,g++);e?null!=this.center&&(this.info.put(n,this.center),this.haveInversionCenter&&this.info.put("center",this.center),this.info.put(n,this.center)):q.append("\n\n").append(A).append("\t").append(n).append("\t").append(JU.Escape.eP(this.center));for(n=
JS.PointGroup.maxAxis;0<=--n;)if(0<this.nAxes[n]){t=JS.PointGroup.nUnique[n];j=this.axes[n][0].getLabel(!0);a=this.axes[n][0].getLabel(!1);e?this.info.put("n"+a,Integer.$valueOf(this.nAxes[n])):q.append("\n\n").append(A).append("\tn").append(j).append("\t").appendI(this.nAxes[n]).append("\t").appendI(t);t*=this.nAxes[n];c+=t;g+=this.nAxes[n];m[this.axes[n][0].type][1]+=t;j=e?new JU.Lst:null;b=e?new JU.Lst:null;for(t=0;t<this.nAxes[n];t++)f=this.axes[n][t],e?(j.addLast(f.normalOrAxis),b.addLast(f.getM3())):
q.append("\n").append(A).append("\t").append(a).append("_").appendI(t+1).append("\t").appendO(f.normalOrAxis);e&&(this.info.put(a,j),this.info.put(a+"_m",b))}if(!e)return q.append("\n"),q.append("\n").append(A).append("\ttype\tnElements\tnUnique"),q.append("\n").append(A).append("\t"+this.getConventionalName("E")+"\t  1\t  1"),t=this.haveInversionCenter?1:0,q.append("\n").append(A).append("\t"+this.getConventionalName("Ci")+"\t  ").appendI(t).append("\t  ").appendI(t),q.append("\n").append(A).append("\t"+
this.getConventionalName("Cs")+"\t"),JU.PT.rightJustify(q,"    ",this.nAxes[0]+"\t"),JU.PT.rightJustify(q,"    ",this.nAxes[0]+"\n"),q.append(A).append("\t"+this.getConventionalName("Cn")+"\t"),JU.PT.rightJustify(q,"    ",m[1][0]+"\t"),JU.PT.rightJustify(q,"    ",m[1][1]+"\n"),q.append(A).append("\t"+this.getConventionalName("Sn")+"\t"),JU.PT.rightJustify(q,"    ",m[2][0]+"\t"),JU.PT.rightJustify(q,"    ",m[2][1]+"\n"),q.append(A).append("\t\tTOTAL\t"),JU.PT.rightJustify(q,"    ",c+"\n"),this.textInfo=
q.toString();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(g));this.info.put("nCi",Integer.$valueOf(this.haveInversionCenter?1:0));this.haveInversionCenter&&this.info.put("Ci_m",JU.M3.newM3(JS.PointGroup.mInv));this.info.put("nCs",Integer.$valueOf(this.nAxes[0]));this.info.put("nCn",Integer.$valueOf(m[1][0]));this.info.put("nSn",
Integer.$valueOf(m[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",q.toString().$replace("\n",";"));null!=this.principalAxis&&0<this.principalAxis.index&&this.info.put("principalAxis",this.principalAxis.normalOrAxis);null!=this.principalPlane&&0<this.principalPlane.index&&this.info.put("principalPlane",this.principalPlane.normalOrAxis);
return this.info},"~N,~S,~B,~S,~N,~N");d(b,"isDrawType",function(a,c,e){return null!=this.drawInfo&&this.drawType.equals(null==a?"":a)&&this.drawIndex==c&&this.scale==e},"~S,~N,~N");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 e=0;e<c.length;e++){var g=
c[e].$plit(","),b=g[0];if(2==g.length)JS.PointGroup.addNames(b,g[1]);else{for(var f=b.substring(0,1),b=b.substring(2,b.length),d=1;13>d;d++){var h=g[d];0<h.length&&(JS.PointGroup.addNames(f+d+b,h),System.out.println(f+d+b+"\t"+h))}14==g.length&&JS.PointGroup.addNames(f+"\u221e"+b,g[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=
L(function(){Ga(this,arguments);this.index=this.order=this.type=0;this.normalOrAxis=null;this.typeOrder=0;this.mat=null;E(this,arguments)},JS.PointGroup,"Operation",null);Q(a,function(){this.index=++this.b$["JS.PointGroup"].nOps;this.type=3;this.typeOrder=this.order=1;JU.Logger.debugging&&JU.Logger.debug("new operation -- "+JS.PointGroup.typeNames[this.type])});Q(a,function(a,e){this.index=++this.b$["JS.PointGroup"].nOps;this.type=14>e?2:1;this.typeOrder=e;this.order=e%14;this.normalOrAxis=JU.Quat.newVA(a,
180).getNormal();JU.Logger.debugging&&JU.Logger.debug("new operation -- "+(this.order==e?"S":"C")+this.order+" "+this.normalOrAxis)},"JU.V3,~N");Q(a,function(a){null!=a&&(this.index=++this.b$["JS.PointGroup"].nOps,this.type=0,this.normalOrAxis=JU.Quat.newVA(a,180).getNormal(),JU.Logger.debugging&&JU.Logger.debug("new operation -- plane "+this.normalOrAxis))},"JU.V3");d(a,"getLabel",function(a){var e;switch(this.type){case 0:e="Cs";break;case 2:e="S"+this.order;break;default:e="C"+this.order}return a?
this.b$["JS.PointGroup"].getConventionalName(e):e},"~B");d(a,"getM3",function(){if(null!=this.mat)return this.mat;var a=JU.M3.newM3(JS.PointGroup.getQuaternion(this.normalOrAxis,this.typeOrder).getMatrix());(0==this.type||2==this.type)&&a.mul(JS.PointGroup.mInv);this.cleanMatrix(a);return this.mat=a});d(a,"cleanMatrix",function(a){for(var e=0;3>e;e++)for(var g=0;3>g;g++)a.setElement(e,g,this.approx0(a.getElement(e,g)))},"JU.M3");d(a,"approx0",function(a){return 1E-15<a||-1E-15>a?a:0},"~N");p(a,"toString",
function(){return this.getLabel(!1)+" "+this.normalOrAxis})};b.axesMaxN=W(-1,[15,0,0,1,3,1,10,0,1,0,6,0,1,0,0,0,15,10,6,6,10,0,1]);b.nUnique=W(-1,[1,0,0,2,2,4,2,0,4,0,4,0,4,0,0,0,1,2,2,4,2,0,4]);b.maxAxis=JS.PointGroup.axesMaxN.length;b.typeNames=N(-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.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});U("JS");da(["JS.HallInfo","java.util.Hashtable"],"JS.SpaceGroup","java.util.Arrays JU.AU $.Lst $.M4 $.P3 $.PT $.SB JS.Symmetry $.SymmetryOperation $.UnitCell JU.Logger $.SimpleUnitCell".split(" "),function(){var b=L(function(){this.specialPrefix="";this.groupType=0;this.xyzList=this.allOperations=this.finalOperations=this.matrixOperations=null;this.axisChoice=this.uniqueAxis="\x00";this.jmolId=this.itaNumber=null;this.operationCount=0;this.latticeOp=-1;this.isBio=!1;this.latticeType=
"P";this.itaIndex=this.itaTransform=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.displayName=
this.strName=null;E(this,arguments)},JS,"SpaceGroup",null,[Cloneable,JS.HallInfo.HallReceiver]);Q(b,function(a,c,e){++JS.SpaceGroup.sgIndex;0>a&&(a=JS.SpaceGroup.sgIndex);this.index=a;this.init(e&&null==c);e&&null!=c&&this.buildSelf(c)},"~N,~S,~B");d(b,"setFrom",function(a,c){c?(this.setName(a.itaNumber.equals("0")?this.clegId:"HM:"+a.hmSymbolFull+" #"+a.clegId),this.referenceIndex=-2):(this.setName(a.getName()),this.referenceIndex=a.index);this.setClegId(a.getClegId());this.itaIndex=a.itaIndex;this.crystalClass=
a.crystalClass;this.hallSymbol=a.hallSymbol;this.hmSymbol=a.hmSymbol;this.hmSymbolAbbr=a.hmSymbolAbbr;this.hmSymbolAbbrShort=a.hmSymbolAbbrShort;this.hmSymbolAlternative=a.hmSymbolAlternative;this.hmSymbolExt=a.hmSymbolExt;this.hmSymbolFull=a.hmSymbolFull;this.itaNumber=a.itaNumber;this.itaTransform=a.itaTransform;this.jmolIdExt=this.jmolId=null;this.latticeType=a.latticeType;this.specialPrefix=a.specialPrefix;this.periodicity=a.periodicity;this.groupType=a.groupType;this.strName=this.displayName=
null;return this},"JS.SpaceGroup,~B");b.getNull=d(b,"getNull",function(a,c,e){a=new JS.SpaceGroup(-1,null,a);a.doNormalize=c;e&&a.setFinalOperations();return a},"~B,~B,~B");d(b,"init",function(a){this.xyzList=new java.util.Hashtable;this.operationCount=0;a&&this.addSymmetry("x,y,z",0,!1)},"~B");b.createSpaceGroup=d(b,"createSpaceGroup",function(a,c,e,g){var b=null;0<=a?b=JS.SpaceGroup.SG[a]:(b=V(e,"JU.Lst")?JS.SpaceGroup.createSGFromList(c,e):JS.SpaceGroup.determineSpaceGroupNA(c,e),null==b&&(b=JS.SpaceGroup.createSpaceGroupN(0>=
g?c:"x1,x2,x3,x4,x5,x6,x7,x8,x9".substring(0,3*g+8),!0)));null!=b&&b.generateAllOperators(null);return b},"~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(a){this.clegId=a;this.canonicalCLEG=JS.SpaceGroup.canonicalizeCleg(a)},
"~S");d(b,"getClegId",function(){return this.clegId});b.createSGFromList=d(b,"createSGFromList",function(a,c){var e=new JS.SpaceGroup(-1,"0;--;--;0;--;--;--",!0);e.doNormalize=!1;e.setName(a);for(var g=c.size(),b=0;b<g;b++){var f=c.get(b);if(V(f,"JS.SymmetryOperation")){var d=e.addOp(f,f.xyz,!1);e.matrixOperations[d].setTimeReversal(f.timeReversal)}else e.addSymmetrySM("xyz matrix:"+f,f)}g=e.getReferenceSpaceGroup();null!=g&&(e=g);return e},"~S,JU.Lst");d(b,"addSymmetry",function(a,c,e){a=a.toLowerCase();
return 0>a.indexOf("[[")&&0>a.indexOf("x4")&&0>a.indexOf(";")&&(0>a.indexOf("x")||0>a.indexOf("y")||0>a.indexOf("z"))?-1:this.addOperation(a,c,e)},"~S,~N,~B");d(b,"setFinalOperations",function(){this.setFinalOperationsForAtoms(3,null,0,0,!1)});d(b,"setFinalOperationsForAtoms",function(a,c,e,g,b){if(null==this.hallInfo&&0!=this.latticeParameter){var f=new JS.HallInfo(JS.HallInfo.getHallLatticeEquivalent(this.latticeParameter));this.generateAllOperators(f)}this.finalOperations=null;this.isBio=0<=this.name.indexOf("bio");
!this.isBio&&(this.index>=JS.SpaceGroup.SG.length&&0>this.name.indexOf("SSG:")&&0>this.name.indexOf("[subsystem"))&&(f=this.getReferenceSpaceGroup(),null!=f&&f!==this&&this.setFrom(f,!1));0==this.operationCount&&this.addOperation("x,y,z",1,!1);this.finalOperations=Array(this.operationCount);var f=null,d=b&&0<g&&null!=c;if(d){f=this.finalOperations[0]=new JS.SymmetryOperation(this.matrixOperations[0],0,!0);null==f.sigma&&JS.SymmetryOperation.normalizeOperationToCentroid(a,f,c,e,g);var h=c[e],k=JU.P3.newP(h);
f.rotTrans(k);if(1E-4<k.distance(h))for(var m=0;m<g;m++)h=c[e+m],k.setT(h),f.rotTrans(k),h.setT(k);b||(f=null)}for(m=0;m<this.operationCount;m++){if(0<m||null==f)f=this.finalOperations[m]=new JS.SymmetryOperation(this.matrixOperations[m],0,b);d&&null==f.sigma&&JS.SymmetryOperation.normalizeOperationToCentroid(a,f,c,e,g);f.getCentering()}},"~N,~A,~N,~N,~B");b.newHallInfo=d(b,"newHallInfo",function(a){a.startsWith("Hall:")&&(a=a.substring(5).trim());return new JS.HallInfo(a)},"~S");d(b,"getOperationCount",
function(){null==this.finalOperations&&this.setFinalOperations();return this.finalOperations.length});d(b,"getOperation",function(a){return this.finalOperations[a]},"~N");d(b,"getAdditionalOperationsCount",function(){null==this.finalOperations&&this.setFinalOperations();null==this.allOperations&&(this.allOperations=JS.SymmetryOperation.getAdditionalOperations(this.finalOperations,this.periodicity));return this.allOperations.length-this.getOperationCount()});d(b,"getAdditionalOperations",function(){this.getAdditionalOperationsCount();
return this.allOperations});d(b,"getAllOperation",function(a){return this.allOperations[a]},"~N");d(b,"getXyz",function(a,c){return null==this.finalOperations?this.matrixOperations[a].getXyz(c):this.finalOperations[a].getXyz(c)},"~N,~B");b.findSpaceGroupFromXYZ=d(b,"findSpaceGroupFromXYZ",function(a){var c=new JS.SpaceGroup(-1,"0;--;--;0;--;--;--",!0);c.doNormalize=!1;a=a.$plit(";");for(var e=0,g=a.length;e<g;e++){var b=new JS.SymmetryOperation(null,e,!1);b.setMatrixFromXYZ(a[e],0,!1);c.addOp(b,a[e],
!1)}return JS.SpaceGroup.findReferenceSpaceGroup(c.operationCount,c.getCanonicalSeitzList(),null)},"~S");b.getInfo=d(b,"getInfo",function(a,c,e,g,b){try{if(null!=a&&a.index>=JS.SpaceGroup.SG.length){var f=JS.SpaceGroup.findReferenceSpaceGroup(a.operationCount,a.getCanonicalSeitzList(),a.clegId);null!=f&&(a=f)}if(null!=e){if(null==a){0<=c.indexOf("[")&&(c=c.substring(0,c.indexOf("[")).trim());if(c.equals("unspecified!"))return"no space group identified in file";a=JS.SpaceGroup.determineSpaceGroupNA(c,
e)}}else{if(c.equalsIgnoreCase("ALL"))return JS.SpaceGroup.dumpAll(g);if(c.equalsIgnoreCase("MAP"))return JS.SpaceGroup.dumpAll(!0);if(c.equalsIgnoreCase("ALLSEITZ"))return JS.SpaceGroup.dumpAllSeitz();a=JS.SpaceGroup.determineSpaceGroupN(c)}if(null==a){var d=JS.SpaceGroup.createSpaceGroupN(c,!0);null!=d&&(d=JS.SpaceGroup.findReferenceSpaceGroup(d.operationCount,d.getCanonicalSeitzList(),d.clegId));null!=d&&(a=d)}if(null!=a){if(g)return a.dumpInfoObj();for(var h=new JU.SB;null!=a;){h.append(a.dumpInfo());
if(a.index>=JS.SpaceGroup.SG.length||!b)break;a=JS.SpaceGroup.determineSpaceGroupNS(c,a)}return h.toString()}return g?null:"?"}catch(k){if(ba(k,Exception))return"?";throw k;}},"JS.SpaceGroup,~S,~A,~B,~B");d(b,"dumpInfo",function(){var a=new JU.SB;0!=this.groupType&&a.append("\ngroupType: ").append(JS.SpaceGroup.getSpecialGroupName(this.groupType));a.append("\nHermann-Mauguin symbol: ");null==this.hmSymbol||null==this.hmSymbolExt?a.append("?"):a.append(this.hmSymbol).append(0<this.hmSymbolExt.length?
":"+this.hmSymbolExt:"");null!=this.itaNumber&&a.append("\ninternational table number: ").append(this.itaNumber).append(null!=this.itaTransform?":"+this.itaTransform:"").append("\ncrystal class: "+this.crystalClass);null!=this.jmolId&&a.append("\nJmol_ID: ").append(this.jmolId).append(" ("+this.itaIndex+")");null!=this.clegId&&a.append("\nCLEG: "+this.clegId);a.append("\n\n").append(null==this.hallInfo?"Hall symbol unknown":JU.Logger.debugging?this.hallInfo.dumpInfo():"");a.append("\n\n").appendI(this.operationCount).append(" operators").append(null!=
this.hallInfo&&!this.hallInfo.getHallSymbol().equals("--")?" from Hall symbol "+this.hallInfo.getHallSymbol()+"  #"+this.jmolId:"").append(": ");for(var c=0;c<this.operationCount;c++)a.append("\n").append(this.matrixOperations[c].xyz);return a.toString()});d(b,"dumpInfoObj",function(){var a=this.dumpCanonicalSeitzList();if(V(a,"JS.SpaceGroup"))return a.dumpInfoObj();a=new java.util.Hashtable;if(null!=this.itaNumber&&!this.itaNumber.equals("0")){var c=null==this.hmSymbol||null==this.hmSymbolExt?"?":
this.hmSymbol+(0<this.hmSymbolExt.length?":"+this.hmSymbolExt:"");a.put("index",Integer.$valueOf(this.index));a.put("hm",c);a.put("HermannMauguinSymbol",c);a.put("ita",Integer.$valueOf(JU.PT.parseInt(this.itaNumber)));null!=this.hallInfo&&null!=this.hallInfo.getHallSymbol()&&a.put("HallSymbol",this.hallInfo.getHallSymbol());null!=this.hallSymbolAlt&&a.put("HallSymbolAlt",this.hallSymbolAlt);a.put("itaIndex",null==this.itaIndex?"n/a":this.itaIndex);a.put("clegId",null==this.itaIndex?"n/a":this.clegId);
null!=this.jmolId&&a.put("jmolId",this.jmolId);null!=this.crystalClass&&a.put("crystalClass",this.crystalClass);a.put("operationCount",Integer.$valueOf(this.operationCount))}for(var c=new JU.Lst,e=0;e<this.operationCount;e++)c.addLast(this.matrixOperations[e].xyz);a.put("operationsXYZ",c);return a});d(b,"getCIFWriterValue",function(a,c){var e=null;switch(a){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,c.getUnitCellParams(),!0,!1));if("string"==typeof this.info)return null;e=this.info.get(a);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(a){this.latticeParameter=a;10<a&&(this.latticeParameter=-JS.HallInfo.getLatticeIndexFromCode(a))},"~N");
d(b,"dumpCanonicalSeitzList",function(){null!=this.nHallOperators&&null!=this.hallSymbol&&(this.hallInfo=new JS.HallInfo(this.hallSymbol),this.generateAllOperators(null));var a=this.getCanonicalSeitzList();if(this.index>=JS.SpaceGroup.SG.length){var c=JS.SpaceGroup.findReferenceSpaceGroup(this.operationCount,a,this.clegId);if(null!=c)return c.getCanonicalSeitzList()}return(0<=this.index&&this.index<JS.SpaceGroup.SG.length?this.hallSymbol+" = ":"")+a});d(b,"getReferenceSpaceGroup",function(){if(-2==
this.referenceIndex||0<=this.index&&this.index<JS.SpaceGroup.SG.length||0<this.modDim||null==this.matrixOperations||0==this.matrixOperations.length||0!=this.matrixOperations[0].timeReversal)return this;null!=this.finalOperations&&this.setFinalOperations();var a=this.getCanonicalSeitzList();return null==a?null:JS.SpaceGroup.findReferenceSpaceGroup(this.operationCount,a,this.clegId)});d(b,"getCanonicalSeitzList",function(){return JS.SpaceGroup.getCanonicalSeitzForOperations(this.matrixOperations,this.operationCount)});
b.getCanonicalSeitzForOperations=d(b,"getCanonicalSeitzForOperations",function(a,c){for(var e=Array(c),g=0;g<c;g++)e[g]=JS.SymmetryOperation.dumpSeitz(a[g],!0);java.util.Arrays.sort(e,0,c);for(var b=(new JU.SB).append("\n["),g=0;g<c;g++)b.append(e[g].$replace("\t"," ").$replace("\n"," ")).append("; ");b.append("]");return b.toString()},"~A,~N");b.findReferenceSpaceGroup=d(b,"findReferenceSpaceGroup",function(a,c,e){a=JS.SpaceGroup.htByOpCount.get(Integer.$valueOf(a));if(null!=a)for(var g=0,b=a.size();g<
b;g++){var f=a.get(g);if(null!=e&&e.equals(f)||(null==f.clegId||null==e||e.equals("0:a,b,c"))&&0<=JS.SpaceGroup.getCanonicalSeitz(f.index).indexOf(c))return JS.SpaceGroup.SG[f.index]}return null},"~N,~S,~S");b.dumpAll=d(b,"dumpAll",function(a){if(a){var c=new JU.Lst;for(a=0;a<JS.SpaceGroup.SG.length;a++)c.addLast(JS.SpaceGroup.SG[a].dumpInfoObj());return c}c=new JU.SB;for(a=0;a<JS.SpaceGroup.SG.length;a++)c.append("\n----------------------\n"+JS.SpaceGroup.SG[a].dumpInfo());return c.toString()},"~B");
b.dumpAllSeitz=d(b,"dumpAllSeitz",function(){for(var a=new JU.SB,c=0;c<JS.SpaceGroup.SG.length;c++)a.append("\n").appendO(JS.SpaceGroup.getCanonicalSeitz(c));return a.toString()});b.getCanonicalSeitz=d(b,"getCanonicalSeitz",function(a){null==JS.SpaceGroup.canonicalSeitzList&&(JS.SpaceGroup.canonicalSeitzList=Array(JS.SpaceGroup.SG.length));var c=JS.SpaceGroup.canonicalSeitzList[a];return null==c?JS.SpaceGroup.canonicalSeitzList[a]=JS.SpaceGroup.SG[a].dumpCanonicalSeitzList().toString():c},"~N");d(b,
"setLattice",function(a,c){this.latticeParameter=JS.HallInfo.getLatticeIndex(a);c||(this.latticeParameter=-this.latticeParameter)},"~S,~B");b.createSpaceGroupN=d(b,"createSpaceGroupN",function(a,c){a=a.trim();var e=JS.SpaceGroup.determineSpaceGroupN(a);if(null==e&&c){var g=JS.SpaceGroup.newHallInfo(a);g.isGenerated()?(e=new JS.SpaceGroup(-1,"0;--;--;0;--;--;"+a,!0),e.hallInfo=g,e.hallSymbol=g.getHallSymbol(),e.setName("["+e.hallSymbol+"]"),e.jmolId=null):0<=a.indexOf(",")&&(e=new JS.SpaceGroup(-1,
"0;--;--;0;--;--;--",!0),e.doNormalize=!1,e.generateOperatorsFromXyzInfo(a))}if(null!=e)try{return e.generateAllOperators(null),e}catch(b){if(!ba(b,Exception))throw b;}return null},"~S,~B");d(b,"addOperation",function(a,c,e){if(null==a||3>a.length)return this.init(!1),-1;a=JU.PT.rep(a," ","");var g="="==a.charAt(0);g&&(a=a.substring(1));var b=this.checkXYZlist(a);if(0<=b)return b;if(a.startsWith("x1,x2,x3,x4")&&0==this.modDim)this.xyzList.clear(),this.operationCount=0,this.modDim=JU.PT.parseInt(a.substring(a.lastIndexOf("x")+
1))-3;else if(0<=a.indexOf("m")&&(a=JU.PT.rep(a,"+m","m"),a.equals("x,y,z,m")||a.equals("x,y,z(mx,my,mz)")))this.xyzList.clear(),this.operationCount=0;c=new JS.SymmetryOperation(null,c,this.doNormalize);if(!c.setMatrixFromXYZ(a,this.modDim,e))return JU.Logger.error("couldn't interpret symmetry operation: "+a),-1;"!"==a.charAt(0)&&(a=a.substring(a.lastIndexOf("!")+1));return this.addOp(c,a,g)},"~S,~N,~B");d(b,"checkXYZlist",function(a){return this.xyzList.containsKey(a)?this.xyzList.get(a).intValue():
-1},"~S");d(b,"addOp",function(a,c,e){var g=a.xyz;if(!e){e=this.checkXYZlist(g);if(0<=e)return e;0>this.latticeOp&&(e=JU.PT.replaceAllCharacters(0<this.modDim?JS.SymmetryOperation.replaceXn(g,this.modDim+3):g,"+123/",""),this.xyzList.containsKey(e+"!")?this.latticeOp=this.operationCount:this.xyzList.put(e+"!",Integer.$valueOf(this.operationCount)));this.xyzList.put(g,Integer.$valueOf(this.operationCount))}g.equals(c)||this.xyzList.put(c,Integer.$valueOf(this.operationCount));null==this.matrixOperations&&
(this.matrixOperations=Array(4));this.operationCount==this.matrixOperations.length&&(this.matrixOperations=JU.AU.arrayCopyObject(this.matrixOperations,2*this.operationCount));this.matrixOperations[this.operationCount++]=a;a.number=this.operationCount;0!=a.timeReversal&&(this.matrixOperations[0].timeReversal=1);JU.Logger.debugging&&JU.Logger.debug("\naddOperation "+this.operationCount+a.dumpInfo());return this.operationCount-1},"JS.SymmetryOperation,~S,~B");d(b,"generateOperatorsFromXyzInfo",function(a){this.init(!0);
a=JU.PT.split(a.toLowerCase(),";");for(var c=0;c<a.length;c++)this.addSymmetry(a[c],0,!1)},"~S");d(b,"generateAllOperators",function(a){if(null==a){if(0<this.operationCount)return;if(null==this.hallSymbol||this.hallSymbol.endsWith("?")){this.checkHallOperators();return}this.matrixOperations=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);
a=this.hallInfo}a.generateAllOperators(this);null==this.hmSymbol&&(this.hmSymbol="--");this.hmSymbol.equals("--")&&(this.hallSymbol=a.getHallSymbol(),this.nHallOperators=Integer.$valueOf(this.operationCount));null!=this.nHallOperators&&this.operationCount!=this.nHallOperators.intValue()&&JU.Logger.error("Operator mismatch "+this.operationCount+" for "+this);a=a.getLatticeCode();switch(a.charCodeAt(0)){case 0:case 83:case 84:case 80:this.latticeType="P";break;default:this.latticeType=a}},"JS.HallInfo");
d(b,"addSymmetrySM",function(a,c){var e=this.addOperation(a,0,!1);0<=e&&this.matrixOperations[e].setM4(c);return e},"~S,JU.M4");b.determineSpaceGroupN=d(b,"determineSpaceGroupN",function(a){return JS.SpaceGroup.determineSpaceGroup(a,0,0,0,0,0,0,-1)},"~S");b.determineSpaceGroupNS=d(b,"determineSpaceGroupNS",function(a,c){return JS.SpaceGroup.determineSpaceGroup(a,0,0,0,0,0,0,c.index)},"~S,JS.SpaceGroup");b.determineSpaceGroupNA=d(b,"determineSpaceGroupNA",function(a,c){return null==c?JS.SpaceGroup.determineSpaceGroup(a,
0,0,0,0,0,0,-1):JS.SpaceGroup.determineSpaceGroup(a,c[0],c[1],c[2],c[3],c[4],c[5],-1)},"~S,~A");b.determineSpaceGroup=d(b,"determineSpaceGroup",function(a,c,e,g,b,f,d,h){a=JS.SpaceGroup.determineSpaceGroupIndex(a,c,e,g,b,f,d,h);return 0<=a?JS.SpaceGroup.SG[a]:null},"~S,~N,~N,~N,~N,~N,~N,~N");b.isXYZList=d(b,"isXYZList",function(a){return null!=a&&0<=a.indexOf(",")&&0>a.indexOf("(")&&0>a.indexOf(":")},"~S");b.determineSpaceGroupIndex=d(b,"determineSpaceGroupIndex",function(a,c,e,g,b,f,d,h){if(JS.SpaceGroup.isXYZList(a))return-1;
0>h&&(h=JS.SpaceGroup.SG.length);if(0<JS.SpaceGroup.getExplicitSpecialGroupType(a))return-1;a=a.trim().toLowerCase();a.startsWith("bilbao:")&&(a=a.substring(7));var k;k=a.indexOf("hall:");0<k&&(a=a.substring(k));var m=0<=a.indexOf(",")?6:a.startsWith("ita/")?4:a.startsWith("hall:")?5:a.startsWith("hm:")?3:0;switch(m){case 6:a=JS.SpaceGroup.canonicalizeCleg(a);break;case 3:case 5:case 4:a=a.substring(m);break;case 0:a.contains("[")?(m=5,a=a.substring(0,a.indexOf("[")).trim()):0<a.indexOf(".")&&(m=
4)}switch(m){case 6:for(k=0;k<h;k++)if(a.equals(JS.SpaceGroup.SG[k].canonicalCLEG))return k;return-1;case 5:for(k=0;k<h;k++)if(JS.SpaceGroup.SG[k].hallSymbol.equalsIgnoreCase(a))return k;return-1}var n=a,t=!1;4!=m&&(a=a.$replace("_"," "),2<=a.length&&(k=0==a.indexOf("-")?2:1,k<a.length&&" "!=a.charAt(k)&&(a=a.substring(0,k)+" "+a.substring(k)),a=JS.SpaceGroup.toCap(a,2)));var q="";if(0<(k=a.indexOf(":")))q=a.substring(k+1),a=a.substring(0,k).trim(),t=0<q.length;4!=m&&(5!=m&&!t&&JU.PT.isOneOf(a,JS.SpaceGroup.ambiguousHMNames))&&
(q="?",t=!0);var p=JU.PT.replaceAllCharacters(a," ()",""),r;switch(m){case 4:if(t)for(k=0;k<h;k++){if(n.equalsIgnoreCase(JS.SpaceGroup.SG[k].itaIndex))return k}else for(k=0;k<h;k++)if(a.equalsIgnoreCase(JS.SpaceGroup.SG[k].itaIndex))return k;break;case 6:case 5:break;default:case 3:if(3!=m)for(k=0;k<h;k++)if(JS.SpaceGroup.SG[k].jmolId.equalsIgnoreCase(n))return k;for(k=0;k<h;k++)if(JS.SpaceGroup.SG[k].hmSymbolFull.equalsIgnoreCase(n))return k;for(k=0;k<h;k++)if(null!=(r=JS.SpaceGroup.SG[k]).hmSymbolAlternative&&
r.hmSymbolAlternative.equalsIgnoreCase(n))return k;if(t){for(k=0;k<h;k++)if((r=JS.SpaceGroup.SG[k]).hmSymbolAbbr.equalsIgnoreCase(p)&&(r.hmSymbolExt.equalsIgnoreCase(q)||r.jmolIdExt.equalsIgnoreCase(q)))return k;for(k=0;k<h;k++)if((r=JS.SpaceGroup.SG[k]).hmSymbolAbbrShort.equalsIgnoreCase(p)&&(r.hmSymbolExt.equalsIgnoreCase(q)||r.jmolIdExt.equalsIgnoreCase(q)))return k}a=JS.SpaceGroup.determineUniqueAxis(c,e,g,b,f,d);if(!t||"?"==q.charAt(0))for(k=0;k<h;k++)if((r=JS.SpaceGroup.SG[k]).hmSymbolAbbr.equalsIgnoreCase(p)||
r.hmSymbolAbbrShort.equalsIgnoreCase(p)||r.itaNumber.equals(p))switch(r.ambiguityType.charCodeAt(0)){case 0:case 45:return k;case 97:if(r.uniqueAxis==a||"\x00"==a)return k;break;case 111:if(0==q.length){if(r.hmSymbolExt.equals("2"))return k}else if(r.hmSymbolExt.equalsIgnoreCase(q))return k;break;case 116:if(0==q.length){if("h"==r.axisChoice)return k}else if((r.axisChoice+"").equalsIgnoreCase(q))return k}}if(0==q.length)for(k=0;k<h;k++)if(JS.SpaceGroup.SG[k].itaNumber.equals(n))return k;return-1},
"~S,~N,~N,~N,~N,~N,~N,~N");d(b,"setJmolCode",function(a){this.jmolId=a;a=JU.PT.split(a,":");this.itaNumber=a[0];this.jmolIdExt=1==a.length?"":a[1];this.ambiguityType="\x00";0<this.jmolIdExt.length&&(a=this.jmolIdExt.charAt(0),this.jmolIdExt.equals("h")||this.jmolIdExt.equals("r")?(this.ambiguityType="t",this.axisChoice=this.jmolIdExt.charAt(0)):"1"==a||"2"==a?this.ambiguityType="o":2>=this.jmolIdExt.length||3==this.jmolIdExt.length&&"-"==a?(this.ambiguityType="a",this.uniqueAxis=this.jmolIdExt.charAt("-"==
a?1:0)):this.jmolIdExt.contains("-")&&(this.ambiguityType="-"))},"~S");b.determineUniqueAxis=d(b,"determineUniqueAxis",function(a,c,e,g,b,f){return a==c?c==e?"\x00":"c":c==e?"a":e==a?"b":g==b?b==f?"\x00":"c":b==f?"a":f==g?"b":"\x00"},"~N,~N,~N,~N,~N,~N");d(b,"buildSelf",function(a){a=JU.PT.split(a.toLowerCase(),";");this.jmolId=a[0].trim();this.setJmolCode(this.jmolId);var c=this.jmolId.endsWith("*");c&&(this.jmolId=this.jmolId.substring(0,this.jmolId.length-1));this.itaIndex=a[1].$replace("|",";");
var e=a[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(this.itaNumber+":"+this.itaTransform);0<a[3].length&&(this.nHallOperators=Integer.$valueOf(a[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(a[4],"^")[0],1);e=a[5];
e.endsWith("*")&&(e=e.substring(0,e.length-1));this.setHMSymbol(e);"xyz".equals(a[6])?(a=this.hmSymbol,this.hallSymbol=""+this.latticeType+"?"):(this.hallSymbol=a[6],1<this.hallSymbol.length&&(this.hallSymbol=JS.SpaceGroup.toCap(this.hallSymbol,2)),c&&(this.hallSymbolAlt=this.hallSymbol,this.hallSymbol=JS.SpaceGroup.lastHallSymbol),a=this.itaNumber+this.hallSymbol,"0"!=this.itaNumber.charAt(0)&&a.equals(JS.SpaceGroup.lastInfo)&&(JS.SpaceGroup.ambiguousHMNames+=this.hmSymbol+";"));JS.SpaceGroup.lastHallSymbol=
this.hallSymbol;JS.SpaceGroup.lastInfo=a;this.name="HM:"+this.hmSymbolFull+" "+(null==this.hallSymbol||"?"===this.hallSymbol?"["+this.hallSymbol+"]":"")+" #"+this.itaIndex},"~S");d(b,"setHMSymbol",function(a){var c=a.indexOf("#");0<=c&&(a=a.substring(0,c).trim());this.hmSymbolFull=0==this.groupType?JS.SpaceGroup.toCap(a,1):a.toLowerCase();this.latticeType=Character.toUpperCase(this.hmSymbolFull.charAt(0));a=JU.PT.split(this.hmSymbolFull,":");this.hmSymbol=a[0];this.hmSymbolExt=1==a.length?"":a[1];
c=this.hmSymbol.indexOf(" -3");1<=c&&0<="admn".indexOf(this.hmSymbol.charAt(c-1))&&(this.hmSymbolAlternative=(this.hmSymbol.substring(0,c)+" 3"+this.hmSymbol.substring(c+3)).toLowerCase());this.hmSymbolAbbr=JU.PT.rep(this.hmSymbol," ","");this.hmSymbolAbbrShort=3<this.hmSymbol.length?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(a,c){return a.substring(0,c).toUpperCase()+a.substring(c)},
"~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 a=null;null==this.jmolId||"--".equals(this.hallSymbol)?(a="",null!=this.hmSymbolFull&&!"--".equals(this.hmSymbol)&&(a=this.hmSymbolFull)):this.jmolId.equals("0")||
(a=this.hmSymbolFull);null==a?a="["+this.hallSymbol+"]":null!=this.getClegId()&&(a+=" #"+this.getClegId());a.endsWith("2/3a+1/3b+1/3c,-1/3a+1/3b+1/3c,-1/3a-2/3b+1/3c")&&(a=JU.PT.rep(a,"2/3a+1/3b+1/3c,-1/3a+1/3b+1/3c,-1/3a-2/3b+1/3c","r"));0<=a.indexOf("-- [--]")&&(a="");a.endsWith(":a,b,c")&&(a=a.substring(0,a.length-6));this.displayName=a}return this.displayName});b.getSpaceGroups=d(b,"getSpaceGroups",function(){if(null==JS.SpaceGroup.SG){var a=JS.SpaceGroup.STR_SG.length;JS.SpaceGroup.nameToGroup=
new java.util.Hashtable;for(var c=Array(a),e=0;e<a;e++)c[e]=new JS.SpaceGroup(e,JS.SpaceGroup.STR_SG[e],!0),JS.SpaceGroup.nameToGroup.put(c[e].jmolId,c[e]);System.out.println("SpaceGroup - "+a+" settings generated");JS.SpaceGroup.STR_SG=null;JS.SpaceGroup.SG=c}return JS.SpaceGroup.SG});d(b,"addLatticeVectors",function(a){if(0<=this.latticeOp||0==a.size())return!1;for(var c=this.latticeOp=this.operationCount,e=a.get(0).length==this.modDim+4,g=-2,b=0;b<a.size();b++){var f=a.get(b);e&&(g=u(f[this.modDim+
3]),f=JU.AU.arrayCopyF(f,this.modDim+3));if(f.length>this.modDim+3)return!1;for(var d=0;d<c;d++){var h=new JS.SymmetryOperation(null,0,!0);h.modDim=this.modDim;var k=this.matrixOperations[d];h.divisor=k.divisor;h.linearRotTrans=JU.AU.arrayCopyF(k.linearRotTrans,-1);h.setFromMatrix(f,!1);-2!=g&&h.setTimeReversal(k.timeReversal*g);h.xyzOriginal=h.xyz;this.addOp(h,h.xyz,!0)}}return!0},"JU.Lst");d(b,"getSiteMultiplicity",function(a,c){for(var e=this.finalOperations.length,g=new JU.Lst,b=e;0<=--b;){var f=
JU.P3.newP(a);this.finalOperations[b].rotTrans(f);c.unitize(f);for(var d=g.size();0<=--d;){var h=g.get(d);if(1.96E-6>f.distanceSquared(h)){f=null;break}}null!=f&&g.addLast(f)}return z(e/g.size())},"JU.P3,JS.UnitCell");d(b,"setName",function(a){this.name=a;null!=a&&a.startsWith("HM:")&&this.setHMSymbol(a.substring(3));this.strName=this.displayName=null},"~S");b.getSpaceGroupFromJmolClegOrITA=d(b,"getSpaceGroupFromJmolClegOrITA",function(a,c){var e=JS.SpaceGroup.getExplicitSpecialGroupType(c),g=0<e?
c.substring(2):c,b=g.indexOf(":"),f=g.indexOf(","),d=g.indexOf("."),f=0<b&&f>b?b:d,h=JS.SpaceGroup.getITNo(g,f),g=0<f&&f==b||-2147483648==h?0:0<f?JS.SpaceGroup.getITNo(g.substring(f+1),0):1;if(0<e)return JS.Symmetry.getSGFactory().getSpecialGroup(null,a,c,h,g,0<f&&f==b,e);e=JS.SpaceGroup.SG.length;if(0<f&&f==b)for(b=0;b<e;b++){if(c.equals(JS.SpaceGroup.SG[b].clegId))return JS.SpaceGroup.SG[b]}else if(0<b)for(b=0;b<e;b++){if(c.equals(JS.SpaceGroup.SG[b].jmolId))return JS.SpaceGroup.SG[b]}else if(0<
d)for(b=0;b<e;b++){if(c.equals(JS.SpaceGroup.SG[b].itaIndex))return JS.SpaceGroup.SG[b]}else for(b=0;b<e;b++)if(c.equals(JS.SpaceGroup.SG[b].itaNumber))return JS.SpaceGroup.SG[b];return null},"JV.Viewer,~S");d(b,"checkHallOperators",function(){null!=this.nHallOperators&&this.nHallOperators.intValue()!=this.operationCount&&(null==this.hallInfo||this.hallInfo.isGenerated()?this.generateAllOperators(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(a){var c=JS.SpaceGroup.getNull(!0,!0,!1);JS.SpaceGroup.transformSpaceGroup(this.groupType,c,this,null,"!"+a,null);c.setFinalOperations();var e=JS.SpaceGroup.getNull(!0,!1,!1);JS.SpaceGroup.transformSpaceGroup(this.groupType,e,c,null,a,null);e.setFinalOperations();return e.finalOperations},"~S");b.getSpaceGroupFromIndex=d(b,"getSpaceGroupFromIndex",function(a){return null!=JS.SpaceGroup.SG&&0<=a&&a<JS.SpaceGroup.SG.length?
JS.SpaceGroup.SG[a]:null},"~N");d(b,"setITATableNames",function(a,c,e,g){this.itaNumber=c;this.itaIndex=null!=g?c+":"+g:0<=e.indexOf(".")?e:c+"."+e;this.itaTransform=g;this.setClegId(this.specialPrefix+c+":"+g);this.strName=this.displayName=null;this.jmolId=a;null==a?(this.name=this.clegId,this.info=this.dumpInfoObj()):this.setJmolCode(a)},"~S,~S,~S,~S");b.transformCoords=d(b,"transformCoords",function(a,c,e,g,b,f){null==f&&(f=new JU.Lst);for(var d=0,h=a.size();d<h;d++){var k=JS.SymmetryOperation.transformStr(a.get(d),
null,c,g,b,null,e,!0,!0);f.contains(k)||f.addLast(k)}return f},"JU.Lst,JU.M4,JU.P3,JU.M4,~A,JU.Lst");b.getTransformRange=d(b,"getTransformRange",function(a){for(var c=F(2,3,0),e=F(4,0),g=0;3>g;g++){a.getRow(g,e);for(var b=0;3>b;b++){var f=e[b];0>f?c[0][g]+=-e[b]:0<f&&(c[1][g]+=e[b])}}a=!0;for(e=g=0;2>g;g++,e++)for(b=0;3>b;b++)f=z(Math.ceil(c[g][b])),f>e&&(a=!1),c[g][b]=0==g?-f:f;return a?null:c},"JU.M4");b.getTransformedCentering=d(b,"getTransformedCentering",function(a,c){var e=JU.M4.newM4(a);e.invert();
var g=c.size(),b=new JU.P3,f=new JU.P3,d=JS.SpaceGroup.getTransformRange(a);if(null!=d)for(var h=JS.SpaceGroup.addCentering(e,d,b,f,c,0);0<=--g&&3>h;)JS.SymmetryOperation.toPoint(c.remove(g),b),h=JS.SpaceGroup.addCentering(e,d,b,f,c,h);return e},"JU.M4,JU.Lst");b.addCentering=d(b,"addCentering",function(a,c,e,g,b,f){for(var d=u(c[0][0]);d<=c[1][0];d++)for(var h=u(c[0][1]);h<=c[1][1];h++)for(var k=u(c[0][2]);k<=c[1][2];k++)if(g.set(d,h,k),g.add(e),a.rotTrans(g),0!=g.length()%1){g.x%=1;g.y%=1;g.z%=
1;var m=JS.SymmetryOperation.norm3(g);if(!m.equals("0,0,0")&&!b.contains(m)&&(b.addLast(m),3==++f))return 3}return f},"JU.M4,~A,JU.P3,JU.P3,JU.Lst,~N");b.fillMoreData=d(b,"fillMoreData",function(a,c,e,g,b){var f=e.indexOf(":"),f=0>f?"a,b,c":e.substring(f+1),d=JS.UnitCell.toTrm(f,null),h=b.get("gp"),k=b.get("wpos"),m=k.get("cent");b=new JU.Lst;null!=m&&b.addAll(m);for(var n=b.size(),t=JS.SpaceGroup.getTransformedCentering(d,b),m=b.size(),q=k.get("pos"),k=new JU.Lst,p=new JU.M4,r=F(16,0),s=(m+1)/(n+
1),n=0,Ya=q.size();n<Ya;n++){var v=q.get(n),w=new java.util.Hashtable;w.putAll(v);var C=v.get("coord");null!=C&&(C=JS.SpaceGroup.transformCoords(C,t,null,p,r,null),w.put("coord",C));v=v.get("mult").intValue();w.put("mult",Integer.$valueOf(u(v*s)));k.addLast(w)}q=new JU.Lst;JS.SpaceGroup.transformCoords(h,t,null,p,r,q);if(0<m)for(n=0;n<m;n++)w=new JU.P3,JS.SpaceGroup.transformCoords(h,t,JS.SymmetryOperation.toPoint(b.get(n),w),p,r,q);null==c?(c=new java.util.Hashtable,c.put("sg",Integer.$valueOf(g)),
c.put("trm",f),c.put("clegId",g+":"+f),c.put("det",Float.$valueOf(d.determinant3()))):c.remove("more");g=new java.util.Hashtable;0<m&&g.put("cent",b);g.put("pos",k);c.put("wpos",g);q=new JU.Lst;a=JS.SpaceGroup.getSpaceGroupFromJmolClegOrITA(a,e);a=JS.SpaceGroup.transformSpaceGroup(0,null,a,h,f,new JU.M4);n=0;for(Ya=a.getOperationCount();n<Ya;n++)q.addLast(a.getOperation(n).xyz);c.put("gp",q);return c},"JV.Viewer,java.util.Map,~S,~N,java.util.Map");b.transformSpaceGroup=d(b,"transformSpaceGroup",function(a,
c,e,g,b,f){if(null==g){e.setFinalOperations();g=new JU.Lst;for(var d=0,h=e.getOperationCount();d<h;d++)g.addLast(e.getXyz(d,!1))}g=JS.SpaceGroup.addTransformXYZList(c,g,b,f,null==c||c.doNormalize);if(null==c)return JS.SpaceGroup.createITASpaceGroup(a,g,e);null==b?c.setFrom(e,!0):c.setITATableNames(c.jmolId,c.itaNumber,"1",b);return c},"~N,JS.SpaceGroup,JS.SpaceGroup,JU.Lst,~S,JU.M4");b.createITASpaceGroup=d(b,"createITASpaceGroup",function(a,c,e){a=0==a?new JS.SpaceGroup(-1,"0;--;--;0;--;--;--",!0):
JS.Symmetry.getSGFactory().createSpecialGroup(e,null,null,a);a.doNormalize=!1;for(var g=0,b=c.size();g<b;g++){var f=new JS.SymmetryOperation(null,g,!1),d=c.get(g);f.setMatrixFromXYZ(d,0,!1);a.addOp(f,d,!1)}null!=e&&a.setFrom(e,!0);return a},"~N,JU.Lst,JS.SpaceGroup");b.addTransformXYZList=d(b,"addTransformXYZList",function(a,c,e,g,b){var f=null,d=null,h=null,k=null,m=c.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"),g=JS.UnitCell.toTrm(e,g),f=JU.M4.newM4(g),f.invert(),
d=Math.round(g.determinant3()),1<d&&(k=JS.SpaceGroup.getTransformRange(g),m*=d),h=F(16,0),d=new JU.M4);e=JS.SpaceGroup.addTransformedOperations(a,c,g,f,d,h,null==a?new JU.Lst:null,null,b);if(null!=k)for(var n=new JU.P3,t=u(k[0][2]);t<=k[1][2];t++)for(var q=u(k[0][1]);q<=k[1][1];q++)for(var p=u(k[0][0]);p<k[1][0];p++)if(!(0==p&&0==q&&0==t)&&(n.set(p,q,t),null!=JS.SpaceGroup.addTransformedOperations(a,c,g,f,d,h,e,n,b)&&e.size()==m))return e;return null==a?e:null},"JS.SpaceGroup,JU.Lst,~S,JU.M4,~B");
b.addTransformedOperations=d(b,"addTransformedOperations",function(a,c,e,g,b,f,d,h,k){null!=a&&(a.latticeOp=0);for(var m=0,n=c.size();m<n;m++){var t=c.get(m);if(null!=e&&(0<m||null!=h))t=JS.SymmetryOperation.transformStr(t,e,g,b,f,h,null,k,!1);null!=a?a.addOperation(t,0,!1):d.contains(t)||d.addLast(t)}return d},"JS.SpaceGroup,JU.Lst,JU.M4,JU.M4,JU.M4,~A,JU.Lst,JU.P3,~B");p(b,"getMatrixOperation",function(a){return this.matrixOperations[a]},"~N");p(b,"getMatrixOperationCount",function(){return this.operationCount});
p(b,"addHallOperationCheckDuplicates",function(a){var c=JS.SymmetryOperation.getXYZFromMatrix(a,!0,!0,!1);if(0<=this.checkXYZlist(c))return!1;this.addSymmetrySM("!nohalf!"+c,a);return!0},"JU.M4");b.canonicalizeCleg=d(b,"canonicalizeCleg",function(a){0>a.indexOf(":")?a+=":a,b,c;0,0,0":0<a.indexOf(",")&&0>a.indexOf(";")&&(a+=";0,0,0");return a},"~S");b.convertWyckoffHMCleg=d(b,"convertWyckoffHMCleg",function(a,c){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 g=JS.SpaceGroup.moreSettings[e],b=JS.SpaceGroup.moreSettings[--e],b=JU.PT.rep(b," ","");JS.SpaceGroup.ClegtoHM.put(g,b);JS.SpaceGroup.HMtoCleg.put(b,g)}}return null!=a?JS.SpaceGroup.HMtoCleg.get(JU.PT.rep(a," ","")):JS.SpaceGroup.ClegtoHM.get(c)},"~S,~S");d(b,"getHMName",function(){return this.hmSymbol});b.getITNo=d(b,"getITNo",function(a,c){0>=c&&(c=a.length);for(var e=c;0<=--e;)if(!JU.PT.isDigit(a.charAt(e)))return-1;
return Integer.parseInt(a.substring(0,c))},"~S,~N");b.isInRange=d(b,"isInRange",function(a,c,e,g){var b=JS.SpaceGroup.getMax(c);switch(c){case 0:if(g)return c=u(a),g=JS.SpaceGroup.getImplicitSpecialGroupType(c),300==g&&(e=!1),-1!=g&&(e||c==a);break;case 300:e=!1}return 1<=a&&(e?a<b+1:a<=b)},"~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.hmEquals=d(b,"hmEquals",function(a,c,e){"/"==a.charAt(1)&&(a=a.substring(2));if(a.charAt(0)!=c.charAt(0))return!1;0>c.indexOf(" ")&&(a=JU.PT.rep(a," ",""));if(a.equals(c))return!0;if(300==e){e=a.length;if(e<=c.length)return!1;var g=c.charAt(1);switch(c.length){case 2:return 4==
e&&"1"==a.charAt(1)&&g==a.charAt(2);case 3:return"2"==a.charAt(1)?a.charAt(2)==g&&a.charAt(3)==c.charAt(2):"m"==a.charAt(e-1)&&a.startsWith(c)}}return!1},"~S,~S,~N");d(b,"createCompatibleUnitCell",function(a,c,e){null==c&&(c=a);var g=a[0],b=a[1],f=a[2],d=a[3],h=a[4],k=a[5],m=null==this.itaNumber?0:JU.PT.parseInt(this.itaNumber),n=!1,t=!1,q=!1,p=!1,t=(n=0!=m&&this.isHexagonalSG(m,null))&&this.isHexagonalSG(-1,a),p=(q=0!=m&&"r"==this.axisChoice)&&JU.SimpleUnitCell.isRhombohedral(a);if(n&&t||q&&p)e=
!0;if(m>(e?2:0)){var r=0<b&&JU.SimpleUnitCell.approx0(g-b),r=0<f&&JU.SimpleUnitCell.approx0(b-f),r=0<f&&JU.SimpleUnitCell.approx0(f-g),s=JU.SimpleUnitCell.approx0(d-h),u=JU.SimpleUnitCell.approx0(h-k),v=JU.SimpleUnitCell.approx0(k-d);e||(0<b&&g>b&&(s=g,g=b,b=s),(r=0<f&&JU.SimpleUnitCell.approx0(b-f))&&(f=1.5*b),(r=JU.SimpleUnitCell.approx0(g-b))&&(b=1.2*g),(r=JU.SimpleUnitCell.approx0(f-g))&&(f=1.1*g),JU.SimpleUnitCell.approx0(d-90)&&(d=80),JU.SimpleUnitCell.approx0(h-90)&&(h=100),JU.SimpleUnitCell.approx0(k-
90)&&(k=110),d>h&&(s=d,d=h,h=s),s=JU.SimpleUnitCell.approx0(d-h),u=JU.SimpleUnitCell.approx0(h-k),v=JU.SimpleUnitCell.approx0(k-d),s&&(h=1.2*d),u&&(k=1.3*h),v&&(k=1.4*d));if(n){if(!(q?p:t))"r"==this.axisChoice?(f=b=g,!e&&(85<d&&95>d)&&(d=80),k=h=d):(b=g,d=h=90,k=120)}else if(195<=m)f=b=g,d=h=k=90;else if(75<=m)b=g,r&&!e&&(f=1.5*g),d=h=k=90;else if(16<=m)d=h=k=90;else if(3<=m)switch(this.uniqueAxis.charCodeAt(0)){case 97:h=k=90;break;default:case 98:d=k=90;break;case 99:d=h=90}}a=!(g==a[0]&&b==a[1]&&
f==a[2]&&d==a[3]&&h==a[4]&&k==a[5]);c[0]=g;c[1]=b;c[2]=f;c[3]=d;c[4]=h;c[5]=k;return a},"~A,~A,~B");d(b,"isHexagonalSG",function(a,c){return 1>a?JU.SimpleUnitCell.isHexagonal(c):143<=a&&194>=a},"~N,~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=N(-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=N(-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()});U("JS");da(["JU.P3"],"JS.SpaceGroupFinder","JU.BS $.Lst $.M4 $.PT JS.SpaceGroup $.Symmetry $.SymmetryOperation JU.BSUtil JV.FileManager".split(" "),function(){var b=L(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.isg=0;Fa("JS.SpaceGroupFinder.SGAtom")||JS.SpaceGroupFinder.$SpaceGroupFinder$SGAtom$();E(this,arguments)},JS,"SpaceGroupFinder",null);ia(b,function(){this.pTemp=new JU.P3});Q(b,function(){});d(b,"findSpaceGroup",function(a,c,e,g,b,f,d,h){this.vwr=a;this.xyzList=e;this.unitCellParams=g;this.origin=b;this.oabc=f;this.uc=d;System.out.println(this.xyzList);this.isCalcOnly=0!=(h&16);this.isAssign=0!=(h&2);this.$checkSupercell=0!=(h&8);this.asString=0!=
(h&1);e=0!=(h&4);f=this.uc.getPrecision();this.slop=!Double.isNaN(f)?f:null!=g&&26<g.length?g[26]:1E-4;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.targets=JU.BS.newN(this.nAtoms);this.scaling=JU.P3.new3(1,1,1);this.isUnknown=!0;a=null!=this.xyzList&&this.xyzList.toUpperCase().startsWith("ITA/");f=null!=this.xyzList&&!a&&(this.xyzList.startsWith("[")||this.xyzList.startsWith("Hall:"));
if(this.isAssign&&f||!f&&(a||(a=this.checkWyckoffHM()))){this.isUnknown=!1;this.xyzList=a?JU.PT.rep(this.xyzList.substring(4)," ",""):this.xyzList.startsWith("Hall:")?this.xyzList.substring(5):JU.PT.replaceAllCharacters(this.xyzList,"[]","");this.sg=this.setITA(f);if(null==this.sg)return null;this.sg.getName()}else if(null!=this.oabc||f){if(a=this.xyzList,null!=a&&(this.sg=JS.SpaceGroup.createSpaceGroupN(a,f)),this.isUnknown=null==this.sg,f&&!this.isUnknown)return this.sg.dumpInfoObj()}else if(JS.SpaceGroup.isXYZList(this.xyzList)&&
(this.sg=JS.SpaceGroup.findSpaceGroupFromXYZ(this.xyzList),null!=this.sg))return this.sg.dumpInfoObj();if(e){if(null==this.sg&&null==(this.sg=JS.SpaceGroup.determineSpaceGroupNA(this.xyzList,g))&&null==(this.sg=JS.SpaceGroup.createSpaceGroupN(this.xyzList,!1)))return null;e=new JU.BS;a=this.sg.asString();null==this.oabc?(this.uc=JS.SpaceGroupFinder.setSpaceGroupAndUnitCell(this.sg,g,null,6==g.length),this.oabc=this.uc.getUnitCellVectors(),null!=b&&this.oabc[0].setT(b)):(this.uc=JS.SpaceGroupFinder.setSpaceGroupAndUnitCell(this.sg,
null,this.oabc,!1),this.uc.transformUnitCell(d.replaceTransformMatrix(null)))}else{g=this.findGroupByOperations();if(!this.isAssign||!V(g,"JS.SpaceGroup"))return g;this.sg=g;a=this.sg.asString();e=JU.BSUtil.copy(this.bsAtoms);for(g=this.targets.nextSetBit(0);0<=g;g=this.targets.nextSetBit(g+1))e.clear(this.atoms[g].index);g=e.cardinality();if(!this.isCalcOnly&&(c=a+(null==c||0==g?"":"\nbasis is "+g+" atom"+(1==g?"":"s")+": "+e),System.out.println("SpaceGroupFinder: "+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||(g=JU.BS.copy(this.bsPoints0),g.andNot(this.targets),this.dumpBasis(JS.SpaceGroupFinder.bsGroupOps[this.isg],g,this.bsPoints0));c.put("name",a);c.put("basis",e);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,e=null,c=this.xyzList.lastIndexOf(":"),g=this.xyzList.indexOf(","),g=0<c&&g>c,b=null,d=0<c&&!g,j=null;g&&(j=this.uc.staticCleanTransform(this.xyzList.substring(c+1)),this.xyzList=this.xyzList.substring(0,
c),b=this.xyzList+":"+j,j.equals("a,b,c")&&(j=null,g=!1));c=this.xyzList.indexOf(".");if(0<c&&(g||d))this.xyzList=this.xyzList.substring(0,c),c=-1;var h=this.xyzList;0<JS.SpaceGroup.getExplicitSpecialGroupType(h)&&(h=h.substring(2),c-=2);!d&&(!a&&!g&&!(0<c)&&-2147483648!=JU.PT.parseInt(h))&&(this.xyzList+=".1");var k=null,k=this.xyzList;if(a){if(d=this.uc.getSpaceGroupInfoObj("nameToXYZList","Hall:"+this.xyzList,!1,!1),null==d)return null}else{c=g?j:k;this.sg=JS.SpaceGroup.getSpaceGroupFromJmolClegOrITA(this.vwr,
g?b:k);e=this.uc.getSpaceGroupJSON(this.vwr,"ITA",k,0);if(null==e||"string"==typeof e)return null;if(d||g){a=e.get("its");if(null==a)return null;for(var e=null,b=0,m=a.size();b<m;b++)if(k=a.get(b),c.equals(k.get(g?"trm":"jmolId"))){e=k;break}if(null==e||!e.containsKey("jmolId")){if(d)return null;null!=e&&(j=e.get("trm"));g=!0;e=a.get(0)}else g=!1,j=null}else e.get("jmolId");d=e.get("gp")}if(null!=this.sg&&null==j)return this.sg=JS.SpaceGroup.createITASpaceGroup(this.sg.groupType,d,this.sg);this.sg=
JS.SpaceGroup.transformSpaceGroup(null==this.sg?0:this.sg.groupType,null,this.sg,d,g?j:null,g?new JU.M4:null);if(null==this.sg)return null;this.sg.itaNumber.equals("0")&&(null==j?(e.get("trm"),e=e.get("hm"),this.sg.setHMSymbol(e)):this.sg.setITATableNames(null,h,null,j),System.out.println("SpaceGroupFinder: new setting: "+this.sg.asString()));return this.sg},"~B");d(b,"findGroupByOperations",function(){var a=new JU.BS,c=new JU.BS,e=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(this.xyzList,this.unitCellParams,this.isAssign);if(!this.isAssign||null==d)return d;this.sg=d}null==this.oabc&&this.uc.setUnitCellFromParams(this.unitCellParams,!1,this.slop)}var f=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 j=0,h=this.bsAtoms.nextSetBit(0);0<=h;h=this.bsAtoms.nextSetBit(h+1),j++){var k=this.cartesians[h],m=k.getAtomicAndIsotopeNumber();(this.atoms[j]=pa(JS.SpaceGroupFinder.SGAtom,this,null,m,h,k.getAtomName(),k.getOccupancy100())).setT(this.toFractional(k,
this.uc))}}var n=JU.BSUtil.newBitSet2(0,this.nAtoms);this.nAtoms=n.cardinality();f=this.uc;if(0<this.nAtoms){for(h=n.nextSetBit(0);0<=h;h=n.nextSetBit(h+1))this.uc.unitize(this.atoms[h]);this.removeDuplicates(n);if(this.$checkSupercell&&(this.uc=this.checkSupercell(this.vwr,this.uc,n,1,this.scaling),this.uc=this.checkSupercell(this.vwr,this.uc,n,2,this.scaling),this.uc=this.checkSupercell(this.vwr,this.uc,n,3,this.scaling),this.isSupercell=this.uc!==f))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)}e=n.cardinality();this.bsAtoms=new JU.BS;for(var t=Array(e),j=0,h=n.nextSetBit(0);0<=h;h=n.nextSetBit(h+1))k=this.atoms[h],t[j++]=k,this.isSupercell&&(k.setT(this.toFractional(this.cartesians[k.index],this.uc)),this.uc.unitize(k)),this.bsAtoms.set(this.atoms[h].index);this.atoms=t;this.nAtoms=e;n.clearAll();
n.setBits(0,this.nAtoms);this.bsPoints0=JU.BS.copy(n);var q=JU.BS.newN(JS.SpaceGroupFinder.OP_COUNT),p=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),s=JU.BS.newN(JS.SpaceGroupFinder.OP_COUNT);s.set(0);for(var d=!1,u=a.nextSetBit(1);0<u&&!c.isEmpty();u=a.nextSetBit(u+1)){var v=null==this.sg?JS.SpaceGroupFinder.getOp(u):
this.sg.getOperation(u);null==this.sg&&(System.out.println("\nChecking operation "+u+" "+JS.SpaceGroupFinder.opXYZ[u]),System.out.println("bsGroups = "+c),System.out.println("bsOps = "+a),b++);f=!0;n.clearAll();n.or(this.bsPoints0);p.clearAll();j=!0;for(h=n.nextSetBit(0);0<=h;h=n.nextSetBit(h+1)){n.clear(h);var w=this.findEquiv(this.uc,u,v,h,n,this.pTemp,!0);if(0>w&&null==this.sg){System.out.println("failed op "+u+" for atom "+h+" "+this.atoms[h].name+" "+this.atoms[h]+" looking for "+this.pTemp+
"\n"+v);f=!1;break}0<=w&&h!=w&&(j=!1,p.set(w))}if(null==this.sg){var C=JS.SpaceGroupFinder.bsOpGroups[u];a.clear(u);s.set(u);if(f){if(1==u&&(d=!0),this.targets.or(p),!j){c.and(C);q.setBits(1,JS.SpaceGroupFinder.OP_COUNT);for(h=c.nextSetBit(0);0<=h;h=c.nextSetBit(h+1))q.and(JS.SpaceGroupFinder.bsGroupOps[h]);r.or(q);a.andNot(q)}}else{c.andNot(C);q.clearAll();for(h=c.nextSetBit(0);0<=h;h=c.nextSetBit(h+1))q.or(JS.SpaceGroupFinder.bsGroupOps[h]);a.and(q)}}else this.targets.or(p)}null==this.sg&&(e=c.cardinality(),
0==e&&(c.set(d?1:0),e=1,d&&!this.asString&&(r.clearAll(),r.set(1),s.clearAll(),this.targets.clearAll(),n.or(this.bsPoints0))),this.isg=c.nextSetBit(0),1==e&&(0<this.isg&&(s.and(JS.SpaceGroupFinder.bsGroupOps[this.isg]),r.and(JS.SpaceGroupFinder.bsGroupOps[this.isg]),r.andNot(s),r.or(JS.SpaceGroupFinder.bsGroupOps[this.isg]),r.clear(0),n.or(this.bsPoints0),n.andNot(this.targets),this.checkBasis(this.uc,r,n,this.targets)||(System.out.println("failed checkBasis"),this.isg=0)),0==this.isg&&this.targets.clearAll()))}catch(z){if(ba(z,
Exception))z.printStackTrace(),c.clearAll();else throw z;}if(null==this.sg){System.out.println("checked "+b+" operations; now "+e+" "+c+" "+a);for(h=c.nextSetBit(0);0<=h;h=c.nextSetBit(h+1))System.out.println("SpaceGroupFinder found "+JS.SpaceGroup.nameToGroup.get(JS.SpaceGroupFinder.groupNames[h]));if(1!=e&&(this.isg=c.length()-1,0>this.isg))return null;this.sg=JS.SpaceGroupFinder.nameToGroup(JS.SpaceGroupFinder.groupNames[this.isg])}return this.sg});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");b.setSpaceGroupAndUnitCell=d(b,"setSpaceGroupAndUnitCell",function(a,c,e,b){var d=new JS.Symmetry;d.setSpaceGroupTo(a);null==e?(e=F(6,0),a.createCompatibleUnitCell(c,e,b)||(e=c),d.setUnitCellFromParams(e,!1,NaN)):d.getUnitCell(e,!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 e=this.atoms[c],b=a.nextSetBit(0);b<
c;b=a.nextSetBit(b+1)){var d=this.atoms[b];if(e.typeAndOcc==d.typeAndOcc&&1.96E-6>e.distanceSquared(d)){a.clear(c);break}}},"JU.BS");d(b,"dumpBasis",function(){},"JU.BS,JU.BS,JU.BS");d(b,"checkBasis",function(a,c,e,b){var d=c.cardinality();if(0==d)return!0;var f=new JU.BS;f.or(e);System.out.println("finishing check for basis for "+d+" operations");for(d=c.nextSetBit(0);0<=d;d=c.nextSetBit(d+1)){var j=JS.SpaceGroupFinder.getOp(d);f.or(e);for(var h=f.nextSetBit(0);0<=h;h=f.nextSetBit(h+1)){var k=this.findEquiv(a,
-1,j,h,f,this.pTemp,!1);if(0>k)return!1;h!=k&&(k=Math.max(h,k),b.set(k),f.clear(k))}}return!0},"J.api.SymmetryInterface,JU.BS,JU.BS,JU.BS");d(b,"filterGroups",function(a,c){var e=!1,b=!1,d=!1,f=!1,j=!1,h=this.approx001(c[0]-c[1]),k=this.approx001(c[1]-c[2]);90==c[3]?90==c[4]&&(h&&c[0]!=c[1]&&System.out.println("OHOH"),d=h&&this.approx001(c[5]-120),90==c[5]&&(j=h&&c[1]==c[2],b=!j&&h,e=!j&&!b)):h&&(k&&this.approx001(c[3]-c[4])&&this.approx001(c[4]-c[5]))&&(f=!0);a.setBits(0,2);for(k=h=2;;){k=JS.SpaceGroupFinder.scanTo(k,
"16");if(!e&&!b&&!d&&!f&&!j)break;k=JS.SpaceGroupFinder.scanTo(k,"75");if(!b&&!d&&!f&&!j)break;k=JS.SpaceGroupFinder.scanTo(k,"143");if(!d&&!f&&!j)break;for(h=k;;k++){e=JS.SpaceGroupFinder.groupNames[k];if(0<=e.indexOf(":r")){if(!f)continue;a.set(k)}if(e.startsWith("195")){if(f)return;break}}if(!j)break;a.setBits(2,h);h=k;k=JS.SpaceGroupFinder.GROUP_COUNT;break}a.setBits(h,k)},"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(a,c,e){var b=new JU.BS;null==c?b.setBits(0,JS.SpaceGroupFinder.GROUP_COUNT):this.filterGroups(b,c);var d=null;if(!JS.SpaceGroup.isXYZList(a)){d=JS.SpaceGroup.determineSpaceGroupNA(a,c);if(null==d)return null;d.checkHallOperators();c="00"+d.jmolId;var f=c.indexOf(":");c=c.substring((0>f?c.length:f)-3);for(f=0;f<JS.SpaceGroupFinder.GROUP_COUNT;f++)if(JS.SpaceGroupFinder.groupNames[f].equals(c))return b.get(f)?
d:null;return null}for(var d=0>a.indexOf("&")||e,j=JU.PT.split(JU.PT.trim(a.trim().$replace("&",";"),";="),";"),h=j.length;0<=--h;){var k=j[h];if(null==k)return"?"+j[h]+"?";k=JS.SymmetryOperation.getJmolCanonicalXYZ(k);for(f=JS.SpaceGroupFinder.opXYZ.length;0<=--f;){if(JS.SpaceGroupFinder.opXYZ[f].equals(k)){b.and(JS.SpaceGroupFinder.bsOpGroups[f]);break}0==f&&b.clearAll()}}if(b.isEmpty())return e?JS.SpaceGroup.createSpaceGroupN(a,!0):null;if(d){a=j.length;for(f=b.nextSetBit(0);0<=f;f=b.nextSetBit(f+
1))if(JS.SpaceGroupFinder.bsGroupOps[f].cardinality()==a)return e?JS.SpaceGroup.createSpaceGroupN(JS.SpaceGroupFinder.groupNames[f],!0):JS.SpaceGroup.getInfo(null,JS.SpaceGroupFinder.groupNames[f],c,!0,!1);return null}c=Array(b.cardinality());e=0;for(f=b.nextSetBit(0);0<=f;f=b.nextSetBit(f+1))c[e++]=JS.SpaceGroupFinder.groupNames[f];return c},"~S,~A,~B");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,e,b,d){if(e.isEmpty())return c;for(var f=2147483647,j=-2147483648,h=W(101,0),k=e.cardinality(),m=e.nextSetBit(0);0<=m;m=e.nextSetBit(m+1))for(var n=this.atoms[m],t=n.typeAndOcc,q,p,r=e.nextSetBit(0);0<=r;r=e.nextSetBit(r+1))if(!(r==m||(q=this.atoms[r]).typeAndOcc!=
t)){this.pTemp.sub2(q,n);switch(b){case 1:if(this.approx0(p=this.pTemp.x)||!this.approx0(this.pTemp.y)||!this.approx0(this.pTemp.z))continue;break;case 2:if(this.approx0(p=this.pTemp.y)||!this.approx0(this.pTemp.x)||!this.approx0(this.pTemp.z))continue;break;default:case 3:if(this.approx0(p=this.pTemp.z)||!this.approx0(this.pTemp.x)||!this.approx0(this.pTemp.y))continue}a=this.approxInt(1/p);0==a||(z(k/a)!=1*k/a||100<a)||(a>j&&(j=a),a<f&&(f=a),h[a]++)}for(a=j;a>=f&&!(0<h[a]&&h[a]==z((a-1)*k/a));)--a;
if(a<f)return c;q=c.getUnitCellVectors();q[b].scale(1/a);switch(b){case 1:d.x=a;break;case 2:d.y=a;break;case 3:d.z=a}(c=new JS.Symmetry).getUnitCell(q,!1,"scaled");p=0;for(m=e.nextSetBit(0);0<=m;m=e.nextSetBit(m+1)){switch(b){case 1:p=this.approxInt(a*this.atoms[m].x);break;case 2:p=this.approxInt(a*this.atoms[m].y);break;case 3:p=this.approxInt(a*this.atoms[m].z)}0!=p&&(this.atoms[m]=null,e.clear(m))}e.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=u(a+this.slop);return this.approx0(a-c)?c:0},"~N");d(b,"findEquiv",function(a,c,e,b,d,f,j){c=this.atoms[b];f.setT(c);e.rotTrans(f);a.unitize(f);if(0==f.distanceSquared(c))return b;a=c.typeAndOcc;for(e=this.nAtoms;0<=--e;)if(c=this.atoms[e],c.typeAndOcc==a){var h=c.distance(f);if(1.96E-6>h*h||1.96E-6>(1-h)*(1-h)&&this.latticeShift(f,c))return j&&(e=Math.max(b,e),b!=e&&d.clear(e)),e}return-1},"J.api.SymmetryInterface,~N,JS.SymmetryOperation,~N,JU.BS,JU.P3,~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 e=0;e<JS.SpaceGroupFinder.OP_COUNT;e++){var b=c[e],d=b.length;
JS.SpaceGroupFinder.bsOpGroups[e]=JU.BS.newN(JS.SpaceGroupFinder.GROUP_COUNT);for(a=0;a<d;a++)"1"==b.charAt(a)&&(JS.SpaceGroupFinder.bsGroupOps[a].set(e),JS.SpaceGroupFinder.bsOpGroups[e].set(a))}JS.SpaceGroupFinder.ops=Array(JS.SpaceGroupFinder.OP_COUNT);return!0}catch(f){if(ba(f,Exception))return f.printStackTrace(),!1;throw f;}finally{if(null!=JS.SpaceGroupFinder.rdr)try{JS.SpaceGroupFinder.rdr.close()}catch(j){if(!ba(j,"java.io.IOException"))throw j;}}},"JV.Viewer");b.getList=d(b,"getList",function(a,
c,e){JS.SpaceGroupFinder.rdr=JV.FileManager.getBufferedReaderForResource(a,JS.SpaceGroupFinder,"JS/","sg/"+e);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();System.out.println("SGF read "+c.length+" records for "+e);return c},"JV.Viewer,~A,~S");b.$SpaceGroupFinder$SGAtom$=function(){var a=L(function(){Ga(this,arguments);
this.index=this.typeAndOcc=0;this.name=null;E(this,arguments)},JS.SpaceGroupFinder,"SGAtom",JU.P3);Q(a,function(a,e,b,d){ya(this,JS.SpaceGroupFinder.SGAtom,[]);this.typeAndOcc=a+1E3*d;this.index=e;this.name=b},"~N,~N,~S,~N")};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});U("JS");da(["JU.M4"],"JS.HallInfo",["JU.P3i","$.SB","JS.SymmetryOperation","JU.Logger"],function(){var b=L(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;E(this,arguments)},JS,"HallInfo",null);ia(b,function(){this.rotationTerms=Array(16)});Q(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 e="\x00";for(this.primitiveHallSymbol="P";0<c.length&&16>this.nRotations;){var c=
this.extractRotationInfo(c,a,e),b=this.rotationTerms[this.nRotations-1];a=b.order;e=b.axisType;this.primitiveHallSymbol+=" "+b.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 e=a.substring(0,c).toUpperCase();this.latticeCode=e.charAt(0);"-"==this.latticeCode&&(this.$isCentrosymmetric=!0,this.latticeCode=
e.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("("),e=a.indexOf(")",c);0<c&&e>c&&(e=a.substring(c+1,e),this.vectorCode=" ("+e+")",a=a.substring(0,c).trim(),c=e.indexOf(" "),0<=c&&(this.vector12ths.x=Integer.parseInt(e.substring(0,c)),e=e.substring(c+1).trim(),c=e.indexOf(" "),0<=c&&(this.vector12ths.y=Integer.parseInt(e.substring(0,c)),e=e.substring(c+1).trim())),this.vector12ths.z=Integer.parseInt(e));
return a},"~S");d(b,"extractRotationInfo",function(a,c,e){var b=a.indexOf(" "),d;0<=b?(d=a.substring(0,b),a=a.substring(b+1).trim()):(d=a,a="");this.rotationTerms[this.nRotations]=new JS.HallInfo.HallRotationTerm(this,d,c,e);this.nRotations++;return a},"~S,~N,~S");p(b,"toString",function(){return this.hallSymbol});d(b,"generateAllOperators",function(a){for(var c=new JU.M4,e=new JU.M4,b=Array(7),d=0;7>d;d++)b[d]=new JU.M4;for(var f=a.getMatrixOperationCount(),d=0;d<this.nRotations;d++){var j=this.rotationTerms[d];
c.setM4(j.seitzMatrix12ths);j=j.order;b[0].setIdentity();for(var h=1;h<=j;h++){var k=b[h];k.mul2(c,b[0]);b[0].setM4(k);for(var m=0,n=0;n<f;n++)e.mul2(k,a.getMatrixOperation(n)),e.m03=(u(e.m03)+12)%12,e.m13=(u(e.m13)+12)%12,e.m23=(u(e.m23)+12)%12,a.addHallOperationCheckDuplicates(e)&&m++;f+=m}}},"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");Xa(JS.HallInfo,"HallReceiver");b=L(function(){this.seitzMatrixInv=this.seitzMatrix=this.rotCode=null;E(this,arguments)},JS.HallInfo,
"HallRotation",null);ia(b,function(){this.seitzMatrix=new JU.M4;this.seitzMatrixInv=new JU.M4});Q(b,function(a,c){this.rotCode=a;var e=F(16,0),b=F(16,0);e[15]=b[15]=1;for(var d=0,f=0;11>f;d++){var j=0;switch(c.charAt(d).charCodeAt(0)){case 32:f++;continue;case 43:case 49:j=1;break;case 45:j=-1}e[f]=j;b[f]=-j;f++}this.seitzMatrix.setA(e);this.seitzMatrixInv.setA(b)},"~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=N(-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=L(function(){this.translationCode="\x00";this.rotationShift12ths=this.rotationOrder=0;this.vectorShift12ths=null;E(this,arguments)},JS.HallInfo,"HallTranslation",null);Q(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,e=3;c<=JS.HallInfo.HallTranslation.nLatticeTypes;c++,e+=3)if(JS.HallInfo.HallTranslation.latticeTranslationData[e].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 e=JS.HallInfo.HallTranslation.getLatticeIndex(a);c||(e=-e);
return JS.HallInfo.HallTranslation.getLatticeDesignation(e)},"~S,~B");b.getLatticeExtension=d(b,"getLatticeExtension",function(a,c){for(var e=1,b=3;e<=JS.HallInfo.HallTranslation.nLatticeTypes;e++,b+=3)if(JS.HallInfo.HallTranslation.latticeTranslationData[b].charAt(0)==a)return JS.HallInfo.HallTranslation.latticeTranslationData[b+2]+(c?" -1":"");return""},"~S,~B");b.getHallTerms=d(b,"getHallTerms",function(){return null==JS.HallInfo.HallTranslation.hallTranslationTerms?JS.HallInfo.HallTranslation.hallTranslationTerms=
N(-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 e=null,b=JS.HallInfo.HallTranslation.getHallTerms().length;0<=--b;){var d=JS.HallInfo.HallTranslation.hallTranslationTerms[b];if(d.translationCode==a&&(0==d.rotationOrder||d.rotationOrder==c)){e=new JS.HallInfo.HallTranslation(a,null);e.translationCode=a;e.rotationShift12ths=
d.rotationShift12ths;e.vectorShift12ths=d.vectorShift12ths;break}}return e},"~S,~N");b.latticeTranslationData=N(-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=z(JS.HallInfo.HallTranslation.latticeTranslationData.length/3)-1;b.hallTranslationTerms=null;b=L(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;E(this,arguments)},JS.HallInfo,"HallRotationTerm",null);ia(b,function(){this.seitzMatrix12ths=new JU.M4});Q(b,function(a,c,e,b){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,f;switch((f=c.charAt(1)).charCodeAt(0)){case 120:case 121:case 122:switch(c.charAt(2).charCodeAt(0)){case 39:case 34:this.diagonalReferenceAxis=f,f=c.charAt(2),d++}case 42:this.axisType=f;break;case 39:case 34:this.axisType=f;switch(c.charAt(2).charCodeAt(0)){case 120:case 121:case 122:this.diagonalReferenceAxis=c.charAt(2);d++;break;default:this.diagonalReferenceAxis=b}break;default:this.axisType=1==this.order?"_":0==a.nRotations?"z":2==a.nRotations?"*":2==e||4==e?"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(e=c.length;d<e;d++)b=c.charAt(d),b=JS.HallInfo.HallTranslation.getHallTranslation(b,this.order),null!=b&&(this.translationString+=""+b.translationCode,this.translation.rotationShift12ths+=b.rotationShift12ths,this.translation.vectorShift12ths.add(b.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),e=JU.M4.newM4(null),a=a.vector12ths,
d.m03=a.x,d.m13=a.y,d.m23=a.z,e.m03=-a.x,e.m13=-a.y,e.m23=-a.z,this.seitzMatrix12ths.mul2(d,this.seitzMatrix12ths),this.seitzMatrix12ths.mul(e));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")});U("JS");da(["JU.M4","$.P3"],"JS.SymmetryOperation","java.util.Hashtable JU.Lst $.Matrix $.Measure $.P4 $.PT $.SB $.V3 JU.BoxInfo $.Logger $.Parser".split(" "),function(){var b=L(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.opIsCCW=this.opPlane=this.opAxis=
this.opPoint2=this.opPoint=this.opGlide=this.opTrans=null;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.opIsLong=!1;E(this,arguments)},JS,"SymmetryOperation",JU.M4);Q(b,function(a,c,e){ya(this,JS.SymmetryOperation,[]);this.doNormalize=e;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.setMatrix(!1),a.isFinalized||this.doFinalize())},"JS.SymmetryOperation,~N,~B");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.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 e=0;1<=a&&(e=u(a),a-=e);var b=Math.round(48*a);if(0!=JU.PT.approx(b/48-a,1E3))return""+JU.PT.approx(a,1E3);a=0==b%48?1:0==b%24?2:0==b%16?3:0==b%12?
4:0==b%8?6:0==b%6?8:0==b%4?12:0==b%3?16:0==b%2?24:48;return(c?"-":"")+(e*a+z(b*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,e=(this.rsvs=new JU.Matrix(null,c+1,c+1)).getArray(),b=Ha(c,0),d=0,f=0;f<
c;f++){for(var j=0;j<c;j++)e[f][j]=this.linearRotTrans[d++];b[f]=(a?-1:1)*this.linearRotTrans[d++]}e[c][c]=1;a&&(this.rsvs=this.rsvs.inverse());for(f=0;f<c;f++)e[f][c]=b[f];e=this.rsvs.getSubmatrix(0,0,3,3).getArray();for(f=0;3>f;f++)for(j=0;4>j;j++)this.setElement(f,j,3>j?e[f][j]:b[f]);this.setElement(3,3,1)},"~B");d(b,"doFinalize",function(){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 e=u(a);return 1*(e>>8)/(e&255)}return a/c},"~N,~N");b.finalizeD=d(b,"finalizeD",function(a,c){if(0==c){if(0==a)return 0;var e=z(a);return 1*(e>>8)/(e&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 e=new JU.SB,b=F(4,0),d=0;3>d;d++){a.getRow(d,b);e.append("[\t");for(var f=0;3>f;f++)e.appendI(u(b[f])).append("\t");f=b[3];0==
f?e.append("0"):(f*=f==u(f)?4:48,e.append(JS.SymmetryOperation.twelfthsOf(c?JS.SymmetryOperation.normalizeTwelfths(f/48,48,!0):u(f))));e.append("\t]\n")}return e.toString()},"JU.M4,~B");d(b,"setMatrixFromXYZ",function(a,c,e){if(null==a)return!1;this.xyzOriginal=a;this.divisor=JS.SymmetryOperation.setDivisor(a);a=a.toLowerCase();this.setModDim(c);var b=!1,d=!0;a.startsWith("!")&&(a.startsWith("!nohalf!")?(d=!1,this.xyzOriginal=a=a.substring(8)):(b=!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,b);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(b);this.isFinalized=!0;this.xyz=(this.isBio=0<=a.indexOf("bio"))?this.xyzOriginal=za(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;a.endsWith("m")?(this.timeReversal=0<=a.indexOf("-m")?-1:1,e=!0):0<=a.indexOf("mz)")&&(e=a.indexOf("("),c=a.substring(e+1,a.length-1),a=a.substring(0,e),e=!1);d=JS.SymmetryOperation.getMatrixFromString(this,a,this.linearRotTrans,e,d,!0);if(null==d)return!1;this.xyzCanonical=d;null!=c&&(e=1==JU.M4.newA16(this.linearRotTrans).determinant3(),this.timeReversal=0>a.indexOf("-x")==0>
c.indexOf("-mx")==e?1:-1);this.setMatrix(b);this.xyz=b?JS.SymmetryOperation.getXYZFromMatrix(this,!0,!1,!1):this.doNormalize?d:a;0!=this.timeReversal&&(this.xyz+=1==this.timeReversal?",m":",-m");JU.Logger.debugging&&JU.Logger.debug(""+this);return!0},"~S,~N,~B");b.setDivisor=d(b,"setDivisor",function(a){for(var c=a.indexOf("/"),e=a.length;0<c&&c<e-1;){var b=a.charAt(c+1);if(0>"2346".indexOf(b)||c<e-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):(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 e=0,b=0;this.myLabels=0==this.modDim?JS.SymmetryOperation.labelsXYZ:JS.SymmetryOperation.labelsXn;for(var d=0,f=3+this.modDim,
j=0;d<f;j++){if(Float.isNaN(this.linearRotTrans[j]))return!1;e=this.linearRotTrans[j];1E-5>Math.abs(e)&&(e=0);if(0==(j+1)%(f+1)){var h=0==this.divisor?u(e)&255:this.divisor;0==h&&(h=12);e=JS.SymmetryOperation.finalizeF(e,this.divisor);null!=a&&b<a.length&&(e+=a[b++]);e=JS.SymmetryOperation.normalizeTwelfths((0>e?-1:1)*Math.abs(e*h)/h,h,this.doNormalize);0==this.divisor&&(e=JS.SymmetryOperation.toDivisor(e,h));d++}this.linearRotTrans[j]=e}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,e){null==c&&(c=F(16,0));a=JS.SymmetryOperation.getMatrixFromString(null,a,c,!1,e,!0);if(null==a)return null;e=new JU.M4;e.setA(c);return JS.SymmetryOperation.div12(e,JS.SymmetryOperation.setDivisor(a))},"~S,~A,~B");b.getJmolCanonicalXYZ=d(b,"getJmolCanonicalXYZ",function(a){try{return JS.SymmetryOperation.getMatrixFromString(null,
a,null,!1,!0,!0)}catch(c){if(ba(c,Exception))return null;throw c;}},"~S");b.getMatrixFromString=d(b,"getMatrixFromString",function(a,c,e,b,d,f){var j=!1,h=!1,k=!1;c=JU.PT.rep(c,"[bio[","");var m=null==a?0:a.modDim,n=4+m,t=null==a?JS.SymmetryOperation.setDivisor(c):a.divisor,q=d&&(null==a?!c.startsWith("!"):a.doNormalize),p=0<m?3:0;if(null!=e){for(var r=e.length-1,s=r;0<=--s;)e[s]=0;e[r]=1}r=c.indexOf(";")+1;0!=r&&(b=!0,r==c.length&&(c+="0,0,0"));var z=-1;a=null==a||0==m?null:a.myLabels;null==a&&(a=
JS.SymmetryOperation.labelsXYZ);c=c.toLowerCase()+",";c=c.$replace("(",",");0<m&&(c=JS.SymmetryOperation.replaceXn(c,m+3));for(var v=0,w=0,C=0,F,x=0,B=0,D=0,E=1,O="",H=f?"":null,L=W(1,0),y=c.length,s=0;s<y;s++){switch((F=c.charAt(s)).charCodeAt(0)){case 59:break;case 39:case 32:case 123:case 125:case 33:continue;case 45:k=!0;continue;case 43:k=!1;continue;case 47:B=0;j=!0;continue;case 120:case 121:case 122:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:w=C*n;j="x"<=F?F.charCodeAt(0)-
120:F.charCodeAt(0)-97+p;v=w+j;k=k?-1:1;b&&0!=x?(null!=e&&(e[v]=x),k=u(x),x=0):null!=e&&(e[v]=k);null!=H&&(O+=JS.SymmetryOperation.plusMinus(O,k,a[j],!1));break;case 44:if(0!=r){if(0<r){z=s;s=r-1;r=-s;B=x=0;continue}r=s+1;s=z}x=JS.SymmetryOperation.normalizeTwelfths(x,0==B?12:0==t?B:t,q);null!=e&&(e[w+n-1]=0==t&&0<B?x=JS.SymmetryOperation.toDivisor(D,B):x);null!=H&&(O+=JS.SymmetryOperation.xyzFraction12(x,0==t?B:t,!1,d),H+=(""===H?"":",")+O);if(C==n-2)return f?H:"ok";B=D=x=0;O="";w+=4;if(2<C++&&0==
m)return JU.Logger.warn("Symmetry Operation? "+c),null;break;case 46:h=!0;E=1;continue;case 48:if(!h&&12==t&&(j||!b))continue;default:var K=F.charCodeAt(0)-48;if(0<=K&&9>=K){if(h){E/=10;0>x&&(k=!0);x+=E*K*(k?-1:1);continue}if(j){L[0]=s;B=JU.PT.parseIntNext(c,L);if(0>B)return null;s=L[0]-1;0==x?null!=e&&(e[v]/=B):(D=u(x),x/=B)}else x=10*x+(k?-1:1)*K}else JU.Logger.warn("symmetry character?"+F)}h=j=k=!1}return null},"JS.SymmetryOperation,~S,~A,~B,~B,~B");b.replaceXn=d(b,"replaceXn",function(a,c){for(var e=
c;0<=--e;)a=JU.PT.rep(a,JS.SymmetryOperation.labelsXn[e],JS.SymmetryOperation.labelsXnSub[e]);return a},"~S,~N");b.toDivisor=d(b,"toDivisor",function(a,c){var e=u(a);e!=a&&(e=a-e,c=u(Math.abs(c/e)),e=u(Math.abs(a)/e));return(e<<8)+c},"~N,~N");b.xyzFraction12=d(b,"xyzFraction12",function(a,c,e,b){if(0==a)return"";12!=c&&(a=u(a),c=a&255,a>>=8);var d=z(c/2);if(e)for(;0>a;)a+=c;else if(b){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 e=12,b=Math.round(a);if(0.01<Math.abs(b-a)){a/=12;for(e=3;20>e;e++){var d=a*e,b=Math.round(d);if(0.01>Math.abs(b-d))break}if(20==e)return c+a}else{if(12==b)return c+"1";if(12>b)return c+JS.SymmetryOperation.twelfths[b%12];switch(b%12){case 0:return c+z(b/12);case 2:case 10:e=6;break;case 3:case 9:e=4;break;case 4:case 8:e=3;break;case 6:e=2}b=z(b*e/12)}return c+b+"/"+e},"~N");b.plusMinus=d(b,"plusMinus",
function(a,c,e,b){var d=Math.abs(c);return(1E-4>d?"":(0>c?"-":0==a.length?"":"+")+(1.0001>=d&&0.9999<d?"":1>d&&b?JS.SymmetryOperation.twelfthsOf(12*d):""+u(d)))+e},"~S,~N,~S,~B");b.normalizeTwelfths=d(b,"normalizeTwelfths",function(a,c,e){a*=c;var b=z(c/2);if(e){for(;a>b;)a-=c;for(;a<=-b;)a+=c}return a},"~N,~N,~B");b.getXYZFromMatrix=d(b,"getXYZFromMatrix",function(a,c,e,b){return JS.SymmetryOperation.getXYZFromMatrixFrac(a,c,e,b,!1)},"JU.M4,~B,~B,~B");b.getXYZFromMatrixFrac=d(b,"getXYZFromMatrixFrac",
function(a,c,e,b,d){var f="",j=V(a,"JS.SymmetryOperation")?a:null;if(null!=j&&0<j.modDim)return JS.SymmetryOperation.getXYZFromRsVs(j.rsvs.getRotation(),j.rsvs.getTranslation(),c);var j=F(4,0),h=u(a.getElement(3,3));1==h?h=12:a.setElement(3,3,1);for(var k=0;3>k;k++){var m=3>k?0:3;a.getRow(k,j);for(var n="",t=0;3>t;t++){var q=j[t];0!=JS.SymmetryOperation.approx(q)&&(n+=JS.SymmetryOperation.plusMinus(n,q,JS.SymmetryOperation.labelsXYZ[t+m],d))}if(0!=(c?j[3]:JS.SymmetryOperation.approx(j[3])))m=JS.SymmetryOperation.xyzFraction12(c?
j[3]:j[3]*h,h,e,b),""===n&&(m="+"==m.charAt(0)?m.substring(1):m),n+=m;f+=","+(""===n?"0":n)}return f.substring(1)},"JU.M4,~B,~B,~B,~B");d(b,"rotateAxes",function(a,c,e,b){var d=Array(3);this.getRotationScale(b);for(var f=a.length;0<=--f;)e.setT(a[f]),c.toFractional(e,!0),b.rotate(e),c.toCartesian(e,!0),d[f]=JU.V3.newV(e);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,e){a=a.getArray();c=c.getArray();for(var b=a.length,d="",f=0;f<b;f++){for(var d=d+",",j=0;j<b;j++){var h=a[f][j];0!=h&&(d+=(0>h?"-":d.endsWith(",")?"":"+")+(1==Math.abs(h)?"":""+Math.abs(h))+"x"+(j+1))}d+=JS.SymmetryOperation.xyzFraction12(z(c[f][0]*(e?1:12)),12,!1,!0)}return JU.PT.rep(d.substring(1),
",+",",")},"JU.Matrix,JU.Matrix,~B");d(b,"toString",function(){return null==this.rsvs?za(this,JS.SymmetryOperation,"toString",[]):za(this,JS.SymmetryOperation,"toString",[])+" "+this.rsvs.toString()});d(b,"getMagneticOp",function(){return 2147483647==this.magOp?this.magOp=u(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.isFinalized||this.doFinalize();null==this.centering&&!this.unCentered&&(0==this.modDim&&1==this.m00&&1==this.m11&&1==this.m22&&0==this.m01&&0==this.m02&&0==this.m10&&0==this.m12&&0==this.m20&&0==this.m21&&(0!=this.m03||0!=this.m13||0!=this.m23)?(this.isCenteringOp=!0,this.centering=JU.V3.new3(this.m03,this.m13,this.m23)):(this.unCentered=!0,this.centering=null));return this.centering});d(b,"fixMagneticXYZ",function(a,c,e){if(0==this.timeReversal)return c;var b=c.indexOf("m"),
b=b-z((3-this.timeReversal)/2);c=0>b?c:c.substring(0,b);if(!e)return c+(0<this.timeReversal?" +1":" -1");a=JU.M4.newM4(a);a.m03=a.m13=a.m23=0;0>this.getMagneticOp()&&a.scale(-1);return c+="("+JU.PT.rep(JU.PT.rep(JU.PT.rep(JS.SymmetryOperation.getXYZFromMatrix(a,!1,!1,!1),"x","mx"),"y","my"),"z","mz")+")"},"JU.M4,~S,~B");d(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)),3.4028235E38!=this.magOp&&this.info.put("magOp",Float.$valueOf(this.magOp)),this.info.put("id",Integer.$valueOf(this.opId)),this.info.put("timeReversal",Integer.$valueOf(this.timeReversal)),null!=this.xyzOriginal&&
this.info.put("xyzOriginal",this.xyzOriginal));return this.info});b.normalizeOperationToCentroid=d(b,"normalizeOperationToCentroid",function(a,c,e,b,d){if(!(0>=d)){var f=0,j=0,h=0;null==JS.SymmetryOperation.atomTest&&(JS.SymmetryOperation.atomTest=new JU.P3);for(var k=b+d;b<k;b++)c.rotTrans2(e[b],JS.SymmetryOperation.atomTest),f+=JS.SymmetryOperation.atomTest.x,j+=JS.SymmetryOperation.atomTest.y,h+=JS.SymmetryOperation.atomTest.z;f/=d;j/=d;for(h/=d;-0.001>f||1.001<=f;)c.m03+=0>f?1:-1,f+=0>f?1:-1;
if(1<a)for(;-0.001>j||1.001<=j;)c.m13+=0>j?1:-1,j+=0>j?1:-1;if(2<a)for(;-0.001>h||1.001<=h;)c.m23+=0>h?1:-1,h+=0>h?1:-1}},"~N,JU.M4,~A,~N,~N");b.getLatticeCentering=d(b,"getLatticeCentering",function(a){for(var c=new JU.Lst,e=0;e<a.length;e++){var b=null==a[e]?null:a[e].getCentering();null!=b&&c.addLast(JU.P3.newP(b))}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,e=F(4,0),b=0;3>b;b++){a.getRow(b,e);for(var d=0;3>d;d++)switch(u(e[d])){case 1:c|=d+1<<(2-b<<3);break;case -1:c|=16+d+1<<(2-b<<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),e=0,b=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;e=2;break;default:e=c*a+3,5==e&&(e=6),0<a?(this.opType=2,b=z(180*Math.acos((c-1)/2)/3.141592653589793),120==b&&(null==this.opX&&(this.opX=
JS.SymmetryOperation.opGet3x(this)),d=this.opX)):2==e?this.opType=8:(this.opType=6,3==e&&(e=6),b=z(180*Math.acos((-c-1)/2)/3.141592653589793),120==b&&(null==this.opX&&(this.opX=JS.SymmetryOperation.opGet3x(this)),d=this.opX))}this.opOrder=e;var f=new JU.M4,a=new JU.P3,c=JU.P3.newP(d);f.setM4(this);for(var j=new JU.P3,h=JU.P3.newP(c),k=new JU.P3,m=JU.P3.newP(c),n=new JU.P3,t=1;t<e;t++)f.mul(this),this.rotTrans(a),this.rotTrans(c),1==t&&n.setT(c),j.add(a),h.add(c),6==this.opType&&(0==t%2?m.add(c):k.add(c));
this.opTrans=new JU.V3;f.getTranslation(this.opTrans);this.opTrans.scale(1/e);t=JS.SymmetryOperation.approx6(this.opTrans.length());this.opPoint=new JU.P3;var q=null,f=!0;switch(this.opType){case 4:h.add2(c,d);h.scale(0.5);this.opPoint=JU.P3.newP(JS.SymmetryOperation.opClean6(h));f=JS.SymmetryOperation.checkOpPoint(this.opPoint);break;case 6:k.scale(2/e);m.scale(2/e);q=JU.V3.newVsub(k,m);q.normalize();this.opAxis=JS.SymmetryOperation.opClean6(q);j.add2(k,m);h.scale(1/e);this.opPoint.setT(JS.SymmetryOperation.opClean6(h));
f=JS.SymmetryOperation.checkOpPoint(this.opPoint);180!=b&&(c.cross(d,c),this.opIsCCW=Boolean.$valueOf(0>c.dot(q)));break;case 2:q=JU.V3.newVsub(h,j);q.normalize();this.opAxis=JS.SymmetryOperation.opClean6(q);j.scale(1/e);a.setT(j);0<t&&j.sub(this.opTrans);this.opPoint.setT(j);JS.SymmetryOperation.opClean6(this.opPoint);180!=b&&(c.cross(d,c),this.opIsCCW=Boolean.$valueOf(0>c.dot(q)));if(f=(new Boolean(f&JS.SymmetryOperation.checkOpAxis(a,0==t?this.opAxis:this.opTrans,j,new JU.V3,new JU.V3,null))).valueOf())this.opPoint.setT(j),
JS.SymmetryOperation.checkOpAxis(this.opPoint,this.opAxis,c,new JU.V3,new JU.V3,this.opPoint)&&(this.opPoint2=JU.P3.newP(c)),0<t&&(j.scaleAdd2(0.5,this.opTrans,this.opPoint),f=JS.SymmetryOperation.checkOpPoint(j),null!=this.opPoint2&&(j.scaleAdd2(0.5,this.opTrans,this.opPoint2),JS.SymmetryOperation.checkOpPoint(j)||(this.opPoint2=null)),0>q.dot(a)&&(f=!1));break;case 8:a.sub(this.opTrans),a.scale(0.5),this.opPoint.setT(a),n.sub(this.opTrans),this.opAxis=JU.V3.newVsub(n,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),q=new JU.V3,f=JS.SymmetryOperation.checkOpPlane(this.opPoint,a,c,this.opPlane,q,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<t){JS.SymmetryOperation.opClean6(this.opTrans);
e=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()?(e=1.25,this.opIsLong=!0):e=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)f=!1}else 0==this.opTrans.z&&1.25==this.opTrans.lengthSquared()&&(e=1.25,this.opIsLong=!0);this.opType|=1;if(Math.abs(JS.SymmetryOperation.approx(this.opTrans.x))>=
e||Math.abs(JS.SymmetryOperation.approx(this.opTrans.y))>=e||Math.abs(JS.SymmetryOperation.approx(this.opTrans.z))>=e)f=!1}else this.opTrans=null;f||(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.isFinalized||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,e,b,d,f){null==JS.SymmetryOperation.opPlanes&&(JS.SymmetryOperation.opPlanes=JU.BoxInfo.getBoxFacesFromOABC(null));for(var j=JU.BoxInfo.faceOrder,h=null==f?1:-1,k=0;6>k;k++){var m=JU.Measure.getIntersection(a,c,JS.SymmetryOperation.opPlanes[j[k]],e,b,d);if(null!=m&&JS.SymmetryOperation.checkOpPoint(m)&&0>c.dot(b)*h&&(null==f||0<=
JS.SymmetryOperation.approx(f.distance(m)-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,e,b,d,f){JU.Measure.getPlaneThroughPoints(a,c,e,d,f,b);c=JU.BoxInfo.unitCubePoints;f=e=0;for(var j=8;0<=--j;){var h=JU.Measure.getPlaneProjection(c[j],b,a,d);switch(u(Math.signum(JS.SymmetryOperation.approx6(h)))){case 1:if(0<f)return!0;e++;break;case -1:if(0<e)return!0;f++}}return!(8==f||8==e)},"JU.P3,JU.P3,JU.P3,JU.P4,JU.V3,JU.V3");b.getAdditionalOperations=
d(b,"getAdditionalOperations",function(a,c){for(var e=a.length,b=new JU.Lst,d=new JU.SB,f=new java.util.Hashtable,j=new JU.V3,h=0;h<e;h++){var k=a[h];b.addLast(k);var m=k.getOpName(1);d.append(m).appendC(";");0!=(k.getOpType()&8)?JS.SymmetryOperation.addCoincidentMap(f,k,8,j):3==k.getOpType()&&JS.SymmetryOperation.addCoincidentMap(f,k,3,null)}for(h=1;h<e;h++)a[h].addOps(d,b,f,e,h,j,c);return b.toArray(Array(b.size()))},"~A,~N");d(b,"addOps",function(a,c,e,b,d,f,j){var h=new JU.V3;this.getTranslation(h);
var k=8==(this.getOpType()&8),m=3==this.getOpType(),n=new JU.V3,t=null,q=5,p=-2,r=5,s=-2,u=5,v=-2;switch(j){case 3:u=1;v=0;break;case 4:q=1;p=0;r=1;s=0;break;case 1:r=1,s=0,u=1,v=0}for(j=q;--j>=p;)for(q=r;--q>=s;)for(var w=u;--w>=v;)null==t&&(t=new JS.SymmetryOperation(null,0,!1)),n.set(j,q,w),!this.checkOpSimilar(n,f)&&t.opCheckAdd(this,h,b,n,a,c,d+1)&&(k?JS.SymmetryOperation.addCoincidentMap(e,t,8,f):m&&JS.SymmetryOperation.addCoincidentMap(e,t,3,null),t=null)},"JU.SB,JU.Lst,java.util.Map,~N,~N,JU.V3,~N");
b.addCoincidentMap=d(b,"addCoincidentMap",function(a,c,e,b){if(!c.isIrrelevant){var d=c.getOpName(0),f=a.get(d);c.iCoincident=0;e=3==e;if(null==f)a.put(d,f=new JU.Lst);else if(e){if(6==c.opOrder)for(a=f.size();0<=--a;)if(b=f.get(a),!b.isIrrelevant)switch(b.opOrder){case 3:b.isIrrelevant=!0}c.iCoincident=1}else{d=null;for(a=f.size();0<=--a;)if(d=f.get(a),null!=c.opGlide&&null!=d.opGlide){b.sub2(c.opGlide,d.opGlide);if(1E-6>b.lengthSquared()){c.isIrrelevant=!0;return}b.add2(c.opGlide,d.opGlide);if(1E-6>
b.lengthSquared()){c.isIrrelevant=!0;return}b.add2(c.opAxis,d.opAxis);if(1E-6>b.lengthSquared()){c.isIrrelevant=!0;return}}else if(null==c.opGlide&&null==d.opGlide){b.add2(c.opAxis,d.opAxis);if(1E-6>b.lengthSquared()){c.isIrrelevant=!0;return}b.sub2(c.opAxis,d.opAxis);if(1E-6>b.lengthSquared()){c.isIrrelevant=!0;return}}0==d.iCoincident?(c.iCoincident=1,d.iCoincident=-1):c.iCoincident=-d.iCoincident}f.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,e,b,d,f){this.setM4(a);a=JU.V3.newV(b);a.add(c);this.setTranslation(a);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);f.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,e=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 b=this.opTrans.length();if(null!=this.opIsCCW&&b<(1<b?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)+"."+e+"."});b.getGlideFromTrans=d(b,"getGlideFromTrans",function(a,c){var e=Math.abs(JS.SymmetryOperation.approx(12*a.x)),b=Math.abs(JS.SymmetryOperation.approx(12*a.y)),d=Math.abs(JS.SymmetryOperation.approx(12*a.z));9==e&&(e=3);9==b&&(b=3);9==d&&(d=3);var f=3;0==e&&f--;0==b&&f--;0==d&&f--;d=u(e+b+d);switch(f){default:case 1:return 0!=
e?"a":0!=b?"b":"c";case 2:switch(d){case 6:return"d";case 12:if(e=JU.P3.newP(c),e.normalize(),1==Math.abs(JS.SymmetryOperation.approx(e.x+e.y+e.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,e,b,d,f){a.rotTrans2(c,f);f.add3(e,b,d)},"JU.M4,JU.P3,~N,~N,~N,JU.P3");b.transformStr=d(b,"transformStr",function(a,c,e,b,d,f,j,h,k){null==e&&(e=JU.M4.newM4(c),e.invert());null==b&&(b=new JU.M4);
null==d&&(d=F(16,0));a=JS.SymmetryOperation.getMatrixFromXYZ(a,d,!0);null!=f&&a.add(f);b.setM4(e);b.mul(a);null!=c&&b.mul(c);null!=j&&a.add(j);if(h){b.getColumn(3,d);for(c=0;3>c;c++)d[c]=(10+d[c])%1;b.setColumnA(3,d)}return JS.SymmetryOperation.getXYZFromMatrixFrac(b,!1,!0,!1,k)},"~S,JU.M4,JU.M4,JU.M4,~A,JU.T3,JU.T3,~B,~B");b.stringToMatrix=d(b,"stringToMatrix",function(a){var c=JS.SymmetryOperation.setDivisor(a),e=F(16,0);JS.SymmetryOperation.getMatrixFromString(null,a,e,!0,!1,!1);return JS.SymmetryOperation.div12(JU.M4.newA16(e),
c)},"~S");b.getTransformABC=d(b,"getTransformABC",function(a,c){if(null==a)return"a,b,c";var e=JU.M4.newM4(a),b=new JU.V3;e.getTranslation(b);b.scale(-1);e.add(b);e.transpose();e=JS.SymmetryOperation.getXYZFromMatrixFrac(e,!1,!0,!1,!0).$replace("x","a").$replace("y","b").$replace("z","c");if(1E-12>b.lengthSquared())return e;b.scale(-1);return e+";"+(c?JS.SymmetryOperation.norm3(b):JS.SymmetryOperation.opF(b.x)+","+JS.SymmetryOperation.opF(b.y)+","+JS.SymmetryOperation.opF(b.z))},"~O,~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 e=JU.PT.split(a,",");c.set(JU.PT.parseFloatFraction(e[0]),JU.PT.parseFloatFraction(e[1]),JU.PT.parseFloatFraction(e[2]));
return c},"~S,JU.P3");b.atomTest=null;b.twelfths=N(-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=N(-1,["x","y","z"]);b.labelsXn=N(-1,"x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13".split(" "));b.labelsXnSub=N(-1,"xyzabcdefghij".split(""));b.x=JU.P3.new3(3.141592653589793,2.718281828459045,8.539734222673566);b.C3codes=W(-1,[200978,1184513,1245458,135953,1245442,131857,200962,1180417]);b.xneg=null;b.opPlanes=null});U("JS");da(null,"JS.SymmetryInfo",["JU.PT","JS.SpaceGroup",
"$.SymmetryOperation","JU.SimpleUnitCell"],function(){var b=L(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=this.sgDerived=this.intlTableTransform=this.intlTableIndexNdotM=this.strSUPERCELL=this.spaceGroupF2CParams=this.spaceGroupF2C=this.spaceGroupF2CTitle=
null;E(this,arguments)},JS,"SymmetryInfo",null);d(b,"setSymmetryInfoFromModelkit",function(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){this.spaceGroupIndex=a.remove("spaceGroupIndex").intValue();this.cellRange=a.remove("ML_unitCellRange");
this.sgName=a.get("spaceGroup");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");
var e=a.get("latticeType");this.latticeType=null==e?"P":e.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"));e=a.containsKey("symmetryCount")?
a.get("symmetryCount").intValue():0;this.setInfo(e);return c},"java.util.Map,~A");d(b,"setInfo",function(a){var c="Spacegroup: "+this.sgName;if(null!=this.symmetryOperations){for(var e="",b="\nNumber of symmetry operations: "+(0==a?1:a)+"\nSymmetry Operations:",d=0;d<a;d++){var f=this.symmetryOperations[d],b=b+("\n"+f.fixMagneticXYZ(f,f.xyz,!0));f.isCenteringOp&&(e+=" ("+JU.PT.rep(JU.PT.replaceAllCharacters(f.xyz,"xyz","0"),"0+","")+")")}0<e.length&&(c+="\nCentering: "+e);c=c+b+"\n"}this.infoStr=
c},"~N");d(b,"getAdditionalOperations",function(){null==this.additionalOperations&&null!=this.symmetryOperations&&(this.additionalOperations=JS.SymmetryOperation.getAdditionalOperations(this.symmetryOperations,7));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(),e=a.isSlab();a=c?"polymer":e?"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(0>a.indexOf("#")){var b=this.intlTableTransform,d=this.intlTableIndexNdotM;
!e&&(!c&&null!=d)&&(null!=b&&(c=a.indexOf(b),0<=c&&(a=JU.PT.rep(a,"("+b+")","")),0>d.indexOf(b)&&(c=d.indexOf("."),0<c&&(d=d.substring(0,c)),d+=":"+b)),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(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})});U("JS");da(["JU.P3","$.V3"],"JS.SymmetryDesc","java.util.Hashtable JU.A4 $.BS $.Lst $.M3 $.M4 $.Measure $.P4 $.PT $.Quat $.SB JS.T JS.SpaceGroup $.Symmetry $.SymmetryOperation JU.Escape $.Logger".split(" "),function(){var b=L(function(){this.drawID=this.modelSet=null;E(this,arguments)},JS,"SymmetryDesc",null);d(b,"set",function(a){this.modelSet=a;return this},"JM.ModelSet");b.getType=d(b,"getType",function(a){var c;if(null==a)return 1073742001;
if(a.equalsIgnoreCase("matrix"))return 12;if(a.equalsIgnoreCase("description"))return 1825200146;if(a.equalsIgnoreCase("axispoint"))return 134217751;if(a.equalsIgnoreCase("time"))return 268441089;if(a.equalsIgnoreCase("info"))return 1275068418;if(a.equalsIgnoreCase("element"))return 1086326789;if(a.equalsIgnoreCase("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 1073742078:return"";case 1153433601:return new JU.BS;default:return null}},"~N");b.getInfo=d(b,"getInfo",function(a,c){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:for(var e=new java.util.Hashtable,b=0,d=a.length;b<d;b++){var f=3==b?"draw":7==b?"axispoint":JS.SymmetryDesc.keys[b];null!=a[b]&&e.put(f,a[b])}return e;case 1073742001:return a[16]+"\t"+a[0]+"  \t"+a[2];case 1073741961:return a[0]+"  \t"+a[2];case 1145047049:return a[0];case 1145047053:return a[19];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 1073741854:return a[8];case 134217729:return a[9];case 12:return a[10];case 1814695966:return a[11];case 4160:return a[12];case 268441089:return a[13];case 134217750:return a[14];case 1140850696:return a[15];case 1073741974:return a[16];case 1086326789:return N(-1,[a[6],a[7],a[8],a[14],a[5]]);case 36868:return null!=a[6]?a[6]:null!=
a[8]?N(-1,[a[7],a[8],a[5]]):null!=a[5]?"none":null!=a[14]?a[14]:"identity"}},"~A,~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 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 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(22)}return c},"~N");d(b,"createInfoArray",function(a,c,e,b,d,f,j,h,k,m,n){a.isFinalized||a.doFinalize();var t=1==k.cardinality()&&k.get(10),q=-1==a.timeReversal;0==f&&(f=1);JS.SymmetryDesc.vtrans.set(0,0,0);var p=null,r=null==e||Float.isNaN(e.x)?c.getCartesianOffset():e;if(null!=b){JS.SymmetryDesc.pta01.setT(r);JS.SymmetryDesc.pta02.setT(b);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 s=JU.M4.newM4(a);s.add(JS.SymmetryDesc.vtrans);k.get(10)&&(null!=b&&r.equals(b))&&(s.m00=Math.round(s.m00),s.m01=Math.round(s.m01),s.m02=Math.round(s.m02),s.m03=Math.round(s.m03),s.m10=Math.round(s.m10),s.m11=Math.round(s.m11),s.m12=Math.round(s.m12),
s.m13=Math.round(s.m13),s.m20=Math.round(s.m20),s.m21=Math.round(s.m21),s.m22=Math.round(s.m22),s.m23=Math.round(s.m23));var F=0!=a.timeReversal;if(t&&!F){var v=JS.SymmetryDesc.getKeyType("matrix"),w=Array(-v);w[-1-v]=s;return w}var C=new JU.V3;JS.SymmetryDesc.pta01.set(1,0,0);JS.SymmetryDesc.pta02.set(0,1,0);var E=JU.P3.new3(0,0,1);JS.SymmetryDesc.pta01.add(r);JS.SymmetryDesc.pta02.add(r);E.add(r);var x=JS.SymmetryDesc.rotTransCart(a,c,r,JS.SymmetryDesc.vtrans),B=JS.SymmetryDesc.rotTransCart(a,c,
JS.SymmetryDesc.pta01,JS.SymmetryDesc.vtrans),D=JS.SymmetryDesc.rotTransCart(a,c,JS.SymmetryDesc.pta02,JS.SymmetryDesc.vtrans),L=JS.SymmetryDesc.rotTransCart(a,c,E,JS.SymmetryDesc.vtrans),O=JU.V3.newVsub(B,x),H=JU.V3.newVsub(D,x),N=JU.V3.newVsub(L,x);JS.SymmetryOperation.approx6Pt(JS.SymmetryDesc.vtrans);var y=new JU.V3;y.cross(O,H);var K=0>y.dot(N);K&&(B.sub2(x,O),D.sub2(x,H),L.sub2(x,N));var Q=JU.Quat.getQuaternionFrame(x,B,D).div(JU.Quat.getQuaternionFrame(r,JS.SymmetryDesc.pta01,JS.SymmetryDesc.pta02)),
W=JU.Quat.new4(Q.q1,Q.q2,Q.q3,Q.q0),U=JU.Measure.computeHelicalAxis(r,x,W),G=JU.P3.newP(U[0]),X=JU.P3.newP(U[1]),$=u(Math.abs(JU.PT.approx(U[3].x,1))),aa=JS.SymmetryOperation.approx(U[3].y);K&&(B.add2(x,O),D.add2(x,H),L.add2(x,N));var S=JU.V3.newVsub(x,r);0.1>S.length()&&(S=null);var ca=null,Y=null,M=null,T=null,P=0,da=0,ba=0==$,ia=!ba,pa=!1,ea=!1,ya=!ia&&!K;if(ia||K)S=null;var Na=c.getPeriodicity(),Oa=4==Na,Pa=m&&0==(Na&1),Ia=m&&0==(Na&2),Aa=m&&0==(Na&4),za=!(Pa||Ia||Aa),T=JU.V3.newVsub(r,E),ua=
Math.abs(X.dot(T)/T.length()/X.length());0.001>Math.abs(ua-1)?(Oa=!1,T=null):za=!Oa;if(K&&ba)Y=JU.P3.newP(r),Y.add(x),Y.scale(0.5),ca=x,pa=!0;else if(K){var ta=0==aa?new JU.V3:X,Ja=0;switch($){case 60:Ja=0.6666667;break;case 120:Ja=2;break;case 90:Ja=1;break;case 180:M=JU.P3.newP(r);M.add(ta);G.scaleAdd2(0.5,ta,r);0.1<M.distance(x)?(S=JU.V3.newVsub(x,M),C.setT(S),c.toFractional(C,!0)):S=null;y.setT(X);y.normalize();P=-y.x*G.x-y.y*G.y-y.z*G.z;p=JU.P4.new4(y.x,y.y,y.z,P);da=0.01>Math.abs(P)&&0.4<y.x*
y.y?1.3:1.05;K=ia=!1;ea=!0;if(Aa&&(T=JU.V3.newVsub(r,E),ua=Math.abs(X.dot(T)/T.length()/X.length()),Aa=0.001>ua))T.scale(0.5),c.toCartesian(T,!0);if(Ia){var ja=JU.V3.newVsub(r,JS.SymmetryDesc.pta02),ua=Oa?0:Math.abs(X.dot(ja)/ja.length()/X.length());if(Ia=0.001>ua)ja.scale(0.5),c.toCartesian(ja,!0),Aa?T.add(ja):T=ja}if(Pa&&(ja=JU.V3.newVsub(r,JS.SymmetryDesc.pta01),ua=Oa?0:Math.abs(X.dot(ja)/ja.length()/X.length()),Pa=0.001>ua))ja.scale(0.5),c.toCartesian(ja,!0),Ia||Aa?T.add(ja):T=ja;break;default:K=
!1}0!=Ja&&(y.sub2(r,G),y.add(x),y.sub(G),y.sub(ta),y.scale(Ja),G.add(y),Y=new JU.P3,Y.scaleAdd2(0.5,ta,G),ca=new JU.P3,ca.scaleAdd2(-2,Y,x),ca.scale(-1))}else null!=S&&(JS.SymmetryDesc.ptemp.setT(S),c.toFractional(JS.SymmetryDesc.ptemp,!1),C.setT(JS.SymmetryDesc.ptemp),c.toCartesian(JS.SymmetryDesc.ptemp,!1),S.setT(JS.SymmetryDesc.ptemp));var va=$;JS.SymmetryDesc.approx0(X);if(ia){var Z=new JU.P3;y.setT(X);var Za=$,Qa;K?(Z.setT(ca),Qa=ca):0==aa?(Qa=x,Z.setT(G)):(Qa=x,Z.scaleAdd2(0.5,y,G));JS.SymmetryDesc.ptemp.add2(G,
y);Za=Math.round(JU.Measure.computeTorsion(r,G,JS.SymmetryDesc.ptemp,Qa,!0));0!=JS.SymmetryOperation.approx(Za)&&($=Za,0>$&&($=360+$))}var ga=null,ra=null,wa=String.fromCharCode(0),Ea=a.isIrrelevant,qa=a.getOpOrder();a.isIrrelevant=(new Boolean(a.isIrrelevant|Ea)).valueOf();var na=a.getOpIsCCW(),ka=0,sa=0;if(k.get(2)||k.get(15)){ga=ra="identity";if(pa)JS.SymmetryDesc.ptemp.setT(Y),c.toFractional(JS.SymmetryDesc.ptemp,!1),ga="Ci: "+JS.SymmetryDesc.strCoord(JS.SymmetryDesc.ptemp,a.isBio),ra="inversion center";
else if(ia){var Ra="";null!=na&&(Ra=na===Boolean.TRUE?"(+)":"(-)",ka=na===Boolean.TRUE?1:-1,K&&-1==ka&&(Ea=!0));sa=z(360/va);K?ga=sa+"-bar"+Ra+" axis":0!=aa?(JS.SymmetryDesc.ptemp.setT(X),c.toFractional(JS.SymmetryDesc.ptemp,!1),ga=sa+Ra+" ("+JS.SymmetryDesc.strCoord(JS.SymmetryDesc.ptemp,a.isBio)+") screw axis"):(ga=sa+Ra+" axis",0==qa%2&&(ka*=z(qa/2)));ra=ga}else if(null!=S){var $a=" "+JS.SymmetryDesc.strCoord(C,a.isBio);ba?(ra=ga="translation",ga+=":"+$a):ea&&(m&&(JS.SymmetryDesc.fixGlideTrans(C),
S.setT(C),c.toCartesian(S,!0)),$a=" "+JS.SymmetryDesc.strCoord(C,a.isBio),wa=JS.SymmetryOperation.getGlideFromTrans(C,X),ra=ga=wa+"-glide plane",ga+="|translation:"+$a)}else ea&&(ra=ga="mirror plane");K&&!pa&&(JS.SymmetryDesc.ptemp.setT(Y),c.toFractional(JS.SymmetryDesc.ptemp,!1),ga+="|at "+JS.SymmetryDesc.strCoord(JS.SymmetryDesc.ptemp,a.isBio));q&&(ga+="|time-reversed",ra+=" (time-reversed)")}var ab=!0,Fa=ia&&!K&&0!=aa;Fa||(ka=0,ab=JS.SymmetryDesc.checkHandedness(c,X),ab||($=-$,0>$&&($=360+$),X.scale(-1)));
for(var Ba=!1,Sa=null;null!=d&&k.get(3);){if(0==a.getOpType()||n&&a.isIrrelevant){JU.Logger.debugging&&System.out.println("!!SD irrelevent "+a.getOpTitle()+a.getOpPoint());Sa="";break}var la=null;this.drawID='\ndraw ID "'+d;var I=new JU.SB;I.append(this.getDrawID("*")).append(" delete");m||(this.drawLine(I,"frame1X",0.15,r,JS.SymmetryDesc.pta01,"red"),this.drawLine(I,"frame1Y",0.15,r,JS.SymmetryDesc.pta02,"green"),this.drawLine(I,"frame1Z",0.15,r,E,"blue"));var ha,Ka=null,bb=0,xa=0.2>r.distance(x),
oa=m?"<hover>"+d+": "+a.xyz+"|"+ga+"</hover>":null;if(ia){ha=2==sa?"red":3==sa?"[xA00040]":4==sa?"[x800080]":"[x4000A0]";var va=$,Ga=1;y.setT(X);var Ta="";m&&(G.setT(a.getOpPoint()),c.toCartesian(G,!1));Z=new JU.P3;0!=aa&&!K?(la="screw",ha=na===Boolean.TRUE?"orange":na===Boolean.FALSE?"blue":4==qa?"lightgray":"grey",m||(this.drawLine(I,"rotLine1",0.1,r,G,"red"),JS.SymmetryDesc.ptemp.add2(G,y),this.drawLine(I,"rotLine2",0.1,x,JS.SymmetryDesc.ptemp,"red"),Z.scaleAdd2(0.5,y,G))):(Z.setT(G),ab||!xa&&
!m&&G.sub2(G,y),K?(la="bar",m?(y.normalize(),na===Boolean.TRUE&&y.scale(-1)):0==aa?(Z.setT(Y),y.scale(3*f),xa?(JS.SymmetryDesc.ptemp.scaleAdd2(0.25,y,G),G.scaleAdd2(-0.2,y,G),Z.scaleAdd2(0.31,y,Z),ha="cyan"):(JS.SymmetryDesc.ptemp.scaleAdd2(-1,y,G),this.drawLine(I,"rotLine1",0.1,r,Y,"red"),this.drawLine(I,"rotLine2",0.1,ca,Y,"red"))):xa||(Ga=r.distance(Z),this.drawLine(I,"rotLine1",0.1,r,Z,"red"),this.drawLine(I,"rotLine2",0.1,ca,Z,"red"))):(la="rot",y.scale(3*f),!xa&&!m&&(this.drawLine(I,"rotLine1",
0.1,r,Z,"red"),this.drawLine(I,"rotLine2",0.1,x,Z,"red")),Z.setT(G),0==aa&&xa&&Z.scaleAdd2(0.25,y,Z)));m||(180<va&&(va=180-va),JS.SymmetryDesc.ptemp.add2(Z,y),I.append(this.getDrawID("rotRotArrow")).append(" arrow width 0.1 scale "+JU.PT.escF(Ga)+" arc ").append(JU.Escape.eP(Z)).append(JU.Escape.eP(JS.SymmetryDesc.ptemp)),JS.SymmetryDesc.ptemp.setT(r),0.1>JS.SymmetryDesc.ptemp.distance(x)&&JS.SymmetryDesc.ptemp.set(Math.random(),Math.random(),Math.random()),I.append(JU.Escape.eP(JS.SymmetryDesc.ptemp)),
JS.SymmetryDesc.ptemp.set(0,va-5*Math.signum(va),0),I.append(JU.Escape.eP(JS.SymmetryDesc.ptemp)).append(" color red"));var Ua=0;!a.opIsLong&&(n&&0<aa&&!K)&&(Ba=(Ua=a.getOpTrans().length())>(2==qa?0.71:3==qa?0.578:0.51));Ba&&JU.Logger.debugging&&System.out.println("SD ignoring "+a.getOpTrans().length()+" "+a.getOpTitle()+a.xyz);var cb=null;if(0==aa&&!K){JS.SymmetryDesc.ptemp.scaleAdd2(0.5,y,G);G.scaleAdd2(m?-0.5:-0.45,y,G);if(n&&za&&null!=(cb=a.getOpPoint2()))Z.setT(cb),c.toCartesian(Z,!1),Z.scaleAdd2(-0.5,
y,Z);m&&this.scaleByOrder(y,qa,na)}else n&&0!=aa&&!K&&0.4<(ta=a.getOpTrans().length())?na!==Boolean.TRUE&&null!=na&&0.5==ta&&(Ba=!0):m&&K&&(this.scaleByOrder(y,qa,na),Ta="80");0<aa&&!K&&(Ta=""+(90-u(90*(y.length()/aa))));if(!Ba){if(0!=ka){switch(qa){case 4:0.49<Ua&&(ka=-2);break;case 6:0.49<Ua?ka=-3:0.33<Ua&&(ka*=2)}ha=0>ka?"blue":"orange"}var Ha=la+"_"+sa+"rotvector1";this.drawOrderVector(I,Ha,"vector","0.1"+Ta,G,sa,ka,K&&n,na===Boolean.TRUE,y,q?"gray":ha,oa,n);null!=cb&&this.drawOrderVector(I,Ha+
"2","vector","0.1"+Ta,Z,qa,ka,K,na===Boolean.TRUE,y,q?"gray":ha,oa,n)}}else if(ea){JS.SymmetryDesc.ptemp.sub2(M,r);!m&&0.2<r.distance(M)&&this.drawVector(I,"planeVector","vector","0.05",r,JS.SymmetryDesc.ptemp,q?"gray":"cyan",null);la="plane";if(null==S)ha="magenta";else{la="glide";switch(wa.charCodeAt(0)){case 97:ha="[x4080ff]";break;case 98:ha="blue";break;case 99:ha="cyan";break;case 110:ha="orange";break;case 100:ha="grey";break;default:ha="lightgreen"}m||(this.drawFrameLine("X",M,O,0.15,JS.SymmetryDesc.ptemp,
I,la,"red"),this.drawFrameLine("Y",M,H,0.15,JS.SymmetryDesc.ptemp,I,la,"green"),this.drawFrameLine("Z",M,N,0.15,JS.SymmetryDesc.ptemp,I,la,"blue"))}var db=c.getCanonicalCopy(da,!0);if(m&&(Pa||Ia||Aa))for(var R=8;0<=--R;)db[R].add(T);var La=this.modelSet.vwr.getTriangulator().intersectPlane(p,db,3);if(null!=La)for(var eb=m?a.iCoincident:0,Ka=new JU.P3,fb=R=0,Xa=La.size();R<Xa;R++){var Ca=La.get(R);I.append(this.getDrawID((null==S?"mirror_":wa+"_g")+"planep"+R)).append(JU.Escape.eP(Ca[0])).append(JU.Escape.eP(Ca[1]));
3==Ca.length?((0==eb||0==fb%2!=(1==eb))&&I.append(JU.Escape.eP(Ca[2])),fb++):(Ka.add(Ca[0]),Ka.add(Ca[1]),bb+=2);I.append(" color translucent ").append(ha);null!=oa&&I.append(" ").append(JU.PT.esc(oa))}if(null==La||0==La.size())n?Ba=!0:(JS.SymmetryDesc.ptemp.add2(G,X),I.append(this.getDrawID("planeCircle")).append(" scale 2.0 circle ").append(JU.Escape.eP(G)).append(JU.Escape.eP(JS.SymmetryDesc.ptemp)).append(" color translucent ").append(ha).append(" mesh fill"),null!=oa&&I.append(" ").append(JU.PT.esc(oa)))}K&&
(la="inv",pa?(I.append(this.getDrawID("inv_point")).append(" diameter 0.4 ").append(JU.Escape.eP(Y)),null!=oa&&I.append(" ").append(JU.PT.esc(oa)),JS.SymmetryDesc.ptemp.sub2(ca,r),m||this.drawVector(I,"Arrow","vector","0.05",r,JS.SymmetryDesc.ptemp,q?"gray":"cyan",null)):(4==qa&&(I.append(this.getDrawID("RotPoint")).append(" diameter 0.3 color red").append(JU.Escape.eP(Y)),null!=oa&&I.append(" ").append(JU.PT.esc(oa))),m||(I.append(" color cyan"),xa||(JS.SymmetryDesc.ptemp.sub2(x,ca),this.drawVector(I,
"Arrow","vector","0.05",ca,JS.SymmetryDesc.ptemp,q?"gray":"cyan",null)),1073742066!=j&&(y.setT(O),y.scale(-1),this.drawFrameLine("X",ca,y,0.15,JS.SymmetryDesc.ptemp,I,la,"red"),y.setT(H),y.scale(-1),this.drawFrameLine("Y",ca,y,0.15,JS.SymmetryDesc.ptemp,I,la,"green"),y.setT(N),y.scale(-1),this.drawFrameLine("Z",ca,y,0.15,JS.SymmetryDesc.ptemp,I,la,"blue")))));if(null!=S&&(ea&&m?null!=Ka&&(M=Ka,M.scale(1/bb),M.scaleAdd2(-0.5,S,M)):null==M&&(M=m?r:JU.P3.newP(r)),null!=M&&!Ba)){var gb="\x00"==wa,Va=
m&&!gb&&!ya;Va?(JS.SymmetryDesc.ptemp.scaleAdd2(0.5,S,M),JS.SymmetryDesc.vtrans.setT(S),JS.SymmetryDesc.vtrans.scale(0.5)):(JS.SymmetryDesc.ptemp.setT(M),JS.SymmetryDesc.vtrans.setT(S));ha=Va?"green":q&&!K&&!ea&&!ia?"darkGray":"gold";this.drawVector(I,(gb?"centering_":wa+"_g")+"trans_vector","vector",Va||ya?"0.1":"0.05",JS.SymmetryDesc.ptemp,JS.SymmetryDesc.vtrans,ha,oa);Va&&(JS.SymmetryDesc.vtrans.scale(-1),this.drawVector(I,wa+"_gtrans_vector2","vector","0.1",JS.SymmetryDesc.ptemp,JS.SymmetryDesc.vtrans,
ha,oa))}m||(JS.SymmetryDesc.ptemp2.setT(x),JS.SymmetryDesc.ptemp.sub2(B,x),JS.SymmetryDesc.ptemp.scaleAdd2(0.9,JS.SymmetryDesc.ptemp,JS.SymmetryDesc.ptemp2),this.drawLine(I,"frame2X",0.2,JS.SymmetryDesc.ptemp2,JS.SymmetryDesc.ptemp,"red"),JS.SymmetryDesc.ptemp.sub2(D,x),JS.SymmetryDesc.ptemp.scaleAdd2(0.9,JS.SymmetryDesc.ptemp,JS.SymmetryDesc.ptemp2),this.drawLine(I,"frame2Y",0.2,JS.SymmetryDesc.ptemp2,JS.SymmetryDesc.ptemp,"green"),JS.SymmetryDesc.ptemp.sub2(L,x),JS.SymmetryDesc.ptemp.scaleAdd2(0.9,
JS.SymmetryDesc.ptemp,JS.SymmetryDesc.ptemp2),this.drawLine(I,"frame2Z",0.2,JS.SymmetryDesc.ptemp2,JS.SymmetryDesc.ptemp,"purple"),I.append("\nsym_point = "+JU.Escape.eP(r)),I.append("\nvar p0 = "+JU.Escape.eP(JS.SymmetryDesc.ptemp2)),V(r,"JM.Atom")?(I.append("\nvar set2 = within(0.2,p0);if(!set2){set2 = within(0.2,p0.uxyz.xyz)}"),I.append("\n set2 &= {_"+r.getElementSymbol()+"}")):I.append("\nvar set2 = p0.uxyz"),I.append("\nsym_target = set2;if (set2) {"),!xa&&(1073742066!=j&&null==b&&!h)&&(I.append(this.getDrawID("offsetFrameX")).append(" diameter 0.20 @{set2.xyz} @{set2.xyz + ").append(JU.Escape.eP(O)).append("*0.9} color red"),
I.append(this.getDrawID("offsetFrameY")).append(" diameter 0.20 @{set2.xyz} @{set2.xyz + ").append(JU.Escape.eP(H)).append("*0.9} color green"),I.append(this.getDrawID("offsetFrameZ")).append(" diameter 0.20 @{set2.xyz} @{set2.xyz + ").append(JU.Escape.eP(N)).append("*0.9} color purple")),I.append("\n}\n"));Sa=I.toString();JU.Logger.debugging&&JU.Logger.info(Sa);I=null;break}null==S&&(C=null);Fa&&(S=JU.V3.newV(X),JS.SymmetryDesc.ptemp.setT(S),c.toFractional(JS.SymmetryDesc.ptemp,!1),C=JU.V3.newV(JS.SymmetryDesc.ptemp));
ea&&($=0);K?pa&&(C=S=X=G=null):ba&&(X=G=null);null!=X&&X.normalize();var Ma=null;if(k.get(0)||k.get(17))Ma=a.isBio?s.toString():0<a.modDim?a.xyzOriginal:JS.SymmetryOperation.getXYZFromMatrix(s,!1,!1,!1),F&&(Ma=a.fixMagneticXYZ(s,Ma,!0));for(var fa=Array(20),R=k.nextSetBit(0);0<=R;R=k.nextSetBit(R+1))switch(R){case 0:fa[R]=Ma;break;case 19:if(null!=e&&null==b&&!a.isBio&&0==a.modDim){var Wa;JS.SymmetryDesc.pta02.setT(e);c.toFractional(JS.SymmetryDesc.pta02,!0);s.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);s=JU.M4.newM4(a);s.add(JS.SymmetryDesc.vtrans);Wa=JS.SymmetryOperation.getXYZFromMatrix(s,!1,!1,!1);F&&(Wa=a.fixMagneticXYZ(s,Wa,!0));fa[R]=Wa}break;case 1:fa[R]=a.xyzOriginal;break;case 2:fa[R]=ga;break;case 3:fa[R]=Sa;break;case 4:fa[R]=JS.SymmetryDesc.approx0(C);break;case 5:fa[R]=JS.SymmetryDesc.approx0(S);break;case 6:fa[R]=JS.SymmetryDesc.approx0(Y);break;case 7:fa[R]=JS.SymmetryDesc.approx0(null!=
G&&k.get(22)?r:G);break;case 8:fa[R]=null==p?JS.SymmetryDesc.approx0(X):null;break;case 9:fa[R]=0!=$?Integer.$valueOf($):null;break;case 10:fa[R]=s;break;case 11:fa[R]=0<JS.SymmetryDesc.vtrans.lengthSquared()?JS.SymmetryDesc.vtrans:null;break;case 12:fa[R]=a.getCentering();break;case 13:fa[R]=Integer.$valueOf(a.timeReversal);break;case 14:null!=p&&k.get(22)&&(ta=JU.Measure.distanceToPlane(p,r),p.w-=ta);fa[R]=p;break;case 15:fa[R]=ra;break;case 16:fa[R]=Integer.$valueOf(a.number);break;case 17:var Da=
null;if(!a.isBio&&!Ma.equals(a.xyzOriginal)&&0<a.number){var hb=JS.SymmetryOperation.getMatrixFromXYZ(a.xyzOriginal,null,!1);hb.sub(s);Da=new JU.P3;hb.getTranslation(Da)}fa[R]=(0>a.number?0:a.number)+(null==Da?" [0 0 0]":" ["+u(-Da.x)+" "+u(-Da.y)+" "+u(-Da.z)+"]");break;case 18:fa[R]=a.xyzCanonical}return fa},"JS.SymmetryOperation,J.api.SymmetryInterface,JU.P3,JU.P3,~S,~N,~N,~B,JU.BS,~B,~B");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,e){a.scale(1+0.3/c+(null==e?0:e===Boolean.TRUE?0.02:-0.02))},"JU.V3,~N,Boolean");b.checkHandedness=d(b,"checkHandedness",function(a,c){var e,b,d;JS.SymmetryDesc.ptemp.set(1,0,0);a.toCartesian(JS.SymmetryDesc.ptemp,!1);e=JS.SymmetryDesc.approx0d(JS.SymmetryDesc.ptemp.dot(c));JS.SymmetryDesc.ptemp.set(0,
1,0);a.toCartesian(JS.SymmetryDesc.ptemp,!1);b=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==e?0==b?0<d:0<b:0==d?0<e:0==b?0<d:0<e*b*d},"J.api.SymmetryInterface,JU.P3");d(b,"drawLine",function(a,c,e,b,d,f){a.append(this.getDrawID(c)).append(" diameter ").appendD(e).append(JU.Escape.eP(b)).append(JU.Escape.eP(d)).append(" color ").append(f)},"JU.SB,~S,~N,JU.P3,JU.P3,~S");
d(b,"drawFrameLine",function(a,c,e,b,d,f,j,h){d.setT(c);d.add(e);this.drawLine(f,j+"Pt"+a,b,c,d,"translucent "+h)},"~S,JU.P3,JU.V3,~N,JU.P3,JU.SB,~S,~S");d(b,"drawVector",function(a,c,e,b,d,f,j,h){e.equals("vline")&&(JS.SymmetryDesc.ptemp2.add2(d,f),e="",f=JS.SymmetryDesc.ptemp2);a.append(this.getDrawID(c)).append(" diameter ").append(b+" ").append(e).append(JU.Escape.eP(d)).append(JU.Escape.eP(f)).append(" color ").append(j);null!=h&&a.append(' "'+h+'"')},"JU.SB,~S,~S,~S,JU.T3,JU.T3,~S,~S");d(b,
"drawOrderVector",function(a,c,b,g,d,f,j,h,k,m,n,t,q){this.drawVector(a,c,b,g,d,m,n,t);if(!(2==f||h&&!k)){b=JS.SymmetryDesc.getPolygon(f,!h?0:k?1:-1,h,d,m);g=b[0];a.append(this.getDrawID(c+"_key")).append(" POLYGON ").appendI(g.size());k=0;for(t=g.size();k<t;k++)a.appendO(g.get(k));a.append(" color ").append(n);if(0!=j&&q){b=JS.SymmetryDesc.getPolygon(f,j,h,d,m);a.append(this.getDrawID(c+"_key2"));g=b[0];a.append(" POLYGON ").appendI(g.size());k=0;for(t=g.size();k<t;k++)a.appendO(g.get(k));g=b[1];
a.appendI(g.size());k=0;for(t=g.size();k<t;k++)a.appendO(JU.PT.toJSON(null,g.get(k)));a.append(" color ").append(n)}}},"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,g,d){var f=b?0.6:0.4,j=new JU.Lst,h=new JU.Lst,k=JU.V3.newV(d);k.scale(0);k.add(g);var m=JU.V3.new3(0,0,1),n=new JU.V3;g=new JU.M3;n.cross(m,d);0.01>n.length()?g.m00=g.m11=g.m22=1:(n.normalize(),d=m.angle(d),g.setAA(JU.A4.newVA(n,d)));d=6.283185307179586/a*(0>c?-1:1);for(var n=new JU.V3,
t=null,q=m=0,p=0,r=0==c?a:a+1;p<r;p++){var s=new JU.P3;s.x=Math.cos(d*p)*f;s.y=Math.sin(d*p)*f;g.rotate(s);s.add(k);p<a&&j.addLast(s);if(!b&&0!=c&&0==p%c&&null!=t){n.sub2(s,t);var t=p<a?q++:0,u=JU.P3.newP(s);u.scaleAdd2(1,s,u);u.scaleAdd2(-1,k,u);j.addLast(u);h.addLast(W(-1,[m,q++,t,0]));m=t}else m=q++;t=s}return N(-1,[j,h])},"~N,~N,~B,JU.P3,JU.V3");b.rotTransCart=d(b,"rotTransCart",function(a,c,b,g){b=JU.P3.newP(b);c.toFractional(b,!1);a.rotTrans(b);b.add(g);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,g,d,f,j,h,k,m,n,t,q,p){var r=0,s=JS.SymmetryDesc.nullReturn(m);switch(m){case 1073741994:return""+
b.getLatticeType();case 1073742001:r=1825200146;break;case 135176:r=135176;break;case 1275068418:switch(r=JS.SymmetryDesc.getType(k),r){case 1153433601:case 1073741961:case 1073742001:case 134217751:case 1086326789:case 36868:m=r;break;default:r=JS.SymmetryDesc.getKeyType(k)}}var u=JS.SymmetryDesc.getInfoBS(r),v=-2==t,w=d,C=d,z=1073742066==q&&(1153433601==m||134217751==m)?h:null;null!=z&&(h=null);var x=w=null,B=null;if(null==h){if(null==g){B=v?b.getAdditionalOperations():b.getSymmetryOperations();
if(null==B||Math.abs(d)>B.length||0==d)return s;w=Math.abs(d)-1;g=null==f?B[w].xyz:B[w].getxyzTrans(f);x=B[w].xyzOriginal}else w=d=0;var D=new JS.Symmetry;D.setSpaceGroup(!1);var F=null!=b&&b.isBio();h=F?D.addBioMoleculeOperation(b.getSpaceGroup().finalOperations[w],0>d):D.addSpaceGroupOperation((0>d?"!":"=")+g,Math.abs(d));if(0>h)return s;var E=D.getSpaceGroupOperation(h);p&&(E.iCoincident=B[w].iCoincident);v&&(E.isIrrelevant=B[w].isIrrelevant);null!=x&&(E.xyzOriginal=x);E.number=0==d?C:d;F||E.getCentering();
null==j&&0<=c&&(j=this.modelSet.at[c]);if(134217751==m||1153433601==m){if(F||null==j)return s;D.setUnitCell(b);JS.SymmetryDesc.ptemp.setT(j);b.toFractional(JS.SymmetryDesc.ptemp,!1);if(Float.isNaN(JS.SymmetryDesc.ptemp.x))return s;r=new JU.P3;D.newSpaceGroupPoint(JS.SymmetryDesc.ptemp,h,null,0,0,0,r);1073742066==q&&(b.unitize(r),r.add(z));D.toCartesian(r,!1);return 1153433601==m?this.getAtom(b,a,c,r):r}w=this.createInfoArray(E,b,j,null,null==k?"sym":k,n,q,null!=f,u,p,v);1275068418==m&&null!=k&&(r=
JS.SymmetryDesc.getKeyType(k))}else{v="info";z=!1;switch(m){case 1275068418:r=JS.SymmetryDesc.getKeyType(k);k=v=null;0==t&&(t=-1);break;case 1073742001:k=v=null;0==t&&(t=-1);z=!0;u.set(21);u.set(0);u.set(19);break;case 135176:null==k&&(k=p?"sg":"sym");v="all";z=!0;break;case 1153433601:k=v=null;default:0==t&&(t=1)}q=this.getSymopInfoForPoints(b,a,d,f,j,h,k,v,n,t,q,u);if(z)return q;if("string"==typeof q)return s;w=q;if(1153433601==m)return!V(j,"JM.Atom")&&!V(h,"JM.Atom")&&(c=-1),null==w?s:this.getAtom(b,
a,c,w[7])}if(null==w)return s;a=0<w.length&&V(w[0],Array);if(0>t&&0>=d&&null==g&&(1275068418==m||a)){1275068418==m&&(0<w.length&&!V(w[0],Array))&&(w=N(-1,[w]));a=new JU.Lst;for(h=0;h<w.length;h++)a.addLast(JS.SymmetryDesc.getInfo(w[h],0>r?r:m));return a}if(0>r&&(0<=t||0<d||null!=g))m=r;0<t&&a&&(w=w[0]);135176==m&&(p&&-2==t)&&(m=134217764);return JS.SymmetryDesc.getInfo(w,m)},"~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,g){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,g,b,c);null!=d&&b.and(d);b.isEmpty()&&(g=JU.P3.newP(g),a.toUnitCell(g,null),a.toCartesian(g,!1),this.modelSet.getAtomsWithin(0.02,g,b,c),null!=d&&b.and(d));return b},"J.api.SymmetryInterface,~N,~N,JU.T3");d(b,"getSymopInfoForPoints",function(a,c,b,g,d,f,j,h,k,m,n,p){g=p.get(21)||p.get(3)&&3==p.cardinality();p.clear(21);var q=g?"":null;f=this.getSpaceGroupInfo(a,
c,null,b,d,f,j,k,m,!1,!0,n,null,p);if(null==f)return q;a=f.get("operations");if(null==a)return q;c=g?new JU.SB:null;b--;d=!g&&0>b;f=f.get("symmetryInfo");m="label".equals(h);for(k=h=0;k<a.length;k++)if(!(null==a[k]||0<=b&&b!=k))if(g){if(null!=j)return a[k][3]+"\nprint "+JU.PT.esc(f);0<c.length()&&c.appendC("\n");m||(0>b&&c.appendI(k+1).appendC("\t"),c.append(a[k][0]).appendC("\t"));c.append(a[k][2])}else{if(!d)return a[k];a[h++]=a[k]}if(!g){b=Array(h);for(k=0;k<h;k++)b[k]=a[k];return b}return 0==
c.length()?null!=j?'draw ID "'+j+'*" delete':q: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,g,d,f,j,h,k,m,n,p){0==h&&(h=JS.SymmetryDesc.getType(j));var q=1153433601==h?new JU.BS:"",u=0<=a?this.modelSet.at[a].mi:this.modelSet.vwr.am.cmi;if(0>u)return q;var r=this.modelSet.am[u].biosymmetry;if(null==r&&null==(r=this.modelSet.getUnitCell(u)))r=(new JS.Symmetry).setUnitCellFromParams(null,
!1,NaN);if(135176!=h||2147483647!=b&&null==p)return this.getSymmetryInfo(u,a,r,c,b,g,d,f,j,h,k,m,n,!1);if(null==r)return q;h="";b=null==c&&(0>m&&null==p)&&-2==m?r.getAdditionalOperations():r.getSymmetryOperations();if(null!=b)if(null==j&&(j="sg"),q=b.length,null!=d&&null==f||null!=p){null==p&&(p=r.getInvariantSymops(d,null));for(var q=p.length,s=0;s<q;s++)0<m&&m!=s+1||(b=p[s],h+=this.getSymmetryInfo(u,a,r,c,b,g,d,f,j+b,135176,k,m,n,null==d))}else for(b=1;b<=q;b++)h+=this.getSymmetryInfo(u,a,r,c,b,
g,d,f,j+b,135176,k,m,n,!0);return h},"~N,~S,~N,JU.P3,JU.P3,JU.P3,~S,~N,~N,~N,~N,~A");d(b,"getSpaceGroupInfo",function(a,c,b,d,l,f,j,h,k,m,n,p,q,u){null==u&&(u=new JU.BS,u.setBits(0,JS.SymmetryDesc.keys.length),u.clear(19));var r=1==u.cardinality()&&u.get(10),s=null,z=!r&&null==l&&null==j&&0>=k&&u.cardinality()>=JS.SymmetryDesc.keys.length,v=!1,w=null,C=null!=b&&0<b.length,F=C&&0<=b.indexOf("[--]");if(n||!C){var x=z&&0==d;if(r)q=a;else{0>c&&(c=V(l,"JM.Atom")?l.mi:this.modelSet.vwr.am.cmi);if(0>c)w=
"no single current model";else if(null==q&&!(v=null!=(q=this.modelSet.am[c].biosymmetry))&&null==(q=this.modelSet.getUnitCell(c)))w="not applicable";null!=w?(s=new java.util.Hashtable,s.put("spaceGroupInfo",""),s.put("spaceGroupNote",w),s.put("symmetryInfo","")):z&&(s=this.modelSet.getInfo(c,"spaceGroupInfo"));if(null!=s)return s;System.out.println(q.getSpaceGroupClegId());b=q.getSpaceGroupName()}var s=new java.util.Hashtable,w=q.getSymmetryOperations(),B=v?q.spaceGroup:null,z=F?"":null,D=0;if(null!=
w){r||(v?a.setSpaceGroupTo(JS.SpaceGroup.getNull(!1,!1,!1)):a.setSpaceGroup(!1));0!=w[0].timeReversal&&(a.getSpaceGroupOperation(0).timeReversal=1);for(var E=Array(w.length),O="",H=null==j||null==l||null==f&&0>k?0:1,L=0;H<w.length&&L!=k;H++){var y=w[H],K=y.xyzOriginal,N;if(r)N=H;else{N=!(0==H&&0<=y.xyz.indexOf("x4"))&&null!=a.getSpaceGroupOperation(H)?H:v?a.addBioMoleculeOperation(B.finalOperations[H],!1):a.addSpaceGroupOperation("="+y.xyz,H+1);if(0>N)continue;y=a.getSpaceGroupOperation(H);if(null==
y)continue;y.xyzOriginal=K}null!=z&&(z+=";"+y.xyz);y=0<d&&d-1!=N?null:this.createInfoArray(y,q,l,f,j,h,p,!1,u,!1,!1);if(null!=y&&(L++,!(0<k&&L!=k)&&(E[H]=y,r||(O+="\n"+(H+1)+(null!=j&&1==L?"*":"")+"\t"+y[u.get(19)?19:0]+"\t  "+y[2]),D++,0<d)))break}s.put("operations",E);r||s.put("symmetryInfo",0==O.length?"":O.substring(1))}if(r)return s;w=0==D?"\n no symmetry operations":0>=k&&0>=d?"\n"+D+" symmetry operation"+(1==D?":\n":"s:\n"):"";null!=z&&(b=z.substring(z.indexOf(";")+1));x&&this.modelSet.setInfo(c,
"spaceGroupInfo",s)}else s=new java.util.Hashtable;s.put("spaceGroupName",b);s.put("spaceGroupNote",null==w?"":w);if(v)a=b;else if(C&&!F&&a.setSpaceGroupName(b),a=a.getSpaceGroupInfoObj(b,null==q?null:q.getUnitCellParams(),m,!n),null==a||a.equals("?"))a="?",s.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"');s.put("spaceGroupInfo",a);return s},"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,d,l){JS.SymmetryDesc.pta02.setT(d);JS.SymmetryDesc.vtrans.setT(JS.SymmetryDesc.pta02);a.unitize(JS.SymmetryDesc.pta02);d=3.4028235E38;for(var f=-1,j=0,h=c.length;j<h;j++){var k=c[j];JS.SymmetryDesc.pta01.setT(b);k.rotTrans(JS.SymmetryDesc.pta01);JS.SymmetryDesc.ptemp.setT(JS.SymmetryDesc.pta01);a.unitize(JS.SymmetryDesc.pta01);var m=JS.SymmetryDesc.pta01.distanceSquared(JS.SymmetryDesc.pta02);if(1.96E-6>m){JS.SymmetryDesc.vtrans.sub(JS.SymmetryDesc.ptemp);JS.SymmetryOperation.normalize12ths(JS.SymmetryDesc.vtrans);
k=JU.M4.newM4(k);k.add(JS.SymmetryDesc.vtrans);JS.SymmetryDesc.pta01.setT(b);k.rotTrans(JS.SymmetryDesc.pta01);a.unitize(JS.SymmetryDesc.pta01);m=JS.SymmetryDesc.pta01.distanceSquared(JS.SymmetryDesc.pta02);if(1.96E-6<=m)continue;return k}m<d&&(d=m,f=j)}l&&(k=c[f],JS.SymmetryDesc.pta01.setT(b),k.rotTrans(JS.SymmetryDesc.pta01),a.unitize(JS.SymmetryDesc.pta01));return null},"JS.UnitCell,~A,JU.P3,JU.P3,~B");b.keys=N(-1,["xyz","xyzOriginal","label",null,"fractionalTranslation","cartesianTranslation",
"inversionCenter",null,"axisVector","rotationAngle","matrix","unitTranslation","centeringVector","timeReversal","plane","_type","id","cif2","xyzCanonical","xyzNormalized"]);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});U("JS");da(["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".split(" "),function(){var b=L(function(){this.moreInfo=null;
this.name="";this.fractionalOffset=this.vertices=null;this.allFractionalRelative=!1;this.f2c=this.unitCellMultiplied=this.unitCellMultiplier=this.cartesianOffset=null;E(this,arguments)},JS,"UnitCell",JU.SimpleUnitCell,Cloneable);ia(b,function(){this.cartesianOffset=new JU.P3});b.fromOABC=d(b,"fromOABC",function(a,c){var b=new JS.UnitCell;3==a.length&&(a=N(-1,[new JU.P3,a[0],a[1],a[2]]));var d=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(d);b.allFractionalRelative=
c;b.initUnitcellVertices();b.setCartesianOffset(a[0]);return b},"~A,~B");b.fromParams=d(b,"fromParams",function(a,c,b){var d=new JS.UnitCell;d.init(a);d.initUnitcellVertices();d.allFractionalRelative=c;d.setPrecision(b);26<a.length&&(a[26]=b);return d},"~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,"checkDistance",function(a,c,b,d,l,f,j,h){a=JU.P3.newP(a);this.toCartesian(a,
!0);for(var k=-l;k<=l;k++)for(var m=-f;m<=f;m++)for(var n=-j;n<=j;n++){h.set(c.x+k,c.y+m,c.z+n);this.toCartesian(h,!0);var p=a.distance(h);if(0<d?Math.abs(p-b)<=d:p<=b&&0.1<p)return h.set(k,m,n),!0}return!1},"JU.P3,JU.P3,~N,~N,~N,~N,~N,JU.P3");d(b,"checkPeriodic",function(a){switch(this.dimension){case 3:if(a.z<-this.slop||a.z>1-this.slop)return!1;case 2:if(a.y<-this.slop||a.y>1-this.slop)return!1;case 1:if(a.x<-this.slop||a.x>1-this.slop)return!1}return!0},"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,"getEquivPoints",function(a,c,b,d,l,f,j,h){var k=0<=c.indexOf("fromfractional"),m=0<=c.indexOf("tofractional");c=0<=c.indexOf("packed");null==d&&(d=new JU.Lst);a=JU.P3.newP(a);k||this.toFractional(a,!0);var k=d.size(),n=0!=(h&1),p=0!=(h&2);h=0!=(h&4);for(var q=0,u=b.length;q<u;q++){var r=JU.P3.newP(a);b[q].rotTrans(r);n&&(r.x=this.fixFloor(r.x-z(Math.floor(r.x))));
p&&(r.y=this.fixFloor(r.y-z(Math.floor(r.y))));h&&(r.z=this.fixFloor(r.z-z(Math.floor(r.z))));d.addLast(r);k++}if(c){if(!h){b=JU.P3.new3(0,0,0.5);for(q=f;q<k;q++)d.get(q).add(b)}if(!p){b=JU.P3.new3(0,0.5,0);for(q=f;q<k;q++)d.get(q).add(b)}if(!n){b=JU.P3.new3(0.5,0,0);for(q=f;q<k;q++)d.get(q).add(b)}for(q=f;q<k;q++)a.setT(d.get(q)),this.unitizeRnd(a),0==a.x&&(d.addLast(JU.P3.new3(0,a.y,a.z)),d.addLast(JU.P3.new3(1,a.y,a.z)),0==a.y&&(d.addLast(JU.P3.new3(1,1,a.z)),d.addLast(JU.P3.new3(0,0,a.z)),0==
a.z&&(d.addLast(JU.P3.new3(1,1,1)),d.addLast(JU.P3.new3(0,0,0))))),0==a.y&&(d.addLast(JU.P3.new3(a.x,0,a.z)),d.addLast(JU.P3.new3(a.x,1,a.z)),0==a.z&&(d.addLast(JU.P3.new3(a.x,0,0)),d.addLast(JU.P3.new3(a.x,1,1)))),0==a.z&&(d.addLast(JU.P3.new3(a.x,a.y,0)),d.addLast(JU.P3.new3(a.x,a.y,1)),0==a.x&&(d.addLast(JU.P3.new3(0,a.y,0)),d.addLast(JU.P3.new3(1,a.y,1))));k=d.size();if(!n){b=JU.P3.new3(-0.5,0,0);for(q=f;q<k;q++)d.get(q).add(b)}if(!p){k=d.size();b=JU.P3.new3(0,-0.5,0);for(q=f;q<k;q++)d.get(q).add(b)}if(!h){k=
d.size();b=JU.P3.new3(0,0,-0.5);for(q=f;q<k;q++)d.get(q).add(b)}}JS.UnitCell.removeDuplicates(d,l,j,-1);if(!m)for(q=d.size();--q>=f;)this.toCartesian(d.get(q),!0);return d},"JU.P3,~S,~A,JU.Lst,~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();a=new java.util.Hashtable;a.put("params",this.unitCellParams);a.put("oabc",this.getUnitCellVectors());a.put("volume",Double.$valueOf(this.volume));
a.put("matFtoC",this.matrixFractionalToCartesian);a.put("matCtoF",this.matrixCartesianToFractional);return a});d(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]),d=JU.V3.newVsub(this.vertices[1],this.vertices[0]),l=new JU.P3,f=new JU.P3,j="-"==a.charAt(0)?-1:1;0>j&&(a=a.substring(1));var h=a;a=JU.PT.rep(JU.PT.rep(JU.PT.rep(JU.PT.rep(JU.PT.rep(JU.PT.rep(a,"ab","A"),"bc","B"),"ca","C"),"ba","D"),"cb","E"),
"ac","F");var k=(h=!h.equals(a))?1:0;2==a.length&&(k=a.charAt(1).charCodeAt(0)-48,a=a.substring(0,1));var m=0==k%2;switch("abcABCDEF".indexOf(a)){case 7:j=-j;case 4:c.cross(d,b),k=(5-k)%4+1;default:a=c;c=d;break;case 8:j=-j;case 5:j=-j,b.cross(d,c),k=(2+k)%4+1;case 1:a=b;b=d;j=-j;break;case 3:j=-j;case 6:d.cross(c,b),m&&(k=6-k);case 2:a=d,!h&&0<k&&(k=5-k)}0<k&&0<j!=m&&(c=b,a.scale(-1));switch(k){case 2:a.scale(-1);c.scale(-1);break;case 3:c.scale(-1);break;case 4:a.scale(-1)}l.cross(a,c);f.cross(l,
a);return JU.Quat.getQuaternionFrame(null,f,l).inv()},"~S");d(b,"getScaledCell",function(a){return this.getScaledCellMult(null,a)},"~B");d(b,"getScaledCellMult",function(a,c){var b=Array(8),d=null,l=null,f=null!=a;f||(a=this.unitCellMultiplier);c&&(null!=a&&0==a.z)&&(d=new JU.P3,l=new JU.P3,JU.SimpleUnitCell.ijkToPoint3f(u(a.x),d,0,0),JU.SimpleUnitCell.ijkToPoint3f(u(a.y),l,0,0),l.sub(d));for(var j=f||null==a||0==a.z?1:Math.abs(a.z),h=0;8>h;h++){var k=b[h]=JU.P3.newP(JU.BoxInfo.unitCubePoints[h]);
null!=d?b[h].add3(d.x+l.x*k.x,d.y+l.y*k.y,d.z+l.z*k.z):f&&k.scaleT(a);b[h].scale(j);this.matrixFractionalToCartesian.rotTrans(k);c||k.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 d=c[7],l=F(-1,[d,d,d]);return b.setFromEigenVectors(JS.UnitCell.unitVectors,l,"iso","Uiso="+d,null)}b.parBorU=c;var d=Ha(6,0),f=u(c[6]);if(12==f)d[0]=19.739208802178716*c[0],d[1]=19.739208802178716*c[1],d[2]=19.739208802178716*c[2],d[3]=39.47841760435743*c[3],d[4]=39.47841760435743*c[4],d[5]=39.47841760435743*c[5],c[7]=(c[0]+c[1]+c[3])/3;else{var l=4==f||5==f||8==f||9==f,j=2-f%2,h=8==f||9==f||10==f?19.739208802178716:
4==f||5==f?0.25:2==f||3==f?Math.log(2):1,f=c[0]*h*(l?this.a_*this.a_:1),k=c[1]*h*(l?this.b_*this.b_:1),m=c[2]*h*(l?this.c_*this.c_:1),n=c[3]*h*(l?this.a_*this.b_:1)*j,p=c[4]*h*(l?this.a_*this.c_:1)*j,l=c[5]*h*(l?this.b_*this.c_:1)*j;c[7]=Math.pow(f/19.739208802178716/this.a_/this.a_*k/19.739208802178716/this.b_/this.b_*m/19.739208802178716/this.c_/this.c_,0.3333);d[0]=this.a*this.a*f+this.b*this.b*this.cosGamma*this.cosGamma*k+this.c*this.c*this.cosBeta*this.cosBeta*m+this.a*this.b*this.cosGamma*
n+this.b*this.c*this.cosGamma*this.cosBeta*l+this.a*this.c*this.cosBeta*p;d[1]=this.b*this.b*this.sinGamma*this.sinGamma*k+this.c*this.c*this.cA_*this.cA_*m+this.b*this.c*this.cA_*this.sinGamma*l;d[2]=this.c*this.c*this.cB_*this.cB_*m;d[3]=2*this.b*this.b*this.cosGamma*this.sinGamma*k+2*this.c*this.c*this.cA_*this.cosBeta*m+this.a*this.b*this.sinGamma*n+this.b*this.c*(this.cA_*this.cosGamma+this.sinGamma*this.cosBeta)*l+this.a*this.c*this.cA_*p;d[4]=2*this.c*this.c*this.cB_*this.cosBeta*m+this.b*
this.c*this.cosGamma*l+this.a*this.c*this.cB_*p;d[5]=2*this.c*this.c*this.cA_*this.cB_*m+this.b*this.c*this.cB_*this.sinGamma*l}return b.setFromThermalEquation(d,JU.Escape.eAF(c))},"JV.Viewer,~A");d(b,"getUnitCellMultiplied",function(){if(null==this.unitCellMultiplier||0<this.unitCellMultiplier.z&&this.unitCellMultiplier.z==u(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 N(-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,a,c);return c},"~S,JU.M4");b.getMatrixAndUnitCell=d(b,"getMatrixAndUnitCell",function(a,c,b){null==c&&(c="a,b,c");var d,l=Array(4),f=l[0]=JU.P3.new3(0,0,0);l[1]=JU.P3.new3(1,0,0);l[2]=JU.P3.new3(0,1,0);l[3]=JU.P3.new3(0,0,1);var j=new JU.M3;if(JU.AU.isAD(c))return JU.SimpleUnitCell.setAbcFromParams(c,l);if("string"==typeof c){var h,k=null;if(0==c.indexOf("a="))return JU.SimpleUnitCell.setAbc(c,
null,l);if(0<c.indexOf(">")){if(null!=a||null==b)return null;a=c.$plit(">");b.setIdentity();f=new JU.M4;for(d=a.length;0<=--d;)JS.UnitCell.getMatrixAndUnitCell(null,a[d],f),b.mul2(f,b);return l}d=Array(1);var m=c.indexOf(";");0<=m?(h=c.substring(m+1).trim(),c=c.substring(0,m),d[0]=c,k=JS.UnitCell.fixABC(d),c!==d[0]&&(c=d[0])):c.equals("a,b,c")?h=null:(d[0]=c,h=JS.UnitCell.fixABC(d),c=d[0]);for(c+=";0,0,0";c.startsWith("!!");)c=c.substring(2);(m=c.startsWith("!"))&&(c=c.substring(1));c.equals("r;0,0,0")?
c="2/3a+1/3b+1/3c,-1/3a+1/3b+1/3c,-1/3a-2/3b+1/3c"+c.substring(1):c.equals("h;0,0,0")&&(c="a-b,b-c,a+b+c"+c.substring(1));var n=new JS.Symmetry;n.setSpaceGroup(!1);d=n.addSpaceGroupOperation("="+c,0);if(0>d)return null;d=n.getSpaceGroupOperation(d);d.doFinalize();n=new JU.P3;JS.UnitCell.addTrans(h,n);JS.UnitCell.addTrans(k,n);d.setTranslation(n);0<=c.indexOf("c")&&d.transpose33();m&&d.invert();null!=b&&b.setM4(d);if(null==a)return l}else{if(null!=b||null==a)return null;if(V(c,"JU.M3"))d=JU.M4.newMV(c,
new JU.P3);else if(V(c,"JU.M4"))d=c;else{d=c[0];d.getRotationScale(j);d.rotTrans(f);a.toCartesian(f,!1);for(d=1;4>d;d++)j.rotate(l[d]),a.toCartesian(l[d],!0);return l}}d.getRotationScale(j);d.getTranslation(f);a.toCartesian(f,!1);for(d=1;4>d;d++)j.rotate(l[d]),a.toCartesian(l[d],!0);return l},"JU.SimpleUnitCell,~O,JU.M4");b.addTrans=d(b,"addTrans",function(a,c){if(null!=a){var b=JU.PT.split(a,","),d=F(3,0);if(3==b.length)for(var l=0;3>l;l++){var f=b[l],j=f.indexOf("/");d[l]=0<=j?JU.PT.parseFloat(f.substring(0,
j))/JU.PT.parseFloat(f.substring(j+1)):JU.PT.parseFloat(f)}c.add3(d[0],d[1],d[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="",d="",l=!1,f=0;3>f;f++){var j=c[f],h,k=0;for(h=j.length;0<=--h;){var m=j.charAt(h);switch(m.charCodeAt(0)){default:"a"<=m&&(h=0);break;case 43:k=1;case 45:h=-h}}h=-1-h;0==h?(b+=",0",d+=","+j):(l=!0,b+=","+j.substring(h+k),d+=","+j.substring(0,h))}a[0]=d.substring(1);return l?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 d=0;4>d;d++)if(!JU.SimpleUnitCell.approx0(c[b][d]-a[b][d]))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,"isWithinUnitCell",function(a,c,b,d){switch(this.dimension){case 3:if(d.z<b-1-this.slop||d.z>b+this.slop)return!1;case 2:if(d.y<c-1-this.slop||d.y>c+this.slop)return!1;case 1:if(d.x<a-1-this.slop||d.x>a+this.slop)return!1}return!0},"~N,~N,~N,JU.P3");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=V(a,"JU.T4")?a:null,b=null==c?1.4E-45:c.w,d=999999<b;if(null!=c?0>=b||d:100<=a.x||100<=a.y)if(this.unitCellMultiplier=0==a.z&&a.x==a.y&&!d?null:d?JU.P4.newPt(c):JU.P3.newP(a),this.unitCellMultiplied=null,null==c||0==c.w||d)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,d){var l=b.length-3,f=null;if("r"==c||null==d){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:f=JS.UnitCell.getPrimitiveTransform(c)}a||f.invert()}else f=JU.M3.newM3(d),a&&f.invert();for(a=b.length;--a>=l;)c=b[a],this.toFractional(c,!0),f.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,d){for(0>d&&(d=a.size());c<d;c++)for(var l=a.get(c),f=Math.max(c+1,b);f<d;f++)1.96E-6>a.get(f).distanceSquared(l)&&
(a.removeItemAt(f),d--,f--)},"JU.Lst,~N,~N,~N");d(b,"getCenter",function(a){var c=new JU.P3,b=this.getCartesianOffset(),d=this.getVertices(),l;switch(a){default:case 7:a=8;l=1;break;case 3:a=8;l=2;break;case 4:a=2;l=1;break;case 1:a=8,l=4}for(var f=0,j=0;j<a;j+=l)c.add(d[j]),c.add(b),f++;c.scale(1/f);return c},"~N");b.unitVectors=N(-1,[JV.JC.axisX,JV.JC.axisY,JV.JC.axisZ])});U("JS");da(["J.api.AtomIndexIterator"],"JS.UnitCellIterator","JU.Lst $.P3 $.P3i JU.BoxInfo $.Logger $.Point3fi".split(" "),
function(){var b=L(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;E(this,arguments)},JS,"UnitCellIterator",null,J.api.AtomIndexIterator);d(b,"set",function(a,c,b,d,l){this.unitCell=a;this.atoms=b;this.addAtoms(d);this.p=new JU.P3;0<l&&this.setCenter(c,l);return this},"J.api.SymmetryInterface,JM.Atom,~A,JU.BS,~N");
p(b,"setModel",function(){},"JM.ModelSet,~N,~N,~N,JU.T3,~N,J.atomdata.RadiusData");p(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,d=JU.P3.new3(3.4028235E38,3.4028235E38,3.4028235E38),l=JU.P3.new3(-3.4028235E38,-3.4028235E38,-3.4028235E38);this.p=new JU.P3;var f=new JU.P3;f.setT(a);this.unitCell.toFractional(f,!0);for(f=0;8>f;f++)this.p.scaleAdd2(-2,b[f],b[7]),this.p.scaleAdd2(c,this.p,a),this.unitCell.toFractional(this.p,
!0),d.x>this.p.x&&(d.x=this.p.x),l.x<this.p.x&&(l.x=this.p.x),d.y>this.p.y&&(d.y=this.p.y),l.y<this.p.y&&(l.y=this.p.y),d.z>this.p.z&&(d.z=this.p.z),l.z<this.p.z&&(l.z=this.p.z);this.minXYZ=JU.P3i.new3(z(Math.floor(d.x)),z(Math.floor(d.y)),z(Math.floor(d.z)));this.maxXYZ=JU.P3i.new3(z(Math.ceil(l.x)),z(Math.ceil(l.y)),z(Math.ceil(l.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");p(b,"addAtoms",function(a){this.done=null==a;if(!this.done){this.unitList=new JU.Lst;for(var c="",b=this.unitCell.getSymmetryOperations(),d=b.length,l=a.nextSetBit(0);0<=l;l=a.nextSetBit(l+1))for(var f=this.atoms[l],j=0;j<d;j++){var h=new JU.P3;h.setT(f);0<j?(this.unitCell.toFractional(h,!1),b[j].rotTrans(h),this.unitCell.unitize(h),this.unitCell.toCartesian(h,!1)):this.unitCell.toUnitCell(h,null);var k="_"+u(100*h.x)+"_"+u(100*h.y)+"_"+u(100*h.z)+"_";0<=c.indexOf(k)||
(c+=k,this.unitList.addLast(N(-1,[f,h])))}this.nAtoms=this.unitList.size();this.done=0==this.nAtoms;JU.Logger.debugging&&JU.Logger.info("UnitCellIterator "+this.nAtoms+" unique points found")}},"JU.BS");p(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});p(b,"next",function(){return this.done||0>this.ipt?-1:this.getAtom().i});d(b,"getAtom",function(){return this.unitList.get(this.listPt)[0]});p(b,"foundDistance2",function(){return 0<this.nFound?this.distance2:
3.4028235E38});p(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=new JU.Point3fi;c.setT(this.p);c.i=a.i;c.sD=a.getElementNumber();return c});p(b,"release",function(){this.translation=this.center=this.atoms=null})});U("JS");da(["java.util.Hashtable","JU.P3","$.V3"],"JS.WyckoffFinder","JU.Lst $.M4 $.Measure $.P4 $.PT $.SB JS.SpaceGroup $.Symmetry $.SymmetryOperation".split(" "),
function(){var b=L(function(){this.positions=null;this.ncent=this.npos=0;this.gpos=this.centeringStr=this.centerings=null;E(this,arguments)},JS,"WyckoffFinder",null);Q(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 d=a.get(b);this.centeringStr[b]=
d;this.centerings[b]=JS.SymmetryOperation.toPoint(d,null)}}}},"java.util.Map");d(b,"getWyckoffFinder",function(a,b){var d=b.getClegId(),l=b.specialPrefix+d,f=JS.WyckoffFinder.helpers.get(l);if(null!=f)return f;f=JS.WyckoffFinder.createHelper(a,d,b.groupType);null==f?(null==JS.WyckoffFinder.nullHelper&&(JS.WyckoffFinder.nullHelper=new JS.WyckoffFinder(null)),JS.WyckoffFinder.helpers.put(l,JS.WyckoffFinder.nullHelper)):JS.WyckoffFinder.helpers.put(l,f);return f},"JV.Viewer,JS.SpaceGroup");d(b,"findPositionFor",
function(a,b){if(null!=this.positions)for(var d=b.equals("G"),l=d?1:this.npos;0<=--l;){var f=this.positions.get(l),j=f.get("label");if(d||j.equals(b))return d=f.get("coord"),null!=d&&JS.WyckoffFinder.getWyckoffCoord(d,0,j).project(a),a}return null},"JU.P3,~S");d(b,"getInfo",function(a,b,d,l,f){a=this.createInfo(a,b,d,l,f);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,d,l){switch(d){case 83:return this.getCenteringStr(-1,
" ",null).toString().trim();case 67:l=Array(this.centerings.length);for(var f=l.length;0<=--f;)l[f]=this.centerings[f];return l;case 42:var j=new JU.SB;this.getCenteringStr(-1,"+",j);for(f=this.npos;0<=--f;){var h=this.positions.get(f),k=(l?""+h.get("mult"):"")+h.get("label");j.appendC("\n").append(k);JS.WyckoffFinder.getList(0==f?this.gpos:h.get("coord"),k,j,0==f?this.ncent:0)}return j.toString();case -4:l=Array(this.npos);for(f=0;f<this.npos;f++)h=this.positions.get(f),l[f]=this.findPositionFor(JU.P3.newP(b),
h.get("label")),a.toCartesian(l[f],!1);return N(-1,[l,"AlB C D FeF GaHeI GeK LiMgN OsP CaRhS T U V W XeYbZnAm"]);case -1:case -2:case -3:for(f=this.npos;0<=--f;){h=this.positions.get(f);k=(l?""+h.get("mult"):"")+h.get("label");if(0==f)switch(d){case -1:return k;case -2:return"(x,y,z)";case -3:return a=new JU.SB,a.append(k).appendC(" "),this.getCenteringStr(-1,"+",a).appendC(" "),JS.WyckoffFinder.getList(this.gpos,k,a,this.ncent),a.toString()}for(var j=h.get("coord"),h=0,m=j.size();h<m;h++){var n=
JS.WyckoffFinder.getWyckoffCoord(j,h,k);if(n.contains(this,a,b))switch(d){case -1:return k;case -2:return n.asString(null,!0).toString();case -3:return a=new JU.SB,a.append(k).appendC(" "),this.getCenteringStr(-1,"+",a).appendC(" "),JS.WyckoffFinder.getList(j,k,a,0),a.toString()}}}break;default:m=""+String.fromCharCode(d);j=71==d;b=new JU.P3;for(f=j?1:this.npos;0<=--f;)if(h=this.positions.get(f),k=h.get("label"),j||k.equals(m)){a=new JU.SB;j&&a.append(k).appendC(" ");j=0==f?this.gpos:h.get("coord");
JS.WyckoffFinder.getList(j,(l?h.get("mult"):"")+m,a,0);if(0<f&&0<this.ncent){f=new JU.M4;for(l=0;l<this.ncent;l++)this.addCentering(j,this.centerings[l],f,b,a)}return a.toString()}}return null},"JS.UnitCell,JU.P3,~N,~B,~B");b.createHelper=d(b,"createHelper",function(a,b,d){var l=JS.SpaceGroup.getGroupTypePrefix(d)+b,f=b.indexOf(":"),f=JU.PT.parseInt(0>f?b:b.substring(0,f));if(!JS.SpaceGroup.isInRange(f,d,!1,!1))return null;d=JS.Symmetry.getITJSONResource(a,d,f,null);if(null==d)return null;d=d.get("its");
for(var j=null,h=!1,k=0,m=d.size();k<m;k++)if(j=d.get(k),l.equals(j.get("clegId"))){h=!0;break}if(!h||j.containsKey("more"))j=JS.SpaceGroup.fillMoreData(a,h?j:null,b,f,d.get(0));return new JS.WyckoffFinder(j)},"JV.Viewer,~S,~N");d(b,"getCenteringStr",function(a,b,d){null==d&&(d=new JU.SB);if(0==this.ncent)return d;if(0<=a)return d.appendC(b),JS.WyckoffFinder.wrap(this.centeringStr[a],d);for(a=0;a<this.ncent;a++)d.appendC(b),JS.WyckoffFinder.wrap(this.centeringStr[a],d);return d},"~N,~S,JU.SB");b.getList=
d(b,"getList",function(a,b,d,l){null==d&&(d=new JU.SB);l=0==l?a.size():z(a.size()/(l+1));for(var f=0;f<l;f++){var j=JS.WyckoffFinder.getWyckoffCoord(a,f,b);d.append(" ");j.asString(d,!1)}return d},"JU.Lst,~S,JU.SB,~N");d(b,"addCentering",function(a,b,d,l,f){for(var j=a.size(),h=0;h<j;h++){var k=a.get(h);f.append(" ");k.asStringCentered(b,d,l,f)}},"JU.Lst,JU.P3,JU.M4,JU.P3,JU.SB");b.getWyckoffCoord=d(b,"getWyckoffCoord",function(a,b,d){var l=a.get(b);"string"==typeof l&&a.set(b,l=new JS.WyckoffFinder.WyckoffCoord(l,
d));return l},"JU.Lst,~N,~S");var a=L(function(){this.type=0;this.label=this.xyz=null;this.thisCentering="";this.plane=this.line=this.point=this.op=null;E(this,arguments)},JS.WyckoffFinder,"WyckoffCoord",null);Q(a,function(a,b){this.xyz=a;this.label=b;this.create(a)},"~S,~S");d(a,"asStringCentered",function(a,b,d,l){b.setM4(this.op);b.add(a);b.getTranslation(d);d.x%=1;d.y%=1;d.z%=1;b.setTranslation(d);l.appendC(" ");a=","+JS.SymmetryOperation.getXYZFromMatrixFrac(b,!1,!0,!1,!0)+",";a=JU.PT.rep(a,
",,",",0,");a=JU.PT.rep(a,",+",",");l.appendC("(").append(a.substring(1,a.length-1)).appendC(")")},"JU.P3,JU.M4,JU.P3,JU.SB");d(a,"contains",function(a,b,d){var l=b.getPrecision();this.thisCentering=null;if(this.checkLatticePt(d,l))return!0;if(null==a.centerings)return!1;for(var f=a.centerings.length;0<=--f;)if(JS.WyckoffFinder.WyckoffCoord.pc.add2(d,a.centerings[f]),b.unitize(JS.WyckoffFinder.WyckoffCoord.pc),this.checkLatticePt(JS.WyckoffFinder.WyckoffCoord.pc,l))return this.thisCentering=a.centeringStr[f],
!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 d=62,l=-2;3>l;l++)for(var f=-2;3>f;f++)for(var j=-2;3>j;j++,d--)if(0!=d&&(JS.WyckoffFinder.WyckoffCoord.p3.set(l,f,j),JS.WyckoffFinder.WyckoffCoord.p3.add(a),this.checkPoint(JS.WyckoffFinder.WyckoffCoord.p3,b)))return System.out.println(this.label+" "+this.xyz+" found for "+l+" "+f+" "+j),!0;return!1},"JU.P3,~N");d(a,"checkPoint",function(a,
b){var d=1;switch(this.type){case 1:d=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);d=JS.WyckoffFinder.WyckoffCoord.p1.distance(a);break;case 3:d=Math.abs(JU.Measure.getPlaneProjection(a,this.plane,JS.WyckoffFinder.WyckoffCoord.vt,JS.WyckoffFinder.WyckoffCoord.vt))}return d<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),d=F(16,0),l=JU.PT.split(this.xyz,",");JS.WyckoffFinder.WyckoffCoord.getRow(l[0],d,0);JS.WyckoffFinder.WyckoffCoord.getRow(l[1],d,4);JS.WyckoffFinder.WyckoffCoord.getRow(l[2],d,8);d[15]=1;this.op=JU.M4.newA16(d);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,d){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 l=JU.PT.split(a,"+"),f=l.length;0<=--f;)if(a=l[f],0!=a.length){var j=3;if(0<=a.indexOf("."))a=
JU.PT.parseFloat(a),b[d+j]=a;else{var h=0,k=1;switch(a.charAt(0).charCodeAt(0)){case 45:k=-1;case 42:h++}for(var m=0,n=a.length,p=0;--n>=h;){var q=a.charAt(n);switch(q.charCodeAt(0)){case 120:j=0;m=1;break;case 121:m=j=1;break;case 122:j=2;m=1;break;case 47:p=1,m=1/m;case 42:k*=m;m=0;break;default:q="0123456789".indexOf(q),0>q&&System.err.println("WH ????"),0==m?m=q:(p=0==p?10:10*p,m+=p*q)}}b[d+j]=k*m}}},"~S,~A,~N");p(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});U("JS");da(["JU.M4"],"JS.CLEG","java.util.Arrays JU.AU $.BS $.P3 $.PT JS.SV JS.SpaceGroup $.UnitCell JV.Viewer".split(" "),function(){var b=Ea(JS,"CLEG",null);b.standardizeTokens=d(b,"standardizeTokens",function(a,b){for(var d=a.length;0<=--d;){var l=a[d];if(0!=l.length){l=JS.CLEG.cleanCleg000(l);if(l.endsWith(":h"))l.startsWith("R")||(l=l.substring(0,l.length-2));else if(b||!l.endsWith(":2/3a+1/3b+1/3c,-1/3a+1/3b+1/3c,-1/3a-2/3b+1/3c"))l.endsWith(":r")?
l.startsWith("R")||(l=l.substring(0,l.length-1)+"2/3a+1/3b+1/3c,-1/3a+1/3b+1/3c,-1/3a-2/3b+1/3c"):l.equals("r")?l="2/3a+1/3b+1/3c,-1/3a+1/3b+1/3c,-1/3a-2/3b+1/3c":l.equals("h")&&(l="a-b,b-c,a+b+c");a[d]=l}}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(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 l=0;l<a.length;l++){var f=a[l].trim();if(0!=f.length){var j=JS.SpaceGroup.getExplicitSpecialGroupType(f);0<j&&(f=f.substring(2));var h=f.indexOf(":"),k=f.indexOf(",",h+1),m=f.indexOf("."),n=0<h&&k>h,p=f.indexOf("]"),p=0<p&&"["==f.charAt(0)&&(0>h||h==p+1)?1:JU.PT.parseFloatStrict(0<h?f.substring(0,h):f);if(Float.isNaN(p)){if(0<m||n)return!1}else if(!JS.SpaceGroup.isInRange(p,
j,!n,d&&0==j))return!1;if(!(0>k)&&(f=0<h?f.substring(h+1):f,0==b.convertTransform(f,null).determinant3()))return!1}}return!0},"~A,J.api.SymmetryInterface,~B");b.isCalcType=d(b,"isCalcType",function(a){return 0==a.length||a.equals("sub")||a.equals("super")},"~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){0>b.indexOf(">")&&(b=">>"+b);var d=JU.PT.split(b,">");0==d[0].length&&(d[0]="ref");var l=new JS.CLEG.ClegData(a.getSymTemp(),d),f=JS.CLEG.assignSpaceGroup(l,new JS.CLEG.AssignedSGParams(a));if(0<f.indexOf("!"))return System.err.println(f),null;System.out.println("Modelkit transform: "+JU.PT.join(d,">",0));b=l.abcFor(l.trMat);System.out.println("Modelkit transform: "+d[0]+">"+b+">"+d[d.length-1]);return l.trMat},"JV.Viewer,~S");d(b,
"transformSpaceGroup",function(a,b,d,l,f){var j=a.getCurrentUnitCell(),h=a.getOperativeSymmetry();null!=j&&h!==j&&h.getUnitCell(j.getV0abc(null,null),!1,"modelkit");0<=d.indexOf("<")&&(d=JU.PT.rep(d,"<<",">super>").$replace("<",">"));if(0==d.length||d.endsWith(">"))d+=".";j=new JS.CLEG.ClegData(a.getSymTemp(),JU.PT.split(d,">"));a=new JS.CLEG.AssignedSGParams(a,h,b,l,0,!1,f,d.equals("."));b=JS.CLEG.assignSpaceGroup(j,a);if(b.endsWith("!"))return b;a.mkIsAssign&&f.append(b);return b},"JV.Viewer,JU.BS,~S,~O,JU.SB");
b.assignSpaceGroup=d(b,"assignSpaceGroup",function(a,b){var d=b.vwr,l=b.mkIndex,f=a.tokens,j=0>l;j&&(l=0);if(l>=f.length)return"invalid CLEG expression!";var h=null!=b.mkParamsOrUC;if(1<f.length&&h)return"invalid syntax - can't mix transformations and UNITCELL option!";0==l&&!j&&JS.CLEG.standardizeTokens(f,!1);var k=f.length>l+1&&JS.CLEG.isTransformOnly(f[l+1])&&0<f[l+1].length,m=f[l].trim(),n=m.equals(".");if(0==l){if(0==m.length){if(null==b.mkSym00)return"no starting space group for CLEG!";if(!b.mkIsAssign)return f[0]=
b.mkSym00.getSpaceGroupClegId(),b.mkIndex=1,b.mkWasNode=!0,b.mkIgnoreAllSettings=k,JS.CLEG.assignSpaceGroup(a,b)}if(b.mkIsAssign&&null==b.mkSym00)return"no starting space group for calculation!"}var p=JS.CLEG.isCalcType(m);if((p||JS.CLEG.isTransformOnly(m))!=b.mkWasNode)return"invalid CLEG expression, not node>transform>node>transform>....!";b.mkWasNode=!b.mkWasNode;var q=p?m:null;p&&(m=f[++l].trim());var u=l==f.length-1;u&&(n&&null!=a.getPrevNode())&&(m=a.getPrevNode().getCleanITAName());var r=m.lastIndexOf(":"),
s=null==b.mkSym00,z=!1,v=JS.CLEG.isTransform(m,!1),w=v&&!(v&&0<=r),C=!1,E=!1,r=a.sym,v=null;if(!w&&(a.sym=r,v=new JS.CLEG.ClegNode(a,l,m),null!=a.errString))return a.errString;if(null==a.getPrevNode()){if(!JS.CLEG.checkFullSyntax(f,r,JS.CLEG.allow300))return"invalid CLEG expression!";if(!b.mkCalcOnly&&!w&&s&&!v.isDefaultSetting()){C=N(-1,[v.specialPrefix+v.myIta]);s=b.mkCalcOnly?new JS.CLEG.AssignedSGParams(d):new JS.CLEG.AssignedSGParams(d,null,null,b.mkParamsOrUC,-1,!0,b.mkSb,!1);C=new JS.CLEG.ClegData(d.getSymTemp(),
C);s=JS.CLEG.assignSpaceGroup(C,s);if(s.endsWith("!"))return s;b.mkCalcOnly?(r=b.mkSym00=C.sym,a.trMat=C.trMat):b.mkSym00=d.getOperativeSymmetry();if(null==b.mkSym00)return"modelkit spacegroup initialization error!";s=!1;C=!0}var E=0==l&&(!b.mkCalcOnly&&!s&&k||b.mkIsAssign),k=s?null:b.mkSym00.getSpaceGroupClegId(),x=null;if(!s&&!(null==k||k.equals("0"))){var B=k.indexOf(":");0<B&&(x=k.substring(B+1),k=k.substring(0,B));E&&(x=b.mkSym00.getSpaceGroupInfoObj("itaTransform",null,!1,!1))}null==a.trMat&&
(a.trMat=new JU.M4,a.trMat.setIdentity());if(!b.mkIsAssign&&(a.sym=r,a.setPrevNode(new JS.CLEG.ClegNode(a,-1,null==k?null:k+":"+x)),b.mkIgnoreAllSettings&&a.getPrevNode().disable(),!a.getPrevNode().update(a)))return a.errString}p&&a.getPrevNode().setCalcNext(q);if(w){if(u)return"CLEG pathway is incomplete!";0<m.length&&a.addTransform(l,m);++b.mkIndex;return JS.CLEG.assignSpaceGroup(a,b)}if(!E){a.sym=r;if(!v.update(a))return a.errString;u&&n&&a.setNodeTransform(v);a.updateTokens(v)}if(!u)return b.mkIndex++,
a.setPrevNode(v),JS.CLEG.assignSpaceGroup(a,b);p=n=l=null;l=!h||!JU.AU.isAD(b.mkParamsOrUC)?null:b.mkParamsOrUC;s&&(r.setUnitCellFromParams(null==l?F(-1,[10,10,10,90,90,90]):l,!1,NaN),b.mkParamsOrUC=null,h=!1);h?JU.AU.isAD(b.mkParamsOrUC)?l=b.mkParamsOrUC:(n=b.mkParamsOrUC,p=n[0]):s||(r=a.sym=b.mkSym00,null==a.trMat&&(a.trMat=new JU.M4,a.trMat.setIdentity()),n=r.getV0abc(N(-1,[a.trMat]),null),p=n[0]);null!=n&&(l=r.getUnitCell(n,!1,"assign").getUnitCellParams(),null==p&&(p=n[0]));h=m.equalsIgnoreCase("P1")||
m.equals("ITA/1.1");try{var D,L,q=-1;if(b.mkCalcOnly)b.mkBitset=D=new JU.BS,L=!0;else{if(null!=b.mkBitset&&b.mkBitset.isEmpty())return"no atoms specified!";D=d.getThisModelAtoms();var O=h?D:JS.SV.getBitSet(d.evaluateExpressionAsVariable("{within(unitcell)}"),!0);null==b.mkBitset&&(b.mkBitset=D);null!=b.mkBitset&&(D.and(b.mkBitset),h||D.and(O));q=(L=D.isEmpty())&&0>d.am.cmi?0:L?d.am.cmi:d.ms.at[D.nextSetBit(0)].getModelIndex();b.mkIsAssign||d.ms.getModelAuxiliaryInfo(q).remove("spaceGroupInfo")}!s&&
!b.mkIsAssign&&r.replaceTransformMatrix(a.trMat);null==l&&(l=r.getUnitCellMultiplied().getUnitCellParams());var z=(new Boolean(z|b.mkIsAssign)).valueOf(),H=L&&z?null:d.findSpaceGroup(r,z?D:null,z?null:v.getName(),l,p,n,2|(b.mkCalcOnly?16:0)|(!s||b.mkIsAssign?0:4));if(null==H)return"Space group "+v.getName()+" is unknown or not compatible!";if(null==n||s)n=H.get("unitcell");var m=H.get("name"),Q=H.get("jmolId"),y=H.get("basis"),K=H.remove("sg");r.getUnitCell(n,!1,null);r.setSpaceGroupTo(null==K?Q:
K);r.setSpaceGroupName(m);if(b.mkCalcOnly)return a.sym=r,"OK";null==y&&(y=r.removeDuplicates(d.ms,D,!0));d.ms.setSpaceGroup(q,r,y);if(b.mkIsAssign)return m;(s||C)&&d.runScript("unitcell on; center unitcell;axes unitcell; axes 0.1; axes on;set perspectivedepth false;moveto 0 axis c1;draw delete;show spacegroup");var W=a.abcFor(a.trMat);if(!j){JS.CLEG.standardizeTokens(f,!0);var U=JU.PT.join(f,">",0)+(y.isEmpty()?"":"\n basis="+y);System.out.println("ModelKit CLEG="+U);b.mkSb.append(U).append("\n")}return W}catch(V){if(ba(V,
Exception))return JV.Viewer.isJS||V.printStackTrace(),V.getMessage()+"!";throw V;}},"JS.CLEG.ClegData,JS.CLEG.AssignedSGParams");var a=L(function(){this.prevNode=this.trTemp=this.trLink=this.errString=this.trMat=this.sym=this.tokens=null;E(this,arguments)},JS.CLEG,"ClegData",null);ia(a,function(){this.trTemp=new JU.M4});Q(a,function(a,b){this.tokens=b;this.sym=a},"J.api.SymmetryInterface,~A");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.sym.convertTransform(a,this.trTemp),this.trMat.mul(this.trTemp));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,"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):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()},"JS.CLEG.ClegNode");d(a,"addTransform",function(a,b){this.addSGTransform(b,">t>");this.addTransformLink();System.out.println("ModelKit.assignSpaceGroup 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));this.sym.convertTransform(b,this.trTemp);d.mul(this.trTemp);return this.abcFor(d)},"~S,~S");a=L(function(){this.myTrm=this.myIta=this.name=null;this.index=0;this.calculated=this.calcNext=null;this.isThisModelCalc=this.disabled=!1;this.hallSymbol=null;this.specialType=0;this.specialPrefix="";E(this,arguments)},JS.CLEG,"ClegNode",null);Q(a,function(a,b,d){null!=d&&(this.index=b,b=JS.CLEG.isProbableClegSetting(d),
0<b&&(this.myIta=d.substring(0,b),this.myTrm=d.substring(b+1)),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*z(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;b.equals("ref")&&(this.isThisModelCalc=!0);b=this.checkSpecial(b);var l=b.endsWith(":p");l&&(b=b.substring(0,b.length-2));var f=b.startsWith("ITA/");f&&(b=this.checkSpecial(b.substring(4)));var j=!1,h=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=b.indexOf(":",d);0<d&&(h=b.substring(d+1));b="Hall:"+this.hallSymbol}else b.startsWith("HM:")?j=!0:3>=b.length&&(f=0<JS.SpaceGroup.getITNo(b,0))&&(b=this.checkSpecial(b)+".1");!f&&(null==this.hallSymbol&&!j)&&(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))&&(f=!0));if(f){this.myTrm=b.endsWith(".1")?"a,b,c":a.sym.getITASettingValue(null,this.specialPrefix+b,"trm");if(null==this.myTrm){a.errString="Unknown ITA setting: "+
this.specialPrefix+b+"!";return}this.myIta=JU.PT.split(b,".")[0]}else if(null==this.myIta&&(this.myIta=a.sym.getSpaceGroupInfoObj("itaNumber",this.specialPrefix+b,!1,!1)),null==this.myTrm&&(this.myTrm=a.sym.getSpaceGroupInfoObj("itaTransform",b,!1,!1)),null!=this.hallSymbol&&null!=h)if(this.myTrm.equals("a,b,c"))this.myTrm=h;else{a.errString="Non-reference Hall symbol cannot also contain a setting: "+b+"!";return}"0".equals(this.myIta)?a.errString="Could not get ITA space group for "+b+"!":(l&&(this.myTrm=
a.addPrimitiveTransform(this.myIta,this.myTrm)),this.setITAName())},"JS.CLEG.ClegData,~S");d(a,"setITAName",function(){return this.name="ITA/"+this.specialPrefix+this.myIta+":"+this.myTrm});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);var d=null==a.trLink&&null!=this.myIta&&(this.myIta.equals(b.myIta)||null!=b.calcNext);System.out.println("ClegNode update i="+this.index+" n="+this.name+"\n data.trLink="+
a.trLink+"\n "+b+" "+b.myIta+" "+b.calcNext+"  haveref="+d);if(!d)return!0;d=JU.M4.newM4(a.trMat);a.removePrevNodeTrm();var l=null;if(null!=b.calcNext){var f=!0,l=!1;switch(b.calcNext){case "super":f=!1;break;case "":case "set":b.calcNext="set",l=!0}var j=JU.PT.parseInt(b.myIta),h=JU.PT.parseInt(this.myIta);if(!(l&&j==h)){l=a.sym.getSubgroupJSON(f?b.name:this.name,f?this.name:b.name,0,1);(j=null!=l)&&!f&&(l="!"+l);b=b.myIta+">"+(j?l:"?")+">"+this.myIta;if(!j)throw new RuntimeException(b);System.out.println("Modelkit sub := "+
b);a.addSGTransform(l,"sub")}}this.disabled||a.addSGTransform(this.myTrm,"myTrm");this.calculated=a.calculate(d);System.out.println("calculated is "+this.calculated);return!0},"JS.CLEG.ClegData");d(a,"getName",function(){return this.name});d(a,"getCleanITAName",function(){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){this.calcNext=a},"~S");p(a,"toString",function(){return"[ClegNode #"+this.index+" "+this.name+"   "+this.myIta+":"+this.myTrm+(this.disabled?" disabled":"")+"]"});a=L(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;E(this,arguments)},JS.CLEG,"AssignedSGParams",null);Q(a,function(a){this.vwr=a;this.mkCalcOnly=!0;this.mkIsAssign=!1;this.mkSb=
null},"JV.Viewer");Q(a,function(a,b,d,l,f,j,h,k){this.vwr=a;this.mkCalcOnly=!1;this.mkIndex=f;this.mkSym00=b;this.mkBitset=d;this.mkParamsOrUC=l;this.mkIgnoreAllSettings=j;this.mkSb=h;this.mkIsAssign=k},"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);
