text: (function(T,U,V,O,W,B,L,E,F,G,X,Y,M,Z,H,v,I,P,N,K,Q,$,R,aa,ba,ca,da,ea,fa,S,ga,ha,ia,ja,ka,la,ma,na,oa,pa,qa,ra,sa,ta,ua,va,wa,xa,ya,za,Aa,Ba,Ca,Da,Ea,Fa,g,m){B("JS");E(["JU.BS","$.V3"],"JS.VTemp",null,function(){c$=G(function(){this.bsTemp=this.vNorm3=this.vNorm2=this.vNorm1=this.vTemp2=this.vTemp1=this.vB=this.vA=this.vTemp=null;F(this,arguments)},JS,"VTemp");K(c$,function(){this.vTemp=new JU.V3;this.vA=new JU.V3;this.vB=new JU.V3;this.vTemp1=new JU.V3;this.vTemp2=new JU.V3;this.vNorm1=new JU.V3;
  this.vNorm2=new JU.V3;this.vNorm3=new JU.V3;this.bsTemp=new JU.BS})});B("J.api");R(J.api,"SmilesMatcherInterface");B("JS");E(["J.api.SmilesMatcherInterface"],"JS.SmilesMatcher","JU.AU $.BS $.PT JS.InvalidSmilesException $.SmilesGenerator $.SmilesParser JU.BSUtil".split(" "),function(){c$=N(JS,"SmilesMatcher",null,J.api.SmilesMatcherInterface);m(c$,"getLastException",function(){return JS.InvalidSmilesException.getLastError()});m(c$,"getMolecularFormula",function(a,b){JS.InvalidSmilesException.clear();
  var c=JS.SmilesParser.getMolecule(a,b);c.createTopoMap(null);c.nodes=c.jmolAtoms;return c.getMolecularFormula(!b,null,!1)},"~S,~B");m(c$,"getSmiles",function(a,b,c,d,e,f,k,j){JS.InvalidSmilesException.clear();return d?(new JS.SmilesGenerator).getBioSmiles(a,b,c,e,f,k):(new JS.SmilesGenerator).getSmiles(a,b,c,j)},"~A,~N,JU.BS,~B,~B,~B,~S,~B");g(c$,"areEqual",function(a,b){var c=this.find(a,b,!1,!1);return null==c?-1:c.length},"~S,~S");g(c$,"areEqual",function(a,b){var c=this.find(a,b,!1,!0,!0);return null!=
  c&&1==c.length},"~S,JS.SmilesSearch");g(c$,"find",function(a,b,c,d){JS.InvalidSmilesException.clear();b=JS.SmilesParser.getMolecule(b,!1);return this.find(a,b,c,!c,d)},"~S,~S,~B,~B");m(c$,"getRelationship",function(a,b){if(null==a||null==b||0==a.length||0==b.length)return"";var c=this.getMolecularFormula(a,!1),d=this.getMolecularFormula(b,!1);if(!c.equals(d))return"none";var e,c=JS.SmilesMatcher.countStereo(a),d=JS.SmilesMatcher.countStereo(b);e=c==d&&0<this.areEqual(b,a);if(!e){e=a+b;if(0<=e.indexOf("/")||
  0<=e.indexOf("\\")||0<=e.indexOf("@")){if(c==d&&0<c&&(a=this.reverseChirality(a),e=0<this.areEqual(a,b)))return"enantiomers";if(e=0<this.areEqual("/nostereo/"+b,a))return c==d?"diastereomers":"ambiguous stereochemistry!"}return"constitutional isomers"}return"identical"},"~S,~S");m(c$,"reverseChirality",function(a){a=JU.PT.rep(a,"@@","!@");a=JU.PT.rep(a,"@","@@");a=JU.PT.rep(a,"!@@","@");a=JU.PT.rep(a,"@@SP","@SP");a=JU.PT.rep(a,"@@OH","@OH");return a=JU.PT.rep(a,"@@TB","@TB")},"~S");m(c$,"getSubstructureSet",
  function(a,b,c,d,e,f){return this.match(a,b,c,d,null,e,!1,f,1)},"~S,~A,~N,JU.BS,~B,~B");m(c$,"getSubstructureSets",function(a,b,c,d,e,f,k){JS.InvalidSmilesException.clear();var j=new JS.SmilesParser(!0),h=null,h=j.parse("");h.firstMatchOnly=!1;h.matchAllAtoms=!1;h.jmolAtoms=b;h.jmolAtomCount=Math.abs(c);h.setSelected(e);h.getRingData(!0,d,k);h.asVector=!1;h.subSearches=Array(1);h.getSelections();b=new JU.BS;for(e=0;e<a.length;e++)if(null==a[e]||0==a[e].length||a[e].startsWith("#"))f.addLast(null);
  else if(h.clear(),k=j.getSearch(h,JS.SmilesParser.cleanPattern(a[e]),d),h.subSearches[0]=k,k=JU.BSUtil.copy(h.search(!1)),f.addLast(k),b.or(k),b.cardinality()==c)break},"~A,~A,~N,~N,JU.BS,JU.Lst,~A");m(c$,"getSubstructureSetArray",function(a,b,c,d,e,f,k){return this.match(a,b,c,d,e,f,!1,k,2)},"~S,~A,~N,JU.BS,JU.BS,~B,~B");m(c$,"getCorrelationMaps",function(a,b,c,d,e,f){return this.match(a,b,c,d,null,e,!1,f,3)},"~S,~A,~N,JU.BS,~B,~B");g(c$,"find",function(a,b,c,d,e){var f=new JU.BS;b.createTopoMap(f);
  return this.match(a,b.jmolAtoms,-b.jmolAtoms.length,null,f,c,d,e,2)},"~S,JS.SmilesSearch,~B,~B,~B");g(c$,"match",function(a,b,c,d,e,f,k,j,h){JS.InvalidSmilesException.clear();try{var g=JS.SmilesParser.getMolecule(a,f);g.jmolAtoms=b;g.jmolAtomCount=Math.abs(c);0>c&&(g.isSmilesFind=!0);g.setSelected(d);g.getSelections();g.bsRequired=null;g.setRingData(e);g.firstMatchOnly=j;g.matchAllAtoms=k;switch(h){case 1:return g.asVector=!1,g.search(!1);case 2:g.asVector=!0;var l=g.search(!1);return l.toArray(Array(l.size()));
  case 3:g.getMaps=!0;var n=g.search(!1);return n.toArray(JU.AU.newInt2(n.size()))}}catch(r){if(H(r,Exception))throw null==JS.InvalidSmilesException.getLastError()&&JS.InvalidSmilesException.clear(),new JS.InvalidSmilesException(JS.InvalidSmilesException.getLastError());throw r;}return null},"~S,~A,~N,JU.BS,JU.BS,~B,~B,~B,~N");c$.countStereo=g(c$,"countStereo",function(a){a=JU.PT.rep(a,"@@","@");for(var b=a.lastIndexOf("@")+1,c=0;0<=--b;)"@"==a.charAt(b)&&c++;return c},"~S");I(c$,"MODE_BITSET",1,"MODE_ARRAY",
  2,"MODE_MAP",3)});B("JS");E(["java.lang.Exception"],"JS.InvalidSmilesException",null,function(){c$=N(JS,"InvalidSmilesException",Exception);c$.getLastError=g(c$,"getLastError",function(){return JS.InvalidSmilesException.lastError});c$.clear=g(c$,"clear",function(){JS.InvalidSmilesException.lastError=null});M(c$,function(a){Q(this,JS.InvalidSmilesException,[a]);JS.InvalidSmilesException.lastError=a},"~S");I(c$,"lastError",null)});B("JS");E(["JU.JmolMolecule","JU.BS","$.Lst","JS.VTemp"],"JS.SmilesSearch",
  "java.util.Arrays $.Hashtable JU.AU $.SB $.V3 JS.SmilesAromatic $.SmilesAtom $.SmilesBond $.SmilesMeasure $.SmilesParser JU.BSUtil $.Logger".split(" "),function(){c$=G(function(){this.bioAtoms=this.smartsAtoms=this.jmolAtoms=this.pattern=this.patternAtoms=null;this.jmolAtomCount=0;this.bsRequired=this.bsSelected=null;this.isSmilesFind=this.isSmarts=this.matchAllAtoms=this.firstMatchOnly=!1;this.subSearches=null;this.needRingData=this.haveAtomStereochemistry=this.haveBondStereochemistry=this.haveSelected=
  !1;this.needAromatic=!0;this.needRingMemberships=!1;this.ringDataMax=-2147483648;this.measures=null;this.flags=0;this.lastChainAtom=this.bsAromatic6=this.bsAromatic5=this.bsAromatic=this.ringSets=null;this.getMaps=this.asVector=!1;this.top=null;this.isRingCheck=this.isSilent=!1;this.selectedAtomCount=0;this.htNested=this.bsFound=this.ringConnections=this.ringCounts=this.ringData=null;this.nNested=0;this.bsReturn=this.vReturn=this.nestedBond=null;this.aromaticDouble=this.noAromatic=this.ignoreStereochemistry=
  !1;this.v=this.bsCheck=null;F(this,arguments)},JS,"SmilesSearch",JU.JmolMolecule);K(c$,function(){this.patternAtoms=Array(16);this.measures=new JU.Lst;this.bsAromatic=new JU.BS;this.bsAromatic5=new JU.BS;this.bsAromatic6=new JU.BS;this.top=this;this.bsFound=new JU.BS;this.bsReturn=new JU.BS;this.v=new JS.VTemp});g(c$,"toString",function(){var a=(new JU.SB).append(this.pattern);a.append("\nmolecular formula: "+this.getMolecularFormula(!0,null,!1));return a.toString()});g(c$,"setSelected",function(a){null==
  a&&(a=JU.BS.newN(this.jmolAtomCount),a.setBits(0,this.jmolAtomCount));this.bsSelected=a},"JU.BS");g(c$,"setAtomArray",function(){this.patternAtoms.length>this.ac&&(this.patternAtoms=JU.AU.arrayCopyObject(this.patternAtoms,this.ac));this.nodes=this.patternAtoms});g(c$,"addAtom",function(){this.ac>=this.patternAtoms.length&&(this.patternAtoms=JU.AU.doubleLength(this.patternAtoms));var a=(new JS.SmilesAtom).setIndex(this.ac);this.patternAtoms[this.ac]=a;this.ac++;return a});g(c$,"addNested",function(a){null==
  this.top.htNested&&(this.top.htNested=new java.util.Hashtable);this.setNested(++this.top.nNested,a);return this.top.nNested},"~S");g(c$,"clear",function(){this.bsReturn.clearAll();this.nNested=0;this.nestedBond=this.htNested=null;this.clearBsFound(-1)});g(c$,"setNested",function(a,b){this.top.htNested.put("_"+a,b)},"~N,~O");g(c$,"getNested",function(a){return this.top.htNested.get("_"+a)},"~N");g(c$,"getMissingHydrogenCount",function(){for(var a=0,b,c=0;c<this.ac;c++)if(0<=(b=this.patternAtoms[c].missingHydrogenCount))a+=
  b;return a});g(c$,"setRingData",function(a){this.needAromatic&&(this.needRingData=!0);this.needAromatic=(new Boolean(this.needAromatic&(new Boolean(null==a&0==(this.flags&1))).valueOf())).valueOf();if(!this.needAromatic&&(this.bsAromatic.clearAll(),null!=a&&this.bsAromatic.or(a),!this.needRingMemberships&&!this.needRingData))return;this.getRingData(this.needRingData,this.flags,null)},"JU.BS");g(c$,"getRingData",function(a,b,c){var d=0!=(b&4),e=0!=(b&8);d&&null==c&&(c=JU.AU.createArrayOfArrayList(4));
  e&&this.needAromatic&&(this.bsAromatic=JS.SmilesAromatic.checkAromaticDefined(this.jmolAtoms,this.bsSelected),d=!1);0>this.ringDataMax&&(this.ringDataMax=8);d&&6>this.ringDataMax&&(this.ringDataMax=6);a&&(this.ringCounts=v(this.jmolAtomCount,0),this.ringConnections=v(this.jmolAtomCount,0),this.ringData=Array(this.ringDataMax+1));this.ringSets=new JU.SB;for(var f="****";f.length<this.ringDataMax;)f+=f;var k=null;for(b=3;b<=this.ringDataMax;b++)if(!(b>this.jmolAtomCount)){var j="*1"+f.substring(0,b-
  2)+"*1",j=JS.SmilesParser.getMolecule(j,!0),j=this.subsearch(j,!1,!0);if(null!=c&&5>=b){for(var h=new JU.Lst,g=j.size();0<=--g;)h.addLast(j.get(g));c[b-3]=h}if(this.needAromatic){if(!e&&(!d||5==b||6==b))for(h=j.size();0<=--h;)g=j.get(h),(e||JS.SmilesAromatic.isFlatSp2Ring(this.jmolAtoms,this.bsSelected,g,d?0.1:0.01))&&this.bsAromatic.or(g);if(d)switch(b){case 5:k=j;break;case 6:e?this.bsAromatic=JS.SmilesAromatic.checkAromaticDefined(this.jmolAtoms,this.bsAromatic):JS.SmilesAromatic.checkAromaticStrict(this.jmolAtoms,
  this.bsAromatic,k,j),c[3]=new JU.Lst,this.setAromatic56(k,this.bsAromatic5,5,c[3]),this.setAromatic56(j,this.bsAromatic6,6,c[3])}}if(a){this.ringData[b]=new JU.BS;for(var l=0;l<j.size();l++){h=j.get(l);this.ringData[b].or(h);for(g=h.nextSetBit(0);0<=g;g=h.nextSetBit(g+1))this.ringCounts[g]++}}}if(a)for(b=this.bsSelected.nextSetBit(0);0<=b;b=this.bsSelected.nextSetBit(b+1))if(a=this.jmolAtoms[b],c=a.getEdges(),null!=c)for(l=c.length;0<=--l;)0<this.ringCounts[a.getBondedAtomIndex(l)]&&this.ringConnections[b]++},
  "~B,~N,~A");g(c$,"setAromatic56",function(a,b,c,d){for(var e=0;e<a.size();e++){var f=a.get(e);this.v.bsTemp.clearAll();this.v.bsTemp.or(f);this.v.bsTemp.and(this.bsAromatic);this.v.bsTemp.cardinality()==c&&(b.or(f),null!=d&&d.addLast(f))}},"JU.Lst,JU.BS,~N,JU.Lst");g(c$,"subsearch",function(a,b,c){a.ringSets=this.ringSets;a.jmolAtoms=this.jmolAtoms;a.jmolAtomCount=this.jmolAtomCount;a.bsSelected=this.bsSelected;a.htNested=this.htNested;a.isSmilesFind=this.isSmilesFind;a.bsCheck=this.bsCheck;a.isSmarts=
  !0;a.bsAromatic=this.bsAromatic;a.bsAromatic5=this.bsAromatic5;a.bsAromatic6=this.bsAromatic6;a.ringData=this.ringData;a.ringCounts=this.ringCounts;a.ringConnections=this.ringConnections;b?(a.bsRequired=null,a.firstMatchOnly=!1,a.matchAllAtoms=!1):c?(a.bsRequired=null,a.isSilent=!0,a.isRingCheck=!0,a.asVector=!0,a.matchAllAtoms=!1):(a.haveSelected=this.haveSelected,a.bsRequired=this.bsRequired,a.firstMatchOnly=this.firstMatchOnly,a.matchAllAtoms=this.matchAllAtoms,a.getMaps=this.getMaps,a.asVector=
  this.asVector,a.vReturn=this.vReturn,a.bsReturn=this.bsReturn);return a.search(b)},"JS.SmilesSearch,~B,~B");g(c$,"search",function(a){this.ignoreStereochemistry=0!=(this.flags&2);this.noAromatic=0!=(this.flags&1);this.aromaticDouble=0!=(this.flags&16);JU.Logger.debugging&&!this.isSilent&&JU.Logger.debug("SmilesSearch processing "+this.pattern);if(null==this.vReturn&&(this.asVector||this.getMaps))this.vReturn=new JU.Lst;null==this.bsSelected&&(this.bsSelected=JU.BS.newN(this.jmolAtomCount),this.bsSelected.setBits(0,
  this.jmolAtomCount));this.selectedAtomCount=this.bsSelected.cardinality();if(null!=this.subSearches)for(a=0;a<this.subSearches.length&&!(null!=this.subSearches[a]&&(this.subsearch(this.subSearches[a],!1,!1),this.firstMatchOnly&&(null==this.vReturn?0<=this.bsReturn.nextSetBit(0):0<this.vReturn.size())));a++);else 0<this.ac&&this.checkMatch(null,-1,-1,a);return this.asVector||this.getMaps?this.vReturn:this.bsReturn},"~B");g(c$,"checkMatch",function(a,b,c,d){var e;if(null==a)null==this.nestedBond?this.clearBsFound(-1):
  this.bsReturn.clearAll();else{if(this.bsFound.get(c)||!this.bsSelected.get(c))return!0;e=this.jmolAtoms[c];if(!this.isRingCheck){if(null!=a.atomsOr){for(var f=0;f<a.nAtomsOr;f++)if(!this.checkMatch(a.atomsOr[f],b,c,d))return!1;return!0}if(null==a.primitives){if(!this.checkPrimitiveAtom(a,c))return!0}else for(f=0;f<a.nPrimitives;f++)if(!this.checkPrimitiveAtom(a.primitives[f],c))return!0}e=e.getEdges();for(f=a.getBondCount();0<=--f;){var k=a.getBond(f);if(k.getAtomIndex2()==a.index){var j=k.getAtom1(),
  h=j.getMatchingAtom();switch(k.order){case 96:case 112:if(!this.checkMatchBond(a,j,k,c,h,null))return!0;break;default:for(var g=0;g<e.length&&(!(e[g].getAtomIndex1()==h||e[g].getAtomIndex2()==h)||!e[g].isCovalent());g++);if(g==e.length||!this.checkMatchBond(a,j,k,c,h,e[g]))return!0}}}this.patternAtoms[a.index].setMatchingAtom(c);JU.Logger.debugging&&!this.isSilent&&JU.Logger.debug("pattern atom "+b+" "+a);this.bsFound.set(c)}if(!this.continueMatch(b,c,d))return!1;0<=c&&this.clearBsFound(c);return!0},
  "JS.SmilesAtom,~N,~N,~B");g(c$,"continueMatch",function(a,b,c){var d,e;if(++a<this.ac){var f=this.patternAtoms[a],k=0<=b?f.getBondTo(null):0==a?this.nestedBond:null;if(null==k){k=JU.BSUtil.copy(this.bsFound);if(0<=f.notBondedIndex){d=this.patternAtoms[f.notBondedIndex];var j=this.jmolAtoms[d.getMatchingAtom()];if(d.isBioAtom)d=j.getOffsetResidueAtom("0",1),0<=d&&k.set(d),d=j.getOffsetResidueAtom("0",-1),0<=d&&k.set(d);else{e=j.getEdges();for(d=0;d<e.length;d++)k.set(e[d].getOtherAtomNode(j).getIndex())}}b=
  0<=b&&f.isBioAtom&&(null==f.atomName||null!=f.residueChar);for(j=this.bsSelected.nextSetBit(0);0<=j;j=this.bsSelected.nextSetBit(j+1)){if(!k.get(j)&&!this.checkMatch(f,a,j,c))return!1;b&&(d=this.jmolAtoms[j].getOffsetResidueAtom(f.atomName,1),0<=d&&(j=d-1))}this.bsFound=k;return!0}d=this.jmolAtoms[k.getAtom1().getMatchingAtom()];switch(k.order){case 96:j=d.getOffsetResidueAtom(f.atomName,1);if(0<=j){k=JU.BSUtil.copy(this.bsFound);d.getGroupBits(this.bsFound);if(!this.checkMatch(f,a,j,c))return!1;
  this.bsFound=k}return!0;case 112:b=new JU.Lst;d.getCrossLinkLeadAtomIndexes(b);k=JU.BSUtil.copy(this.bsFound);d.getGroupBits(this.bsFound);for(j=0;j<b.size();j++)if(!this.checkMatch(f,a,b.get(j).intValue(),c))return!1;this.bsFound=k;return!0}e=d.getEdges();if(null!=e)for(j=0;j<e.length;j++)if(!this.checkMatch(f,a,d.getBondedAtomIndex(j),c))return!1;this.clearBsFound(b);return!0}if(!this.ignoreStereochemistry&&!this.checkStereochemistry())return!0;k=new JU.BS;for(j=f=0;j<this.ac;j++)if(b=this.patternAtoms[j].getMatchingAtom(),
  c||!this.top.haveSelected||this.patternAtoms[j].selected){f++;k.set(b);this.patternAtoms[j].isBioAtom&&null==this.patternAtoms[j].atomName&&this.jmolAtoms[b].getGroupBits(k);if(c)break;!this.isSmarts&&0<this.patternAtoms[j].missingHydrogenCount&&this.getHydrogens(this.jmolAtoms[b],k)}if(null!=this.bsRequired&&!this.bsRequired.intersects(k)||this.matchAllAtoms&&k.cardinality()!=this.selectedAtomCount)return!0;if(null!=this.bsCheck)if(c){this.bsCheck.clearAll();for(j=0;j<this.ac;j++)this.bsCheck.set(this.patternAtoms[j].getMatchingAtom());
  if(this.bsCheck.cardinality()!=this.ac)return!0}else if(k.cardinality()!=this.ac)return!0;this.bsReturn.or(k);if(this.getMaps){a=v(f,0);for(k=j=0;j<this.ac;j++)if(c||!this.top.haveSelected||this.patternAtoms[j].selected)a[k++]=this.patternAtoms[j].getMatchingAtom();this.vReturn.addLast(a);return!this.firstMatchOnly}if(this.asVector){c=!0;for(j=this.vReturn.size();0<=--j&&c;)c=!this.vReturn.get(j).equals(k);if(!c)return!0;this.vReturn.addLast(k)}if(this.isRingCheck){this.ringSets.append(" ");for(d=
  3*a+2;--d>a;)this.ringSets.append("-").appendI(this.patternAtoms[(d<=2*a?2*a-d+1:d-1)%a].getMatchingAtom());this.ringSets.append("- ");return!0}return this.firstMatchOnly?!1:k.cardinality()!=this.selectedAtomCount},"~N,~N,~B");g(c$,"clearBsFound",function(a){0>a?null==this.bsCheck&&this.bsFound.clearAll():this.bsFound.clear(a)},"~N");g(c$,"getHydrogens",function(a,b){for(var c=a.getEdges(),d=-1,e=0;e<c.length;e++)if(1==this.jmolAtoms[a.getBondedAtomIndex(e)].getElementNumber()){d=a.getBondedAtomIndex(e);
  if(null==b)break;b.set(d)}return 0<=d?this.jmolAtoms[d]:null},"JU.Node,JU.BS");g(c$,"checkPrimitiveAtom",function(a,b){for(var c=this.jmolAtoms[b],d=a.not;;){var e;if(0<a.iNested){d=this.getNested(a.iNested);L(d,JS.SmilesSearch)&&(a.isBioAtom&&(d.nestedBond=a.getBondTo(null)),d=this.subsearch(d,!0,!1),null==d&&(d=new JU.BS),a.isBioAtom||this.setNested(a.iNested,d));d=a.not!=d.get(b);break}if(a.isBioAtom){e=c;if(null!=a.atomName&&(a.isLeadAtom()?!e.isLeadAtom():!a.atomName.equals(e.getAtomName().toUpperCase())))break;
  if(a.notCrossLinked&&e.getCrossLinkLeadAtomIndexes(null))break;if(null!=a.residueName&&!a.residueName.equals(e.getGroup3(!1).toUpperCase()))break;if(null!=a.residueChar){if(a.isDna()&&!e.isDna()||a.isRna()&&!e.isRna()||a.isProtein()&&!e.isProtein()||a.isNucleic()&&!e.isNucleic())break;var f=e.getGroup1("\x00").toUpperCase(),f=a.residueChar.equals(f);switch(a.residueChar.charAt(0)){case "N":f=a.isNucleic()?e.isNucleic():f;break;case "R":f=a.isNucleic()?e.isPurine():f;break;case "Y":f=a.isNucleic()?
  e.isPyrimidine():f}if(!f)break}if(0<=a.elementNumber&&a.elementNumber!=c.getElementNumber())break}else{if(null!=a.atomName&&!a.atomName.equals(c.getAtomName().toUpperCase()))break;if(0<=a.jmolIndex&&c.getIndex()!=a.jmolIndex)break;if(null!=a.atomType&&!a.atomType.equals(c.getAtomType()))break;if(0<=a.elementNumber&&a.elementNumber!=c.getElementNumber())break;e=a.isAromatic();if(!this.noAromatic&&!a.aromaticAmbiguous&&e!=this.bsAromatic.get(b))break;if(-2147483648!=(e=a.getAtomicMass()))if(f=c.getIsotopeNumber(),
  0<=e&&e!=f||0>e&&0!=f&&-e!=f)break;if(-2147483648!=(e=a.getCharge())&&e!=c.getFormalCharge())break;e=a.getCovalentHydrogenCount()+a.missingHydrogenCount;if(0<=e&&e!=c.getCovalentHydrogenCount())break;e=a.implicitHydrogenCount;if(-2147483648!=e&&(f=c.getImplicitHydrogenCount(),-1==e?0==f:e!=f))break;if(0<a.degree&&a.degree!=c.getCovalentBondCount())break;if(0<a.nonhydrogenDegree&&a.nonhydrogenDegree!=c.getCovalentBondCount()-c.getCovalentHydrogenCount())break;if(0<a.valence&&a.valence!=c.getValence())break;
  if(0<a.connectivity&&a.connectivity!=c.getCovalentBondCount()+c.getImplicitHydrogenCount())break;if(null!=this.ringData&&-1<=a.ringSize)if(0>=a.ringSize){if(0==this.ringCounts[b]!=(0==a.ringSize))break}else{c=this.ringData[500==a.ringSize?5:600==a.ringSize?6:a.ringSize];if(null==c||!c.get(b))break;if(!this.noAromatic)if(500==a.ringSize){if(!this.bsAromatic5.get(b))break}else if(600==a.ringSize&&!this.bsAromatic6.get(b))break}if(null!=this.ringData&&-1<=a.ringMembership&&(-1==a.ringMembership?0==this.ringCounts[b]:
  this.ringCounts[b]!=a.ringMembership))break;if(0<=a.ringConnectivity&&(e=this.ringConnections[b],-1==a.ringConnectivity&&0==e||-1!=a.ringConnectivity&&e!=a.ringConnectivity))break}d=!d;break}return d},"JS.SmilesAtom,~N");g(c$,"checkMatchBond",function(a,b,c,d,e,f){if(null!=c.bondsOr){for(var k=0;k<c.nBondsOr;k++)if(this.checkMatchBond(a,b,c.bondsOr[k],d,e,f))return!0;return!1}if(null==c.primitives){if(!this.checkPrimitiveBond(c,d,e,f))return!1}else for(a=0;a<c.nPrimitives;a++)if(!this.checkPrimitiveBond(c.primitives[a],
  d,e,f))return!1;c.matchingBond=f;return!0},"JS.SmilesAtom,JS.SmilesAtom,JS.SmilesBond,~N,~N,JU.Edge");g(c$,"checkPrimitiveBond",function(a,b,c,d){var e=!1;switch(a.order){case 96:return a.isNot!=(this.bioAtoms[c].getOffsetResidueAtom("0",1)==this.bioAtoms[b].getOffsetResidueAtom("0",0));case 112:return a.isNot!=this.bioAtoms[b].isCrossLinked(this.bioAtoms[c])}var f=!this.noAromatic&&this.bsAromatic.get(b),k=!this.noAromatic&&this.bsAromatic.get(c);d=d.getCovalentOrder();if(f&&k)switch(a.order){case 17:case 65:e=
  JS.SmilesSearch.isRingBond(this.ringSets,b,c);break;case 1:e=!this.isSmarts||!JS.SmilesSearch.isRingBond(this.ringSets,b,c);break;case 2:e=!this.isSmarts||this.aromaticDouble&&(2==d||514==d);break;case 769:case 1025:case 81:case -1:e=!0}else switch(a.order){case 81:case -1:e=!0;break;case 1:case 257:case 513:e=1==d||1041==d||1025==d;break;case 769:e=d==(this.isSmilesFind?33:1);break;case 1025:e=d==(this.isSmilesFind?97:1);break;case 2:e=2==d;break;case 3:e=3==d;break;case 65:e=JS.SmilesSearch.isRingBond(this.ringSets,
  b,c)}return e!=a.isNot},"JS.SmilesBond,~N,~N,JU.Edge");c$.isRingBond=g(c$,"isRingBond",function(a,b,c){return null!=a&&0<=a.indexOf("-"+b+"-"+c+"-")},"JU.SB,~N,~N");g(c$,"checkStereochemistry",function(){for(var a=0;a<this.measures.size();a++)if(!this.measures.get(a).check())return!1;if(this.haveAtomStereochemistry){JU.Logger.debugging&&JU.Logger.debug("checking stereochemistry...");for(var b=null,c=null,d=null,e=null,f=null,k=null,j=c=null,a=0;a<this.ac;a++){var h=this.patternAtoms[a],g=this.jmolAtoms[h.getMatchingAtom()],
  k=h.missingHydrogenCount;0>k&&(k=0);var l=h.getChiralClass();if(-2147483648!=l){var n=h.getChiralOrder();if(this.isSmilesFind&&g.getAtomSite()>>8!=l)return!1;JU.Logger.debugging&&JU.Logger.debug("...type "+l+" for pattern atom "+h+" "+g);switch(l){case 2:c=h.getBond(0).getOtherAtom(h);j=h.getBond(1).getOtherAtom(h);if(null==c||null==j)continue;for(d=b=h;2==c.getBondCount()&&2==j.getBondCount()&&4==c.getValence()&&4==j.getValence();)h=c.getBondNotTo(b,!0),b=c,c=h.getOtherAtom(c),h=j.getBondNotTo(d,
  !0),d=j,j=h.getOtherAtom(j);h=c;e=Array(6);e[4]=(new JS.SmilesAtom).setIndex(604);d=h.getBondCount();for(b=0;b<d;b++)c=h.bonds[b].getOtherAtom(h),2==h.bonds[b].matchingBond.getCovalentOrder()?null==j&&(j=c):null==e[0]?e[0]=this.getJmolAtom(c.getMatchingAtom()):e[1]=this.getJmolAtom(c.getMatchingAtom());if(null==j)continue;d=j.getBondCount();if(2>d||3<d)continue;for(b=0;b<d;b++)c=j.bonds[b].getOtherAtom(j),2!=j.bonds[b].matchingBond.getCovalentOrder()&&(null==e[2]?e[2]=this.getJmolAtom(c.getMatchingAtom()):
  e[3]=this.getJmolAtom(c.getMatchingAtom()));if(this.isSmilesFind&&(null==e[1]&&this.getX(h,e,1,!1,!0),null==e[3]&&this.getX(j,e,3,!1,!1),!this.setSmilesCoordinates(g,h,j,e)))return!1;null==e[1]&&this.getX(h,e,1,!0,!1);null==e[3]&&this.getX(j,e,3,!0,!1);if(!JS.SmilesSearch.checkStereochemistryAll(h.not,g,l,n,e[0],e[1],e[2],e[3],null,null,this.v))return!1;continue;case 4:case 8:case 5:case 6:b=this.getJmolAtom(h.getMatchingBondedAtom(0));switch(k){case 0:c=this.getJmolAtom(h.getMatchingBondedAtom(1));
  break;case 1:c=this.getHydrogens(this.getJmolAtom(h.getMatchingAtom()),null);h.isFirst&&(d=c,c=b,b=d);break;default:continue}d=this.getJmolAtom(h.getMatchingBondedAtom(2-k));e=this.getJmolAtom(h.getMatchingBondedAtom(3-k));f=this.getJmolAtom(h.getMatchingBondedAtom(4-k));k=this.getJmolAtom(h.getMatchingBondedAtom(5-k));if(this.isSmilesFind&&!this.setSmilesCoordinates(g,h,j,[b,c,d,e,f,k])||!JS.SmilesSearch.checkStereochemistryAll(h.not,g,l,n,b,c,d,e,f,k,this.v))return!1}}}}if(this.haveBondStereochemistry)for(b=
  0;b<this.ac;b++){c=this.patternAtoms[b];e=f=j=null;l=g=a=0;d=c.getBondCount();n=!1;for(k=0;k<d;k++){var h=c.getBond(k),r=h.getAtom2()===c,m=h.order;switch(m){case 769:case 1025:case 2:if(r)continue;j=h.getAtom2();l=m;(n=2!=m)&&(a=h.isNot?-1:1);break;case 257:case 513:f=r?h.getAtom1():h.getAtom2(),a=r!=(257==m)?1:-1}}if(n){h=c.getBondNotTo(j,!1);if(null==h)return!1;f=h.getOtherAtom(c);h=j.getBondNotTo(c,!1);if(null==h)return!1;e=h.getOtherAtom(j)}else{if(null==j||0==a)continue;d=j.getBondCount();for(k=
  0;k<d&&0==g;k++)switch(h=j.getBond(k),r=h.getAtom2()===j,m=h.order,m){case 257:case 513:e=r?h.getAtom1():h.getAtom2(),g=r!=(257==m)?1:-1}if(0==g)continue}this.isSmilesFind&&this.setSmilesBondCoordinates(c,j,l);c=this.getJmolAtom(c.getMatchingAtom());j=this.getJmolAtom(j.getMatchingAtom());h=this.getJmolAtom(f.getMatchingAtom());d=this.getJmolAtom(e.getMatchingAtom());if(null==h||null==d)return!1;JS.SmilesMeasure.setTorsionData(h,c,j,d,this.v,n);if(n){if(g=769==l?1:-1,j=this.v.vTemp1.dot(this.v.vTemp2),
  0.05>j||0.95<j||0<this.v.vNorm1.dot(this.v.vNorm2)*a*g)return!1}else if(0>this.v.vTemp1.dot(this.v.vTemp2)*a*g)return!1}return!0});g(c$,"getX",function(a,b,c,d,e){var f=this.getJmolAtom(a.getMatchingAtom()),k=a.isFirst||3==c;if(d){if(this.isSmarts){var j=f.getEdges();for(d=0;d<j.length;d++)if(2!=j[d].getCovalentOrder()){var h=this.jmolAtoms[f.getBondedAtomIndex(d)];if(h!==b[c-1]){b[c]=h;break}}}if(null==b[c]){j=new JU.V3;for(d=h=0;4>d;d++)null!=b[d]&&(h++,j.sub(b[d]));0==j.length()?(j.setT(b[4]),
  k=!1):(j.scaleAdd2(h+1,this.getJmolAtom(a.getMatchingAtom()),j),k=this.isSmilesFind||k);b[c]=(new JS.SmilesAtom).setIndex(-1);b[c].setT(j)}}null==b[c]&&(b[c]=this.getHydrogens(f,null),e&&(k=!0));null!=b[c]&&k&&(h=b[c],b[c]=b[c-1],b[c-1]=h)},"JS.SmilesAtom,~A,~N,~B,~B");c$.checkStereochemistryAll=g(c$,"checkStereochemistryAll",function(a,b,c,d,e,f,k,j,h,g,l){switch(c){default:case 2:case 4:return a==(JS.SmilesSearch.getHandedness(f,k,j,e,l)!=d);case 5:return a==(!JS.SmilesSearch.isDiaxial(b,b,h,e,
  l,-0.95)||JS.SmilesSearch.getHandedness(f,k,j,e,l)!=d);case 6:if(a!=!JS.SmilesSearch.isDiaxial(b,b,g,e,l,-0.95))return!1;JS.SmilesSearch.getPlaneNormals(f,k,j,h,l);if(a!=(0>l.vNorm1.dot(l.vNorm2)||0>l.vNorm2.dot(l.vNorm3)))return!1;l.vNorm2.sub2(b,e);return a==((0>l.vNorm1.dot(l.vNorm2)?2:1)==d);case 8:return JS.SmilesSearch.getPlaneNormals(e,f,k,j,l),0>l.vNorm1.dot(l.vNorm2)?a==(3!=d):0>l.vNorm2.dot(l.vNorm3)?a==(2!=d):a==(1!=d)}},"~B,JU.Node,~N,~N,JU.Node,JU.Node,JU.Node,JU.Node,JU.Node,JU.Node,JS.VTemp");
  g(c$,"getJmolAtom",function(a){return 0>a||a>=this.jmolAtoms.length?null:this.jmolAtoms[a]},"~N");g(c$,"setSmilesBondCoordinates",function(a,b,c){a=this.jmolAtoms[a.getMatchingAtom()];b=this.jmolAtoms[b.getMatchingAtom()];a.set(-1,0,0);b.set(1,0,0);if(2==c){var d=0,e=0;c=a.getEdges();for(var f=c.length;0<=--f;){var k=c[f],j=k.getOtherAtomNode(a);if(j!==b)switch(j.set(-1,0==d++?-1:1,0),j=k.getAtomIndex2()==a.getIndex()?d:-d,k.order){case 1025:e=j;break;case 1041:e=-j}}var h=0,d=0,g=Array(2);c=b.getEdges();
  for(f=c.length;0<=--f;)if(k=c[f],j=k.getOtherAtomNode(b),j!==a)switch(g[d]=j,j.set(1,0==d++?1:-1,0),j=k.getAtomIndex2()==b.getIndex()?d:-d,k.order){case 1025:h=j;break;case 1041:h=-j}0<e*h==(Math.abs(e)%2==Math.abs(h)%2)&&(a=g[0].y,g[0].y=g[1].y,g[1].y=a)}else{c=a.getEdges();g=0;for(f=c.length;0<=--f;)if(k=c[f],k.getOtherAtomNode(a)===b){g=33==k.order?1:-1;break}for(f=c.length;0<=--f;)k=c[f],j=k.getOtherAtomNode(a),j!==b&&j.set(-1,1,0);c=b.getEdges();for(f=c.length;0<=--f;)k=c[f],j=k.getOtherAtomNode(b),
  j!==a&&j.set(1,1,-g/2)}},"JS.SmilesAtom,JS.SmilesAtom,~N");g(c$,"setSmilesCoordinates",function(a,b,c,d){var e=a.getAtomSite();if(-2147483648==e)return!1;var f=e>>8,e=e&255;c=2==f||3==f?c=this.jmolAtoms[c.getMatchingAtom()]:null;a.set(0,0,0);a=this.jmolAtoms[b.getMatchingAtom()];a.set(0,0,0);a=this.getMappedAtoms(a,c,d);switch(f){case 2:case 4:2==e&&(e=a[0],a[0]=a[1],a[1]=e);d[a[0]].set(0,0,1);d[a[1]].set(1,0,-1);d[a[2]].set(0,1,-1);d[a[3]].set(-1,-1,-1);break;case 8:switch(e){case 1:d[a[0]].set(1,
  0,0);d[a[1]].set(0,1,0);d[a[2]].set(-1,0,0);d[a[3]].set(0,-1,0);break;case 2:d[a[0]].set(1,0,0);d[a[1]].set(-1,0,0);d[a[2]].set(0,1,0);d[a[3]].set(0,-1,0);break;case 3:d[a[0]].set(1,0,0),d[a[1]].set(0,1,0),d[a[2]].set(0,-1,0),d[a[3]].set(-1,0,0)}break;case 5:case 6:f=a.length,2==e&&(e=a[0],a[0]=a[f-1],a[f-1]=e),d[a[0]].set(0,0,1),d[a[f-1]].set(0,0,-1),d[a[1]].set(1,0,0),d[a[2]].set(0,1,0),d[a[3]].set(-1,0,0),6==f&&d[a[4]].set(0,-1,0)}return!0},"JU.Node,JS.SmilesAtom,JS.SmilesAtom,~A");g(c$,"getMappedAtoms",
  function(a,b,c){for(var d=v(null==c[4]?4:null==c[5]?5:6,0),e=0;e<d.length;e++)d[e]=null==c[e]?104+100*e:c[e].getIndex();for(var f,k=a.getEdges(),j=null==b?null:b.getEdges(),e=0;e<d.length;e++){for(f=0;f<k.length&&k[f].getOtherAtomNode(a)!==c[e];f++);if(f<k.length)d[e]=10*f+100+e;else if(null!=b){for(f=0;f<j.length&&j[f].getOtherAtomNode(b)!==c[e];f++);f<j.length&&(d[e]=10*f+300+e)}}java.util.Arrays.sort(d);for(e=0;e<d.length;e++)d[e]%=10;return d},"JU.Node,JU.Node,~A");c$.isDiaxial=g(c$,"isDiaxial",
  function(a,b,c,d,e,f){e.vA.sub2(a,c);e.vB.sub2(b,d);e.vA.normalize();e.vB.normalize();return e.vA.dot(e.vB)<f},"JU.Node,JU.Node,JU.Node,JU.Node,JS.VTemp,~N");c$.getHandedness=g(c$,"getHandedness",function(a,b,c,d,e){a=JS.SmilesAromatic.getNormalThroughPoints(a,b,c,e.vTemp,e.vA,e.vB);return 0<JS.SmilesSearch.distanceToPlane(e.vTemp,a,d)?1:2},"JU.Node,JU.Node,JU.Node,JU.Node,JS.VTemp");c$.getPlaneNormals=g(c$,"getPlaneNormals",function(a,b,c,d,e){JS.SmilesAromatic.getNormalThroughPoints(a,b,c,e.vNorm1,
  e.vTemp1,e.vTemp2);JS.SmilesAromatic.getNormalThroughPoints(b,c,d,e.vNorm2,e.vTemp1,e.vTemp2);JS.SmilesAromatic.getNormalThroughPoints(c,d,a,e.vNorm3,e.vTemp1,e.vTemp2)},"JU.Node,JU.Node,JU.Node,JU.Node,JS.VTemp");c$.distanceToPlane=g(c$,"distanceToPlane",function(a,b,c){return null==a?NaN:(a.x*c.x+a.y*c.y+a.z*c.z+b)/Math.sqrt(a.x*a.x+a.y*a.y+a.z*a.z)},"JU.V3,~N,JU.P3");g(c$,"createTopoMap",function(a){null==a&&(a=new JU.BS);var b=this.getMissingHydrogenCount();this.jmolAtoms=b=Array(this.ac+b);for(var c=
  0,d=new JU.BS,e=0;e<this.ac;e++){var f=this.patternAtoms[e],k=f.getChiralClass(),j=f.missingHydrogenCount;0>j&&(j=0);var h=b[c]=(new JS.SmilesAtom).setAll(0,c,-2147483648==k?k:(k<<8)+f.getChiralOrder(),f.elementNumber,f.getCharge());h.atomName=f.atomName;h.residueName=f.residueName;h.residueChar=f.residueChar;h.isBioAtom=f.isBioAtom;h.$isLeadAtom=f.$isLeadAtom;h.setAtomicMass(f.getAtomicMass());f.isAromatic()&&a.set(c);!f.isFirst&&(1==j&&0<k)&&d.set(c);f.setMatchingAtom(c++);f=Array(f.getBondCount()+
  j);for(h.setBonds(f);0<=--j;)f=b[c]=(new JS.SmilesAtom).setAll(0,c,0,1,0),c++,f.setBonds(Array(1)),k=new JS.SmilesBond(h,f,1,!1),JU.Logger.info(""+k)}for(e=0;e<this.ac;e++){f=this.patternAtoms[e];j=f.getMatchingAtom();a=b[j];j=f.getBondCount();for(c=0;c<j;c++)if(h=f.getBond(c),h.getAtom1()===f){k=1;switch(h.order){case 769:k=33;break;case 1025:k=97;break;case 257:k=1025;break;case 513:k=1041;break;case 112:case 96:k=h.order;break;case 1:k=1;break;case 17:k=514;break;case 2:k=2;break;case 3:k=3}h=
  b[h.getAtom2().getMatchingAtom()];k=new JS.SmilesBond(a,h,k,!1);h.bondCount--;JU.Logger.info(""+k)}else h=b[h.getAtom1().getMatchingAtom()],k=h.getBondTo(a),a.addBond(k)}for(e=d.nextSetBit(0);0<=e;e=d.nextSetBit(e+1))f=b[e].getEdges(),k=f[0],f[0]=f[1],f[1]=k},"JU.BS");g(c$,"setTop",function(a){this.top=null==a?this:a.getTop()},"JS.SmilesSearch");g(c$,"getTop",function(){return this.top===this?this:this.top.getTop()});g(c$,"getSelections",function(){var a=this.top.htNested;if(!(null==a||0==this.jmolAtoms.length))for(var b=
  new java.util.Hashtable,c,a=a.entrySet().iterator();a.hasNext()&&((c=a.next())||1);){var d=c.getValue().toString();if(d.startsWith("select")){var e=b.containsKey(d)?b.get(d):this.smartsAtoms[0].findAtomsLike(d.substring(6));null==e&&(e=new JU.BS);b.put(d,e);c.setValue(e)}}});I(c$,"INITIAL_ATOMS",16)});B("JS");E(["java.util.Hashtable","JU.BS","JS.VTemp"],"JS.SmilesGenerator","JU.Lst $.SB JS.InvalidSmilesException $.SmilesAromatic $.SmilesAtom $.SmilesBond $.SmilesParser $.SmilesSearch JU.BNode $.BSUtil $.Elements $.JmolMolecule $.Logger".split(" "),
  function(){c$=G(function(){this.atoms=null;this.ac=0;this.bsAromatic=this.bsSelected=null;this.explicitH=!1;this.vTemp=this.ringSets=null;this.nPairs=0;this.bsIncludingH=this.htRings=this.htRingsSequence=this.prevSp2Atoms=this.prevAtom=this.bsToDo=this.bsBondsDn=this.bsBondsUp=null;F(this,arguments)},JS,"SmilesGenerator");K(c$,function(){this.vTemp=new JS.VTemp;this.bsBondsUp=new JU.BS;this.bsBondsDn=new JU.BS;this.htRingsSequence=new java.util.Hashtable;this.htRings=new java.util.Hashtable});g(c$,
  "getSmiles",function(a,b,c,d){var e=c.nextSetBit(0);if(0>e)return"";this.atoms=a;this.ac=b;this.bsSelected=c=JU.BSUtil.copy(c);this.explicitH=d;return this.getSmilesComponent(a[e],c,!1)},"~A,~N,JU.BS,~B");g(c$,"getBioSmiles",function(a,b,c,d,e,f){this.atoms=a;this.ac=b;b=new JU.SB;c=JU.BSUtil.copy(c);null!=f&&b.append("//* Jmol bioSMILES ").append(f.$replace("*","_")).append(" *//");f="\n";var k=new JU.BS,j=null,h,g=new JU.Lst;try{for(var l=0,n=c.nextSetBit(0);0<=n;n=c.nextSetBit(n+1)){var r=a[n],
  m=r.getGroup1("?"),p=r.getBioStructureTypeName(),t=m.equals("?");if(null!=f)if(0<b.length()&&b.append(f),f=null,l=0,0<p.length)0!=r.getChainID()&&(h="//* chain "+r.getChainIDStr()+" "+p+" "+r.getResno()+" *// ",l=h.length,b.append(h)),b.append("~").appendC(p.charAt(0)).append("~"),l++;else{h=this.getSmilesComponent(r,c,!0);if(h.equals(j))f="";else{var j=h,q=r.getGroup3(!0);null!=q&&b.append("//* ").append(q).append(" *//");b.append(h);f=".\n"}continue}75<=l&&(b.append("\n  "),l=2);t?this.addBracketedBioName(b,
  r,0<p.length?".0":null):b.append(m);l++;var s=r.getOffsetResidueAtom("0",0);if(e){r.getCrossLinkLeadAtomIndexes(g);for(var z=0;z<g.size();z++)b.append(":"),h=this.getRingCache(s,g.get(z).intValue(),this.htRingsSequence),b.append(h),l+=1+h.length;g.clear()}r.getGroupBits(k);c.andNot(k);var x=r.getOffsetResidueAtom("0",1);if(0>x||!c.get(x)){b.append(" //* ").appendI(r.getResno()).append(" *//");if(0>x&&0>(x=c.nextSetBit(n+1)))break;0<l&&(f=".\n")}n=x-1}}catch(A){if(H(A,Exception))throw new JS.InvalidSmilesException("//* error: "+
  A.getMessage()+" *//");throw A;}if(!d&&!this.htRingsSequence.isEmpty())throw this.dumpRingKeys(b,this.htRingsSequence),new JS.InvalidSmilesException("//* ?ring error? *//");h=b.toString();h.endsWith(".\n")&&(h=h.substring(0,h.length-2));return h},"~A,~N,JU.BS,~B,~B,~S");g(c$,"addBracketedBioName",function(a,b,c){a.append("[");if(null!=c&&L(b,JU.BNode)){var d=b.getChainIDStr();a.append(b.getGroup3(!1));c.equals(".0")||a.append(c).append("#").appendI(b.getElementNumber());a.append("//* ").appendI(b.getResno());
  0<d.length&&a.append(":").append(d);a.append(" *//")}else a.append(JU.Elements.elementNameFromNumber(b.getElementNumber()));a.append("]")},"JU.SB,JU.Node,~S");g(c$,"getSmilesComponent",function(a,b,c){!this.explicitH&&(1==a.getElementNumber()&&0<a.getEdges().length)&&(a=this.atoms[a.getBondedAtomIndex(0)]);this.bsSelected=JU.JmolMolecule.getBranchBitSet(this.atoms,a.getIndex(),JU.BSUtil.copy(b),null,-1,!0,!1);b.andNot(this.bsSelected);this.bsIncludingH=JU.BSUtil.copy(this.bsSelected);if(!this.explicitH)for(b=
  this.bsSelected.nextSetBit(0);0<=b;b=this.bsSelected.nextSetBit(b+1)){var d=this.atoms[b];1==d.getElementNumber()&&0==d.getIsotopeNumber()&&this.bsSelected.clear(b)}2<this.bsSelected.cardinality()?(b=null,b=JS.SmilesParser.getMolecule("A[=&@]A",!0),b.jmolAtoms=this.atoms,L(this.atoms,Array)&&(b.bioAtoms=this.atoms),b.setSelected(this.bsSelected),b.jmolAtomCount=this.ac,b.ringDataMax=7,b.setRingData(null),this.bsAromatic=b.bsAromatic,this.ringSets=b.ringSets,this.setBondDirections()):this.bsAromatic=
  new JU.BS;this.bsToDo=JU.BSUtil.copy(this.bsSelected);b=new JU.SB;for(d=this.bsToDo.nextSetBit(0);0<=d;d=this.bsToDo.nextSetBit(d+1))4<this.atoms[d].getCovalentBondCount()&&(this.getSmiles(b,this.atoms[d],c,!1,this.explicitH),a=null);if(null!=a)for(;null!=(a=this.getSmiles(b,a,c,!0,this.explicitH)););for(;0<this.bsToDo.cardinality()||!this.htRings.isEmpty();){a=this.htRings.values().iterator();if(a.hasNext()){if(a=this.atoms[a.next()[1].intValue()],!this.bsToDo.get(a.getIndex()))break}else a=this.atoms[this.bsToDo.nextSetBit(0)];
  b.append(".");for(this.prevAtom=this.prevSp2Atoms=null;null!=(a=this.getSmiles(b,a,c,!0,this.explicitH)););}if(!this.htRings.isEmpty())throw this.dumpRingKeys(b,this.htRings),new JS.InvalidSmilesException("//* ?ring error? *//\n"+b);return b.toString()},"JU.Node,JU.BS,~B");g(c$,"getBondStereochemistry",function(a,b){if(null==a)return"\x00";var c=a.index,d=null==b||a.getAtomIndex1()==b.getIndex();return this.bsBondsUp.get(c)?d?"/":"\\":this.bsBondsDn.get(c)?d?"\\":"/":"\x00"},"JU.Edge,JU.Node");g(c$,
  "setBondDirections",function(){for(var a=new JU.BS,b=S(2,3,null),c=this.bsSelected.nextSetBit(0);0<=c;c=this.bsSelected.nextSetBit(c+1))for(var d=this.atoms[c],e=d.getEdges(),f=0;f<e.length;f++){var k=e[f],j=k.index;if(!a.get(j)){var h=k.getOtherAtomNode(d);if(!(2!=k.getCovalentOrder()||JS.SmilesSearch.isRingBond(this.ringSets,c,h.getIndex()))){a.set(j);var g=k=null,j=0,l=[d,h];JU.Logger.debugging&&JU.Logger.debug(d+" == "+h);g=1;for(h=0;2>h&&0<g&&3>g;h++)for(var g=0,n=l[h],r=n.getEdges(),m=0;m<r.length;m++)1==
  r[m].getCovalentOrder()&&(b[h][g++]=r[m],"\x00"!=this.getBondStereochemistry(r[m],n)&&(k=r[m],j=h));if(!(3==g||0==g))if(null==k&&(j=0,k=b[j][0],this.bsBondsUp.set(k.index)),n=this.getBondStereochemistry(k,l[j]),g=k.getOtherAtomNode(l[j]),null!=g)for(h=0;2>h;h++)for(r=0;2>r;r++)if(m=b[h][r],!(null==m||m===k)){var p=m.index,t=m.getOtherAtomNode(l[h]);if(null!=t){var q=this.getBondStereochemistry(m,l[h]),s=JS.SmilesSearch.isDiaxial(l[j],l[h],g,t,this.vTemp,0);"\x00"==q||q!=n==s?("\\"==n&&s||"/"==n&&
  !s)==(m.getAtomIndex1()!=t.getIndex())?this.bsBondsUp.set(p):this.bsBondsDn.set(p):JU.Logger.error("BOND STEREOCHEMISTRY ERROR");JU.Logger.debugging&&JU.Logger.debug(this.getBondStereochemistry(k,l[0])+" "+g.getIndex()+" "+t.getIndex()+" "+this.getBondStereochemistry(m,l[h]))}}}}}});g(c$,"getSmiles",function(a,b,c,d,e){var f=b.getIndex();if(!this.bsToDo.get(f))return null;this.bsToDo.clear(f);var k=!this.bsSelected.get(f),j=null==this.prevAtom?-1:this.prevAtom.getIndex(),h=this.bsAromatic.get(f),
  g=null!=this.prevSp2Atoms,l=this.prevSp2Atoms,n=0,m=b.getElementNumber(),w=0,p=new JU.Lst,t=null,q=null,s=b.getEdges(),z=null,x=h?10:0,A=Array(7);JU.Logger.debugging&&JU.Logger.debug(a.toString());if(null!=s)for(var u=s.length;0<=--u;){var y=s[u];if(y.isCovalent()){var C=s[u].getOtherAtomNode(b),y=C.getIndex();if(y==j)q=s[u];else{var D=!e&&1==C.getElementNumber()&&0==C.getIsotopeNumber();if(!this.bsIncludingH.get(y))if(!D&&c&&this.bsSelected.get(f))this.bsToDo.set(y);else continue;D?(z=C,w++,1<w&&
  (x=10)):p.addLast(s[u])}}}s=null;null==l&&(l=Array(5));null!=q&&(s=JS.SmilesBond.getBondOrderString(q.getCovalentOrder()),null==this.prevSp2Atoms?l[n++]=this.prevAtom:n=2);var n=n+w,j=0,B=new JU.BS;if(d)for(u=0;u<p.size();u++){var y=p.get(u),D=y.getOtherAtomNode(b),C=D.getCovalentBondCount()-(e?0:D.getCovalentHydrogenCount()),v=y.getCovalentOrder();if(1==v&&1==C&&u<p.size()-(null==t?1:0))B.set(y.index);else if((1<v||C>j)&&!this.htRings.containsKey(JS.SmilesGenerator.getRingKey(D.getIndex(),f)))j=
  1<v?1E3+v:C,t=y}j=null==t?null:t.getOtherAtomNode(b);C=null==t?0:t.getCovalentOrder();7>x&&null!=q&&(2==q.getCovalentOrder()&&2==C&&null!=this.prevSp2Atoms&&null!=this.prevSp2Atoms[1]?(A[x++]=this.prevSp2Atoms[0],A[x++]=this.prevSp2Atoms[1]):A[x++]=this.prevAtom);7>x&&1==w&&(A[x++]=z);z=1==C&&null==this.prevSp2Atoms;v=this.getBondStereochemistry(q,this.prevAtom);q=new JU.SB;for(u=0;u<p.size();u++)y=p.get(u),B.get(y.index)&&(D=y.getOtherAtomNode(b),y=new JU.SB,y.append("("),this.prevAtom=b,this.prevSp2Atoms=
  null,this.getSmiles(y,D,c,d,e),y.append(")"),0<=q.indexOf(y.toString())&&(x=10),q.appendSB(y),p.remove(u--),7>x&&(A[x++]=D),5>n&&(l[n++]=D));u=2==C?j.getIndex():-1;if(1<w||h||0>u||JS.SmilesSearch.isRingBond(this.ringSets,f,u))n=-1;0>n&&(l=null);if(null!=s||"\x00"!=v)"\x00"!=v&&(s=""+v),a.append(s);c=null;if(!d&&(5==p.size()||6==p.size()))c=this.sortInorganic(b,p);for(u=0;u<p.size();u++)y=p.get(u),y!==t&&(D=y.getOtherAtomNode(b),d=this.getRingCache(f,D.getIndex(),this.htRings),s=JS.SmilesBond.getBondOrderString(y.order),
  z||(v=this.getBondStereochemistry(y,b),"\x00"!=v&&(s=""+v)),q.append(s),q.append(d),7>x&&(A[x++]=D),null!=l&&5>n&&(l[n++]=D));if(g&&2==x&&2==C&&3==j.getCovalentBondCount()){s=j.getEdges();for(n=0;n<s.length;n++)s[n].isCovalent()&&j.getBondedAtomIndex(n)!=f&&(A[x++]=this.atoms[j.getBondedAtomIndex(n)]);n=0}else null!=j&&7>x&&(A[x++]=j);g=b.getFormalCharge();p=b.getIsotopeNumber();d=b.getValence();u=b.getAtomName();e=L(b,JU.BNode)?b.getBioStructureTypeName():"";JU.Logger.debugging&&a.append("\n//* "+
  b+" *//\t");k&&0!=e.length&&0!=u.length?this.addBracketedBioName(a,b,"."+u):a.append(JS.SmilesAtom.getAtomLabel(m,p,d,g,w,h,null!=c?c:this.checkStereoPairs(b,f,A,x)));a.appendSB(q);if(null==t)return null;2==C&&(1==n||2==n)?(null==l[0]&&(l[0]=b),null==l[1]&&(l[1]=b)):l=null;this.prevSp2Atoms=l;this.prevAtom=b;return j},"JU.SB,JU.Node,~B,~B,~B");g(c$,"sortInorganic",function(a,b){for(var c=a.getIndex(),d=b.size(),e=new JU.Lst,f=new JU.Lst,k,j,h,g,l=new JU.BS,n=null,m=Array(6),n=!0,w="",p=0;p<d;p++)if(h=
  b.get(p),m[0]=k=h.getOtherAtomNode(a),0==p?w=this.addStereoCheck(c,m,0,""):n&&null!=this.addStereoCheck(c,m,0,w)&&(n=!1),!l.get(p)){l.set(p);for(var t=!1,q=p+1;q<d;q++)if(!l.get(q)&&(g=b.get(q),j=g.getOtherAtomNode(a),JS.SmilesSearch.isDiaxial(a,a,k,j,this.vTemp,-0.95))){e.addLast([h,g]);t=!0;l.set(q);break}t||f.addLast(h)}c=e.size();if(n||6==d&&3!=c||5==d&&0==c)return"";n=e.get(0);h=n[0];m[0]=h.getOtherAtomNode(a);b.clear();b.addLast(h);1<c&&f.addLast(e.get(1)[0]);3==c&&f.addLast(e.get(2)[0]);1<
  c&&f.addLast(e.get(1)[1]);3==c&&f.addLast(e.get(2)[1]);for(p=0;p<f.size();p++)h=f.get(p),b.addLast(h),m[p+1]=h.getOtherAtomNode(a);b.addLast(n[1]);return JS.SmilesGenerator.getStereoFlag(a,m,d,this.vTemp)},"JU.Node,JU.Lst");g(c$,"checkStereoPairs",function(a,b,c,d){if(4>d)return"";if(4==d&&6==a.getElementNumber())for(var e="",f=0;4>f;f++)if(null==(e=this.addStereoCheck(b,c,f,e))){d=10;break}return 6<d?"":JS.SmilesGenerator.getStereoFlag(a,c,d,this.vTemp)},"JU.Node,~N,~A,~N");c$.getStereoFlag=g(c$,
  "getStereoFlag",function(a,b,c,d){var e=b[0],f=b[1],k=b[2],j=b[3],h=b[4];b=b[5];var g=4;switch(c){default:case 5:case 6:return JS.SmilesSearch.checkStereochemistryAll(!1,a,g,1,e,f,k,j,h,b,d)?"@":"@@";case 2:case 4:if(null==k||null==j)break;c=JS.SmilesAromatic.getNormalThroughPoints(e,f,k,d.vTemp,d.vA,d.vB);if(0.2>Math.abs(JS.SmilesSearch.distanceToPlane(d.vTemp,c,j))){g=8;if(JS.SmilesSearch.checkStereochemistryAll(!1,a,g,1,e,f,k,j,h,b,d))return"@SP1";if(JS.SmilesSearch.checkStereochemistryAll(!1,
  a,g,2,e,f,k,j,h,b,d))return"@SP2";if(JS.SmilesSearch.checkStereochemistryAll(!1,a,g,3,e,f,k,j,h,b,d))return"@SP3"}else return JS.SmilesSearch.checkStereochemistryAll(!1,a,g,1,e,f,k,j,h,b,d)?"@":"@@"}return""},"JU.Node,~A,~N,JS.VTemp");g(c$,"addStereoCheck",function(a,b,c,d){var e=b[c].getAtomicAndIsotopeNumber(),f=b[c].getCovalentBondCount(),k=6==e&&!this.explicitH?b[c].getCovalentHydrogenCount():0;if(6==e?4!=f||3!=k:1<f)return d;e=";"+e+"/"+k+"/"+f+",";if(0<=d.indexOf(e)){if(3==k){for(e=k=0;e<f&&
  3>k;e++){var j=b[c].getBondedAtomIndex(e);j!=a&&(k+=this.atoms[j].getAtomicAndIsotopeNumber())}if(3<k)return d}return null}return d+e},"~N,~A,~N,~S");g(c$,"getRingCache",function(a,b,c){var d=JS.SmilesGenerator.getRingKey(a,b),e=c.get(d),e=null==e?null:e[0];null==e?(c.put(d,[e=JS.SmilesParser.getRingPointer(++this.nPairs),Integer.$valueOf(b)]),JU.Logger.debugging&&JU.Logger.debug("adding for "+a+" ring key "+this.nPairs+": "+d)):(c.remove(d),JU.Logger.debugging&&JU.Logger.debug("using ring key "+
  d));return e},"~N,~N,java.util.Map");g(c$,"dumpRingKeys",function(a,b){JU.Logger.info(a.toString()+"\n\n");for(var c,d=b.keySet().iterator();d.hasNext()&&((c=d.next())||1);)JU.Logger.info("unmatched ring key: "+c)},"JU.SB,java.util.Map");c$.getRingKey=g(c$,"getRingKey",function(a,b){return Math.min(a,b)+"_"+Math.max(a,b)},"~N,~N")});B("JS");E(null,"JS.SmilesAromatic",["JU.BS","$.V3"],function(){c$=N(JS,"SmilesAromatic");c$.isFlatSp2Ring=g(c$,"isFlatSp2Ring",function(a,b,c,d){for(var e=c.nextSetBit(0);0<=
  e;e=c.nextSetBit(e+1)){var f=a[e],k=f.getEdges();if(!(3>k.length)&&3<k.length)return!1}if(3.4028235E38==d)return!0;0>=d&&(d=0.01);for(var j=new JU.V3,h=new JU.V3,g=new JU.V3,l=null,e=c.cardinality(),n=Array(2*e),m=0,w=1-5*d,e=c.nextSetBit(0);0<=e;e=c.nextSetBit(e+1)){for(var f=a[e],k=f.getEdges(),p=-1,t=-1,q=-1,k=k.length;0<=--k;){var s=f.getBondedAtomIndex(k);b.get(s)&&(c.get(s)?0>t?t=s:q=s:p=s)}JS.SmilesAromatic.getNormalThroughPoints(a[t],a[e],a[q],j,h,g);null==l&&(l=new JU.V3);if(!JS.SmilesAromatic.addNormal(j,
  l,w))return!1;n[m++]=JU.V3.newV(j);if(0<=p){JS.SmilesAromatic.getNormalThroughPoints(a[t],a[p],a[q],j,h,g);if(!JS.SmilesAromatic.addNormal(j,l,w))return!1;n[m++]=JU.V3.newV(j)}}return JS.SmilesAromatic.checkStandardDeviation(n,l,m,d)},"~A,JU.BS,JU.BS,~N");c$.addNormal=g(c$,"addNormal",function(a,b,c){var d=b.dot(a);if(0!=d&&Math.abs(d)<c)return!1;0>d&&a.scale(-1);b.add(a);b.normalize();return!0},"JU.V3,JU.V3,~N");c$.checkStandardDeviation=g(c$,"checkStandardDeviation",function(a,b,c,d){for(var e=
  0,f=0,k=0;k<c;k++)var j=a[k].dot(b),e=e+j,f=f+j*j;e=Math.sqrt((f-e*e/c)/(c-1));return e<d},"~A,JU.V3,~N,~N");c$.getNormalThroughPoints=g(c$,"getNormalThroughPoints",function(a,b,c,d,e,f){e.sub2(b,a);f.sub2(c,a);d.cross(e,f);d.normalize();e.setT(a);return-e.dot(d)},"JU.Node,JU.Node,JU.Node,JU.V3,JU.V3,JU.V3");c$.checkAromaticDefined=g(c$,"checkAromaticDefined",function(a,b){for(var c=new JU.BS,d=b.nextSetBit(0);0<=d;d=b.nextSetBit(d+1))for(var e=a[d].getEdges(),f=0;f<e.length;f++)switch(e[f].order){case 515:case 514:case 513:c.set(e[f].getAtomIndex1()),
  c.set(e[f].getAtomIndex2())}return c},"~A,JU.BS");c$.checkAromaticStrict=g(c$,"checkAromaticStrict",function(a,b,c,d){for(var e=new JU.BS,f=new JU.BS,k=c.size();0<=--k;){var j=c.get(k);JS.SmilesAromatic.isAromaticRing(b,f,j,5)&&JS.SmilesAromatic.checkAromaticStrict2(a,e,c,d,j,!0)}for(k=d.size();0<=--k;)j=d.get(k),JS.SmilesAromatic.isAromaticRing(b,f,j,6)&&JS.SmilesAromatic.checkAromaticStrict2(a,e,c,d,j,!1);b.clearAll();b.or(e)},"~A,JU.BS,JU.Lst,JU.Lst");c$.isAromaticRing=g(c$,"isAromaticRing",function(a,
  b,c,d){b.clearAll();b.or(c);b.and(a);return b.cardinality()==d},"JU.BS,JU.BS,JU.BS,~N");c$.checkAromaticStrict2=g(c$,"checkAromaticStrict2",function(a,b,c,d,e,f){f=JS.SmilesAromatic.countInternalPairs(a,e,f)<<1;switch(f){case -3:break;default:for(var k=e.nextSetBit(0);0<=k;k=e.nextSetBit(k+1))for(var j=a[k].getEdges(),h=0;h<j.length;h++)if(2==j[h].order){var g=j[h].getOtherAtomNode(a[k]).getIndex();if(!e.get(g)){for(var l=!1,n=c.size();0<=--n&&!l;){var m=c.get(n);if(m.get(g)&&(b.get(g)||3==Math.abs(JS.SmilesAromatic.countInternalPairs(a,
  m,!0))))l=!0}for(n=d.size();0<=--n&&!l;)if(m=d.get(n),m.get(g)&&(b.get(g)||3==Math.abs(JS.SmilesAromatic.countInternalPairs(a,m,!1))))l=!0;if(!l)return;f++}}}6==f&&b.or(e)},"~A,JU.BS,JU.Lst,JU.Lst,JU.BS,~B");c$.countInternalPairs=g(c$,"countInternalPairs",function(a,b,c){for(var d=0,e=0,f=0,k=b.nextSetBit(0);0<=k;k=b.nextSetBit(k+1)){for(var j=a[k],h=j.getEdges(),g=!1,l=0;l<h.length;l++){var n=h[l].getOtherAtomNode(j).getIndex();if(b.get(n))switch(h[l].order){case 514:case 513:case 515:e++;break;
  case 2:d++,g=!0}}if(c&&0==e)switch(j.getElementNumber()){case 7:case 8:case 16:g||f++}}return 0==e?O(d/2)+f:e==(c?5:6)?-3:0},"~A,JU.BS,~B")});B("JS");E(["JU.P3","JU.BNode"],"JS.SmilesAtom",["JU.AU","JU.Elements","$.Logger"],function(){c$=G(function(){this.atomsOr=null;this.nAtomsOr=0;this.primitives=null;this.index=this.nPrimitives=0;this.residueChar=this.residueName=this.atomName=null;this.isBioAtom=!1;this.bioType="\x00";this.$isLeadAtom=!1;this.notBondedIndex=-1;this.notCrossLinked=!1;this.aromaticAmbiguous=
  !0;this.atomType=null;this.covalentHydrogenCount=-1;this.hasSymbol=this.selected=this.not=!1;this.isFirst=!0;this.jmolIndex=-1;this.elementNumber=-2;this.implicitHydrogenCount=this.missingHydrogenCount=-2147483648;this.bonds=this.parent=null;this.iNested=this.bondCount=0;this.charge=this.atomicMass=-2147483648;this.matchingAtom=-1;this.chiralOrder=this.chiralClass=-2147483648;this.$isAromatic=!1;this.atomSite=this.component=0;this.nonhydrogenDegree=this.degree=-1;this.valence=0;this.connectivity=
  -1;this.ringSize=this.ringMembership=-2147483648;this.ringConnectivity=-1;F(this,arguments)},JS,"SmilesAtom",JU.P3,JU.BNode);K(c$,function(){this.bonds=Array(4)});c$.getChiralityClass=g(c$,"getChiralityClass",function(a){return O(("0;11;AL;33;TH;TP;OH;77;SP;".indexOf(a)+1)/3)},"~S");c$.allowSmilesUnbracketed=g(c$,"allowSmilesUnbracketed",function(a){return 0<="B, C, N, O, P, S, F, Cl, Br, I,".indexOf(a+",")},"~S");g(c$,"setBioAtom",function(a){this.isBioAtom="\x00"!=a;this.bioType=a;null!=this.parent&&
  (this.parent.bioType=a,this.parent.isBioAtom=this.isBioAtom)},"~S");g(c$,"setAtomName",function(a){null!=a&&(0<a.length&&(this.atomName=a),a.equals("0")&&(this.$isLeadAtom=!0),null!=this.parent&&(this.parent.atomName=a))},"~S");g(c$,"setBonds",function(a){this.bonds=a},"~A");g(c$,"addAtomOr",function(){null==this.atomsOr&&(this.atomsOr=Array(2));this.nAtomsOr>=this.atomsOr.length&&(this.atomsOr=JU.AU.doubleLength(this.atomsOr));var a=(new JS.SmilesAtom).setIndex(this.index);a.parent=this;this.atomsOr[this.nAtomsOr]=
  a;this.nAtomsOr++;return a});g(c$,"addPrimitive",function(){null==this.primitives&&(this.primitives=Array(2));if(this.nPrimitives>=this.primitives.length){var a=Array(2*this.primitives.length);System.arraycopy(this.primitives,0,a,0,this.primitives.length);this.primitives=a}a=(new JS.SmilesAtom).setIndex(this.index);a.parent=this;this.primitives[this.nPrimitives]=a;this.setSymbol("*");this.hasSymbol=!1;this.nPrimitives++;return a});m(c$,"toString",function(){var a=null!=this.residueChar||null!=this.residueName?
  (null==this.residueChar?this.residueName:this.residueChar)+"."+this.atomName:-1==this.elementNumber?"A":-2==this.elementNumber?"*":JU.Elements.elementSymbolFromNumber(this.elementNumber);this.$isAromatic&&(a=a.toLowerCase());return"["+a+"."+this.index+(0<=this.matchingAtom?"("+this.matchingAtom+")":"")+"]"});g(c$,"setIndex",function(a){this.index=a;return this},"~N");g(c$,"setAll",function(a,b,c,d,e){this.component=a;this.index=b;this.atomSite=c;this.elementNumber=d;this.charge=e;return this},"~N,~N,~N,~N,~N");
  g(c$,"setHydrogenCount",function(){if(-2147483648!=this.missingHydrogenCount)return!0;var a=JS.SmilesAtom.getDefaultCount(this.elementNumber,this.$isAromatic);if(-2==a)return!1;if(-1==a)return!0;7==this.elementNumber&&this.$isAromatic&&2==this.bondCount&&1==this.bonds[0].order&&1==this.bonds[1].order&&a++;for(var b=0;b<this.bondCount;b++)switch(this.bonds[b].order){case 81:7==this.elementNumber&&JU.Logger.info("Ambiguous bonding to aromatic N found -- MF may be in error");a-=1;break;case 1:case 257:case 513:a-=
  1;break;case 2:a-=this.$isAromatic&&6==this.elementNumber?1:2;break;case 3:a-=3}0<a&&(this.missingHydrogenCount=a);return!0},"JS.SmilesSearch");c$.getDefaultCount=g(c$,"getDefaultCount",function(a,b){switch(a){case 0:case -1:return-1;case 6:return b?3:4;case 8:case 16:return 2;case 7:return b?2:3;case 5:case 15:return 3;case 9:case 17:case 35:case 53:return 1}return-2},"~N,~B");m(c$,"getIndex",function(){return this.index});g(c$,"isAromatic",function(){return this.$isAromatic});g(c$,"setSymbol",function(a){this.$isAromatic=
  a.equals(a.toLowerCase());this.hasSymbol=!0;if(a.equals("*"))return this.$isAromatic=!1,this.elementNumber=-2,!0;if(a.equals("Xx"))return this.elementNumber=0,!0;this.aromaticAmbiguous=!1;if(a.equals("a")||a.equals("A"))return 0>this.elementNumber&&(this.elementNumber=-1),!0;this.$isAromatic&&(a=a.substring(0,1).toUpperCase()+(1==a.length?"":a.substring(1)));this.elementNumber=JU.Elements.elementNumberFromSymbol(a,!0);return 0!=this.elementNumber},"~S");m(c$,"getElementNumber",function(){return this.elementNumber});
  g(c$,"getAtomicMass",function(){return this.atomicMass});g(c$,"setAtomicMass",function(a){this.atomicMass=a},"~N");g(c$,"getCharge",function(){return this.charge});g(c$,"setCharge",function(a){this.charge=a},"~N");g(c$,"getMatchingAtom",function(){return this.matchingAtom});g(c$,"setMatchingAtom",function(a){this.matchingAtom=a},"~N");g(c$,"getChiralClass",function(){return this.chiralClass});g(c$,"setChiralClass",function(a){this.chiralClass=a},"~N");g(c$,"getChiralOrder",function(){return this.chiralOrder});
  g(c$,"setChiralOrder",function(a){this.chiralOrder=a},"~N");g(c$,"setExplicitHydrogenCount",function(a){this.missingHydrogenCount=a},"~N");g(c$,"setImplicitHydrogenCount",function(a){this.implicitHydrogenCount=a},"~N");g(c$,"setDegree",function(a){this.degree=a},"~N");g(c$,"setNonhydrogenDegree",function(a){this.nonhydrogenDegree=a},"~N");g(c$,"setValence",function(a){this.valence=a},"~N");g(c$,"setConnectivity",function(a){this.connectivity=a},"~N");g(c$,"setRingMembership",function(a){this.ringMembership=
  a},"~N");g(c$,"setRingSize",function(a){this.ringSize=a},"~N");g(c$,"setRingConnectivity",function(a){this.ringConnectivity=a},"~N");m(c$,"getModelIndex",function(){return this.component});m(c$,"getAtomSite",function(){return this.atomSite});m(c$,"getImplicitHydrogenCount",function(){return 0});g(c$,"getExplicitHydrogenCount",function(){return this.missingHydrogenCount});m(c$,"getFormalCharge",function(){return this.charge});m(c$,"getIsotopeNumber",function(){return this.atomicMass});m(c$,"getAtomicAndIsotopeNumber",
  function(){return JU.Elements.getAtomicAndIsotopeNumber(this.elementNumber,this.atomicMass)});m(c$,"getAtomName",function(){return null==this.atomName?"":this.atomName});m(c$,"getGroup3",function(){return null==this.residueName?"":this.residueName},"~B");m(c$,"getGroup1",function(){return null==this.residueChar?"":this.residueChar},"~S");g(c$,"addBond",function(a){this.bondCount>=this.bonds.length&&(this.bonds=JU.AU.doubleLength(this.bonds));this.bonds[this.bondCount]=a;this.bondCount++},"JS.SmilesBond");
  g(c$,"setBondArray",function(){this.bonds.length>this.bondCount&&(this.bonds=JU.AU.arrayCopyObject(this.bonds,this.bondCount));null!=this.atomsOr&&this.atomsOr.length>this.nAtomsOr&&(this.atomsOr=JU.AU.arrayCopyObject(this.atomsOr,this.atomsOr.length));null!=this.primitives&&this.primitives.length>this.nPrimitives&&(this.primitives=JU.AU.arrayCopyObject(this.primitives,this.primitives.length));for(var a=0;a<this.bonds.length;a++)this.isBioAtom&&17==this.bonds[a].order&&(this.bonds[a].order=112),this.bonds[a].getAtom1().index>
  this.bonds[a].getAtom2().index&&this.bonds[a].switchAtoms()});m(c$,"getEdges",function(){return null!=this.parent?this.parent.getEdges():this.bonds});g(c$,"getBond",function(a){return null!=this.parent?this.parent.getBond(a):0<=a&&a<this.bondCount?this.bonds[a]:null},"~N");m(c$,"getCovalentBondCount",function(){return this.getBondCount()});g(c$,"getBondCount",function(){return null!=this.parent?this.parent.getCovalentBondCount():this.bondCount});g(c$,"getMatchingBondedAtom",function(a){if(null!=this.parent)return this.parent.getMatchingBondedAtom(a);
  if(a>=this.bondCount)return-1;a=this.bonds[a];return(a.getAtom1()===this?a.getAtom2():a.getAtom1()).matchingAtom},"~N");m(c$,"getBondedAtomIndex",function(a){return null!=this.parent?this.parent.getBondedAtomIndex(a):this.bonds[a].getOtherAtom(this).index},"~N");m(c$,"getCovalentHydrogenCount",function(){if(0<=this.covalentHydrogenCount)return this.covalentHydrogenCount;if(null!=this.parent)return this.parent.getCovalentHydrogenCount();for(var a=this.covalentHydrogenCount=0;a<this.bonds.length;a++)1==
  this.bonds[a].getOtherAtom(this).elementNumber&&this.covalentHydrogenCount++;return this.covalentHydrogenCount});m(c$,"getValence",function(){if(null!=this.parent)return this.parent.getValence();var a=this.valence;if(0>=a&&null!=this.bonds)for(var b=this.bonds.length;0<=--b;)a+=this.bonds[b].getValence();return this.valence=a});g(c$,"getBondTo",function(a){if(null!=this.parent)return this.parent.getBondTo(a);for(var b,c=0;c<this.bonds.length;c++)if(null!=(b=this.bonds[c]))if(null==a?b.getAtom2()===
  this:b.getOtherAtom(this)===a)return b;return null},"JS.SmilesAtom");g(c$,"getBondNotTo",function(a,b){for(var c,d=0;d<this.bonds.length;d++)if(null!=(c=this.bonds[d])){var e=c.getOtherAtom(this);if(a!==e&&(b||1!=e.elementNumber))return c}return null},"JS.SmilesAtom,~B");m(c$,"isLeadAtom",function(){return this.$isLeadAtom});m(c$,"getOffsetResidueAtom",function(){if(this.isBioAtom)for(var a=0;a<this.bonds.length;a++)if(this.bonds[a].getAtomIndex1()==this.index&&96==this.bonds[a].order)return this.bonds[a].getOtherAtom(this).index;
  return-1},"~S,~N");m(c$,"getGroupBits",function(a){a.set(this.index)},"JU.BS");m(c$,"isCrossLinked",function(a){return this.getBondTo(a).isHydrogen()},"JU.BNode");m(c$,"getCrossLinkLeadAtomIndexes",function(a){for(var b=0;b<this.bonds.length;b++)112==this.bonds[b].order&&a.addLast(Integer.$valueOf(this.bonds[b].getOtherAtom(this).index));return!0},"JU.Lst");m(c$,"getBioStructureTypeName",function(){return null});m(c$,"getResno",function(){return 0});m(c$,"getChainID",function(){return 0});m(c$,"getChainIDStr",
  function(){return""});c$.getAtomLabel=g(c$,"getAtomLabel",function(a,b,c,d,e,f,k){var j=JU.Elements.elementSymbolFromNumber(a);f&&(j=j.toLowerCase(),6!=a&&(c=2147483647));return(0<k.length||0!=b||0!=d?-1:JS.SmilesAtom.getDefaultCount(a,!1))==c?j:"["+(0>=b?"":""+b)+j+(0>d?""+d:0<d?"+"+d:"")+k+(1<e?"H"+e:1==e?"H":"")+"]"},"~N,~N,~N,~N,~N,~B,~S");m(c$,"isDna",function(){return"d"==this.bioType});m(c$,"isRna",function(){return"r"==this.bioType});m(c$,"isNucleic",function(){return"n"==this.bioType||"r"==
  this.bioType||"d"==this.bioType});m(c$,"isProtein",function(){return"p"==this.bioType});m(c$,"isPurine",function(){return null!=this.residueChar&&this.isNucleic()&&0<="AG".indexOf(this.residueChar)});m(c$,"isPyrimidine",function(){return null!=this.residueChar&&this.isNucleic()&&0<="CTUI".indexOf(this.residueChar)});m(c$,"isDeleted",function(){return!1});g(c$,"setAtomType",function(a){this.atomType=a},"~S");m(c$,"getAtomType",function(){return null==this.atomType?this.atomName:this.atomType});m(c$,
  "findAtomsLike",function(){return null},"~S");I(c$,"STEREOCHEMISTRY_DEFAULT",0,"STEREOCHEMISTRY_ALLENE",2,"STEREOCHEMISTRY_TETRAHEDRAL",4,"STEREOCHEMISTRY_TRIGONAL_BIPYRAMIDAL",5,"STEREOCHEMISTRY_OCTAHEDRAL",6,"STEREOCHEMISTRY_SQUARE_PLANAR",8,"UNBRACKETED_SET","B, C, N, O, P, S, F, Cl, Br, I,")});B("JS");E(["JU.Edge"],"JS.SmilesBond",["JS.InvalidSmilesException"],function(){c$=G(function(){this.atom2=this.atom1=null;this.isNot=!1;this.primitives=this.matchingBond=null;this.nPrimitives=0;this.bondsOr=
  null;this.nBondsOr=0;F(this,arguments)},JS,"SmilesBond",JU.Edge);c$.getBondOrderString=g(c$,"getBondOrderString",function(a){switch(a){case 1:return"";case 2:return"=";case 3:return"#";default:return""}},"~N");g(c$,"set",function(a){this.order=a.order;this.isNot=a.isNot;this.primitives=a.primitives;this.nPrimitives=a.nPrimitives;this.bondsOr=a.bondsOr;this.nBondsOr=a.nBondsOr},"JS.SmilesBond");g(c$,"addBondOr",function(){null==this.bondsOr&&(this.bondsOr=Array(2));if(this.nBondsOr>=this.bondsOr.length){var a=
  Array(2*this.bondsOr.length);System.arraycopy(this.bondsOr,0,a,0,this.bondsOr.length);this.bondsOr=a}a=new JS.SmilesBond(null,null,-1,!1);this.bondsOr[this.nBondsOr]=a;this.nBondsOr++;return a});g(c$,"addPrimitive",function(){null==this.primitives&&(this.primitives=Array(2));if(this.nPrimitives>=this.primitives.length){var a=Array(2*this.primitives.length);System.arraycopy(this.primitives,0,a,0,this.primitives.length);this.primitives=a}a=new JS.SmilesBond(null,null,-1,!1);this.primitives[this.nPrimitives]=
  a;this.nPrimitives++;return a});m(c$,"toString",function(){return this.atom1+" -"+(this.isNot?"!":"")+this.order+"- "+this.atom2});M(c$,function(a,b,c,d){Q(this,JS.SmilesBond,[]);this.set2(c,d);this.set2a(a,b)},"JS.SmilesAtom,JS.SmilesAtom,~N,~B");g(c$,"set2",function(a,b){this.order=a;this.isNot=b},"~N,~B");g(c$,"set2a",function(a,b){null!=a&&(this.atom1=a,a.addBond(this));null!=b&&(this.atom2=b,b.isFirst=!1,b.addBond(this))},"JS.SmilesAtom,JS.SmilesAtom");c$.isBondType=g(c$,"isBondType",function(a,
  b,c){if(0>"-=#:/\\.+!,&;@~^'".indexOf(a))return!1;if(!b&&0>"-=#:/\\.~^'".indexOf(a))throw new JS.InvalidSmilesException("SMARTS bond type "+a+" not allowed in SMILES");return c&&"~"==a?!1:!0},"~S,~B,~B");c$.getBondTypeFromCode=g(c$,"getBondTypeFromCode",function(a){switch(a){case ".":return 0;case "-":return 1;case "=":return 2;case "#":return 3;case ":":return 17;case "/":return 257;case "\\":return 513;case "^":return 769;case "'":return 1025;case "@":return 65;case "~":return 81;case "+":return 96}return-1},
  "~S");g(c$,"getAtom1",function(){return this.atom1});g(c$,"getAtom2",function(){return this.atom2});g(c$,"setAtom2",function(a){this.atom2=a;null!=this.atom2&&a.addBond(this)},"JS.SmilesAtom");g(c$,"getBondType",function(){return this.order});g(c$,"getOtherAtom",function(a){return this.atom1===a?this.atom2:this.atom1},"JS.SmilesAtom");m(c$,"getAtomIndex1",function(){return this.atom1.index});m(c$,"getAtomIndex2",function(){return this.atom2.index});m(c$,"getCovalentOrder",function(){return this.order});
  m(c$,"getOtherAtomNode",function(a){return a===this.atom1?this.atom2:a===this.atom2?this.atom1:null},"JU.Node");m(c$,"isCovalent",function(){return 112!=this.order});g(c$,"getValence",function(){return this.order&7});m(c$,"isHydrogen",function(){return 112==this.order});g(c$,"switchAtoms",function(){var a=this.atom1;this.atom1=this.atom2;this.atom2=a;switch(this.order){case 769:this.order=1025;break;case 1025:this.order=769;break;case 257:this.order=513;break;case 513:this.order=257}});I(c$,"TYPE_UNKNOWN",
  -1,"TYPE_NONE",0,"TYPE_SINGLE",1,"TYPE_DOUBLE",2,"TYPE_TRIPLE",3,"TYPE_AROMATIC",17,"TYPE_DIRECTIONAL_1",257,"TYPE_DIRECTIONAL_2",513,"TYPE_ATROPISOMER_1",769,"TYPE_ATROPISOMER_2",1025,"TYPE_RING",65,"TYPE_ANY",81,"TYPE_BIO_SEQUENCE",96,"TYPE_BIO_PAIR",112,"TYPE_MULTIPLE",999)});B("JS");c$=G(function(){this.search=null;this.index=this.type=this.nPoints=0;this.isNot=!1;this.indices=null;this.max=this.min=0;this.points=null;F(this,arguments)},JS,"SmilesMeasure");K(c$,function(){this.indices=v(4,0);
  this.points=Array(4)});M(c$,function(a,b,c,d,e,f){this.search=a;this.type=Math.min(4,Math.max(c,2));this.index=b;this.min=Math.min(d,e);this.max=Math.max(d,e);this.isNot=f},"JS.SmilesSearch,~N,~N,~N,~N,~B");m(c$,"toString",function(){for(var a="(."+"__dat".charAt(this.type)+this.index+":"+this.min+","+this.max+") for",b=0;b<this.type;b++)a+=" "+(b>=this.nPoints?"?":""+this.indices[b]);return a});g(c$,"addPoint",function(a){if(this.nPoints==this.type)return!1;if(0==this.nPoints)for(var b=1;b<this.type;b++)this.indices[b]=
  a+b;this.indices[this.nPoints++]=a;return!0},"~N");g(c$,"check",function(){for(var a=0;a<this.type;a++){var b=this.search.patternAtoms[this.indices[a]].getMatchingAtom();this.points[a]=this.search.jmolAtoms[b]}a=0;switch(this.type){case 2:a=this.points[0].distance(this.points[1]);break;case 3:this.search.v.vA.sub2(this.points[0],this.points[1]);this.search.v.vB.sub2(this.points[2],this.points[1]);a=this.search.v.vA.angle(this.search.v.vB)/0.017453292;break;case 4:JS.SmilesMeasure.setTorsionData(this.points[0],
  this.points[1],this.points[2],this.points[3],this.search.v,!0),a=this.search.v.vTemp1.angle(this.search.v.vTemp2)/0.017453292*(0>this.search.v.vNorm1.dot(this.search.v.vNorm2)?1:-1)}return(a<this.min||a>this.max)==this.isNot});c$.setTorsionData=g(c$,"setTorsionData",function(a,b,c,d,e,f){e.vTemp1.sub2(a,b);e.vTemp2.sub2(d,c);f&&(e.vNorm1.sub2(b,c),e.vNorm1.normalize(),e.vTemp1.cross(e.vTemp1,e.vNorm1),e.vTemp1.normalize(),e.vTemp2.cross(e.vTemp2,e.vNorm1),e.vTemp2.normalize(),e.vNorm2.cross(e.vTemp1,
  e.vTemp2))},"JU.P3,JU.P3,JU.P3,JU.P3,JS.VTemp,~B");I(c$,"TYPES","__dat","radiansPerDegree",0.017453292519943295);B("JS");E(["java.util.Hashtable"],"JS.SmilesParser","java.lang.Character JU.Lst $.PT $.SB JS.InvalidSmilesException $.SmilesAtom $.SmilesBond $.SmilesMeasure $.SmilesSearch JU.Elements $.Logger".split(" "),function(){c$=G(function(){this.isBioSequence=this.isSmarts=!1;this.bioType="\x00";this.ringBonds=null;this.flags=this.branchLevel=this.braceCount=0;this.htMeasures=null;F(this,arguments)},
  JS,"SmilesParser");K(c$,function(){this.ringBonds=new java.util.Hashtable;this.htMeasures=new java.util.Hashtable});c$.getMolecule=g(c$,"getMolecule",function(a,b){return(new JS.SmilesParser(b)).parse(a)},"~S,~B");M(c$,function(a){this.isSmarts=a},"~B");g(c$,"reset",function(){this.branchLevel=this.braceCount=0});g(c$,"parse",function(a){if(null==a)throw new JS.InvalidSmilesException("SMILES expressions must not be null");var b=new JS.SmilesSearch;0<=a.indexOf("$(select")&&(a=this.parseNested(b,a,
  "select"));for(a=JS.SmilesParser.cleanPattern(a);a.startsWith("/");){var c=JS.SmilesParser.getSubPattern(a,0,"/").toUpperCase();a=a.substring(c.length);this.flags=0;0<=c.indexOf("NOAROMATIC")&&(this.flags|=1);0<=c.indexOf("AROMATICSTRICT")&&(this.flags|=4);0<=c.indexOf("AROMATICDEFINED")&&(this.flags|=8);0<=c.indexOf("AROMATICDOUBLE")&&(this.flags|=16);0<=c.indexOf("NOSTEREO")&&(this.flags|=2)}0<=a.indexOf("$")&&(a=this.parseVariables(a));this.isSmarts&&0<=a.indexOf("[$")&&(a=this.parseVariableLength(a));
  if(0<=a.indexOf("||")){a=JU.PT.split(a,"||");c="";b.subSearches=Array(a.length);for(var d=0;d<a.length;d++){var e="|"+a[d]+"|";0>c.indexOf(e)&&(b.subSearches[d]=this.getSearch(b,a[d],this.flags),c+=e)}JU.Logger.info(c);return b}return this.getSearch(b,a,this.flags)},"~S");g(c$,"parseVariableLength",function(a){for(var b=new JU.SB,c=a.length-1,d=0,e=!1,f=0;f<c;f++)switch(a.charAt(f)){case "(":d++;break;case ")":d--;break;case "|":0<d&&(e=!0,"|"==a.charAt(f+1)&&(a=a.substring(0,f)+a.substring(f+1),
  c--))}if(0<=a.indexOf("||")){c=JU.PT.split(a,"||");for(f=0;f<c.length;f++)b.append("||").append(this.parseVariableLength(c[f]))}else{c=-1;d=v(1,0);for(f=null;0<=(c=a.indexOf("[$",c+1));){var k=c,j=-2147483648,h=-2147483648,c=JS.SmilesParser.getDigits(a,c+2,d),j=d[0];-2147483648!=j&&"-"==JS.SmilesParser.getChar(a,c)&&(c=JS.SmilesParser.getDigits(a,c+1,d),h=d[0]);if("("==JS.SmilesParser.getChar(a,c)&&(f=JS.SmilesParser.getSubPattern(a,k,"["),f.endsWith(")"))){var g=k+f.length+2,l=JS.SmilesParser.getSubPattern(a,
  c,"("),n=c;JS.SmilesParser.getSubPattern(a,c,"[");c+=1+l.length;if(0<=l.indexOf(":")&&0>l.indexOf("|")){for(var m=0,w=l.length,p=-1,f=0;f<w;f++)switch(l.charAt(f)){case "[":case "(":m++;break;case ")":case "]":m--;break;case ".":0<=p&&0==m&&(w=f);break;case ":":0>p&&0==m&&(p=f)}0<p&&(l=l.substring(0,p)+"("+l.substring(p,w)+")"+l.substring(w))}if(-2147483648==j){if(f=l.indexOf("|"),0<=f)return this.parseVariableLength(a.substring(0,k)+"[$1"+a.substring(n,n+f+1)+")]"+a.substring(g)+"||"+a.substring(0,
  k)+"[$1("+a.substring(n+f+2)+a.substring(g))}else{-2147483648==h&&(h=j);0<=l.indexOf("|")&&(l="[$("+l+")]");for(f=j;f<=h;f++){j=new JU.SB;j.append("||").append(a.substring(0,k));for(n=0;n<f;n++)j.append(l);j.append(a.substring(g));b.appendSB(j)}}}}}return e?this.parseVariableLength(b.substring(2)):2>b.length()?a:b.substring(2)},"~S");g(c$,"getSearch",function(a,b,c){this.htMeasures=new java.util.Hashtable;var d=new JS.SmilesSearch;d.setTop(a);d.isSmarts=this.isSmarts;d.pattern=b;d.flags=c;0<=b.indexOf("$(")&&
  (b=this.parseNested(d,b,""));this.parseSmiles(d,b,null,!1);if(0!=this.braceCount)throw new JS.InvalidSmilesException("unmatched '{'");if(!this.ringBonds.isEmpty())throw new JS.InvalidSmilesException("Open ring");d.setAtomArray();for(a=d.ac;0<=--a;)if(b=d.patternAtoms[a],b.setBondArray(),!this.isSmarts&&"\x00"==b.bioType&&!b.setHydrogenCount(d))throw new JS.InvalidSmilesException("unbracketed atoms must be one of: B, C, N, O, P, S, F, Cl, Br, I,");if(this.isSmarts)for(a=d.ac;0<=--a;){b=d.patternAtoms[a];
  this.checkNested(d,b,c);for(var e=0;e<b.nAtomsOr;e++)this.checkNested(d,b.atomsOr[e],c);for(e=0;e<b.nPrimitives;e++)this.checkNested(d,b.primitives[e],c)}!this.isSmarts&&!this.isBioSequence&&(d.elementCounts[1]=d.getMissingHydrogenCount());this.fixChirality(d);return d},"JS.SmilesSearch,~S,~N");g(c$,"checkNested",function(a,b,c){if(0<b.iNested){var d=a.getNested(b.iNested);L(d,String)&&!d.startsWith("select")&&("~"!=d.charAt(0)&&"\x00"!=b.bioType&&(d="~"+b.bioType+"~"+d),c=this.getSearch(a,d,c),0<
  c.ac&&c.patternAtoms[0].selected&&(b.selected=!0),a.setNested(b.iNested,c))}},"JS.SmilesSearch,JS.SmilesAtom,~N");g(c$,"fixChirality",function(a){for(var b=a.ac;0<=--b;){var c=a.patternAtoms[b],d=c.getChiralClass();if(-2147483648!=d){var e=c.missingHydrogenCount;0>e&&(e=0);e+=c.getBondCount();switch(d){case 0:switch(e){case 2:d=3==c.getValence()?3:2;break;case 3:case 4:case 5:case 6:d=e}break;case 8:4!=e&&(d=0);break;case 2:case 6:case 4:case 5:e!=d&&(d=0)}if(0==d)throw new JS.InvalidSmilesException("Incorrect number of bonds for stereochemistry descriptor");
  c.setChiralClass(d)}}},"JS.SmilesSearch");g(c$,"parseSmiles",function(a,b,c,d){for(var e=v(1,0),f=0,k,j=null;null!=b&&0!=b.length;){var h=0;if(null==c||null!=j&&0==j.order)this.isBioSequence&&(a.top.needAromatic=!1),h=this.checkBioType(b,0);k=JS.SmilesParser.getChar(b,h);var g=this.checkBrace(a,k,"{");g&&(k=JS.SmilesParser.getChar(b,++h));if("("==k){d="."==JS.SmilesParser.getChar(b,h+1);if(null==c)throw new JS.InvalidSmilesException("No previous atom for "+(d?"measure":"branch"));h=JS.SmilesParser.getSubPattern(b,
  h,"(");h.startsWith(".")?this.parseMeasure(a,h.substring(1),c):0==h.length&&this.isBioSequence?c.notCrossLinked=!0:(this.branchLevel++,this.parseSmiles(a,h,c,!0),this.branchLevel--);h=h.length+2}else{for(f=h;JS.SmilesBond.isBondType(k,this.isSmarts,this.isBioSequence);)k=JS.SmilesParser.getChar(b,++h);j=this.parseBond(a,null,b.substring(f,h),null,c,!1,d);g&&-1!=j.order&&(h=f);k=JS.SmilesParser.getChar(b,h);this.checkBrace(a,k,"{")&&(k=JS.SmilesParser.getChar(b,++h));"~"==k&&0==j.order&&(h=this.checkBioType(b,
  h),k=JS.SmilesParser.getChar(b,h));if("\x00"==k&&0==j.order)break;f=JU.PT.isDigit(k)||"%"==k;g=!f&&("_"==k||"["==k||"*"==k||JU.PT.isLetter(k));if(f){switch(k){case "%":if("("==JS.SmilesParser.getChar(b,h+1)){if(f=JS.SmilesParser.getSubPattern(b,h+1,"("),JS.SmilesParser.getDigits(f,0,e),h+=f.length+3,0>e[0])throw new JS.InvalidSmilesException("Invalid ring designation: "+f);}else if(h+3<=b.length&&(h=JS.SmilesParser.getDigits(b.substring(0,h+3),h+1,e)),10>e[0])throw new JS.InvalidSmilesException("Two digits must follow the % sign");
  d=e[0];break;default:d=k.charCodeAt(0)-48,h++}this.parseRing(a,d,c,j)}else if(g)switch(k){case "[":case "_":f=JS.SmilesParser.getSubPattern(b,h,k);h+=f.length+("["==k?2:0);this.isBioSequence&&("["==k&&0>f.indexOf(".")&&0>f.indexOf("_"))&&(f+=".0");c=this.parseAtom(a,null,f,c,j,"["==k,!1,d);-1!=j.order&&0!=j.order&&j.set2a(null,c);break;default:f=!this.isBioSequence&&JU.PT.isUpperCase(k)?JS.SmilesParser.getChar(b,h+1):"\x00";if("X"!=k||"x"!=f)if(!JU.PT.isLowerCase(f)||0==JU.Elements.elementNumberFromSymbol(b.substring(h,
  h+2),!0))f="\x00";"\x00"!=f&&0<="NA CA BA PA SC AC".indexOf(b.substring(h,h+2))&&(f="\x00");k=JU.PT.isUpperCase(k)&&JU.PT.isLowerCase(f)?2:1;c=this.parseAtom(a,null,b.substring(h,h+k),c,j,!1,!1,d);h+=k}else throw new JS.InvalidSmilesException("Unexpected character: "+JS.SmilesParser.getChar(b,h));}k=JS.SmilesParser.getChar(b,h);"}"==k&&this.checkBrace(a,k,"}")&&h++;b=b.substring(h);d=!1}},"JS.SmilesSearch,~S,JS.SmilesAtom,~B");g(c$,"checkBioType",function(a,b){if(this.isBioSequence="~"==a.charAt(b)){b++;
  this.bioType="*";var c=JS.SmilesParser.getChar(a,2);if("~"==c&&("*"==(c=a.charAt(1))||JU.PT.isLowerCase(c)))this.bioType=c,b=3}return b},"~S,~N");g(c$,"parseMeasure",function(a,b,c){for(var d=b.indexOf(":"),e=!1,f=0>d?b:b.substring(0,d);0!=d;){1==f.length&&(f+="0");var k=this.htMeasures.get(f);if(null==k==0>d)break;try{if(0<d){var j="__dat".indexOf(f.charAt(0));if(2>j)break;var h=v(1,0),g=JS.SmilesParser.getDigits(f,1,h),l=b.indexOf(",",d);0>l&&(l=b.indexOf("-",d+1));if(0>l)break;var n=b.substring(d+
  1,l);n.startsWith("!")&&(e=!0,n=n.substring(1));var m=d+1==l?0:JU.PT.fVal(n),n=b.substring(l+1),w=0==n.length?3.4028235E38:JU.PT.fVal(n),k=new JS.SmilesMeasure(a,g,j,m,w,e);a.measures.addLast(k);0<g?this.htMeasures.put(f,k):0==g&&JU.Logger.debugging&&JU.Logger.debug("measure created: "+k)}else{if(!k.addPoint(c.index))break;k.nPoints==k.type&&(this.htMeasures.remove(f),JU.Logger.debugging&&JU.Logger.debug("measure created: "+k));return}if(!k.addPoint(c.index))break}catch(p){if(H(p,NumberFormatException))break;
  else throw p;}return}throw new JS.InvalidSmilesException("invalid measure: "+b);},"JS.SmilesSearch,~S,JS.SmilesAtom");g(c$,"checkBrace",function(a,b,c){switch(b){case "{":if(b!=c)break;this.braceCount++;return a.top.haveSelected=!0;case "}":if(b!=c)break;if(0<this.braceCount)return this.braceCount--,!0;break;default:return!1}throw new JS.InvalidSmilesException("Unmatched '}'");},"JS.SmilesSearch,~S,~S");g(c$,"parseNested",function(a,b,c){var d;for(c="$("+c;0<=(d=b.lastIndexOf(c));){var e=JS.SmilesParser.getSubPattern(b,
  d+1,"("),f=d+e.length+3;b=b.substring(0,d)+"_"+a.addNested(e)+"_"+b.substring(f)}return b},"JS.SmilesSearch,~S,~S");g(c$,"parseVariables",function(a){for(var b=new JU.Lst,c=new JU.Lst,d,e=0,f=-1;0<=(d=a.indexOf("$",e))&&"("!=JS.SmilesParser.getChar(a,e+1);){e=JS.SmilesParser.skipTo(a,d,"=");if(e<=d+1||'"'!=JS.SmilesParser.getChar(a,e+1))break;d=a.substring(d,e);if(0<d.lastIndexOf("$")||0<d.indexOf("]"))throw new JS.InvalidSmilesException("Invalid variable name: "+d);f=JS.SmilesParser.getSubPattern(a,
  e+1,'"');b.addLast("["+d+"]");c.addLast(f);e+=f.length+2;e=JS.SmilesParser.skipTo(a,e,";");f=++e}return 0>f?a:JU.PT.replaceStrings(a.substring(f),b,c)},"~S");g(c$,"parseAtom",function(a,b,c,d,e,f,k,j){if(null==c||0==c.length)throw new JS.InvalidSmilesException("Empty atom definition");var h=null==b?a.addAtom():k?b.addPrimitive():b.addAtomOr();0<this.braceCount&&(h.selected=!0);if(!this.checkLogic(a,c,h,null,d,k,j)){var g=v(1,0);this.isBioSequence&&1==c.length&&(c+=".0");var l=c.charAt(0),n=0,m=!1;
  if(this.isSmarts&&"!"==l){l=JS.SmilesParser.getChar(c,++n);if("\x00"==l)throw new JS.InvalidSmilesException("invalid '!'");h.not=m=!0}var w=-2147483648,p=c.indexOf(".");if(0<=p){l=c.substring(n,p);0==l.length&&(l="*");1<l.length?h.residueName=l.toUpperCase():l.equals("*")||(h.residueChar=l);l=c.substring(p+1).toUpperCase();if(0<=(p=l.indexOf("#")))JS.SmilesParser.getDigits(l,p+1,g),h.elementNumber=g[0],l=l.substring(0,p);0==l.length&&(l="*");l.equals("*")||h.setAtomName(l);l="\x00"}for(h.setBioAtom(this.bioType);"\x00"!=
  l;){h.setAtomName(this.isBioSequence?"0":"");if(JU.PT.isDigit(l)){n=JS.SmilesParser.getDigits(c,n,g);l=g[0];if(-2147483648==l)throw new JS.InvalidSmilesException("Non numeric atomic mass");"?"==JS.SmilesParser.getChar(c,n)&&(n++,l=-l);h.setAtomicMass(l)}else switch(l){case '"':l=JU.PT.getQuotedStringAt(c,n);n+=l.length+2;h.setAtomType(l);break;case "_":n=JS.SmilesParser.getDigits(c,n+1,g)+1;if(-2147483648==g[0])throw new JS.InvalidSmilesException("Invalid SEARCH primitive: "+c.substring(n));h.iNested=
  g[0];if(this.isBioSequence&&f&&n!=c.length)throw new JS.InvalidSmilesException("invalid characters: "+c.substring(n));break;case "=":n=JS.SmilesParser.getDigits(c,n+1,g);h.jmolIndex=g[0];break;case "#":n=JS.SmilesParser.getDigits(c,n+1,g);h.elementNumber=g[0];break;case "-":case "+":n=this.checkCharge(c,n,h);break;case "@":a.haveAtomStereochemistry=!0;n=this.checkChirality(c,n,a.patternAtoms[h.index]);break;default:var p=JS.SmilesParser.getChar(c,n+1),t=c.substring(n+1,n+(JU.PT.isLowerCase(p)&&(!f||
  !JU.PT.isDigit(JS.SmilesParser.getChar(c,n+2)))?2:1)),q=Character.toUpperCase(l)+t,s=!0;f&&JU.PT.isLetter(l)&&(!m&&(k?b:h).hasSymbol?s=!1:"H"==l?s=!JU.PT.isDigit(p)||"?"==JS.SmilesParser.getChar(c,n+2):0<="DdhRrvXx".indexOf(l)&&JU.PT.isDigit(p)?s=!1:!q.equals("A")&&!q.equals("Xx")&&(s=0<JU.Elements.elementNumberFromSymbol(q,!0),!s&&""!==t&&(t="",q=q.substring(0,1),s=0<JU.Elements.elementNumberFromSymbol(q,!0))));if(s){if(!f&&!this.isSmarts&&!this.isBioSequence&&!JS.SmilesAtom.allowSmilesUnbracketed(q)||
  !h.setSymbol(q=l+t))throw new JS.InvalidSmilesException("Invalid atom symbol: "+q);k&&(b.hasSymbol=!0);n+=q.length}else switch(n=JS.SmilesParser.getDigits(c,n+1,g),p=g[0],l){default:throw new JS.InvalidSmilesException("Invalid SEARCH primitive: "+c.substring(n));case "D":h.setDegree(-2147483648==p?1:p);break;case "d":h.setNonhydrogenDegree(-2147483648==p?1:p);break;case "H":w=-2147483648==p?1:p;break;case "h":h.setImplicitHydrogenCount(-2147483648==p?-1:p);break;case "R":-2147483648==p&&(p=-1);h.setRingMembership(p);
  a.top.needRingData=!0;break;case "r":if(-2147483648==p)p=-1,h.setRingMembership(p);else{h.setRingSize(p);switch(p){case 500:p=5;break;case 600:p=6}p>a.ringDataMax&&(a.ringDataMax=p)}a.top.needRingData=!0;break;case "v":h.setValence(-2147483648==p?1:p);break;case "X":h.setConnectivity(-2147483648==p?1:p);break;case "x":h.setRingConnectivity(-2147483648==p?-1:p),a.top.needRingData=!0}}l=JS.SmilesParser.getChar(c,n);if(m&&"\x00"!=l)throw new JS.InvalidSmilesException("'!' may only involve one primitive.");
  }-2147483648==w&&f&&(w=-2147483647);h.setExplicitHydrogenCount(w);a.patternAtoms[h.index].setExplicitHydrogenCount(w)}null!=d&&0==e.order&&(h.notBondedIndex=d.index);null!=d&&0!=e.order&&(-1==e.order&&(e.order=this.isBioSequence&&j?112:this.isSmarts||d.isAromatic()&&h.isAromatic()?81:1),f||e.set2a(null,h),0==this.branchLevel&&(17==e.order||112==e.order)&&this.branchLevel++);0==this.branchLevel&&(a.lastChainAtom=h);return h},"JS.SmilesSearch,JS.SmilesAtom,~S,JS.SmilesAtom,JS.SmilesBond,~B,~B,~B");
  g(c$,"parseRing",function(a,b,c,d){a=Integer.$valueOf(b);b=this.ringBonds.get(a);if(null==b)this.ringBonds.put(a,d);else{this.ringBonds.remove(a);switch(d.order){case -1:d.order=-1!=b.order?b.order:this.isSmarts||c.isAromatic()&&b.getAtom1().isAromatic()?81:1;break;case 257:d.order=513;break;case 513:d.order=257}if(-1!=b.order&&b.order!=d.order)throw new JS.InvalidSmilesException("Incoherent bond type for ring");b.set(d);c.bondCount--;b.setAtom2(c)}},"JS.SmilesSearch,~N,JS.SmilesAtom,JS.SmilesBond");
  g(c$,"checkCharge",function(a,b,c){var d=a.length,e=a.charAt(b),f=1;++b;if(b<d){var g=a.charAt(b);if(JU.PT.isDigit(g)){if(d=v(1,0),b=JS.SmilesParser.getDigits(a,b,d),f=d[0],-2147483648==f)throw new JS.InvalidSmilesException("Non numeric charge");}else for(;b<d&&a.charAt(b)==e;)b++,f++}c.setCharge("+"==e?f:-f);return b},"~S,~N,JS.SmilesAtom");g(c$,"checkChirality",function(a,b,c){var d=0,e=-2147483648,f=a.length,g,d=0,e=1;if(++b<f){switch(g=a.charAt(b)){case "@":e=2;b++;break;case "H":break;case "A":case "D":case "E":case "O":case "S":case "T":d=
  b+1<f?JS.SmilesAtom.getChiralityClass(a.substring(b,b+2)):-1;b+=2;break;default:e=JU.PT.isDigit(g)?1:-1}g=b;if(1==e){for(;g<f&&JU.PT.isDigit(a.charAt(g));)g++;if(g>b){try{e=Integer.parseInt(a.substring(b,g))}catch(j){if(H(j,NumberFormatException))e=-1;else throw j;}b=g}}if(1>e||0>d)throw new JS.InvalidSmilesException("Invalid stereochemistry descriptor");}c.setChiralClass(d);c.setChiralOrder(e);"?"==JS.SmilesParser.getChar(a,b)&&(JU.Logger.info("Ignoring '?' in stereochemistry"),b++);return b},"~S,~N,JS.SmilesAtom");
  g(c$,"parseBond",function(a,b,c,d,e,f,g){var j=JS.SmilesParser.getChar(c,0);if("."==j){if(null!=d||null!=b)throw new JS.InvalidSmilesException("invalid '.'");this.isBioSequence="~"==JS.SmilesParser.getChar(c,1);return new JS.SmilesBond(null,null,0,!1)}if("+"==j&&null!=b)throw new JS.InvalidSmilesException("invalid '+'");d=null==b?null==d?new JS.SmilesBond(e,null,this.isBioSequence&&null!=e?g?112:96:-1,!1):d:f?b.addPrimitive():b.addBondOr();if("\x00"!=j&&!this.checkLogic(a,c,null,d,e,f,!1)){if(f="!"==
  j)if(j=JS.SmilesParser.getChar(c,1),"\x00"==j||"!"==j)throw new JS.InvalidSmilesException("invalid '!'");c=JS.SmilesBond.getBondTypeFromCode(j);65==c&&(a.top.needRingMemberships=!0);if(null==e&&0!=c)throw new JS.InvalidSmilesException("Bond without a previous atom");switch(c){case 769:case 1025:f&&(f=!1,c=769==c?1025:769);a.haveBondStereochemistry=!0;break;case 257:case 513:a.haveBondStereochemistry=!0;break;case 2:case 1:e.isAromatic()&&(a.top.needRingData=!0)}d.set2(c,f);this.isBioSequence&&null!=
  b&&b.set2(c,f)}return d},"JS.SmilesSearch,JS.SmilesBond,~S,JS.SmilesBond,JS.SmilesAtom,~B,~B");g(c$,"checkLogic",function(a,b,c,d,e,f,g){for(var j=b.indexOf(","),h=b.length;;){var m=0<j;if(m&&!this.isSmarts||0==j)break;var l="",j=b.indexOf(";");if(0<=j){if(!this.isSmarts||0==j)break;l="&"+b.substring(j+1);b=b.substring(0,j);m||(b+=l,l="")}var n=0;if(m)for(b+=",";0<(j=b.indexOf(",",n))&&j<=h;){n=b.substring(n,j)+l;if(0==n.length)throw new JS.InvalidSmilesException("missing "+(null==d?"atom":"bond")+
  " token");null==d?this.parseAtom(a,c,n,null,null,!0,!1,g):this.parseBond(a,d,n,null,e,!1,!1);n=j+1}else if(0<=(j=b.indexOf("&"))||null!=d&&1<h&&!f){if(!this.isSmarts||0==j)break;if(null!=d&&0>j&&1<h){f=new JU.SB;for(m=0;m<h;){var r=b.charAt(m++);f.appendC(r);"!"!=r&&m<h&&f.appendC("&")}b=f.toString();h=b.length}for(b+="&";0<(j=b.indexOf("&",n))&&j<=h;)n=b.substring(n,j)+l,null==d?this.parseAtom(a,c,n,null,null,!0,!0,g):this.parseBond(a,d,n,null,e,!0,!1),n=j+1}else return!1;return!0}r=b.charAt(j);
  throw new JS.InvalidSmilesException((this.isSmarts?"invalid placement for '"+r+"'":"["+r+"] notation only valid with SMARTS, not SMILES,")+" in "+b);},"JS.SmilesSearch,~S,JS.SmilesAtom,JS.SmilesBond,JS.SmilesAtom,~B,~B");c$.getSubPattern=g(c$,"getSubPattern",function(a,b,c){var d,e=1;switch(c){case "[":d="]";break;case '"':case "%":d=c;break;case "(":d=")";break;default:d=c,e=0}for(var f=a.length,g=1,j=b+1;j<f;j++){var h=a.charAt(j);if(h==d){if(g--,0==g)return a.substring(b+e,j+1-e)}else h==c&&g++}throw new JS.InvalidSmilesException("Unmatched "+
  c);},"~S,~N,~S");c$.getChar=g(c$,"getChar",function(a,b){return b<a.length?a.charAt(b):"\x00"},"~S,~N");c$.getDigits=g(c$,"getDigits",function(a,b,c){for(var d=b,e=a.length;d<e&&JU.PT.isDigit(a.charAt(d));)d++;try{c[0]=Integer.parseInt(a.substring(b,d))}catch(f){if(H(f,NumberFormatException))c[0]=-2147483648;else throw f;}return d},"~S,~N,~A");c$.skipTo=g(c$,"skipTo",function(a,b,c){for(var d;(d=JS.SmilesParser.getChar(a,++b))!=c&&"\x00"!=d;);return"\x00"==d?-1:b},"~S,~N,~S");c$.getRingPointer=g(c$,
  "getRingPointer",function(a){return 10>a?""+a:100>a?"%"+a:"%("+a+")"},"~N");c$.cleanPattern=g(c$,"cleanPattern",function(a){a=JU.PT.replaceAllCharacters(a," \t\n\r","");a=JU.PT.rep(a,"^^","'");for(var b=0,c=0;0<=(b=a.indexOf("//*"))&&(c=a.indexOf("*//"))>=b;)a=a.substring(0,b)+a.substring(c+3);return a=JU.PT.rep(a,"//","")},"~S")});B("JS");E(["JS.JmolSmilesExtension"],"JS.SmilesExt","java.lang.Float JU.AU $.BS $.Lst $.M4 $.Measure $.P3 J.api.Interface JM.BondSet JU.BSUtil $.Logger".split(" "),function(){c$=
  G(function(){this.sm=this.e=null;F(this,arguments)},JS,"SmilesExt",null,JS.JmolSmilesExtension);M(c$,function(){});m(c$,"init",function(a){this.e=a;this.sm=this.e.vwr.getSmilesMatcher();return this},"~O");m(c$,"getSmilesCorrelation",function(a,b,c,d,e,f,g,j,h,m,l,n,r){var w=null==m?0.1:3.4028235E38;try{null==d&&(d=new JU.Lst,e=new JU.Lst);var p=new JU.M4,t=new JU.P3,q=this.e.vwr.ms.at,s=this.e.vwr.getAtomCount(),z=this.sm.getCorrelationMaps(c,q,s,a,j,!0);null==z&&this.e.evalError(this.sm.getLastException(),
  null);if(0==z.length)return NaN;var x=z[0];for(a=0;a<x.length;a++)d.addLast(q[x[a]]);z=this.sm.getCorrelationMaps(c,q,s,b,j,n);null==z&&this.e.evalError(this.sm.getLastException(),null);if(0==z.length)return NaN;JU.Logger.info(z.length+" mappings found");if(r||!h){b=3.4028235E38;c=null;for(a=0;a<z.length;a++){e.clear();for(var A=0;A<z[a].length;A++)e.addLast(q[z[a][A]]);J.api.Interface.getInterface("JU.Eigen",this.e.vwr,"script");var u=JU.Measure.getTransformMatrix4(d,e,p,t);JU.Logger.info("getSmilesCorrelation stddev="+
  u);if(null!=g&&u<w){for(var y=new JU.BS,A=0;A<z[a].length;A++)y.set(z[a][A]);g.addLast(y)}u<b&&(c=z[a],null!=f&&f.setM4(p),null!=l&&l.setT(t),b=u)}null!=m&&(m[0]=x,m[1]=c);e.clear();for(a=0;a<c.length;a++)e.addLast(q[c[a]]);return b}for(a=0;a<z.length;a++)for(A=0;A<z[a].length;A++)e.addLast(q[z[a][A]])}catch(v){if(H(v,Exception))this.e.evalError(v.getMessage(),null);else throw v;}return 0},"JU.BS,JU.BS,~S,JU.Lst,JU.Lst,JU.M4,JU.Lst,~B,~B,~A,JU.P3,~B,~B");m(c$,"getSmilesMatches",function(a,b,c,d,e,
  f){if(0==a.length||a.equals("H"))try{return this.e.vwr.getSmilesOpt(c,0,0,a.equals("H"),!f,!1,!0,!0)}catch(g){if(H(g,Exception))this.e.evalError(g.getMessage(),null);else throw g;}var j=!0,h;if(null==d){j=null==b;try{h=j?this.sm.getSubstructureSetArray(a,this.e.vwr.ms.at,this.e.vwr.getAtomCount(),c,null,e,!1):this.sm.find(a,b,e,!1)}catch(m){if(H(m,Exception))return this.e.evalError(m.getMessage(),null),null;throw m;}}else{h=new JU.Lst;a=this.getSmilesCorrelation(d,c,a,null,null,null,h,e,!1,null,null,
  !1,!1);if(Float.isNaN(a))return f?new JU.BS:[];this.e.showString("RMSD "+a+" Angstroms");h=h.toArray(Array(h.size()))}if(f){f=new JU.BS;for(a=0;a<h.length;a++)f.or(h[a]);if(j)return f;if(!e)return Integer.$valueOf(f.cardinality());e=v(f.cardinality(),0);j=0;for(h=f.nextSetBit(0);0<=h;h=f.nextSetBit(h+1))e[j++]=h+1;return e}if(!j)for(a=0;a<h.length;a++)h[a]=JU.BSUtil.copy2(h[a],new JM.BondSet);e=new JU.Lst;for(a=0;a<h.length;a++)e.addLast(h[a]);return e},"~S,~S,JU.BS,JU.BS,~B,~B");m(c$,"getFlexFitList",
  function(a,b,c,d){var e=JU.AU.newInt2(2);this.getSmilesCorrelation(a,b,c,null,null,null,null,d,!1,e,null,!1,!1);if(null==e[0])return null;a=this.e.vwr.getDihedralMap(e[0]);b=null==a?null:this.e.vwr.getDihedralMap(e[1]);if(null==b||b.length!=a.length)return null;e=P(a.length,3,0);c=this.e.vwr.ms.at;JS.SmilesExt.getTorsions(c,b,e,0);JS.SmilesExt.getTorsions(c,a,e,1);b=P(6*a.length,0);for(d=c=0;c<a.length;c++){var f=a[c];b[d++]=f[0];b[d++]=f[1];b[d++]=f[2];b[d++]=f[3];b[d++]=e[c][0];b[d++]=e[c][1]}return b},
  "JU.BS,JU.BS,~S,~B");c$.getTorsions=g(c$,"getTorsions",function(a,b,c,d){for(var e=b.length;0<=--e;){var f=b[e],f=JU.Measure.computeTorsion(a[f[0]],a[f[1]],a[f[2]],a[f[3]],!0);1==d&&(180<f-c[e][0]?f-=360:-180>=f-c[e][0]&&(f+=360));c[e][d]=f}},"~A,~A,~A,~N")})})(Clazz,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.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);
  