(function(W,X,Y,Z,F,$,n,r,q,u,t,C,aa,w,L,N,v,z,H,A,O,I,G,ba,S,T,P,ca,da,ea,D,fa,Q,R,ga,U,M,ha,ia,K,ja,V,ka,la,ma,na,oa,pa,qa,ra,sa,ta,ua,va,wa,xa,ya,za,e,j){n("J.adapter.readers.pdb");q(["J.adapter.smarter.AtomSetCollectionReader","java.util.Hashtable"],"J.adapter.readers.pdb.PdbReader","java.lang.Boolean $.Float JU.Lst $.M4 $.P3 $.PT $.SB J.adapter.smarter.Atom $.Structure J.api.JmolAdapter J.c.STR JU.Escape $.Logger".split(" "),function(){c$=t(function(){this.lineLength=this.serial=this.seqMode=
this.serMode=0;this.pdbHeader=null;this.gromacsWideFormat=this.isLegacyModelType=this.isConnectStateBug=this.haveMappedSerials=this.isMultiModel=this.getTlsGroups=this.applySymmetry=!1;this.sb=this.sbConect=this.sbSelected=this.sbIgnored=this.biomtChainAtomCounts=this.sbTlsErrors=this.vTlsModels=this.vBiomolecules=this.vCompnds=this.htMolIds=this.htElementsInCurrentGroup=this.htSites=this.htHetero=this.htFormul=null;this.nRes=this.nUNK=this.maxSerial=this.ac=0;this.currentKey=this.currentGroup3=this.currentCompnd=
null;this.configurationPtr=this.currentResno=-2147483648;this.resetKey=!0;this.$compnd=null;this.fileAtomIndex=this.conformationIndex=0;this.lastAltLoc="\x00";this.lastGroup=-2147483648;this.lastInsertion="\x00";this.lastTargetSerial=this.lastSourceSerial=-2147483648;this.atomTypeLen=this.atomTypePt0=this.tlsGroupID=0;this.isbiomol=this.isCourseGrained=!1;this.htGroup1=null;this.maxLength=80;this.pdbID=null;this.haveDoubleBonds=!1;this.$cryst1=0;this.vConnect=this.tlsU=this.dataT=this.fileSgName=
null;this.connectNextAtomSet=this.connectNextAtomIndex=0;this.connectLast=null;u(this,arguments)},J.adapter.readers.pdb,"PdbReader",J.adapter.smarter.AtomSetCollectionReader);O(c$,function(){this.htFormul=new java.util.Hashtable;this.dataT=H(8,0)});j(c$,"initializeReader",function(){this.allowPDBFilter=!0;this.pdbHeader=this.getHeader?new JU.SB:null;this.applySymmetry=!this.checkFilterKey("NOSYMMETRY");this.isDSSP1&&this.asc.setInfo("isDSSP1",Boolean.TRUE);this.getTlsGroups=this.checkFilterKey("TLS");
this.checkFilterKey("ASSEMBLY")&&(this.filter=JU.PT.rep(this.filter,"ASSEMBLY","BIOMOLECULE"));if(this.isbiomol=this.checkFilterKey("BIOMOLECULE"))this.filter=this.filter.$replace(":"," ");var a=this.isbiomol&&this.checkFilterKey("BYCHAIN"),b=this.isbiomol&&this.checkFilterKey("BYSYMOP");(this.isCourseGrained=a||b)||this.setIsPDB();this.isConcatenated=(new Boolean(this.isConcatenated|this.filePath.endsWith(".dssr"))).valueOf();this.htParams.containsKey("vTlsModels")&&(this.vTlsModels=this.htParams.remove("vTlsModels"));
a=this.getFilter("TYPE ");null!=a&&(a=JU.PT.getTokens(a.$replace(","," ")),this.atomTypePt0=Integer.parseInt(a[0])-1,b=a[1].indexOf("="),0<=b?this.setFilterAtomTypeStr(a[1].substring(b+1).toUpperCase()):b=a[1].length,this.atomTypeLen=Integer.parseInt(a[1].substring(0,b)));a=this.getFilter("CONF ");null!=a&&(this.configurationPtr=this.parseIntStr(a),this.sbIgnored=new JU.SB,this.sbSelected=new JU.SB);this.isLegacyModelType=12E4>this.stateScriptVersionInt;this.isConnectStateBug=120151<=this.stateScriptVersionInt&&
120220>=this.stateScriptVersionInt||120300<=this.stateScriptVersionInt&&120320>=this.stateScriptVersionInt});j(c$,"checkLine",function(){var a=(6>(this.lineLength=this.line.length)?-1:"ATOM    HETATM  MODEL   CONECT  HELIX   SHEET   TURN    HET     HETNAM  ANISOU  SITE    CRYST1  SCALE1  SCALE2  SCALE3  EXPDTA  FORMUL  REMARK  HEADER  COMPND  SOURCE  TITLE   SEQADV  ".indexOf(this.line.substring(0,6)))>>3,b=0==a||1==a,c=2==a;this.serial=b?this.getSerial(6,11):0;var d=(this.isTrajectory||this.isSequential)&&
!this.isMultiModel&&b&&1==this.serial;this.getHeader&&(b||c?this.getHeader=!1:this.readHeader(!1));if(c||d){this.isMultiModel=c;this.getHeader=!1;c=d?this.modelNumber+1:this.getModelNumber();d=this.getModelName();this.modelNumber=this.useFileModelNumbers?c:this.modelNumber+1;if(!this.doGetModel(this.modelNumber,null))return this.handleTlsMissingModels(),a=this.checkLastModel(),!a&&this.isConcatenated&&(a=this.continuing=!0),a;this.isCourseGrained||this.connectAll(this.maxSerial,this.isConnectStateBug);
0<this.ac&&this.applySymmetryAndSetTrajectory();this.model(c,d);if(this.isLegacyModelType||!b)return!0}if(this.isMultiModel&&!this.doProcessLines)return!0;if(b)return this.getHeader=!1,this.atom(),!0;switch(a){case 3:this.conect();break;case 4:case 5:case 6:this.ignoreStructure||this.structure();break;case 7:this.het();break;case 8:this.hetnam();break;case 9:this.anisou();break;case 10:this.site();break;case 11:this.cryst1();break;case 12:case 13:case 14:this.scale(a-11);break;case 15:this.expdta();
break;case 16:this.formul();break;case 17:if(this.line.startsWith("REMARK 285"))return this.remark285();if(this.line.startsWith("REMARK 350"))return this.remark350();if(this.line.startsWith("REMARK 290"))return this.remark290();this.line.contains("This file does not adhere to the PDB standard")&&(this.gromacsWideFormat=!0);if(this.getTlsGroups&&0<this.line.indexOf("TLS DETAILS"))return this.remarkTls();this.checkRemark();break;case 18:this.header();break;case 19:case 20:this.compnd(20==a);break;case 21:this.title();
break;case 22:this.seqAdv()}return!0});e(c$,"checkRemark",function(){this.checkCurrentLineForScript()});e(c$,"seqAdv",function(){var a=this.line.substring(39,42).trim().toLowerCase();if(1==a.length){null==this.htGroup1&&this.asc.setInfo("htGroup1",this.htGroup1=new java.util.Hashtable);var b=this.line.substring(12,15).trim();this.htGroup1.put(b,a)}});e(c$,"readHeader",function(a){if(a&&(this.rd(),!this.getHeader))return this.line;this.pdbHeader.append(this.line).appendC("\n");return this.line},"~B");
j(c$,"finalizeSubclassReader",function(){this.finalizeReaderPDB()});e(c$,"finalizeReaderPDB",function(){this.checkNotPDB();null!=this.pdbID&&0<this.pdbID.length&&(this.isMultiModel||this.asc.setAtomSetName(this.pdbID),this.asc.setCurrentModelInfo("pdbID",this.pdbID));this.checkUnitCellParams();this.isCourseGrained||this.connectAll(this.maxSerial,this.isConnectStateBug);var a;null!=this.vBiomolecules&&(0<this.vBiomolecules.size()&&0<this.asc.ac)&&(this.asc.setCurrentModelInfo("biomolecules",this.vBiomolecules),
this.setBiomoleculeAtomCounts(),null!=this.thisBiomolecule&&this.applySymmetry&&(this.asc.getXSymmetry().applySymmetryBio(this.thisBiomolecule,this.applySymmetryToBonds,this.filter),this.vTlsModels=null,this.asc.xtalSymmetry=null));if(null!=this.vTlsModels){a=this.getInterface("JS.Symmetry");var b=this.asc.atomSetCount;if(b==this.vTlsModels.size())for(;0<=--b;)this.setTlsGroups(b,b,a);else if(JU.Logger.info(b+" models but "+this.vTlsModels.size()+" TLS descriptions"),1==this.vTlsModels.size())for(JU.Logger.info(" -- assuming all models have the same TLS description -- check REMARK 3 for details.");0<=
--b;)this.setTlsGroups(0,b,a);this.checkForResidualBFactors(a)}null!=this.sbTlsErrors&&(this.asc.setInfo("tlsErrors",this.sbTlsErrors.toString()),this.appendLoadNote(this.sbTlsErrors.toString()));if((this.doCheckUnitCell=(new Boolean(this.doCheckUnitCell&(this.iHaveUnitCell&&this.doApplySymmetry))).valueOf())&&this.isbiomol)this.ignoreFileSpaceGroupName=!0,this.sgName=this.fileSgName,this.fractionalizeCoordinates(!0),this.asc.setModelInfoForSet("biosymmetry",null,this.asc.iSet),this.asc.checkSpecial=
!1;null!=this.latticeCells&&0!=this.latticeCells[0]&&this.addJmolScript("unitcell;axes on;axes unitcell;");this.finalizeReaderASCR();if(null!=this.vCompnds){this.asc.setInfo("compoundSource",this.vCompnds);for(b=this.asc.iSet+1;0<=--b;)this.asc.setModelInfoForSet("compoundSource",this.vCompnds,b)}null!=this.htSites&&this.addSites(this.htSites);null!=this.pdbHeader&&this.asc.setInfo("fileHeader",this.pdbHeader.toString());0<this.configurationPtr&&(JU.Logger.info(this.sbSelected.toString()),JU.Logger.info(this.sbIgnored.toString()))});
e(c$,"checkUnitCellParams",function(){this.iHaveUnitCell&&(this.asc.setCurrentModelInfo("unitCellParams",this.unitCellParams),null!=this.sgName&&this.asc.setCurrentModelInfo("spaceGroup",this.sgName))});e(c$,"checkForResidualBFactors",function(a){for(var b=this.asc.atoms,c=!1,d=this.asc.ac;0<=--d;){var f=this.tlsU.get(b[d]);if(null!=f){var g=f[7]-(f[0]+f[1]+f[2])/3;if(0>g||Float.isNaN(g)){c=!0;break}}}JU.Logger.info("TLS analysis suggests Bfactors are "+(c?"":"NOT")+" residuals");for(var h,b=this.tlsU.entrySet().iterator();b.hasNext()&&
((h=b.next())||1);)f=h.getValue(),g=f[7],0!=g&&(c||(g-=(f[0]+f[1]+f[2])/3),f[0]+=g,f[1]+=g,f[2]+=g,h.getKey().addTensor(a.getTensor(this.vwr,f).setType(null),"TLS-R",!1),JU.Logger.info("TLS-U:  "+JU.Escape.eAF(f)),f=h.getKey().anisoBorU,null!=f&&JU.Logger.info("ANISOU: "+JU.Escape.eAF(f)));this.tlsU=null},"J.api.SymmetryInterface");e(c$,"header",function(){8>this.lineLength||(this.appendLoadNote(this.line.substring(7).trim()),80==this.lineLength&&(this.maxLength=72),this.pdbID=66<=this.lineLength?
this.line.substring(62,66).trim():"",4==this.pdbID.length&&(this.asc.setCollectionName(this.pdbID),this.asc.setInfo("havePDBHeaderName",Boolean.TRUE)),50<this.lineLength&&(this.line=this.line.substring(0,50)),this.asc.setInfo("CLASSIFICATION",this.line.substring(7).trim()))});e(c$,"title",function(){10<this.lineLength&&this.appendLoadNote(this.line.substring(10,Math.min(this.maxLength,this.line.length)).trim())});e(c$,"compnd",function(a){if(!a){this.$compnd=null==this.$compnd?"":this.$compnd+" ";
var b=this.line;62<this.lineLength&&(b=b.substring(0,62));this.$compnd+=b.substring(10).trim();this.asc.setInfo("COMPND",this.$compnd)}if(null==this.vCompnds){if(a)return;this.vCompnds=new JU.Lst;this.htMolIds=new java.util.Hashtable;this.currentCompnd=new java.util.Hashtable;this.currentCompnd.put("select","(*)");this.currentKey="MOLECULE";this.htMolIds.put("",this.currentCompnd)}a&&this.resetKey&&(this.resetKey=!1,this.currentKey="SOURCE",this.currentCompnd=this.htMolIds.get(""));this.line=this.line.substring(10,
Math.min(this.lineLength,72)).trim();var c=this.line.indexOf(":");if(0>c||0<c&&"\\"==this.line.charAt(c-1))c=this.line.length;b=this.line.substring(0,c).trim();c=c<this.line.length?this.line.substring(c+1).trim():null;if(b.equals("MOL_ID")){if(null==c)return;if(a){this.currentCompnd=this.htMolIds.remove(c);return}this.currentCompnd=new java.util.Hashtable;this.vCompnds.addLast(this.currentCompnd);this.htMolIds.put(c,this.currentCompnd)}null!=this.currentCompnd&&(null==c?(c=this.currentCompnd.get(this.currentKey),
null==c&&(c=""),c+=b,0==this.vCompnds.size()&&this.vCompnds.addLast(this.currentCompnd)):this.currentKey=b,c.endsWith(";")&&(c=c.substring(0,c.length-1)),this.currentCompnd.put(this.currentKey,c),this.currentKey.equals("CHAIN")&&this.currentCompnd.put("select","(:"+JU.PT.rep(JU.PT.rep(c,", ",",:")," ","")+")"))},"~B");e(c$,"setBiomoleculeAtomCounts",function(){for(var a=this.vBiomolecules.size();0<=--a;){for(var b=this.vBiomolecules.get(a),c=b.get("biomts"),d=b.get("chains"),f=0,c=c.size();0<=--c;)for(var g=
d.get(c),h=g.length-1;0<=--h;)":"==g.charAt(h)&&(f+=this.biomtChainAtomCounts[0+g.charCodeAt(h+1)]);b.put("atomCount",Integer.$valueOf(f))}});e(c$,"remark350",function(){var a=null,b=null;this.vBiomolecules=new JU.Lst;this.biomtChainAtomCounts=v(255,0);for(var c="",d="",f="",g=!0,h=null,e=0,k=JU.M4.newM4(null);;){g?this.readHeader(!0):g=!0;if(null==this.line||!this.line.startsWith("REMARK 350"))break;try{if(this.line.startsWith("REMARK 350 BIOMOLECULE:")&&(0<e&&JU.Logger.info("biomolecule "+f+": number of transforms: "+
e),h=new java.util.Hashtable,f=this.line.substring(this.line.indexOf(":")+1).trim(),c=this.line.trim(),h.put("name","biomolecule "+f),h.put("molecule",3==f.length?f:Integer.$valueOf(this.parseIntStr(f))),h.put("title",c),h.put("chains",b=new JU.Lst),h.put("biomts",a=new JU.Lst),this.vBiomolecules.addLast(h),e=0),0<=this.line.indexOf("APPLY THE FOLLOWING TO CHAINS:"))if(null==h)g=!1,this.line="REMARK 350 BIOMOLECULE: 1  APPLY THE FOLLOWING TO CHAINS:";else{var m=this.line.substring(41).trim();this.appendLoadNote("found biomolecule "+
f+": "+m);d=":"+m.$replace(",",";").$replace(" ",":");for(g=!1;null!=this.readHeader(!0)&&0>this.line.indexOf("BIOMT")&&7==this.line.indexOf("350");)d+=":"+this.line.substring(11).trim().$replace(",",";").$replace(" ",":");d+=";";if(this.checkFilterKey("BIOMOLECULE "+f+";")||this.checkFilterKey("BIOMOLECULE="+f+";"))this.setFilter(this.filter+d),JU.Logger.info('filter set to "'+this.filter+'"'),this.thisBiomolecule=h}else if(this.line.startsWith("REMARK 350   BIOMT1 ")){e++;for(var l=H(16,0),p=0;12>
p;){var j=this.getTokens();l[p++]=this.parseFloatStr(j[4]);l[p++]=this.parseFloatStr(j[5]);l[p++]=this.parseFloatStr(j[6]);l[p++]=this.parseFloatStr(j[7]);(4==p||8==p)&&this.readHeader(!0)}l[15]=1;var y=new JU.M4;y.setA(l);y.equals(k)?(a.add(0,y),b.add(0,d)):(a.addLast(y),b.addLast(d))}}catch(E){if(N(E,Exception))return this.vBiomolecules=this.thisBiomolecule=null,!1;throw E;}}0<e&&JU.Logger.info("biomolecule "+f+": number of transforms: "+e);return!1});e(c$,"remark285",function(){return!0});e(c$,
"remark290",function(){for(;null!=this.readHeader(!0)&&this.line.startsWith("REMARK 290");)if(0<=this.line.indexOf("NNNMMM   OPERATOR"))for(;null!=this.readHeader(!0);){var a=this.getTokens();if(4>a.length)break;(this.doApplySymmetry||this.isbiomol)&&this.setSymmetryOperator(a[3])}return!1});e(c$,"getSerial",function(a,b){var c=this.line.charAt(a),d=" "==c||" "==this.line.charAt(b-1);switch(this.serMode){default:case 0:if(d)return this.parseIntRange(this.line,a,b);try{return this.serial=Integer.parseInt(this.line.substring(a,
b))}catch(f){if(N(f,Exception))return this.serMode=JU.PT.isDigit(c)?1:2,this.getSerial(a,b);throw f;}case 2:return d||JU.PT.isDigit(c)?this.parseIntRange(this.line,a,b):JU.PT.parseIntRadix(this.line.substring(a,b),36)+(JU.PT.isUpperCase(c)?-16696160:26973856);case 1:if(!d)return this.serial=JU.PT.parseIntRadix(this.line.substring(a,b),16);this.serMode=0;return this.getSerial(a,b)}},"~N,~N");e(c$,"getSeqNo",function(a,b){var c=this.line.charAt(a),d=" "==c||" "==this.line.charAt(b-1);switch(this.seqMode){default:case 0:if(d)return this.parseIntRange(this.line,
a,b);try{return Integer.parseInt(this.line.substring(a,b))}catch(f){if(N(f,Exception))return this.seqMode=JU.PT.isDigit(c)?1:2,this.getSeqNo(a,b);throw f;}case 2:return d||JU.PT.isDigit(c)?this.parseIntRange(this.line,a,b):JU.PT.parseIntRadix(this.line.substring(a,b),36)+(JU.PT.isUpperCase(c)?-456560:756496);case 1:if(!d)return JU.PT.parseIntRadix(this.line.substring(a,b),16);this.seqMode=0;return this.getSeqNo(a,b)}},"~N,~N");e(c$,"processAtom",function(a,b,c,d,f,g,h,e,k){a.atomName=b;" "!=c&&(a.altLoc=
c);a.group3=null==d?"UNK":d;a.chainID=f;null!=this.biomtChainAtomCounts&&this.biomtChainAtomCounts[f%256]++;a.sequenceNumber=g;a.insertionCode=J.api.JmolAdapter.canonizeInsertionCode(h);a.isHetero=e;a.elementSymbol=k;return a},"J.adapter.smarter.Atom,~S,~S,~S,~N,~N,~S,~B,~S");e(c$,"processAtom2",function(a,b,c,d,f,g){a.atomSerial=b;b>this.maxSerial&&(this.maxSerial=b);if(null==a.group3)null!=this.currentGroup3&&(this.currentGroup3=null,this.currentResno=-2147483648,this.htElementsInCurrentGroup=null);
else if(!a.group3.equals(this.currentGroup3)||a.sequenceNumber!=this.currentResno)this.currentGroup3=a.group3,this.currentResno=a.sequenceNumber,this.htElementsInCurrentGroup=this.htFormul.get(a.group3),this.nRes++,a.group3.equals("UNK")&&this.nUNK++;this.setAtomCoordXYZ(a,c,d,f);a.formalCharge=g;this.setAdditionalAtomParameters(a);this.haveMappedSerials?this.asc.addAtomWithMappedSerialNumber(a):this.asc.addAtom(a);0==this.ac++&&!this.isCourseGrained&&this.setModelPDB(!0);a.isHetero&&null!=this.htHetero&&
(this.asc.setCurrentModelInfo("hetNames",this.htHetero),this.htHetero=null)},"J.adapter.smarter.Atom,~N,~N,~N,~N,~N");e(c$,"atom",function(){var a=this.line.startsWith("HETATM"),a=this.processAtom(new J.adapter.smarter.Atom,this.line.substring(12,16).trim(),this.line.charAt(16),this.parseTokenRange(this.line,17,20),this.vwr.getChainID(this.line.substring(21,22),!0),this.getSeqNo(22,26),this.line.charAt(26),a,this.deduceElementSymbol(a));if(0<this.atomTypeLen){var b=this.line.substring(this.atomTypePt0,
this.atomTypePt0+this.atomTypeLen).trim();0<b.length&&(a.atomName+="\x00"+b)}if(this.filterPDBAtom(a,this.fileAtomIndex++)){var b=0,c,d,f;if(this.gromacsWideFormat)c=this.parseFloatRange(this.line,30,40),d=this.parseFloatRange(this.line,40,50),f=this.parseFloatRange(this.line,50,60);else{if(80<=this.lineLength&&(c=this.line.charAt(78),d=this.line.charAt(79),"0"<=d&&"7">=d&&(f=d,d=c,c=f),("+"==d||"-"==d||" "==d)&&"0"<=c&&"7">=c))b=c.charCodeAt(0)-48,"-"==d&&(b=-b);c=this.parseFloatRange(this.line,
30,38);d=this.parseFloatRange(this.line,38,46);f=this.parseFloatRange(this.line,46,54)}this.processAtom2(a,this.serial,c,d,f,b)}});e(c$,"filterPDBAtom",function(a,b){if(!this.filterAtom(a,b))return!1;if(0<this.configurationPtr){if(a.sequenceNumber!=this.lastGroup||a.insertionCode!=this.lastInsertion)this.conformationIndex=this.configurationPtr-1,this.lastGroup=a.sequenceNumber,this.lastInsertion=a.insertionCode,this.lastAltLoc="\x00";if("\x00"!=a.altLoc){var c=" atom ["+a.group3+"]"+a.sequenceNumber+
("\x00"==a.insertionCode?"":"^"+a.insertionCode)+(0==a.chainID?"":":"+this.vwr.getChainIDStr(a.chainID))+"."+a.atomName+"%"+a.altLoc+"\n";0<=this.conformationIndex&&a.altLoc!=this.lastAltLoc&&(this.lastAltLoc=a.altLoc,this.conformationIndex--);if(0>this.conformationIndex&&a.altLoc!=this.lastAltLoc)return this.sbIgnored.append("ignoring").append(c),!1;this.sbSelected.append("loading").append(c)}}return!0},"J.adapter.smarter.Atom,~N");e(c$,"setAdditionalAtomParameters",function(a){var b;this.gromacsWideFormat?
(b=this.parseFloatRange(this.line,60,68),a.bfactor=J.adapter.readers.pdb.PdbReader.fixRadius(this.parseFloatRange(this.line,68,76))):(b=this.parseFloatRange(this.line,54,60),a.bfactor=this.parseFloatRange(this.line,60,66));a.foccupancy=Float.isNaN(b)?1:b},"J.adapter.smarter.Atom");e(c$,"deduceElementSymbol",function(a){if(78<=this.lineLength){var b=this.line.charAt(76),c=this.line.charAt(77);if(" "==b&&J.adapter.smarter.Atom.isValidSym1(c))return""+c;if(J.adapter.smarter.Atom.isValidSymNoCase(b,c))return""+
b+c}b=this.line.charAt(12);c=this.line.charAt(13);if((null==this.htElementsInCurrentGroup||null!=this.htElementsInCurrentGroup.get(this.line.substring(12,14)))&&J.adapter.smarter.Atom.isValidSymNoCase(b,c))return a||"H"!=b?""+b+c:"H";if("H"==b)return"H";if((null==this.htElementsInCurrentGroup||null!=this.htElementsInCurrentGroup.get(""+c))&&J.adapter.smarter.Atom.isValidSym1(c))return""+c;if(" "!=b&&(null==this.htElementsInCurrentGroup||null!=this.htElementsInCurrentGroup.get(""+b))&&J.adapter.smarter.Atom.isValidSym1(b))return""+
b;a=this.line.charAt(14);return" "==b&&"X"!=c&&(null==this.htElementsInCurrentGroup||null!=this.htElementsInCurrentGroup.get(this.line.substring(13,15)))&&J.adapter.smarter.Atom.isValidSymNoCase(c,a)?""+c+a:"Xx"},"~B");e(c$,"conect",function(){null==this.sbConect?(this.sbConect=new JU.SB,this.sb=new JU.SB):this.sb.setLength(0);var a=this.getSerial(6,11);if(!(0>a)){var b=1,c=this.line.trim().length;56<c&&(c=this.line.substring(0,56).trim().length);for(var d=11;d<c;d+=5){switch(d){case 31:b=2048;break;
case 41:continue}var f=this.getSerial(d,d+5);if(!(0>f)){var g=a==this.lastSourceSerial&&f==this.lastTargetSerial;g&&(this.haveDoubleBonds=!0);this.lastSourceSerial=a;this.lastTargetSerial=f;var h;f<a?(h=f,f=a):h=a;var e=";"+h+" "+f+";";if(!(0<=this.sbConect.indexOf(e))||g){if(this.haveDoubleBonds){g="--"+e;if(0<=this.sbConect.indexOf(g))continue;this.sb.append(g)}this.sbConect.append(e);this.addConnection(v(-1,[h,f,b]))}}}this.sbConect.appendSB(this.sb)}});e(c$,"structure",function(){var a=J.c.STR.NONE,
b=J.c.STR.NONE,c,d,f,g,h=0;if(this.line.startsWith("HELIX "))a=J.c.STR.HELIX,c=19,d=21,f=31,g=33,40<=this.line.length&&(b=J.adapter.smarter.Structure.getHelixType(this.parseIntRange(this.line,38,40)));else if(this.line.startsWith("SHEET "))a=J.c.STR.SHEET,c=21,d=22,f=32,g=33,h=this.parseIntRange(this.line,14,16);else if(this.line.startsWith("TURN  "))a=J.c.STR.TURN,c=19,d=20,f=30,g=31;else return;if(!(this.lineLength<g+4)){var e=this.line.substring(11,15).trim(),k=this.parseIntRange(this.line,7,10);
c=this.vwr.getChainID(this.line.substring(c,c+1),!0);var m=this.parseIntRange(this.line,d,d+4);d=this.line.charAt(d+4);f=this.vwr.getChainID(this.line.substring(f,f+1),!0);var l=this.parseIntRange(this.line,g,g+4),p=" ";this.lineLength>g+4&&(p=this.line.charAt(g+4));b===J.c.STR.NONE&&(b=a);a=new J.adapter.smarter.Structure(-1,a,b,e,k,h,null);a.set(c,m,d,f,l,p,-2147483648,2147483647);this.asc.addStructure(a)}});e(c$,"getModelNumber",function(){var a=14;a>this.lineLength&&(a=this.lineLength);a=this.parseIntRange(this.line,
6,a);return-2147483648==a?0:a});e(c$,"getModelName",function(){if(16>this.lineLength)return null;if(this.line.startsWith("ATOM"))return"";var a=this.line.substring(15,this.lineLength).trim();return 0==a.length?null:a});e(c$,"model",function(a,b){this.checkNotPDB();null==b&&(b=this.pdbID);this.haveMappedSerials=!1;this.sbConect=null;this.asc.newAtomSet();this.asc.setCurrentModelInfo("pdbID",this.pdbID);(0==this.asc.iSet||this.isTrajectory)&&this.asc.setAtomSetName(this.pdbID);this.asc.setCurrentModelInfo("name",
b);this.checkUnitCellParams();this.isCourseGrained||this.setModelPDB(!0);this.asc.setCurrentAtomSetNumber(a);this.isCourseGrained&&this.asc.setCurrentModelInfo("courseGrained",Boolean.TRUE)},"~N,~S");e(c$,"checkNotPDB",function(){var a=!this.isCourseGrained&&(0==this.nRes||this.nUNK!=this.nRes);this.asc.checkSpecial=!a;this.setModelPDB(a);this.nUNK=this.nRes=0;this.currentGroup3=null});e(c$,"cryst1",function(){var a=this.$cryst1=this.getFloat(6,9);1==a&&(a=NaN);this.setUnitCell(a,this.getFloat(15,
9),this.getFloat(24,9),this.getFloat(33,7),this.getFloat(40,7),this.getFloat(47,7));this.isbiomol&&(this.doConvertToFractional=!1);(null==this.sgName||this.sgName.equals("unspecified!"))&&this.setSpaceGroupName(JU.PT.parseTrimmedRange(this.line,55,66));this.fileSgName=this.sgName});e(c$,"getFloat",function(a,b){return this.parseFloatRange(this.line,a,a+b)},"~N,~N");e(c$,"scale",function(a){null!=this.unitCellParams&&(a=4*a+2,this.unitCellParams[0]=this.$cryst1,this.setUnitCellItem(a++,this.getFloat(10,
10)),this.setUnitCellItem(a++,this.getFloat(20,10)),this.setUnitCellItem(a++,this.getFloat(30,10)),this.setUnitCellItem(a++,this.getFloat(45,10)),this.isbiomol&&(this.doConvertToFractional=!1))},"~N");e(c$,"expdta",function(){0<=this.line.toUpperCase().indexOf("NMR")&&this.asc.setInfo("isNMRdata","true")});e(c$,"formul",function(){var a=this.parseTokenRange(this.line,12,15),b=JU.PT.parseTrimmedRange(this.line,19,70),c=b.indexOf("(");if(0<=c){var d=b.indexOf(")");if(0>d||c>=d||c+1==d)return;b=JU.PT.parseTrimmedRange(b,
c+1,d)}c=this.htFormul.get(a);null==c&&this.htFormul.put(a,c=new java.util.Hashtable);for(this.next[0]=0;null!=(d=this.parseTokenNext(b));)2>d.length||(a=d.charAt(0),d=d.charAt(1),J.adapter.smarter.Atom.isValidSymNoCase(a,d)?c.put(""+a+d,Boolean.TRUE):J.adapter.smarter.Atom.isValidSym1(a)&&c.put(""+a,Boolean.TRUE))});e(c$,"het",function(){if(!(30>this.line.length)){null==this.htHetero&&(this.htHetero=new java.util.Hashtable);var a=this.parseTokenRange(this.line,7,10);if(!this.htHetero.containsKey(a)){var b=
JU.PT.parseTrimmedRange(this.line,30,70);this.htHetero.put(a,b)}}});e(c$,"hetnam",function(){null==this.htHetero&&(this.htHetero=new java.util.Hashtable);var a=this.parseTokenRange(this.line,11,14),b=JU.PT.parseTrimmedRange(this.line,15,70);if(null==a)JU.Logger.error("ERROR: HETNAM record does not contain a group name: "+this.line);else{var c=this.htHetero.get(a);null!=c&&(b=c+b);this.htHetero.put(a,b);this.appendLoadNote(a+" = "+b)}});e(c$,"anisou",function(){var a=H(8,0);a[6]=1;var b=this.line.substring(6,
11).trim();if(!this.haveMappedSerials&&0<this.asc.ac){for(var c=this.asc.getAtomSetAtomIndex(this.asc.iSet);c<this.asc.ac;c++){var d=this.asc.atoms[c].atomSerial;-2147483648!=d&&this.asc.atomSymbolicMap.put(""+d,this.asc.atoms[c])}this.haveMappedSerials=!0}b=this.asc.getAtomFromName(b);if(null!=b){c=28;for(d=0;70>c;c+=7,d++)a[d]=this.parseFloatRange(this.line,c,c+7);for(c=0;6>c;c++){if(Float.isNaN(a[c])){JU.Logger.error("Bad ANISOU record: "+this.line);return}a[c]/=1E4}this.asc.setAnisoBorU(b,a,12)}});
e(c$,"site",function(){null==this.htSites&&(this.htSites=new java.util.Hashtable);var a=this.parseIntRange(this.line,15,17),b=JU.PT.parseTrimmedRange(this.line,11,14),c=this.htSites.get(b);null==c&&(c=new java.util.Hashtable,c.put("nResidues",Integer.$valueOf(a)),c.put("groups",""),this.htSites.put(b,c));a=c.get("groups");for(b=0;4>b;b++){var d=18+11*b,f=JU.PT.parseTrimmedRange(this.line,d,d+3);if(0==f.length)break;var g=JU.PT.parseTrimmedRange(this.line,d+4,d+5),h=JU.PT.parseTrimmedRange(this.line,
d+5,d+9),d=JU.PT.parseTrimmedRange(this.line,d+9,d+10),a=a+((0==a.length?"":",")+"["+f+"]"+h);0<d.length&&(a+="^"+d);0<g.length&&(a+=":"+g);c.put("groups",a)}});e(c$,"remarkTls",function(){for(var a=0,b=0,c=null,d=null,f=null,g=null,h=null,e=this.line.substring(0,11);null!=this.readHeader(!0)&&this.line.startsWith(e);)try{var k=JU.PT.getTokens(this.line.substring(10).$replace(":"," "));if(!(2>k.length))if(JU.Logger.info(this.line),k[1].equalsIgnoreCase("GROUP"))f=new java.util.Hashtable,g=new JU.Lst,
f.put("ranges",g),d.addLast(f),this.tlsGroupID=this.parseIntStr(k[k.length-1]),f.put("id",Integer.$valueOf(this.tlsGroupID));else if(k[0].equalsIgnoreCase("NUMBER")){if(!k[2].equalsIgnoreCase("COMPONENTS")){a=this.parseIntStr(k[k.length-1]);if(1>a)break;null==this.vTlsModels&&(this.vTlsModels=new JU.Lst);d=new JU.Lst;this.appendLoadNote(this.line.substring(11).trim())}}else if(k[0].equalsIgnoreCase("COMPONENTS"))c=this.line;else if(k[0].equalsIgnoreCase("RESIDUE")){var h=new java.util.Hashtable,m,
l,p,j;if(6==k.length)m=k[2].charAt(0),l=k[4].charAt(0),p=this.parseIntStr(k[3]),j=this.parseIntStr(k[5]);else{var y=c.indexOf(" C "),E=c.indexOf(" C ",y+4);m=this.line.charAt(E);l=this.line.charAt(y);p=this.parseIntRange(this.line,E+1,y);j=this.parseIntStr(this.line.substring(y+1))}m==l?(h.put("chains",""+m+l),p<=j?(h.put("residues",v(-1,[p,j])),g.addLast(h)):this.tlsAddError(" TLS group residues are not in order (range ignored)")):this.tlsAddError(" TLS group chains are different (range ignored)")}else if(k[0].equalsIgnoreCase("SELECTION"))for(var s=
"\x00",n=1;n<k.length;n++)if(0<=k[n].toUpperCase().indexOf("CHAIN"))s=k[++n].charAt(0);else{var r=this.parseIntStr(k[n]);-2147483648!=r&&(h=new java.util.Hashtable,h.put("residues",v(-1,[r,this.parseIntStr(k[++n])])),"\x00"!=s&&h.put("chains",""+s+s),g.addLast(h))}else if(k[0].equalsIgnoreCase("ORIGIN")){var q=new JU.P3;f.put("origin",q);if(8==k.length)q.set(this.parseFloatStr(k[5]),this.parseFloatStr(k[6]),this.parseFloatStr(k[7]));else{var u=this.line.length;q.set(this.parseFloatRange(this.line,
u-27,u-18),this.parseFloatRange(this.line,u-18,u-9),this.parseFloatRange(this.line,u-9,u))}if(Float.isNaN(q.x)||Float.isNaN(q.y)||Float.isNaN(q.z))q.set(NaN,NaN,NaN),this.tlsAddError("invalid origin: "+this.line)}else if(k[1].equalsIgnoreCase("TENSOR")){var t=k[0].charAt(0),x=(this.readHeader(!0).substring(10)+this.readHeader(!0).substring(10)+this.readHeader(!0).substring(10)).$replace(t," ").$replace(":"," "),k=JU.PT.getTokens(x),w=H(3,3,0);f.put("t"+t,w);for(n=0;n<k.length;n++){var z=k[n].charCodeAt(0)-
49,A=k[n].charCodeAt(1)-49;w[z][A]=this.parseFloatStr(k[++n]);z<A&&(w[A][z]=w[z][A])}for(n=0;3>n;n++)for(s=0;3>s;s++)Float.isNaN(w[n][s])&&this.tlsAddError("invalid tensor: "+JU.Escape.escapeFloatAA(w,!1));if("S"==t&&++b==a){JU.Logger.info(a+" TLS groups read");this.readHeader(!0);break}}}catch(C){if(N(C,Exception)){JU.Logger.error(this.line+"\nError in TLS parser: ");Zystem.out.println(C.getMessage());d=null;break}else throw C;}null!=d&&(b=new java.util.Hashtable,b.put("groupCount",Integer.$valueOf(a)),
b.put("groups",d),this.vTlsModels.addLast(b));return 1>a});e(c$,"handleTlsMissingModels",function(){this.vTlsModels=null});e(c$,"setTlsGroups",function(a,b,c){JU.Logger.info("TLS model "+(b+1)+" set "+(a+1));a=this.vTlsModels.get(a);for(var d=a.get("groups"),f=this.asc.getAtomSetAtomIndex(b),g=H(this.asc.getAtomSetAtomCount(b),0),h=f+g.length,e=this.asc.atoms,k=d.size(),m=0;m<k;m++){var l=d.get(m),p=l.get("ranges");this.tlsGroupID=l.get("id").intValue();for(var j=p.size();0<=--j;){var y=p.get(j).get("chains"),
E=p.get(j).get("residues"),s=0+y.charCodeAt(0),y=0+y.charCodeAt(1),n=E[0],E=E[1],q=this.findAtomForRange(f,h,s,n,!1),r=0<=q?this.findAtomForRange(q,h,y,E,!1):-1;if(0>r){JU.Logger.info("TLS processing terminated");return}JU.Logger.info("TLS ID="+this.tlsGroupID+" model atom index range "+q+"-"+r);q=s==y;for(r=f;r<h;r++){var u=e[r];if(q?u.sequenceNumber>=n&&u.sequenceNumber<=E:u.chainID>s&&u.chainID<y||u.chainID==s&&u.sequenceNumber>=n||u.chainID==y&&u.sequenceNumber<=E)g[r-f]=this.tlsGroupID,this.setTlsTensor(u,
l,c)}}}this.asc.setAtomProperties("tlsGroup",g,b,!0);this.asc.setModelInfoForSet("TLS",a,b);this.asc.setTensors()},"~N,~N,J.api.SymmetryInterface");e(c$,"findAtomForRange",function(a,b,c,d,f){a=this.findAtom(a,b,c,d,!0);return f&&0<=a?this.findAtom(a,b,c,d,!1):a},"~N,~N,~N,~N,~B");e(c$,"findAtom",function(a,b,c,d,f){for(var g=this.asc.atoms;a<b;a++){var h=g[a];if((h.chainID==c&&h.sequenceNumber==d)==f)return a}f&&(JU.Logger.warn("PdbReader findAtom chain="+c+" resno="+d+" not found"),this.tlsAddError("atom not found: chain="+
c+" resno="+d));return f?-1:b},"~N,~N,~N,~N,~B");e(c$,"setTlsTensor",function(a,b,c){var d=b.get("origin");if(!Float.isNaN(d.x)){var f=b.get("tT"),g=b.get("tL");b=b.get("tS");if(!(null==f||null==g||null==b)){var h=0.017453292*(a.x-d.x),e=0.017453292*(a.y-d.y),d=0.017453292*(a.z-d.z),k=h*h,m=e*e,l=d*d,p=h*e,j=h*d,y=e*d;this.dataT[0]=f[0][0];this.dataT[1]=f[1][1];this.dataT[2]=f[2][2];this.dataT[3]=f[0][1];this.dataT[4]=f[0][2];this.dataT[5]=f[1][2];this.dataT[6]=12;var f=H(8,0),n=Float.isNaN(a.bfactor)?
0:a.bfactor/78.95683;f[0]=this.dataT[0]+g[1][1]*l+g[2][2]*m-2*g[1][2]*y+2*b[1][0]*d-2*b[2][0]*e;f[1]=this.dataT[1]+g[0][0]*l+g[2][2]*k-2*g[2][0]*j-2*b[0][1]*d+2*b[2][1]*h;f[2]=this.dataT[2]+g[0][0]*m+g[1][1]*k-2*g[0][1]*p-2*b[1][2]*h+2*b[0][2]*e;f[3]=this.dataT[3]-g[2][2]*p+g[1][2]*j+g[2][0]*y-g[0][1]*l-b[0][0]*d+b[1][1]*d+b[2][0]*h-b[2][1]*e;f[4]=this.dataT[4]-g[1][1]*j+g[1][2]*p-g[2][0]*m+g[0][1]*y+b[0][0]*e-b[2][2]*e+b[1][2]*d-b[1][0]*h;f[5]=this.dataT[5]-g[0][0]*y-g[1][2]*k+g[2][0]*p+g[0][1]*
j-b[1][1]*h+b[2][2]*h+b[0][1]*e-b[0][2]*d;f[6]=12;f[7]=n;null==this.tlsU&&(this.tlsU=new java.util.Hashtable);this.tlsU.put(a,f);a.addTensor(c.getTensor(this.vwr,this.dataT).setType(null),"TLS-U",!1)}}},"J.adapter.smarter.Atom,java.util.Map,J.api.SymmetryInterface");e(c$,"tlsAddError",function(a){null==this.sbTlsErrors&&(this.sbTlsErrors=new JU.SB);this.sbTlsErrors.append(this.fileName).appendC("\t").append("TLS group ").appendI(this.tlsGroupID).appendC("\t").append(a).appendC("\n")},"~S");c$.fixRadius=
e(c$,"fixRadius",function(a){return 0.9>a?1:a},"~N");e(c$,"addConnection",function(a){null==this.vConnect&&(this.connectLast=null,this.vConnect=new JU.Lst);null!=this.connectLast&&a[0]==this.connectLast[0]&&a[1]==this.connectLast[1]&&2048!=a[2]?this.connectLast[2]++:this.vConnect.addLast(this.connectLast=a)},"~A");e(c$,"connectAllBad",function(a){for(var b=this.connectNextAtomIndex,c=this.connectNextAtomSet;c<this.asc.atomSetCount;c++){var d=this.asc.getAtomSetAtomCount(c);this.asc.setModelInfoForSet("PDB_CONECT_firstAtom_count_max",
v(-1,[b,d,a]),c);null!=this.vConnect&&(this.asc.setModelInfoForSet("PDB_CONECT_bonds",this.vConnect,c),this.asc.setGlobalBoolean(3));b+=d}this.vConnect=null;this.connectNextAtomSet=this.asc.iSet+1;this.connectNextAtomIndex=b},"~N");e(c$,"connectAll",function(a,b){var c=this.asc,d=c.iSet;if(!(0>d))if(b)this.connectAllBad(a);else if(c.setCurrentModelInfo("PDB_CONECT_firstAtom_count_max",v(-1,[c.getAtomSetAtomIndex(d),c.getAtomSetAtomCount(d),a])),null!=this.vConnect){for(var f=this.connectNextAtomIndex,
g=c.atomSetCount;--g>=this.connectNextAtomSet;)c.setModelInfoForSet("PDB_CONECT_bonds",this.vConnect,g),c.setGlobalBoolean(3),f+=c.getAtomSetAtomCount(g);this.vConnect=null;this.connectNextAtomSet=d+1;this.connectNextAtomIndex=f}},"~N,~B");z(c$,"MODE_PDB",0,"MODE_HEX",1,"MODE_HYBRID36",2,"lineOptions","ATOM    HETATM  MODEL   CONECT  HELIX   SHEET   TURN    HET     HETNAM  ANISOU  SITE    CRYST1  SCALE1  SCALE2  SCALE3  EXPDTA  FORMUL  REMARK  HEADER  COMPND  SOURCE  TITLE   SEQADV  ","RAD_PER_DEG",
0.017453292519943295,"_8PI2_",78.95683520871486)});n("J.adapter.smarter");q(null,"J.adapter.smarter.Structure",["J.c.STR"],function(){c$=t(function(){this.structureID=this.substructureType=this.structureType=null;this.startChainID=this.startSequenceNumber=this.strandCount=this.serialID=0;this.startChainStr=null;this.startInsertionCode="\x00";this.endChainID=this.endSequenceNumber=0;this.endChainStr=null;this.endInsertionCode="\x00";this.bsAll=this.modelStartEnd=this.atomStartEnd=null;u(this,arguments)},
J.adapter.smarter,"Structure");O(c$,function(){this.atomStartEnd=v(2,0);this.modelStartEnd=v(-1,[-1,-1])});c$.getHelixType=e(c$,"getHelixType",function(a){switch(a){case 1:return J.c.STR.HELIXALPHA;case 3:return J.c.STR.HELIXPI;case 5:return J.c.STR.HELIX310}return J.c.STR.HELIX},"~N");w(c$,function(a,b,c,d,f,g,h){null!=h?(this.modelStartEnd=v(-1,[0,a]),this.bsAll=h):(this.structureType=b,this.substructureType=c,null!=d&&(this.modelStartEnd[0]=this.modelStartEnd[1]=a,this.structureID=d,this.strandCount=
g,this.serialID=f))},"~N,J.c.STR,J.c.STR,~S,~N,~N,~A");e(c$,"set",function(a,b,c,d,f,g,h,e){this.startChainID=a;this.startSequenceNumber=b;this.startInsertionCode=c;this.endChainID=d;this.endSequenceNumber=f;this.endInsertionCode=g;this.atomStartEnd[0]=h;this.atomStartEnd[1]=e},"~N,~N,~S,~N,~N,~S,~N,~N")});n("JM");q(["JM.Group"],"JM.Monomer","java.lang.Float JU.Measure $.P3 $.Quat J.c.STR JM.BioResolver $.ProteinStructure JU.Escape $.Logger JV.JC".split(" "),function(){c$=t(function(){this.offsets=
this.bioPolymer=null;this.monomerIndex=-1;this.theta=this.mu=this.straightness=this.omega=this.psi=this.phi=NaN;this.backboneBlockVis=!1;u(this,arguments)},JM,"Monomer",JM.Group);w(c$,function(){I(this,JM.Monomer,[])});c$.have=e(c$,"have",function(a,b){return 255!=(a[b]&255)},"~A,~N");e(c$,"set2",function(a,b,c,d,f,g){this.setGroup(a,b,c,d,f);this.offsets=g;this.setLeadAtomIndex();return this},"JM.Chain,~S,~N,~N,~N,~A");e(c$,"setLeadAtomIndex",function(){var a=this.offsets[0]&255;255!=a&&(this.leadAtomIndex=
this.firstAtomIndex+a)});e(c$,"setBioPolymer",function(a,b){this.bioPolymer=a;this.monomerIndex=b},"JM.BioPolymer,~N");j(c$,"getSelectedMonomerCount",function(){return null==this.bioPolymer?0:this.bioPolymer.getSelectedMonomerCount()});j(c$,"getSelectedMonomerIndex",function(){return null==this.bioPolymer||!this.bioPolymer.isMonomerSelected(this.monomerIndex)?-1:this.monomerIndex});j(c$,"getBioPolymerLength",function(){return null==this.bioPolymer?0:this.bioPolymer.monomerCount});e(c$,"getMonomerIndex",
function(){return this.monomerIndex});j(c$,"getAtomIndex",function(a,b){if(null!=this.bioPolymer){var c=this.bioPolymer.monomers,d=this.monomerIndex+b;if(0<=d&&d<c.length){c=c[d];if(1==b&&!c.isConnectedPrevious())return-1;if("\x00".equals(a))return c.leadAtomIndex;for(var d=this.chain.model.ms.at,f=c.firstAtomIndex;f<=c.lastAtomIndex;f++)if(null!=d[f]&&(null==a||a.equalsIgnoreCase(d[f].getAtomName())))return f}}return-1},"~S,~N");e(c$,"getBioPolymerIndexInModel",function(){return null==this.bioPolymer?
-1:this.bioPolymer.bioPolymerIndexInModel});c$.scanForOffsets=e(c$,"scanForOffsets",function(a,b,c){for(var d=c.length,f=G(d,0);0<=--d;){var g,h=c[d];if(0>h)g=b[~h];else if(g=b[h],0>g)return null;var e;if(0>g)e=255;else if(e=g-a,0>e||254<e)JU.Logger.warn("Monomer.scanForOffsets i="+d+" atomID="+h+" atomIndex:"+g+" firstAtomIndex:"+a+" offset out of 0-254 range. Groups aren't organized correctly. Is this really a protein?: "+e),0>h&&(e=255);f[d]=e}return f},"~N,~A,~A");j(c$,"getProteinStructureType",
function(){return J.c.STR.NONE});e(c$,"isHelix",function(){return!1});e(c$,"isSheet",function(){return!1});j(c$,"setStrucNo",function(){},"~N");e(c$,"getAtomFromOffsetIndex",function(a){if(a>this.offsets.length)return null;a=this.offsets[a]&255;return 255==a?null:this.chain.model.ms.at[this.firstAtomIndex+a]},"~N");e(c$,"getSpecialAtom",function(a,b){for(var c=a.length;0<=--c;){var d=a[c];0>d&&(d=-d);if(b==d)return c=this.offsets[c]&255,255==c?null:this.chain.model.ms.at[this.firstAtomIndex+c]}return null},
"~A,~N");e(c$,"getSpecialAtomPoint",function(a,b){for(var c=a.length;0<=--c;){var d=a[c];0>d&&(d=-d);if(b==d)return c=this.offsets[c]&255,255==c?null:this.chain.model.ms.at[this.firstAtomIndex+c]}return null},"~A,~N");j(c$,"isLeadAtom",function(a){return a==this.leadAtomIndex},"~N");j(c$,"getLeadAtom",function(){return this.getAtomFromOffsetIndex(0)});e(c$,"getWingAtom",function(){return this.getAtomFromOffsetIndex(1)});e(c$,"getInitiatorAtom",function(){return this.getLeadAtom()});e(c$,"getTerminatorAtom",
function(){return this.getLeadAtom()});e(c$,"findNearestAtomIndex",function(){},"~N,~N,~A,~N,~N");e(c$,"getMyInfo",function(a){a=this.getGroupInfo(this.groupIndex,a);a.put("chain",this.chain.getIDStr());var b=this.getResno();0<b&&a.put("sequenceNumber",Integer.$valueOf(b));b=this.getInsertionCode();0!=b.charCodeAt(0)&&a.put("insertionCode",""+b);b=this.getGroupParameter(1111490569);Float.isNaN(b)||a.put("phi",Float.$valueOf(b));b=this.getGroupParameter(1111490570);Float.isNaN(b)||a.put("psi",Float.$valueOf(b));
b=this.getGroupParameter(1111490565);Float.isNaN(b)||a.put("mu",Float.$valueOf(b));b=this.getGroupParameter(1111490576);Float.isNaN(b)||a.put("theta",Float.$valueOf(b));b=this.getStructure();r(b,JM.ProteinStructure)&&(a.put("structureId",Integer.$valueOf(b.strucNo)),a.put("structureType",b.type.getBioStructureTypeName(!1)));a.put("shapeVisibilityFlags",Integer.$valueOf(this.shapeVisibilityFlags));return a},"JU.P3");j(c$,"getStructureId",function(){var a=this.getStructure();return r(a,JM.ProteinStructure)?
a.type.getBioStructureTypeName(!1):""});e(c$,"updateOffsetsForAlternativeLocations",function(a,b){for(var c=this.offsets.length;0<=--c;){var d=this.offsets[c]&255;if(255!=d){var d=this.firstAtomIndex+d,f=a[d],g=f.atomID;if(0!=f.altloc.charCodeAt(0))for(var h=this.lastAtomIndex-this.firstAtomIndex,e=1;e<=h;e++){var k=d+e;k>this.lastAtomIndex&&(k-=h+1);var m=k-this.firstAtomIndex;if(!(0>m||255<m||k==d||!b.get(k))){var l=a[k].atomID;if(!(l!=g||0==l&&!a[k].getAtomName().equals(f.getAtomName()))){this.offsets[c]=
m;a[k].nBackbonesDisplayed=f.nBackbonesDisplayed;break}}}}}this.setLeadAtomIndex()},"~A,JU.BS");e(c$,"getMonomerSequenceAtoms",function(a,b){this.setAtomBits(b);b.and(a)},"JU.BS,JU.BS");c$.checkOptional=e(c$,"checkOptional",function(a,b,c,d){if(JM.Monomer.have(a,b))return!0;if(0>d)return!1;a[b]=d-c;return!0},"~A,~N,~N,~N");e(c$,"getQuaternionFrameCenter",function(){return null},"~S");e(c$,"getHelixData2",function(a,b,c){if(0>this.monomerIndex)return null;var d=this.monomerIndex-c,f=1>c||0>=this.monomerIndex?
null:this.bioPolymer.monomers[d],d=this.getQuaternion(b),g=1>c?JU.Quat.getQuaternionFrameV(JV.JC.axisX,JV.JC.axisY,JV.JC.axisZ,!1):null==f?null:f.getQuaternion(b);if(null==g||null==d)return R(this,JM.Monomer,"getHelixData",[a,b,c]);var f=1>c?JU.P3.new3(0,0,0):f.getQuaternionFrameCenter(b),h=this.getQuaternionFrameCenter(b);return null==f||null==h?this.getHelixData(a,b,c):JU.Escape.escapeHelical(135176==a?"helixaxis"+this.getUniqueID():null,a,f,h,JU.Measure.computeHelicalAxis(f,h,d.div(g)))},"~N,~S,~N");
e(c$,"getUniqueID",function(){var a=this.chain.chainID,b=this.getLeadAtom(),a=(null==b?"":"_"+b.mi)+"_"+this.getResno()+(0==a?"":"_"+a),b=null==b?"\x00":this.getLeadAtom().altloc;"\x00"!=b&&(a+="_"+b);return a});j(c$,"isCrossLinked",function(a){for(var b=this.firstAtomIndex;b<=this.lastAtomIndex;b++)if(this.getCrossLinkGroup(b,null,a,!0,!0,!1))return!0;return!1},"JM.Group");j(c$,"getCrossLinkVector",function(a,b,c){for(var d=null==a,f=this.firstAtomIndex;f<=this.lastAtomIndex;f++)if(this.getCrossLinkGroup(f,
a,null,b,c,d)&&d)return!0;return!d&&0<a.size()},"JU.Lst,~B,~B");e(c$,"getCrossLinkGroup",function(a,b,c,d,f,g){var h=this.chain.model.ms.at[a],e=h.bonds,k=this.getBioPolymerIndexInModel();if(0>k||null==e)return!1;var m=!1;g=!g&&null==b&&null==c;for(var l=0;l<e.length;l++){var p=e[l];if(!(p.isCovalent()?!d:!f)){var p=p.getOtherAtom(h),j=p.group;if(!(null!=c&&j!==c)){var y=j.getBioPolymerIndexInModel(),n=j.getMonomerIndex();if(g){if(y==k&&n==this.monomerIndex-1)return!0}else if(0<=y&&0<=n&&(y!=k||n<
this.monomerIndex-1||n>this.monomerIndex+1)){m=!0;if(null!=c||null==b)break;b.addLast(Integer.$valueOf(a));b.addLast(Integer.$valueOf(p.i));b.addLast(Integer.$valueOf(j.leadAtomIndex))}}}}return m},"~N,JU.Lst,JM.Group,~B,~B,~B");e(c$,"isConnectedPrevious",function(){return!0});e(c$,"setGroupParameter",function(a,b){switch(a){case 1111490569:this.phi=b;break;case 1111490570:this.psi=b;break;case 1111490568:this.omega=b;break;case 1111490565:this.mu=b;break;case 1111490576:this.theta=b;break;case 1111490574:this.straightness=
b}},"~N,~N");j(c$,"getGroupParameter",function(a){if(null==this.bioPolymer)return 0;this.bioPolymer.haveParameters||this.bioPolymer.calcParameters();switch(a){case 1094713361:return 1;case 1111490568:return this.omega;case 1111490569:return this.phi;case 1111490570:return this.psi;case 1111490565:return this.mu;case 1111490576:return this.theta;case 1111490574:return this.straightness}return NaN},"~N");j(c$,"getGroup1",function(){return this.groupID<JM.BioResolver.predefinedGroup1Names.length?JM.BioResolver.predefinedGroup1Names[this.groupID]:
1<this.group1.charCodeAt(0)?this.group1:1==this.group1.charCodeAt(0)?"?":this.group1=this.getGroup1b()});e(c$,"getGroup1b",function(){return"?"});j(c$,"setGroupID",function(a){this.groupID=JM.BioResolver.getGroupIdFor(a)},"~S");j(c$,"toString",function(){return"["+this.getGroup3()+"-"+this.getSeqcodeString()+" "+this.getStructure()+"]"})});n("JM");q(["JM.Monomer"],"JM.AlphaMonomer","JU.Quat $.V3 J.c.STR JM.Helix $.Sheet $.Turn".split(" "),function(){c$=t(function(){this.nitrogenHydrogenPoint=this.proteinStructure=
null;u(this,arguments)},JM,"AlphaMonomer",JM.Monomer);j(c$,"isProtein",function(){return!0});c$.validateAndAllocateA=e(c$,"validateAndAllocateA",function(a,b,c,d,f,g){return d!=f||g[2]!=d?null:(new JM.AlphaMonomer).set2(a,b,c,d,f,JM.AlphaMonomer.alphaOffsets)},"JM.Chain,~S,~N,~N,~N,~A");K(c$,function(){});e(c$,"isAlphaMonomer",function(){return!0});j(c$,"getStructure",function(){return this.proteinStructure});e(c$,"setStructure",function(a){if(null==(this.proteinStructure=a))this.nitrogenHydrogenPoint=
null},"JM.ProteinStructure");j(c$,"setStrucNo",function(a){null!=this.proteinStructure&&(this.proteinStructure.strucNo=a)},"~N");j(c$,"getProteinStructureType",function(){return null==this.proteinStructure?J.c.STR.NONE:this.proteinStructure.type});j(c$,"getProteinStructureSubType",function(){return null==this.proteinStructure?J.c.STR.NONE:this.proteinStructure.subtype});j(c$,"getStrucNo",function(){return null!=this.proteinStructure?this.proteinStructure.strucNo:0});j(c$,"isHelix",function(){return null!=
this.proteinStructure&&this.proteinStructure.type===J.c.STR.HELIX});j(c$,"isSheet",function(){return null!=this.proteinStructure&&this.proteinStructure.type===J.c.STR.SHEET});j(c$,"setProteinStructureType",function(a,b){null!=this.proteinStructure&&this.proteinStructure.removeMonomer(this.monomerIndex);if(0>b||0<b&&0==this.monomerIndex)switch(a){case J.c.STR.HELIX:case J.c.STR.HELIXALPHA:case J.c.STR.HELIX310:case J.c.STR.HELIXPI:this.setStructure(new JM.Helix(this.bioPolymer,this.monomerIndex,1,
a));break;case J.c.STR.SHEET:this.setStructure(new JM.Sheet(this.bioPolymer,this.monomerIndex,1,a));break;case J.c.STR.TURN:this.setStructure(new JM.Turn(this.bioPolymer,this.monomerIndex,1));break;case J.c.STR.NONE:this.setStructure(null)}else this.setStructure(this.bioPolymer.getProteinStructure(b)),null!=this.proteinStructure&&this.proteinStructure.addMonomer(this.monomerIndex);return this.monomerIndex},"J.c.STR,~N");e(c$,"getAtom",function(a){return 2==a?this.getLeadAtom():null},"~N");e(c$,"getAtomPoint",
function(a){return 2==a?this.getLeadAtom():null},"~N");j(c$,"isConnectedAfter",function(a){if(null==a)return!0;var b=this.getLeadAtom();a=a.getLeadAtom();return b.isBonded(a)||4.2>=b.distance(a)},"JM.Monomer");j(c$,"getQuaternionFrameCenter",function(a){return this.getQuaternionFrameCenterAlpha(a)},"~S");j(c$,"isWithinStructure",function(a){return null!=this.proteinStructure&&this.proteinStructure.type===a&&this.proteinStructure.isWithin(this.monomerIndex)},"J.c.STR");e(c$,"getQuaternionFrameCenterAlpha",
function(a){switch(a){case "b":case "c":case "C":case "x":return this.getLeadAtom();default:case "a":case "n":case "p":case "P":case "q":return null}},"~S");j(c$,"getHelixData",function(a,b,c){return this.getHelixData2(a,b,c)},"~N,~S,~N");j(c$,"getQuaternion",function(a){return this.getQuaternionAlpha(a)},"~S");e(c$,"getQuaternionAlpha",function(a){if(0>this.monomerIndex)return null;var b=new JU.V3,c=new JU.V3;switch(a){default:case "a":case "n":case "p":case "q":return null;case "b":case "c":case "x":if(0==
this.monomerIndex||this.monomerIndex==this.bioPolymer.monomerCount-1)return null;a=this.getLeadAtom();var d=this.bioPolymer.getLeadPoint(this.monomerIndex+1),f=this.bioPolymer.getLeadPoint(this.monomerIndex-1);b.sub2(d,a);c.sub2(f,a)}return JU.Quat.getQuaternionFrameV(b,c,null,!1)},"~S");z(c$,"alphaOffsets",G(-1,[0]))});n("JM");q(["JM.Structure"],"JM.ProteinStructure",["java.util.Hashtable","JU.P3","$.V3","JU.Logger"],function(){c$=t(function(){this.structureID=this.subtype=this.type=null;this.serialID=
this.strucNo=0;this.strandCount=1;this.nRes=this.id=0;this.apolymer=null;this.monomerIndexLast=this.monomerIndexFirst=0;this.resMap=this.segments=this.vectorProjection=this.axisUnitVector=this.axisB=this.axisA=null;u(this,arguments)},JM,"ProteinStructure",null,JM.Structure);w(c$,function(){this.id=++JM.ProteinStructure.ids});e(c$,"setupPS",function(a,b,c,d){this.strucNo=++JM.ProteinStructure.globalStrucNo;this.apolymer=a;this.type=b;this.vectorProjection=new JU.V3;this.monomerIndexFirst=c;this.addMonomer(c+
d-1);JU.Logger.debugging&&JU.Logger.info("Creating ProteinStructure "+this.strucNo+" "+b.getBioStructureTypeName(!1)+" from "+a.monomers[this.monomerIndexFirst]+" through "+a.monomers[this.monomerIndexLast]+" in polymer "+a)},"JM.AlphaPolymer,J.c.STR,~N,~N");e(c$,"addMonomer",function(a){this.resMap=null;this.resetAxes();this.monomerIndexFirst=Math.min(this.monomerIndexFirst,a);this.monomerIndexLast=Math.max(this.monomerIndexLast,a);this.nRes=this.monomerIndexLast-this.monomerIndexFirst+1},"~N");
e(c$,"removeMonomer",function(a){this.resMap=null;this.resetAxes();if(!(a>this.monomerIndexLast||a<this.monomerIndexFirst))if(a==this.monomerIndexFirst)this.monomerIndexFirst++,this.nRes--;else if(a==this.monomerIndexLast)this.monomerIndexLast--,this.nRes--;else{var b=this.monomerIndexLast-a;this.monomerIndexLast=a-1;this.nRes=a-this.monomerIndexFirst;for(var c=this.apolymer.monomers,d=c[++a].getProteinStructureType(),f=-1,g=0;g<b;g++,a++)c[a].setStructure(null),f=c[a].setProteinStructureType(d,f)}},
"~N");e(c$,"calcAxis",function(){});e(c$,"isWithin",function(a){return a>this.monomerIndexFirst&&a<this.monomerIndexLast},"~N");e(c$,"getIndex",function(a){if(null==this.resMap){this.resMap=new java.util.Hashtable;for(var b=this.nRes;0<=--b;)this.resMap.put(this.apolymer.monomers[this.monomerIndexFirst+b],Integer.$valueOf(b))}a=this.resMap.get(a);return null==a?-1:a.intValue()},"JM.Monomer");e(c$,"getSegments",function(){null==this.segments&&this.calcSegments();return this.segments});e(c$,"getStructureMidPoint",
function(a){null==this.segments&&this.calcSegments();return this.segments[a]},"~N");e(c$,"calcSegments",function(){if(null==this.segments){this.calcAxis();this.segments=Array(this.nRes+1);this.segments[this.nRes]=this.axisB;this.segments[0]=this.axisA;var a=JU.V3.newV(this.axisUnitVector);a.scale(this.axisB.distance(this.axisA)/this.nRes);for(var b=1;b<this.nRes;b++)(this.segments[b]=new JU.P3).add2(this.segments[b-1],a)}});e(c$,"getAxisStartPoint",function(){this.calcAxis();return this.axisA});e(c$,
"getAxisEndPoint",function(){this.calcAxis();return this.axisB});e(c$,"resetAxes",function(){this.segments=this.axisA=null});j(c$,"setAtomBits",function(a){for(var b=this.apolymer.monomers,c=this.monomerIndexFirst;c<=this.monomerIndexLast;c++)b[c].setAtomBits(a)},"JU.BS");j(c$,"setAtomBitsAndClear",function(a,b){for(var c=this.apolymer.monomers,d=this.monomerIndexFirst;d<=this.monomerIndexLast;d++)c[d].setAtomBitsAndClear(a,b)},"JU.BS,JU.BS");e(c$,"findMonomer",function(a,b){var c=this.apolymer.monomers;
if(0>this.monomerIndexFirst)return null;if(b)for(var d=this.monomerIndexFirst;d<=this.monomerIndexLast;d++){if(null==a||a.get(c[d].leadAtomIndex))return c[d]}else for(d=this.monomerIndexLast;d>=this.monomerIndexFirst;--d)if(null==a||a.get(c[d].leadAtomIndex))return c[d];return null},"JU.BS,~B");j(c$,"toString",function(){return"["+this.id+" "+this.type+(null==this.subtype?"":" "+this.subtype)+" ("+this.monomerIndexFirst+"-"+this.monomerIndexLast+")]"});z(c$,"ids",0,"globalStrucNo",1E3)});n("JM");
q(["JM.ProteinStructure"],"JM.Helix",["JU.Measure","$.P3","$.V3","J.c.STR"],function(){c$=A(JM,"Helix",JM.ProteinStructure);K(c$,function(a,b,c,d){this.setupPS(a,J.c.STR.HELIX,b,c);this.subtype=d},"JM.AlphaPolymer,~N,~N,J.c.STR");j(c$,"calcAxis",function(){if(null==this.axisA){for(var a=Array(this.nRes+1),b=0;b<=this.nRes;b++)this.apolymer.getLeadMidPoint(this.monomerIndexFirst+b,a[b]=new JU.P3);this.axisA=new JU.P3;this.axisUnitVector=new JU.V3;JU.Measure.calcBestAxisThroughPoints(a,this.axisA,this.axisUnitVector,
this.vectorProjection,4);this.axisB=JU.P3.newP(a[this.nRes]);JU.Measure.projectOntoAxis(this.axisB,this.axisA,this.axisUnitVector,this.vectorProjection)}})});n("JM");q(["JM.ProteinStructure"],"JM.Sheet",["JU.Measure","$.P3","$.V3","J.c.STR","JM.AminoPolymer"],function(){c$=t(function(){this.heightUnitVector=this.widthUnitVector=null;u(this,arguments)},JM,"Sheet",JM.ProteinStructure);K(c$,function(a,b,c,d){this.setupPS(a,J.c.STR.SHEET,b,c);this.subtype=d},"JM.AlphaPolymer,~N,~N,J.c.STR");j(c$,"calcAxis",
function(){if(null==this.axisA){2==this.nRes?(this.axisA=this.apolymer.getLeadPoint(this.monomerIndexFirst),this.axisB=this.apolymer.getLeadPoint(this.monomerIndexFirst+1)):(this.axisA=new JU.P3,this.apolymer.getLeadMidPoint(this.monomerIndexFirst+1,this.axisA),this.axisB=new JU.P3,this.apolymer.getLeadMidPoint(this.monomerIndexFirst+this.nRes-1,this.axisB));this.axisUnitVector=new JU.V3;this.axisUnitVector.sub2(this.axisB,this.axisA);this.axisUnitVector.normalize();var a=new JU.P3;this.apolymer.getLeadMidPoint(this.monomerIndexFirst,
a);this.notHelixOrSheet(this.monomerIndexFirst-1)&&JU.Measure.projectOntoAxis(a,this.axisA,this.axisUnitVector,this.vectorProjection);var b=new JU.P3;this.apolymer.getLeadMidPoint(this.monomerIndexFirst+this.nRes,b);this.notHelixOrSheet(this.monomerIndexFirst+this.nRes)&&JU.Measure.projectOntoAxis(b,this.axisA,this.axisUnitVector,this.vectorProjection);this.axisA=a;this.axisB=b}});e(c$,"notHelixOrSheet",function(a){return 0>a||a>=this.apolymer.monomerCount||!this.apolymer.monomers[a].isHelix()&&!this.apolymer.monomers[a].isSheet()},
"~N");e(c$,"calcSheetUnitVectors",function(){if(r(this.apolymer,JM.AminoPolymer)&&null==this.widthUnitVector){var a=new JU.V3,b=new JU.V3,c=this.apolymer.monomers[this.monomerIndexFirst];b.sub2(c.getCarbonylOxygenAtom(),c.getCarbonylCarbonAtom());for(var d=this.nRes;--d>this.monomerIndexFirst;)c=this.apolymer.monomers[d],a.sub2(c.getCarbonylOxygenAtom(),c.getCarbonylCarbonAtom()),1.5707964>b.angle(a)?b.add(a):b.sub(a);this.heightUnitVector=a;this.heightUnitVector.cross(this.axisUnitVector,b);this.heightUnitVector.normalize();
this.widthUnitVector=b;this.widthUnitVector.cross(this.axisUnitVector,this.heightUnitVector)}});e(c$,"setBox",function(a,b,c,d,f,g,h){null==this.heightUnitVector&&this.calcSheetUnitVectors();d.setT(this.widthUnitVector);d.scale(h*a);f.setT(this.heightUnitVector);f.scale(h*b);g.ave(d,f);g.sub2(c,g)},"~N,~N,JU.P3,JU.V3,JU.V3,JU.P3,~N")});n("JM");q(["JM.ProteinStructure"],"JM.Turn",["J.c.STR"],function(){c$=A(JM,"Turn",JM.ProteinStructure);K(c$,function(a,b,c){this.setupPS(a,J.c.STR.TURN,b,c);this.subtype=
J.c.STR.TURN},"JM.AlphaPolymer,~N,~N")});n("JM");q(["JM.Structure","JU.V3"],"JM.BioPolymer",["java.lang.Float","JU.BS","$.P3"],function(){c$=t(function(){this.monomers=this.model=null;this.hasStructure=!1;this.leadAtomIndices=this.wingVectors=this.controlPoints=this.leadPoints=this.leadMidpoints=null;this.cyclicFlag=this.monomerCount=this.bioPolymerIndexInModel=this.type=0;this.invalidControl=this.invalidLead=!1;this.sheetSmoothing=0;this.hasWingPoints=!1;this.reversed=null;this.twistedSheets=!1;
this.unitVectorX=null;this.selectedMonomerCount=0;this.bsSelectedMonomers=null;this.haveParameters=!1;u(this,arguments)},JM,"BioPolymer",null,JM.Structure);O(c$,function(){this.unitVectorX=JU.V3.new3(1,0,0)});w(c$,function(){});e(c$,"set",function(a){this.monomers=a;for(var b=this.monomerCount=a.length;0<=--b;)a[b].setBioPolymer(this,b);this.model=a[0].getModel()},"~A");j(c$,"setAtomBits",function(a){this.getRange(a,!0)},"JU.BS");j(c$,"setAtomBitsAndClear",function(a,b){for(var c=this.monomerCount;0<=
--c;)this.monomers[c].setAtomBitsAndClear(a,b)},"JU.BS,JU.BS");e(c$,"getRange",function(a,b){if(0!=this.monomerCount)if(b)for(var c=this.monomerCount;0<=--c;)this.monomers[c].setAtomBits(a);else a.setBits(this.monomers[0].firstAtomIndex,this.monomers[this.monomerCount-1].lastAtomIndex+1)},"JU.BS,~B");e(c$,"clearStructures",function(){});e(c$,"getLeadAtomIndices",function(){null==this.leadAtomIndices&&(this.leadAtomIndices=v(this.monomerCount,0),this.invalidLead=!0);if(this.invalidLead){for(var a=
this.monomerCount;0<=--a;)this.leadAtomIndices[a]=this.monomers[a].leadAtomIndex;this.invalidLead=!1}return this.leadAtomIndices});e(c$,"getIndex",function(a,b,c,d){var f;for(f=this.monomerCount;0<=--f;){var g=this.monomers[f];if(g.chain.chainID==a&&g.seqcode==b&&(0>c||c==g.firstAtomIndex||d==g.lastAtomIndex))break}return f},"~N,~N,~N,~N");e(c$,"getLeadPoint",function(a){return this.monomers[a].getLeadAtom()},"~N");e(c$,"getInitiatorPoint",function(){return this.monomers[0].getInitiatorAtom()});e(c$,
"getTerminatorPoint",function(){return this.monomers[this.monomerCount-1].getTerminatorAtom()});e(c$,"getLeadMidPoint",function(a,b){if(a==this.monomerCount)--a;else if(0<a){b.ave(this.getLeadPoint(a),this.getLeadPoint(a-1));return}b.setT(this.getLeadPoint(a))},"~N,JU.P3");e(c$,"getWingPoint",function(a){return this.monomers[a].getWingAtom()},"~N");e(c$,"setConformation",function(a){for(var b=this.model.ms.at,c=this.monomerCount;0<=--c;)this.monomers[c].updateOffsetsForAlternativeLocations(b,a);this.recalculateLeadMidpointsAndWingVectors()},
"JU.BS");e(c$,"recalculateLeadMidpointsAndWingVectors",function(){this.invalidLead=this.invalidControl=!0;this.getLeadAtomIndices();this.resetHydrogenPoints();this.calcLeadMidpointsAndWingVectors()});e(c$,"resetHydrogenPoints",function(){});e(c$,"getLeadMidpoints",function(){null==this.leadMidpoints&&this.calcLeadMidpointsAndWingVectors();return this.leadMidpoints});e(c$,"getLeadPoints",function(){null==this.leadPoints&&this.calcLeadMidpointsAndWingVectors();return this.leadPoints});e(c$,"getControlPoints",
function(a,b,c){c&&(this.invalidControl=!0);return!a?this.leadMidpoints:0==b?this.leadPoints:this.getControlPoints2(b)},"~B,~N,~B");e(c$,"getControlPoints2",function(a){if(!this.invalidControl&&a==this.sheetSmoothing)return this.controlPoints;this.getLeadPoints();var b=new JU.V3;null==this.controlPoints&&(this.controlPoints=Array(this.monomerCount+1));Float.isNaN(a)||(this.sheetSmoothing=a);for(a=0;a<this.monomerCount;a++)this.controlPoints[a]=this.getControlPoint(a,b);this.controlPoints[this.monomerCount]=
this.getTerminatorPoint();this.invalidControl=!1;return this.controlPoints},"~N");e(c$,"getControlPoint",function(a){return this.leadPoints[a]},"~N,JU.V3");e(c$,"getWingVectors",function(){null==this.leadMidpoints&&this.calcLeadMidpointsAndWingVectors();return this.wingVectors});e(c$,"calcLeadMidpointsAndWingVectors",function(){null==this.leadMidpoints&&(this.leadMidpoints=Array(this.monomerCount+1),this.leadPoints=Array(this.monomerCount+1),this.wingVectors=Array(this.monomerCount+1),this.sheetSmoothing=
1.4E-45);null==this.reversed?this.reversed=JU.BS.newN(this.monomerCount):this.reversed.clearAll();this.twistedSheets=this.model.ms.vwr.getBoolean(603979968);var a=new JU.V3,b=new JU.V3,c=new JU.V3,d=new JU.V3,f,g;this.leadMidpoints[0]=this.getInitiatorPoint();this.leadPoints[0]=g=this.getLeadPoint(0);for(var h=null,e=1;e<this.monomerCount;++e){f=g;g=this.getLeadPoint(e);if(null==g)return;this.leadPoints[e]=g;var k=new JU.P3;k.ave(g,f);this.leadMidpoints[e]=k;this.hasWingPoints&&(a.sub2(g,f),b.sub2(f,
this.getWingPoint(e-1)),c.cross(a,b),d.cross(a,c),d.normalize(),!this.twistedSheets&&(null!=h&&1.5707963267948966<h.angle(d))&&(this.reversed.set(e),d.scale(-1)),h=this.wingVectors[e]=JU.V3.newV(d))}this.leadPoints[this.monomerCount]=this.leadMidpoints[this.monomerCount]=this.getTerminatorPoint();if(!this.hasWingPoints)if(3>this.monomerCount)this.wingVectors[1]=this.unitVectorX;else{d=null;for(e=1;e<this.monomerCount;++e)a.sub2(this.leadMidpoints[e],this.leadPoints[e]),b.sub2(this.leadPoints[e],this.leadMidpoints[e+
1]),0==b.length()?c=d:(c.cross(a,b),c.normalize(),null!=d&&1.5707963267948966<d.angle(c)&&c.scale(-1)),d=this.wingVectors[e]=JU.V3.newV(c)}this.wingVectors[0]=this.wingVectors[1];this.wingVectors[this.monomerCount]=this.wingVectors[this.monomerCount-1]});e(c$,"findNearestAtomIndex",function(a,b,c,d,f,g){for(var h=this.monomerCount;0<=--h;)if(0!=(this.monomers[h].shapeVisibilityFlags&f)){var e=this.monomers[h].getLeadAtom();e.checkVisible()&&!(null!=g&&g.get(e.i))&&(0<d[h]||0<d[h+1])&&this.monomers[h].findNearestAtomIndex(a,
b,c,d[h],d[h+1])}},"~N,~N,~A,~A,~N,JU.BS");e(c$,"getSelectedMonomerCount",function(){return this.selectedMonomerCount});e(c$,"calcSelectedMonomersCount",function(a){this.selectedMonomerCount=0;null==this.bsSelectedMonomers&&(this.bsSelectedMonomers=new JU.BS);this.bsSelectedMonomers.clearAll();for(var b=0;b<this.monomerCount;b++)this.monomers[b].isSelected(a)&&(++this.selectedMonomerCount,this.bsSelectedMonomers.set(b))},"JU.BS");e(c$,"isMonomerSelected",function(a){return 0<=a&&this.bsSelectedMonomers.get(a)},
"~N");e(c$,"getPolymerPointsAndVectors",function(a,b,c,d,f){d=this.getControlPoints(d,f,!1);f=this.getWingVectors();for(var g=this.monomerCount,h=0;h<g;h++)b.get(this.monomers[h].leadAtomIndex)?(c.addLast(D(-1,[d[h],JU.P3.newP(f[h])])),a=h):2147483646!=a&&(c.addLast(D(-1,[d[h],JU.P3.newP(f[h])])),a=2147483646);a+1<g&&c.addLast(D(-1,[d[a+1],JU.P3.newP(f[a+1])]));return a},"~N,JU.BS,JU.Lst,~B,~N");e(c$,"getSequence",function(){for(var a=M(this.monomerCount,"\x00"),b=0;b<this.monomerCount;b++)a[b]=this.monomers[b].getGroup1();
return String.valueOf(a)});e(c$,"getPolymerSequenceAtoms",function(a,b,c,d){for(b=Math.min(this.monomerCount,a+b);--b>=a;)this.monomers[b].getMonomerSequenceAtoms(c,d)},"~N,~N,JU.BS,JU.BS");e(c$,"getProteinStructure",function(){return null},"~N");e(c$,"calcParameters",function(){this.haveParameters=!0;return this.calcEtaThetaAngles()||this.calcPhiPsiAngles()});e(c$,"calcEtaThetaAngles",function(){return!1});e(c$,"calcPhiPsiAngles",function(){return!1});e(c$,"calculateRamachandranHelixAngle",function(){return NaN},
"~N,~S");e(c$,"isNucleic",function(){return 0<this.monomerCount&&r(this,JM.NucleicPolymer)});e(c$,"getRangeGroups",function(a,b,c){for(var d=new JU.BS,f=0;f<this.monomerCount;f++)this.monomers[f].isSelected(b)&&(d.setBits(Math.max(0,f-a),f+a+1),f+=a-1);for(f=d.nextSetBit(0);0<=f&&f<this.monomerCount;f=d.nextSetBit(f+1))this.monomers[f].setAtomBits(c)},"~N,JU.BS,JU.BS");e(c$,"calcRasmolHydrogenBonds",function(){},"JM.BioPolymer,JU.BS,JU.BS,JU.Lst,~N,~A,~B,~B");e(c$,"getType",function(){return this.type});
e(c$,"isCyclic",function(){return 1==(0==this.cyclicFlag?this.cyclicFlag=4<=this.monomerCount&&this.monomers[0].isConnectedAfter(this.monomers[this.monomerCount-1])?1:-1:this.cyclicFlag)});j(c$,"toString",function(){return"[Polymer type "+this.type+" n="+this.monomerCount+" "+(0<this.monomerCount?this.monomers[0]+" "+this.monomers[this.monomerCount-1]:"")+"]"});z(c$,"TYPE_NOBONDING",0,"TYPE_AMINO",1,"TYPE_NUCLEIC",2,"TYPE_CARBOHYDRATE",3)});n("JM");q(["java.lang.Enum","JM.BioPolymer"],"JM.AlphaPolymer",
"JU.Measure $.P3 J.c.STR JM.Helix $.Sheet $.Turn JU.Logger".split(" "),function(){c$=t(function(){this.pt0=0;u(this,arguments)},JM,"AlphaPolymer",JM.BioPolymer);w(c$,function(a,b){I(this,JM.AlphaPolymer,[]);this.pt0=b;this.set(a);this.hasStructure=!0},"~A,~N");j(c$,"getProteinStructure",function(a){return this.monomers[a].getStructure()},"~N");j(c$,"getControlPoint",function(a,b){if(!this.monomers[a].isSheet())return this.leadPoints[a];b.sub2(this.leadMidpoints[a],this.leadPoints[a]);b.scale(this.sheetSmoothing);
var c=JU.P3.newP(this.leadPoints[a]);c.add(b);return c},"~N,JU.V3");e(c$,"addStructure",function(a,b,c,d,f,g,h,e,k,m,l){var p=-1,j=-1;if(k<m){if(this.monomers[0].firstAtomIndex>m||this.monomers[this.monomerCount-1].lastAtomIndex<k)return;p=k;j=m}var n;if(!(-1==(f=this.getIndex(f,g,p,j))||-1==(n=this.getIndex(h,e,p,j)))){if(0<=k&&null!=l&&(h=l.nextSetBit(this.monomers[f].firstAtomIndex),0<=h&&h<this.monomers[n].lastAtomIndex))return;this.addStructureProtected(a,b,c,d,f,n)&&0<=k&&l.setBits(k,m+1)}},
"J.c.STR,~S,~N,~N,~N,~N,~N,~N,~N,~N,JU.BS");e(c$,"addStructureProtected",function(a,b,c,d,f,g){if(g<f)return JU.Logger.error("AlphaPolymer:addSecondaryStructure error:  indexStart:"+f+" indexEnd:"+g),!1;var h=g-f+1,e=null;switch(a){case J.c.STR.HELIX:case J.c.STR.HELIXALPHA:case J.c.STR.HELIX310:case J.c.STR.HELIXPI:e=new JM.Helix(this,f,h,a);break;case J.c.STR.SHEET:e=new JM.Sheet(this,f,h,a);break;case J.c.STR.TURN:e=new JM.Turn(this,f,h);break;default:return JU.Logger.error("unrecognized secondary structure type"),
!1}e.structureID=b;e.serialID=c;e.strandCount=d;for(a=f;a<=g;++a)this.monomers[a].setStructure(e);return!0},"J.c.STR,~S,~N,~N,~N,~N");j(c$,"clearStructures",function(){for(var a=0;a<this.monomerCount;a++)this.monomers[a].setStructure(null)});e(c$,"calculateStructures",function(){if(!(4>this.monomerCount)){var a=this.calculateAnglesInDegrees(),b=this.calculateCodes(a);this.checkBetaSheetAlphaHelixOverlap(b,a);var c=this.calculateRunsFourOrMore(b);this.extendRuns(c);this.searchForTurns(b,a,c);this.addStructuresFromTags(c)}},
"~B");e(c$,"calculateAnglesInDegrees",function(){for(var a=H(this.monomerCount,0),b=this.monomerCount-1;2<=--b;)a[b]=JU.Measure.computeTorsion(this.monomers[b-2].getLeadAtom(),this.monomers[b-1].getLeadAtom(),this.monomers[b].getLeadAtom(),this.monomers[b+1].getLeadAtom(),!0);return a});e(c$,"calculateCodes",function(a){for(var b=Array(this.monomerCount),c=this.monomerCount-1;2<=--c;){var d=a[c];b[c]=10<=d&&120>d?JM.AlphaPolymer.Code.RIGHT_HELIX:120<=d||-90>d?JM.AlphaPolymer.Code.BETA_SHEET:-90<=
d&&0>d?JM.AlphaPolymer.Code.LEFT_HELIX:JM.AlphaPolymer.Code.NADA}return b},"~A");e(c$,"checkBetaSheetAlphaHelixOverlap",function(a,b){for(var c=this.monomerCount-2;2<=--c;)a[c]===JM.AlphaPolymer.Code.BETA_SHEET&&(140>=b[c]&&a[c-2]===JM.AlphaPolymer.Code.RIGHT_HELIX&&a[c-1]===JM.AlphaPolymer.Code.RIGHT_HELIX&&a[c+1]===JM.AlphaPolymer.Code.RIGHT_HELIX&&a[c+2]===JM.AlphaPolymer.Code.RIGHT_HELIX)&&(a[c]=JM.AlphaPolymer.Code.RIGHT_HELIX)},"~A,~A");e(c$,"calculateRunsFourOrMore",function(a){for(var b=Array(this.monomerCount),
c=J.c.STR.NONE,d=JM.AlphaPolymer.Code.NADA,f=0,g=0;g<this.monomerCount;++g)if(a[g]===d&&d!==JM.AlphaPolymer.Code.NADA&&d!==JM.AlphaPolymer.Code.BETA_SHEET)if(++f,4==f)for(var c=d===JM.AlphaPolymer.Code.BETA_SHEET?J.c.STR.SHEET:J.c.STR.HELIX,h=4;0<=--h;)b[g-h]=c;else 4<f&&(b[g]=c);else f=1,d=a[g];return b},"~A");e(c$,"extendRuns",function(a){for(var b=1;b<this.monomerCount-4;++b)a[b]===J.c.STR.NONE&&a[b+1]!==J.c.STR.NONE&&(a[b]=a[b+1]);a[0]=a[1];a[this.monomerCount-1]=a[this.monomerCount-2]},"~A");
e(c$,"searchForTurns",function(a,b,c){for(var d=this.monomerCount-1;2<=--d;)if(a[d]=JM.AlphaPolymer.Code.NADA,null==c[d]||c[d]===J.c.STR.NONE){var f=b[d];-90<=f&&0>f?a[d]=JM.AlphaPolymer.Code.LEFT_TURN:0<=f&&90>f&&(a[d]=JM.AlphaPolymer.Code.RIGHT_TURN)}for(d=this.monomerCount-1;0<=--d;)a[d]!==JM.AlphaPolymer.Code.NADA&&(a[d+1]===a[d]&&c[d]===J.c.STR.NONE)&&(c[d]=J.c.STR.TURN)},"~A,~A,~A");e(c$,"addStructuresFromTags",function(a){for(var b=0;b<this.monomerCount;){var c=a[b];if(null==c||c===J.c.STR.NONE)++b;
else{var d;for(d=b+1;d<this.monomerCount&&a[d]===c;++d);this.addStructureProtected(c,null,0,0,b,d-1);b=d}}},"~A");e(c$,"setStructureBS",function(a,b,c,d,f){f=f?this.pt0:0;for(var g=0,h=d.nextSetBit(f),e=0,k=this.monomerCount+f;0<=h&&h<k;h=d.nextSetBit(e+1)){if(0>(e=d.nextClearBit(h))||e>k)e=k;this.addStructureProtected(c,JM.AlphaPolymer.dsspTypes[b]+ ++g,a++,3==b?1:0,h-f,e-1-f)}return a},"~N,~N,J.c.STR,JU.BS,~B");T(self.c$);c$=A(JM.AlphaPolymer,"Code",Enum);L(c$,"NADA",0,[]);L(c$,"RIGHT_HELIX",1,
[]);L(c$,"BETA_SHEET",2,[]);L(c$,"LEFT_HELIX",3,[]);L(c$,"LEFT_TURN",4,[]);L(c$,"RIGHT_TURN",5,[]);c$=S();z(c$,"dsspTypes",D(-1,["H",null,"H","S","H",null,"T"]))});n("JM");q(["JM.AlphaMonomer"],"JM.AminoMonomer","JU.A4 $.BS $.M3 $.P3 $.PT $.Quat $.V3 J.c.STR JU.Escape $.Logger".split(" "),function(){c$=t(function(){this.nhChecked=!1;this.ptTemp=null;u(this,arguments)},JM,"AminoMonomer",JM.AlphaMonomer);K(c$,function(){});c$.validateAndAllocate=e(c$,"validateAndAllocate",function(a,b,c,d,f,g,h){var e=
JM.Monomer.scanForOffsets(d,g,JM.AminoMonomer.interestingAminoAtomIDs);if(null==e)return null;JM.Monomer.checkOptional(e,1,d,g[5]);return h[d].isHetero()&&!JM.AminoMonomer.isBondedCorrectly(d,e,h)?null:(new JM.AminoMonomer).set2(a,b,c,d,f,e)},"JM.Chain,~S,~N,~N,~N,~A,~A");c$.isBondedCorrectlyRange=e(c$,"isBondedCorrectlyRange",function(a,b,c,d,f){a=c+(d[a]&255);b=c+(d[b]&255);return a!=b&&f[a].isBonded(f[b])},"~N,~N,~N,~A,~A");c$.isBondedCorrectly=e(c$,"isBondedCorrectly",function(a,b,c){return JM.AminoMonomer.isBondedCorrectlyRange(2,
0,a,b,c)&&JM.AminoMonomer.isBondedCorrectlyRange(0,3,a,b,c)&&(!JM.Monomer.have(b,1)||JM.AminoMonomer.isBondedCorrectlyRange(3,1,a,b,c))},"~N,~A,~A");e(c$,"isAminoMonomer",function(){return!0});j(c$,"getNitrogenAtom",function(){return this.getAtomFromOffsetIndex(2)});e(c$,"getCarbonylCarbonAtom",function(){return this.getAtomFromOffsetIndex(3)});j(c$,"getCarbonylOxygenAtom",function(){return this.getWingAtom()});j(c$,"getInitiatorAtom",function(){return this.getNitrogenAtom()});j(c$,"getTerminatorAtom",
function(){return this.getAtomFromOffsetIndex(JM.Monomer.have(this.offsets,4)?4:3)});e(c$,"hasOAtom",function(){return JM.Monomer.have(this.offsets,1)});j(c$,"isConnectedAfter",function(a){return null==a?!0:a.getCarbonylCarbonAtom().isBonded(this.getNitrogenAtom())},"JM.Monomer");j(c$,"findNearestAtomIndex",function(a,b,c,d,f){var g=c[0],h=this.getNitrogenAtom();d=F(d/2);1200>d&&(d=1200);if(0!=h.sZ){d=C(this.scaleToScreen(h.sZ,d));4>d&&(d=4);var e=this.getCarbonylCarbonAtom();f=F(f/2);1200>f&&(f=
1200);f=C(this.scaleToScreen(h.sZ,f));4>f&&(f=4);var k=this.getLeadAtom();if(this.isCursorOnTopOf(k,a,b,F((d+f)/2),g)||this.isCursorOnTopOf(h,a,b,d,g)||this.isCursorOnTopOf(e,a,b,f,g))c[0]=k}},"~N,~N,~A,~N,~N");e(c$,"resetHydrogenPoint",function(){this.nhChecked=!1;this.nitrogenHydrogenPoint=null});e(c$,"getNitrogenHydrogenPoint",function(){null==this.nitrogenHydrogenPoint&&!this.nhChecked&&(this.nhChecked=!0,this.nitrogenHydrogenPoint=this.getExplicitNH());return this.nitrogenHydrogenPoint});e(c$,
"getExplicitNH",function(){var a=this.getNitrogenAtom(),b=null,c=a.bonds;if(null!=c)for(var d=0;d<c.length;d++)if(1==(b=c[d].getOtherAtom(a)).getElementNumber())return b;return null});e(c$,"getNHPoint",function(a,b,c,d){if(0>=this.monomerIndex||15==this.groupID)return!1;var f=this.getNitrogenAtom(),g=this.getNitrogenHydrogenPoint();if(null!=g&&!d)return b.sub2(g,f),a.setT(g),!0;d=this.bioPolymer.monomers[this.monomerIndex-1];if(c)b.sub2(f,this.getLeadAtom()),b.normalize(),c=JU.V3.newVsub(f,d.getCarbonylCarbonAtom()),
c.normalize(),b.add(c);else{c=d.getCarbonylOxygenAtom();if(null==c)return!1;b.sub2(d.getCarbonylCarbonAtom(),c)}b.normalize();a.add2(f,b);this.nitrogenHydrogenPoint=JU.P3.newP(a);JU.Logger.debugging&&JU.Logger.debug('draw ID "pta'+this.monomerIndex+"_"+f.i+'" '+JU.Escape.eP(f)+JU.Escape.eP(a)+" # "+f);return!0},"JU.P3,JU.V3,~B,~B");j(c$,"getQuaternionFrameCenter",function(a){if(0>this.monomerIndex)return null;switch(a){default:case "a":case "b":case "c":case "C":return this.getQuaternionFrameCenterAlpha(a);
case "n":return this.getNitrogenAtom();case "p":case "P":return this.getCarbonylCarbonAtom();case "q":if(this.monomerIndex==this.bioPolymer.monomerCount-1)return null;a=this.bioPolymer.monomers[this.monomerIndex+1];var b=new JU.P3;b.ave(this.getCarbonylCarbonAtom(),a.getNitrogenAtom());return b}},"~S");j(c$,"getQuaternion",function(a){if(0>this.monomerIndex)return null;var b=this.getCarbonylCarbonAtom(),c=this.getLeadAtom(),d=new JU.V3,f=new JU.V3,g=null;switch(a){case "a":case "n":if(0==this.monomerIndex||
15==this.groupID)return null;g=new JU.V3;null==this.ptTemp&&(this.ptTemp=new JU.P3);this.getNHPoint(this.ptTemp,g,!0,!1);f.sub2(c,this.getNitrogenAtom());f.cross(g,f);(new JU.M3).setAA(JU.A4.newVA(f,-0.29670596)).rotate(g);d.cross(f,g);break;case "b":return this.getQuaternionAlpha("b");case "c":d.sub2(b,c);f.sub2(this.getNitrogenAtom(),c);break;case "p":case "x":if(this.monomerIndex==this.bioPolymer.monomerCount-1)return null;d.sub2(c,b);f.sub2(this.bioPolymer.monomers[this.monomerIndex+1].getNitrogenAtom(),
b);break;case "q":if(this.monomerIndex==this.bioPolymer.monomerCount-1)return null;a=this.bioPolymer.monomers[this.monomerIndex+1];f.sub2(a.getLeadAtom(),a.getNitrogenAtom());d.sub2(c,b);break;default:return null}return JU.Quat.getQuaternionFrameV(d,f,g,!1)},"~S");j(c$,"getStructureId",function(){return null==this.proteinStructure||null==this.proteinStructure.structureID?"":this.proteinStructure.structureID});j(c$,"getProteinStructureTag",function(){if(null==this.proteinStructure||null==this.proteinStructure.structureID)return null;
var a;a=JU.PT.formatStringI("%3N %3ID","N",this.proteinStructure.serialID);a=JU.PT.formatStringS(a,"ID",this.proteinStructure.structureID);this.proteinStructure.type===J.c.STR.SHEET&&(a+=JU.PT.formatStringI("%2SC","SC",this.proteinStructure.strandCount));return a});j(c$,"getBSSideChain",function(){var a=new JU.BS;this.setAtomBits(a);this.clear(a,this.getLeadAtom(),!0);this.clear(a,this.getCarbonylCarbonAtom(),!1);this.clear(a,this.getCarbonylOxygenAtom(),!1);this.clear(a,this.getNitrogenAtom(),!0);
return a});e(c$,"clear",function(a,b,c){if(null!=b&&(a.clear(b.i),c)){c=b.bonds;for(var d,f=c.length;0<=--f;)1==(d=c[f].getOtherAtom(b)).getElementNumber()&&a.clear(d.i)}},"JU.BS,JM.Atom,~B");z(c$,"CA",0,"O",1,"N",2,"C",3,"OT",4,"interestingAminoAtomIDs",G(-1,[2,-5,1,3,-65]),"beta",0.29670597283903605)});n("JM");q(["JM.AlphaPolymer"],"JM.AminoPolymer","JU.Measure $.P3 $.V3 J.c.STR JM.HBond JU.Logger".split(" "),function(){c$=t(function(){this.structureList=null;u(this,arguments)},JM,"AminoPolymer",
JM.AlphaPolymer);w(c$,function(a,b){I(this,JM.AminoPolymer,[a,b]);this.type=1;for(var c=0;c<this.monomerCount;++c)if(!a[c].hasOAtom())return;this.hasWingPoints=!0},"~A,~N");j(c$,"resetHydrogenPoints",function(){for(var a,b=null,c=0;c<this.monomerCount;c++){if(null!=(a=this.getProteinStructure(c))&&a!==b)(b=a).resetAxes();this.monomers[c].resetHydrogenPoint()}});j(c$,"calcPhiPsiAngles",function(){for(var a=0;a<this.monomerCount-1;++a)this.calcPhiPsiAngles2(this.monomers[a],this.monomers[a+1]);return!0});
e(c$,"calcPhiPsiAngles2",function(a,b){var c=a.getNitrogenAtom(),d=a.getLeadAtom(),f=a.getCarbonylCarbonAtom(),g=b.getNitrogenAtom(),h=b.getLeadAtom(),e=b.getCarbonylCarbonAtom();b.setGroupParameter(1111490569,JU.Measure.computeTorsion(f,g,h,e,!0));a.setGroupParameter(1111490570,JU.Measure.computeTorsion(c,d,f,g,!0));a.setGroupParameter(1111490568,JU.Measure.computeTorsion(d,f,g,h,!0))},"JM.AminoMonomer,JM.AminoMonomer");j(c$,"calculateRamachandranHelixAngle",function(a,b){var c=0==a?NaN:this.monomers[a-
1].getGroupParameter(1111490570),d=this.monomers[a].getGroupParameter(1111490570),f=this.monomers[a].getGroupParameter(1111490569),g=a==this.monomerCount-1?NaN:this.monomers[a+1].getGroupParameter(1111490569),h=a==this.monomerCount-1?NaN:this.monomers[a+1].getGroupParameter(1111490570);switch(b){default:case "p":case "r":case "P":return c=3.141592653589793*((g-f)/2)/180,d=3.141592653589793*((h-d)/2)/180,114.59155902616465*Math.acos(Math.cos(d)*Math.cos(c)-Math.sin(d)*Math.sin(c)/3);case "c":case "C":return d-
c+g-f}},"~N,~S");j(c$,"calcRasmolHydrogenBonds",function(a,b,c,d,f,g,h,e){null==a&&(a=this);if(r(a,JM.AminoPolymer)){f=new JU.P3;for(var k=new JU.V3,m,l=null==g?v(2,3,0):null,j=1;j<this.monomerCount;++j)if(null==g?(l[0][0]=l[1][0]=this.bioPolymerIndexInModel,l[0][1]=l[1][1]=-2147483648,l[0][2]=l[1][2]=0):l=g[j],(m=this.monomers[j]).getNHPoint(f,k,h,e)){var n=null==b||b.get(m.getNitrogenAtom().i);if(n&&(h||null!=m.getCarbonylOxygenAtom()))this.checkRasmolHydrogenBond(m,a,j,f,n?c:b,d,l,h)}}},"JM.BioPolymer,JU.BS,JU.BS,JU.Lst,~N,~A,~B,~B");
e(c$,"checkRasmolHydrogenBond",function(a,b,c,d,f,g,h,e){var k=a.getLeadAtom(),m=a.getNitrogenAtom();a=a.getNitrogenAtom();for(var l,j=b.monomerCount;0<=--j;)if(!(b===this&&(j==c||j+1==c))){l=b.monomers[j];var n=l.getCarbonylOxygenAtom();if(!(null==n||null!=f&&!f.get(n.i)))if(n=l.getLeadAtom(),!(81<=k.distanceSquared(n))){n=this.calcHbondEnergy(m,d,l,e);if(n<h[0][2])l=h[1],h[1]=h[0],h[0]=l;else if(n<h[1][2])l=h[1];else continue;l[0]=b.bioPolymerIndexInModel;l[1]=-500>n?j:-1-j;l[2]=n}}if(null!=g)for(j=
0;2>j;j++)0<=h[j][1]&&this.addResidueHydrogenBond(a,b.monomers[h[j][1]].getCarbonylOxygenAtom(),b===this?c:-99,h[j][1],h[j][2]/1E3,g)},"JM.AminoMonomer,JM.BioPolymer,~N,JU.P3,JU.BS,JU.Lst,~A,~B");e(c$,"calcHbondEnergy",function(a,b,c,d){var f=c.getCarbonylOxygenAtom();if(null==f)return 0;var g=f.distanceSquared(a);if(0.25>g)return 0;f=f.distanceSquared(b);if(0.25>f)return 0;c=c.getCarbonylCarbonAtom();b=c.distanceSquared(b);if(0.25>b)return 0;c=c.distanceSquared(a);if(0.25>c)return 0;a=Math.sqrt(f);
f=Math.sqrt(b);b=Math.sqrt(c);g=Math.sqrt(g);g=JM.HBond.getEnergy(a,f,b,g);return!(-500>g&&(!d||b>f&&3>=a))&&d||-9900>g?0:g},"JU.P3,JU.P3,JM.AminoMonomer,~B");e(c$,"addResidueHydrogenBond",function(a,b,c,d,f,g){switch(c-d){case 2:c=6144;break;case 3:c=8192;break;case 4:c=10240;break;case 5:c=12288;break;case -3:c=14336;break;case -4:c=16384;break;default:c=4096}g.addLast(new JM.HBond(a,b,c,1,0,f))},"JM.Atom,JM.Atom,~N,~N,~N,JU.Lst");j(c$,"calculateStructures",function(a){if(!a){null==this.structureList&&
(this.structureList=this.model.ms.getStructureList());a=M(this.monomerCount,"\x00");for(var b=0;b<this.monomerCount-1;++b){var c=this.monomers[b],d=this.monomers[b+1],f=d.getGroupParameter(1111490569),g=c.getGroupParameter(1111490570);a[b]=this.isHelix(g,f)?0>f&&25>g?"4":"3":this.isSheet(g,f)?"s":this.isTurn(g,f)?"t":"n";JU.Logger.debugging&&JU.Logger.debug(0+this.monomers[0].chain.chainID+" aminopolymer:"+b+" "+d.getGroupParameter(1111490569)+","+c.getGroupParameter(1111490570)+" "+a[b])}for(b=0;b<
this.monomerCount;++b)if("4"==a[b]){for(c=b+1;c<this.monomerCount&&"4"==a[c];++c);c--;c>=b+3&&this.addStructureProtected(J.c.STR.HELIX,null,0,0,b,c);b=c}for(b=0;b<this.monomerCount;++b)if("3"==a[b]){for(c=b+1;c<this.monomerCount&&"3"==a[c];++c);c--;c>=b+3&&this.addStructureProtected(J.c.STR.HELIX,null,0,0,b,c);b=c}for(b=0;b<this.monomerCount;++b)if("s"==a[b]){for(c=b+1;c<this.monomerCount&&"s"==a[c];++c);c--;c>=b+2&&this.addStructureProtected(J.c.STR.SHEET,null,0,0,b,c);b=c}for(b=0;b<this.monomerCount;++b)if("t"==
a[b]){for(c=b+1;c<this.monomerCount&&"t"==a[c];++c);c--;c>=b+2&&this.addStructureProtected(J.c.STR.TURN,null,0,0,b,c);b=c}}},"~B");e(c$,"isTurn",function(a,b){return JM.AminoPolymer.checkPhiPsi(this.structureList.get(J.c.STR.TURN),a,b)},"~N,~N");e(c$,"isSheet",function(a,b){return JM.AminoPolymer.checkPhiPsi(this.structureList.get(J.c.STR.SHEET),a,b)},"~N,~N");e(c$,"isHelix",function(a,b){return JM.AminoPolymer.checkPhiPsi(this.structureList.get(J.c.STR.HELIX),a,b)},"~N,~N");c$.checkPhiPsi=e(c$,"checkPhiPsi",
function(a,b,c){for(var d=0;d<a.length;d+=4)if(c>=a[d]&&c<=a[d+1]&&b>=a[d+2]&&b<=a[d+3])return!0;return!1},"~A,~N,~N");e(c$,"setStructureList",function(a){this.structureList=a},"java.util.Map");z(c$,"maxHbondAlphaDistance",9,"maxHbondAlphaDistance2",81,"minimumHbondDistance2",0.25)});n("JM");q(null,"JM.BioModelSet","java.lang.Boolean $.Character $.Float java.util.Hashtable JU.AU $.BS $.Lst $.PT $.SB J.api.Interface J.c.STR JM.Group JM.AlphaMonomer $.AminoPolymer $.BioResolver $.Monomer JS.T JU.BSUtil $.Escape $.Logger".split(" "),
function(){c$=t(function(){this.unitIdSets=this.ext=this.ms=this.vwr=null;u(this,arguments)},JM,"BioModelSet");e(c$,"getBioExt",function(){return null==this.ext?(this.ext=J.api.Interface.getInterface("JM.BioExt",this.vwr,"script")).set(this.vwr,this.vwr.ms):this.ext});e(c$,"set",function(a,b){this.vwr=a;this.ms=b;this.unitIdSets=null;null!=this.ext&&this.ext.set(a,b);return this},"JV.Viewer,JM.ModelSet");e(c$,"calcAllRasmolHydrogenBonds",function(a,b,c,d,f,g,h,e){var k=this.ms.am;if(null==c){var m=
a;null!=b&&!a.equals(b)&&(m=JU.BSUtil.copy(a)).or(b);for(var j=new JU.BS,p=new JU.BS,n=this.ms.am,y=this.ms.bo,q=this.ms.bondCount;0<=--q;){var s=y[q];0!=(s.order&28672)&&(m.get(s.atom1.i)?j.set(q):p.set(n[s.atom1.mi].trajectoryBaseIndex))}for(q=this.ms.mc;0<=--q;)n[q].isBioModel&&(n[q].hasRasmolHBonds=p.get(q));0<=j.nextSetBit(0)&&this.ms.deleteBonds(j,!1)}for(q=this.ms.mc;0<=--q;)k[q].isBioModel&&!this.ms.isTrajectorySubFrame(q)&&k[q].getRasmolHydrogenBonds(a,b,c,d,f,g,h,e)},"JU.BS,JU.BS,JU.Lst,~B,~N,~B,JU.BS,~N");
e(c$,"calcSelectedMonomersCount",function(){for(var a=this.vwr.bsA(),b=this.ms.mc;0<=--b;)if(this.ms.am[b].isBioModel)for(var c=this.ms.am[b],d=c.bioPolymerCount;0<=--d;)c.bioPolymers[d].calcSelectedMonomersCount(a)});e(c$,"calculateAllPolymers",function(a,b,c,d){var f=!this.vwr.getBoolean(603979896);0>b&&(b=a.length);if(null!=d)for(var g=0;g<b;++g){var h=a[g];r(h,JM.Monomer)&&null!=h.bioPolymer&&!d.get(h.chain.model.modelIndex)&&h.setBioPolymer(null,-1)}for(var h=0,e=this.ms.mc;h<e;h++)if((null==
d||!d.get(h))&&this.ms.am[h].isBioModel)for(var k=0,g=c;g<b;++g,k++){var j=a[g],l=j.getModel();if(l.isBioModel&&r(j,JM.Monomer)&&null!=j.getLeadAtom()){var p=f&&!this.ms.isJmolDataFrameForModel(this.ms.at[j.getLeadAtom().i].mi),j=null==j.bioPolymer?JM.BioResolver.allocateBioPolymer(a,g,p,k):null;null==j||0==j.monomerCount||(l=l.addBioPolymer(j),g+=l-1,k+=l-1)}}},"~A,~N,~N,JU.BS");e(c$,"calculateAllStructuresExcept",function(a,b,c,d,f,g,h){var e="";a=JU.BSUtil.copyInvert(a,this.ms.mc);f&&this.setAllDefaultStructure(a);
for(var k=a.nextSetBit(0);0<=k;k=a.nextSetBit(k+1))this.ms.am[k].isBioModel&&(e+=this.ms.am[k].calculateStructures(b,c,d,f,g,h));f&&this.ms.setStructureIndexes();return e},"JU.BS,~B,~B,~B,~B,~B,~N");e(c$,"calculateAllStuctures",function(a,b,c,d,f,g){0>=g&&(g=2);var h=new JU.BS;a=JU.BSUtil.copyInvert(this.modelsOf(a,h),this.ms.mc);if(!f)return this.ms.calculateStructuresAllExcept(a,b,c,d,!1,!1,g);this.ms.recalculatePolymers(a);b=this.ms.calculateStructuresAllExcept(a,b,c,d,!0,!1,g);this.vwr.shm.resetBioshapes(h);
this.ms.setStructureIndexes();return b},"JU.BS,~B,~B,~B,~B,~N");e(c$,"calculateStraightnessAll",function(){this.getBioExt().calculateStraightnessAll()});e(c$,"calculateStruts",function(a,b){return this.getBioExt().calculateAllstruts(this.vwr,this.ms,a,b)},"JU.BS,JU.BS");e(c$,"getAllDefaultStructures",function(a,b){for(var c=this.modelsOf(a,b),d=new JU.SB,f=c.nextSetBit(0);0<=f;f=c.nextSetBit(f+1))this.ms.am[f].isBioModel&&null!=this.ms.am[f].defaultStructure&&d.append(this.ms.am[f].defaultStructure);
return d.toString()},"JU.BS,JU.BS");e(c$,"getAllHeteroList",function(a){for(var b=new java.util.Hashtable,c=!1,d=this.ms.mc;0<=--d;)if(0>a||d==a){var f=this.ms.getInfo(d,"hetNames");if(null!=f)for(var c=!0,g,f=f.entrySet().iterator();f.hasNext()&&((g=f.next())||1);){var h=g.getKey();b.put(h,g.getValue())}}return c?b:null},"~N");e(c$,"getAllPolymerInfo",function(a,b){this.getBioExt().getAllPolymerInfo(a,b)},"JU.BS,java.util.Map");e(c$,"getAllPolymerPointsAndVectors",function(a,b,c,d){for(var f=0;f<
this.ms.mc;++f)if(this.ms.am[f].isBioModel)for(var g=this.ms.am[f],h=2147483646,e=0;e<g.bioPolymerCount;e++)h=g.bioPolymers[e].getPolymerPointsAndVectors(h,a,b,c,d)},"JU.BS,JU.Lst,~B,~N");e(c$,"getAllSequenceBits",function(a,b,c){if(0<a.length){null==b&&(b=this.vwr.getAllAtoms());if(a.indexOf("|")<a.lastIndexOf("|"))return this.getAllUnitIds(a,b,c);for(var d=this.ms.am,f=this.ms.mc;0<=--f;)if(d[f].isBioModel)for(var g=d[f],h=a.length,e=0;e<g.bioPolymerCount;e++)for(var k=g.bioPolymers[e].getSequence(),
j=-1;0<=(j=k.indexOf(a,++j));)g.bioPolymers[e].getPolymerSequenceAtoms(j,h,b,c)}return c},"~S,JU.BS,JU.BS");e(c$,"getAtomBitsBS",function(a,b,c){var d=this.ms.at,f=this.ms.ac,g=0,h;switch(a){case 136314895:case 2097184:for(var e=136314895==a?J.c.STR.HELIX:J.c.STR.SHEET,g=f;0<=--g;)null!=d[g]&&((h=d[g].group).isWithinStructure(e)&&h.setAtomBits(c),g=h.firstAtomIndex);break;case 2097188:for(g=f;0<=--g;)null!=d[g]&&((h=d[g].group).isCarbohydrate()&&h.setAtomBits(c),g=h.firstAtomIndex);break;case 2097156:for(g=
f;0<=--g;)null!=d[g]&&((h=d[g].group).isDna()&&h.setAtomBits(c),g=h.firstAtomIndex);break;case 2097166:for(g=f;0<=--g;)null!=d[g]&&((h=d[g].group).isNucleic()&&h.setAtomBits(c),g=h.firstAtomIndex);break;case 2097168:for(g=f;0<=--g;)null!=d[g]&&((h=d[g].group).isProtein()&&h.setAtomBits(c),g=h.firstAtomIndex);break;case 2097170:for(g=f;0<=--g;)null!=d[g]&&((h=d[g].group).isPurine()&&h.setAtomBits(c),g=h.firstAtomIndex);break;case 2097172:for(g=f;0<=--g;)null!=d[g]&&((h=d[g].group).isPyrimidine()&&
h.setAtomBits(c),g=h.firstAtomIndex);break;case 2097174:for(g=f;0<=--g;)null!=d[g]&&((h=d[g].group).isRna()&&h.setAtomBits(c),g=h.firstAtomIndex)}if(0>g)return c;f=b.nextSetBit(0);if(0>f)return c;g=0;switch(a){case 1094713362:for(g=f;0<=g;g=b.nextSetBit(g+1))0<=d[g].group.getBioPolymerIndexInModel()&&d[g].group.bioPolymer.setAtomBitsAndClear(c,b);break;case 1639976963:for(g=f;0<=g;g=b.nextSetBit(g+1))f=d[g].group.getStructure(),null!=f&&f.setAtomBitsAndClear(c,b)}0==g&&JU.Logger.error("MISSING getAtomBits entry for "+
JS.T.nameOf(a));return c},"~N,JU.BS,JU.BS");e(c$,"getAtomBitsStr",function(a,b,c){switch(a){default:return new JU.BS;case 1073741925:return this.getAnnotationBits("domains",1073741925,b);case 1073742189:return this.getAnnotationBits("validation",1073742189,b);case 1073742128:return this.getAnnotationBits("rna3d",1073742128,b);case 1073741863:return c=new JU.BS,0!=b.length%2?c:this.ms.getAtomBitsMDa(1086324742,this.getAllBasePairBits(b),c);case 1111490587:return this.getAnnotationBits("dssr",1111490587,
b);case 1086324744:return this.getAllSequenceBits(b,null,c)}},"~N,~S,JU.BS");e(c$,"getBioPolymerCountInModel",function(a){if(0>a){a=0;for(var b=this.ms.mc;0<=--b;)!this.ms.isTrajectorySubFrame(b)&&this.ms.am[b].isBioModel&&(a+=this.ms.am[b].getBioPolymerCount());return a}return this.ms.isTrajectorySubFrame(a)||!this.ms.am[a].isBioModel?0:this.ms.am[a].getBioPolymerCount()},"~N");e(c$,"getFullProteinStructureState",function(a,b){var c=1073742327==b;if(c&&!this.ms.proteinStructureTainted)return"";var d=
1073742158==b||1073742327==b,f=this.ms.at,g=(null==a?this.vwr.getAllAtoms():a).nextSetBit(0);if(0>g)return"";if(null!=a&&4138==b){a=JU.BSUtil.copy(a);for(var h=this.ms.ac;0<=--h;)(null==f[h]||Float.isNaN(f[h].group.getGroupParameter(1111490569))||Float.isNaN(f[h].group.getGroupParameter(1111490570)))&&a.clear(h)}for(var e=(null==a?this.vwr.getAllAtoms():a).length()-1,k=f[g].mi,g=f[e].mi,e=new JU.Lst,j=new java.util.Hashtable,l=new JU.SB;k<=g;k++)if(this.ms.am[k].isBioModel&&(h=this.ms.am[k],!c||h.structureTainted)){var p=
new JU.BS;p.or(h.bsAtoms);p.andNot(h.bsAtomsDeleted);h=p.nextSetBit(0);if(!(0>h)){d&&l.append("  structure none ").append(JU.Escape.eBS(this.ms.getModelAtomBitSetIncludingDeleted(k,!1))).append("    \t# model="+this.ms.getModelNumberDotted(k)).append(";\n");for(var n;0<=h;h=p.nextSetBit(h+1)){var q=f[h];if(!(null==q||!r(q.group,JM.AlphaMonomer)||null==(n=q.group.proteinStructure)||j.containsKey(n)))e.addLast(n),j.put(n,Boolean.TRUE)}}}this.getStructureLines(a,l,e,J.c.STR.HELIX,d,b);this.getStructureLines(a,
l,e,J.c.STR.SHEET,d,b);this.getStructureLines(a,l,e,J.c.STR.TURN,d,b);return l.toString()},"JU.BS,~N");e(c$,"getGroupsWithinAll",function(a,b){for(var c=new JU.BS,d=this.ms.getIterativeModels(!1),f=this.ms.mc;0<=--f;)if(d.get(f)&&this.ms.am[f].isBioModel)for(var g=this.ms.am[f],h=g.bioPolymerCount;0<=--h;)g.bioPolymers[h].getRangeGroups(a,b,c);return c},"~N,JU.BS");e(c$,"getIdentifierOrNull",function(a){for(var b=a.length,c=0;c<b&&JU.PT.isLetter(a.charAt(c));)++c;var d=this.ms.getSpecNameOrNull(a.substring(0,
c),!1);if(c==b)return d;null==d&&(d=new JU.BS);for(var f=c;c<b&&JU.PT.isDigit(a.charAt(c));)++c;var g=0;try{g=Integer.parseInt(a.substring(f,c))}catch(h){if(N(h,NumberFormatException))return null;throw h;}f=" ";c<b&&"^"==a.charAt(c)&&++c<b&&(f=a.charAt(c));g=JM.Group.getSeqcodeFor(g,f);g=this.ms.getSeqcodeBits(g,!1);if(null==g){" "!=f&&(g=this.ms.getSeqcodeBits(Character.toUpperCase(a.charAt(c)).charCodeAt(0),!1));if(null==g)return null;c++}d.and(g);if(c>=b)return d;if(c!=b-1)return null;d.and(this.ms.getChainBits(a.charCodeAt(c)));
return d},"~S");e(c$,"mutate",function(a,b,c,d,f){return this.getBioExt().mutate(this.vwr,a,b,c,d,f)},"JU.BS,~S,~A,~S,~A");e(c$,"recalculateAllPolymers",function(a,b){for(var c=0;c<this.ms.mc;c++)this.ms.am[c].isBioModel&&!a.get(c)&&this.ms.am[c].clearBioPolymers();this.calculateAllPolymers(b,-1,0,a)},"JU.BS,~A");e(c$,"recalculatePoints",function(a){if(0>a)for(a=this.ms.mc;0<=--a;)!this.ms.isTrajectorySubFrame(a)&&this.ms.am[a].isBioModel&&this.ms.am[a].recalculateLeadMidpointsAndWingVectors();else!this.ms.isTrajectorySubFrame(a)&&
this.ms.am[a].isBioModel&&this.ms.am[a].recalculateLeadMidpointsAndWingVectors()},"~N");e(c$,"setAllConformation",function(a){for(var b=this.ms.getModelBS(a,!1),c=b.nextSetBit(0);0<=c;c=b.nextSetBit(c+1))if(this.ms.am[c].isBioModel){var d=this.ms.am[c];if(0<d.altLocCount)for(var f=d.bioPolymerCount;0<=--f;)d.bioPolymers[f].setConformation(a)}},"JU.BS");e(c$,"setAllProteinType",function(a,b){var c=-1,d=this.ms.getModelBS(a,!1);this.setAllDefaultStructure(d);for(var d=this.ms.getGroups(),f=0,g=-2147483648,
h=null,e=null,k=b===J.c.STR.NONE,j=0;j<d.length;j++){var l=d[j];if(0!=l.getBioPolymerLength()&&a.get(l.firstAtomIndex)){var p=l.getModel();if(!k){p!==e&&(e=p,f=0,h=null);h!==l.bioPolymer&&(g=-2147483648,h=l.bioPolymer);var n=l.getResno();n!=g+1&&(c=-1);g=n}c=l.setProteinStructureType(b,c);1E3<l.getStrucNo()&&l.setStrucNo(++f);this.ms.proteinStructureTainted=p.structureTainted=!0}}},"JU.BS,J.c.STR");e(c$,"setAllStructureList",function(a){for(var b=this.ms.mc;0<=--b;)if(this.ms.am[b].isBioModel){var c=
this.ms.am[b];c.bioPolymers=JU.AU.arrayCopyObject(c.bioPolymers,c.bioPolymerCount);for(var d=c.bioPolymerCount;0<=--d;){var f=c.bioPolymers[d];r(f,JM.AminoPolymer)&&f.setStructureList(a)}}},"java.util.Map");e(c$,"getAllBasePairBits",function(a){var b=null,c=null,d=new JU.Lst;if(0==a.length)b=c=this.vwr.getAllAtoms(),this.calcAllRasmolHydrogenBonds(b,c,d,!0,1,!1,null,0);else for(var f=0;f<a.length;)b=this.ms.getSequenceBits(a.substring(f,++f),null,new JU.BS),0>b.nextSetBit(0)||(c=this.ms.getSequenceBits(a.substring(f,
++f),null,new JU.BS),0>c.nextSetBit(0)||this.calcAllRasmolHydrogenBonds(b,c,d,!0,1,!1,null,0));a=new JU.BS;for(f=d.size();0<=--f;)b=d.get(f),a.set(b.atom1.i),a.set(b.atom2.i);return a},"~S");e(c$,"getAllUnitIds",function(a,b,c){var d=this.unitIdSets;if(null==d){for(var d=this.unitIdSets=Array(7),f=0;7>f;f++)d[f]=new java.util.Hashtable;for(f=this.ms.mc;0<=--f;){var g=this.ms.am[f];if(g.isBioModel){this.ms.isTrajectory(f)&&(g=this.ms.am[f=g.trajectoryBaseIndex]);var h="|"+this.ms.getInfo(f,"modelNumber");
this.checkMap(d[0],this.ms.getInfo(f,"modelName")+h,g.bsAtoms);this.checkMap(d[0],h,g.bsAtoms)}}}var h=g=null,e=new JU.BS;a=JU.PT.getTokens(JU.PT.replaceAllCharacters(a,', \t\n[]"='," "));for(var k=v(8,0),f=a.length;0<=--f;){var j=a[f]+"|";if(!(5>j.length)){for(var l=0,p=0,n=0,q=j.lastIndexOf("|")+1;p<q&&8>n;p++)"|"==j.charAt(p)?k[n++]=p:l|=1<<n;if(22==(l&22)){e.clearAll();e.or(b);p=j.substring(0,k[2]);if(null!=h&&h.equals(p))e.and(g);else{if(!this.addUnit(1094717454,j.substring(0,k[1]).toUpperCase(),
e,d[0])||!this.addUnit(1073742357,j.substring(k[1]+1,k[2]),e,d[1]))continue;g=JU.BSUtil.copy(e);h=p}p=0!=(l&32);n=0!=(l&64);this.addUnit(1094715412,j.substring(k[3]+1,k[4]),e,d[2])&&(this.addUnit(5,0==(l&128)?"\x00":j.substring(k[6]+1,k[7]),e,d[3])&&!(p?!this.addUnit(1086326786,j.substring(k[4]+1,k[5]).toUpperCase(),e,d[4])||!this.addUnit(1073742355,j.substring(k[5]+1,k[6]),e,d[5]):n&&!this.addUnit(1094717448,j.substring(k[5]+1,k[6]),e,d[6])))&&c.or(e)}}}return c},"~S,JU.BS,JU.BS");e(c$,"checkMap",
function(a,b,c){c=JU.BSUtil.copy(c);var d=a.get(b);null==d?a.put(b,d=c):d.or(c);return d},"java.util.Map,~S,JU.BS");e(c$,"addUnit",function(a,b,c,d){var f=d.get(b);if(null==f){var g;switch(a){default:return!1;case 1073742357:g=Integer.$valueOf(this.vwr.getChainID(b,!1));break;case 1094715412:g=Integer.$valueOf(JU.PT.parseInt(b));break;case 5:g=Integer.$valueOf(b.charCodeAt(0));break;case 1094717448:f=this.ms.getAtomBitsMDa(a=1073742355,null,new JU.BS);case 1086326786:g=b;break;case 1073742355:g=0==
b.length?null:b}d.put(b,f=this.ms.getAtomBitsMDa(a,g,null==f?new JU.BS:f))}c.and(f);return 0<=c.nextSetBit(0)},"~N,~S,JU.BS,java.util.Map");e(c$,"getAnnotationBits",function(a,b,c){for(var d=new JU.BS,f=this.vwr.getAnnotationParser(a.equals("dssr")),g,e=this.ms.mc;0<=--e;)null!=(g=this.ms.getInfo(e,a))&&d.or(f.getAtomBits(this.vwr,c,this.ms.am[e].getCachedAnnotationMap(a+" V ",g),this.ms.am[e].dssrCache,b,e,this.ms.am[e].bsAtoms));return d},"~S,~N,~S");e(c$,"getStructureLines",function(a,b,c,d,f,
g){g=134222350==g;for(var e=0,j=0,k=0,m=null,l=new JU.BS,p=0,n=0,q=c.size();n<q;n++){var r=c.get(n);if(r.type===d){var s=r.findMonomer(a,!0),u=r.findMonomer(a,!1);if(!(null==s||null==u)){var t=r.apolymer.model.modelIndex,m=f?"    \t# model="+this.ms.getModelNumberDotted(t):null,t=s.getResno(),v=u.getResno(),w=r.subtype;switch(d){case J.c.STR.HELIX:case J.c.STR.TURN:case J.c.STR.SHEET:if(p++,f){l.clearAll();r.setAtomBits(l);var B=w.getBioStructureTypeName(!1);b.append("  structure ").append(B).append(" ").append(JU.Escape.eBS(l)).append(m).append(" & ("+
t+" - "+v+")").append(";\n")}else{var x;switch(d){case J.c.STR.HELIX:B=++e;m=JU.PT.formatStringI("%3N %3N","N",B);x="HELIX  %ID %3GROUPA %1CA %4RESA  %3GROUPB %1CB %4RESB";B=null;switch(w){case J.c.STR.HELIX:case J.c.STR.HELIXALPHA:B="  1";break;case J.c.STR.HELIX310:B="  5";break;case J.c.STR.HELIXPI:B="  3"}null!=B&&(x+=B);break;case J.c.STR.SHEET:B=++j;m=JU.PT.formatStringI("%3N %3A 0","N",B);m=JU.PT.formatStringS(m,"A","S"+B);x="SHEET  %ID %3GROUPA %1CA%4RESA  %3GROUPB %1CB%4RESB";break;default:B=
++k,m=JU.PT.formatStringI("%3N %3N","N",B),x="TURN   %ID %3GROUPA %1CA%4RESA  %3GROUPB %1CB%4RESB"}x=JU.PT.formatStringS(x,"ID",m);x=JU.PT.formatStringS(x,"GROUPA",s.getGroup3());x=JU.PT.formatStringS(x,"CA",s.getLeadAtom().getChainIDStr());x=JU.PT.formatStringI(x,"RESA",t);x=JU.PT.formatStringS(x,"GROUPB",u.getGroup3());x=JU.PT.formatStringS(x,"CB",u.getLeadAtom().getChainIDStr());x=JU.PT.formatStringI(x,"RESB",v);b.append(x);g&&b.append(" strucno= ").appendI(r.strucNo);b.append("\n")}}}}}0<p&&b.append("\n");
return p},"JU.BS,JU.SB,JU.Lst,J.c.STR,~B,~N");e(c$,"modelsOf",function(a,b){for(var c=JU.BS.newN(this.ms.mc),d=null==a,f=d?this.ms.ac-1:a.nextSetBit(0);0<=f;f=d?f-1:a.nextSetBit(f+1))if(null!=this.ms.at[f]){var g=this.ms.am[this.ms.at[f].mi].trajectoryBaseIndex;this.ms.isJmolDataFrameForModel(g)||(c.set(g),b.set(f))}return c},"JU.BS,JU.BS");e(c$,"setAllDefaultStructure",function(a){for(var b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1))if(this.ms.am[b].isBioModel){var c=this.ms.am[b];null==c.defaultStructure&&
(c.defaultStructure=this.getFullProteinStructureState(c.bsAtoms,1073742158))}},"JU.BS");e(c$,"getAminoAcidValenceAndCharge",function(a,b,c){return this.getBioExt().getAminoAcidValenceAndCharge(a,b,c)},"~S,~S,~A");z(c$,"DEFAULT_DSSP_VERSION",2)});n("JM");q(["JM.Model"],"JM.BioModel","java.util.Hashtable JU.AU $.BS $.Lst $.SB J.api.Interface JM.AlphaPolymer $.AminoPolymer JS.SV JU.Escape".split(" "),function(){c$=t(function(){this.vwr=null;this.bioPolymerCount=0;this.bioPolymers=null;this.isMutated=
!1;this.defaultStructure=null;u(this,arguments)},JM,"BioModel",JM.Model);w(c$,function(a,b,c,d,f,g){I(this,JM.BioModel,[]);this.vwr=a.vwr;this.set(a,b,c,d,f,g);this.isBioModel=!0;this.vwr.getJBR().getBioModelSet(a);this.clearBioPolymers();a.am[b]=this;this.pdbID=g.get("name")},"JM.ModelSet,~N,~N,~S,java.util.Properties,java.util.Map");e(c$,"addBioPolymer",function(a){0==this.bioPolymers.length&&this.clearBioPolymers();this.bioPolymerCount==this.bioPolymers.length&&(this.bioPolymers=JU.AU.doubleLength(this.bioPolymers));
a.bioPolymerIndexInModel=this.bioPolymerCount;this.bioPolymers[this.bioPolymerCount++]=a;return a.monomerCount},"JM.BioPolymer");e(c$,"addSecondaryStructure",function(a,b,c,d,f,g,e,j,k,m,l){for(var p=this.bioPolymerCount;0<=--p;)r(this.bioPolymers[p],JM.AlphaPolymer)&&this.bioPolymers[p].addStructure(a,b,c,d,f,g,e,j,k,m,l)},"J.c.STR,~S,~N,~N,~N,~N,~N,~N,~N,~N,JU.BS");e(c$,"addStructureByBS",function(a,b,c,d){for(var f=this.bioPolymerCount;0<=--f;)r(this.bioPolymers[f],JM.AlphaPolymer)&&(a=this.bioPolymers[f].setStructureBS(++a,
b,c,d,!0))},"~N,~N,J.c.STR,JU.BS");e(c$,"calculateDssx",function(a,b,c,d,f){for(var g=!1,e=!1,j=0;j<this.bioPolymerCount&&(!g||!e);j++)this.bioPolymers[j].isNucleic()?e=!0:r(this.bioPolymers[j],JM.AminoPolymer)&&(g=!0);j="";g&&(j+=J.api.Interface.getOption("dssx.DSSP",this.vwr,"ms").calculateDssp(this.bioPolymers,this.bioPolymerCount,a,b,c,d,f));e&&(this.auxiliaryInfo.containsKey("dssr")&&null!=a)&&(j+=this.vwr.getAnnotationParser(!0).getHBonds(this.ms,this.modelIndex,a,b));return j},"JU.Lst,~B,~B,~B,~N");
e(c$,"calculateStructures",function(a,b,c,d,f,g){if(0==this.bioPolymerCount||!d&&!a)return"";this.ms.proteinStructureTainted=this.structureTainted=!0;if(d)for(var e=this.bioPolymerCount;0<=--e;)(!a||null!=this.bioPolymers[e].monomers[0].getNitrogenAtom())&&this.bioPolymers[e].clearStructures();if(!a||f)for(e=this.bioPolymerCount;0<=--e;)r(this.bioPolymers[e],JM.AlphaPolymer)&&this.bioPolymers[e].calculateStructures(f);return a?this.calculateDssx(null,b,c,d,g):""},"~B,~B,~B,~B,~B,~N");e(c$,"clearBioPolymers",
function(){this.bioPolymers=Array(8);this.bioPolymerCount=0});j(c$,"fixIndices",function(a,b,c){this.fixIndicesM(a,b,c);this.recalculateLeadMidpointsAndWingVectors()},"~N,~N,JU.BS");j(c$,"freeze",function(){this.freezeM();this.bioPolymers=JU.AU.arrayCopyObject(this.bioPolymers,this.bioPolymerCount);return!0});e(c$,"getBioBranches",function(a){for(var b,c=0;c<this.bioPolymerCount;c++)b=new JU.BS,this.bioPolymers[c].getRange(b,this.isMutated),0<=b.nextSetBit(0)&&(null==a&&(a=new JU.Lst),a.addLast(b));
return a},"JU.Lst");e(c$,"getBioPolymerCount",function(){return this.bioPolymerCount});e(c$,"getCachedAnnotationMap",function(a,b){var c=null==this.dssrCache&&null!=b?this.dssrCache=new java.util.Hashtable:this.dssrCache;if(null==c)return null;var d=c.get(a);null==d&&null!=b&&(d=r(b,JS.SV)||r(b,java.util.Hashtable)?b:this.vwr.parseJSONMap(b),c.put(a,d));return r(d,JS.SV)||r(d,java.util.Hashtable)?d:null},"~S,~O");e(c$,"getConformation",function(a,b,c,d){if(0<=a&&0<this.altLocCount)for(var f=this.ms.at,
g=null,e="\x00",j=a,k=new JU.BS,m=c.nextSetBit(0);0<=m;m=c.nextSetBit(m+1)){var l=f[m],p=l.altloc;"\x00"!=p&&(l.group!==g&&(g=l.group,e="\x00",j=a,k.clearAll()),0<=j&&(p!=e&&!k.get(p.charCodeAt(0)))&&(e=p,j--,k.set(p.charCodeAt(0))),(0<=j||p!=e)&&c.clear(m))}if(0<=c.nextSetBit(0)&&(d.or(c),b))for(a=this.bioPolymerCount;0<=--a;)this.bioPolymers[a].setConformation(c);return!0},"~N,~B,JU.BS,JU.BS");e(c$,"getDefaultLargePDBRendering",function(a,b){var c=new JU.BS;0==this.getBondCount()&&(c=this.bsAtoms);
if(c!==this.bsAtoms)for(var d=0;d<this.bioPolymerCount;d++)this.bioPolymers[d].getRange(c,this.isMutated);if(!(0>c.nextSetBit(0))){var f=new JU.BS;if(c===this.bsAtoms)f=c;else for(d=0;d<this.bioPolymerCount;d++)0==this.bioPolymers[d].getType()&&this.bioPolymers[d].getRange(f,this.isMutated);0<=f.nextSetBit(0)&&a.append("select ").append(JU.Escape.eBS(f)).append(";backbone only;");this.act<=b||(a.append("select ").append(JU.Escape.eBS(c)).append(" & connected; wireframe only;"),c!==this.bsAtoms&&(f.clearAll(),
f.or(this.bsAtoms),f.andNot(c),0<=f.nextSetBit(0)&&a.append("select "+JU.Escape.eBS(f)+" & !connected;stars 0.5;spacefill off;")))}},"JU.SB,~N");e(c$,"getFullPDBHeader",function(){if(0>this.modelIndex)return"";var a=this.auxiliaryInfo.get("fileHeader");return null!=a?a:this.ms.bioModelset.getBioExt().getFullPDBHeader(this.auxiliaryInfo)});e(c$,"getPdbData",function(a,b,c,d,f,g,e,j){this.ms.bioModelset.getBioExt().getPdbDataM(this,this.vwr,a,b,c,d,f,g,e,j)},"~S,~S,~B,JU.BS,JU.OC,~A,JU.SB,JU.BS");e(c$,
"getRasmolHydrogenBonds",function(a,b,c,d,f,g,e,j){var k=null==c;k&&(c=new JU.Lst);0>f&&(f=2147483647);var m;if(null==b&&0<this.bioPolymerCount)this.calculateDssx(c,!1,g,!1,j);else for(g=this.bioPolymerCount;0<=--g;)if(j=this.bioPolymers[g],0!=j.monomerCount){var l=j.getType(),p=!1;switch(l){case 1:if(d)continue;j.calcRasmolHydrogenBonds(null,a,b,c,f,null,!0,!1);break;case 2:p=j.monomers[0].isRna();break;default:continue}for(var n=this.bioPolymerCount;0<=--n;)null!=(m=this.bioPolymers[n])&&((p||g!=
n)&&l==m.getType())&&m.calcRasmolHydrogenBonds(j,a,b,c,f,null,!0,!1)}if(0!=c.size()&&k){this.hasRasmolHBonds=!0;for(g=0;g<c.size();g++)a=c.get(g),b=a.atom1,d=a.atom2,b.isBonded(d)||(a=this.ms.addHBond(b,d,a.order,a.getEnergy()),null!=e&&e.set(a))}},"JU.BS,JU.BS,JU.Lst,~B,~N,~B,JU.BS,~N");e(c$,"getUnitID",function(a,b){var c=new JU.SB,d=a.group,f=16!=(b&16),g=8==(b&8)?d.getInsertionCode():"\x00",e="\x00"!=g;1==(b&1)&&null!=this.pdbID&&c.append(this.pdbID);c.append("|").appendO(this.ms.getInfo(this.modelIndex,
"modelNumber")).append("|").append(this.vwr.getChainIDStr(d.chain.chainID)).append("|").append(d.getGroup3()).append("|").appendI(d.getResno());4==(b&4)?(c.append("|").append(a.getAtomName()),"\x00"!=a.altloc?c.append("|").appendC(a.altloc):(f||e)&&c.append("|")):(f||e)&&c.append("||");e?c.append("|").appendC(g):f&&c.append("|");f&&c.append("|");return c.toString()},"JM.Atom,~N");e(c$,"recalculateLeadMidpointsAndWingVectors",function(){for(var a=0;a<this.bioPolymerCount;a++)this.bioPolymers[a].recalculateLeadMidpointsAndWingVectors()});
e(c$,"resetRasmolBonds",function(a,b){var c=new JU.BS;this.hasRasmolHBonds=!1;for(var d=this.ms.am,f=this.ms.bo,g=this.ms.bondCount;0<=--g;){var e=f[g];0!=(e.order&28672)&&d[e.atom1.mi].trajectoryBaseIndex==this.modelIndex&&c.set(g)}0<=c.nextSetBit(0)&&this.ms.deleteBonds(c,!1);this.getRasmolHydrogenBonds(a,a,null,!1,2147483647,!1,null,b)},"JU.BS,~N");e(c$,"getAtomicDSSRData",function(a,b){this.auxiliaryInfo.containsKey("dssr")&&this.vwr.getAnnotationParser(!0).getAtomicDSSRData(this.ms,this.modelIndex,
a,b)},"~A,~S")});n("JM");q(["java.util.Hashtable","J.c.STR"],"JM.BioResolver","java.lang.Boolean $.Byte $.NullPointerException $.Short java.util.Arrays JU.AU $.BS $.Measure $.P3 $.P4 $.PT $.SB $.V3 JM.Group JM.AlphaMonomer $.AlphaPolymer $.AminoMonomer $.AminoPolymer $.BioModel $.BioModelSet $.CarbohydrateMonomer $.CarbohydratePolymer $.Monomer $.NucleicMonomer $.NucleicPolymer $.PhosphorusMonomer $.PhosphorusPolymer JU.BSUtil $.Logger".split(" "),function(){c$=t(function(){this.bsAddedMask=this.ms=
this.ml=this.plane=this.vNorm=this.vAB=this.vwr=null;this.lastSetH=-2147483648;this.maxSerial=0;this.haveHsAlready=!1;this.hNames=this.htGroupBonds=this.htBondMap=this.bsAtomsForHs=this.bsAddedHydrogens=null;this.baseBondIndex=0;this.hasCONECT=!1;this.bsAssigned=null;u(this,arguments)},JM,"BioResolver",null,java.util.Comparator);w(c$,function(){});e(c$,"setLoader",function(a){this.ml=a;this.bsAddedMask=null;this.lastSetH=-2147483648;this.maxSerial=0;this.haveHsAlready=!1;null==a?this.hNames=this.htGroupBonds=
this.htBondMap=this.bsAddedHydrogens=this.bsAtomsForHs=this.bsAssigned=this.ms=null:(JM.Group.specialAtomNames=JM.BioResolver.specialAtomNames,this.ms=a.ms,this.vwr=a.ms.vwr,a.specialAtomIndexes=v(JM.BioResolver.ATOMID_MAX,0),this.hasCONECT=this.ms.getInfoM("someModelsHaveCONECT")===Boolean.TRUE);return this},"JM.ModelLoader");e(c$,"setViewer",function(a){this.vwr=a;if(null==JM.Group.standardGroupList){var b=new JU.SB;for(a=1;42>a;a++)b.append(",[").append(JM.BioResolver.predefinedGroup3Names[a]).append("]");
b.append(",[AHR],[ALL],[AMU],[ARA],[ARB],[BDF],[BDR],[BGC],[BMA],[FCA],[FCB],[FRU],[FUC],[FUL],[GAL],[GLA],[GLC],[GXL],[GUP],[LXC],[MAN],[RAM],[RIB],[RIP],[XYP],[XYS],[CBI],[CT3],[CTR],[CTT],[LAT],[MAB],[MAL],[MLR],[MTT],[SUC],[TRE],[GCU],[MTL],[NAG],[NDG],[RHA],[SOR],[SOL],[SOE],[XYL],[A2G],[LBT],[NGA],[SIA],[SLB],[AFL],[AGC],[GLB],[NAN],[RAA]");JM.BioResolver.group3Count=F(b.length()/6);JM.Group.standardGroupList=b.toString();a=0;for(b=JM.BioResolver.predefinedGroup3Names.length;a<b;++a)JM.BioResolver.addGroup3Name(JM.BioResolver.predefinedGroup3Names[a].trim())}return this},
"JV.Viewer");e(c$,"getBioModel",function(a,b,c,d,f){return new JM.BioModel(this.ms,a,b,c,d,f)},"~N,~N,~S,java.util.Properties,java.util.Map");e(c$,"distinguishAndPropagateGroup",function(a,b,c,d,f,g,e){for(var j=0,k=JM.BioResolver.ATOMID_MAX;0<=--k;)g[k]=-2147483648;for(k=f;k>=d;--k){var m=e[k].atomID;0>=m||(14>m&&(j|=1<<m),g[m]=k)}k=null;14==(j&14)?k=JM.AminoMonomer.validateAndAllocate(a,b,c,d,f,g,e):4==j?k=JM.AlphaMonomer.validateAndAllocateA(a,b,c,d,f,g):8128==(j&8128)?k=JM.NucleicMonomer.validateAndAllocate(a,
b,c,d,f,g):8192==j?k=JM.PhosphorusMonomer.validateAndAllocateP(a,b,c,d,f,g):JM.BioResolver.checkCarbohydrate(b)&&(k=JM.CarbohydrateMonomer.validateAndAllocate(a,b,c,d,f));return null!=k&&0<=k.leadAtomIndex?k:null},"JM.Chain,~S,~N,~N,~N,~A,~A");e(c$,"setHaveHsAlready",function(a){this.haveHsAlready=a},"~B");e(c$,"initializeHydrogenAddition",function(){this.baseBondIndex=this.ms.bondCount;this.bsAddedHydrogens=new JU.BS;this.bsAtomsForHs=new JU.BS;this.htBondMap=new java.util.Hashtable;this.htGroupBonds=
new java.util.Hashtable;this.hNames=Array(3);this.vAB=new JU.V3;this.vNorm=new JU.V3;this.plane=new JU.P4});e(c$,"addImplicitHydrogenAtoms",function(a,b,c){var d=this.ml.getGroup3(b),f;if(!(this.haveHsAlready&&this.hasCONECT||null==d||0==(f=JM.BioResolver.getStandardPdbHydrogenCount(d)))){c=0>f?-1:f+c;f=null;b=this.ml.getFirstAtomIndex(b);var g=this.ms.ac;if(0>c){if(1==g-b)return;f=this.vwr.getLigandModel(d,"ligand_","_data",null);if(null==f)return;c=a.getHydrogenAtomCount(f);if(1>c)return}this.getBondInfo(a,
d,f);this.ms.am[this.ms.at[b].mi].isPdbWithMultipleBonds=!0;if(!this.haveHsAlready){this.bsAtomsForHs.setBits(b,g);this.bsAddedHydrogens.setBits(g,g+c);a=this.ms.at[b].isHetero();d=JU.P3.new3(NaN,NaN,NaN);b=this.ms.at[b];for(f=0;f<c;f++)this.ms.addAtom(b.mi,b.group,1,"H",null,0,b.getSeqID(),0,d,NaN,null,0,0,1,0,null,a,0,null,NaN).$delete(null)}}},"J.api.JmolAdapter,~N,~N");e(c$,"getBondInfo",function(a,b,c){if(null==this.htGroupBonds.get(b)&&(a=null==c?this.getPdbBondInfo(b,this.vwr.g.legacyHAddition):
this.getLigandBondInfo(a,c,b),null!=a)){this.htGroupBonds.put(b,Boolean.TRUE);for(c=0;c<a.length;c++)null!=a[c]&&("H"==a[c][1].charAt(0)?this.htBondMap.put(b+"."+a[c][0],a[c][1]):this.htBondMap.put(b+":"+a[c][0]+":"+a[c][1],a[c][2]))}},"J.api.JmolAdapter,~S,~O");e(c$,"getLigandBondInfo",function(a,b,c){var d=a.getBondList(b),f=new java.util.Hashtable;for(a=a.getAtomIterator(b);a.hasNext();)f.put(a.getAtomName(),a.getXYZ());a=Array(2*d.length);for(var g=b=0;g<d.length;g++){var e=d[g];"H"!=e[0].charAt(0)&&
(a[b++]=D(-1,[e[0],e[1],e[2],e[1].startsWith("H")?"0":"1"]));"H"!=e[1].charAt(0)&&(a[b++]=D(-1,[e[1],e[0],e[2],e[0].startsWith("H")?"0":"1"]))}java.util.Arrays.sort(a,this);for(var j,g=0;g<b;){j=a[g];for(var d=j[0],k=e=0;g<b&&(j=a[g])[0].equals(d);g++)j[3].equals("0")?e++:j[3].equals("1")&&k++;d=g-e-k;if(1!=e)switch(k){case 1:for(var k=2==e?"@":"|",m=1;m<e;m++)a[d][1]+=k+a[d+m][1],a[d+m]=null;continue;case 2:if(2!=e)continue;var k=a[d][0],m=a[d+e][1],e=a[d+e+1][1],l=m.compareTo(e);JU.Measure.getPlaneThroughPoints(f.get(m),
f.get(k),f.get(e),this.vNorm,this.vAB,this.plane);e=JU.Measure.distanceToPlane(this.plane,f.get(a[d][1]))*l;a[d][1]=0<e?a[d][1]+"@"+a[d+1][1]:a[d+1][1]+"@"+a[d][1];a[d+1]=null}}for(g=0;g<b;g++)null!=(j=a[g])&&"H"!=j[1].charAt(0)&&0<j[0].compareTo(j[1])?a[g]=null:null!=j&&JU.Logger.info(" ligand "+c+": "+a[g][0]+" - "+a[g][1]+" order "+a[g][2]);return a},"J.api.JmolAdapter,~O,~S");j(c$,"compare",function(a,b){return null==b?null==a?0:-1:null==a?1:0>a[0].compareTo(b[0])?-1:0<a[0].compareTo(b[0])?1:
0>a[3].compareTo(b[3])?-1:0<a[3].compareTo(b[3])?1:0>a[1].compareTo(b[1])?-1:0<a[1].compareTo(b[1])?1:0},"~A,~A");e(c$,"finalizeHydrogens",function(){this.vwr.getLigandModel(null,null,null,null);this.finalizePdbMultipleBonds();this.addHydrogens()});e(c$,"addHydrogens",function(){if(!(0>this.bsAddedHydrogens.nextSetBit(0))){this.bsAddedMask=JU.BSUtil.copy(this.bsAddedHydrogens);this.finalizePdbCharges();for(var a=v(1,0),a=this.ms.calculateHydrogens(this.bsAtomsForHs,a,null,256),b=null,c=0,d,f=0;f<
a.length;f++)if(!(null==a[f]||null==(d=this.ms.at[f]))){var g=d.group;if(g!==b){b=g;for(c=g.lastAtomIndex;this.bsAddedHydrogens.get(c);)c--}var e=d.getGroup3(!1),j=d.getAtomName(),k=this.htBondMap.get(e+"."+j);if(null!=k){var m=k.contains("@"),l=k.endsWith("?")||0<=k.indexOf("|"),p=a[f].length;3==p&&(!l&&k.equals("H@H2"))&&(k="H|H2|H3",l=!0,m=!1);if(m&&3==p||l!=(3==p))JU.Logger.info("Error adding H atoms to "+e+g.getResno()+": "+a[f].length+" atoms should not be added to "+j);else switch(j=k.indexOf("@"),
a[f].length){case 1:0<j&&(k=k.substring(0,j));this.setHydrogen(f,++c,k,a[f][0]);break;case 2:m=-1;l=d.bonds;if(null!=l)switch(l.length){case 2:m=l[0].getOtherAtom(d),l=l[1].getOtherAtom(d),p=m.getAtomName().compareTo(l.getAtomName()),m=JU.Measure.distanceToPlane(JU.Measure.getPlaneThroughPoints(m,d,l,this.vNorm,this.vAB,this.plane),a[f][0])*p}0>j?(JU.Logger.info("Error adding H atoms to "+e+g.getResno()+": expected to only need 1 H but needed 2"),g=e="H"):0>m?(e=k.substring(0,j),g=k.substring(j+1)):
(g=k.substring(0,j),e=k.substring(j+1));this.setHydrogen(f,++c,g,a[f][0]);this.setHydrogen(f,++c,e,a[f][1]);break;case 3:g=k.indexOf("|"),0<=g?(e=k.lastIndexOf("|"),this.hNames[0]=k.substring(0,g),this.hNames[1]=k.substring(g+1,e),this.hNames[2]=k.substring(e+1)):(this.hNames[0]=k.$replace("?","1"),this.hNames[1]=k.$replace("?","2"),this.hNames[2]=k.$replace("?","3")),this.setHydrogen(f,++c,this.hNames[0],a[f][0]),this.setHydrogen(f,++c,this.hNames[1],a[f][2]),this.setHydrogen(f,++c,this.hNames[2],
a[f][1])}}}this.deleteUnneededAtoms();this.ms.fixFormalCharges(JU.BSUtil.newBitSet2(this.ml.baseAtomIndex,this.ml.ms.ac))}});e(c$,"deleteUnneededAtoms",function(){for(var a=new JU.BS,b=this.bsAtomsForHs.nextSetBit(0);0<=b;b=this.bsAtomsForHs.nextSetBit(b+1)){var c=this.ms.at[b];if(c.isHetero()&&!(8!=c.getElementNumber()||0!=c.getFormalCharge()||2!=c.getCovalentBondCount())){var d=c.bonds,f=d[0].getOtherAtom(c),c=d[1].getOtherAtom(c);1==f.getElementNumber()&&(d=f,f=c,c=d);if(1==c.getElementNumber())for(var d=
f.bonds,g=0;g<d.length;g++)if(2==d[g].order&&8==d[g].getOtherAtom(f).getElementNumber()){this.bsAddedHydrogens.set(c.i);c.$delete(a);break}}}this.ms.deleteBonds(a,!0);this.deleteAtoms(this.bsAddedHydrogens)});e(c$,"deleteAtoms",function(a){for(var b=v(this.ms.ac,0),c=v(this.ms.ac-a.cardinality(),0),d=this.ml.baseAtomIndex,f=this.ms.am,g=this.ms.at,e=this.ml.baseAtomIndex;e<this.ms.ac;e++){var j=g[e];null!=j&&(f[j.mi].bsAtoms.clear(e),f[j.mi].bsAtomsDeleted.clear(e),a.get(e)?(b[e]=d-1,f[g[e].mi].act--):
(c[d]=e,b[e]=d++))}this.ms.msInfo.put("bsDeletedAtoms",a);for(e=this.ml.baseGroupIndex;e<this.ml.groups.length;e++)f=this.ml.groups[e],f.firstAtomIndex>=this.ml.baseAtomIndex&&(f.firstAtomIndex=b[f.firstAtomIndex],f.lastAtomIndex=b[f.lastAtomIndex],0<=f.leadAtomIndex&&(f.leadAtomIndex=b[f.leadAtomIndex]));this.ms.adjustAtomArrays(c,this.ml.baseAtomIndex,d);this.ms.calcBoundBoxDimensions(null,1);this.ms.resetMolecules();this.ms.validateBspf(!1);this.bsAddedMask=JU.BSUtil.deleteBits(this.bsAddedMask,
a);for(e=this.ml.baseModelIndex;e<this.ms.mc;e++)this.fixAnnotations(e,"domains",1073741925),this.fixAnnotations(e,"validation",1073742189)},"JU.BS");e(c$,"fixAnnotations",function(a,b,c){var d=this.ml.ms.getInfo(a,b);null!=d&&(b=this.ms.am[a].getCachedAnnotationMap(b,d),null!=b&&this.vwr.getAnnotationParser(!1).fixAtoms(a,b,this.bsAddedMask,c,20))},"~N,~S,~N");e(c$,"finalizePdbCharges",function(){for(var a=this.ms.at,b=this.bsAtomsForHs.nextSetBit(0);0<=b;b=this.bsAtomsForHs.nextSetBit(b+1)){var c=
a[b];c.group.getNitrogenAtom()===c&&1==c.getCovalentBondCount()&&c.setFormalCharge(1);if(0>(b=this.bsAtomsForHs.nextClearBit(b+1)))break}});e(c$,"finalizePdbMultipleBonds",function(){for(var a=new java.util.Hashtable,b=this.ms.bondCount,c=this.ms.bo,d=this.baseBondIndex;d<b;d++){var f=c[d].atom1,g=c[d].atom2,e=f.group;if(e===g.group){var j=(new JU.SB).append(e.getGroup3());j.append(":");f=f.getAtomName();g=g.getAtomName();0<f.compareTo(g)?j.append(g).append(":").append(f):j.append(f).append(":").append(g);
g=j.toString();f=this.htBondMap.get(g);null!=f&&(a.put(g,Boolean.TRUE),c[d].setOrder(JU.PT.parseInt(f)))}}for(d=this.htBondMap.keySet().iterator();d.hasNext()&&((j=d.next())||1);)if(null==a.get(j))if(0>j.indexOf(":"))a.put(j,Boolean.TRUE);else{var k=this.htBondMap.get(j);JU.Logger.info("bond "+j+" was not used; order="+k);this.htBondMap.get(j).equals("1")&&a.put(j,Boolean.TRUE)}e=new java.util.Hashtable;for(d=this.htBondMap.keySet().iterator();d.hasNext()&&((j=d.next())||1);)null==a.get(j)&&e.put(j.substring(0,
j.lastIndexOf(":")),this.htBondMap.get(j));if(!e.isEmpty())for(d=0;d<b;d++)if(f=c[d].atom1,g=c[d].atom2,f.group!==g.group&&!(null==(k=e.get(f.getGroup3(!1)+":"+f.getAtomName()))&&null==(k=e.get(g.getGroup3(!1)+":"+g.getAtomName()))))c[d].setOrder(JU.PT.parseInt(k)),JU.Logger.info("assigning order "+c[d].order+" to bond "+c[d])});e(c$,"setHydrogen",function(a,b,c,d){if(this.bsAddedHydrogens.get(b)){var f=this.ms.at;if(-2147483648==this.lastSetH||f[b].mi!=f[this.lastSetH].mi)this.maxSerial=this.ms.getInfo(f[this.lastSetH=
b].mi,"PDB_CONECT_firstAtom_count_max")[2];this.bsAddedHydrogens.clear(b);this.ms.setAtomName(b,c,!1);f[b].setT(d);this.ms.setAtomNumber(b,++this.maxSerial,!1);f[b].atomSymmetry=f[a].atomSymmetry;this.ml.undeleteAtom(b);this.ms.bondAtoms(f[a],f[b],1,this.ms.getDefaultMadFromOrder(1),null,0,!0,!1)}},"~N,~N,~S,JU.P3");e(c$,"fixPropertyValue",function(a,b,c){for(var d=this.ms.at,f=H(a.cardinality(),0),e=0,h=0,j=0,k=a.nextSetBit(0);0<=k;k=a.nextSetBit(k+1),j++){if(1==d[k].getElementNumber()){if(!c)continue}else e=
b[h++];f[j]=e}return f},"JU.BS,~O,~B");c$.allocateBioPolymer=e(c$,"allocateBioPolymer",function(a,b,c,d){for(var f=null,e=0,h=b;h<a.length;++h){var j=a[h],k;if(!r(j,JM.Monomer)||null!=(k=j).bioPolymer||null!=f&&f.getClass()!==k.getClass()||c&&!k.isConnectedAfter(f))break;f=k;e++}if(2>e)return null;c=Array(e);for(h=0;h<e;++h)c[h]=a[b+h];if(r(f,JM.AminoMonomer))return new JM.AminoPolymer(c,d);if(r(f,JM.AlphaMonomer))return new JM.AlphaPolymer(c,d);if(r(f,JM.NucleicMonomer))return new JM.NucleicPolymer(c);
if(r(f,JM.PhosphorusMonomer))return new JM.PhosphorusPolymer(c);if(r(f,JM.CarbohydrateMonomer))return new JM.CarbohydratePolymer(c);JU.Logger.error("Polymer.allocatePolymer() ... no matching polymer for monomor "+f);throw new NullPointerException;},"~A,~N,~B,~N");e(c$,"iterateOverAllNewStructures",function(a,b){var c=a.getStructureIterator(b);if(null!=c){var d=c.getStructuredModels();if(null!=d)for(var f=d.nextSetBit(0);0<=f;f=d.nextSetBit(f+1))this.ml.structuresDefinedInFile.set(this.ml.baseModelIndex+
f);for(;c.hasNext();)c.getStructureType()!==J.c.STR.TURN&&this.setStructure(c);for(c=a.getStructureIterator(b);c.hasNext();)c.getStructureType()===J.c.STR.TURN&&this.setStructure(c)}},"J.api.JmolAdapter,~O");e(c$,"setStructure",function(a){var b=a.getSubstructureType(),c=a.getStructureID(),d=a.getSerialID(),f=a.getStrandCount(),e=a.getAtomIndices(),h=a.getModelIndices(),j=a.getBSAll(),k,m=this.ms.am;this.ml.isTrajectory?k=h=h[0]:(k=h[0]+this.ml.baseModelIndex,h=h[1]+this.ml.baseModelIndex);this.ml.structuresDefinedInFile.setBits(k,
h+1);var l;if(null!=j){a=k;for(var p;a<=h;a++)if(r(k=m[a],JM.BioModel))for(c=0;5>c;c++)null!=(l=j[p=JM.BioResolver.mytypes[c]])&&k.addStructureByBS(0,p,JM.BioResolver.types[c],l)}else{var j=a.getStartChainID(),n=a.getStartSequenceNumber(),q=a.getStartInsertionCode();p=a.getEndSequenceNumber();l=a.getEndChainID();a=a.getEndInsertionCode();b=b===J.c.STR.NOT?J.c.STR.NONE:b;n=JM.Group.getSeqcodeFor(n,q);p=JM.Group.getSeqcodeFor(p,a);null==this.bsAssigned&&(this.bsAssigned=new JU.BS);a=k;for(q=0;a<=h;a++)if(r(k=
m[a],JM.BioModel))k.addSecondaryStructure(b,c,d,f,j,n,l,p,(q=k.firstAtomIndex)+e[0],q+e[1],this.bsAssigned)}},"J.api.JmolAdapterStructureIterator");e(c$,"setGroupLists",function(a){this.ml.group3Lists[a+1]=JM.Group.standardGroupList;this.ml.group3Counts[a+1]=v(JM.BioResolver.group3Count+10,0);null==this.ml.group3Lists[0]&&(this.ml.group3Lists[0]=JM.Group.standardGroupList,this.ml.group3Counts[0]=v(JM.BioResolver.group3Count+10,0))},"~N");e(c$,"isKnownPDBGroup",function(a,b){var c=JM.BioResolver.knownGroupID(a);
return 0<c?c<b:2147483647==b&&JM.BioResolver.checkCarbohydrate(a)},"~S,~N");e(c$,"lookupSpecialAtomID",function(a){if(null==JM.BioResolver.htSpecialAtoms){JM.BioResolver.htSpecialAtoms=new java.util.Hashtable;for(var b=JM.BioResolver.specialAtomNames.length;0<=--b;){var c=JM.BioResolver.specialAtomNames[b];null!=c&&JM.BioResolver.htSpecialAtoms.put(c,Byte.$valueOf(b))}}a=JM.BioResolver.htSpecialAtoms.get(a);return null==a?0:a.byteValue()},"~S");e(c$,"getPdbBondInfo",function(a,b){null==JM.BioResolver.htPdbBondInfo&&
(JM.BioResolver.htPdbBondInfo=new java.util.Hashtable);var c=JM.BioResolver.htPdbBondInfo.get(a);if(null!=c)return c;c=JM.BioResolver.knownGroupID(a);if(0>c||c>JM.BioResolver.pdbBondInfo.length)return null;var d=JM.BioResolver.pdbBondInfo[c];if(b&&0<=(c=d.indexOf("O3'")))d=d.substring(0,c);for(var f=JU.PT.getTokens(d),c=Array(F(f.length/2)),e=0,h=0;e<c.length;e++){var j=f[h++],k=f[h++];if(1==k.length)switch(k.charAt(0)){case "N":k="H@H2";break;case "B":k="HB3@HB2";break;case "D":k="HD3@HD2";break;
case "G":k="HG3@HG2";break;case "2":k="H2'@H2''";break;case "5":k="H5''@H5'"}"H"!=k.charAt(0)&&0<j.compareTo(k)&&(d=k,k=j,j=d);c[e]=D(-1,[j,k,k.startsWith("H")?"1":"2"])}JM.BioResolver.htPdbBondInfo.put(a,c);return c},"~S,~B");c$.knownGroupID=e(c$,"knownGroupID",function(a){if(null==a||0==a.length)return 0;a=JM.BioResolver.htGroup.get(a);return null==a?-1:a.shortValue()},"~S");c$.checkCarbohydrate=e(c$,"checkCarbohydrate",function(a){return null!=a&&0<=",[AHR],[ALL],[AMU],[ARA],[ARB],[BDF],[BDR],[BGC],[BMA],[FCA],[FCB],[FRU],[FUC],[FUL],[GAL],[GLA],[GLC],[GXL],[GUP],[LXC],[MAN],[RAM],[RIB],[RIP],[XYP],[XYS],[CBI],[CT3],[CTR],[CTT],[LAT],[MAB],[MAL],[MLR],[MTT],[SUC],[TRE],[GCU],[MTL],[NAG],[NDG],[RHA],[SOR],[SOL],[SOE],[XYL],[A2G],[LBT],[NGA],[SIA],[SLB],[AFL],[AGC],[GLB],[NAN],[RAA]".indexOf("["+
a.toUpperCase()+"]")},"~S");e(c$,"isHetero",function(a){switch(a.length){case 1:a+="  ";break;case 2:a+=" ";break;case 3:break;default:return!0}a=JM.Group.standardGroupList.indexOf(a);return 0>a||42<=F(a/6)+1},"~S");e(c$,"toStdAmino3",function(a){if(0==a.length)return"";var b=new JU.SB,c=JM.BioResolver.knownGroupID("==A");if(0>c)for(var d=1;20>=d;d++)c=JM.BioResolver.knownGroupID(JM.BioResolver.predefinedGroup3Names[d]),JM.BioResolver.htGroup.put("=="+JM.BioResolver.predefinedGroup1Names[d],Short.$valueOf(c));
for(var d=0,f=a.length;d<f;d++)c=a.charAt(d),c=JM.BioResolver.knownGroupID("=="+c),0>c&&(c=23),b.append(" ").append(JM.BioResolver.predefinedGroup3Names[c]);return b.toString().substring(1)},"~S");e(c$,"getGroupID",function(a){return JM.BioResolver.getGroupIdFor(a)},"~S");c$.getGroupIdFor=e(c$,"getGroupIdFor",function(a){null!=a&&(a=a.trim());var b=JM.BioResolver.knownGroupID(a);return-1==b?JM.BioResolver.addGroup3Name(a):b},"~S");c$.addGroup3Name=e(c$,"addGroup3Name",function(a){JM.BioResolver.group3NameCount==
JM.Group.group3Names.length&&(JM.Group.group3Names=JU.AU.doubleLengthS(JM.Group.group3Names));var b=JM.BioResolver.group3NameCount++;JM.Group.group3Names[b]=a;JM.BioResolver.htGroup.put(a,Short.$valueOf(b));return b},"~S");c$.getStandardPdbHydrogenCount=e(c$,"getStandardPdbHydrogenCount",function(a){a=JM.BioResolver.knownGroupID(a);return 0>a||a>=JM.BioResolver.pdbHydrogenCount.length?-1:JM.BioResolver.pdbHydrogenCount[a]},"~S");c$.getSpecialAtomName=e(c$,"getSpecialAtomName",function(a){return JM.BioResolver.specialAtomNames[a]},
"~N");e(c$,"getArgbs",function(a){switch(a){case 2097166:return JM.BioResolver.argbsNucleic;case 2097154:return JM.BioResolver.argbsAmino;case 1073742144:return JM.BioResolver.argbsShapely;case 1140850689:return JM.BioResolver.argbsChainAtom;case 1612709894:return JM.BioResolver.argbsChainHetero}return null},"~N");e(c$,"getBioModelSet",function(a){null==a.bioModelset&&(a.bioModelset=(new JM.BioModelSet).set(this.vwr,a));return a.bioModelset},"JM.ModelSet");c$.htGroup=c$.prototype.htGroup=new java.util.Hashtable;
c$.types=c$.prototype.types=D(-1,[J.c.STR.HELIXPI,J.c.STR.HELIXALPHA,J.c.STR.SHEET,J.c.STR.HELIX310,J.c.STR.TURN]);z(c$,"mytypes",v(-1,[0,2,3,4,6]),"htPdbBondInfo",null,"pdbBondInfo",D(-1,";N N CA HA C O CB HB?;N N CA HA C O CB B CG G CD D NE HE CZ NH1 NH1 HH11@HH12 NH2 HH22@HH21;N N CA HA C O CB B CG OD1 ND2 HD21@HD22;N N CA HA C O CB B CG OD1;N N CA HA C O CB B SG HG;N N CA HA C O CB B CG G CD OE1 NE2 HE22@HE21;N N CA HA C O CB B CG G CD OE1;N N CA HA2@HA3 C O;N N CA HA C O CB B CG CD2 ND1 CE1 ND1 HD1 CD2 HD2 CE1 HE1 NE2 HE2;N N CA HA C O CB HB CG1 HG13@HG12 CG2 HG2? CD1 HD1?;N N CA HA C O CB B CG HG CD1 HD1? CD2 HD2?;N N CA HA C O CB B CG G CD HD2@HD3 CE HE3@HE2 NZ HZ?;N N CA HA C O CB B CG G CE HE?;N N CA HA C O CB B CG CD1 CD1 HD1 CD2 CE2 CD2 HD2 CE1 CZ CE1 HE1 CE2 HE2 CZ HZ;N H CA HA C O CB B CG G CD D;N N CA HA C O CB B OG HG;N N CA HA C O CB HB OG1 HG1 CG2 HG2?;N N CA HA C O CB B CG CD1 CD1 HD1 CD2 CE2 NE1 HE1 CE3 CZ3 CE3 HE3 CZ2 CH2 CZ2 HZ2 CZ3 HZ3 CH2 HH2;N N CA HA C O CB B CG CD1 CD1 HD1 CD2 CE2 CD2 HD2 CE1 CZ CE1 HE1 CE2 HE2 OH HH;N N CA HA C O CB HB CG1 HG1? CG2 HG2?;N N CA HA C O CB B;N N CA HA C O CB B CG G;;P OP1 C5' 5 C4' H4' C3' H3' C2' H2' O2' HO2' C1' H1' C8 N7 C8 H8 C5 C4 C6 O6 N1 H1 C2 N3 N2 H22@H21 O3' HO3' O5' HO5';P OP1 C5' 5 C4' H4' C3' H3' C2' H2' O2' HO2' C1' H1' C2 O2 N3 C4 N4 H41@H42 C5 C6 C5 H5 C6 H6 O3' HO3' O5' HO5';P OP1 C5' 5 C4' H4' C3' H3' C2' H2' O2' HO2' C1' H1' C8 N7 C8 H8 C5 C4 C6 N1 N6 H61@H62 C2 N3 C2 H2 O3' HO3' O5' HO5';P OP1 C5' 5 C4' H4' C3' H3' C2' 2 C1' H1' C2 O2 N3 H3 C4 O4 C5 C6 C7 H7? C6 H6 O3' HO3' O5' HO5';P OP1 C5' 5 C4' H4' C3' H3' C2' H2' O2' HO2' C1' H1' C2 O2 N3 H3 C4 O4 C5 C6 C5 H5 C6 H6 O3' HO3' O5' HO5';P OP1 C5' 5 C4' H4' C3' H3' C2' H2' O2' HO2' C1' H1' C8 N7 C8 H8 C5 C4 C6 O6 N1 H1 C2 N3 C2 H2 O3' HO3' O5' HO5';P OP1 C5' 5 C4' H4' C3' H3' C2' 2 C1' H1' C8 N7 C8 H8 C5 C4 C6 O6 N1 H1 C2 N3 N2 H22@H21 O3' HO3' O5' HO5';P OP1 C5' 5 C4' H4' C3' H3' C2' 2 C1' H1' C2 O2 N3 C4 N4 H41@H42 C5 C6 C5 H5 C6 H6 O3' HO3' O5' HO5';P OP1 C5' 5 C4' H4' C3' H3' C2' 2 C1' H1' C8 N7 C8 H8 C5 C4 C6 N1 N6 H61@H62 C2 N3 C2 H2 O3' HO3' O5' HO5';P OP1 C5' 5 C4' H4' C3' H3' C2' 2 C1' H1' C2 O2 N3 H3 C4 O4 C5 C6 C7 H7? C6 H6 O3' HO3' O5' HO5';P OP1 C5' 5 C4' H4' C3' H3' C2' 2 C1' H1' C2 O2 N3 H3 C4 O4 C5 C6 C5 H5 C6 H6 O3' HO3' O5' HO5';P OP1 C5' 5 C4' H4' C3' H3' C2' 2 C1' H1' C8 N7 C8 H8 C5 C4 C6 O6 N1 H1 C2 N3 C2 H2 O3' HO3' O5' HO5'".split(";")),
"pdbHydrogenCount",v(-1,[0,6,16,7,6,6,9,8,4,9,12,12,14,10,10,8,6,8,11,10,10,3,5,0,13,13,13,-1,12,12,13,13,13,14,12,12]),"allCarbohydrates",",[AHR],[ALL],[AMU],[ARA],[ARB],[BDF],[BDR],[BGC],[BMA],[FCA],[FCB],[FRU],[FUC],[FUL],[GAL],[GLA],[GLC],[GXL],[GUP],[LXC],[MAN],[RAM],[RIB],[RIP],[XYP],[XYS],[CBI],[CT3],[CTR],[CTT],[LAT],[MAB],[MAL],[MLR],[MTT],[SUC],[TRE],[GCU],[MTL],[NAG],[NDG],[RHA],[SOR],[SOL],[SOE],[XYL],[A2G],[LBT],[NGA],[SIA],[SLB],[AFL],[AGC],[GLB],[NAN],[RAA]","group3Count",0,"predefinedGroup1Names",
M(-1,"\x00ARNDCQEGHILKMFPSTWYVAG?GCATUIGCATUIGCATUI".split("")),"group3NameCount",0,"predefinedGroup3Names",D(-1,"   ;ALA;ARG;ASN;ASP;CYS;GLN;GLU;GLY;HIS;ILE;LEU;LYS;MET;PHE;PRO;SER;THR;TRP;TYR;VAL;ASX;GLX;UNK;G  ;C  ;A  ;T  ;U  ;I  ;DG ;DC ;DA ;DT ;DU ;DI ;+G ;+C ;+A ;+T ;+U ;+I ;HOH;DOD;WAT;UREA;PO4;SO4;UNL".split(";")),"specialAtomNames",D(-1,[null,"N","CA","C","O","O1","O5'","C5'","C4'","C3'","O3'","C2'","C1'","P","OD1","OD2","OE1","OE2","SG",null,null,null,null,null,null,null,null,null,null,
null,null,null,"N1","C2","N3","C4","C5","C6","O2","N7","C8","N9","N4","N2","N6","C5M","O6","O4","S4","C7","H1","H2","H3",null,null,null,null,null,null,null,null,null,null,null,"OXT","H","1H","2H","3H","HA","1HA","2HA","H5T","O5T","O1P","OP1","O2P","OP2","O4'","O2'","1H5'","2H5'","H4'","H3'","1H2'","2H2'","2HO'","H1'","H3T","HO3'","HO5'","HA2","HA3","HA2","H5'","H5''","H2'","H2''","HO2'","O3P","OP3"]));c$.ATOMID_MAX=c$.prototype.ATOMID_MAX=JM.BioResolver.specialAtomNames.length;z(c$,"htSpecialAtoms",
null,"argbsAmino",v(-1,[4290682990,4291348680,4279524095,4278246620,4293265930,4293322240,4278246620,4293265930,4293651435,4286743250,4279206415,4279206415,4279524095,4293322240,4281479850,4292646530,4294612480,4294612480,4290009780,4281479850,4279206415,4294928820,4294928820,4290682990]),"argbsNucleic",v(-1,[4290682990,4288716960,4279206415,4293322240,4293265930,4279524095,4278246620,4278246620,4279206415,4293322240,4293265930,4279524095,4278246620,4278246620,4279206415,4293322240,4293265930,4279524095,
4278246620,4278246620]),"argbsChainAtom",v(-1,[4294967295,4290826495,4289789872,4294951112,4294967168,4294951167,4289786096,4294955120,4293951616,4294303411,4278239231,4291648604,4284927402,4288335154,4293821166,4278243025,4278255487,4282168177,4278190219,4290623339,4278215680,4286578688,4286611456,4286578816,4278222976,4290283019,4289864226]),"argbsChainHetero",v(-1,[4294967295,-7298865,-8335464,-3174224,-3158160,-3174193,-8339264,-3170208,-4173712,-3821949,-16734257,-4895668,-11094638,-7686870,
-4296002,-16730463,-16724113,-13329567,-16777029,-5922981,-16739328,-5242880,-5197824,-5242704,-16731984,-1526253,-4050382]),"argbsShapely",v(-1,[4294902015,4278190204,4294933616,4287430540,4288675906,4294967152,4294921292,4284874752,4294967295,4285559039,4278209536,4282736197,4282861496,4283649106,4290289730,4283585106,4294930498,4290268160,4283385344,4287393868,4294937855,4294902015,4294902015,4294902015,4294930544,4294937675,4288717055,4288741280,4294934656,4286644223,4294930544,4294937675,4288717055,
4288741280,4294934656,4286644223,4294930544,4294937675,4288717055,4288741280,4294934656,4286644223]))});n("JM");q(["JM.Monomer"],"JM.CarbohydrateMonomer",["J.c.STR"],function(){c$=A(JM,"CarbohydrateMonomer",JM.Monomer);K(c$,function(){});c$.validateAndAllocate=e(c$,"validateAndAllocate",function(a,b,c,d,f){return(new JM.CarbohydrateMonomer).set2(a,b,c,d,f,JM.CarbohydrateMonomer.alphaOffsets)},"JM.Chain,~S,~N,~N,~N");j(c$,"isCarbohydrate",function(){return!0});j(c$,"getProteinStructureType",function(){return J.c.STR.CARBOHYDRATE});
j(c$,"isConnectedAfter",function(a){if(null==a)return!0;for(var b=this.firstAtomIndex;b<=this.lastAtomIndex;b++)for(var c=a.firstAtomIndex;c<=a.lastAtomIndex;c++){var d=this.chain.model.ms.at[b],f=this.chain.model.ms.at[c];if(null!=d&&null!=f&&14==d.getElementNumber()+f.getElementNumber()&&3.24>d.distanceSquared(f))return!0}return!1},"JM.Monomer");j(c$,"findNearestAtomIndex",function(a,b,c,d){var f=c[0],e=this.getLeadAtom();d=F(d/2);1200>d&&(d=1200);0!=e.sZ&&(d=C(this.scaleToScreen(e.sZ,d)),4>d&&
(d=4),this.isCursorOnTopOf(e,a,b,d,f)&&(c[0]=e))},"~N,~N,~A,~N,~N");j(c$,"isConnectedPrevious",function(){if(0>=this.monomerIndex)return!1;for(var a=this.firstAtomIndex;a<=this.lastAtomIndex;a++)if(this.getCrossLinkGroup(a,null,null,!0,!1,!1))return!0;return!1});z(c$,"alphaOffsets",G(-1,[0]))});n("JM");q(["JM.BioPolymer"],"JM.CarbohydratePolymer",null,function(){c$=A(JM,"CarbohydratePolymer",JM.BioPolymer);w(c$,function(a){I(this,JM.CarbohydratePolymer,[]);this.set(a);this.type=3},"~A")});n("JM");
q(["JM.Monomer"],"JM.PhosphorusMonomer",["JU.Quat","$.V3","J.c.STR"],function(){c$=A(JM,"PhosphorusMonomer",JM.Monomer);j(c$,"isNucleic",function(){return!0});K(c$,function(){});c$.validateAndAllocateP=e(c$,"validateAndAllocateP",function(a,b,c,d,f,e){return d!=f||e[13]!=d?null:(new JM.PhosphorusMonomer).set2(a,b,c,d,f,JM.PhosphorusMonomer.phosphorusOffsets)},"JM.Chain,~S,~N,~N,~N,~A");j(c$,"isDna",function(){return this.isDnaByID()});j(c$,"isRna",function(){return this.isRnaByID()});j(c$,"isPurine",
function(){return this.isPurineByID()});j(c$,"isPyrimidine",function(){return this.isPyrimidineByID()});j(c$,"getStructure",function(){return this.chain});j(c$,"getProteinStructureType",function(){return J.c.STR.NONE});j(c$,"isConnectedAfter",function(a){return this.isCA2(a)},"JM.Monomer");e(c$,"isCA2",function(a){return null==a?!0:this.getLeadAtom().distance(a.getLeadAtom())<=JM.PhosphorusMonomer.MAX_ADJACENT_PHOSPHORUS_DISTANCE},"JM.Monomer");j(c$,"getQuaternion",function(){return this.getQuaternionP()},
"~S");e(c$,"getQuaternionP",function(){var a=this.monomerIndex;if(0>=a||a>=this.bioPolymer.monomerCount-1)return null;var b=this.bioPolymer.monomers[a].getAtomFromOffsetIndex(0),c;c=this.bioPolymer.monomers[a+1].getAtomFromOffsetIndex(0);a=this.bioPolymer.monomers[a-1].getAtomFromOffsetIndex(0);if(null==b||null==c||null==a)return null;var d=new JU.V3,f=new JU.V3;d.sub2(c,b);f.sub2(a,b);return JU.Quat.getQuaternionFrameV(d,f,null,!1)});j(c$,"getQuaternionFrameCenter",function(){return this.getAtomFromOffsetIndex(0)},
"~S");j(c$,"getHelixData",function(a,b,c){return this.getHelixData2(a,b,c)},"~N,~S,~N");z(c$,"P",0,"phosphorusOffsets",G(-1,[0]),"MAX_ADJACENT_PHOSPHORUS_DISTANCE",8)});n("JM");c$=t(function(){this.g2=this.g1=this.info=null;u(this,arguments)},JM,"BasePair");w(c$,function(){});c$.add=e(c$,"add",function(a,b,c){if(null==b||null==c)return null;var d=new JM.BasePair;d.info=a;(d.g1=b).addBasePair(d);(d.g2=c).addBasePair(d);return d},"java.util.Map,JM.NucleicMonomer,JM.NucleicMonomer");e(c$,"getPartnerAtom",
function(a){return(a===this.g1?this.g2:this.g1).getLeadAtom().i},"JM.NucleicMonomer");e(c$,"toString",function(){return this.info.toString()});n("JM");q(["JM.PhosphorusMonomer"],"JM.NucleicMonomer","java.lang.Character JU.A4 $.Lst $.M3 $.P3 $.Quat $.V3 J.c.STR JM.Group JM.NucleicPolymer".split(" "),function(){c$=t(function(){this.hasRnaO2Prime=this.$isPyrimidine=this.$isPurine=!1;this.dssrBox=this.bps=this.baseCenter=null;this.dssrBoxHeight=0;this.dssrFrame=null;u(this,arguments)},JM,"NucleicMonomer",
JM.PhosphorusMonomer);K(c$,function(){});c$.validateAndAllocate=e(c$,"validateAndAllocate",function(a,b,c,d,f,e){var h=JM.Monomer.scanForOffsets(d,e,JM.NucleicMonomer.interestingNucleicAtomIDs);if(null==h||!JM.Monomer.checkOptional(h,19,d,e[73]))return null;JM.Monomer.checkOptional(h,20,d,e[89]);JM.Monomer.checkOptional(h,18,d,e[90]);JM.Monomer.checkOptional(h,23,d,e[75]);JM.Monomer.checkOptional(h,24,d,e[77]);return(new JM.NucleicMonomer).set4(a,b,c,d,f,h)},"JM.Chain,~S,~N,~N,~N,~A");e(c$,"set4",
function(a,b,c,d,f,e){this.set2(a,b,c,d,f,e);JM.Monomer.have(e,15)||(e[0]=e[19],this.setLeadAtomIndex());this.hasRnaO2Prime=JM.Monomer.have(e,2);this.$isPyrimidine=JM.Monomer.have(e,8);this.$isPurine=JM.Monomer.have(e,9)&&JM.Monomer.have(e,10)&&JM.Monomer.have(e,11);return this},"JM.Chain,~S,~N,~N,~N,~A");j(c$,"isNucleicMonomer",function(){return!0});j(c$,"isDna",function(){return!this.hasRnaO2Prime});j(c$,"isRna",function(){return this.hasRnaO2Prime});j(c$,"isPurine",function(){return this.$isPurine||
!this.$isPyrimidine&&this.isPurineByID()});j(c$,"isPyrimidine",function(){return this.$isPyrimidine||!this.$isPurine&&this.isPyrimidineByID()});e(c$,"isGuanine",function(){return JM.Monomer.have(this.offsets,17)});j(c$,"getProteinStructureType",function(){return this.hasRnaO2Prime?J.c.STR.RNA:J.c.STR.DNA});e(c$,"getP",function(){return this.getAtomFromOffsetIndex(0)});e(c$,"getC1P",function(){return this.getAtomFromOffsetIndex(25)});e(c$,"getC2",function(){return this.getAtomFromOffsetIndex(5)});
e(c$,"getC5",function(){return this.getAtomFromOffsetIndex(3)});e(c$,"getC6",function(){return this.getAtomFromOffsetIndex(1)});e(c$,"getC8",function(){return this.getAtomFromOffsetIndex(10)});e(c$,"getC4P",function(){return this.getAtomFromOffsetIndex(27)});e(c$,"getN1",function(){return this.getAtomFromOffsetIndex(4)});e(c$,"getN3",function(){return this.getAtomFromOffsetIndex(6)});e(c$,"getN2",function(){return this.getAtomFromOffsetIndex(17)});e(c$,"getN4",function(){return this.getAtomFromOffsetIndex(14)});
e(c$,"getN6",function(){return this.getAtomFromOffsetIndex(16)});e(c$,"getO2",function(){return this.getAtomFromOffsetIndex(8)});e(c$,"getO4",function(){return this.getAtomFromOffsetIndex(12)});e(c$,"getO6",function(){return this.getAtomFromOffsetIndex(13)});j(c$,"getTerminatorAtom",function(){return this.getAtomFromOffsetIndex(JM.Monomer.have(this.offsets,20)?20:21)});e(c$,"getBaseRing6Points",function(a){this.getPoints(JM.NucleicMonomer.ring6OffsetIndexes,a)},"~A");e(c$,"getPoints",function(a,b){for(var c=
a.length;0<=--c;)b[c]=this.getAtomFromOffsetIndex(a[c])},"~A,~A");e(c$,"maybeGetBaseRing5Points",function(a){this.$isPurine&&this.getPoints(JM.NucleicMonomer.ring5OffsetIndexes,a);return this.$isPurine},"~A");e(c$,"getRiboseRing5Points",function(a){this.getPoints(JM.NucleicMonomer.riboseOffsetIndexes,a)},"~A");j(c$,"isConnectedAfter",function(a){if(null==a)return!0;var b=this.getAtomFromOffsetIndex(15);return null==b?!1:a.getAtomFromOffsetIndex(21).isBonded(b)||this.isCA2(a)},"JM.Monomer");j(c$,"findNearestAtomIndex",
function(a,b,c,d){var f=c[0],e=this.getLeadAtom(),h=this.getAtomFromOffsetIndex(19),j=this.getAtomFromOffsetIndex(22);d=F(d/2);1900>d&&(d=1900);d=C(this.scaleToScreen(e.sZ,d));4>d&&(d=4);if(this.isCursorOnTopOf(e,a,b,d,f)||this.isCursorOnTopOf(h,a,b,d,f)||this.isCursorOnTopOf(j,a,b,d,f))c[0]=e},"~N,~N,~A,~N,~N");e(c$,"setRingsVisible",function(a){for(var b=6;0<=--b;)this.getAtomFromOffsetIndex(JM.NucleicMonomer.ring6OffsetIndexes[b]).setShapeVisibility(32768,a);if(this.$isPurine)for(b=4;1<=--b;)this.getAtomFromOffsetIndex(JM.NucleicMonomer.ring5OffsetIndexes[b]).setShapeVisibility(32768,
a)},"~B");e(c$,"setRingsClickable",function(){for(var a=6;0<=--a;)this.getAtomFromOffsetIndex(JM.NucleicMonomer.ring6OffsetIndexes[a]).setClickable(32768);if(this.$isPurine)for(a=4;1<=--a;)this.getAtomFromOffsetIndex(JM.NucleicMonomer.ring5OffsetIndexes[a]).setClickable(32768)});e(c$,"getN0",function(){return this.getAtomFromOffsetIndex(this.$isPurine?11:4)});j(c$,"getHelixData",function(a,b,c){return this.getHelixData2(a,b,c)},"~N,~S,~N");j(c$,"getQuaternionFrameCenter",function(a){switch(a){case "x":case "a":case "b":case "p":return this.getP();
case "c":if(null==this.baseCenter){a=0;this.baseCenter=new JU.P3;for(var b=0;b<JM.NucleicMonomer.heavyAtomIndexes.length;b++){var c=this.getAtomFromOffsetIndex(JM.NucleicMonomer.heavyAtomIndexes[b]);null!=c&&(this.baseCenter.add(c),a++)}this.baseCenter.scale(1/a)}return this.baseCenter;default:return this.getN0()}},"~S");j(c$,"getQuaternion",function(a){if(null==this.bioPolymer)return null;var b=null,c=null,d=!1,f=!1;switch(a){case "a":a=this.getP();if(0==this.monomerIndex||null==a)return null;d=
!0;b=this.bioPolymer.monomers[this.monomerIndex-1].getC4P();c=this.getC4P();break;case "x":a=this.getP();if(this.monomerIndex==this.bioPolymer.monomerCount-1||null==a)return null;b=this.bioPolymer.monomers[this.monomerIndex+1].getP();c=this.getC4P();break;case "b":return this.getQuaternionP();case "c":case "n":a=this.getN0();if(null==a)return null;f=d=!0;b=this.getAtomFromOffsetIndex(5);c=this.getAtomFromOffsetIndex(25);break;case "p":a=this.getP();if(null==a)return null;var e=this.getAtomFromOffsetIndex(23),
h=this.getAtomFromOffsetIndex(24),j=a.bonds;if(null==j)return null;for(var k=a.group,m=0;m<j.length;m++){var l=j[m].getOtherAtom(a);null!=e&&l.i==e.i||null!=h&&l.i==h.i||(l.group===k?c=l:b=l)}break;case "q":return null;default:a=this.getN0();if(null==a)return null;this.$isPurine?(b=this.getAtomFromOffsetIndex(5),c=this.getAtomFromOffsetIndex(9)):(b=this.getAtomFromOffsetIndex(6),c=this.getAtomFromOffsetIndex(1))}if(null==b||null==c)return null;b=JU.V3.newVsub(b,a);c=JU.V3.newVsub(c,a);f&&c.scale(-1);
return JU.Quat.getQuaternionFrameV(b,c,null,d)},"~S");j(c$,"isCrossLinked",function(a){if(!r(a,JM.NucleicMonomer)||this.$isPurine==a.isPurine())return!1;var b=this.$isPurine?a:this;a=(this.$isPurine?this:a).getN1();b=b.getN3();return a.isBonded(b)},"JM.Group");j(c$,"getCrossLinkVector",function(a,b,c){if(!c)return!1;b=this.$isPurine?this.getN1():this.getN3();c=b.bonds;if(null==c)return!1;for(var d=0;d<c.length;d++)if(c[d].isHydrogen()){var f=c[d].getOtherAtom(b),e=f.group;if(r(e,JM.NucleicMonomer)&&
(this.$isPurine?e.getN3():e.getN1())===f){if(null==a)return!0;a.addLast(Integer.$valueOf(b.i));a.addLast(Integer.$valueOf(f.i));a.addLast(Integer.$valueOf(e.leadAtomIndex))}}return null!=a&&0<a.size()},"JU.Lst,~B,~B");e(c$,"getEdgePoints",function(a){a[0]=this.getLeadAtom();a[1]=this.getC4P();a[2]=a[5]=this.getC1P();switch(this.getGroup1()){case "C":return a[3]=this.getO2(),a[4]=this.getN4(),!0;case "A":return a[3]=this.getC2(),a[4]=this.getN6(),!0;case "G":case "I":return a[3]=this.getC2(),a[4]=
this.getO6(),!0;case "T":case "U":return a[3]=this.getO2(),a[4]=this.getO4(),!0;default:return!1}},"~A");e(c$,"addBasePair",function(a){null==this.bps&&(this.bps=new JU.Lst);this.bps.addLast(a)},"JM.BasePair");e(c$,"setGroup1",function(a){"\x00"==this.group1&&(this.group1=a)},"~S");e(c$,"getBasePairs",function(){null!=this.bioPolymer&&!this.bioPolymer.isDssrSet&&this.bioPolymer.model.ms.vwr.getAnnotationParser(!0).getBasePairs(this.bioPolymer.model.ms.vwr,this.bioPolymer.model.modelIndex);return this.bps});
j(c$,"getGroup1b",function(){var a=JM.Group.group3Names[this.groupID],b=null==JM.NucleicPolymer.htGroup1?null:JM.NucleicPolymer.htGroup1.get(a);return null==b?Character.toLowerCase(a.charAt(a.length-1)):b.charAt(0)});e(c$,"getDSSRFrame",function(a){if(null!=this.dssrFrame)return this.dssrFrame;if(null!=this.dssrNT)return this.dssrFrame=a.getAnnotationParser(!0).getDSSRFrame(this.dssrNT);a=this.dssrFrame=Array(4);for(var b=4;0<=--b;)a[b]=new JU.P3;if(this.isPurine()){b=JU.P3.newP(this.getC5());b.sub(this.getC8());
b.normalize();a[2].setT(b);a[2].scale(-1);a[0].scaleAdd2(4.9,b,this.getC8());var c=JU.P3.newP(this.getN0());c.sub(this.getC8());a[3].cross(c,b);a[3].normalize()}else b=JU.P3.newP(this.getN0()),b.sub(this.getC6()),c=JU.P3.newP(this.getC5()),c.sub(this.getC6()),a[3].cross(b,c),a[3].normalize(),a[2].setT(b),a[2].normalize(),b=JU.A4.new4(a[3].x,a[3].y,a[3].z,1.1623892818282233),c=new JU.M3,c.setAA(b),c.rotate(a[2]),a[0].scaleAdd2(5.1,a[2],this.getC6()),a[2].scale(-1);a[1].cross(a[2],a[3]);return this.dssrFrame},
"JV.Viewer");z(c$,"C6",1,"O2Pr",2,"C5",3,"N1",4,"C2",5,"N3",6,"C4",7,"O2",8,"N7",9,"C8",10,"N9",11,"O4",12,"O6",13,"N4",14,"NP",15,"N6",16,"N2",17,"H5T",18,"O5P",19,"H3T",20,"O3P",21,"C3P",22,"O1P",23,"O2P",24,"C1P",25,"C2P",26,"C4P",27,"O4P",28,"C5P",29,"interestingNucleicAtomIDs",G(-1,[-14,37,-80,36,32,33,34,35,-39,-40,-41,-42,-48,-47,-43,-14,-45,-44,-73,-7,-89,10,9,-75,-77,-13,-12,-9,-79,-8]),"ring6OffsetIndexes",G(-1,[3,1,4,5,6,7]),"ring5OffsetIndexes",G(-1,[3,9,10,11,7]),"riboseOffsetIndexes",
G(-1,[25,26,22,27,28,21,29,19,0]),"heavyAtomIndexes",G(-1,[3,1,4,5,6,7,11,10,9,16,14,8,12,17,13]))});n("JM");q(["JM.PhosphorusPolymer"],"JM.NucleicPolymer",["JU.Measure","$.P4","$.V3","JM.HBond"],function(){c$=t(function(){this.isDssrSet=!1;u(this,arguments)},JM,"NucleicPolymer",JM.PhosphorusPolymer);w(c$,function(a){I(this,JM.NucleicPolymer,[a]);this.type=2;this.hasWingPoints=!0},"~A");e(c$,"getNucleicPhosphorusAtom",function(a){return this.monomers[a].getLeadAtom()},"~N");j(c$,"calcEtaThetaAngles",
function(){for(var a=NaN,b=0;b<this.monomerCount-2;++b){var c=this.monomers[b],d=this.monomers[b+1],f=c.getP(),e=c.getC4P(),h=d.getP(),d=d.getC4P();0<b&&(a=this.monomers[b-1].getC4P(),a=JU.Measure.computeTorsion(a,f,e,h,!0));f=JU.Measure.computeTorsion(f,e,h,d,!0);0>a&&(a+=360);0>f&&(f+=360);c.setGroupParameter(1111490565,a);c.setGroupParameter(1111490576,f)}return!0});j(c$,"calcRasmolHydrogenBonds",function(a,b,c,d,f){for(var e=new JU.V3,h=new JU.V3,j=this.monomerCount;0<=--j;){var k=this.monomers[j];
if(k.isPurine()){var m=k.getN3(),l=b.get(m.i);if(l||c.get(m.i)){for(var p=k.getN1(),n=k.getN0(),q=JU.Measure.getPlaneThroughPoints(m,p,n,e,h,new JU.P4),m=null,r=25,s=null,u=a.monomerCount;0<=--u;){var t=a.monomers[u];if(t.$isPyrimidine){var v=t.getN3();if(!(l?!c.get(v.i):!b.get(v.i))){var w=t.getN0(),B=p.distanceSquared(v);B<r&&(50<n.distanceSquared(w)&&1>Math.abs(JU.Measure.distanceToPlane(q,v)))&&(s=t,m=v,r=B)}}}l=0;null!=m&&(l+=JM.NucleicPolymer.addHydrogenBond(d,p,m),l>=f||(k.isGuanine()?(l+=
JM.NucleicPolymer.addHydrogenBond(d,k.getN2(),s.getO2()),l>=f||JM.NucleicPolymer.addHydrogenBond(d,k.getO6(),s.getN4())):JM.NucleicPolymer.addHydrogenBond(d,k.getN6(),s.getO4())))}}}},"JM.BioPolymer,JU.BS,JU.BS,JU.Lst,~N,~A,~B,~B");c$.addHydrogenBond=e(c$,"addHydrogenBond",function(a,b,c){if(null==b||null==c)return 0;a.addLast(new JM.HBond(b,c,18432,1,0,0));return 1},"JU.Lst,JM.Atom,JM.Atom");z(c$,"htGroup1",null)});n("JM");c$=t(function(){this.g2=this.g1=this.info=null;u(this,arguments)},JM,"BasePair");
w(c$,function(){});c$.add=e(c$,"add",function(a,b,c){if(null==b||null==c)return null;var d=new JM.BasePair;d.info=a;(d.g1=b).addBasePair(d);(d.g2=c).addBasePair(d);return d},"java.util.Map,JM.NucleicMonomer,JM.NucleicMonomer");e(c$,"getPartnerAtom",function(a){return(a===this.g1?this.g2:this.g1).getLeadAtom().i},"JM.NucleicMonomer");e(c$,"toString",function(){return this.info.toString()});n("JM");q(["JM.BioPolymer"],"JM.PhosphorusPolymer",null,function(){c$=A(JM,"PhosphorusPolymer",JM.BioPolymer);
w(c$,function(a){I(this,JM.PhosphorusPolymer,[]);this.set(a);this.hasStructure=!0},"~A")});n("J.dssx");q(null,"J.dssx.Bridge",["java.lang.Boolean","JU.Escape"],function(){c$=t(function(){this.ladder=this.b=this.a=null;this.isAntiparallel=!1;u(this,arguments)},J.dssx,"Bridge");w(c$,function(a,b,c){this.a=a;this.b=b;this.ladder=v(2,2,0);this.ladder[0][0]=this.ladder[0][1]=Math.min(a.i,b.i);this.ladder[1][0]=this.ladder[1][1]=Math.max(a.i,b.i);this.addLadder(c)},"JM.Atom,JM.Atom,java.util.Map");e(c$,
"addBridge",function(a,b){if(a.isAntiparallel!=this.isAntiparallel||!this.canAdd(a)||!a.canAdd(this))return!1;this.extendLadder(a.ladder[0][0],a.ladder[1][0]);this.extendLadder(a.ladder[0][1],a.ladder[1][1]);a.ladder=this.ladder;a.ladder!==this.ladder&&(b.remove(a.ladder),this.addLadder(b));return!0},"J.dssx.Bridge,java.util.Map");e(c$,"addLadder",function(a){a.put(this.ladder,this.isAntiparallel?Boolean.TRUE:Boolean.FALSE)},"java.util.Map");e(c$,"canAdd",function(a){var b=a.a.i;a=a.b.i;return this.isAntiparallel?
b>=this.ladder[0][1]&&a<=this.ladder[1][0]||b<=this.ladder[0][0]&&a>=this.ladder[1][1]:b<=this.ladder[0][0]&&a<=this.ladder[1][0]||b>=this.ladder[0][1]&&a>=this.ladder[1][1]},"J.dssx.Bridge");e(c$,"extendLadder",function(a,b){this.ladder[0][0]>a&&(this.ladder[0][0]=a);this.ladder[0][1]<a&&(this.ladder[0][1]=a);this.ladder[1][0]>b&&(this.ladder[1][0]=b);this.ladder[1][1]<b&&(this.ladder[1][1]=b)},"~N,~N");j(c$,"toString",function(){return(this.isAntiparallel?"a ":"p ")+this.a+" - "+this.b+"\t"+JU.Escape.e(this.ladder)})});
n("J.dssx");q(null,"J.dssx.DSSP","java.lang.Boolean java.util.Hashtable JU.AU $.BS $.Lst $.PT $.SB J.c.STR J.dssx.Bridge J.i18n.GT JM.HBond JM.AminoPolymer JU.Escape $.Logger JV.Viewer".split(" "),function(){c$=t(function(){this.done=this.vHBonds=this.bioPolymers=null;this.setStructure=this.dsspIgnoreHydrogens=this.doReport=!1;this.bsBad=this.labels=null;this.bioPolymerCount=0;this.bridgesP=this.bridgesA=this.htLadders=this.htBridges=null;this.isDSSP2=!1;this.sheetOffsets=null;u(this,arguments)},
J.dssx,"DSSP");O(c$,function(){this.sheetOffsets=D(-1,[v(-1,[0,-1,1,0,1,0,0,-1]),v(-1,[0,0,0,0,1,-1,1,-1])])});w(c$,function(){});e(c$,"calculateDssp",function(a,b,c,d,f,e,h){this.bioPolymers=a;this.bioPolymerCount=b;this.vHBonds=c;this.doReport=d;this.dsspIgnoreHydrogens=f;this.setStructure=e;this.isDSSP2=1<h;a=new JU.BS;for(h=0;h<b;h++)r(this.bioPolymers[h],JM.AminoPolymer)&&a.set(h);if(a.isEmpty())return"";h=this.bioPolymers[0].model;c=new JU.SB;c.append("Jmol ").append(JV.Viewer.getJmolVersion()).append(" DSSP analysis for model ").append(h.ms.getModelNumberDotted(h.modelIndex)).append(" - ").append(h.ms.getModelTitle(h.modelIndex)).append("\n");
0==h.modelIndex&&c.append("\nW. Kabsch and C. Sander, Biopolymers, vol 22, 1983, pp 2577-2637\n\nWe thank Wolfgang Kabsch and Chris Sander for writing the DSSP software,\nand we thank the CMBI for maintaining it to the extent that it was easy to\nre-engineer in Java for our purposes. \n\nSecond generation DSSP 2.0 is ").append(this.isDSSP2?"":"NOT ").append("used in this analysis. See Int. J. Mol. Sci. 2014, 15, 7841-7864; doi:10.3390/ijms15057841.\n");e&&0==h.modelIndex&&c.append("\nAll bioshapes have been deleted and must be regenerated.\n");
0<h.altLocCount&&c.append("\nNote: This model contains alternative locations. Use  'CONFIGURATION 1' to be consistent with CMBI DSSP.\n");this.labels=M(b,"\x00");this.done=Array(b);this.bsBad=new JU.BS;var j=!1;for(h=a.nextSetBit(0);0<=h;h=a.nextSetBit(h+1)){e=this.bioPolymers[h];!j&&null!=e.monomers[0].getExplicitNH()&&(f?c.append(J.i18n.GT.o(J.i18n.GT.$("NOTE: Backbone amide hydrogen positions are present and will be ignored. Their positions will be approximated, as in standard DSSP analysis.\nUse {0} to not use this approximation.\n\n"),
"SET dsspCalculateHydrogenAlways FALSE")):c.append(J.i18n.GT.o(J.i18n.GT.$("NOTE: Backbone amide hydrogen positions are present and will be used. Results may differ significantly from standard DSSP analysis.\nUse {0} to ignore these hydrogen positions.\n\n"),"SET dsspCalculateHydrogenAlways TRUE")),j=!0);e.recalculateLeadMidpointsAndWingVectors();var k=e.monomerCount;this.labels[h]=M(k,"\x00");this.done[h]=new JU.BS;for(var m=0;m<k;m++)null==e.monomers[m].getCarbonylOxygenAtom()&&this.bsBad.set(e.monomers[m].leadAtomIndex)}f=
this.getDualHydrogenBondArray();this.bridgesA=new JU.Lst;this.bridgesP=new JU.Lst;this.htBridges=new java.util.Hashtable;this.htLadders=new java.util.Hashtable;this.getBridges(f);this.getSheetStructures();b=Array(b);for(h=a.nextSetBit(0);0<=h;h=a.nextSetBit(h+1))null!=f[h]&&(b[h]=this.findHelixes(h,f[h]));if(d){d=new JU.SB;c.append("\n------------------------------\n");for(h=a.nextSetBit(0);0<=h;h=a.nextSetBit(h+1))null!=this.labels[h]&&(e=this.bioPolymers[h],d.append(this.dumpSummary(e,this.labels[h])),
c.append(b[h]).append(this.dumpTags(e,"$.1: "+String.valueOf(this.labels[h]),this.bsBad,2)));0<=this.bsBad.nextSetBit(0)&&c.append("\nNOTE: '!' indicates a residue that is missing a backbone carbonyl oxygen atom.\n");c.append("\n").append("SUMMARY:"+d)}return c.toString()},"~A,~N,~O,~B,~B,~B,~N");e(c$,"getDualHydrogenBondArray",function(){for(var a=JU.AU.newInt4(this.bioPolymerCount),b=0;b<this.bioPolymerCount;b++)if(r(this.bioPolymers[b],JM.AminoPolymer)){var c=this.bioPolymers[b].monomerCount;a[b]=
v(c,2,3,0);for(var d=0;d<c;++d)a[b][d][0][1]=a[b][d][1][1]=-2147483648,a[b][d][0][2]=a[b][d][1][2]=0}for(b=0;b<this.bioPolymerCount;b++)if(null!=a[b])for(d=0;d<this.bioPolymerCount;d++)null!=a[d]&&this.bioPolymers[b].calcRasmolHydrogenBonds(this.bioPolymers[d],null,null,null,2,a[b],!1,this.dsspIgnoreHydrogens);return a});e(c$,"getBridges",function(a){for(var b=this.bioPolymers[0].model.ms.at,c=null,d=new java.util.Hashtable,f=0;f<a.length;f++)if(r(this.bioPolymers[f],JM.AminoPolymer))for(var e=this.bioPolymers[f],
h=a[f].length-1,j=1;j<h;j++){var k=e.monomers[j].leadAtomIndex;if(!this.bsBad.get(k))for(var m=f;m<a.length;m++)if(r(this.bioPolymers[m],JM.AminoPolymer))for(var l=f==m?j+3:1;l<a[m].length-1;l++){var p=this.bioPolymers[m],n=p.monomers[l].leadAtomIndex;if(!this.bsBad.get(n)){if(null==(c=this.getBridge(a,f,j,m,l,this.bridgesP,b[k],b[n],e,p,d,!1)))if(null!=(c=this.getBridge(a,f,j,m,l,this.bridgesA,b[k],b[n],e,p,d,!0)))c.isAntiparallel=!0;else continue;JU.Logger.debugging&&JU.Logger.debug("Bridge found "+
c);this.done[f].set(j);this.done[m].set(l);this.htBridges.put(k+"-"+n,c)}}}},"~A");e(c$,"getBridge",function(a,b,c,d,f,e,h,j,k,m,l,p){var n=null,q=null,r=0,s=p?this.sheetOffsets[1]:this.sheetOffsets[0];return null!=(n=this.isHbonded(c+s[0],f+s[1],b,d,a))&&null!=(q=this.isHbonded(f+s[2],c+s[3],d,b,a))||null!=(n=this.isHbonded(c+s[r=4],f+s[5],b,d,a))&&null!=(q=this.isHbonded(f+s[6],c+s[7],d,b,a))?(a=new J.dssx.Bridge(h,j,this.htLadders),e.addLast(a),null!=this.vHBonds&&(e=p?14336:6144,this.addHbond(k.monomers[c+
s[r]],m.monomers[f+s[++r]],n[2],e,l),this.addHbond(m.monomers[f+s[++r]],k.monomers[c+s[++r]],q[2],e,l)),a):null},"~A,~N,~N,~N,~N,JU.Lst,JM.Atom,JM.Atom,JM.AminoPolymer,JM.AminoPolymer,java.util.Map,~B");e(c$,"addHbond",function(a,b,c,d,f){a=a.getNitrogenAtom();b=b.getCarbonylOxygenAtom();if(null!=f){var e=a.i+" "+b.i;if(f.containsKey(e))return;f.put(e,Boolean.TRUE)}this.vHBonds.addLast(new JM.HBond(a,b,d,1,0,c/1E3))},"JM.Monomer,JM.Monomer,~N,~N,java.util.Map");e(c$,"getSheetStructures",function(){if(!(0==
this.bridgesA.size()&&0==this.bridgesP.size())){this.createLadders(this.bridgesA,!0);this.createLadders(this.bridgesP,!1);for(var a=new JU.BS,b=new JU.BS,c,d=this.htLadders.keySet().iterator();d.hasNext()&&((c=d.next())||1);)c[0][0]==c[0][1]&&c[1][0]==c[1][1]?(b.set(c[0][0]),b.set(c[1][0])):(a.setBits(c[0][0],c[0][1]+1),a.setBits(c[1][0],c[1][1]+1));c=new JU.BS;for(var d=new JU.BS,f=this.bioPolymers.length;0<=--f;)if(r(this.bioPolymers[f],JM.AminoPolymer)){c.clearAll();d.clearAll();for(var e=this.bioPolymers[f],
h=0;h<e.monomerCount;){var j=e.monomers[h].leadAtomIndex;if(a.get(j)){for(j=h+1;j<e.monomerCount&&a.get(e.monomers[j].leadAtomIndex);)j++;c.setBits(h,j);h=j}else b.get(j)&&d.set(h),++h}this.doReport&&(this.setTag(this.labels[f],d,"B"),this.setTag(this.labels[f],c,"E"));this.setStructure&&e.setStructureBS(0,3,J.c.STR.SHEET,c,!1);this.done[f].or(c);this.done[f].or(d)}}});e(c$,"createLadders",function(a,b){for(var c=b?-1:1,d=a.size(),f=0;f<d;f++)this.checkBridge(a.get(f),b,1,c);for(f=0;f<d;f++)this.checkBulge(a.get(f),
b,1)},"JU.Lst,~B");e(c$,"checkBridge",function(a,b,c,d){b=this.htBridges.get(a.a.getOffsetResidueAtom("\x00",c)+"-"+a.b.getOffsetResidueAtom("\x00",d));return null!=b&&a.addBridge(b,this.htLadders)},"J.dssx.Bridge,~B,~N,~N");e(c$,"checkBulge",function(a,b,c){for(var d=b?-1:1,f=0;3>f;f++)for(var e=0==f?1:0;6>e;e++)this.checkBridge(a,b,f*c,e*d),e>f&&this.checkBridge(a,b,e*c,f*d)},"J.dssx.Bridge,~B,~N");e(c$,"dumpSummary",function(a,b){for(var c=a.monomers[0].getLeadAtom(),c=0==c.getChainID()?"":c.getChainIDStr()+
":",d=new JU.SB,f="\x00",e="\x00",h="\x00",j=-1,k=-1,m=a.monomerCount,l=a.monomers,p=0;p<=m;p++){if(p==m||b[p]!=f){"\x00"!=f&&d.appendC("\n").appendC(f).append(" : ").append(c).appendI(j).append("\x00"==e?"":String.valueOf(e)).append("_").append(c).appendI(k).append("\x00"==h?"":String.valueOf(h));if(p==m)break;f=b[p];j=l[p].getResno();e=l[p].getInsertionCode()}k=l[p].getResno();h=l[p].getInsertionCode()}return d.toString()},"JM.AminoPolymer,~A");e(c$,"dumpTags",function(a,b,c,d){var f=a.monomers[0].getLeadAtom().getChainID()+
"."+(a.bioPolymerIndexInModel+1);b=JU.PT.rep(b,"$",f);for(var e=a.monomers[0].getResno(),h="\n"+f,f=new JU.SB,j=(new JU.SB).append(h+".8: "),k=(new JU.SB).append(h+".7: "),m=(new JU.SB).append(h+".6: "),h=(new JU.SB).append(h+".0: "),l=a.monomerCount,p=0;p<l;p++)e=a.monomers[p].getResno(),j.append(0==e%100?""+F(e/100)%100:" "),k.append(0==e%10?""+F(e/10)%10:" "),m.appendI(e%10),h.appendC(c.get(a.monomers[p].leadAtomIndex)?"!":a.monomers[p].getGroup1());1==(d&1)&&f.appendSB(j).appendSB(k).appendSB(m);
f.append("\n");f.append(b);2==(d&2)&&(f.appendSB(h),f.append("\n\n"));return f.toString().$replace("\x00",".")},"JM.AminoPolymer,~S,JU.BS,~N");e(c$,"isHbonded",function(a,b,c,d,f){if(0>a||0>b)return null;c=f[c];f=f[d];return a>=c.length||b>=f.length?null:c[a][0][0]==d&&c[a][0][1]==b?c[a][0]:c[a][1][0]==d&&c[a][1][1]==b?c[a][1]:null},"~N,~N,~N,~N,~A");e(c$,"findHelixes",function(a,b){var c=this.bioPolymers[a];if(JU.Logger.debugging)for(var d=0;d<c.monomerCount;d++)JU.Logger.debug(a+"."+c.monomers[d].getResno()+
"\t"+JU.Escape.e(b[d]));var d=new JU.BS,f,e,h;this.isDSSP2?(h=this.findHelixes2(0,a,5,b,J.c.STR.HELIXPI,12288,d,!0),e=this.findHelixes2(2,a,4,b,J.c.STR.HELIXALPHA,10240,d,!1),f=this.findHelixes2(4,a,3,b,J.c.STR.HELIX310,8192,d,!1)):(e=this.findHelixes2(2,a,4,b,J.c.STR.HELIXALPHA,10240,d,!0),f=this.findHelixes2(4,a,3,b,J.c.STR.HELIX310,8192,d,!1),h=this.findHelixes2(0,a,5,b,J.c.STR.HELIXPI,12288,d,!1));this.setStructure&&c.setStructureBS(0,6,J.c.STR.TURN,d,!1);return this.doReport?(this.setTag(this.labels[a],
d,"T"),this.dumpTags(c,"$.5: "+h+"\n$.4: "+e+"\n$.3: "+f,this.bsBad,1)):""},"~N,~A");e(c$,"findHelixes2",function(a,b,c,d,f,e,h,j){for(var k=this.bioPolymers[b],m=new JU.BS,l=new JU.BS,p=new JU.BS,n=new JU.BS,q=new JU.BS,r=this.done[b],s="",u=k.monomerCount,t=c;t<u;++t){var v=t-c,w=0;if(d[t][0][0]==b&&d[t][0][1]==v||d[t][w=1][0]==b&&d[t][1][1]==v){var B=k.monomers[v].leadAtomIndex,x=this.bsBad.nextSetBit(B),z=k.monomers[t];if(!(x>=B&&x<=z.leadAtomIndex)){m.set(v);l.setBits(v+1,t);n.set(t);var x=r.nextSetBit(v),
B=0>x||x>=t,A=!1;if(0<v&&m.get(v-1)&&(j||B))q.setBits(v,t),B||(s+="  WARNING! Bridge to helix at "+k.monomers[x]),A=!0;else if(B||r.nextClearBit(x)<t)A=!0;n.get(v)&&p.set(v);A&&null!=this.vHBonds&&this.addHbond(z,k.monomers[v],d[t][w][2],e,null)}}}this.doReport?(d=M(u,"\x00"),this.setTag(d,l,String.fromCharCode(48+c)),this.setTag(d,m,">"),this.setTag(d,n,"<"),this.setTag(d,p,"X")):d=null;r.or(q);l.andNot(r);h.or(l);h.andNot(q);this.setStructure&&k.setStructureBS(0,a,f,q,!1);return this.doReport?(this.setTag(this.labels[b],
q,String.fromCharCode(68+c)),String.valueOf(d)+s):""},"~N,~N,~N,~A,J.c.STR,~N,JU.BS,~B");e(c$,"setTag",function(a,b,c){for(var d=b.nextSetBit(0);0<=d;d=b.nextSetBit(d+1))a[d]=c},"~A,JU.BS,~S")});n("J.shapebio");q(["J.shape.AtomShape"],"J.shapebio.BioShape","java.lang.Float JU.AU $.BS $.PT J.c.PAL $.STR JM.AlphaPolymer $.NucleicPolymer JU.BSUtil $.C $.Logger".split(" "),function(){c$=t(function(){this.modelVisibilityFlags=this.modelIndex=0;this.leadAtomIndices=this.wingVectors=this.monomers=this.colixesBack=
this.meshReady=this.meshes=this.bioPolymer=this.shape=null;this.hasBfactorRange=!1;this.floatRange=this.range=this.bfactorMax=this.bfactorMin=0;u(this,arguments)},J.shapebio,"BioShape",J.shape.AtomShape);j(c$,"setProperty",function(a,b,c){this.setPropAS(a,b,c)},"~S,~O,JU.BS");w(c$,function(a,b,c){I(this,J.shapebio.BioShape,[]);this.shape=a;this.modelIndex=b;this.bioPolymer=c;this.isActive=a.isActive;this.bsSizeDefault=new JU.BS;this.monomerCount=c.monomerCount;0<this.monomerCount&&(this.colixes=P(this.monomerCount,
0),this.paletteIDs=G(this.monomerCount,0),this.mads=P(this.monomerCount+1,0),this.monomers=c.monomers,this.meshReady=U(this.monomerCount,!1),this.meshes=Array(this.monomerCount),this.wingVectors=c.getWingVectors(),this.leadAtomIndices=c.getLeadAtomIndices())},"J.shapebio.BioShapeCollection,~N,JM.BioPolymer");e(c$,"calcBfactorRange",function(){this.bfactorMin=this.bfactorMax=this.monomers[0].getLeadAtom().getBfactor100();for(var a=this.monomerCount;0<--a;){var b=this.monomers[a].getLeadAtom().getBfactor100();
b<this.bfactorMin?this.bfactorMin=b:b>this.bfactorMax&&(this.bfactorMax=b)}this.floatRange=this.range=this.bfactorMax-this.bfactorMin;this.hasBfactorRange=!0});e(c$,"calcMeanPositionalDisplacement",function(a){return V(1E3*Math.sqrt(a/7895.6835208714865))},"~N");j(c$,"findNearestAtomIndex",function(a,b,c,d){this.bioPolymer.findNearestAtomIndex(a,b,c,this.mads,this.shape.vf,d)},"~N,~N,~A,JU.BS");e(c$,"setMad",function(a,b,c){if(!(2>this.monomerCount)){this.isActive=!0;null==this.bsSizeSet&&(this.bsSizeSet=
new JU.BS);for(var d=this.shape.vf,f=32768==d&&r(this.bioPolymer,JM.NucleicPolymer),e=this.monomerCount;0<=--e;){var h=this.leadAtomIndices[e];if(b.get(h)){if(null!=c&&h<c.length){if(Float.isNaN(c[h]))continue;a=Q(2E3*c[h])}var j=0<(this.mads[e]=this.getMad(e,a));this.bsSizeSet.setBitTo(e,j);this.monomers[e].setShapeVisibility(d,j);this.shape.atoms[h].setShapeVisibility(d,j);f&&this.monomers[e].setRingsVisible(j);this.falsifyNearbyMesh(e)}}1<this.monomerCount&&(this.mads[this.monomerCount]=this.mads[this.monomerCount-
1])}},"~N,JU.BS,~A");e(c$,"getMad",function(a,b){this.bsSizeDefault.setBitTo(a,-1==b||-2==b);if(0<=b)return b;switch(b){case -1:case -2:if(-1==b&&0<=this.shape.madOn)return this.shape.madOn;switch(this.monomers[a].getProteinStructureType()){case J.c.STR.SHEET:case J.c.STR.HELIX:return this.shape.madHelixSheet;case J.c.STR.DNA:case J.c.STR.RNA:return this.shape.madDnaRna;default:return this.shape.madTurnRandom}case -3:this.hasBfactorRange||this.calcBfactorRange();var c=this.monomers[a].getLeadAtom(),
c=c.getBfactor100()-this.bfactorMin;if(0==this.range)return 0;c/=this.floatRange;(0>c||1<c)&&JU.Logger.error("Que ha ocurrido? "+c);return Q(1750*c+250);case -4:return c=this.monomers[a].getLeadAtom(),2*this.calcMeanPositionalDisplacement(c.getBfactor100())}JU.Logger.error("unrecognized setMad("+b+")");return 0},"~N,~N");e(c$,"falsifyMesh",function(){if(null!=this.meshReady)for(var a=0;a<this.monomerCount;a++)this.meshReady[a]=!1});e(c$,"falsifyNearbyMesh",function(a){null!=this.meshReady&&(this.meshReady[a]=
!1,0<a&&(this.meshReady[a-1]=!1),a<this.monomerCount-1&&(this.meshReady[a+1]=!1))},"~N");e(c$,"setColixBS",function(a,b,c){this.isActive=!0;null==this.bsColixSet&&(this.bsColixSet=JU.BS.newN(this.monomerCount));for(var d=this.monomerCount;0<=--d;){var f=this.leadAtomIndices[d];c.get(f)&&(this.colixes[d]=this.shape.getColixI(a,b,f),null!=this.colixesBack&&this.colixesBack.length>d&&(this.colixesBack[d]=0),this.paletteIDs[d]=b,this.bsColixSet.setBitTo(d,0!=this.colixes[d]))}},"~N,~N,JU.BS");e(c$,"setColixBack",
function(a,b){null==this.colixesBack&&(this.colixesBack=P(this.colixes.length,0));this.colixesBack.length<this.colixes.length&&(this.colixesBack=JU.AU.ensureLengthShort(this.colixesBack,this.colixes.length));for(var c=this.monomerCount;0<=--c;)b.get(this.leadAtomIndices[c])&&(this.colixesBack[c]=a)},"~N,JU.BS");e(c$,"setColixes",function(a,b){this.isActive=!0;null==this.bsColixSet&&(this.bsColixSet=JU.BS.newN(this.monomerCount));for(var c=this.monomerCount;0<=--c;){var d=this.leadAtomIndices[c];b.get(d)&&
(c<this.colixes.length&&d<a.length)&&(this.colixes[c]=this.shape.getColixI(a[d],J.c.PAL.UNKNOWN.id,d),null!=this.colixesBack&&c<this.colixesBack.length&&(this.colixesBack[c]=0),this.paletteIDs[c]=J.c.PAL.UNKNOWN.id,this.bsColixSet.set(c))}},"~A,JU.BS");e(c$,"setParams",function(a,b,c){if(0!=this.monomerCount){var d=a[0];a=a[1];this.isActive=!0;null==this.bsColixSet&&(this.bsColixSet=JU.BS.newN(this.monomerCount));for(var f=b.length,e=this.monomerCount;0<=--e;){var h=this.leadAtomIndices[e];if(c.get(h)&&
e<this.colixes.length&&h<f){var j=b[h],k=null==d?0:d[j],j=null==a?0:a[j];0.01<j&&(k=JU.C.getColixTranslucent3(k,!0,j));this.colixes[e]=this.shape.getColixI(k,J.c.PAL.UNKNOWN.id,h);null!=this.colixesBack&&e<this.colixesBack.length&&(this.colixesBack[e]=0);this.paletteIDs[e]=J.c.PAL.UNKNOWN.id;this.bsColixSet.set(e)}}}},"~A,~A,JU.BS");e(c$,"setTranslucent",function(a,b,c){this.isActive=!0;null==this.bsColixSet&&(this.bsColixSet=JU.BS.newN(this.monomerCount));for(var d=this.monomerCount;0<=--d;)b.get(this.leadAtomIndices[d])&&
(this.colixes[d]=JU.C.getColixTranslucent3(this.colixes[d],a,c),null!=this.colixesBack&&this.colixesBack.length>d&&(this.colixesBack[d]=JU.C.getColixTranslucent3(this.colixesBack[d],a,c)),this.bsColixSet.setBitTo(d,0!=this.colixes[d]))},"~B,JU.BS,~N");j(c$,"setAtomClickability",function(){if(this.isActive&&!(null==this.wingVectors||0==this.monomerCount))for(var a=r(this.bioPolymer,JM.NucleicPolymer)&&11==this.shape.shapeID,b=r(this.bioPolymer,JM.AlphaPolymer)||15!=this.shape.shapeID,c=this.monomers[0].chain.model.ms,
d=this.monomerCount;0<=--d;)if(!(0>=this.mads[d])){var f=this.leadAtomIndices[d];c.isAtomHidden(f)||(b&&c.at[f].setClickable(1040384),a&&this.monomers[d].setRingsClickable())}});e(c$,"getBioShapeState",function(a,b,c,d){if(0<this.monomerCount&&this.isActive&&!(null==this.bsSizeSet&&null==this.bsColixSet))for(var f=0;f<this.monomerCount;f++){var e=this.monomers[f].firstAtomIndex,h=this.monomers[f].lastAtomIndex;if(null!=this.bsSizeSet&&(this.bsSizeSet.get(f)||null!=this.bsColixSet&&this.bsColixSet.get(f)))this.bsSizeDefault.get(f)?
JU.BSUtil.setMapBitSet(c,e,h,a+(this.bsSizeSet.get(f)?" on":" off")):JU.BSUtil.setMapBitSet(c,e,h,a+" "+JU.PT.escF(this.mads[f]/2E3));if(null!=this.bsColixSet&&this.bsColixSet.get(f)){var j=J.shape.Shape.getColorCommand(a,this.paletteIDs[f],this.colixes[f],b);null!=this.colixesBack&&(this.colixesBack.length>f&&0!=this.colixesBack[f])&&(j+=" "+JU.C.getHexCode(this.colixesBack[f]));JU.BSUtil.setMapBitSet(d,e,h,j)}}},"~S,~B,java.util.Map,java.util.Map");j(c$,"getShapeState",function(){return null});
z(c$,"eightPiSquared100",7895.6835208714865)});n("J.shapebio");q(["J.shape.Shape"],"J.shapebio.BioShapeCollection","java.util.Hashtable JU.AU J.c.PAL J.shapebio.BioShape JU.BSUtil $.C JV.JC".split(" "),function(){c$=t(function(){this.atoms=null;this.madOn=-2;this.madHelixSheet=3E3;this.madTurnRandom=800;this.madDnaRna=5E3;this.isActive=!1;this.bioShapes=null;u(this,arguments)},J.shapebio,"BioShapeCollection",J.shape.Shape);j(c$,"initModelSet",function(){this.isBioShape=!0;this.atoms=this.ms.at;this.initialize()});
j(c$,"initShape",function(){});j(c$,"getSizeG",function(a){var b=a.groupIndex;a=a.getLeadAtom().i;for(var c=this.bioShapes.length;0<=--c;)for(var d=this.bioShapes[c],f=0;f<d.monomerCount;f++)if(d.monomers[f].groupIndex==b&&d.monomers[f].getLeadAtom().i==a)return d.mads[f];return 0},"JM.Group");j(c$,"replaceGroup",function(a,b){for(var c=this.bioShapes.length;0<=--c;)for(var d=this.bioShapes[c],f=0;f<d.monomerCount;f++)if(d.monomers[f]===a){d.monomers[f]=b;break}},"JM.Group,JM.Group");j(c$,"setShapeSizeRD",
function(a,b,c){this.initialize();for(var d=this.bioShapes.length;0<=--d;){var f=this.bioShapes[d];0<f.monomerCount&&f.setMad(a,c,null==b?null:b.values)}},"~N,J.atomdata.RadiusData,JU.BS");j(c$,"setProperty",function(a,b,c){this.setPropBSC(a,b,c)},"~S,~O,JU.BS");e(c$,"setPropBSC",function(a,b,c){if("refreshTrajectories"===a){c=b[0].intValue();for(a=this.bioShapes.length;0<=--a;)b=this.bioShapes[a],b.modelIndex==c&&b.falsifyMesh()}else if("deleteModelAtoms"===a){this.atoms=b[1];c=b[2][0];for(a=this.bioShapes.length;0<=
--a;)b=this.bioShapes[a],b.modelIndex>c?(b.modelIndex--,b.leadAtomIndices=b.bioPolymer.getLeadAtomIndices()):b.modelIndex==c&&(this.bioShapes=JU.AU.deleteElements(this.bioShapes,a,1))}else if(this.initialize(),"color"===a){var d=J.c.PAL.pidOf(b),f=JU.C.getColixO(b);for(a=this.bioShapes.length;0<=--a;)b=this.bioShapes[a],0<b.monomerCount&&b.setColixBS(f,d,c)}else if("params"===a){a=c.length();d=v(a,0);f=0;for(a=c.nextSetBit(0);0<=a;a=c.nextSetBit(a+1),f++)d[a]=f;for(a=this.bioShapes.length;0<=--a;)this.bioShapes[a].setParams(b,
d,c)}else if("colorPhase"===a){d=JU.C.getColixO(b[0]);f=JU.C.getColixO(b[1]);for(a=this.bioShapes.length;0<=--a;)b=this.bioShapes[a],0<b.monomerCount&&(b.setColixBS(f,64,c),b.setColixBack(d,c))}else if("translucency"===a){d="translucent".equals(b);for(a=this.bioShapes.length;0<=--a;)b=this.bioShapes[a],0<b.monomerCount&&b.setTranslucent(d,c,this.translucentLevel)}else this.setPropS(a,b,c)},"~S,~O,JU.BS");j(c$,"getShapeState",function(){for(var a=new java.util.Hashtable,b=new java.util.Hashtable,c=
JV.JC.shapeClassBases[this.shapeID],d=this.bioShapes.length;0<=--d;)this.bioShapes[d].getBioShapeState(c,this.translucentAllowed,a,b);return"\n"+this.vwr.getCommands(a,b,9==this.shapeID?"Backbone":"select")});e(c$,"initialize",function(){for(var a=this.ms.mc,b=this.ms.am,c=this.ms.getBioPolymerCountInModel(-1),d=Array(c--);0<=--a;)for(var f=this.ms.getBioPolymerCountInModel(a);0<=--f;c--){var e=b[a].bioPolymers[f];d[c]=null==this.bioShapes||this.bioShapes.length<=c||null==this.bioShapes[c]||this.bioShapes[c].bioPolymer!==
e?new J.shapebio.BioShape(this,a,e):this.bioShapes[c]}this.bioShapes=d});j(c$,"findNearestAtomIndex",function(a,b,c,d){for(var f=this.bioShapes.length;0<=--f;)this.bioShapes[f].findNearestAtomIndex(a,b,c,d)},"~N,~N,~A,JU.BS");j(c$,"setModelVisibilityFlags",function(a){if(null!=this.bioShapes){a=JU.BSUtil.copy(a);null!=this.ms.trajectory&&this.ms.trajectory.setBaseModels(a);for(var b=this.bioShapes.length;0<=--b;){var c=this.bioShapes[b];c.modelVisibilityFlags=a.get(c.modelIndex)?this.vf:0}}},"JU.BS");
j(c$,"setAtomClickability",function(){if(null!=this.bioShapes)for(var a=this.bioShapes.length;0<=--a;)this.bioShapes[a].setAtomClickability()});e(c$,"getMpsShapeCount",function(){return this.bioShapes.length});e(c$,"getBioShape",function(a){return this.bioShapes[a]},"~N")});n("J.shapebio");q(["J.shapebio.BioShapeCollection"],"J.shapebio.Rockets",null,function(){c$=A(J.shapebio,"Rockets",J.shapebio.BioShapeCollection);j(c$,"initShape",function(){this.madTurnRandom=500})});n("J.shapebio");q(["J.shapebio.Rockets"],
"J.shapebio.Cartoon",null,function(){c$=A(J.shapebio,"Cartoon",J.shapebio.Rockets);e(c$,"initShape",function(){R(this,J.shapebio.Cartoon,"initShape",[]);this.madDnaRna=1E3})});n("J.shapebio");q(["J.shapebio.BioShapeCollection"],"J.shapebio.Backbone",["java.lang.Float","JU.BS"],function(){c$=t(function(){this.bsSelected=null;u(this,arguments)},J.shapebio,"Backbone",J.shapebio.BioShapeCollection);j(c$,"initShape",function(){this.madOn=1;this.madHelixSheet=1500;this.madTurnRandom=500;this.madDnaRna=
2E3;this.isActive=!0});j(c$,"setProperty",function(a,b,c){"bitset"===a?this.bsSelected=b:this.setPropBSC(a,b,c)},"~S,~O,JU.BS");j(c$,"setShapeSizeRD",function(a,b,c){this.initialize();var d=null!=this.bsSelected;d&&(c=this.bsSelected);for(var f=this.bioShapes.length;0<=--f;){var e=this.bioShapes[f];if(0!=e.monomerCount){var h=this.vwr.getBoolean(603979812),j=e.bioPolymer.getLeadAtomIndices(),k=0!=a;null==e.bsSizeSet&&(e.bsSizeSet=new JU.BS);e.isActive=!0;for(var m=e.monomerCount,l=m-(e.bioPolymer.isCyclic()?
0:1);0<=--l;){var n=j[l],q=j[(l+1)%m],r=c.get(n),t=c.get(q);if(r&&t||d&&r||h&&(r||t)){e.monomers[l].setShapeVisibility(this.vf,k);r=this.ms.at[n];if(null!=b){if(Float.isNaN(b.values[n])||Float.isNaN(b.values[q]))continue;a=Q(1E3*(b.values[n]+b.values[q]));k=0!=a}n=this.ms.at[q];0!=e.mads[l]!=k&&(this.addDisplayedBackbone(r,k),this.addDisplayedBackbone(n,k));e.mads[l]=a;e.bsSizeSet.setBitTo(l,k);e.bsSizeDefault.setBitTo(l,-1==a)}}}}d&&(this.bsSelected=null)},"~N,J.atomdata.RadiusData,JU.BS");e(c$,
"addDisplayedBackbone",function(a,b){a.nBackbonesDisplayed+=b?1:-1;a.setShapeVisibility(this.vf,b)},"JM.Atom,~B");j(c$,"setAtomClickability",function(){if(null!=this.bioShapes)for(var a=this.bioShapes.length;0<=--a;)for(var b=this.bioShapes[a],c=b.bioPolymer.getLeadAtomIndices(),b=b.monomerCount;0<=--b;){var d=this.ms.at[c[b]];0<d.nBackbonesDisplayed&&!this.ms.isAtomHidden(d.i)&&d.setClickable(this.vf)}})});n("J.shapebio");q(["J.shapebio.BioShapeCollection"],"J.shapebio.Strands",null,function(){c$=
t(function(){this.isMesh=!1;u(this,arguments)},J.shapebio,"Strands",J.shapebio.BioShapeCollection)});n("J.shapebio");q(["J.shapebio.BioShapeCollection"],"J.shapebio.Ribbons",null,function(){c$=A(J.shapebio,"Ribbons",J.shapebio.BioShapeCollection)});n("J.shapebio");q(["J.shapebio.Strands"],"J.shapebio.MeshRibbon",null,function(){c$=A(J.shapebio,"MeshRibbon",J.shapebio.Strands);j(c$,"initShape",function(){this.isMesh=!0})});n("J.shapebio");q(["J.shapebio.BioShapeCollection"],"J.shapebio.Trace",["J.atomdata.RadiusData",
"J.c.VDW"],function(){c$=A(J.shapebio,"Trace",J.shapebio.BioShapeCollection);j(c$,"initShape",function(){this.madOn=600;this.madHelixSheet=1500;this.madTurnRandom=500;this.madDnaRna=1500});j(c$,"setProperty",function(a,b,c){"putty"===a?this.setPutty(b,c):this.setPropBSC(a,b,c)},"~S,~O,JU.BS");e(c$,"setPutty",function(a,b){var c=b.cardinality();if(0!=c){for(var d=H(b.length(),0),f=0,e=0,h=3.4028235E38,j=0,k=b.nextSetBit(0);0<=k;k=b.nextSetBit(k+1)){var m=this.atoms[k].atomPropertyFloat(null,1111492620,
null),f=f+m,e=e+m*m;m<h&&(h=m);m>j&&(j=m)}var m=f/c,c=Math.sqrt((e-f*f/c)/c),f=a[1],e=a[2],l=a[3],n=a[4],q=a[5],r=C(a[6]),j=j-h,t=!1;switch(r){case 0:case 1:case 2:case 3:t=!0}for(k=b.nextSetBit(0);0<=k;k=b.nextSetBit(k+1)){var s=this.atoms[k].atomPropertyFloat(null,1111492620,null);switch(r){case 0:case 4:s=1+(s-m)/e/c;break;case 1:case 5:s=(s-h)/j/e;break;case 2:case 6:s/=e;break;case 8:0>s&&(s=0),s=Math.sqrt(s/8)/3.141592653589793}0>s&&(s=0);t&&(s=Math.pow(s,q));s<l&&0<=l&&(s=l);s>n&&0<=n&&(s=
n);d[k]=s*f}d=new J.atomdata.RadiusData(d,0,J.atomdata.RadiusData.EnumType.ABSOLUTE,J.c.VDW.AUTO);this.setShapeSizeRD(0,d,b)}},"~A,JU.BS");z(c$,"PUTTY_NormalizedNonlinear",0,"PUTTY_RelativeNonlinear",1,"PUTTY_ScaledNonlinear",2,"PUTTY_AbsoluteNonlinear",3,"PUTTY_NormalizedLinear",4,"PUTTY_RelativeLinear",5,"PUTTY_ScaledLinear",6,"PUTTY_AbsoluteLinear",7,"PUTTY_ImpliedRMS",8)});n("J.renderbio");q(["J.render.ShapeRenderer","JU.BS","$.P3"],"J.renderbio.BioShapeRenderer","javajs.api.Interface J.c.STR JM.CarbohydratePolymer $.NucleicPolymer $.PhosphorusPolymer JU.C".split(" "),
function(){c$=t(function(){this.haveControlPointScreens=this.ribbonBorder=this.isTraceAlpha=this.invalidateSheets=this.invalidateMesh=!1;this.sheetSmoothing=this.hermiteLevel=this.aspectRatio=0;this.cartoonsFancy=!1;this.monomerCount=0;this.monomers=null;this.isCarbohydrate=this.isPhosphorusOnly=this.isNucleic=!1;this.structureTypes=this.colixesBack=this.colixes=this.mads=this.wingVectors=this.leadAtomIndices=this.controlPointScreens=this.controlPoints=this.ribbonBottomScreens=this.ribbonTopScreens=
this.bsVisible=null;this.needTranslucent=this.wireframeOnly=this.isHighRes=!1;this.pointT=this.bioShape=this.meshRenderer=null;this.colixBack=this.madEnd=this.madMid=this.madBeg=this.diameterEnd=this.diameterMid=this.diameterBeg=this.iNext3=this.iNext2=this.iNext=this.iPrev=0;this.reversed=null;this.isCyclic=!1;this.screenArrowBotPrev=this.screenArrowBot=this.screenArrowTopPrev=this.screenArrowTop=null;u(this,arguments)},J.renderbio,"BioShapeRenderer",J.render.ShapeRenderer);O(c$,function(){this.bsVisible=
new JU.BS;this.pointT=new JU.P3;this.screenArrowTop=new JU.P3;this.screenArrowTopPrev=new JU.P3;this.screenArrowBot=new JU.P3;this.screenArrowBotPrev=new JU.P3});j(c$,"render",function(){if(null==this.shape)return!1;this.setGlobals();this.renderShapes();return this.needTranslucent});e(c$,"setGlobals",function(){this.needTranslucent=this.invalidateMesh=!1;this.g3d.addRenderer(553648145);var a=!this.isExport&&!this.vwr.checkMotionRendering(1112152066);a!=this.wireframeOnly&&(this.invalidateMesh=!0);
this.wireframeOnly=a;a=this.isExport||!this.wireframeOnly&&this.vwr.getBoolean(603979864);a!=this.isHighRes&&(this.invalidateMesh=!0);this.isHighRes=a;a=!this.wireframeOnly&&(this.vwr.getBoolean(603979816)||this.isExport);this.cartoonsFancy!=a&&(this.invalidateMesh=!0,this.cartoonsFancy=a);a=this.vwr.getHermiteLevel();a=0>=a?-a:this.vwr.getInMotion(!0)?0:a;this.cartoonsFancy&&!this.wireframeOnly&&(a=Math.max(a,3));a!=this.hermiteLevel&&(this.invalidateMesh=!0);this.hermiteLevel=Math.min(a,8);var b=
this.vwr.getInt(553648166),b=Math.min(Math.max(0,b),20);this.cartoonsFancy&&16<=b&&(b=4);if(this.wireframeOnly||0==this.hermiteLevel)b=0;b!=this.aspectRatio&&(0!=b&&0!=a)&&(this.invalidateMesh=!0);this.aspectRatio=b;0<this.aspectRatio&&(null==this.meshRenderer&&(this.meshRenderer=javajs.api.Interface.getInterface("J.renderbio.BioMeshRenderer"),this.meshRenderer.setViewerG3dShapeID(this.vwr,this.shape.shapeID)),this.meshRenderer.setup(this.g3d,this.vwr.ms,this.shape));a=this.vwr.getBoolean(603979966);
a!=this.isTraceAlpha&&(this.invalidateMesh=!0);this.isTraceAlpha=a;this.invalidateSheets=!1;a=this.vwr.getFloat(570425392);a!=this.sheetSmoothing&&this.isTraceAlpha&&(this.sheetSmoothing=a,this.invalidateSheets=this.invalidateMesh=!0)});e(c$,"renderShapes",function(){for(var a=this.shape,b=a.bioShapes.length;0<=--b;)this.bioShape=a.getBioShape(b),0!=(this.bioShape.modelVisibilityFlags&this.myVisibilityFlag)&&(2<=this.bioShape.monomerCount&&this.initializePolymer(this.bioShape))&&(null!=this.meshRenderer&&
this.meshRenderer.initBS(),this.isCyclic=this.bioShape.bioPolymer.isCyclic(),this.renderBioShape(this.bioShape),null!=this.meshRenderer&&this.meshRenderer.renderMeshes(),this.freeTempArrays())});e(c$,"setBioColix",function(a){if(this.g3d.setC(a))return!0;this.needTranslucent=!0;return!1},"~N");e(c$,"freeTempArrays",function(){this.haveControlPointScreens&&this.vwr.freeTempPoints(this.controlPointScreens);this.vwr.freeTempEnum(this.structureTypes)});e(c$,"initializePolymer",function(a){var b=this.vwr.slm.bsDeleted;
this.controlPoints=this.vwr.ms.isJmolDataFrameForModel(a.modelIndex)?a.bioPolymer.getControlPoints(!0,0,!1):a.bioPolymer.getControlPoints(this.isTraceAlpha,this.sheetSmoothing,this.invalidateSheets);this.monomerCount=a.monomerCount;this.monomers=a.monomers;this.reversed=a.bioPolymer.reversed;this.leadAtomIndices=a.bioPolymer.getLeadAtomIndices();this.bsVisible.clearAll();var c=!1;this.invalidateMesh&&a.falsifyMesh();for(var d=this.monomerCount;0<=--d;)if(!(0==(this.monomers[d].shapeVisibilityFlags&
this.myVisibilityFlag)||this.ms.isAtomHidden(this.leadAtomIndices[d])||null!=b&&b.get(this.leadAtomIndices[d]))){var f=this.ms.at[this.leadAtomIndices[d]];this.g3d.isInDisplayRange(f.sX,f.sY)&&(this.bsVisible.set(d),c=!0)}if(!c)return!1;this.ribbonBorder=this.vwr.getBoolean(603979901);this.isNucleic=r(a.bioPolymer,JM.NucleicPolymer);this.isPhosphorusOnly=!this.isNucleic&&r(a.bioPolymer,JM.PhosphorusPolymer);this.isCarbohydrate=r(a.bioPolymer,JM.CarbohydratePolymer);this.haveControlPointScreens=!1;
this.wingVectors=a.wingVectors;null!=this.meshRenderer&&this.meshRenderer.initialize(this,a,this.monomerCount);this.mads=a.mads;this.colixes=a.colixes;this.colixesBack=a.colixesBack;this.setStructureTypes();return!0},"J.shapebio.BioShape");e(c$,"setStructureTypes",function(){for(var a=this.structureTypes=this.vwr.allocTempEnum(this.monomerCount+1),b=this.monomerCount;0<=--b;)if((a[b]=this.monomers[b].getProteinStructureType())===J.c.STR.TURN)a[b]=J.c.STR.NONE;a[this.monomerCount]=a[this.monomerCount-
1]});e(c$,"calcScreenControlPoints",function(){for(var a=this.monomerCount+1,b=this.controlPointScreens=this.vwr.allocTempPoints(a),c=this.controlPoints;0<=--a;)this.tm.transformPtScrT3(c[a],b[a]);this.haveControlPointScreens=!0});e(c$,"calcScreens",function(a,b){var c=this.controlPoints.length,d=this.vwr.allocTempPoints(c);if(0==a)for(;0<=--c;)this.tm.transformPtScrT3(this.controlPoints[c],d[c]);else for(var f=a/1E3;0<=--c;)this.calc1Screen(this.controlPoints[c],this.wingVectors[c],0==b[c]&&0<c?
b[c-1]:b[c],f,d[c]);return d},"~N,~A");e(c$,"calc1Screen",function(a,b,c,d,f){this.pointT.scaleAdd2(c*d,b,a);this.tm.transformPtScrT3(this.pointT,f)},"JU.P3,JU.V3,~N,~N,JU.P3");e(c$,"getLeadColix",function(a){return JU.C.getColixInherited(this.colixes[a],this.monomers[a].getLeadAtom().colixAtom)},"~N");e(c$,"getLeadColixBack",function(a){return null==this.colixesBack||this.colixesBack.length<=a?0:this.colixesBack[a]},"~N");e(c$,"setNeighbors",function(a){this.isCyclic?(a+=this.monomerCount,this.iPrev=
(a-1)%this.monomerCount,this.iNext=(a+1)%this.monomerCount,this.iNext2=(a+2)%this.monomerCount,this.iNext3=(a+3)%this.monomerCount):(this.iPrev=Math.max(a-1,0),this.iNext=Math.min(a+1,this.monomerCount),this.iNext2=Math.min(a+2,this.monomerCount),this.iNext3=Math.min(a+3,this.monomerCount))},"~N");e(c$,"setColix",function(a){this.colix=a;return this.g3d.setC(a)},"~N");e(c$,"setMads",function(a,b){this.madMid=this.madBeg=this.madEnd=this.mads[a];if(this.isTraceAlpha){if(!b||this.structureTypes[a]===
this.structureTypes[this.iNext])this.madEnd=this.mads[this.iNext],0==this.madEnd&&(r(this,J.renderbio.TraceRenderer),this.madEnd=this.madBeg),this.madMid=this.madBeg+this.madEnd>>1}else{if(!b||this.structureTypes[a]===this.structureTypes[this.iPrev])this.madBeg=(0==this.mads[this.iPrev]?this.madMid:this.mads[this.iPrev])+this.madMid>>1;if(!b||this.structureTypes[a]===this.structureTypes[this.iNext])this.madEnd=(0==this.mads[this.iNext]?this.madMid:this.mads[this.iNext])+this.madMid>>1}this.diameterBeg=
C(this.vwr.tm.scaleToScreen(C(this.controlPointScreens[a].z),this.madBeg));this.diameterMid=C(this.vwr.tm.scaleToScreen(this.monomers[a].getLeadAtom().sZ,this.madMid));this.diameterEnd=C(this.vwr.tm.scaleToScreen(C(this.controlPointScreens[this.iNext].z),this.madEnd));var c=a==this.iPrev||!this.bsVisible.get(this.iPrev)||b&&this.structureTypes[a]!==this.structureTypes[this.iPrev],d=this.iNext==this.iNext2||this.iNext2==this.iNext3||!this.bsVisible.get(this.iNext)||b&&this.structureTypes[a]!==this.structureTypes[this.iNext];
return 0<this.aspectRatio&&null!=this.meshRenderer&&this.meshRenderer.check(c,d)},"~N,~B");e(c$,"renderHermiteCylinder",function(a,b){this.colix=this.getLeadColix(b);this.setBioColix(this.colix)&&(this.setNeighbors(b),this.g3d.drawHermite4(this.isNucleic?4:7,a[this.iPrev],a[b],a[this.iNext],a[this.iNext2]))},"~A,~N");e(c$,"renderHermiteConic",function(a,b,c){this.setNeighbors(a);this.colix=this.getLeadColix(a);this.setBioColix(this.colix)&&(this.setMads(a,b)||this.isExport?this.meshRenderer.setFancyConic(a,
c):0==this.diameterBeg&&0==this.diameterEnd||this.wireframeOnly?this.g3d.drawLineAB(this.controlPointScreens[a],this.controlPointScreens[this.iNext]):this.g3d.fillHermite(this.isNucleic?4:7,this.diameterBeg,this.diameterMid,this.diameterEnd,this.controlPointScreens[this.iPrev],this.controlPointScreens[a],this.controlPointScreens[this.iNext],this.controlPointScreens[this.iNext2]))},"~N,~B,~N");e(c$,"renderHermiteRibbon",function(a,b,c){this.setNeighbors(b);var d=this.colix=this.getLeadColix(b);if(this.setBioColix(this.colix)){var f=
this.colixBack=this.getLeadColixBack(b);if(a&&(0!=this.aspectRatio||this.isExport))if(this.setMads(b,c)||this.isExport){this.meshRenderer.setFancyRibbon(b);return}if((c=this.reversed.get(b))&&0!=this.colixBack)this.setColix(this.colixBack),f=d;this.g3d.drawHermite7(a,this.ribbonBorder,(c?-1:1)*(this.isNucleic?4:7),this.ribbonTopScreens[this.iPrev],this.ribbonTopScreens[b],this.ribbonTopScreens[this.iNext],this.ribbonTopScreens[this.iNext2],this.ribbonBottomScreens[this.iPrev],this.ribbonBottomScreens[b],
this.ribbonBottomScreens[this.iNext],this.ribbonBottomScreens[this.iNext2],C(this.aspectRatio),f);c&&0!=this.colixBack&&this.setColix(d)}},"~B,~N,~B");e(c$,"renderHermiteArrowHead",function(a){this.colix=this.getLeadColix(a);if(this.setBioColix(this.colix))if(this.colixBack=this.getLeadColixBack(a),this.setNeighbors(a),this.setMads(a,!1)||this.isExport)this.meshRenderer.setFancyArrowHead(a);else{var b=this.controlPoints[a];a=this.wingVectors[a];this.calc1Screen(b,a,this.madBeg,7E-4,this.screenArrowTop);
this.calc1Screen(b,a,this.madBeg,-7E-4,this.screenArrowBot);this.calc1Screen(b,a,this.madBeg,0.001,this.screenArrowTopPrev);this.calc1Screen(b,a,this.madBeg,-0.001,this.screenArrowBotPrev);this.g3d.drawHermite7(!0,this.ribbonBorder,this.isNucleic?4:7,this.screenArrowTopPrev,this.screenArrowTop,this.controlPointScreens[this.iNext],this.controlPointScreens[this.iNext2],this.screenArrowBotPrev,this.screenArrowBot,this.controlPointScreens[this.iNext],this.controlPointScreens[this.iNext2],C(this.aspectRatio),
this.colixBack);this.g3d.setC(this.colix);this.ribbonBorder&&0==this.aspectRatio&&this.g3d.fillCylinderBits(3,3,this.screenArrowTop,this.screenArrowBot)}},"~N");e(c$,"drawSegmentAB",function(a,b,c,d,f){var e=a.sX,h=a.sY;a=a.sZ;var j=b.sX,k=b.sY;b=b.sZ;var m=this.mad;1E3==f&&(m>>=1);0>m?this.g3d.drawLine(c,d,e,h,a,j,k,b):(f=C(this.isExport?m:this.vwr.tm.scaleToScreen(F((a+b)/2),m)),this.g3d.fillCylinderXYZ(c,d,3,f,e,h,a,j,k,b))},"JM.Atom,JM.Atom,~N,~N,~N")});n("J.renderbio");q(["J.renderbio.BioShapeRenderer"],
"J.renderbio.StrandsRenderer",["J.shapebio.Strands"],function(){c$=t(function(){this.strandCount=1;this.baseStrandOffset=this.strandSeparation=0;u(this,arguments)},J.renderbio,"StrandsRenderer",J.renderbio.BioShapeRenderer);j(c$,"renderBioShape",function(){this.renderStrandShape()},"J.shapebio.BioShape");e(c$,"renderStrandShape",function(){this.setStrandCount()&&this.renderStrands()});e(c$,"setStrandCount",function(){if(null==this.wingVectors)return!1;this.strandCount=r(this.shape,J.shapebio.Strands)?
this.vwr.getStrandCount(this.shape.shapeID):10;this.strandSeparation=1>=this.strandCount?0:1/(this.strandCount-1);this.baseStrandOffset=0==(this.strandCount&1)?this.strandSeparation/2:this.strandSeparation;return!0});e(c$,"renderStrands",function(){for(var a,b=this.strandCount>>1;0<=--b;){var c=b*this.strandSeparation+this.baseStrandOffset;a=this.calcScreens(c,this.mads);this.renderStrand(a);this.vwr.freeTempPoints(a);a=this.calcScreens(-c,this.mads);this.renderStrand(a);this.vwr.freeTempPoints(a)}1==
this.strandCount%2&&(a=this.calcScreens(0,this.mads),this.renderStrand(a),this.vwr.freeTempPoints(a))});e(c$,"renderStrand",function(a){for(var b=this.bsVisible.nextSetBit(0);0<=b;b=this.bsVisible.nextSetBit(b+1))this.renderHermiteCylinder(a,b)},"~A")});n("J.renderbio");q(["J.renderbio.MeshRibbonRenderer"],"J.renderbio.RibbonsRenderer",null,function(){c$=A(J.renderbio,"RibbonsRenderer",J.renderbio.MeshRibbonRenderer);j(c$,"renderBioShape",function(){null!=this.wingVectors&&(this.wireframeOnly?this.renderStrands():
this.render2Strand(!0,this.isNucleic?1:0.5,this.isNucleic?0:0.5))},"J.shapebio.BioShape")});n("J.renderbio");q(["J.renderbio.StrandsRenderer"],"J.renderbio.MeshRibbonRenderer",null,function(){c$=A(J.renderbio,"MeshRibbonRenderer",J.renderbio.StrandsRenderer);j(c$,"renderBioShape",function(){this.wireframeOnly?this.renderStrands():this.renderMeshRibbon()},"J.shapebio.BioShape");e(c$,"renderMeshRibbon",function(){if(this.setStrandCount()){var a=(this.strandCount>>1)*this.strandSeparation+this.baseStrandOffset;
this.render2Strand(!1,a,a);this.renderStrands()}});e(c$,"render2Strand",function(a,b,c){this.calcScreenControlPoints();this.ribbonTopScreens=this.calcScreens(b,this.mads);this.ribbonBottomScreens=this.calcScreens(-c,this.mads);for(b=this.bsVisible.nextSetBit(0);0<=b;b=this.bsVisible.nextSetBit(b+1))this.renderHermiteRibbon(a,b,!1);this.vwr.freeTempPoints(this.ribbonTopScreens);this.vwr.freeTempPoints(this.ribbonBottomScreens)},"~B,~N,~N")});n("J.renderbio");q(["J.renderbio.StrandsRenderer"],"J.renderbio.RocketsRenderer",
["javajs.api.Interface","JU.P3","J.c.STR"],function(){c$=t(function(){this.isRockets=!1;this.helixRockets=!0;this.renderArrowHeads=!1;this.rr=this.cordMidPoints=null;u(this,arguments)},J.renderbio,"RocketsRenderer",J.renderbio.StrandsRenderer);j(c$,"renderBioShape",function(a){this.setupRR(a,!0)&&(this.calcRopeMidPoints(),this.renderRockets(),this.vwr.freeTempPoints(this.cordMidPoints))},"J.shapebio.BioShape");e(c$,"renderRockets",function(){null==this.rr&&(this.rr=javajs.api.Interface.getInterface("J.renderbio.RocketRenderer").set(this));
this.rr.renderRockets()});e(c$,"setupRR",function(a,b){this.isRockets=b;if(this.wireframeOnly)this.renderStrands();else if(null!=this.wingVectors&&!this.isCarbohydrate&&(!b||!this.isNucleic)){var c=!this.vwr.getBoolean(603979902);!this.isNucleic&&this.renderArrowHeads!=c&&(a.falsifyMesh(),this.renderArrowHeads=c);return!0}return!1},"J.shapebio.BioShape,~B");e(c$,"calcRopeMidPoints",function(){this.cordMidPoints=this.vwr.allocTempPoints(this.monomerCount+1);for(var a=null,b,c=-10,d=new JU.P3,f=new JU.P3,
e=0;e<=this.monomerCount;++e)if(b=this.cordMidPoints[e],e<this.monomerCount&&(this.helixRockets&&this.structureTypes[e]===J.c.STR.HELIX||this.isRockets&&this.structureTypes[e]===J.c.STR.SHEET)){var h=this.monomers[e].getStructure();h===a?(d.add(f),c=e):(a=h,d.setT(h.getAxisStartPoint()),f.sub2(h.getAxisEndPoint(),d),f.scale(1/(h.nRes-1)),c==e-3&&this.cordMidPoints[e-1].ave(this.cordMidPoints[e-2],d));b.setT(d)}else c==e-1&&1<e&&this.cordMidPoints[e-1].setT(this.cordMidPoints[2<e?e-3:e-2]),b.setT(null==
a?this.controlPoints[e]:a.getAxisEndPoint()),a=null;this.controlPoints=this.cordMidPoints;this.calcScreenControlPoints()})});n("J.renderbio");q(["J.renderbio.RocketsRenderer"],"J.renderbio.CartoonRenderer",["J.api.Interface","J.c.STR"],function(){c$=t(function(){this.nucleicRenderer=null;u(this,arguments)},J.renderbio,"CartoonRenderer",J.renderbio.RocketsRenderer);j(c$,"renderBioShape",function(a){if(this.setupRR(a,!1))if(this.isNucleic||this.isPhosphorusOnly)null==this.nucleicRenderer&&(this.nucleicRenderer=
J.api.Interface.getInterface("J.renderbio.NucleicRenderer",this.vwr,"render")),this.calcScreenControlPoints(),this.nucleicRenderer.renderNucleic(this);else{var b=this.vwr.getBoolean(603979819);this.helixRockets!=b&&(a.falsifyMesh(),this.helixRockets=b);this.ribbonTopScreens=this.calcScreens(0.5,this.mads);this.ribbonBottomScreens=this.calcScreens(-0.5,this.mads);this.calcRopeMidPoints();this.renderProtein();this.vwr.freeTempPoints(this.cordMidPoints);this.vwr.freeTempPoints(this.ribbonTopScreens);
this.vwr.freeTempPoints(this.ribbonBottomScreens)}},"J.shapebio.BioShape");e(c$,"renderProtein",function(){for(var a=!1,b=!1,c=null,d,e=this.helixRockets||!this.renderArrowHeads,g=!1,h=this.monomerCount;0<=--h;){d=this.monomers[h].getStructure();d!==c&&(a=!1);c=d;d=this.structureTypes[h]===J.c.STR.HELIX;var j=this.structureTypes[h]===J.c.STR.SHEET;this.bsVisible.get(h)&&(d&&e?g=!0:j||d?a&&j||b&&d?this.renderHermiteRibbon(!0,h,!0):this.renderHermiteArrowHead(h):this.renderHermiteConic(h,!0,7));a=j;
b=d&&!this.helixRockets}g&&this.renderRockets()})});n("J.renderbio");q(["J.renderbio.BioShapeRenderer"],"J.renderbio.BackboneRenderer",["JU.C"],function(){c$=t(function(){this.isDataFrame=!1;u(this,arguments)},J.renderbio,"BackboneRenderer",J.renderbio.BioShapeRenderer);j(c$,"renderBioShape",function(a){var b=!this.isExport&&!this.vwr.gdata.isPass2;this.isDataFrame=this.vwr.ms.isJmolDataFrameForModel(a.modelIndex);a=this.monomerCount;for(var c=this.ms.at,d=this.bsVisible.nextSetBit(0);0<=d;d=this.bsVisible.nextSetBit(d+
1)){var e=c[this.leadAtomIndices[d]],g=this.colixes[d];this.mad=this.mads[d];var h=(d+1)%a,j=c[this.leadAtomIndices[h]],h=this.colixes[h];if(0<e.nBackbonesDisplayed&&0<j.nBackbonesDisplayed&&!this.ms.isAtomHidden(j.i)&&(this.isDataFrame||100>e.distanceSquared(j)))g=JU.C.getColixInherited(g,e.colixAtom),h=JU.C.getColixInherited(h,j.colixAtom),(!b||this.setBioColix(g)||this.setBioColix(h))&&this.drawSegmentAB(e,j,g,h,100)}},"J.shapebio.BioShape")});n("J.renderbio");q(["J.renderbio.StrandsRenderer"],
"J.renderbio.TraceRenderer",null,function(){c$=A(J.renderbio,"TraceRenderer",J.renderbio.StrandsRenderer);j(c$,"renderBioShape",function(){this.wireframeOnly?this.renderStrands():this.renderTrace()},"J.shapebio.BioShape");e(c$,"renderTrace",function(){this.calcScreenControlPoints();for(var a=this.bsVisible.nextSetBit(0);0<=a;a=this.bsVisible.nextSetBit(a+1))this.renderHermiteConic(a,!1,7)})})})(Clazz,Clazz.getClassName,Clazz.newLongArray,Clazz.doubleToByte,Clazz.doubleToInt,Clazz.doubleToLong,Clazz.declarePackage,
Clazz.instanceOf,Clazz.load,Clazz.instantialize,Clazz.decorateAsClass,Clazz.floatToInt,Clazz.floatToLong,Clazz.makeConstructor,Clazz.defineEnumConstant,Clazz.exceptionOf,Clazz.newIntArray,Clazz.defineStatics,Clazz.newFloatArray,Clazz.declareType,Clazz.prepareFields,Clazz.superConstructor,Clazz.newByteArray,Clazz.declareInterface,Clazz.p0p,Clazz.pu$h,Clazz.newShortArray,Clazz.innerTypeInstance,Clazz.isClassDefined,Clazz.prepareCallback,Clazz.newArray,Clazz.castNullAs,Clazz.floatToShort,Clazz.superCall,
Clazz.decorateAsType,Clazz.newBooleanArray,Clazz.newCharArray,Clazz.implementOf,Clazz.newDoubleArray,Clazz.overrideConstructor,Clazz.clone,Clazz.doubleToShort,Clazz.getInheritedLevel,Clazz.getParamsType,Clazz.isAF,Clazz.isAB,Clazz.isAI,Clazz.isAS,Clazz.isASS,Clazz.isAP,Clazz.isAFloat,Clazz.isAII,Clazz.isAFF,Clazz.isAFFF,Clazz.tryToSearchAndExecute,Clazz.getStackTrace,Clazz.inheritArgs,Clazz.alert,Clazz.defineMethod,Clazz.overrideMethod,Clazz.declareAnonymous,Clazz.cloneFinals);
