(function(R,S,T,U,I,V,G,p,K,L,M,W,X,N,Y,Z,O,H,x,$,P,aa,ba,Q,ca,da,ea,fa,ga,ha,w,ia,ja,ka,la,ma,na,oa,pa,qa,ra,sa,ta,ua,va,wa,xa,ya,za,Aa,Ba,Ca,Da,Ea,Fa,Ga,Ha,Ia,k,v){G("J.api");Q(J.api,"JmolPropertyManager");G("JV");K(["J.api.JmolPropertyManager","java.util.Hashtable"],"JV.PropertyManager","java.lang.Boolean $.Double $.Float java.util.Arrays $.Map JU.AU $.BArray $.BS $.Base64 $.Lst $.M3 $.M4 $.P3 $.PT $.SB $.V3 J.api.Interface JM.BondSet $.LabelToken JS.SV $.T JU.BSUtil $.C $.Edge $.Escape $.JmolMolecule $.Logger JV.ActionManager $.FileManager $.JC $.Viewer JV.binding.Binding".split(" "),
function(){c$=M(function(){this.map=this.vwr=null;L(this,arguments)},JV,"PropertyManager",null,J.api.JmolPropertyManager);P(c$,function(){this.map=new java.util.Hashtable});N(c$,function(){});v(c$,"setViewer",function(a){this.vwr=a;for(var c=a=0;a<JV.PropertyManager.propertyTypes.length;a+=3,c++)0<JV.PropertyManager.propertyTypes[a].length&&this.map.put(JV.PropertyManager.propertyTypes[a].toLowerCase(),Integer.$valueOf(c))},"JV.Viewer");v(c$,"getPropertyNumber",function(a){a=this.map.get(null==a?
"":a.toLowerCase());return null==a?-1:a.intValue()},"~S");v(c$,"getDefaultPropertyParam",function(a){return 0>a?"":JV.PropertyManager.propertyTypes[3*a+2]},"~N");v(c$,"checkPropertyParameter",function(a){a=this.getPropertyNumber(a);a=JV.PropertyManager.getParamType(a);return 0<a.length&&"<atom selection>"!==a},"~S");v(c$,"getProperty",function(a,c,f){144!=JV.PropertyManager.propertyTypes.length&&JU.Logger.warn("propertyTypes is not the right length: "+JV.PropertyManager.propertyTypes.length+" != 144");
var b;0<=c.indexOf(".")||0<=c.indexOf("[")?(b=this.getArguments(c),f=this.getPropertyAsObject(b[0].asString(),f,null),b=this.extractProperty(f,b,1,null,!1)):b=this.getPropertyAsObject(c,f,a);if(null==a)return b;(f=a.equalsIgnoreCase("readable"))&&(a=JV.PropertyManager.isReadableAsString(c)?"String":"JSON");return a.equalsIgnoreCase("String")?null==b?"":b.toString():f?JU.Escape.toReadable(c,b):a.equalsIgnoreCase("JSON")?JS.SV.safeJSON(c,b):b},"~S,~S,~O");k(c$,"getArguments",function(a){var c=a.toLowerCase(),
f=-1;if(0<=a.indexOf('"')||0<=a.indexOf("'"))a=this.fixSelectQuotes(a);for(;0<=(f=c.indexOf("[select ",++f));){var b=c.indexOf(" where ",f),d=c.indexOf(" wherein ",f);0<d&&d<b&&(b=d);var e=c.indexOf("][select ",f);0>e&&(e=c.lastIndexOf("]"));d=c.indexOf("[",f);0<=d&&d<e&&(b=d);0>b||b>e||(a=a.substring(0,f+1)+a.substring(f+1,e).$replace(".","\u0001").$replace("[","\u0002").$replace("]","\u0003")+a.substring(e))}a=JU.PT.rep(JU.PT.rep(a.$replace("]","\x00").$replace("[","\x00"),"..","\u0004").$replace(".",
"\x00").$replace("\u0001",".").$replace("\u0002","[").$replace("\u0003","]"),"\u0004","..");a=JU.PT.rep(a,"\x00\x00","\x00");a=JU.PT.split(JU.PT.trim(a,"\x00"),"\x00");for(var c=Array(a.length),f=0,g;f<a.length;f++)c[f]=a[f].startsWith("'")||a[f].startsWith('"')?JS.SV.newS(JU.PT.trim(a[f],"'\"")):-2147483648==(g=JU.PT.parseInt(a[f]))?JS.SV.newS(a[f]):JS.SV.newI(g);return c},"~S");k(c$,"fixSelectQuotes",function(a){a=a.toCharArray();for(var c=!1,f=!1,b=!1,d=a.length;0<=--d;)switch(a[d]){case "'":b||
(c=f=!c);break;case '"':f||(c=b=!c);break;case ".":c&&(a[d]="\u0001");break;case "[":c&&(a[d]="\u0002");break;case "]":c&&(a[d]="\u0003")}return a=String.instantialize(a)},"~S");v(c$,"extractProperty",function(a,c,f,b,d){0>f&&(c=this.getArguments(c),f=0);if(f>=c.length)return a;if(!d){d=c=this.compileSelect(c);var e=f;for(c=d.length;e<c;e++)if(1275082245==d[e].tok){b=Array(e+1);for(var g=0;g<=e;g++)b[g]=d[g];for(a=this.extractProperty(a,b,f,null,!0);++e<c;)b[b.length-1]=d[e],a=this.extractProperty(a,
b,b.length-1,null,!0);return a}c=d}var j=c[f++];d=JS.SV.oValue(a);switch(j.tok){case 2:e=j.intValue-1;if(p(d,JU.Lst))return g=d,0>e&&(e+=g.size()),0<=e&&e<g.size()?this.extractProperty(g.get(e),c,f,null,!0):"";if(p(d,JU.M3))return g=d,b=w(-1,[x(-1,[g.m00,g.m01,g.m02]),x(-1,[g.m10,g.m11,g.m12]),x(-1,[g.m20,g.m21,g.m22])]),0>e&&(e+=3),0<=e&&3>e?this.extractProperty(b,c,--f,null,!0):"";if(p(d,JU.M4))return g=d,b=w(-1,[x(-1,[g.m00,g.m01,g.m02,g.m03]),x(-1,[g.m10,g.m11,g.m12,g.m13]),x(-1,[g.m20,g.m21,
g.m22,g.m23]),x(-1,[g.m30,g.m31,g.m32,g.m33])]),0>e&&(e+=4),0<=e&&4>e?this.extractProperty(b,c,--f,null,!0):"";if(JU.AU.isAI(d))return 0>e&&(e+=d.length),0<=e&&e<d.length?Integer.$valueOf(d[e]):"";if(JU.AU.isAD(d))return 0>e&&(e+=d.length),0<=e&&e<d.length?Double.$valueOf(d[e]):"";if(JU.AU.isAF(d))return 0>e&&(e+=d.length),0<=e&&e<d.length?Float.$valueOf(d[e]):"";if(JU.AU.isAII(d)||JU.AU.isAFF(d))return 0>e&&(e+=d.length),0<=e&&e<d.length?this.extractProperty(d[e],c,f,null,!0):"";if(JU.AU.isAS(d)||
p(d,Array))return 0>e&&(e+=d.length),0<=e&&e<d.length?d[e]:"";break;case 1275082245:case 4:if(p(d,java.util.Map)){var h,m=!1,g=a=!1,l=1275082245==j.tok?j.value[0]:null,n=null;if(1275082245==j.tok)if(g=!0,n=j.value[1],h=j.myName,a=0<=h.indexOf(";"),h.contains("**")){for(var k=0==l.size(),s="",t,u=d.entrySet().iterator();u.hasNext()&&((t=u.next())||1);)for(var r=t.getKey(),e=k?1:l.size();0<=--e;)if(k||JU.PT.isLike(r,l.get(e))){m=t.getValue();h=!1;switch(p(m,JS.SV)?m.tok:0){case 7:h=!0;m=m.getList();
break;case 6:case 14:m=m.getMap();break;default:if(!p(m,java.util.Map)&&!(h=p(m,JU.Lst))){if(h||null==n)continue;m=new java.util.Hashtable;m.put("key",JS.SV.newS(r));m.put("value",t.getValue());this.vwr.checkSelect(m,n)&&(s+=","+r);continue}}if(h){null==b&&(b=new JU.Lst);f=m;c=f.size();for(j=0;j<c;j++)if(m=f.get(j),p(m,JS.SV)&&null!=(m=m.getMap()))(null==n||this.vwr.checkSelect(m,n))&&b.addLast(m);return b}if(null==n||this.vwr.checkSelect(m,n))s+=","+r}if(0==s.length)return new JU.Lst;h=s.substring(1);
m=!a;l=null}else{if(null!=n&&!this.vwr.checkSelect(d,n))return""}else if(h=j.asString(),h.equalsIgnoreCase("keys")){b=new JU.Lst;for(d=d.keySet().iterator();d.hasNext()&&((r=d.next())||1);)b.addLast(r);return this.extractProperty(b,c,f,null,!0)}e=a||0<=h.indexOf(",")||0<=h.indexOf(";");g&&!e&&(e=!0,h+=",");t=a||h.startsWith("*")||h.endsWith("*")||e;r=null!=b;if(t&&(r||(b=new JU.Lst),!a&&(null==l?1==h.length:0==l.size()))){if(f==c.length){if(!r)return d;b.addLast(d);return b}return this.extractProperty(d,
c,f,b,!0)}h.contains("**")&&(h=JU.PT.rep(h,"**","*"));t&&!e&&(h+=",");if(m||a||h.contains(",")){t=new java.util.Hashtable;null!=l&&0==l.size()&&(l=null,h="*");a=(new Boolean(a|1==j.index)).valueOf();if(null==l){l=JU.PT.split(h,",");for(e=l.length;0<=--e;)JV.PropertyManager.getMapSubset(d,l[e],t,a?b:null)}else for(e=0;e<l.size();e++){h=l.get(e);n=null;j=h.indexOf("[");if(0<j&&h.endsWith("]"))n=h.substring(j+1,h.length-1),h=h.substring(0,j),n=JU.PT.trim(n,"'\"");else if(0<=(j=h.indexOf(".")))n=h.substring(j+
1),h=h.substring(0,j);k=b.size();JV.PropertyManager.getMapSubset(d,h,t,a?b:null);if(null!=n)for(j=b.size();--j>=k;)g=b.get(j),p(g,JS.SV)&&(h=g,g=h.getMap(),null!=g?g=g.get(n):(g=JU.PT.parseInt(n),h=h.getList(),g=0<=g&&g<h.size()?h.get(g):null),null==g?b.remove(j):b.set(j,g))}if(m&&!r)return t;if(f==c.length){if(!a){if(!r)return t;b.addLast(t)}return b}return this.extractProperty(t,c,f,r?b:null,!0)}h=this.checkMap(d,h,t,b,c,f,g);return null!=h&&!t?this.extractProperty(d.get(h),c,f,null,!0):!t?"":b}if(p(d,
JU.Lst)){g=d;null==b&&(b=new JU.Lst);f--;h=!1;for(e=0;e<g.size();e++)if(m=g.get(e),p(m,java.util.Map)||(h=p(m,JU.Lst))||p(m,JS.SV)&&(null!=m.getMap()||(h=null!=m.getList())))h||1==j.index?(d=this.extractProperty(m,c,f,null,!0),""!==d&&b.addLast(d)):this.extractProperty(m,c,f,b,!0);return b}}return a},"~O,~O,~N,JU.Lst,~B");c$.getMapSubset=k(c$,"getMapSubset",function(a,c,f,b){if(c.startsWith('"')||c.startsWith("'"))c=JU.PT.trim(c,"\"'");var d=a.get(c);if(null!=d)null==b?f.put(c,d):b.addLast(d);else{var e;
for(a=a.entrySet().iterator();a.hasNext()&&((e=a.next())||1);)d=e.getKey(),JU.PT.isLike(d,c)&&(null==b?f.put(d,e.getValue()):b.addLast(e.getValue()))}},"java.util.Map,~S,java.util.Map,JU.Lst");k(c$,"compileSelect",function(a){for(var c=null,f=a.length;0<=--f;)if(4==a[f].tok){var b=a[f].value,d=b.toUpperCase();d.startsWith("WHERE")&&(d=(b="SELECT * "+b).toUpperCase());if(d.startsWith("SELECT ")){null==c&&(c=JU.AU.arrayCopyObject(a,a.length));d=(b=b.substring(6).trim()).toUpperCase();if(d.startsWith("WHERE ")||
d.startsWith("WHEREIN "))d=(b="* "+b).toUpperCase();var e=d.indexOf(" WHEREIN "),g=0>e?"":0<=b.indexOf(";")?";**":",**";0>e&&(e=d.indexOf(" WHERE "));var d=b.substring(0,0>e?b.length:e).trim(),j=0;d.startsWith("(")&&d.endsWith(")")?d=d.substring(1,d.length-1)+";":d.startsWith("[")&&d.endsWith("]")&&(d=d.substring(1,d.length-1),j=1);0>e?(c[f]=JS.SV.newV(1275082245,w(-1,[this.getKeys(d),null])),c[f].myName=d,c[f].index=j):(d+=g,b=b.substring(e+6+g.length).trim(),b=this.vwr.compileExpr(b),b=w(-1,[this.getKeys(d),
b]),c[f]=JS.SV.newV(1275082245,b),c[f].index=j,c[f].myName=d)}}return null==c?a:c},"~A");k(c$,"getKeys",function(a){var c=new JU.Lst;a=JU.PT.rep(JU.PT.rep(a,"**","*"),";",",")+",";for(var f=0,b=-1;0<=(b=a.indexOf(",",b+1));)if(b>f){var d=a.substring(f,b);if(d.equals("*")){if(0==c.size())break}else c.addLast(d),f=b+1}return c},"~S");k(c$,"checkMap",function(a,c,f,b,d,e,g){var j=null==b&&a.containsKey(c);if(!j)for(var h=c.contains(";"),m=h?JU.PT.split(c,";"):null,l=f&&!g?c.toLowerCase():null,n,k=a.keySet().iterator();k.hasNext()&&
((n=k.next())||1);){if(h){for(var s=m.length;0<=--s;c=null)if(c=m[s],0!=c.length){if(g){if(!JU.PT.isLike(n,c))continue;break}l=0<=c.indexOf("*")?c.toLowerCase():null;if(this.checkKey(n,c,l))break}if(null==c)continue}else if(g?!JU.PT.isLike(n,c):!this.checkKey(n,c,l))continue;if(null==b)return n;b.addLast(this.extractProperty(a.get(n),d,e,null,!0));if(!f&&!h)return null}return j?c:null},"java.util.Map,~S,~B,JU.Lst,~O,~N,~B");k(c$,"checkKey",function(a,c,f){return a.equalsIgnoreCase(c)||null!=f&&JU.PT.isLike(a.toLowerCase(),
f)},"~S,~S,~S");c$.getPropertyName=k(c$,"getPropertyName",function(a){return 0>a?"":JV.PropertyManager.propertyTypes[3*a]},"~N");c$.getParamType=k(c$,"getParamType",function(a){return 0>a?"":JV.PropertyManager.propertyTypes[3*a+1]},"~N");c$.isReadableAsString=k(c$,"isReadableAsString",function(a){for(var c=JV.PropertyManager.readableTypes.length;0<=--c;)if(a.equalsIgnoreCase(JV.PropertyManager.readableTypes[c]))return!0;return!1},"~S");k(c$,"getPropertyAsObject",function(a,c,f){if(a.equals("tokenList"))return JS.T.getTokensLike(c);
var b=null,d=a.indexOf("#");0<d&&(b=w(-1,[a.substring(d+1),c]),a=a.substring(0,d));var d=this.getPropertyNumber(a),e=null!=b||null!=c&&""!==c;null==b&&(b=e?c:this.getDefaultPropertyParam(d));switch(d){case 47:return this.getUnitCellInfo();case 46:return this.vwr.getModelkitPropertySafely(b.toString());case 0:return this.getAppletInfo();case 5:return this.getAnimationInfo();case 14:return this.getAllAtomInfo(this.vwr.getAtomBitSet(b));case 24:return this.vwr.getAuxiliaryInfoForAtoms(b);case 15:return this.getAllBondInfo(b);
case 25:return this.getBoundBoxInfo();case 10:return this.vwr.tm.fixedRotationCenter;case 16:return this.getAllChainInfo(this.vwr.getAtomBitSet(b));case 37:return this.vwr.getProperty("DATA_API","consoleText",null);case 26:return this.vwr.getDataObj(b.toString(),null,-1);case 33:return this.vwr.getErrorMessageUn();case 28:return this.vwr.evaluateExpression(b.toString());case 20:return this.vwr.getModelExtract(b,!0,!1,"MOL");case 32:return JV.PropertyManager.getFileInfo(this.vwr.getFileData(),b.toString());
case 45:return this.vwr.readCifData(b.toString(),null);case 1:return this.vwr.fm.getFullPathName(!1);case 2:return this.vwr.getFileHeader();case 4:case 3:return e?this.vwr.getFileAsString3(b.toString(),!0,null):this.vwr.getCurrentFileAsString("prop");case 27:return a=b.toString().toLowerCase(),this.getImage(a,0>a.indexOf("g64")&&0>a.indexOf("base64")&&(null==f||f.equalsIgnoreCase("java")));case 35:return this.vwr.getShapeProperty(24,"info");case 36:return this.vwr.getShapeProperty(24,"data");case 40:return this.vwr.getNMRCalculation().getInfo(b.toString());
case 41:return this.getVariables(b.toString());case 21:return this.vwr.getStatusChanged(b.toString());case 22:return this.vwr;case 38:return this.vwr.getJspecViewProperties(b);case 7:return this.getLigandInfo(this.vwr.getAtomBitSet(b));case 9:return this.getMeasurementInfo();case 29:return this.vwr.getMenu(b.toString());case 23:return this.vwr.sm.messageQueue;case 30:return this.vwr.getMinimizationInfo();case 6:return this.getModelInfo(this.vwr.getAtomBitSet(b));case 18:return this.getMoleculeInfo(this.vwr.getAtomBitSet(b));
case 34:return this.getMouseInfo();case 11:return this.vwr.tm.getOrientationInfo();case 31:return this.vwr.ms.getPointGroupInfo(this.vwr.getAtomBitSet(b));case 17:return this.getAllPolymerInfo(this.vwr.getAtomBitSet(b));case 39:return this.vwr.getScriptQueueInfo();case 8:return this.getShapeInfo();case 19:return this.vwr.getStateInfo3(b.toString(),0,0);case 12:return JU.M3.newM3(this.vwr.tm.matrixRotate);case 42:return this.getAnnotationInfo(b,1073741925);case 43:return this.getAnnotationInfo(b,1073742189);
case 44:return b=JS.SV.oValue(b),b=p(b,java.util.Map)?b:null,null==b?null:this.vwr.sm.processService(b)}f=Array(48);for(c=0;48>c;c++)b=JV.PropertyManager.getParamType(c),d=this.getDefaultPropertyParam(c),e=JV.PropertyManager.getPropertyName(c),f[c]=0==e.length||"X"==e.charAt(0)?"":e+(""!==b?" "+JV.PropertyManager.getParamType(c)+(""!==d?" #default: "+this.getDefaultPropertyParam(c):""):"");java.util.Arrays.sort(f);b=new JU.SB;b.append("getProperty ERROR\n").append(a).append("?\nOptions include:\n");
for(c=0;48>c;c++)0<f[c].length&&b.append("\n getProperty ").append(f[c]);return b.toString()},"~S,~O,~S");k(c$,"getUnitCellInfo",function(){var a=this.vwr.getCurrentUnitCell();return null==a?"":a.getUnitCellInfoMap()});k(c$,"getImage",function(a,c){var f=-1,b=-1,d;if(0<=(d=a.indexOf("height=")))f=JU.PT.parseInt(a.substring(d+7));if(0<=(d=a.indexOf("width=")))b=JU.PT.parseInt(a.substring(d+6));0>b&&0>f?f=b=-1:0>b?b=f:f=b;var e="JPG";0<=a.indexOf("type=")&&(e=JU.PT.getTokens(JU.PT.replaceWithCharacter(a.substring(a.indexOf("type=")+
5),";,"," "))[0]);d=Array(1);f=this.vwr.getImageAsBytes(e.toUpperCase(),b,f,-1,d);return null!=d[0]?d[0]:c?new JU.BArray(f):JU.Base64.getBase64(f).toString()},"~S,~B");k(c$,"getVariables",function(a){return a.toLowerCase().equals("all")?this.vwr.g.getAllVariables():this.vwr.evaluateExpressionAsVariable(a)},"~S");c$.getFileInfo=k(c$,"getFileInfo",function(a,c){var f=new java.util.Hashtable;if(null==a)return f;var b=null!=c&&0<c.length;if(p(a,java.util.Map))return b?a.get(c):a;var d=JU.PT.split(a,"\n");
if(0==d.length||7>d[0].length||" "!=d[0].charAt(6)||!d[0].substring(0,6).equals(d[0].substring(0,6).toUpperCase()))return f.put("fileHeader",a),f;var e="",g=new JU.SB;b&&(c=c.toUpperCase());for(var j="",h=0;h<d.length;h++){var m=d[h];if(!(12>m.length)){var j=m.substring(0,6).trim(),l=m.substring(7,10).trim();j.equals("REMARK")&&(j+=l);if(!j.equals(e)){if(b&&e.equals(c))return g.toString();b||(f.put(e,g.toString()),g=new JU.SB);e=j}(!b||j.equals(c))&&g.append(m).appendC("\n")}}b||f.put(e,g.toString());
return b?j.equals(c)?g.toString():"":f},"~O,~S");k(c$,"getMoleculeInfo",function(a){a=this.vwr.getAtomBitSet(a);for(var c=this.vwr.ms.getMolecules(),f=new JU.Lst,b=new JU.BS,d=0;d<c.length;d++){var b=JU.BSUtil.copy(a),e=c[d];b.and(e.atomList);0<b.length()&&(b=new java.util.Hashtable,b.put("mf",e.getMolecularFormula(!0,null,!1)),b.put("number",Integer.$valueOf(e.moleculeIndex+1)),b.put("modelNumber",this.vwr.ms.getModelNumberDotted(e.modelIndex)),b.put("numberInModel",Integer.$valueOf(e.indexInModel+
1)),b.put("nAtoms",Integer.$valueOf(e.ac)),b.put("nElements",Integer.$valueOf(e.nElements)),f.addLast(b))}return f},"~O");v(c$,"getModelInfo",function(a){a=this.vwr.ms.getModelBS(this.vwr.getAtomBitSet(a),!1);var c=this.vwr.ms,f=new java.util.Hashtable;f.put("modelSetName",c.modelSetName);f.put("modelIndex",Integer.$valueOf(this.vwr.am.cmi));f.put("modelCount",Integer.$valueOf(c.mc));f.put("isTainted",Boolean.$valueOf(null!=c.tainted));f.put("canSkipLoad",Boolean.$valueOf(c.canSkipLoad));f.put("modelSetHasVibrationVectors",
Boolean.$valueOf(c.modelSetHasVibrationVectors()));null!=c.modelSetProperties&&f.put("modelSetProperties",c.modelSetProperties);f.put("modelCountSelected",Integer.$valueOf(a.cardinality()));f.put("modelsSelected",a);var b=new JU.Lst;c.getMolecules();for(var d=a.nextSetBit(0);0<=d;d=a.nextSetBit(d+1)){var e=new java.util.Hashtable;e.put("_ipt",Integer.$valueOf(d));e.put("num",Integer.$valueOf(c.getModelNumber(d)));e.put("file_model",c.getModelNumberDotted(d));e.put("name",c.getModelName(d));var g=
c.getModelTitle(d);null!=g&&e.put("title",g);g=c.getModelFileName(d);null!=g&&e.put("file",g);g=c.getInfo(d,"modelID");null!=g&&e.put("id",g);e.put("vibrationVectors",Boolean.$valueOf(this.vwr.modelHasVibrationVectors(d)));g=c.am[d];e.put("atomCount",Integer.$valueOf(g.act));e.put("bondCount",Integer.$valueOf(g.getBondCount()));e.put("groupCount",Integer.$valueOf(g.getGroupCount()));e.put("moleculeCount",Integer.$valueOf(g.moleculeCount));g.isBioModel&&e.put("polymerCount",Integer.$valueOf(g.getBioPolymerCount()));
e.put("chainCount",Integer.$valueOf(c.getChainCountInModelWater(d,!0)));null!=g.properties&&e.put("modelProperties",g.properties);var j=c.getInfo(d,"Energy");null!=j&&e.put("energy",j);e.put("atomCount",Integer.$valueOf(g.act));b.addLast(e)}f.put("models",b);return f},"~O");v(c$,"getLigandInfo",function(a){var c=this.vwr.getAtomBitSet(a),f=this.vwr.getAtomBitSet("solvent");a=new java.util.Hashtable;var b=new JU.Lst;a.put("ligands",b);var d=this.vwr.ms,e=JU.BSUtil.copyInvert(c,d.ac);e.or(f);for(var f=
d.at,g=c.nextSetBit(0);0<=g;g=c.nextSetBit(g+1))(f[g].group.isProtein()||f[g].group.isDna()||f[g].group.isRna())&&f[g].group.setAtomBitsAndClear(e,c);c=Array(d.mc);for(g=d.mc;0<=--g;)c[g]=this.vwr.getModelUndeletedAtomsBitSet(g),c[g].andNot(e);e=JU.JmolMolecule.getMolecules(f,c,null,e);for(g=0;g<e.length;g++){var c=e[g].atomList,j=new java.util.Hashtable;b.addLast(j);j.put("atoms",JU.Escape.eBS(c));for(var h="",m="",l=null,n=0,k=null,s="",t="",u=2147483647,r=2147483647,D=c.nextSetBit(0);0<=D;D=c.nextSetBit(D+
1)){var q=f[D];if(l!==q.group){var l=q.group,p=q.getResno(),w=q.getChainID();u!=p-1&&(0!=s.length&&u!=r&&(s+="-"+u),w=-1,r=p);t="/"+d.getModelNumberDotted(q.mi);0!=n&&w!=n&&(s+=":"+k+t);-1==w&&(s+=" "+p);u=p;n=q.getChainID();k=q.getChainIDStr();h+=m+q.getGroup3(!1);m="-"}}s+=(r==u?"":"-"+u)+(0==n?"":":"+k)+t;j.put("groupNames",h);j.put("residueList",s.substring(1))}return a},"~O");v(c$,"getAtomData",function(a,c,f){a.startsWith("{")||(a="{"+a+"}");var b=c.toLowerCase().startsWith("user:"),d=c.toLowerCase().startsWith("property_");
f&&(!b&&!d)&&(c=c.toUpperCase());b=d?"%{"+c+"}":b?c.substring(5):c.equals("xyzrn")?"%-2e %8.3x %8.3y %8.3z %4.2[vdw] 1 [%n]%r.%a#%i":c.equals("xyzvib")?"%-2e %10.5x %10.5y %10.5z %10.5vx %10.5vy %10.5vz":c.equals("pdb")?'{selected and not hetero}.label("ATOM  %5i %-4a%1A%3.3n %1c%4R%1E   %8.3x%8.3y%8.3z%6.2Q%6.2b          %2e  ").lines+{selected and hetero}.label("HETATM%5i %-4a%1A%3.3n %1c%4R%1E   %8.3x%8.3y%8.3z%6.2Q%6.2b          %2e  ").lines':c.equals("xyz")?"%-2e %10.5x %10.5y %10.5z":c.equals("cfi")?
"print '$CFI from Jmol"+JV.Viewer.getJmolVersion()+"\n'+{selected}.count + ' ' + {selected}.bonds.count + '\n'   + {selected}.format('%10.0[atomno] %10.0[elemno] %10.4[xyz]')  + {selected}.bonds.format('%i1 %i2') + '\n' + {selected}.bonds.format('%ORDER')":null;if(null==b)return this.getModelExtract(this.vwr.getAtomBitSet(a),!1,!1,c.toUpperCase(),f);if(b.startsWith("print"))return a.equals("selected")||(b=JU.PT.rep(b,"selected",a.substring(1,a.length-1))),this.vwr.runScriptCautiously(b);0>b.indexOf("label")?
b=a+'.label("'+b+'").lines':a.equals("selected")||(b=JU.PT.rep(b,"selected",a.substring(1,a.length-1)));return this.vwr.evaluateExpression(b)},"~S,~S,~B");v(c$,"getModelExtract",function(a,c,f,b,d){if(0>a.nextSetBit(0))return"";b=b.toUpperCase();if(JU.PT.isOneOf(b,";CIF;QCJSON;XSF;PWMAT;"))return this.getModel(b,a,null,null);if(b.equals("PWSLAB"))return this.getModel("PWMAT",a,w(-1,["slab"]),null);if(b.equals("CIFP1"))return this.getModel("CIF",a,w(-1,["P1"]),null);if(b.equals("CML"))return this.getModelCml(a,
2147483647,!0,c,d);if(b.equals("PDB")||b.equals("PQR"))return this.getPdbAtomData(a,null,b.equals("PQR"),c,d);var e=b.equals("V3000"),g=b.equals("SDF"),j=b.equals("MOL"),h=!c&&b.equals("XYZVIB"),m=b.equals("XYZRN"),l=b.startsWith("XYZ"),n=b.equals("JSON")||b.equals("CD");b=new JU.SB;var k=this.vwr.ms,s=JU.BSUtil.copy(a),t=this.vwr.ms.getModelBS(s,!0);if(!l&&!n){var u=this.vwr.ms.getFrameTitle(t.nextSetBit(0)),u=null!=u?u.$replace("\n"," "):f?"Jmol Model Kit":JV.FileManager.fixDOSName(this.vwr.fm.getFullPathName(!1));
80<u.length&&(u=u.substring(0,77)+"...");b.append(u);f=JV.Viewer.getJmolVersion();b.append("\n__Jmol-").append(f.substring(0,2));var r,p,q;q=new Date;f=q.getMonth();u=q.getDate();r=q.getFullYear();p=q.getHours();q=q.getMinutes();JU.PT.rightJustify(b,"_00",""+(1+f));JU.PT.rightJustify(b,"00",""+u);b.append((""+r).substring(2,4));JU.PT.rightJustify(b,"00",""+p);JU.PT.rightJustify(b,"00",""+q);b.append("3D 1   1.00000     0.00000     0");b.append("\nJmol version ").append(JV.Viewer.getJmolVersion()).append(" EXTRACT: ").append(JU.Escape.eBS(a)).append("\n")}u=
k.at;for(f=a.nextSetBit(0);0<=f;f=a.nextSetBit(f+1))c&&u[f].isDeleted()&&s.clear(f);r=JV.PropertyManager.getCovalentBondsForAtoms(k.bo,k.bondCount,s);if(!h&&s.isEmpty())return"";a=!0;null!=k.trajectory&&!d&&k.trajectory.selectDisplayed(t);c=c?this.vwr.tm.getRotationQ():null;if(l){j=JM.LabelToken.compile(this.vwr,m?"%-2e _XYZ_ %4.2[vdw] 1 [%n]%r.%a#%i\n":"%-2e _XYZ_\n","\x00",null);g=h?JM.LabelToken.compile(this.vwr,"%-2e _XYZ_ %12.5vx %12.5vy %12.5vz\n","\x00",null):null;d=new JU.P3;for(f=t.nextSetBit(0);0<=
f;f=t.nextSetBit(f+1))if(e=JU.BSUtil.copy(s),e.and(k.getModelAtomBitSetIncludingDeleted(f,!1)),!e.isEmpty()){b.appendI(e.cardinality()).appendC("\n");m=k.am[f].properties;b.append("Model["+(f+1)+"]: ");if(null!=k.frameTitles[f]&&0<k.frameTitles[f].length)b.append(k.frameTitles[f].$replace("\n"," "));else if(null==m)b.append("Jmol "+JV.Viewer.getJmolVersion());else{l=new JU.SB;n=m.propertyNames();for(r=null;n.hasMoreElements();)p=n.nextElement(),p.equals(".PATH")?r=m.getProperty(p):l.append(";").append(p).append("=").append(m.getProperty(p));
null!=r&&l.append(";PATH=").append(r);r=l.substring(0<l.length()?1:0);b.append(r.$replace("\n"," "))}b.appendC("\n");m=w(-1,[d]);for(l=e.nextSetBit(0);0<=l;l=e.nextSetBit(l+1))n=JM.LabelToken.formatLabelAtomArray(this.vwr,u[l],h&&null!=k.getVibration(l,!1)?g:j,"\x00",null,d),k.getPointTransf(f,u[l],c,d),n=JU.PT.rep(n,"_XYZ_",JU.PT.sprintf("%12.5p %12.5p %12.5p","p",m)),b.append(n)}}else if(h=J.api.Interface.getInterface("J.adapter.writers.MOLWriter",this.vwr,"write").setViewer(this.vwr),g){u=b.toString();
b=new JU.SB;for(f=t.nextSetBit(0);0<=f&&!(b.append(u),e=JU.BSUtil.copy(s),e.and(k.getModelAtomBitSetIncludingDeleted(f,!1)),r=JV.PropertyManager.getCovalentBondsForAtoms(k.bo,k.bondCount,e),!(a=h.addMolFile(f,b,e,r,!1,!1,j,c)));f=t.nextSetBit(f+1));}else a=h.addMolFile(-1,b,s,r,e,n,j,c);return a?b.toString():"ERROR: Too many atoms or bonds -- use V3000 format."},"JU.BS,~B,~B,~S,~B");k(c$,"getModel",function(a,c,f,b){a=J.api.Interface.getInterface("J.adapter.writers."+a+"Writer",this.vwr,"script");
a.set(this.vwr,b,f);return a.write(c)},"~S,JU.BS,~A,JU.OC");c$.getCovalentBondsForAtoms=k(c$,"getCovalentBondsForAtoms",function(a,c,f){for(var b=new JU.BS,d=0;d<c;d++){var e=a[d];f.get(e.atom1.i)&&(f.get(e.atom2.i)&&e.isCovalent())&&b.set(d)}return b},"~A,~N,JU.BS");v(c$,"getChimeInfo",function(a,c){switch(a){case 1073741982:var f=new JU.SB;this.vwr.getChimeMessenger().getAllChimeInfo(f);return f.appendC("\n").toString().substring(1);case 1073741863:return this.getBasePairInfo(c);default:return this.getChimeInfoA(this.vwr.ms.at,
a,c)}},"~N,JU.BS");k(c$,"getChimeInfoA",function(a,c,f){var b=(new JU.SB).append("\n"),d="",e=null,g=null,j=-1,h=0;if(null!=f)for(var k=f.nextSetBit(0);0<=k;k=f.nextSetBit(k+1)){var l=a[k];switch(c){default:return"";case 1113589787:d=l.getInfo();break;case 1140850689:d=""+l.getAtomNumber();break;case 1086324742:d=l.getGroup3(!1);break;case 1086326788:case 1073742120:case 1086324744:case 1086324743:var n=l.getChainID(),d=0==n?" ":l.getChainIDStr();300<=n&&(d=JU.PT.esc(d));switch(c){case 1073742120:d=
"["+l.getGroup3(!1)+"]"+l.group.getSeqcodeString()+":"+d;break;case 1086324744:case 1086324743:l.mi!=j&&(b.appendC("\n"),h=0,j=l.mi,b.append("Model "+l.getModelNumber()),e=g=null);l.group.chain!==e&&(b.appendC("\n"),h=0,e=l.group.chain,b.append("Chain "+d+":\n"),g=null);d=l.group;d!==g&&(g=d,1086324743==c?b.append(l.getGroup1("?")):(0==h++%5&&1<h&&b.appendC("\n"),JU.PT.leftJustify(b,"          ","["+l.getGroup3(!1)+"]"+l.getResno()+" ")));continue}}0>b.indexOf("\n"+d+"\n")&&b.append(d).appendC("\n")}1086324744==
c&&b.appendC("\n");return b.toString().substring(1)},"~A,~N,JU.BS");v(c$,"getModelFileInfo",function(a){for(var c=this.vwr.ms,f=new JU.SB,b=0;b<c.mc;++b)if(null==a||a.get(b)){var d='["'+c.getModelNumberDotted(b)+'"] = ';f.append("\n\nfile").append(d).append(JU.PT.esc(c.getModelFileName(b)));var e=c.getInfo(b,"modelID");null!=e&&f.append("\nid").append(d).append(JU.PT.esc(e));f.append("\ntitle").append(d).append(JU.PT.esc(c.getModelTitle(b)));f.append("\nname").append(d).append(JU.PT.esc(c.getModelName(b)));
f.append("\ntype").append(d).append(JU.PT.esc(c.getModelFileType(b)))}return f.toString()},"JU.BS");k(c$,"getAllAtomInfo",function(a){for(var c=new JU.Lst,f=new JU.P3,b=-1,d=null,e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+1)){var g=this.vwr.ms.at[e].getModelIndex();g!=b&&(d=this.vwr.ms.getUnitCell(g),b=g);c.addLast(this.getAtomInfoLong(e,f,d))}return c},"JU.BS");k(c$,"getAtomInfoLong",function(a,c,f){var b=this.vwr.ms,d=b.at[a],e=new java.util.Hashtable;b.getAtomIdentityInfo(a,e,c);e.put("element",b.getElementName(a));
e.put("elemno",Integer.$valueOf(b.at[a].getElementNumber()));e.put("x",Float.$valueOf(d.x));e.put("y",Float.$valueOf(d.y));e.put("z",Float.$valueOf(d.z));null!=f&&(c.setT(d),f.toFractional(c,!0),e.put("fx",Float.$valueOf(c.x)),e.put("fy",Float.$valueOf(c.y)),e.put("fz",Float.$valueOf(c.z)));e.put("coord",JU.P3.newP(d));null!=b.vibrations&&null!=b.vibrations[a]&&b.vibrations[a].getInfo(e);e.put("bondCount",Integer.$valueOf(d.getCovalentBondCount()));e.put("radius",Float.$valueOf(d.getRasMolRadius()/
120));e.put("model",d.getModelNumberForLabel());c=d.atomPropertyString(this.vwr,1086324748);null!=c&&e.put("shape",c);e.put("visible",Boolean.$valueOf(d.checkVisible()));e.put("clickabilityFlags",Integer.$valueOf(d.clickabilityFlags));e.put("visibilityFlags",Integer.$valueOf(d.shapeVisibilityFlags));e.put("spacefill",Float.$valueOf(d.getRadius()));c=JU.Escape.escapeColor(this.vwr.gdata.getColorArgbOrGray(d.colixAtom));null!=c&&e.put("color",c);e.put("colix",Integer.$valueOf(d.colixAtom));(c=JU.C.isColixTranslucent(d.colixAtom))&&
e.put("translucent",Boolean.$valueOf(c));e.put("formalCharge",Integer.$valueOf(d.getFormalCharge()));e.put("partialCharge",Float.$valueOf(d.getPartialCharge()));c=d.getSurfaceDistance100()/100;0<=c&&e.put("surfaceDistance",Float.$valueOf(c));b.am[d.mi].isBioModel&&(e.put("resname",d.getGroup3(!1)),c=d.group.getInsertionCode(),f=d.getResno(),0<f&&e.put("resno",Integer.$valueOf(f)),0!=c.charCodeAt(0)&&e.put("insertionCode",""+c),e.put("name",b.at[a].getAtomName()),e.put("chain",d.getChainIDStr()),e.put("atomID",
Integer.$valueOf(d.atomID)),e.put("groupID",Integer.$valueOf(d.group.groupID)),"\x00"!=d.altloc&&e.put("altLocation",""+d.altloc),e.put("structure",Integer.$valueOf(d.group.getProteinStructureType().getId())),e.put("polymerLength",Integer.$valueOf(d.group.getBioPolymerLength())),e.put("occupancy",Integer.$valueOf(d.getOccupancy100())),a=d.getBfactor100(),e.put("temp",Integer.$valueOf(I(a/100))));return e},"~N,JU.P3,J.api.SymmetryInterface");k(c$,"getAllBondInfo",function(a){var c=new JU.Lst,f=this.vwr.ms,
b=f.bondCount,f=f.bo,d;p(a,String)&&(a=this.vwr.getAtomBitSet(a));var e=new JU.P3;if(p(a,Array)){d=a[0];var g=a[1];for(a=0;a<b;a++){var j=f[a].atom1.i,h=f[a].atom2.i;(d.get(j)&&g.get(h)||g.get(j)&&d.get(h))&&c.addLast(this.getBondInfo(a,e))}}else if(p(a,JM.BondSet)){d=a;for(a=d.nextSetBit(0);0<=a&&a<b;a=d.nextSetBit(a+1))c.addLast(this.getBondInfo(a,e))}else if(p(a,JU.BS)){d=a;g=1==d.cardinality()?d.nextSetBit(0):-1;for(a=0;a<b;a++)(0<=g?f[a].atom1.i==g||f[a].atom2.i==g:d.get(f[a].atom1.i)&&d.get(f[a].atom2.i))&&
c.addLast(this.getBondInfo(a,e))}return c},"~O");k(c$,"getBondInfo",function(a,c){var f=this.vwr.ms.bo[a],b=f.atom1,d=f.atom2,e=new java.util.Hashtable;e.put("_bpt",Integer.$valueOf(a));var g=new java.util.Hashtable;this.vwr.ms.getAtomIdentityInfo(b.i,g,c);var j=new java.util.Hashtable;this.vwr.ms.getAtomIdentityInfo(d.i,j,c);e.put("atom1",g);e.put("atom2",j);e.put("jmol_order","0x"+Integer.toHexString(f.getBondType()));e.put("edge_type",Integer.$valueOf(f.getBondType()));e.put("order",Float.$valueOf(JU.Edge.getBondOrderNumberFromOrder(f.getBondType())));
e.put("type",JU.Edge.getBondOrderNameFromOrder(f.getBondType()));e.put("radius",Float.$valueOf(f.mad/2E3));e.put("length_Ang",Float.$valueOf(b.distance(d)));e.put("visible",Boolean.$valueOf(0!=f.shapeVisibilityFlags));b=JU.Escape.escapeColor(this.vwr.gdata.getColorArgbOrGray(f.colix));null!=b&&e.put("color",b);e.put("colix",Integer.$valueOf(f.colix));JU.C.isColixTranslucent(f.colix)&&e.put("translucent",Boolean.TRUE);return e},"~N,JU.P3");k(c$,"getAllChainInfo",function(a){for(var c=new java.util.Hashtable,
f=new JU.Lst,b=this.vwr.ms.mc,d=0;d<b;++d){var e=new java.util.Hashtable,g=this.getChainInfo(d,a);0<g.size()&&(e.put("modelIndex",Integer.$valueOf(d)),e.put("chains",g),f.addLast(e))}c.put("models",f);return c},"JU.BS");k(c$,"getChainInfo",function(a,c){for(var f=this.vwr.ms.am[a],b=f.getChainCount(!0),d=new JU.Lst,e=new JU.P3,g=0;g<b;g++){for(var j=f.getChainAt(g),h=new JU.Lst,k=j.groupCount,l=new java.util.Hashtable,n=0;n<k;n++){var p=j.groups[n];c.get(p.firstAtomIndex)&&h.addLast(p.getGroupInfo(n,
e))}h.isEmpty()||(l.put("residues",h),d.addLast(l))}return d},"~N,JU.BS");k(c$,"getAllPolymerInfo",function(a){var c=new java.util.Hashtable;null!=this.vwr.ms.bioModelset&&this.vwr.ms.bioModelset.getAllPolymerInfo(a,c);return c},"JU.BS");k(c$,"getBasePairInfo",function(a){var c=new JU.SB,f=new JU.Lst;this.vwr.ms.calcRasmolHydrogenBonds(a,a,f,!0,1,!1,null);for(a=f.size();0<=--a;){var b=f.get(a);JV.PropertyManager.getAtomResidueInfo(c,b.atom1);c.append(" - ");JV.PropertyManager.getAtomResidueInfo(c,
b.atom2);c.append("\n")}return c.toString()},"JU.BS");c$.getAtomResidueInfo=k(c$,"getAtomResidueInfo",function(a,c){a.append("[").append(c.getGroup3(!1)).append("]").append(c.group.getSeqcodeString()).append(":");var f=c.getChainID();a.append(0==f?" ":c.getChainIDStr())},"JU.SB,JM.Atom");k(c$,"getAppletInfo",function(){var a=new java.util.Hashtable;a.put("htmlName",this.vwr.htmlName);a.put("syncId",this.vwr.syncId);a.put("fullName",this.vwr.fullName);a.put("codeBase",""+JV.Viewer.appletCodeBase);
this.vwr.isApplet&&(a.put("documentBase",JV.Viewer.appletDocumentBase),a.put("registry",this.vwr.sm.getRegistryInfo()));a.put("version",JV.JC.version);a.put("date",JV.JC.date);a.put("javaVendor",JV.Viewer.strJavaVendor);a.put("javaVersion",JV.Viewer.strJavaVersion+(!JV.Viewer.isJS?"":this.vwr.isWebGL?"(WebGL)":"(HTML5)"));a.put("operatingSystem",JV.Viewer.strOSName);return a});k(c$,"getAnimationInfo",function(){var a=this.vwr.am,c=new java.util.Hashtable;c.put("firstModelIndex",Integer.$valueOf(a.firstFrameIndex));
c.put("lastModelIndex",Integer.$valueOf(a.lastFrameIndex));c.put("animationDirection",Integer.$valueOf(a.animationDirection));c.put("currentDirection",Integer.$valueOf(a.currentDirection));c.put("displayModelIndex",Integer.$valueOf(a.cmi));null!=a.animationFrames&&(c.put("isMovie",Boolean.TRUE),c.put("frames",JU.Escape.eAI(a.animationFrames)),c.put("currentAnimationFrame",Integer.$valueOf(a.caf)));c.put("displayModelNumber",this.vwr.getModelNumberDotted(a.cmi));c.put("displayModelName",0<=a.cmi?this.vwr.getModelName(a.cmi):
"");c.put("animationFps",Integer.$valueOf(a.animationFps));c.put("animationReplayMode",JS.T.nameOf(a.animationReplayMode));c.put("firstFrameDelay",Float.$valueOf(a.firstFrameDelay));c.put("lastFrameDelay",Float.$valueOf(a.lastFrameDelay));c.put("animationOn",Boolean.$valueOf(a.animationOn));c.put("animationPaused",Boolean.$valueOf(a.animationPaused));return c});k(c$,"getBoundBoxInfo",function(){var a=this.vwr.ms.getBoxInfo(null,1).getBoundBoxPoints(!0),c=new java.util.Hashtable;c.put("center",JU.P3.newP(a[0]));
c.put("vector",JU.V3.newV(a[1]));c.put("corner0",JU.P3.newP(a[2]));c.put("corner1",JU.P3.newP(a[3]));return c});k(c$,"getShapeInfo",function(){var a=new java.util.Hashtable,c=new JU.SB,f=this.vwr.shm.shapes;if(null!=f)for(var b=0;37>b;++b){var d=f[b];if(null!=d){var e=JV.JC.shapeClassBases[b],d=d.getShapeDetail();null!=d&&a.put(e,d)}}0<c.length()&&a.put("shapeCommands",c.toString());return a});k(c$,"getAnnotationInfo",function(a,c){var f=this.vwr.getAtomBitSet(a),f=this.vwr.ms.getModelBS(f,!1).nextSetBit(0);
if(0>f)return null;var b=this.vwr.ms.getModelAuxiliaryInfo(f).get(1073741925==c?"domains":"validation");if(null==b||6!=b.tok)return null;this.vwr.getAnnotationParser(!1).initializeAnnotation(b,c,f);return b.mapGet("_list")},"~O,~N");k(c$,"getMeasurementInfo",function(){return this.vwr.getShapeProperty(6,"info")});k(c$,"getMouseInfo",function(){if(!this.vwr.haveDisplay)return null;for(var a=new java.util.Hashtable,c=new JU.Lst,f=this.vwr.acm,b,d=f.b.getBindings().values().iterator();d.hasNext()&&((b=
d.next())||1);)p(b,Boolean)||(JU.AU.isAI(b)&&(b=w(-1,[JV.binding.Binding.getMouseActionName(b[0],!1),JV.ActionManager.getActionName(b[1])])),c.addLast(b));a.put("bindings",c);a.put("bindingName",f.b.name);a.put("actionNames",JV.ActionManager.actionNames);a.put("actionInfo",JV.ActionManager.actionInfo);a.put("bindingInfo",JU.PT.split(f.getBindingInfo(null),"\n"));return a});v(c$,"getPdbAtomData",function(a,c,f,b,d){return 0==this.vwr.ms.ac||0>a.nextSetBit(0)?"":this.getModel("PDB",a,w(-1,[new Boolean(f),
new Boolean(b),new Boolean(d)]),c)},"JU.BS,JU.OC,~B,~B,~B");v(c$,"getPdbData",function(a,c,f,b,d,e){this.vwr.ms.isJmolDataFrameForModel(a)&&(a=this.vwr.ms.getJmolDataSourceFrame(a));if(0>a)return"";var g=this.vwr.ms.am[a],j=g.isBioModel;if(null==b&&!j)return null;null==d&&(d=this.vwr.getOutputChannel(null,null));var h=new JU.SB,k=0<=c.indexOf("draw"),l=null,n=new JU.BS,p="\x00",s=this.vwr.ms.getLabeler().compile(this.vwr,"ATOM  %-6i%4a%1A%3.-3n %1c%4R%1E   ","\x00",null);if(null==b)p=11<c.length&&
0<=c.indexOf("quaternion ")?c.charAt(11):"R",g.getPdbData(c,p,k,f,d,s,h,n),l=this.vwr.getModelUndeletedAtomsBitSet(a);else{l=b[0];a=b[1];var g=b[2],t=b[3],u=null!=g,r=null!=t,v=b[4],q=b[5],z=b[6],C=b[7],A=b[8],B=b[9];b=null!=z&&null==A;var E=this.vwr.ms.at;if(b){d.append("REMARK   6 Jmol PDB-encoded data: ").append(c).append("; ").append(JV.Viewer.getJmolVersion()).append("; ").append(this.vwr.apiPlatform.getDateFormat(null)).append("\n");d.append("REMARK   6 Jmol data").append(" min = ").append(JU.Escape.eP(v)).append(" max = ").append(JU.Escape.eP(q)).append(" unScaledXyz = xyz * ").append(JU.Escape.eP(z)).append(" + ").append(JU.Escape.eP(C)).append(";\n");
q=null;for(c=l.nextSetBit(0);0<=c;c=l.nextSetBit(c+1))if(v=""+E[c].getAtomName(),null!=q||4<v.length)null==q?(q="",c=-1):q+=" "+v;null!=q&&d.append("REMARK   6 Jmol atom names").append(q).append("\n");q=null;for(c=l.nextSetBit(0);0<=c;c=l.nextSetBit(c+1))if(v=""+E[c].getGroup3(!0),null!=q||3<v.length)null==q?(q="",c=-1):q+=" "+v;null!=q&&d.append("REMARK   6 Jmol residue names").append(q).append("\n");for(c=0;c<B.length;c++)null!=B[c]&&d.append("REMARK   6 Jmol property ").append(B[c]).append(";\n")}B=
null;v=new JU.P3;b||(null==A&&(A="%-5i %-10s %-13.5f "+(r?"%-13.5f %-13.5f":u?"%-13.5f":"")),A+="\n");c=l.nextSetBit(0);for(q=0;0<=c;c=l.nextSetBit(c+1),q++){var z=a[q],C=u?g[q]:0,F=r?t[q]:0;if(!Float.isNaN(z)&&!Float.isNaN(C)&&!Float.isNaN(F)){var y=E[c];b?(d.append(JM.LabelToken.formatLabelAtomArray(this.vwr,y,s,"\x00",null,v)),j&&n.set(c),d.append(JU.PT.sprintf("%-8.2f%-8.2f%-10.2f    %6.3f          %2s    %s\n","ssF",w(-1,[y.getElementSymbolIso(!1).toUpperCase(),"",x(-1,[z,C,F,0])]))),null!=B&&
B.group.getBioPolymerIndexInModel()==y.group.getBioPolymerIndexInModel()&&h.append("CONECT").append(JU.PT.formatStringI("%5i","i",B.getAtomNumber())).append(JU.PT.formatStringI("%5i","i",y.getAtomNumber())).appendC("\n")):r?d.append(JU.PT.sprintf(A,"isF",w(-1,[Integer.$valueOf(y.getAtomNumber()),y.getAtomName(),x(-1,[z,C,F])]))):u?d.append(JU.PT.sprintf(A,"isF",w(-1,[Integer.$valueOf(y.getAtomNumber()),y.getAtomName(),x(-1,[z,C])]))):d.append(JU.PT.sprintf(A,"isF",w(-1,[Integer.$valueOf(y.getAtomNumber()),
y.getAtomName(),x(-1,[z])])));B=y}}}d.append(h.toString());if(k)return d.toString();f.and(l);j&&e&&d.append("\n\n"+this.vwr.ms.getProteinStructureState(n,"R"==p?4138:1073742086));return d.toString()},"~N,~S,JU.BS,~A,JU.OC,~B");v(c$,"getModelCml",function(a,c,f,b,d){return this.getModel("CML",a,w(-1,[new Integer(c),new Boolean(f),new Boolean(b),new Boolean(d)]),null)},"JU.BS,~N,~B,~B,~B");v(c$,"fixJMEFormalCharges",function(a,c){var f=!1;if(null==a)return c;for(var b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+
1)){var d=this.vwr.ms.at[b];if(0!=d.getFormalCharge()){f=!0;break}}if(!f)return c;f=this.vwr.getSmilesMatcher().getMapForJME(c,this.vwr.ms.at,a);if(null==f)return c;for(var d=f[0],e=f[1],f=JU.PT.getTokens(c),g=JU.PT.parseInt(f[0]),g=O(g,0),b=d.length;0<=--b;)g[d[b]]=e[b]+1;b=0;for(e=2;e<f.length;e+=3){var j=f[e];if(-2147483648!=JU.PT.parseInt(j))break;j=JU.PT.replaceAllCharacters(j,"+-","");d=this.vwr.ms.at[g[b++]-1];if(!d.getElementSymbol().equals(j))return c;d=d.getFormalCharge();0!=d&&(f[e]=j+
(0<d?"+":"-")+(1<Math.abs(d)?""+Math.abs(d):""))}return JU.PT.join(f," ",0)},"JU.BS,~S");H(c$,"atomExpression","<atom selection>");c$.propertyTypes=c$.prototype.propertyTypes=w(-1,"appletInfo;;;fileName;;;fileHeader;;;fileContents;<pathname>;;fileContents;;;animationInfo;;;modelInfo;<atom selection>;{*};ligandInfo;<atom selection>;{*};shapeInfo;;;measurementInfo;;;centerInfo;;;orientationInfo;;;transformInfo;;;;;;atomInfo;<atom selection>;(visible);bondInfo;<atom selection>;(visible);chainInfo;<atom selection>;(visible);polymerInfo;<atom selection>;(visible);moleculeInfo;<atom selection>;(visible);stateInfo;<state type>;all;extractModel;<atom selection>;(visible);jmolStatus;statusNameList;;jmolViewer;;;messageQueue;;;auxiliaryInfo;<atom selection>;{*};boundBoxInfo;;;dataInfo;<data type>;types;image;<width=www,height=hhh>;;evaluate;<expression>;;menu;<type>;current;minimizationInfo;;;pointGroupInfo;<atom selection>;(visible);fileInfo;<type>;;errorMessage;;;mouseInfo;;;isosurfaceInfo;;;isosurfaceData;;;consoleText;;;JSpecView;<key>;;scriptQueueInfo;;;nmrInfo;<elementSymbol> or 'all' or 'shifts';all;variableInfo;<name>;all;domainInfo;<atom selection>;{visible};validationInfo;<atom selection>;{visible};service;<hashTable>;;CIFInfo;<filename>;;modelkitInfo;<key>;data;unitcellInfo;;".split(";"));
H(c$,"PROP_APPLET_INFO",0,"PROP_FILENAME",1,"PROP_FILEHEADER",2,"PROP_FILECONTENTS_PATH",3,"PROP_FILECONTENTS",4,"PROP_ANIMATION_INFO",5,"PROP_MODEL_INFO",6,"PROP_LIGAND_INFO",7,"PROP_SHAPE_INFO",8,"PROP_MEASUREMENT_INFO",9,"PROP_CENTER_INFO",10,"PROP_ORIENTATION_INFO",11,"PROP_TRANSFORM_INFO",12,"PROP_ATOM_INFO",14,"PROP_BOND_INFO",15,"PROP_CHAIN_INFO",16,"PROP_POLYMER_INFO",17,"PROP_MOLECULE_INFO",18,"PROP_STATE_INFO",19,"PROP_EXTRACT_MODEL",20,"PROP_JMOL_STATUS",21,"PROP_JMOL_VIEWER",22,"PROP_MESSAGE_QUEUE",
23,"PROP_AUXILIARY_INFO",24,"PROP_BOUNDBOX_INFO",25,"PROP_DATA_INFO",26,"PROP_IMAGE",27,"PROP_EVALUATE",28,"PROP_MENU",29,"PROP_MINIMIZATION_INFO",30,"PROP_POINTGROUP_INFO",31,"PROP_FILE_INFO",32,"PROP_ERROR_MESSAGE",33,"PROP_MOUSE_INFO",34,"PROP_ISOSURFACE_INFO",35,"PROP_ISOSURFACE_DATA",36,"PROP_CONSOLE_TEXT",37,"PROP_JSPECVIEW",38,"PROP_SCRIPT_QUEUE_INFO",39,"PROP_NMR_INFO",40,"PROP_VAR_INFO",41,"PROP_DOM_INFO",42,"PROP_VAL_INFO",43,"PROP_SERVICE",44,"PROP_CIF_INFO",45,"PROP_MODELKIT_INFO",46,
"PROP_UNITCELL_INFO",47,"PROP_COUNT",48,"readableTypes",w(-1," stateinfo extractmodel filecontents fileheader image menu minimizationInfo".split(" ")))})})(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);
