(function(Q,R,S,T,H,U,G,n,I,K,L,V,W,M,X,Y,N,z,Z,O,$,aa,P,ba,ca,da,ea,w,fa,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,k,v){G("J.api");P(J.api,"JmolPropertyManager");G("JV");I(["J.api.JmolPropertyManager","java.util.Hashtable"],"JV.PropertyManager","java.util.Arrays JU.AU $.BArray $.BS $.Base64 $.Lst $.M3 $.P3 $.PT $.SB $.V3 J.api.Interface JM.LabelToken JS.SV $.T JU.BSUtil $.C $.Edge $.Escape $.JmolMolecule $.Logger JV.ActionManager $.FileManager $.JC $.Viewer JV.binding.Binding".split(" "),
function(){var h=L(function(){this.map=this.vwr=null;K(this,arguments)},JV,"PropertyManager",null,J.api.JmolPropertyManager);O(h,function(){this.map=new java.util.Hashtable});M(h,function(){});v(h,"setViewer",function(a){this.vwr=a;for(var b=a=0;a<JV.PropertyManager.propertyTypes.length;a+=3,b++)0<JV.PropertyManager.propertyTypes[a].length&&this.map.put(JV.PropertyManager.propertyTypes[a].toLowerCase(),Integer.$valueOf(b))},"JV.Viewer");v(h,"getPropertyNumber",function(a){a=this.map.get(null==a?"":
a.toLowerCase());return null==a?-1:a.intValue()},"~S");v(h,"getDefaultPropertyParam",function(a){return 0>a?"":JV.PropertyManager.propertyTypes[3*a+2]},"~N");v(h,"checkPropertyParameter",function(a){a=this.getPropertyNumber(a);a=JV.PropertyManager.getParamType(a);return 0<a.length&&"<atom selection>"!==a},"~S");v(h,"getProperty",function(a,b,f){144!=JV.PropertyManager.propertyTypes.length&&JU.Logger.warn("propertyTypes is not the right length: "+JV.PropertyManager.propertyTypes.length+" != 144");
var d;0<=b.indexOf(".")||0<=b.indexOf("[")?(d=this.getArguments(b),f=this.getPropertyAsObject(d[0].asString(),f,null),d=this.extractProperty(f,d,1,null,!1)):d=this.getPropertyAsObject(b,f,a);if(null==a)return d;(f=a.equalsIgnoreCase("readable"))&&(a=JV.PropertyManager.isReadableAsString(b)?"String":"JSON");return a.equalsIgnoreCase("String")?null==d?"":d.toString():f?JU.Escape.toReadable(b,d):a.equalsIgnoreCase("JSON")?JS.SV.safeJSON(b,d):d},"~S,~S,~O");k(h,"getArguments",function(a){var b=a.toLowerCase(),
f=-1;if(0<=a.indexOf('"')||0<=a.indexOf("'"))a=this.fixSelectQuotes(a);for(;0<=(f=b.indexOf("[select ",++f));){var d=b.indexOf(" where ",f),c=b.indexOf(" wherein ",f);0<c&&c<d&&(d=c);var e=b.indexOf("][select ",f);0>e&&(e=b.lastIndexOf("]"));c=b.indexOf("[",f);0<=c&&c<e&&(d=c);0>d||d>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 b=Array(a.length),f=0,g;f<a.length;f++)b[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 b},"~S");k(h,"fixSelectQuotes",function(a){a=a.toCharArray();for(var b=!1,f=!1,d=!1,c=a.length;0<=--c;)switch(a[c].charCodeAt(0)){case 39:d||
(b=f=!b);break;case 34:f||(b=d=!b);break;case 46:b&&(a[c]="\u0001");break;case 91:b&&(a[c]="\u0002");break;case 93:b&&(a[c]="\u0003")}return a=String.instantialize(a)},"~S");v(h,"extractProperty",function(a,b,f,d,c){0>f&&(b=this.getArguments(b),f=0);if(f>=b.length)return a;if(!c){c=b=this.compileSelect(b);var e=f;for(b=c.length;e<b;e++)if(1275082241==c[e].tok){d=Array(e+1);for(var g=0;g<=e;g++)d[g]=c[g];for(a=this.extractProperty(a,d,f,null,!0);++e<b;)d[d.length-1]=c[e],a=this.extractProperty(a,d,
d.length-1,null,!0);return a}b=c}var t=b[f++];c=JS.SV.oValue(a);switch(t.tok){case 2:e=t.intValue-1;if(n(c,"JU.Lst"))return g=c,0>e&&(e+=g.size()),0<=e&&e<g.size()?this.extractProperty(g.get(e),b,f,null,!0):"";if(n(c,"JU.M3"))return g=c,d=w(-1,[z(-1,[g.m00,g.m01,g.m02]),z(-1,[g.m10,g.m11,g.m12]),z(-1,[g.m20,g.m21,g.m22])]),0>e&&(e+=3),0<=e&&3>e?this.extractProperty(d,b,--f,null,!0):"";if(n(c,"JU.M4"))return g=c,d=w(-1,[z(-1,[g.m00,g.m01,g.m02,g.m03]),z(-1,[g.m10,g.m11,g.m12,g.m13]),z(-1,[g.m20,g.m21,
g.m22,g.m23]),z(-1,[g.m30,g.m31,g.m32,g.m33])]),0>e&&(e+=4),0<=e&&4>e?this.extractProperty(d,b,--f,null,!0):"";if(JU.AU.isAI(c))return 0>e&&(e+=c.length),0<=e&&e<c.length?Integer.$valueOf(c[e]):"";if(JU.AU.isAD(c))return 0>e&&(e+=c.length),0<=e&&e<c.length?Double.$valueOf(c[e]):"";if(JU.AU.isAF(c))return 0>e&&(e+=c.length),0<=e&&e<c.length?Float.$valueOf(c[e]):"";if(JU.AU.isAII(c)||JU.AU.isAFF(c))return 0>e&&(e+=c.length),0<=e&&e<c.length?this.extractProperty(c[e],b,f,null,!0):"";if(JU.AU.isAS(c)||
n(c,Array))return 0>e&&(e+=c.length),0<=e&&e<c.length?c[e]:"";break;case 1275082241:case 4:if(n(c,"java.util.Map")){var j,h=!1,g=a=!1,l=1275082241==t.tok?t.value[0]:null,m=null;if(1275082241==t.tok)if(g=!0,m=t.value[1],j=t.myName,a=0<=j.indexOf(";"),j.contains("**")){for(var k=0==l.size(),p="",q,x=c.entrySet().iterator();x.hasNext()&&((q=x.next())||1);)for(var r=q.getKey(),e=k?1:l.size();0<=--e;)if(k||JU.PT.isLike(r,l.get(e))){h=q.getValue();j=!1;switch(n(h,"JS.SV")?h.tok:0){case 7:j=!0;h=h.getList();
break;case 6:case 14:h=h.getMap();break;default:if(!n(h,"java.util.Map")&&!(j=n(h,"JU.Lst"))){if(j||null==m)continue;h=new java.util.Hashtable;h.put("key",JS.SV.newS(r));h.put("value",q.getValue());this.vwr.checkSelect(h,m)&&(p+=","+r);continue}}if(j){null==d&&(d=new JU.Lst);f=h;b=f.size();for(t=0;t<b;t++)if(h=f.get(t),n(h,"JS.SV")&&null!=(h=h.getMap()))(null==m||this.vwr.checkSelect(h,m))&&d.addLast(h);return d}if(null==m||this.vwr.checkSelect(h,m))p+=","+r}if(0==p.length)return new JU.Lst;j=p.substring(1);
h=!a;l=null}else{if(null!=m&&!this.vwr.checkSelect(c,m))return""}else if(j=t.asString(),j.equalsIgnoreCase("keys")){d=new JU.Lst;for(c=c.keySet().iterator();c.hasNext()&&((r=c.next())||1);)d.addLast(r);return this.extractProperty(d,b,f,null,!0)}e=a||0<=j.indexOf(",")||0<=j.indexOf(";");g&&!e&&(e=!0,j+=",");q=a||j.startsWith("*")||j.endsWith("*")||e;r=null!=d;if(q&&(r||(d=new JU.Lst),!a&&(null==l?1==j.length:0==l.size()))){if(f==b.length){if(!r)return c;d.addLast(c);return d}return this.extractProperty(c,
b,f,d,!0)}j.contains("**")&&(j=JU.PT.rep(j,"**","*"));q&&!e&&(j+=",");if(h||a||j.contains(",")){q=new java.util.Hashtable;null!=l&&0==l.size()&&(l=null,j="*");a=(new Boolean(a|1==t.index)).valueOf();if(null==l){l=JU.PT.split(j,",");for(e=l.length;0<=--e;)JV.PropertyManager.getMapSubset(c,l[e],q,a?d:null)}else for(e=0;e<l.size();e++){j=l.get(e);m=null;t=j.indexOf("[");if(0<t&&j.endsWith("]"))m=j.substring(t+1,j.length-1),j=j.substring(0,t),m=JU.PT.trim(m,"'\"");else if(0<=(t=j.indexOf(".")))m=j.substring(t+
1),j=j.substring(0,t);k=d.size();JV.PropertyManager.getMapSubset(c,j,q,a?d:null);if(null!=m)for(t=d.size();--t>=k;)g=d.get(t),n(g,"JS.SV")&&(j=g,g=j.getMap(),null!=g?g=g.get(m):(g=JU.PT.parseInt(m),j=j.getList(),g=0<=g&&g<j.size()?j.get(g):null),null==g?d.removeItemAt(t):d.set(t,g))}if(h&&!r)return q;if(f==b.length){if(!a){if(!r)return q;d.addLast(q)}return d}return this.extractProperty(q,b,f,r?d:null,!0)}j=this.checkMap(c,j,q,d,b,f,g);return null!=j&&!q?this.extractProperty(c.get(j),b,f,null,!0):
!q?"":d}if(n(c,"JU.Lst")){g=c;null==d&&(d=new JU.Lst);f--;j=!1;for(e=0;e<g.size();e++)if(h=g.get(e),n(h,"java.util.Map")||(j=n(h,"JU.Lst"))||n(h,"JS.SV")&&(null!=h.getMap()||(j=null!=h.getList())))j||1==t.index?(c=this.extractProperty(h,b,f,null,!0),""!==c&&d.addLast(c)):this.extractProperty(h,b,f,d,!0);return d}}return a},"~O,~O,~N,JU.Lst,~B");h.getMapSubset=k(h,"getMapSubset",function(a,b,f,d){if(b.startsWith('"')||b.startsWith("'"))b=JU.PT.trim(b,"\"'");var c=a.get(b);if(null!=c)null==d?f.put(b,
c):d.addLast(c);else{var e;for(a=a.entrySet().iterator();a.hasNext()&&((e=a.next())||1);)c=e.getKey(),JU.PT.isLike(c,b)&&(null==d?f.put(c,e.getValue()):d.addLast(e.getValue()))}},"java.util.Map,~S,java.util.Map,JU.Lst");k(h,"compileSelect",function(a){for(var b=null,f=a.length;0<=--f;)if(4==a[f].tok){var d=a[f].value,c=d.toUpperCase();c.startsWith("WHERE")&&(c=(d="SELECT * "+d).toUpperCase());if(c.startsWith("SELECT ")){null==b&&(b=JU.AU.arrayCopyObject(a,a.length));c=(d=d.substring(6).trim()).toUpperCase();
if(c.startsWith("WHERE ")||c.startsWith("WHEREIN "))c=(d="* "+d).toUpperCase();var e=c.indexOf(" WHEREIN "),g=0>e?"":0<=d.indexOf(";")?";**":",**";0>e&&(e=c.indexOf(" WHERE "));var c=d.substring(0,0>e?d.length:e).trim(),h=0;c.startsWith("(")&&c.endsWith(")")?c=c.substring(1,c.length-1)+";":c.startsWith("[")&&c.endsWith("]")&&(c=c.substring(1,c.length-1),h=1);0>e?(b[f]=JS.SV.newV(1275082241,w(-1,[this.getKeys(c),null])),b[f].myName=c,b[f].index=h):(c+=g,d=d.substring(e+6+g.length).trim(),d=this.vwr.compileExpr(d),
d=w(-1,[this.getKeys(c),d]),b[f]=JS.SV.newV(1275082241,d),b[f].index=h,b[f].myName=c)}}return null==b?a:b},"~A");k(h,"getKeys",function(a){var b=new JU.Lst;a=JU.PT.rep(JU.PT.rep(a,"**","*"),";",",")+",";for(var f=0,d=-1;0<=(d=a.indexOf(",",d+1));)if(d>f){var c=a.substring(f,d);if(c.equals("*")){if(0==b.size())break}else b.addLast(c),f=d+1}return b},"~S");k(h,"checkMap",function(a,b,f,d,c,e,g){var h=null==d&&a.containsKey(b);if(!h)for(var j=b.contains(";"),k=j?JU.PT.split(b,";"):null,l=f&&!g?b.toLowerCase():
null,m,y=a.keySet().iterator();y.hasNext()&&((m=y.next())||1);){if(j){for(var p=k.length;0<=--p;b=null)if(b=k[p],0!=b.length){if(g){if(!JU.PT.isLike(m,b))continue;break}l=0<=b.indexOf("*")?b.toLowerCase():null;if(this.checkKey(m,b,l))break}if(null==b)continue}else if(g?!JU.PT.isLike(m,b):!this.checkKey(m,b,l))continue;if(null==d)return m;d.addLast(this.extractProperty(a.get(m),c,e,null,!0));if(!f&&!j)return null}return h?b:null},"java.util.Map,~S,~B,JU.Lst,~O,~N,~B");k(h,"checkKey",function(a,b,f){return a.equalsIgnoreCase(b)||
null!=f&&JU.PT.isLike(a.toLowerCase(),f)},"~S,~S,~S");h.getPropertyName=k(h,"getPropertyName",function(a){return 0>a?"":JV.PropertyManager.propertyTypes[3*a]},"~N");h.getParamType=k(h,"getParamType",function(a){return 0>a?"":JV.PropertyManager.propertyTypes[3*a+1]},"~N");h.isReadableAsString=k(h,"isReadableAsString",function(a){for(var b=JV.PropertyManager.readableTypes.length;0<=--b;)if(a.equalsIgnoreCase(JV.PropertyManager.readableTypes[b]))return!0;return!1},"~S");k(h,"getPropertyAsObject",function(a,
b,f){if(a.equals("tokenList"))return JS.T.getTokensLike(b);var d=null,c=a.indexOf("#");0<c&&(d=w(-1,[a.substring(c+1),b]),a=a.substring(0,c));var c=this.getPropertyNumber(a),e=null!=d||null!=b&&""!==b;null==d&&(d=e?b:this.getDefaultPropertyParam(c));switch(c){case 47:return this.getUnitCellInfo();case 46:return this.vwr.getModelkitPropertySafely(d.toString());case 0:return this.getAppletInfo();case 5:return this.getAnimationInfo();case 14:return this.getAllAtomInfo(this.vwr.getAtomBitSet(d));case 24:return this.vwr.getModelSetAuxiliaryInfoForAtoms(d);
case 15:return this.getAllBondInfo(d);case 25:return this.getBoundBoxInfo();case 10:return this.vwr.tm.fixedRotationCenter;case 16:return this.getAllChainInfo(this.vwr.getAtomBitSet(d));case 37:return this.vwr.getProperty("DATA_API","consoleText",null);case 26:return this.vwr.getDataObj(d.toString(),null,-1);case 33:return this.vwr.getErrorMessageUn();case 28:return this.vwr.evaluateExpression(d.toString());case 20:return this.vwr.getModelExtract(d,!0,!1,"MOL");case 32:return JV.PropertyManager.getFileInfo(this.vwr.getFileData(),
d.toString());case 45:return this.vwr.readCifData(d.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(d.toString(),!0,null):this.vwr.getCurrentFileAsString("prop");case 27:return a=d.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(d.toString());case 41:return this.getVariables(d.toString());case 21:return this.vwr.getStatusChanged(d.toString());case 22:return this.vwr;case 38:return this.vwr.getJspecViewProperties(d);case 7:return this.getLigandInfo(this.vwr.getAtomBitSet(d));case 9:return this.getMeasurementInfo();case 29:return this.vwr.getMenu(d.toString());case 23:return this.vwr.sm.messageQueue;case 30:return this.vwr.getMinimizationInfo();case 6:return this.getModelInfo(this.vwr.getAtomBitSet(d));
case 18:return this.getMoleculeInfo(this.vwr.getAtomBitSet(d));case 34:return this.getMouseInfo();case 11:return this.vwr.tm.getOrientationInfo();case 31:return this.vwr.ms.getPointGroupInfo(this.vwr.getAtomBitSet(d));case 17:return this.getAllPolymerInfo(this.vwr.getAtomBitSet(d));case 39:return this.vwr.getScriptQueueInfo();case 8:return this.getShapeInfo();case 19:return this.vwr.getStateInfo3(d.toString(),0,0);case 12:return JU.M3.newM3(this.vwr.tm.matrixRotate);case 42:return this.getAnnotationInfo(d,
1073741925);case 43:return this.getAnnotationInfo(d,1073742189);case 44:return d=JS.SV.oValue(d),d=n(d,"java.util.Map")?d:null,null==d?null:this.vwr.sm.processService(d)}f=Array(48);for(b=0;48>b;b++)d=JV.PropertyManager.getParamType(b),c=this.getDefaultPropertyParam(b),e=JV.PropertyManager.getPropertyName(b),f[b]=0==e.length||"X"==e.charAt(0)?"":e+(""!==d?" "+JV.PropertyManager.getParamType(b)+(""!==c?" #default: "+this.getDefaultPropertyParam(b):""):"");java.util.Arrays.sort(f);d=new JU.SB;d.append("getProperty ERROR\n").append(a).append("?\nOptions include:\n");
for(b=0;48>b;b++)0<f[b].length&&d.append("\n getProperty ").append(f[b]);return d.toString()},"~S,~O,~S");k(h,"getUnitCellInfo",function(){var a=this.vwr.getCurrentUnitCell();return null==a?"":a.getUnitCellInfoMap()});k(h,"getImage",function(a,b){var f=-1,d=-1,c;if(0<=(c=a.indexOf("height=")))f=JU.PT.parseInt(a.substring(c+7));if(0<=(c=a.indexOf("width=")))d=JU.PT.parseInt(a.substring(c+6));0>d&&0>f?f=d=-1:0>d?d=f:f=d;var e="JPG";0<=a.indexOf("type=")&&(e=JU.PT.getTokens(JU.PT.replaceWithCharacter(a.substring(a.indexOf("type=")+
5),";,"," "))[0]);c=Array(1);f=this.vwr.getImageAsBytes(e.toUpperCase(),d,f,-1,c);return null!=c[0]?c[0]:b?new JU.BArray(f):JU.Base64.getBase64(f).toString()},"~S,~B");k(h,"getVariables",function(a){return a.toLowerCase().equals("all")?this.vwr.g.getAllVariables():this.vwr.evaluateExpressionAsVariable(a)},"~S");h.getFileInfo=k(h,"getFileInfo",function(a,b){var f=new java.util.Hashtable;if(null==a)return f;var d=null!=b&&0<b.length;if(n(a,"java.util.Map"))return d?a.get(b):a;var c=JU.PT.split(a,"\n");
if(0==c.length||7>c[0].length||" "!=c[0].charAt(6)||!c[0].substring(0,6).equals(c[0].substring(0,6).toUpperCase()))return f.put("fileHeader",a),f;var e="",g=new JU.SB;d&&(b=b.toUpperCase());for(var h="",j=0;j<c.length;j++){var k=c[j];if(!(12>k.length)){var h=k.substring(0,6).trim(),l=k.substring(7,10).trim();h.equals("REMARK")&&(h+=l);if(!h.equals(e)){if(d&&e.equals(b))return g.toString();d||(f.put(e,g.toString()),g=new JU.SB);e=h}(!d||h.equals(b))&&g.append(k).appendC("\n")}}d||f.put(e,g.toString());
return d?h.equals(b)?g.toString():"":f},"~O,~S");k(h,"getMoleculeInfo",function(a){a=this.vwr.getAtomBitSet(a);for(var b=this.vwr.ms.getMolecules(),f=new JU.Lst,d=new JU.BS,c=0;c<b.length;c++){var d=JU.BSUtil.copy(a),e=b[c];d.and(e.atomList);0<d.length()&&(d=new java.util.Hashtable,d.put("mf",e.getMolecularFormula(!0,null,!1)),d.put("number",Integer.$valueOf(e.moleculeIndex+1)),d.put("modelNumber",this.vwr.ms.getModelNumberDotted(e.modelIndex)),d.put("numberInModel",Integer.$valueOf(e.indexInModel+
1)),d.put("nAtoms",Integer.$valueOf(e.ac)),d.put("nElements",Integer.$valueOf(e.nElements)),f.addLast(d))}return f},"~O");v(h,"getModelInfo",function(a){a=this.vwr.ms.getModelBS(this.vwr.getAtomBitSet(a),!1);var b=this.vwr.ms,f=new java.util.Hashtable;f.put("modelSetName",b.modelSetName);f.put("modelIndex",Integer.$valueOf(this.vwr.am.cmi));f.put("modelCount",Integer.$valueOf(b.mc));f.put("isTainted",Boolean.$valueOf(null!=b.tainted));f.put("canSkipLoad",Boolean.$valueOf(b.canSkipLoad));f.put("modelSetHasVibrationVectors",
Boolean.$valueOf(b.modelSetHasVibrationVectors()));null!=b.modelSetProperties&&f.put("modelSetProperties",b.modelSetProperties);f.put("modelCountSelected",Integer.$valueOf(a.cardinality()));f.put("modelsSelected",a);var d=new JU.Lst;b.getMolecules();for(var c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1)){var e=new java.util.Hashtable;e.put("_ipt",Integer.$valueOf(c));e.put("num",Integer.$valueOf(b.getModelNumber(c)));e.put("file_model",b.getModelNumberDotted(c));e.put("name",b.getModelName(c));var g=
b.getModelTitle(c);null!=g&&e.put("title",g);g=b.getModelFileName(c);null!=g&&e.put("file",g);g=b.getInfo(c,"modelID");null!=g&&e.put("id",g);e.put("vibrationVectors",Boolean.$valueOf(this.vwr.modelHasVibrationVectors(c)));g=b.am[c];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(b.getChainCountInModelWater(c,!0)));null!=g.properties&&e.put("modelProperties",g.properties);var h=b.getInfo(c,"Energy");null!=h&&e.put("energy",h);e.put("atomCount",Integer.$valueOf(g.act));d.addLast(e)}f.put("models",d);return f},"~O");v(h,"getLigandInfo",function(a){var b=this.vwr.getAtomBitSet(a),f=this.vwr.getAtomBitSet("solvent");a=new java.util.Hashtable;var d=new JU.Lst;a.put("ligands",d);var c=this.vwr.ms,e=JU.BSUtil.copyInvert(b,c.ac);e.or(f);for(var f=
c.at,g=b.nextSetBit(0);0<=g;g=b.nextSetBit(g+1))(f[g].group.isProtein()||f[g].group.isDna()||f[g].group.isRna())&&f[g].group.setAtomBitsAndClear(e,b);b=Array(c.mc);for(g=c.mc;0<=--g;)b[g]=this.vwr.getModelUndeletedAtomsBitSet(g),b[g].andNot(e);e=JU.JmolMolecule.getMolecules(f,b,null,e);for(g=0;g<e.length;g++){var b=e[g].atomList,h=new java.util.Hashtable;d.addLast(h);h.put("atoms",JU.Escape.eBS(b));for(var j="",k="",l=null,m=0,y=null,p="",q="",x=2147483647,r=2147483647,u=b.nextSetBit(0);0<=u;u=b.nextSetBit(u+
1)){var s=f[u];if(l!==s.group){var l=s.group,n=s.getResno(),w=s.getChainID();x!=n-1&&(0!=p.length&&x!=r&&(p+="-"+x),w=-1,r=n);q="/"+c.getModelNumberDotted(s.mi);0!=m&&w!=m&&(p+=":"+y+q);-1==w&&(p+=" "+n);x=n;m=s.getChainID();y=s.getChainIDStr();j+=k+s.getGroup3(!1);k="-"}}p+=(r==x?"":"-"+x)+(0==m?"":":"+y)+q;h.put("groupNames",j);h.put("residueList",p.substring(1))}return a},"~O");v(h,"getAtomData",function(a,b,f){a.startsWith("{")||(a="{"+a+"}");var d=b.toLowerCase().startsWith("user:"),c=b.toLowerCase().startsWith("property_");
f&&(!d&&!c)&&(b=b.toUpperCase());d=c?"%{"+b+"}":d?b.substring(5):b.equals("xyzrn")?"%-2e %8.3x %8.3y %8.3z %4.2[vdw] 1 [%n]%r.%a#%i":b.equals("xyzvib")?"%-2e %10.5x %10.5y %10.5z %10.5vx %10.5vy %10.5vz":b.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':b.equals("xyz")?"%-2e %10.5x %10.5y %10.5z":b.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==d)return this.getModelExtract(this.vwr.getAtomBitSet(a),!1,!1,b.toUpperCase(),f);if(d.startsWith("print"))return a.equals("selected")||(d=JU.PT.rep(d,"selected",a.substring(1,a.length-1))),this.vwr.runScriptCautiously(d);0>d.indexOf("label")?
d=a+'.label("'+d+'").lines':a.equals("selected")||(d=JU.PT.rep(d,"selected",a.substring(1,a.length-1)));return this.vwr.evaluateExpression(d)},"~S,~S,~B");v(h,"getModelExtract",function(a,b,f,d,c){if(0>a.nextSetBit(0))return"";var e=d.toUpperCase();if(JU.PT.isOneOf(e,";CIF;QCJSON;XSF;PWMAT;"))return this.getModel(e,a,null,null);if(e.equals("PWSLAB"))return this.getModel("PWMAT",a,w(-1,["slab"]),null);if(e.equals("CIFP1"))return this.getModel("CIF",a,w(-1,["P1"]),null);if(e.equals("CML"))return this.getModelCml(a,
2147483647,!0,b,c);if(e.equals("PDB")||e.equals("PQR"))return this.getPdbAtomData(a,null,e.equals("PQR"),b,c);var g=e.equals("V3000"),h=e.equals("SDF");d=e.equals("MOL");for(var j=!b&&e.equals("XYZVIB"),k=e.equals("XYZRN"),l=e.startsWith("XYZ"),m=e.equals("JSON")||e.equals("CD"),e=new JU.SB,y=this.vwr.ms,p=this.vwr.ms.getModelBS(a,!0),q=p.nextSetBit(0),q="2D".equals(this.vwr.ms.am[q].auxiliaryInfo.get("dimension")),n=y.at,r=JU.BSUtil.copy(a),u=a.nextSetBit(0);0<=u;u=a.nextSetBit(u+1))b&&n[u].isDeleted()&&
r.clear(u);if(!j&&r.isEmpty())return"";a=JV.PropertyManager.getCovalentBondsForAtoms(y.bo,y.bondCount,r);n=!0;null!=y.trajectory&&!c&&y.trajectory.selectDisplayed(p);b=b?this.vwr.tm.getRotationQ():null;if(l)this.writeXYZ(e,r,p,b,j,k);else if(c=this.vwr.ms.getFrameTitle(p.nextSetBit(0)),c=null!=c?c.$replace("\n"," "):f?"Jmol Model Kit":JV.FileManager.fixDOSName(this.vwr.fm.getFullPathName(!1)),f=J.api.Interface.getInterface("J.adapter.writers.MOLWriter",this.vwr,"write").setViewer(this.vwr),h){e=new JU.SB;
for(u=p.nextSetBit(0);0<=u&&!(g=JU.BSUtil.copy(r),g.and(y.getModelAtomBitSetIncludingDeleted(u,!1)),a=JV.PropertyManager.getCovalentBondsForAtoms(y.bo,y.bondCount,g),!(n=f.addMolFile(c,u,e,g,a,!1,!1,d,b,q)));u=p.nextSetBit(u+1));}else n=f.addMolFile(c,-1,e,r,a,g,m,d,b,q);return n?e.toString():"ERROR: Too many atoms or bonds -- use V3000 format."},"JU.BS,~B,~B,~S,~B");k(h,"writeXYZ",function(a,b,f,d,c,e){var g=this.vwr.ms,h=g.at;e=JM.LabelToken.compile(this.vwr,e?"%-2e _XYZ_ %4.2[vdw] 1 [%n]%r.%a#%i\n":
"%-2e _XYZ_\n","\x00",null);for(var j=c?JM.LabelToken.compile(this.vwr,"%-2e _XYZ_ %12.5vx %12.5vy %12.5vz\n","\x00",null):null,k=new JU.P3,l=f.nextSetBit(0);0<=l;l=f.nextSetBit(l+1)){var m=JU.BSUtil.copy(b);m.and(g.getModelAtomBitSetIncludingDeleted(l,!1));if(!m.isEmpty()){a.appendI(m.cardinality()).appendC("\n");var n=g.am[l].properties;a.append("Model["+(l+1)+"]: ");if(null!=g.frameTitles[l]&&0<g.frameTitles[l].length)a.append(g.frameTitles[l].$replace("\n"," "));else if(null==n)a.append("Jmol "+
JV.Viewer.getJmolVersion());else{for(var p=new JU.SB,q=n.propertyNames(),x=null;q.hasMoreElements();){var r=q.nextElement();r.equals(".PATH")?x=n.getProperty(r):p.append(";").append(r).append("=").append(n.getProperty(r))}null!=x&&p.append(";PATH=").append(x);x=p.substring(0<p.length()?1:0);a.append(x.$replace("\n"," "))}a.appendC("\n");n=w(-1,[k]);for(p=m.nextSetBit(0);0<=p;p=m.nextSetBit(p+1))q=JM.LabelToken.formatLabelAtomArray(this.vwr,h[p],c&&null!=g.getVibration(p,!1)?j:e,"\x00",null,k),g.getPointTransf(l,
h[p],d,k),q=JU.PT.rep(q,"_XYZ_",JU.PT.sprintf("%12.5p %12.5p %12.5p","p",n)),a.append(q)}}},"JU.SB,JU.BS,JU.BS,JU.Quat,~B,~B");k(h,"getModel",function(a,b,f,d){a=J.api.Interface.getInterface("J.adapter.writers."+a+"Writer",this.vwr,"script");a.set(this.vwr,d,f);return a.write(b)},"~S,JU.BS,~A,JU.OC");h.getCovalentBondsForAtoms=k(h,"getCovalentBondsForAtoms",function(a,b,f){for(var d=new JU.BS,c=0;c<b;c++){var e=a[c];null!=e&&f.get(e.atom1.i)&&(f.get(e.atom2.i)&&e.isCovalent())&&d.set(c)}return d},
"~A,~N,JU.BS");v(h,"getChimeInfo",function(a,b){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(b);default:return this.getChimeInfoA(this.vwr.ms.at,a,b)}},"~N,JU.BS");k(h,"getChimeInfoA",function(a,b,f){var d=(new JU.SB).append("\n"),c="",e=null,g=null,h=-1,j=0;if(null!=f)for(var k=f.nextSetBit(0);0<=k;k=f.nextSetBit(k+1)){var l=a[k];switch(b){default:return"";case 1113589787:c=
l.getInfo();break;case 1153433601:c=""+l.getAtomNumber();break;case 1086324742:c=l.getGroup3(!1);break;case 1086326788:case 1073742120:case 1086324744:case 1086324743:var m=l.getChainID(),c=0==m?" ":l.getChainIDStr();300<=m&&(c=JU.PT.esc(c));switch(b){case 1073742120:c="["+l.getGroup3(!1)+"]"+l.group.getSeqcodeString()+":"+c;break;case 1086324744:case 1086324743:l.mi!=h&&(d.appendC("\n"),j=0,h=l.mi,d.append("Model "+l.getModelNumber()),e=g=null);l.group.chain!==e&&(d.appendC("\n"),j=0,e=l.group.chain,
d.append("Chain "+c+":\n"),g=null);c=l.group;c!==g&&(g=c,1086324743==b?d.append(l.getGroup1("?")):(0==j++%5&&1<j&&d.appendC("\n"),JU.PT.leftJustify(d,"          ","["+l.getGroup3(!1)+"]"+l.getResno()+" ")));continue}}0>d.indexOf("\n"+c+"\n")&&d.append(c).appendC("\n")}1086324744==b&&d.appendC("\n");return d.toString().substring(1)},"~A,~N,JU.BS");v(h,"getModelFileInfo",function(a){for(var b=this.vwr.ms,f=new JU.SB,d=0;d<b.mc;++d)if(null==a||a.get(d)){var c='["'+b.getModelNumberDotted(d)+'"] = ';f.append("\n\nfile").append(c).append(JU.PT.esc(b.getModelFileName(d)));
var e=b.getInfo(d,"modelID");null!=e&&f.append("\nid").append(c).append(JU.PT.esc(e));f.append("\ntitle").append(c).append(JU.PT.esc(b.getModelTitle(d)));f.append("\nname").append(c).append(JU.PT.esc(b.getModelName(d)));f.append("\ntype").append(c).append(JU.PT.esc(b.getModelFileType(d)))}return f.toString()},"JU.BS");k(h,"getAllAtomInfo",function(a){for(var b=new JU.Lst,f=new JU.P3,d=-1,c=null,e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+1)){var g=this.vwr.ms.at[e].getModelIndex();g!=d&&(c=this.vwr.ms.getUnitCell(g),
d=g);b.addLast(this.getAtomInfoLong(e,f,c))}return b},"JU.BS");k(h,"getAtomInfoLong",function(a,b,f){var d=this.vwr.ms,c=d.at[a],e=new java.util.Hashtable;d.getAtomIdentityInfo(a,e,b);e.put("element",d.getElementName(a));e.put("elemno",Integer.$valueOf(d.at[a].getElementNumber()));e.put("x",Float.$valueOf(c.x));e.put("y",Float.$valueOf(c.y));e.put("z",Float.$valueOf(c.z));null!=f&&(b.setT(c),f.toFractional(b,!0),e.put("fx",Float.$valueOf(b.x)),e.put("fy",Float.$valueOf(b.y)),e.put("fz",Float.$valueOf(b.z)));
e.put("coord",JU.P3.newP(c));null!=d.vibrations&&null!=d.vibrations[a]&&d.vibrations[a].getInfo(e);e.put("bondCount",Integer.$valueOf(c.getCovalentBondCount()));e.put("radius",Float.$valueOf(c.getRasMolRadius()/120));e.put("model",c.getModelNumberForLabel());b=c.atomPropertyString(this.vwr,1086324748);null!=b&&e.put("shape",b);e.put("visible",Boolean.$valueOf(c.checkVisible()));e.put("clickabilityFlags",Integer.$valueOf(c.clickabilityFlags));e.put("visibilityFlags",Integer.$valueOf(c.shapeVisibilityFlags));
e.put("spacefill",Float.$valueOf(c.getRadius()));b=JU.Escape.escapeColor(this.vwr.gdata.getColorArgbOrGray(c.colixAtom));null!=b&&e.put("color",b);e.put("colix",Integer.$valueOf(c.colixAtom));(b=JU.C.isColixTranslucent(c.colixAtom))&&e.put("translucent",Boolean.$valueOf(b));e.put("formalCharge",Integer.$valueOf(c.getFormalCharge()));e.put("partialCharge",Float.$valueOf(c.getPartialCharge()));b=c.getSurfaceDistance100()/100;0<=b&&e.put("surfaceDistance",Float.$valueOf(b));d.am[c.mi].isBioModel&&(e.put("resname",
c.getGroup3(!1)),b=c.group.getInsertionCode(),f=c.getResno(),0<f&&e.put("resno",Integer.$valueOf(f)),0!=b.charCodeAt(0)&&e.put("insertionCode",""+b),e.put("name",d.at[a].getAtomName()),e.put("chain",c.getChainIDStr()),e.put("atomID",Integer.$valueOf(c.atomID)),e.put("groupID",Integer.$valueOf(c.group.groupID)),"\x00"!=c.altloc&&e.put("altLocation",""+c.altloc),e.put("structure",Integer.$valueOf(c.group.getProteinStructureType().getId())),e.put("polymerLength",Integer.$valueOf(c.group.getBioPolymerLength())),
e.put("occupancy",Integer.$valueOf(c.getOccupancy100())),a=c.getBfactor100(),e.put("temp",Integer.$valueOf(H(a/100))));return e},"~N,JU.P3,J.api.SymmetryInterface");k(h,"getAllBondInfo",function(a){var b=new JU.Lst,f=this.vwr.ms,d=f.bondCount,f=f.bo,c;"string"==typeof a&&(a=this.vwr.getAtomBitSet(a));var e=new JU.P3;if(n(a,Array)){c=a[0];var g=a[1];for(a=0;a<d;a++)if(null!=f[a]){var h=f[a].atom1.i,j=f[a].atom2.i;(c.get(h)&&g.get(j)||g.get(h)&&c.get(j))&&b.addLast(this.getBondInfo(a,e))}}else if(n(a,
"JM.BondSet")){c=a;for(a=c.nextSetBit(0);0<=a&&a<d;a=c.nextSetBit(a+1))null!=f[a]&&b.addLast(this.getBondInfo(a,e))}else if(n(a,"JU.BS")){c=a;g=1==c.cardinality()?c.nextSetBit(0):-1;for(a=0;a<d;a++)null!=f[a]&&(0<=g?f[a].atom1.i==g||f[a].atom2.i==g:c.get(f[a].atom1.i)&&c.get(f[a].atom2.i))&&b.addLast(this.getBondInfo(a,e))}return b},"~O");k(h,"getBondInfo",function(a,b){var f=this.vwr.ms.bo[a],d=f.atom1,c=f.atom2,e=new java.util.Hashtable;e.put("_bpt",Integer.$valueOf(a));var g=new java.util.Hashtable;
this.vwr.ms.getAtomIdentityInfo(d.i,g,b);var h=new java.util.Hashtable;this.vwr.ms.getAtomIdentityInfo(c.i,h,b);e.put("atom1",g);e.put("atom2",h);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(d.distance(c)));
e.put("visible",Boolean.$valueOf(0!=f.shapeVisibilityFlags));d=JU.Escape.escapeColor(this.vwr.gdata.getColorArgbOrGray(f.colix));null!=d&&e.put("color",d);e.put("colix",Integer.$valueOf(f.colix));JU.C.isColixTranslucent(f.colix)&&e.put("translucent",Boolean.TRUE);return e},"~N,JU.P3");k(h,"getAllChainInfo",function(a){for(var b=new java.util.Hashtable,f=new JU.Lst,d=this.vwr.ms.mc,c=0;c<d;++c){var e=new java.util.Hashtable,g=this.getChainInfo(c,a);0<g.size()&&(e.put("modelIndex",Integer.$valueOf(c)),
e.put("chains",g),f.addLast(e))}b.put("models",f);return b},"JU.BS");k(h,"getChainInfo",function(a,b){for(var f=this.vwr.ms.am[a],d=f.getChainCount(!0),c=new JU.Lst,e=new JU.P3,g=0;g<d;g++){for(var h=f.getChainAt(g),j=new JU.Lst,k=h.groupCount,l=new java.util.Hashtable,m=0;m<k;m++){var n=h.groups[m];b.get(n.firstAtomIndex)&&j.addLast(n.getGroupInfo(m,e))}j.isEmpty()||(l.put("residues",j),c.addLast(l))}return c},"~N,JU.BS");k(h,"getAllPolymerInfo",function(a){var b=new java.util.Hashtable;null!=this.vwr.ms.bioModelset&&
this.vwr.ms.bioModelset.getAllPolymerInfo(a,b);return b},"JU.BS");k(h,"getBasePairInfo",function(a){var b=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 d=f.get(a);JV.PropertyManager.getAtomResidueInfo(b,d.atom1);b.append(" - ");JV.PropertyManager.getAtomResidueInfo(b,d.atom2);b.append("\n")}return b.toString()},"JU.BS");h.getAtomResidueInfo=k(h,"getAtomResidueInfo",function(a,b){a.append("[").append(b.getGroup3(!1)).append("]").append(b.group.getSeqcodeString()).append(":");
var f=b.getChainID();a.append(0==f?" ":b.getChainIDStr())},"JU.SB,JM.Atom");k(h,"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(h,"getAnimationInfo",function(){var a=this.vwr.am,b=new java.util.Hashtable;b.put("firstModelIndex",Integer.$valueOf(a.firstFrameIndex));b.put("lastModelIndex",Integer.$valueOf(a.lastFrameIndex));b.put("animationDirection",Integer.$valueOf(a.animationDirection));b.put("currentDirection",Integer.$valueOf(a.currentDirection));b.put("displayModelIndex",
Integer.$valueOf(a.cmi));null!=a.animationFrames&&(b.put("isMovie",Boolean.TRUE),b.put("frames",JU.Escape.eAI(a.animationFrames)),b.put("currentAnimationFrame",Integer.$valueOf(a.caf)));b.put("displayModelNumber",this.vwr.getModelNumberDotted(a.cmi));b.put("displayModelName",0<=a.cmi?this.vwr.getModelName(a.cmi):"");b.put("animationFps",Integer.$valueOf(a.animationFps));b.put("animationReplayMode",JS.T.nameOf(a.animationReplayMode));b.put("firstFrameDelay",Float.$valueOf(a.firstFrameDelay));b.put("lastFrameDelay",
Float.$valueOf(a.lastFrameDelay));b.put("animationOn",Boolean.$valueOf(a.animationOn));b.put("animationPaused",Boolean.$valueOf(a.animationPaused));return b});k(h,"getBoundBoxInfo",function(){var a=this.vwr.ms.getBoxInfo(null,1).getBoundBoxPoints(!0),b=new java.util.Hashtable;b.put("center",JU.P3.newP(a[0]));b.put("vector",JU.V3.newV(a[1]));b.put("corner0",JU.P3.newP(a[2]));b.put("corner1",JU.P3.newP(a[3]));return b});k(h,"getShapeInfo",function(){var a=new java.util.Hashtable,b=new JU.SB,f=this.vwr.shm.shapes;
if(null!=f)for(var d=0;37>d;++d){var c=f[d];if(null!=c){var e=JV.JC.shapeClassBases[d],c=c.getShapeDetail();null!=c&&a.put(e,c)}}0<b.length()&&a.put("shapeCommands",b.toString());return a});k(h,"getAnnotationInfo",function(a,b){var f=this.vwr.getAtomBitSet(a),f=this.vwr.ms.getModelBS(f,!1).nextSetBit(0);if(0>f)return null;var d=this.vwr.ms.getModelAuxiliaryInfo(f).get(1073741925==b?"domains":"validation");if(null==d||6!=d.tok)return null;this.vwr.getAnnotationParser(!1).initializeAnnotation(d,b,f);
return d.mapGet("_list")},"~O,~N");k(h,"getMeasurementInfo",function(){return this.vwr.getShapeProperty(6,"info")});k(h,"getMouseInfo",function(){if(!this.vwr.haveDisplay)return null;for(var a=new java.util.Hashtable,b=new JU.Lst,f=this.vwr.acm,d,c=f.b.getBindings().values().iterator();c.hasNext()&&((d=c.next())||1);)n(d,Boolean)||(JU.AU.isAI(d)&&(d=w(-1,[JV.binding.Binding.getMouseActionName(d[0],!1),JV.ActionManager.getActionName(d[1])])),b.addLast(d));a.put("bindings",b);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(h,"getPdbAtomData",function(a,b,f,d,c){return 0==this.vwr.ms.ac||0>a.nextSetBit(0)?"":this.getModel("PDB",a,w(-1,[new Boolean(f),new Boolean(d),new Boolean(c)]),b)},"JU.BS,JU.OC,~B,~B,~B");v(h,"getPdbData",function(a,b,f,d,c,e){this.vwr.ms.isJmolDataFrameForModel(a)&&(a=this.vwr.ms.getJmolDataSourceFrame(a));if(0>a)return"";var g=
this.vwr.ms.am[a],h=g.isBioModel;if(null==d&&!h)return null;null==c&&(c=this.vwr.getOutputChannel(null,null));var j=new JU.SB,k=0<=b.indexOf("draw"),l=null,m=new JU.BS,n="\x00";this.vwr.ms.getLabeler();var p=JM.LabelToken.compile(this.vwr,"ATOM  %-6i%4a%1A%3.-3n %1c%4R%1E   ","\x00",null);if(null==d)n=11<b.length&&0<=b.indexOf("quaternion ")?b.charAt(11):"R",g.getPdbData(b,n,k,f,c,p,j,m),l=this.vwr.getModelUndeletedAtomsBitSet(a);else{l=d[0];a=d[1];var g=d[2],q=d[3],x=null!=g,r=null!=q,u=d[4],s=d[5],
v=d[6],D=d[7],B=d[8],C=d[9];d=null!=v&&null==B;var E=this.vwr.ms.at;if(d){c.append("REMARK   6 Jmol PDB-encoded data: ").append(b).append("; ").append(JV.Viewer.getJmolVersion()).append("; ").append(this.vwr.apiPlatform.getDateFormat(null)).append("\n");c.append("REMARK   6 Jmol data").append(" min = ").append(JU.Escape.eP(u)).append(" max = ").append(JU.Escape.eP(s)).append(" unScaledXyz = xyz * ").append(JU.Escape.eP(v)).append(" + ").append(JU.Escape.eP(D)).append(";\n");s=null;for(b=l.nextSetBit(0);0<=
b;b=l.nextSetBit(b+1))if(u=""+E[b].getAtomName(),null!=s||4<u.length)null==s?(s="",b=-1):s+=" "+u;null!=s&&c.append("REMARK   6 Jmol atom names").append(s).append("\n");s=null;for(b=l.nextSetBit(0);0<=b;b=l.nextSetBit(b+1))if(u=""+E[b].getGroup3(!0),null!=s||3<u.length)null==s?(s="",b=-1):s+=" "+u;null!=s&&c.append("REMARK   6 Jmol residue names").append(s).append("\n");for(b=0;b<C.length;b++)null!=C[b]&&c.append("REMARK   6 Jmol property ").append(C[b]).append(";\n")}C=null;u=new JU.P3;d||(null==
B&&(B="%-5i %-10s %-13.5f "+(r?"%-13.5f %-13.5f":x?"%-13.5f":"")),B+="\n");b=l.nextSetBit(0);for(s=0;0<=b;b=l.nextSetBit(b+1),s++){var v=a[s],D=x?g[s]:0,F=r?q[s]:0;if(!Float.isNaN(v)&&!Float.isNaN(D)&&!Float.isNaN(F)){var A=E[b];d?(c.append(JM.LabelToken.formatLabelAtomArray(this.vwr,A,p,"\x00",null,u)),h&&m.set(b),c.append(JU.PT.sprintf("%-8.2f%-8.2f%-10.2f    %6.3f          %2s    %s\n","ssF",w(-1,[A.getElementSymbolIso(!1).toUpperCase(),"",z(-1,[v,D,F,0])]))),null!=C&&C.group.getBioPolymerIndexInModel()==
A.group.getBioPolymerIndexInModel()&&j.append("CONECT").append(JU.PT.formatStringI("%5i","i",C.getAtomNumber())).append(JU.PT.formatStringI("%5i","i",A.getAtomNumber())).appendC("\n")):r?c.append(JU.PT.sprintf(B,"isF",w(-1,[Integer.$valueOf(A.getAtomNumber()),A.getAtomName(),z(-1,[v,D,F])]))):x?c.append(JU.PT.sprintf(B,"isF",w(-1,[Integer.$valueOf(A.getAtomNumber()),A.getAtomName(),z(-1,[v,D])]))):c.append(JU.PT.sprintf(B,"isF",w(-1,[Integer.$valueOf(A.getAtomNumber()),A.getAtomName(),z(-1,[v])])));
C=A}}}c.append(j.toString());if(k)return c.toString();f.and(l);h&&e&&c.append("\n\n"+this.vwr.ms.getProteinStructureState(m,"R"==n?4138:1073742086));return c.toString()},"~N,~S,JU.BS,~A,JU.OC,~B");v(h,"getModelCml",function(a,b,f,d,c){return this.getModel("CML",a,w(-1,[new Integer(b),new Boolean(f),new Boolean(d),new Boolean(c)]),null)},"JU.BS,~N,~B,~B,~B");v(h,"fixJMEFormalCharges",function(a,b){var f=!1;if(null==a)return b;for(var d=a.nextSetBit(0);0<=d;d=a.nextSetBit(d+1)){var c=this.vwr.ms.at[d];
if(0!=c.getFormalCharge()){f=!0;break}}if(!f)return b;f=this.vwr.getSmilesMatcher().getMapForJME(b,this.vwr.ms.at,a);if(null==f)return b;for(var c=f[0],e=f[1],f=JU.PT.getTokens(b),g=JU.PT.parseInt(f[0]),g=N(g,0),d=c.length;0<=--d;)g[c[d]]=e[d]+1;d=0;for(e=2;e<f.length;e+=3){var h=f[e];if(-2147483648!=JU.PT.parseInt(h))break;h=JU.PT.replaceAllCharacters(h,"+-","");c=this.vwr.ms.at[g[d++]-1];if(!c.getElementSymbol().equals(h))return b;c=c.getFormalCharge();0!=c&&(f[e]=h+(0<c?"+":"-")+(1<Math.abs(c)?
""+Math.abs(c):""))}return JU.PT.join(f," ",0)},"JU.BS,~S");h.getSDFDateLine=k(h,"getSDFDateLine",function(a,b){var f=JU.SB.newS((a+"          ").substring(0,10)),d,c,e,g,h;h=new Date;d=h.getMonth();c=h.getDate();e=h.getFullYear();g=h.getHours();h=h.getMinutes();JU.PT.rightJustify(f,"00",""+(1+d));JU.PT.rightJustify(f,"00",""+c);f.append((""+e).substring(2,4));JU.PT.rightJustify(f,"00",""+g);JU.PT.rightJustify(f,"00",""+h);f.append(b?"2":"3").append("D 1   1.00000     0.00000     0");f.append("\n");
return f.toString()},"~S,~B");h.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.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.newFloatArray,Clazz.declareType,Clazz.prepareFields,Clazz.superConstructor,
Clazz.newByteArray,Clazz.declareInterface,Clazz.newShortArray,Clazz.innerTypeInstance,Clazz.isClassDefined,Clazz.prepareCallback,Clazz.newArray,Clazz.castNullAs,Clazz.floatToShort,Clazz.superCall,Clazz.decorateAsType,Clazz.newBooleanArray,Clazz.newCharArray,Clazz.implementOf,Clazz.newDoubleArray,Clazz.overrideConstructor,Clazz.clone,Clazz.doubleToShort,Clazz.getInheritedLevel,Clazz.getParamsType,Clazz.isAF,Clazz.isAB,Clazz.isAI,Clazz.isAS,Clazz.isASS,Clazz.isAP,Clazz.isAFloat,Clazz.isAII,Clazz.isAFF,
Clazz.isAFFF,Clazz.tryToSearchAndExecute,Clazz.getStackTrace,Clazz.inheritArgs,Clazz.alert,Clazz.defineMethod,Clazz.overrideMethod,Clazz.declareAnonymous,Clazz.cloneFinals);
