Commit ab9bd4b8 by Victor Shnayder

Have errors go through jsmolcalc's getInfo

parent d74b21e4
...@@ -107,11 +107,13 @@ ...@@ -107,11 +107,13 @@
var smiles = applet[0].smiles(); var smiles = applet[0].smiles();
var jme = applet[0].jmeFile(); var jme = applet[0].jmeFile();
var info = formatInfo(jsmol.API.getInfo(mol, smiles, jme).toString()); var info = jsmol.API.getInfo(mol, smiles, jme).toString();
var err = jsmol.API.getErrors(mol, smiles, jme).toString();
var value = { mol: mol, info: info }; var value = { mol: mol, info: info };
console.log("Molecule info:"); console.log("Molecule info:");
console.log(info); console.log(info);
console.log(err);
input_field.val(JSON.stringify(value)); input_field.val(JSON.stringify(value));
......
...@@ -4,14 +4,14 @@ var $gwt_version = "2.5.0"; ...@@ -4,14 +4,14 @@ var $gwt_version = "2.5.0";
var $wnd = parent; var $wnd = parent;
var $doc = $wnd.document; var $doc = $wnd.document;
var $moduleName, $moduleBase; var $moduleName, $moduleBase;
var $strongName = '787A0D27E3B86B1358ECC872176CB896'; var $strongName = '2F6BC62FA9B71FB5EB318145F5D37E84';
var $stats = $wnd.__gwtStatsEvent ? function(a) {return $wnd.__gwtStatsEvent(a);} : null, var $stats = $wnd.__gwtStatsEvent ? function(a) {return $wnd.__gwtStatsEvent(a);} : null,
$sessionId = $wnd.__gwtStatsSessionId ? $wnd.__gwtStatsSessionId : null; $sessionId = $wnd.__gwtStatsSessionId ? $wnd.__gwtStatsSessionId : null;
$stats && $stats({moduleName:'jsmolcalc',sessionId:$sessionId,subSystem:'startup',evtGroup:'moduleStartup',millis:(new Date()).getTime(),type:'moduleEvalStart'}); $stats && $stats({moduleName:'jsmolcalc',sessionId:$sessionId,subSystem:'startup',evtGroup:'moduleStartup',millis:(new Date()).getTime(),type:'moduleEvalStart'});
</script></head> </script></head>
<body> <body>
<script><!-- <script><!--
var _, seedTable = {}, Q$Object = 0, Q$String = 1, Q$LongLibBase$LongEmul = 2, Q$Atom = 3, Q$JsMolCalcAPI$Task = 4, Q$Target = 5, Q$int_$1 = 6, Q$Serializable = 7, Q$CharSequence = 8, Q$Comparable = 9, Q$StackTraceElement = 10, Q$Throwable = 11, Q$List = 12, Q$Map = 13, Q$Map$Entry = 14, Q$Set = 15, Q$Exportable = 16, CM$ = {}; var _, seedTable = {}, Q$Object = 0, Q$String = 1, Q$LongLibBase$LongEmul = 2, Q$JsMolCalc$Atom = 3, Q$int_$1 = 4, Q$Serializable = 5, Q$CharSequence = 6, Q$Comparable = 7, Q$StackTraceElement = 8, Q$Throwable = 9, Q$List = 10, Q$Map = 11, Q$Map$Entry = 12, Q$Set = 13, Q$Exportable = 14, CM$ = {};
function newSeed(id){ function newSeed(id){
return new seedTable[id]; return new seedTable[id];
} }
...@@ -89,11 +89,6 @@ function equals__devirtual$(this$static, other){ ...@@ -89,11 +89,6 @@ function equals__devirtual$(this$static, other){
return maybeJsoInvocation = this$static , isJavaObject(maybeJsoInvocation)?maybeJsoInvocation.equals$(other):maybeJsoInvocation === other; return maybeJsoInvocation = this$static , isJavaObject(maybeJsoInvocation)?maybeJsoInvocation.equals$(other):maybeJsoInvocation === other;
} }
function getClass__devirtual$(this$static){
var maybeJsoInvocation;
return maybeJsoInvocation = this$static , isJavaObject(maybeJsoInvocation)?maybeJsoInvocation.___clazz$:Lcom_google_gwt_core_client_JavaScriptObject_2_classLit;
}
function hashCode__devirtual$(this$static){ function hashCode__devirtual$(this$static){
var maybeJsoInvocation; var maybeJsoInvocation;
return maybeJsoInvocation = this$static , isJavaObject(maybeJsoInvocation)?maybeJsoInvocation.hashCode$():getHashCode(maybeJsoInvocation); return maybeJsoInvocation = this$static , isJavaObject(maybeJsoInvocation)?maybeJsoInvocation.hashCode$():getHashCode(maybeJsoInvocation);
...@@ -340,7 +335,7 @@ function $getDefaultNative(){ ...@@ -340,7 +335,7 @@ function $getDefaultNative(){
function $clinit_LocaleInfo(){ function $clinit_LocaleInfo(){
$clinit_LocaleInfo = nullMethod; $clinit_LocaleInfo = nullMethod;
instance_0 = new LocaleInfo_0; instance = new LocaleInfo_0;
} }
function $getNumberConstants(this$static){ function $getNumberConstants(this$static){
...@@ -353,10 +348,10 @@ function LocaleInfo_0(){ ...@@ -353,10 +348,10 @@ function LocaleInfo_0(){
defineSeed(24, 1, {}, LocaleInfo_0); defineSeed(24, 1, {}, LocaleInfo_0);
_.numberConstants = null; _.numberConstants = null;
var instance_0; var instance;
function $clinit_NumberFormat(){ function $clinit_NumberFormat(){
$clinit_NumberFormat = nullMethod; $clinit_NumberFormat = nullMethod;
$getNumberConstants(($clinit_LocaleInfo() , $clinit_LocaleInfo() , instance_0)); $getNumberConstants(($clinit_LocaleInfo() , $clinit_LocaleInfo() , instance));
} }
function $addExponent(this$static, digits){ function $addExponent(this$static, digits){
...@@ -401,7 +396,7 @@ function $adjustFractionDigits(this$static, digits){ ...@@ -401,7 +396,7 @@ function $adjustFractionDigits(this$static, digits){
--toRemove; --toRemove;
} }
if (toRemove < this$static.digitsLength) { if (toRemove < this$static.digitsLength) {
$delete(digits, toRemove, this$static.digitsLength); $delete_0(digits, toRemove, this$static.digitsLength);
this$static.digitsLength = toRemove; this$static.digitsLength = toRemove;
} }
} }
...@@ -455,7 +450,7 @@ function $format(this$static, number){ ...@@ -455,7 +450,7 @@ function $format(this$static, number){
if (preRound > 0 && preRound < $toString(buf.data).length && $charAt($toString(buf.data), preRound) == 57) { if (preRound > 0 && preRound < $toString(buf.data).length && $charAt($toString(buf.data), preRound) == 57) {
$propagateCarry(this$static, buf, preRound - 1); $propagateCarry(this$static, buf, preRound - 1);
scale += $toString(buf.data).length - preRound; scale += $toString(buf.data).length - preRound;
$delete(buf, preRound, $toString(buf.data).length); $delete_0(buf, preRound, $toString(buf.data).length);
} }
this$static.exponent = 0; this$static.exponent = 0;
this$static.digitsLength = $toString(buf.data).length; this$static.digitsLength = $toString(buf.data).length;
...@@ -488,7 +483,7 @@ function $insertGroupingSeparators(this$static, digits, g){ ...@@ -488,7 +483,7 @@ function $insertGroupingSeparators(this$static, digits, g){
function $parseAffix(this$static, pattern, start, affix, inNegativePattern){ function $parseAffix(this$static, pattern, start, affix, inNegativePattern){
var ch, inQuote, len, pos; var ch, inQuote, len, pos;
$replace_0(affix, $toString(affix.data).length); $delete(affix, $toString(affix.data).length);
inQuote = false; inQuote = false;
len = pattern.length; len = pattern.length;
for (pos = start; pos < len; ++pos) { for (pos = start; pos < len; ++pos) {
...@@ -765,7 +760,7 @@ function toScaledString(buf, val){ ...@@ -765,7 +760,7 @@ function toScaledString(buf, val){
expDigits = expIdx + 1; expDigits = expIdx + 1;
expDigits < $toString(buf.data).length && $charAt($toString(buf.data), expDigits) == 43 && ++expDigits; expDigits < $toString(buf.data).length && $charAt($toString(buf.data), expDigits) == 43 && ++expDigits;
expDigits < $toString(buf.data).length && (scale = __parseAndValidateInt($substring($toString(buf.data), expDigits))); expDigits < $toString(buf.data).length && (scale = __parseAndValidateInt($substring($toString(buf.data), expDigits)));
$delete(buf, expIdx, $toString(buf.data).length); $delete_0(buf, expIdx, $toString(buf.data).length);
} }
dot = $indexOf_0($toString(buf.data), '.', startLen); dot = $indexOf_0($toString(buf.data), '.', startLen);
if (dot >= 0) { if (dot >= 0) {
...@@ -948,7 +943,6 @@ function init(){ ...@@ -948,7 +943,6 @@ function init(){
!!$stats && onModuleStart('com.google.gwt.user.client.DocumentModeAsserter'); !!$stats && onModuleStart('com.google.gwt.user.client.DocumentModeAsserter');
$onModuleLoad(); $onModuleLoad();
!!$stats && onModuleStart('edu.umb.bio.jsMolCalc.client.JsMolCalcAPI'); !!$stats && onModuleStart('edu.umb.bio.jsMolCalc.client.JsMolCalcAPI');
new TaskExporterImpl_0;
$clinit_ExporterUtil(); $clinit_ExporterUtil();
new ExportAllExporterImpl_0; new ExportAllExporterImpl_0;
} }
...@@ -1022,30 +1016,30 @@ function $getRuntimeValue(){ ...@@ -1022,30 +1016,30 @@ function $getRuntimeValue(){
function $export(){ function $export(){
if (!exported) { if (!exported) {
exported = true; exported = true;
new InfoExporterImpl_0;
$export0(); $export0();
} }
} }
function $export0(){ function $export0(){
var pkg = declarePackage('jsmol.API'); var pkg = ($clinit_ExporterUtil() , $declarePackage('jsmol.API'));
var __0; var __0;
$wnd.jsmol.API = $entry(function(){ $wnd.jsmol.API = $entry(function(){
var g, j = this; var g, j = this;
isAssignableToInstance(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$API_2_classLit, arguments)?(g = arguments[0]):arguments.length == 0 && (g = new JsMolCalcAPI$API_0); isAssignableToInstance(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$API_2_classLit, arguments)?(g = arguments[0]):arguments.length == 0 && (g = new JsMolCalcAPI$API_0);
j.g = g; j.g = g;
setWrapper(g, j); g['__gwtex_wrap'] = j;
return j; return j;
} }
); );
__0 = $wnd.jsmol.API.prototype = new Object; __0 = $wnd.jsmol.API.prototype = new Object;
$wnd.jsmol.API.getInfo = $entry(function(a0, a1, a2){ $wnd.jsmol.API.getErrors = $entry(function(a0, a1, a2){
var result; var iat, info;
return wrap((result = computeAndDisplay(a0, a1, a2) , new JsMolCalcAPI$Info_0(result.info))); return new JsMolCalc_0 , iat = $computeAndDisplay(a0, a1, a2) , info = iat.info , info.indexOf('It is not possible') == 0?info:'';
} }
); );
$wnd.jsmol.API.getTasks = $entry(function(a0, a1, a2){ $wnd.jsmol.API.getInfo = $entry(function(a0, a1, a2){
return wrap_0(getTasks(a0, a1, a2)); var iat;
return new JsMolCalc_0 , iat = $computeAndDisplay(a0, a1, a2) , iat.info;
} }
); );
addTypeMap(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$API_2_classLit, $wnd.jsmol.API); addTypeMap(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$API_2_classLit, $wnd.jsmol.API);
...@@ -1060,6 +1054,312 @@ function APIExporterImpl_0(){ ...@@ -1060,6 +1054,312 @@ function APIExporterImpl_0(){
defineSeed(40, 1, {}, APIExporterImpl_0); defineSeed(40, 1, {}, APIExporterImpl_0);
var exported = false; var exported = false;
function $computeAndDisplay(molString, smileString, jmeString){
var atom, atomDataLines, atomLineParts, atomList, atomNumber, bondArray, bondIndex, bondLineParts, bondString, br, c, canMakeHbonds, canMakeIonicBonds, charge, chargeLineParts, cl, currentAtom, currentAtomSpec, currentNeighbor, element, errorString, f, fifthAtom, firstAtom, formula, formulaString, fourthAtom, h, i, illegalAtoms, iodine, j, k, l, line3Parts, logp, logpString, m, molStringLines, moleculeInfo, n, neighbors, nf, numAromaticAtoms, numAtoms, numBonds, o, p_0, s, secondAtom, sixthAtom, targets, thirdAtom;
if ($equals(molString, '') || $equals(smileString, '') || $equals(jmeString, '')) {
return new JsMolCalc$InfoAndTargets_0('');
}
atomDataLines = new StringBuffer_0;
logpString = '';
bondString = '';
atomList = new ArrayList_0;
$add_0(atomList, new JsMolCalc$Atom_0);
molStringLines = $split(molString, '\n', 0);
line3Parts = $split(molStringLines[3], '[ ]+', 0);
numAtoms = __parseAndValidateInt(line3Parts[1]);
numBonds = __parseAndValidateInt(line3Parts[2]);
for (i = 1; i < numAtoms + 1; ++i) {
atomLineParts = $split(molStringLines[i + 3], '[ ]+', 0);
element = atomLineParts[4];
atom = new JsMolCalc$Atom_0;
atom.element = element;
setCheck(atomList.array, atomList.size++, atom);
}
for (i = 0; i < molStringLines.length; ++i) {
if (molStringLines[i].indexOf('CHG') != -1) {
chargeLineParts = $split(molStringLines[i], '[ ]+', 0);
atomNumber = __parseAndValidateInt(chargeLineParts[3]);
charge = __parseAndValidateInt(chargeLineParts[4]);
atom = dynamicCast((checkIndex(atomNumber, atomList.size) , atomList.array[atomNumber]), Q$JsMolCalc$Atom);
atom.charge = charge;
}
}
bondArray = initDims([_3_3I_classLit, _3I_classLit], [makeCastMap([Q$Serializable]), makeCastMap([Q$int_$1, Q$Serializable])], [Q$int_$1, -1], [numAtoms + 1, numAtoms + 1], 2, 1);
for (i = 1; i < numAtoms + 1; ++i) {
fill(bondArray[i], bondArray[i].length);
}
for (i = 1; i < numBonds + 1; ++i) {
bondLineParts = $split(molStringLines[i + numAtoms + 3], '[ ]+', 0);
firstAtom = __parseAndValidateInt(bondLineParts[1]);
secondAtom = __parseAndValidateInt(bondLineParts[2]);
bondIndex = __parseAndValidateInt(bondLineParts[3]);
bondArray[firstAtom][secondAtom] = bondIndex;
bondArray[secondAtom][firstAtom] = bondIndex;
$addBondToNonHAtom(dynamicCast((checkIndex(firstAtom, atomList.size) , atomList.array[firstAtom]), Q$JsMolCalc$Atom), bondIndex);
$addBondToNonHAtom(dynamicCast((checkIndex(secondAtom, atomList.size) , atomList.array[secondAtom]), Q$JsMolCalc$Atom), bondIndex);
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
bondArray[i][j] != 0 && $updateHybridization(currentAtom, bondArray[i][j]);
}
}
for (i = 1; i < numAtoms + 1; ++i) {
firstAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
if (($equals(firstAtom.element, 'C') || $equals(firstAtom.element, 'N')) && (firstAtom.hybridization == 2 || firstAtom.aromatic)) {
for (j = 1; j < numAtoms + 1; ++j) {
secondAtom = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$JsMolCalc$Atom);
if ((bondArray[i][j] == 1 || bondArray[i][j] == 2 || secondAtom.aromatic && bondArray[i][j] != 0 || firstAtom.aromatic && bondArray[i][j] != 0) && ($equals(secondAtom.element, 'C') || $equals(secondAtom.element, 'N')) && secondAtom.hybridization == 2 && i != j) {
for (k = 1; k < numAtoms + 1; ++k) {
thirdAtom = dynamicCast((checkIndex(k, atomList.size) , atomList.array[k]), Q$JsMolCalc$Atom);
if ((bondArray[j][k] == 1 && bondArray[i][j] == 2 || bondArray[j][k] == 2 && bondArray[i][j] == 1 || thirdAtom.aromatic && bondArray[j][k] != 0 || secondAtom.aromatic && bondArray[j][k] != 0) && ($equals(thirdAtom.element, 'C') || $equals(thirdAtom.element, 'N')) && thirdAtom.hybridization == 2 && k != i && k != j) {
for (l = 1; l < numAtoms + 1; ++l) {
fourthAtom = dynamicCast((checkIndex(l, atomList.size) , atomList.array[l]), Q$JsMolCalc$Atom);
if ((bondArray[k][l] == 1 && bondArray[j][k] == 2 || bondArray[k][l] == 2 && bondArray[j][k] == 1 || fourthAtom.aromatic && bondArray[k][l] != 0 || thirdAtom.aromatic && bondArray[k][l] != 0) && ($equals(fourthAtom.element, 'C') || $equals(fourthAtom.element, 'N')) && fourthAtom.hybridization == 2 && l != i && l != j && l != k) {
for (m = 1; m < numAtoms + 1; ++m) {
fifthAtom = dynamicCast((checkIndex(m, atomList.size) , atomList.array[m]), Q$JsMolCalc$Atom);
if ((bondArray[l][m] == 1 && bondArray[k][l] == 2 || bondArray[l][m] == 2 && bondArray[k][l] == 1 || fifthAtom.aromatic && bondArray[l][m] != 0 || fourthAtom.aromatic && bondArray[l][m] != 0) && ($equals(fifthAtom.element, 'C') || $equals(fifthAtom.element, 'N')) && fifthAtom.hybridization == 2 && m != i && m != j && m != k && m != l) {
for (n = 1; n < numAtoms + 1; ++n) {
sixthAtom = dynamicCast((checkIndex(n, atomList.size) , atomList.array[n]), Q$JsMolCalc$Atom);
if ((bondArray[m][n] == 1 && bondArray[l][m] == 2 || bondArray[m][n] == 2 && bondArray[l][m] == 1 || sixthAtom.aromatic && bondArray[m][n] != 0 || fifthAtom.aromatic && bondArray[m][n] != 0) && ($equals(sixthAtom.element, 'C') || $equals(sixthAtom.element, 'N')) && sixthAtom.hybridization == 2 && n != i && n != j && n != k && n != l && n != m) {
if (bondArray[n][i] == 2 && bondArray[m][n] == 1 || bondArray[n][i] == 1 && bondArray[m][n] == 2) {
firstAtom.aromatic = true;
secondAtom.aromatic = true;
thirdAtom.aromatic = true;
fourthAtom.aromatic = true;
fifthAtom.aromatic = true;
sixthAtom.aromatic = true;
}
}
}
}
}
}
}
}
}
}
}
}
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
if (bondArray[i][j] != 0) {
currentNeighbor = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$JsMolCalc$Atom);
$processNeighbor(currentAtom, currentNeighbor.element, bondArray[i][j], currentNeighbor.aromatic);
}
}
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
if (bondArray[i][j] != 0) {
currentNeighbor = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$JsMolCalc$Atom);
if (currentNeighbor.hybridization < 3) {
for (k = 1; k < numAtoms + 1; ++k) {
bondArray[j][k] > 1 && k != i && ++currentAtom.numNeighborPi;
}
}
}
}
}
h = 0;
charge = 0;
for (i = 1; i < numAtoms + 1; ++i) {
atom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
$getNumNeighborHs(atom);
h = h + atom.numNeighborHs;
charge = charge + atom.charge;
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
if (bondArray[i][j] != 0) {
currentNeighbor = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$JsMolCalc$Atom);
$equals(currentAtom.element, 'N') && currentNeighbor.isACarbonyl && (currentAtom.amide = true);
}
}
}
illegalAtoms = new StringBuffer_0;
for (i = 1; i < numAtoms + 1; ++i) {
atom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
$equals(atom.element, 'C') && atom.charge != 0 && ($append(illegalAtoms.data, 'A Charged C atom.<br>') , illegalAtoms);
if ($equals(atom.element, 'N')) {
atom.charge > 1 && ($append(illegalAtoms.data, 'An N atom with too high + charge.<br>') , illegalAtoms);
atom.charge < 0 && ($append(illegalAtoms.data, 'An N atom with - charge.<br>') , illegalAtoms);
$getNumNeighborHs(atom) < 0 && !($equals(atom.doubleBondedNeighbor, 'O2') && $getNumNeighborHs(atom) == -2 && atom.numNeighborCs == 1 && atom.numNeighborXs == 2 && atom.charge == 0) && ($append(illegalAtoms.data, 'An N atom making too many bonds.<br>') , illegalAtoms);
}
if ($equals(atom.element, 'O')) {
atom.charge < -1 && ($append(illegalAtoms.data, 'An O atom with too high - charge.<br>') , illegalAtoms);
atom.charge > 0 && ($append(illegalAtoms.data, 'An O atom with + charge.<br>') , illegalAtoms);
}
if ($equals(atom.element, 'S')) {
atom.charge > 0 && ($append(illegalAtoms.data, 'An S atom with a + charge.<br>') , illegalAtoms);
$getNumNeighborHs(atom) < 0 && $getNumNeighborHs(atom) != -4 && $getNumNeighborHs(atom) != -2 && ($append(illegalAtoms.data, 'An S atom not making 2, 4, or 6 bonds.<br>') , illegalAtoms);
}
if ($equals(atom.element, 'P')) {
atom.charge != 0 && ($append(illegalAtoms.data, 'A Charged P atom.<br>') , illegalAtoms);
atom.numNeighborHs != -3 && ($append(illegalAtoms.data, 'A P atom not making 5 bonds.<br>') , illegalAtoms);
}
if ($equals(atom.element, 'F') || $equals(atom.element, 'Cl') || $equals(atom.element, 'Br') || $equals(atom.element, 'I')) {
atom.charge != 0 && $append_0(illegalAtoms, 'A Charged ' + atom.element + ' atom.<br>');
atom.numBondsToNonHAtoms > 1 && $append_0(illegalAtoms, 'A ' + atom.element + ' atom making more than one bond.<br>');
}
$equals(atom.element, 'X') && ($append(illegalAtoms.data, 'An X atom.<br>') , illegalAtoms);
}
errorString = '';
$toString(illegalAtoms.data).length != 0 && (errorString = '<html><body>It is not possible to calculate the properties<br>of your molecule because it contains:<br>' + $toString(illegalAtoms.data) + '<\/body><\/html>');
logp = 0;
canMakeHbonds = false;
canMakeIonicBonds = false;
if ($toString(illegalAtoms.data).length == 0) {
nf = ($clinit_NumberFormat() , new NumberFormat_1($getDefaultNative()));
for (i = 1; i < numAtoms + 1; ++i) {
atom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
currentAtomSpec = $getAtomSpec(atom);
logp = logp + currentAtomSpec.logp;
canMakeHbonds = canMakeHbonds || currentAtomSpec.canMakeHbonds;
canMakeIonicBonds = canMakeIonicBonds || currentAtomSpec.canMakeIonicBonds;
neighbors = new StringBuffer_0;
for (j = 1; j < numAtoms + 1; ++j) {
bondArray[i][j] != 0 && ($append(neighbors.data, j + ' ') , neighbors);
}
$append_0(atomDataLines, i + ' ' + currentAtomSpec.type + '; bonded to: ' + $toString(neighbors.data) + '; logp= ' + $format(nf, currentAtomSpec.logp) + '; H-bonds: ' + currentAtomSpec.canMakeHbonds + '; ionic bonds: ' + currentAtomSpec.canMakeIonicBonds + '\n');
}
logp < 0?(logpString = '<font color=green>Hydrophobicity index = ' + $format(nf, logp) + '<\/font>'):(logpString = '<font color=red>Hydrophobicity index = ' + $format(nf, logp) + '<\/font>');
canMakeHbonds?(bondString = '<font color=green>Can Make Strong Hydrogen Bonds<\/font><br>'):(bondString = '<font color=red>Can not Make Strong Hydrogen Bonds<\/font><br>');
canMakeIonicBonds?(bondString += '<font color=green>Can Make Ionic Bonds<\/font>'):(bondString += '<font color=red>Can not Make Ionic Bonds<\/font>');
}
numBonds = 0;
numAromaticAtoms = 0;
c = 0;
n = 0;
o = 0;
s = 0;
p_0 = 0;
cl = 0;
br = 0;
f = 0;
iodine = 0;
formula = new StringBuffer_0;
for (i = 0; i < smileString.length; ++i) {
switch (smileString.charCodeAt(i)) {
case 67:
++c;
break;
case 78:
++n;
break;
case 79:
++o;
break;
case 83:
++s;
break;
case 80:
++p_0;
break;
case 108:
--c;
++cl;
break;
case 66:
++br;
break;
case 70:
++f;
break;
case 73:
++iodine;
break;
case 99:
++c;
++numAromaticAtoms;
break;
case 110:
++n;
++numAromaticAtoms;
break;
case 115:
++s;
++numAromaticAtoms;
break;
case 111:
++o;
++numAromaticAtoms;
break;
case 35:
++numBonds;
case 61:
++numBonds;
}
}
$prettyPrint('C', c, formula);
$prettyPrint('H', h, formula);
$prettyPrint('N', n, formula);
$prettyPrint('O', o, formula);
$prettyPrint('P', p_0, formula);
$prettyPrint('S', s, formula);
$prettyPrint('Cl', cl, formula);
$prettyPrint('Br', br, formula);
$prettyPrint('F', f, formula);
$prettyPrint('I', iodine, formula);
if (charge != 0) {
$append(formula.data, '(');
charge == -1?($append(formula.data, '-') , formula):charge > 0 && ($append(formula.data, '+') , formula);
(charge < 0?-charge:charge) != 1 && ($append(formula.data, '' + charge) , formula);
$append(formula.data, ')');
}
formulaString = 'Formula: ' + $toString(formula.data);
$equals(errorString, '')?(moleculeInfo = '<html><body>' + formulaString + '<br>' + logpString + '<br>' + bondString + '<\/body><\/html>'):(moleculeInfo = errorString);
if ($equals(errorString, '')) {
nf = ($clinit_NumberFormat() , new NumberFormat_1($getDefaultNative()));
targets = '<html><body>Edit the molecule so that it:<br><ul>';
targets += '<li>can ';
canMakeHbonds && (targets += ' not ');
targets += 'make Hydrogen bonds<\/li>';
targets += '<li>can ';
canMakeIonicBonds && (targets += ' not ');
targets += 'make Ionic bonds<\/li>';
targets += '<li>has a relative hydrophobicity between ';
targets += $format(nf, logp - 1.5);
targets += ' and ';
targets += $format(nf, logp - 0.5);
targets += '<\/li>';
targets += '<li>has a relative hydrophobicity between ';
targets += $format(nf, logp + 0.5);
targets += ' and ';
targets += $format(nf, logp + 1.5);
targets += '<\/li>';
targets += '<\/ul><\/body><\/html>';
}
return new JsMolCalc$InfoAndTargets_0(moleculeInfo);
}
function $prettyPrint(atomLabel, number, outString){
if (number == 0) {
return;
}
$append(outString.data, atomLabel);
if (number == 1) {
$append(outString.data, ' ');
return;
}
$append(outString.data, '<sub>' + number + '<\/sub> ');
}
function JsMolCalc_0(){
new ArrayList_0;
}
defineSeed(41, 1, {}, JsMolCalc_0);
function $addBondToNonHAtom(this$static, bondIndex){
this$static.numBondsToNonHAtoms = this$static.numBondsToNonHAtoms + bondIndex;
}
--></script>
<script><!--
function $getAtomSpec(this$static){ function $getAtomSpec(this$static){
var charged; var charged;
this$static.chargeOffset = 0; this$static.chargeOffset = 0;
...@@ -1069,30 +1369,30 @@ function $getAtomSpec(this$static){ ...@@ -1069,30 +1369,30 @@ function $getAtomSpec(this$static){
case 3: case 3:
switch (this$static.numNeighborHs) { switch (this$static.numNeighborHs) {
case 4: case 4:
return new AtomSpec_0(0.528, 'C: sp3, H4', false, false); return new JsMolCalc$AtomSpec_0(0.528, 'C: sp3, H4', false, false);
case 3: case 3:
return this$static.numNeighborXs == 0?this$static.numNeighborPi == 0?new AtomSpec_0(0.528, 'C: sp3; C H H H, no pi', false, false):new AtomSpec_0(0.267, 'C: sp3; C H H H, pi', false, false):new AtomSpec_0(-0.032, 'C: sp3; X H H H', false, false); return this$static.numNeighborXs == 0?this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.528, 'C: sp3; C H H H, no pi', false, false):new JsMolCalc$AtomSpec_0(0.267, 'C: sp3; C H H H, pi', false, false):new JsMolCalc$AtomSpec_0(-0.032, 'C: sp3; X H H H', false, false);
case 2: case 2:
if (this$static.numNeighborXs == 0) { if (this$static.numNeighborXs == 0) {
switch (this$static.numNeighborPi) { switch (this$static.numNeighborPi) {
case 0: case 0:
return new AtomSpec_0(0.358, 'C: sp3; C C H H, no pi', false, false); return new JsMolCalc$AtomSpec_0(0.358, 'C: sp3; C C H H, no pi', false, false);
case 1: case 1:
return new AtomSpec_0(-0.008, 'C: sp3; C C H H, 1 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.008, 'C: sp3; C C H H, 1 pi', false, false);
case 2: case 2:
return new AtomSpec_0(-0.185, 'C: sp3; C C H H, 2 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.185, 'C: sp3; C C H H, 2 pi', false, false);
default:return new AtomSpec_0(0, 'C: sp3; ? ? H H', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: sp3; ? ? H H', false, false);
} }
} }
else { else {
switch (this$static.numNeighborPi) { switch (this$static.numNeighborPi) {
case 0: case 0:
return new AtomSpec_0(-0.137, 'C: sp3; C X H H, no pi', false, false); return new JsMolCalc$AtomSpec_0(-0.137, 'C: sp3; C X H H, no pi', false, false);
case 1: case 1:
return new AtomSpec_0(-0.303, 'C: sp3; C X H H, 1 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.303, 'C: sp3; C X H H, 1 pi', false, false);
case 2: case 2:
return new AtomSpec_0(-0.815, 'C: sp3; C X H H, 2 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.815, 'C: sp3; C X H H, 2 pi', false, false);
default:return new AtomSpec_0(0, 'C: sp3; ? X H H, H2', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: sp3; ? X H H, H2', false, false);
} }
} }
...@@ -1100,19 +1400,19 @@ function $getAtomSpec(this$static){ ...@@ -1100,19 +1400,19 @@ function $getAtomSpec(this$static){
if (this$static.numNeighborXs == 0) { if (this$static.numNeighborXs == 0) {
switch (this$static.numNeighborPi) { switch (this$static.numNeighborPi) {
case 0: case 0:
return new AtomSpec_0(0.127, 'C: sp3; C C C H, no pi', false, false); return new JsMolCalc$AtomSpec_0(0.127, 'C: sp3; C C C H, no pi', false, false);
case 1: case 1:
return new AtomSpec_0(-0.243, 'C: sp3; C C C H, 1 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.243, 'C: sp3; C C C H, 1 pi', false, false);
default:return new AtomSpec_0(-0.499, 'C: sp3; C C C H, >1 pi', false, false); default:return new JsMolCalc$AtomSpec_0(-0.499, 'C: sp3; C C C H, >1 pi', false, false);
} }
} }
else { else {
switch (this$static.numNeighborPi) { switch (this$static.numNeighborPi) {
case 0: case 0:
return new AtomSpec_0(-0.205, 'C: sp3; C C/X X H, no pi', false, false); return new JsMolCalc$AtomSpec_0(-0.205, 'C: sp3; C C/X X H, no pi', false, false);
case 1: case 1:
return new AtomSpec_0(-0.305, 'C: sp3; C C/X X H, 1 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.305, 'C: sp3; C C/X X H, 1 pi', false, false);
default:return new AtomSpec_0(-0.709, 'C: sp3; C C/X X H, >1 pi', false, false); default:return new JsMolCalc$AtomSpec_0(-0.709, 'C: sp3; C C/X X H, >1 pi', false, false);
} }
} }
...@@ -1120,74 +1420,74 @@ function $getAtomSpec(this$static){ ...@@ -1120,74 +1420,74 @@ function $getAtomSpec(this$static){
if (this$static.numNeighborXs == 0) { if (this$static.numNeighborXs == 0) {
switch (this$static.numNeighborPi) { switch (this$static.numNeighborPi) {
case 0: case 0:
return new AtomSpec_0(-0.006, 'C: sp3; C C C C, no pi', false, false); return new JsMolCalc$AtomSpec_0(-0.006, 'C: sp3; C C C C, no pi', false, false);
case 1: case 1:
return new AtomSpec_0(-0.57, 'C: sp3; C C C C, 1 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.57, 'C: sp3; C C C C, 1 pi', false, false);
default:return new AtomSpec_0(-0.317, 'C: sp3; C C C C, >1 pi', false, false); default:return new JsMolCalc$AtomSpec_0(-0.317, 'C: sp3; C C C C, >1 pi', false, false);
} }
} }
else { else {
switch (this$static.numNeighborPi) { switch (this$static.numNeighborPi) {
case 0: case 0:
return new AtomSpec_0(-0.316, 'C: sp3; C C/X C/X X, no pi', false, false); return new JsMolCalc$AtomSpec_0(-0.316, 'C: sp3; C C/X C/X X, no pi', false, false);
default:return new AtomSpec_0(-0.723, 'C: sp3; C C/X C/X X, pi', false, false); default:return new JsMolCalc$AtomSpec_0(-0.723, 'C: sp3; C C/X C/X X, pi', false, false);
} }
} }
default:return new AtomSpec_0(0, 'C: sp3; unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: sp3; unknown', false, false);
} }
case 2: case 2:
if (!this$static.aromatic) { if (!this$static.aromatic) {
switch (this$static.numNeighborHs) { switch (this$static.numNeighborHs) {
case 2: case 2:
return new AtomSpec_0(0.42, 'C: sp2; =? H H', false, false); return new JsMolCalc$AtomSpec_0(0.42, 'C: sp2; =? H H', false, false);
case 1: case 1:
switch (this$static.numNeighborXs) { switch (this$static.numNeighborXs) {
case 1: case 1:
return this$static.numNeighborPi == 0?new AtomSpec_0(0.001, 'C: sp2; =? X H, no pi', false, false):new AtomSpec_0(-0.31, 'C: sp2; =? X H, 1 pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.001, 'C: sp2; =? X H, no pi', false, false):new JsMolCalc$AtomSpec_0(-0.31, 'C: sp2; =? X H, 1 pi', false, false);
case 0: case 0:
return this$static.numNeighborPi == 0?new AtomSpec_0(0.466, 'C: sp2; =? C H, no pi', false, false):new AtomSpec_0(0.136, 'C: sp2; =? C H, 1 pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.466, 'C: sp2; =? C H, no pi', false, false):new JsMolCalc$AtomSpec_0(0.136, 'C: sp2; =? C H, 1 pi', false, false);
default:return new AtomSpec_0(0, 'C: sp2; =? H, unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: sp2; =? H, unknown', false, false);
} }
case 0: case 0:
switch (this$static.numNeighborXs) { switch (this$static.numNeighborXs) {
case 2: case 2:
return this$static.numNeighborPi == 0?new AtomSpec_0(0.005, 'C: sp2; =? X X, no pi', false, false):new AtomSpec_0(-0.315, 'C: sp2; =? X X, pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.005, 'C: sp2; =? X X, no pi', false, false):new JsMolCalc$AtomSpec_0(-0.315, 'C: sp2; =? X X, pi', false, false);
case 1: case 1:
return this$static.numNeighborPi == 0?new AtomSpec_0(-0.03, 'C: sp2; =? C X, no pi', false, false):new AtomSpec_0(-0.027, 'C: sp2; =? C X, pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(-0.03, 'C: sp2; =? C X, no pi', false, false):new JsMolCalc$AtomSpec_0(-0.027, 'C: sp2; =? C X, pi', false, false);
case 0: case 0:
return this$static.numNeighborPi == 0?new AtomSpec_0(0.05, 'C: sp2; =? C C, no pi', false, false):new AtomSpec_0(0.013, 'C: sp2; =? C C, pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.05, 'C: sp2; =? C C, no pi', false, false):new JsMolCalc$AtomSpec_0(0.013, 'C: sp2; =? C C, pi', false, false);
default:return new AtomSpec_0(0, 'C: sp2; =? C C, unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: sp2; =? C C, unknown', false, false);
} }
default:return new AtomSpec_0(0, 'C: sp2; unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: sp2; unknown', false, false);
} }
} }
switch (this$static.numNeighborHs) { switch (this$static.numNeighborHs) {
case 1: case 1:
return this$static.numNeighborNAro == 0?new AtomSpec_0(0.337, 'C: aromatic; C C H', false, false):new AtomSpec_0(0.126, 'C: aromatic; aro-N C H', false, false); return this$static.numNeighborNAro == 0?new JsMolCalc$AtomSpec_0(0.337, 'C: aromatic; C C H', false, false):new JsMolCalc$AtomSpec_0(0.126, 'C: aromatic; aro-N C H', false, false);
case 0: case 0:
switch (this$static.numNeighborXs) { switch (this$static.numNeighborXs) {
case 2: case 2:
return this$static.numNeighborNAro == 0?new AtomSpec_0(0, 'C: aromatic; unknown C X X', false, false):new AtomSpec_0(0.366, 'C: aromatic; aro-N C X', false, false); return this$static.numNeighborNAro == 0?new JsMolCalc$AtomSpec_0(0, 'C: aromatic; unknown C X X', false, false):new JsMolCalc$AtomSpec_0(0.366, 'C: aromatic; aro-N C X', false, false);
case 1: case 1:
return this$static.numNeighborNAro == 0?new AtomSpec_0(-0.151, 'C: aromatic; C C X', false, false):new AtomSpec_0(0.174, 'C: aromatic; aro-N C C', false, false); return this$static.numNeighborNAro == 0?new JsMolCalc$AtomSpec_0(-0.151, 'C: aromatic; C C X', false, false):new JsMolCalc$AtomSpec_0(0.174, 'C: aromatic; aro-N C C', false, false);
case 0: case 0:
return new AtomSpec_0(0.296, 'C: aromatic; C C C', false, false); return new JsMolCalc$AtomSpec_0(0.296, 'C: aromatic; C C C', false, false);
default:return new AtomSpec_0(0, 'C: aromatic; unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: aromatic; unknown', false, false);
} }
default:return new AtomSpec_0(0, 'C: aromatic; unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: aromatic; unknown', false, false);
} }
case 1: case 1:
if (this$static.isAnAllene) if (this$static.isAnAllene)
return new AtomSpec_0(2.073, 'C: =C=', false, false); return new JsMolCalc$AtomSpec_0(2.073, 'C: =C=', false, false);
return this$static.numNeighborHs == 0?new AtomSpec_0(0.33, 'C: sp; ? ?', false, false):new AtomSpec_0(0.209, 'C: sp; ? H', false, false); return this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(0.33, 'C: sp; ? ?', false, false):new JsMolCalc$AtomSpec_0(0.209, 'C: sp; ? H', false, false);
default:return new AtomSpec_0(0, 'C: unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: unknown', false, false);
} }
} }
if ($equals(this$static.element, 'N')) { if ($equals(this$static.element, 'N')) {
...@@ -1224,11 +1524,11 @@ function $getAtomSpec(this$static){ ...@@ -1224,11 +1524,11 @@ function $getAtomSpec(this$static){
if (this$static.amide) { if (this$static.amide) {
switch (this$static.numNeighborHs) { switch (this$static.numNeighborHs) {
case 2: case 2:
return new AtomSpec_0(-0.646 + this$static.chargeOffset, 'N: amide; C=O H H' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(-0.646 + this$static.chargeOffset, 'N: amide; C=O H H' + this$static.chargeString, true, charged);
case 1: case 1:
return this$static.numNeighborXs == 0?new AtomSpec_0(-0.096 + this$static.chargeOffset, 'N: amide; C=O C H' + this$static.chargeString, true, charged):new AtomSpec_0(-0.044 + this$static.chargeOffset, 'N: amide; C=O X H' + this$static.chargeString, true, charged); return this$static.numNeighborXs == 0?new JsMolCalc$AtomSpec_0(-0.096 + this$static.chargeOffset, 'N: amide; C=O C H' + this$static.chargeString, true, charged):new JsMolCalc$AtomSpec_0(-0.044 + this$static.chargeOffset, 'N: amide; C=O X H' + this$static.chargeString, true, charged);
case 0: case 0:
return this$static.numNeighborXs == 0?new AtomSpec_0(0.078 + this$static.chargeOffset, 'N: amide; C=O C C' + this$static.chargeString, !charged, charged):new AtomSpec_0(-0.118 + this$static.chargeOffset, 'N: amide; C=O C X' + this$static.chargeString, !charged, charged); return this$static.numNeighborXs == 0?new JsMolCalc$AtomSpec_0(0.078 + this$static.chargeOffset, 'N: amide; C=O C C' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(-0.118 + this$static.chargeOffset, 'N: amide; C=O C X' + this$static.chargeString, !charged, charged);
} }
} }
switch (this$static.hybridization) { switch (this$static.hybridization) {
...@@ -1236,40 +1536,40 @@ function $getAtomSpec(this$static){ ...@@ -1236,40 +1536,40 @@ function $getAtomSpec(this$static){
switch (this$static.numNeighborHs) { switch (this$static.numNeighborHs) {
case 2: case 2:
if (this$static.numNeighborXs != 0) if (this$static.numNeighborXs != 0)
return new AtomSpec_0(-1.082 + this$static.chargeOffset, 'N: sp3; X H H' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(-1.082 + this$static.chargeOffset, 'N: sp3; X H H' + this$static.chargeString, true, charged);
return this$static.numNeighborPi == 0?new AtomSpec_0(-0.534 + this$static.chargeOffset, 'N: sp3; C H H, no pi' + this$static.chargeString, true, charged):new AtomSpec_0(-0.329 + this$static.chargeOffset, 'N: sp3; C H H, pi' + this$static.chargeString, true, charged); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(-0.534 + this$static.chargeOffset, 'N: sp3; C H H, no pi' + this$static.chargeString, true, charged):new JsMolCalc$AtomSpec_0(-0.329 + this$static.chargeOffset, 'N: sp3; C H H, pi' + this$static.chargeString, true, charged);
case 1: case 1:
if (this$static.numNeighborXs != 0) if (this$static.numNeighborXs != 0)
return new AtomSpec_0(0.324 + this$static.chargeOffset, 'N: sp3; C X H' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(0.324 + this$static.chargeOffset, 'N: sp3; C X H' + this$static.chargeString, true, charged);
return this$static.numNeighborPi == 0?new AtomSpec_0(-0.112 + this$static.chargeOffset, 'N: sp3; C C H, no pi' + this$static.chargeString, true, charged):new AtomSpec_0(0.166 + this$static.chargeOffset, 'N: sp3; C C H, pi' + this$static.chargeString, true, charged); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(-0.112 + this$static.chargeOffset, 'N: sp3; C C H, no pi' + this$static.chargeString, true, charged):new JsMolCalc$AtomSpec_0(0.166 + this$static.chargeOffset, 'N: sp3; C C H, pi' + this$static.chargeString, true, charged);
case 0: case 0:
if (this$static.numNeighborXs != 0) if (this$static.numNeighborXs != 0)
return new AtomSpec_0(-0.239 + this$static.chargeOffset, 'N: sp3; C C X' + this$static.chargeString, !charged, charged); return new JsMolCalc$AtomSpec_0(-0.239 + this$static.chargeOffset, 'N: sp3; C C X' + this$static.chargeString, !charged, charged);
return this$static.numNeighborPi == 0?new AtomSpec_0(0.159 + this$static.chargeOffset, 'N: sp3; C C C, no pi' + this$static.chargeString, !charged, charged):new AtomSpec_0(0.761 + this$static.chargeOffset, 'N: sp3; C C C, pi' + this$static.chargeString, !charged, charged); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.159 + this$static.chargeOffset, 'N: sp3; C C C, no pi' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(0.761 + this$static.chargeOffset, 'N: sp3; C C C, pi' + this$static.chargeString, !charged, charged);
default:return new AtomSpec_0(this$static.chargeOffset, 'N: sp3; unknown' + this$static.chargeString, true, charged); default:return new JsMolCalc$AtomSpec_0(this$static.chargeOffset, 'N: sp3; unknown' + this$static.chargeString, true, charged);
} }
case 2: case 2:
if (this$static.aromatic) { if (this$static.aromatic) {
return new AtomSpec_0(-0.493 + this$static.chargeOffset, 'N: aromatic' + this$static.chargeString, !charged, charged); return new JsMolCalc$AtomSpec_0(-0.493 + this$static.chargeOffset, 'N: aromatic' + this$static.chargeString, !charged, charged);
} }
if ($equals(this$static.doubleBondedNeighbor, 'C')) { if ($equals(this$static.doubleBondedNeighbor, 'C')) {
return this$static.numNeighborXs == 0?this$static.numNeighborPi == 0?this$static.numNeighborHs == 0?new AtomSpec_0(0.007 + this$static.chargeOffset, 'N: sp2; =C ? no H, no pi' + this$static.chargeString, !charged, charged):new AtomSpec_0(0.007 + this$static.chargeOffset, 'N: sp2; =C ? H, no pi' + this$static.chargeString, true, charged):this$static.numNeighborHs == 0?new AtomSpec_0(-0.275 + this$static.chargeOffset, 'N: sp2; =C ? no H, pi' + this$static.chargeString, !charged, charged):new AtomSpec_0(-0.275 + this$static.chargeOffset, 'N: sp2; =C ? H, pi' + this$static.chargeString, true, charged):this$static.numNeighborPi == 0?this$static.numNeighborHs == 0?new AtomSpec_0(0.366 + this$static.chargeOffset, 'N: sp2; =C X no H, no pi' + this$static.chargeString, !charged, charged):new AtomSpec_0(0.366 + this$static.chargeOffset, 'N: sp2; =C X H, no pi' + this$static.chargeString, true, charged):this$static.numNeighborHs == 0?new AtomSpec_0(0.251 + this$static.chargeOffset, 'N: sp2; =C X no H, pi' + this$static.chargeString, !charged, charged):new AtomSpec_0(0.251 + this$static.chargeOffset, 'N: sp2; =C X H, pi' + this$static.chargeString, true, charged); return this$static.numNeighborXs == 0?this$static.numNeighborPi == 0?this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(0.007 + this$static.chargeOffset, 'N: sp2; =C ? no H, no pi' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(0.007 + this$static.chargeOffset, 'N: sp2; =C ? H, no pi' + this$static.chargeString, true, charged):this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(-0.275 + this$static.chargeOffset, 'N: sp2; =C ? no H, pi' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(-0.275 + this$static.chargeOffset, 'N: sp2; =C ? H, pi' + this$static.chargeString, true, charged):this$static.numNeighborPi == 0?this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(0.366 + this$static.chargeOffset, 'N: sp2; =C X no H, no pi' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(0.366 + this$static.chargeOffset, 'N: sp2; =C X H, no pi' + this$static.chargeString, true, charged):this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(0.251 + this$static.chargeOffset, 'N: sp2; =C X no H, pi' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(0.251 + this$static.chargeOffset, 'N: sp2; =C X H, pi' + this$static.chargeString, true, charged);
} }
if ($equals(this$static.doubleBondedNeighbor, 'N')) { if ($equals(this$static.doubleBondedNeighbor, 'N')) {
return this$static.numNeighborXs == 1?this$static.numNeighborHs == 0?new AtomSpec_0(0.536 + this$static.chargeOffset, 'N: sp2; =N ? no H' + this$static.chargeString, !charged, charged):new AtomSpec_0(0.536 + this$static.chargeOffset, 'N: sp2; =N ? H' + this$static.chargeString, true, charged):this$static.numNeighborHs == 0?new AtomSpec_0(-0.597 + this$static.chargeOffset, 'N: sp2; =N X no H' + this$static.chargeString, !charged, charged):new AtomSpec_0(-0.597 + this$static.chargeOffset, 'N: sp2; =N X H' + this$static.chargeString, true, charged); return this$static.numNeighborXs == 1?this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(0.536 + this$static.chargeOffset, 'N: sp2; =N ? no H' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(0.536 + this$static.chargeOffset, 'N: sp2; =N ? H' + this$static.chargeString, true, charged):this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(-0.597 + this$static.chargeOffset, 'N: sp2; =N X no H' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(-0.597 + this$static.chargeOffset, 'N: sp2; =N X H' + this$static.chargeString, true, charged);
} }
if ($equals(this$static.doubleBondedNeighbor, 'O')) if ($equals(this$static.doubleBondedNeighbor, 'O'))
return new AtomSpec_0(0.427 + this$static.chargeOffset, 'N: nitroso' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(0.427 + this$static.chargeOffset, 'N: nitroso' + this$static.chargeString, true, charged);
if (this$static.numNeighborXs != 0) if (this$static.numNeighborXs != 0)
return new AtomSpec_0(0.427, 'N: sp2; =? ?', true, charged); return new JsMolCalc$AtomSpec_0(0.427, 'N: sp2; =? ?', true, charged);
return new AtomSpec_0(this$static.chargeOffset, 'N: sp2; unknown' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(this$static.chargeOffset, 'N: sp2; unknown' + this$static.chargeString, true, charged);
case 1: case 1:
return $equals(this$static.doubleBondedNeighbor, 'O2')?new AtomSpec_0(1.178, 'N: nitro', true, false):this$static.numNeighborHs == 0?new AtomSpec_0(-0.566 + this$static.chargeOffset, 'N: sp no H' + this$static.chargeString, !charged, charged):new AtomSpec_0(-0.566 + this$static.chargeOffset, 'N: sp H' + this$static.chargeString, true, charged); return $equals(this$static.doubleBondedNeighbor, 'O2')?new JsMolCalc$AtomSpec_0(1.178, 'N: nitro', true, false):this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(-0.566 + this$static.chargeOffset, 'N: sp no H' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(-0.566 + this$static.chargeOffset, 'N: sp H' + this$static.chargeString, true, charged);
default:return new AtomSpec_0(this$static.chargeOffset, 'N: unknown' + this$static.chargeString, true, charged); default:return new JsMolCalc$AtomSpec_0(this$static.chargeOffset, 'N: unknown' + this$static.chargeString, true, charged);
} }
} }
if ($equals(this$static.element, 'O')) { if ($equals(this$static.element, 'O')) {
...@@ -1284,18 +1584,18 @@ function $getAtomSpec(this$static){ ...@@ -1284,18 +1584,18 @@ function $getAtomSpec(this$static){
switch (this$static.numNeighborHs) { switch (this$static.numNeighborHs) {
case 1: case 1:
if (this$static.numNeighborXs != 0) if (this$static.numNeighborXs != 0)
return new AtomSpec_0(-0.522 + this$static.chargeOffset, 'O: sp3; X H' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(-0.522 + this$static.chargeOffset, 'O: sp3; X H' + this$static.chargeString, true, charged);
return this$static.numNeighborPi == 0?new AtomSpec_0(-0.467 + this$static.chargeOffset, 'O: sp3; C H, no pi' + this$static.chargeString, true, charged):new AtomSpec_0(0.082 + this$static.chargeOffset, 'O: sp3; C H, pi' + this$static.chargeString, true, charged); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(-0.467 + this$static.chargeOffset, 'O: sp3; C H, no pi' + this$static.chargeString, true, charged):new JsMolCalc$AtomSpec_0(0.082 + this$static.chargeOffset, 'O: sp3; C H, pi' + this$static.chargeString, true, charged);
case 0: case 0:
if (this$static.numNeighborXs != 0) if (this$static.numNeighborXs != 0)
return new AtomSpec_0(0.105 + this$static.chargeOffset, 'O: sp3; C X' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(0.105 + this$static.chargeOffset, 'O: sp3; C X' + this$static.chargeString, true, charged);
return this$static.numNeighborPi == 0?new AtomSpec_0(0.084 + this$static.chargeOffset, 'O: sp3; C C, no pi' + this$static.chargeString, true, charged):new AtomSpec_0(0.435 + this$static.chargeOffset, 'O: sp3; C C, pi' + this$static.chargeString, true, charged); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.084 + this$static.chargeOffset, 'O: sp3; C C, no pi' + this$static.chargeString, true, charged):new JsMolCalc$AtomSpec_0(0.435 + this$static.chargeOffset, 'O: sp3; C C, pi' + this$static.chargeString, true, charged);
default:return new AtomSpec_0(this$static.chargeOffset, 'O: sp3; unknown' + this$static.chargeString, true, charged); default:return new JsMolCalc$AtomSpec_0(this$static.chargeOffset, 'O: sp3; unknown' + this$static.chargeString, true, charged);
} }
case 2: case 2:
return new AtomSpec_0(-0.399 + this$static.chargeOffset, 'O: sp2' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(-0.399 + this$static.chargeOffset, 'O: sp2' + this$static.chargeString, true, charged);
default:return new AtomSpec_0(this$static.chargeOffset, 'O: unknown' + this$static.chargeString, true, charged); default:return new JsMolCalc$AtomSpec_0(this$static.chargeOffset, 'O: unknown' + this$static.chargeString, true, charged);
} }
} }
if ($equals(this$static.element, 'S')) { if ($equals(this$static.element, 'S')) {
...@@ -1307,39 +1607,39 @@ function $getAtomSpec(this$static){ ...@@ -1307,39 +1607,39 @@ function $getAtomSpec(this$static){
} }
switch (this$static.hybridization) { switch (this$static.hybridization) {
case 3: case 3:
return this$static.numNeighborHs == 0?new AtomSpec_0(0.255 + this$static.chargeOffset, 'S: sp3; C/X C/X' + this$static.chargeString, false, charged):new AtomSpec_0(0.419 + this$static.chargeOffset, 'S: sp3; C/X H' + this$static.chargeString, false, charged); return this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(0.255 + this$static.chargeOffset, 'S: sp3; C/X C/X' + this$static.chargeString, false, charged):new JsMolCalc$AtomSpec_0(0.419 + this$static.chargeOffset, 'S: sp3; C/X H' + this$static.chargeString, false, charged);
case 2: case 2:
return $equals(this$static.doubleBondedNeighbor, 'O')?new AtomSpec_0(-1.375, 'S: sulfoxide', false, charged):new AtomSpec_0(-0.148 + this$static.chargeOffset, 'S: sp2' + this$static.chargeString, false, charged); return $equals(this$static.doubleBondedNeighbor, 'O')?new JsMolCalc$AtomSpec_0(-1.375, 'S: sulfoxide', false, charged):new JsMolCalc$AtomSpec_0(-0.148 + this$static.chargeOffset, 'S: sp2' + this$static.chargeString, false, charged);
case 1: case 1:
if ($equals(this$static.doubleBondedNeighbor, 'O2')) { if ($equals(this$static.doubleBondedNeighbor, 'O2')) {
return new AtomSpec_0(-0.168, 'S: sulfone', false, charged); return new JsMolCalc$AtomSpec_0(-0.168, 'S: sulfone', false, charged);
} }
default:return new AtomSpec_0(this$static.chargeOffset, 'S: unknown' + this$static.chargeString, false, charged); default:return new JsMolCalc$AtomSpec_0(this$static.chargeOffset, 'S: unknown' + this$static.chargeString, false, charged);
} }
} }
if ($equals(this$static.element, 'P') && this$static.hybridization == 2) { if ($equals(this$static.element, 'P') && this$static.hybridization == 2) {
if ($equals(this$static.doubleBondedNeighbor, 'O')) { if ($equals(this$static.doubleBondedNeighbor, 'O')) {
return new AtomSpec_0(-0.447, 'P: in phosphate', false, false); return new JsMolCalc$AtomSpec_0(-0.447, 'P: in phosphate', false, false);
} }
if ($equals(this$static.doubleBondedNeighbor, 'S')) { if ($equals(this$static.doubleBondedNeighbor, 'S')) {
return new AtomSpec_0(1.253, 'P: in thio-phosphate', false, false); return new JsMolCalc$AtomSpec_0(1.253, 'P: in thio-phosphate', false, false);
} }
return new AtomSpec_0(0, 'P: unknown', false, false); return new JsMolCalc$AtomSpec_0(0, 'P: unknown', false, false);
} }
if ($equals(this$static.element, 'F')) { if ($equals(this$static.element, 'F')) {
return this$static.numNeighborPi == 0?new AtomSpec_0(0.375, 'F; no pi', false, false):new AtomSpec_0(0.202, 'F; pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.375, 'F; no pi', false, false):new JsMolCalc$AtomSpec_0(0.202, 'F; pi', false, false);
} }
if ($equals(this$static.element, 'Cl')) { if ($equals(this$static.element, 'Cl')) {
return this$static.numNeighborPi == 0?new AtomSpec_0(0.512, 'Cl; no pi', false, false):new AtomSpec_0(0.663, 'Cl; pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.512, 'Cl; no pi', false, false):new JsMolCalc$AtomSpec_0(0.663, 'Cl; pi', false, false);
} }
if ($equals(this$static.element, 'Br')) { if ($equals(this$static.element, 'Br')) {
return this$static.numNeighborPi == 0?new AtomSpec_0(0.85, 'Br; no pi', false, false):new AtomSpec_0(0.839, 'Br; pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.85, 'Br; no pi', false, false):new JsMolCalc$AtomSpec_0(0.839, 'Br; pi', false, false);
} }
if ($equals(this$static.element, 'I')) { if ($equals(this$static.element, 'I')) {
return this$static.numNeighborPi == 0?new AtomSpec_0(1.05, 'I; no pi', false, false):new AtomSpec_0(1.109, 'I; pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(1.05, 'I; no pi', false, false):new JsMolCalc$AtomSpec_0(1.109, 'I; pi', false, false);
} }
return new AtomSpec_0(0, 'unknown atom', false, false); return new JsMolCalc$AtomSpec_0(0, 'unknown atom', false, false);
} }
function $getNumNeighborHs(this$static){ function $getNumNeighborHs(this$static){
...@@ -1389,7 +1689,7 @@ function $updateHybridization(this$static, bondIndex){ ...@@ -1389,7 +1689,7 @@ function $updateHybridization(this$static, bondIndex){
} }
} }
function Atom_0(){ function JsMolCalc$Atom_0(){
this.element = ''; this.element = '';
this.charge = 0; this.charge = 0;
this.aromatic = false; this.aromatic = false;
...@@ -1408,9 +1708,10 @@ function Atom_0(){ ...@@ -1408,9 +1708,10 @@ function Atom_0(){
this.alreadyHasOneDoubleBond = false; this.alreadyHasOneDoubleBond = false;
this.isAnAllene = false; this.isAnAllene = false;
this.currentMaxBondIndex = 0; this.currentMaxBondIndex = 0;
this.numBondsToNonHAtoms = 0;
} }
defineSeed(41, 1, makeCastMap([Q$Atom]), Atom_0); defineSeed(42, 1, makeCastMap([Q$JsMolCalc$Atom]), JsMolCalc$Atom_0);
_.alreadyHasOneDoubleBond = false; _.alreadyHasOneDoubleBond = false;
_.amide = false; _.amide = false;
_.aromatic = false; _.aromatic = false;
...@@ -1423,507 +1724,40 @@ _.element = null; ...@@ -1423,507 +1724,40 @@ _.element = null;
_.hybridization = 0; _.hybridization = 0;
_.isACarbonyl = false; _.isACarbonyl = false;
_.isAnAllene = false; _.isAnAllene = false;
_.numBondsToNonHAtoms = 0;
_.numNeighborAro = 0; _.numNeighborAro = 0;
_.numNeighborCs = 0; _.numNeighborCs = 0;
_.numNeighborHs = 0; _.numNeighborHs = 0;
_.numNeighborNAro = 0; _.numNeighborNAro = 0;
_.numNeighborPi = 0; _.numNeighborPi = 0;
_.numNeighborXs = 0; _.numNeighborXs = 0;
function AtomSpec_0(logp, type, canMakeHbonds, canMakeIonicBonds){ function JsMolCalc$AtomSpec_0(logp, type, canMakeHbonds, canMakeIonicBonds){
this.type = type; this.type = type;
this.logp = logp; this.logp = logp;
this.canMakeHbonds = canMakeHbonds; this.canMakeHbonds = canMakeHbonds;
this.canMakeIonicBonds = canMakeIonicBonds; this.canMakeIonicBonds = canMakeIonicBonds;
} }
defineSeed(42, 1, {}, AtomSpec_0); defineSeed(43, 1, {}, JsMolCalc$AtomSpec_0);
_.canMakeHbonds = false; _.canMakeHbonds = false;
_.canMakeIonicBonds = false; _.canMakeIonicBonds = false;
_.logp = 0; _.logp = 0;
_.type = null; _.type = null;
function InfoAndTargets_0(info, targets){ function JsMolCalc$InfoAndTargets_0(info){
this.info = info; this.info = info;
this.targets = targets;
} }
defineSeed(43, 1, {}, InfoAndTargets_0); defineSeed(44, 1, {}, JsMolCalc$InfoAndTargets_0);
_.info = null; _.info = null;
_.targets = null; function JsMolCalcAPI$API_0(){
function $export_0(){
if (!exported_0) {
exported_0 = true;
$export0_0();
}
}
function $export0_0(){
var pkg = declarePackage('edu.umb.bio.jsMolCalc.JsMolCalcAPI.Info');
var __0;
$wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Info = $entry(function(){
var g, j = this;
isAssignableToInstance(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Info_2_classLit, arguments)?(g = arguments[0]):arguments.length == 1 && (g = ___create(gwtInstance(arguments[0])));
j.g = g;
setWrapper(g, j);
return j;
}
);
__0 = $wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Info.prototype = new Object;
__0.toString = $entry(function(){
return this.g.toString_0();
}
);
addTypeMap(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Info_2_classLit, $wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Info);
if (pkg)
for (p in pkg)
$wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Info[p] === undefined && ($wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Info[p] = pkg[p]);
} }
function InfoExporterImpl_0(){ defineSeed(45, 1, makeCastMap([Q$Exportable]), JsMolCalcAPI$API_0);
$export_0(); function ArrayStoreException_0(){
$fillInStackTrace();
} }
function ___create(a0){ defineSeed(46, 6, makeCastMap([Q$Serializable, Q$Throwable]), ArrayStoreException_0);
return new JsMolCalcAPI$Info_0(a0);
}
defineSeed(44, 1, {}, InfoExporterImpl_0);
var exported_0 = false;
--></script>
<script><!--
function computeAndDisplay(molString, smileString, jmeString){
var atom, atomDataLines, atomLineParts, atomList, atomNumber, bondArray, bondIndex, bondLineParts, br, c, canMakeHbonds, canMakeIonicBonds, charge, chargeLineParts, cl, currentAtom, currentAtomSpec, currentNeighbor, element, errorString, f, fifthAtom, firstAtom, formula, fourthAtom, h, i, illegalAtoms, info, iodine, j, k, l, line3Parts, logp, m, molStringLines, n, neighbors, nf, numAromaticAtoms, numAtoms, numBonds, o, p_0, s, secondAtom, sixthAtom, targets, thirdAtom;
if ($equals(molString, '') || $equals(smileString, '') || $equals(jmeString, '')) {
return new InfoAndTargets_0(null, null);
}
atomDataLines = new StringBuffer_0;
atomList = new ArrayList_0;
$add_0(atomList, new Atom_0);
molStringLines = $split(molString, '\n', 0);
line3Parts = $split(molStringLines[3], '[ ]+', 0);
numAtoms = __parseAndValidateInt(line3Parts[1]);
numBonds = __parseAndValidateInt(line3Parts[2]);
for (i = 1; i < numAtoms + 1; ++i) {
atomLineParts = $split(molStringLines[i + 3], '[ ]+', 0);
element = atomLineParts[4];
atom = new Atom_0;
atom.element = element;
setCheck(atomList.array, atomList.size++, atom);
}
for (i = 0; i < molStringLines.length; ++i) {
if (molStringLines[i].indexOf('CHG') != -1) {
chargeLineParts = $split(molStringLines[i], '[ ]+', 0);
atomNumber = __parseAndValidateInt(chargeLineParts[3]);
charge = __parseAndValidateInt(chargeLineParts[4]);
atom = dynamicCast((checkIndex(atomNumber, atomList.size) , atomList.array[atomNumber]), Q$Atom);
atom.charge = charge;
}
}
bondArray = initDims([_3_3I_classLit, _3I_classLit], [makeCastMap([Q$Serializable]), makeCastMap([Q$int_$1, Q$Serializable])], [Q$int_$1, -1], [numAtoms + 1, numAtoms + 1], 2, 1);
for (i = 1; i < numAtoms + 1; ++i) {
fill(bondArray[i], bondArray[i].length);
}
for (i = 1; i < numBonds + 1; ++i) {
bondLineParts = $split(molStringLines[i + numAtoms + 3], '[ ]+', 0);
firstAtom = __parseAndValidateInt(bondLineParts[1]);
secondAtom = __parseAndValidateInt(bondLineParts[2]);
bondIndex = __parseAndValidateInt(bondLineParts[3]);
bondArray[firstAtom][secondAtom] = bondIndex;
bondArray[secondAtom][firstAtom] = bondIndex;
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
bondArray[i][j] != 0 && $updateHybridization(currentAtom, bondArray[i][j]);
}
}
for (i = 1; i < numAtoms + 1; ++i) {
firstAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
if (($equals(firstAtom.element, 'C') || $equals(firstAtom.element, 'N')) && (firstAtom.hybridization == 2 || firstAtom.aromatic)) {
for (j = 1; j < numAtoms + 1; ++j) {
secondAtom = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$Atom);
if ((bondArray[i][j] == 1 || bondArray[i][j] == 2 || secondAtom.aromatic && bondArray[i][j] != 0 || firstAtom.aromatic && bondArray[i][j] != 0) && ($equals(secondAtom.element, 'C') || $equals(secondAtom.element, 'N')) && secondAtom.hybridization == 2 && i != j) {
for (k = 1; k < numAtoms + 1; ++k) {
thirdAtom = dynamicCast((checkIndex(k, atomList.size) , atomList.array[k]), Q$Atom);
if ((bondArray[j][k] == 1 && bondArray[i][j] == 2 || bondArray[j][k] == 2 && bondArray[i][j] == 1 || thirdAtom.aromatic && bondArray[j][k] != 0 || secondAtom.aromatic && bondArray[j][k] != 0) && ($equals(thirdAtom.element, 'C') || $equals(thirdAtom.element, 'N')) && thirdAtom.hybridization == 2 && k != i && k != j) {
for (l = 1; l < numAtoms + 1; ++l) {
fourthAtom = dynamicCast((checkIndex(l, atomList.size) , atomList.array[l]), Q$Atom);
if ((bondArray[k][l] == 1 && bondArray[j][k] == 2 || bondArray[k][l] == 2 && bondArray[j][k] == 1 || fourthAtom.aromatic && bondArray[k][l] != 0 || thirdAtom.aromatic && bondArray[k][l] != 0) && ($equals(fourthAtom.element, 'C') || $equals(fourthAtom.element, 'N')) && fourthAtom.hybridization == 2 && l != i && l != j && l != k) {
for (m = 1; m < numAtoms + 1; ++m) {
fifthAtom = dynamicCast((checkIndex(m, atomList.size) , atomList.array[m]), Q$Atom);
if ((bondArray[l][m] == 1 && bondArray[k][l] == 2 || bondArray[l][m] == 2 && bondArray[k][l] == 1 || fifthAtom.aromatic && bondArray[l][m] != 0 || fourthAtom.aromatic && bondArray[l][m] != 0) && ($equals(fifthAtom.element, 'C') || $equals(fifthAtom.element, 'N')) && fifthAtom.hybridization == 2 && m != i && m != j && m != k && m != l) {
for (n = 1; n < numAtoms + 1; ++n) {
sixthAtom = dynamicCast((checkIndex(n, atomList.size) , atomList.array[n]), Q$Atom);
if ((bondArray[m][n] == 1 && bondArray[l][m] == 2 || bondArray[m][n] == 2 && bondArray[l][m] == 1 || sixthAtom.aromatic && bondArray[m][n] != 0 || fifthAtom.aromatic && bondArray[m][n] != 0) && ($equals(sixthAtom.element, 'C') || $equals(sixthAtom.element, 'N')) && sixthAtom.hybridization == 2 && n != i && n != j && n != k && n != l && n != m) {
if (bondArray[n][i] == 2 && bondArray[m][n] == 1 || bondArray[n][i] == 1 && bondArray[m][n] == 2) {
firstAtom.aromatic = true;
secondAtom.aromatic = true;
thirdAtom.aromatic = true;
fourthAtom.aromatic = true;
fifthAtom.aromatic = true;
sixthAtom.aromatic = true;
}
}
}
}
}
}
}
}
}
}
}
}
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
if (bondArray[i][j] != 0) {
currentNeighbor = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$Atom);
$processNeighbor(currentAtom, currentNeighbor.element, bondArray[i][j], currentNeighbor.aromatic);
}
}
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
if (bondArray[i][j] != 0) {
currentNeighbor = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$Atom);
if (currentNeighbor.hybridization < 3) {
for (k = 1; k < numAtoms + 1; ++k) {
bondArray[j][k] > 1 && k != i && ++currentAtom.numNeighborPi;
}
}
}
}
}
h = 0;
charge = 0;
for (i = 1; i < numAtoms + 1; ++i) {
atom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
$getNumNeighborHs(atom);
h = h + atom.numNeighborHs;
charge = charge + atom.charge;
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
if (bondArray[i][j] != 0) {
currentNeighbor = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$Atom);
$equals(currentAtom.element, 'N') && currentNeighbor.isACarbonyl && (currentAtom.amide = true);
}
}
}
illegalAtoms = new StringBuffer_0;
for (i = 1; i < numAtoms + 1; ++i) {
atom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
$equals(atom.element, 'C') && atom.charge != 0 && ($append(illegalAtoms.data, 'A Charged C atom.<br>') , illegalAtoms);
if ($equals(atom.element, 'N')) {
atom.charge > 1 && ($append(illegalAtoms.data, 'An N atom with too high + charge.<br>') , illegalAtoms);
atom.charge < 0 && ($append(illegalAtoms.data, 'An N atom with - charge.<br>') , illegalAtoms);
$getNumNeighborHs(atom) < 0 && !($equals(atom.doubleBondedNeighbor, 'O2') && $getNumNeighborHs(atom) == -2 && atom.numNeighborCs == 1 && atom.numNeighborXs == 2 && atom.charge == 0) && ($append(illegalAtoms.data, 'An N atom making too many bonds.<br>') , illegalAtoms);
}
if ($equals(atom.element, 'O')) {
atom.charge < -1 && ($append(illegalAtoms.data, 'An O atom with too high - charge.<br>') , illegalAtoms);
atom.charge > 0 && ($append(illegalAtoms.data, 'An O atom with + charge.<br>') , illegalAtoms);
}
if ($equals(atom.element, 'S')) {
atom.charge > 0 && ($append(illegalAtoms.data, 'An S atom with a + charge.<br>') , illegalAtoms);
$getNumNeighborHs(atom) < 0 && $getNumNeighborHs(atom) != -4 && $getNumNeighborHs(atom) != -2 && ($append(illegalAtoms.data, 'An S atom not making 2, 4, or 6 bonds.<br>') , illegalAtoms);
}
if ($equals(atom.element, 'P')) {
atom.charge != 0 && ($append(illegalAtoms.data, 'A Charged P atom.<br>') , illegalAtoms);
atom.numNeighborHs != -3 && ($append(illegalAtoms.data, 'A P atom not making 5 bonds.<br>') , illegalAtoms);
}
($equals(atom.element, 'F') || $equals(atom.element, 'Cl') || $equals(atom.element, 'Br') || $equals(atom.element, 'I')) && atom.charge != 0 && $append_0(illegalAtoms, 'A Charged ' + atom.element + ' atom.<br>');
$equals(atom.element, 'X') && ($append(illegalAtoms.data, 'An X atom.<br>') , illegalAtoms);
}
errorString = '';
$toString(illegalAtoms.data).length != 0 && (errorString = '<html><body>It is not possible to calculate logp<br>for your molecule because it contains:<br>' + $toString(illegalAtoms.data) + '<\/body><\/html>');
logp = 0;
canMakeHbonds = false;
canMakeIonicBonds = false;
if ($toString(illegalAtoms.data).length == 0) {
nf = ($clinit_NumberFormat() , new NumberFormat_1($getDefaultNative()));
for (i = 1; i < numAtoms + 1; ++i) {
atom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
currentAtomSpec = $getAtomSpec(atom);
logp = logp + currentAtomSpec.logp;
canMakeHbonds = canMakeHbonds || currentAtomSpec.canMakeHbonds;
canMakeIonicBonds = canMakeIonicBonds || currentAtomSpec.canMakeIonicBonds;
neighbors = new StringBuffer_0;
for (j = 1; j < numAtoms + 1; ++j) {
bondArray[i][j] != 0 && ($append(neighbors.data, j + ' ') , neighbors);
}
$append_0(atomDataLines, i + ' ' + currentAtomSpec.type + '; bonded to: ' + $toString(neighbors.data) + '; logp= ' + $format(nf, currentAtomSpec.logp) + '; H-bonds: ' + currentAtomSpec.canMakeHbonds + '; ionic bonds: ' + currentAtomSpec.canMakeIonicBonds + '\n');
}
}
numBonds = 0;
numAromaticAtoms = 0;
c = 0;
n = 0;
o = 0;
s = 0;
p_0 = 0;
cl = 0;
br = 0;
f = 0;
iodine = 0;
formula = new StringBuffer_0;
for (i = 0; i < smileString.length; ++i) {
switch (smileString.charCodeAt(i)) {
case 67:
++c;
break;
case 78:
++n;
break;
case 79:
++o;
break;
case 83:
++s;
break;
case 80:
++p_0;
break;
case 108:
--c;
++cl;
break;
case 66:
++br;
break;
case 70:
++f;
break;
case 73:
++iodine;
break;
case 99:
++c;
++numAromaticAtoms;
break;
case 110:
++n;
++numAromaticAtoms;
break;
case 115:
++s;
++numAromaticAtoms;
break;
case 111:
++o;
++numAromaticAtoms;
break;
case 35:
++numBonds;
case 61:
++numBonds;
}
}
prettyPrint('C', c, formula);
prettyPrint('H', h, formula);
prettyPrint('N', n, formula);
prettyPrint('O', o, formula);
prettyPrint('P', p_0, formula);
prettyPrint('S', s, formula);
prettyPrint('Cl', cl, formula);
prettyPrint('Br', br, formula);
prettyPrint('F', f, formula);
prettyPrint('I', iodine, formula);
if (charge != 0) {
$append(formula.data, '(');
charge == -1?($append(formula.data, '-') , formula):charge > 0 && ($append(formula.data, '+') , formula);
(charge < 0?-charge:charge) != 1 && ($append(formula.data, '' + charge) , formula);
$append(formula.data, ')');
}
'Formula: ' + $toString(formula.data);
$equals(errorString, '')?(info = new MoleculeInfo_0(canMakeHbonds, canMakeIonicBonds, logp, null)):(info = new MoleculeInfo_0(false, false, 0, errorString));
targets = initDim(_3Ledu_umb_bio_jsMolCalc_client_Target_2_classLit, makeCastMap([Q$Serializable]), Q$Target, 4, 0);
if ($equals(errorString, '')) {
canMakeHbonds?(targets[0] = new Target_1(1)):(targets[0] = new Target_1(2));
canMakeIonicBonds?(targets[1] = new Target_1(3)):(targets[1] = new Target_1(4));
targets[2] = new Target_0(logp - 1.5, logp - 0.5);
targets[3] = new Target_0(logp + 0.5, logp + 1.5);
}
return new InfoAndTargets_0(info, targets);
}
function prettyPrint(atomLabel, number, outString){
if (number == 0) {
return;
}
$append(outString.data, atomLabel);
if (number == 1) {
$append(outString.data, ' ');
return;
}
$append(outString.data, '<sub>' + number + '<\/sub> ');
}
function JsMolCalcAPI$API_0(){
}
function getTasks(mol, smile, jme){
var i, length_0, result, tasks;
result = computeAndDisplay(mol, smile, jme);
length_0 = result.targets.length;
tasks = initDim(_3Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Task_2_classLit, makeCastMap([Q$Serializable]), Q$JsMolCalcAPI$Task, length_0, 0);
for (i = 0; i < length_0; ++i) {
tasks[i] = new JsMolCalcAPI$Task_0(result.targets[i]);
}
return tasks;
}
defineSeed(46, 1, makeCastMap([Q$Exportable]), JsMolCalcAPI$API_0);
function JsMolCalcAPI$Info_0(info){
this._info = info;
}
defineSeed(47, 1, makeCastMap([Q$Exportable]), JsMolCalcAPI$Info_0);
_.toString_0 = function toString_0(){
return $toString_0(this._info);
}
;
_._info = null;
function JsMolCalcAPI$Task_0(target){
this._target = target;
}
defineSeed(48, 1, makeCastMap([Q$JsMolCalcAPI$Task, Q$Exportable]), JsMolCalcAPI$Task_0);
_.check_0 = function check(info){
return $isCorrect(this._target, info._info)?'correct':'incorrect';
}
;
_.toString_0 = function toString_1(){
return $toString_1(this._target);
}
;
_._target = null;
function $toString_0(this$static){
var b, nf;
nf = ($clinit_NumberFormat() , new NumberFormat_1($getDefaultNative()));
b = new StringBuffer_0;
if (this$static.errorString != null) {
$append_0(b, this$static.errorString);
}
else {
this$static.phobicity < 0?$append_0(b, '<font color=green>Hydrophobicity index = ' + $format(nf, this$static.phobicity) + '<\/font><br>'):$append_0(b, '<font color=red>Hydrophobicity index = ' + $format(nf, this$static.phobicity) + '<\/font><br>');
this$static.canMakeHBonds?($append(b.data, '<font color=green>Can Make Strong Hydrogen Bonds<\/font><br>') , b):($append(b.data, '<font color=red>Can not Make Strong Hydrogen Bonds<\/font><br>') , b);
this$static.canMakeIonicBonds?($append(b.data, '<font color=green>Can Make Ionic Bonds<\/font><br>') , b):($append(b.data, '<font color=red>Can not Make Ionic Bonds<\/font><br>') , b);
}
return $toString(b.data);
}
function MoleculeInfo_0(hBonds, iBonds, phobicity, errorString){
this.canMakeHBonds = hBonds;
this.canMakeIonicBonds = iBonds;
this.phobicity = phobicity;
this.errorString = errorString;
}
defineSeed(49, 1, {}, MoleculeInfo_0);
_.canMakeHBonds = false;
_.canMakeIonicBonds = false;
_.errorString = null;
_.phobicity = 0;
function $isCorrect(this$static, info){
switch (this$static.type) {
case 0:
return info.phobicity > this$static.loPhobicLimit && info.phobicity < this$static.hiPhobicLimit;
case 1:
return !info.canMakeHBonds;
case 2:
return info.canMakeHBonds;
case 3:
return !info.canMakeIonicBonds;
case 4:
return info.canMakeIonicBonds;
default:return false;
}
}
function $toString_1(this$static){
var nf;
switch (this$static.type) {
case 0:
nf = ($clinit_NumberFormat() , new NumberFormat_1($getDefaultNative()));
return 'Has a relative hydrophobicity betweeen ' + $format(nf, this$static.loPhobicLimit) + ' and ' + $format(nf, this$static.hiPhobicLimit);
case 1:
return 'Can not make strong Hydrogen Bonds';
case 2:
return 'Can make strong Hydrogen Bonds';
case 3:
return 'Can not make Ionic Bonds';
case 4:
return 'Can make Ionic Bonds';
default:return 'Error in setting target type';
}
}
function Target_0(loPhobicLimit, hiPhobicLimit){
this.type = 0;
this.loPhobicLimit = loPhobicLimit;
this.hiPhobicLimit = hiPhobicLimit;
}
function Target_1(type){
this.type = type;
}
defineSeed(50, 1, makeCastMap([Q$Target]), Target_0, Target_1);
_.hiPhobicLimit = 0;
_.loPhobicLimit = 0;
_.type = 0;
function $export_1(){
if (!exported_1) {
exported_1 = true;
new InfoExporterImpl_0;
$export0_1();
}
}
function $export0_1(){
var pkg = declarePackage('edu.umb.bio.jsMolCalc.JsMolCalcAPI.Task');
var __0;
$wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Task = $entry(function(){
var g, j = this;
isAssignableToInstance(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Task_2_classLit, arguments)?(g = arguments[0]):arguments.length == 1 && (g = ___create_0(gwtInstance(arguments[0])));
j.g = g;
setWrapper(g, j);
return j;
}
);
__0 = $wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Task.prototype = new Object;
__0.check = $entry(function(a0){
return this.g.check_0(a0.g);
}
);
__0.toString = $entry(function(){
return this.g.toString_0();
}
);
addTypeMap(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Task_2_classLit, $wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Task);
if (pkg)
for (p in pkg)
$wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Task[p] === undefined && ($wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Task[p] = pkg[p]);
}
function TaskExporterImpl_0(){
$export_1();
}
function ___create_0(a0){
return new JsMolCalcAPI$Task_0(a0);
}
defineSeed(51, 1, {}, TaskExporterImpl_0);
var exported_1 = false;
function ArrayStoreException_0(){
$fillInStackTrace();
}
defineSeed(52, 6, makeCastMap([Q$Serializable, Q$Throwable]), ArrayStoreException_0);
function digit_0(c){ function digit_0(c){
if (c >= 48 && c < 58) { if (c >= 48 && c < 58) {
return c - 48; return c - 48;
...@@ -1944,7 +1778,6 @@ function createForArray(packageName, className, seedId){ ...@@ -1944,7 +1778,6 @@ function createForArray(packageName, className, seedId){
var clazz; var clazz;
clazz = new Class_0; clazz = new Class_0;
isInstantiable(seedId != 0?-seedId:0) && setClassLiteral(seedId != 0?-seedId:0, clazz); isInstantiable(seedId != 0?-seedId:0) && setClassLiteral(seedId != 0?-seedId:0, clazz);
clazz.modifiers = 4;
clazz.superclass = Ljava_lang_Object_2_classLit; clazz.superclass = Ljava_lang_Object_2_classLit;
return clazz; return clazz;
} }
...@@ -1961,7 +1794,6 @@ function createForInterface(packageName, className){ ...@@ -1961,7 +1794,6 @@ function createForInterface(packageName, className){
var clazz; var clazz;
clazz = new Class_0; clazz = new Class_0;
isInstantiable(0) && setClassLiteral(0, clazz); isInstantiable(0) && setClassLiteral(0, clazz);
clazz.modifiers = 2;
return clazz; return clazz;
} }
...@@ -2002,15 +1834,14 @@ function setClassLiteral(seedId, clazz){ ...@@ -2002,15 +1834,14 @@ function setClassLiteral(seedId, clazz){
proto.___clazz$ = clazz; proto.___clazz$ = clazz;
} }
defineSeed(54, 1, {}, Class_0); defineSeed(48, 1, {}, Class_0);
_.modifiers = 0;
_.seedId = 0; _.seedId = 0;
_.superclass = null; _.superclass = null;
function ClassCastException_0(){ function ClassCastException_0(){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(55, 6, makeCastMap([Q$Serializable, Q$Throwable]), ClassCastException_0); defineSeed(49, 6, makeCastMap([Q$Serializable, Q$Throwable]), ClassCastException_0);
function __parseAndValidateInt(s){ function __parseAndValidateInt(s){
var i, length_0, startIndex, toReturn; var i, length_0, startIndex, toReturn;
if (s == null) { if (s == null) {
...@@ -2037,26 +1868,26 @@ function IllegalArgumentException_0(message){ ...@@ -2037,26 +1868,26 @@ function IllegalArgumentException_0(message){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(58, 6, makeCastMap([Q$Serializable, Q$Throwable]), IllegalArgumentException_0); defineSeed(52, 6, makeCastMap([Q$Serializable, Q$Throwable]), IllegalArgumentException_0);
function IndexOutOfBoundsException_0(message){ function IndexOutOfBoundsException_0(message){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(59, 6, makeCastMap([Q$Serializable, Q$Throwable]), IndexOutOfBoundsException_0); defineSeed(53, 6, makeCastMap([Q$Serializable, Q$Throwable]), IndexOutOfBoundsException_0);
function NullPointerException_0(){ function NullPointerException_0(){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(60, 6, makeCastMap([Q$Serializable, Q$Throwable]), NullPointerException_0); defineSeed(54, 6, makeCastMap([Q$Serializable, Q$Throwable]), NullPointerException_0);
function NumberFormatException_0(message){ function NumberFormatException_0(message){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(61, 58, makeCastMap([Q$Serializable, Q$Throwable]), NumberFormatException_0); defineSeed(55, 52, makeCastMap([Q$Serializable, Q$Throwable]), NumberFormatException_0);
function StackTraceElement_0(methodName){ function StackTraceElement_0(methodName){
} }
defineSeed(62, 1, makeCastMap([Q$Serializable, Q$StackTraceElement]), StackTraceElement_0); defineSeed(56, 1, makeCastMap([Q$Serializable, Q$StackTraceElement]), StackTraceElement_0);
function $charAt(this$static, index){ function $charAt(this$static, index){
return this$static.charCodeAt(index); return this$static.charCodeAt(index);
} }
...@@ -2191,16 +2022,15 @@ function $append_0(this$static, x){ ...@@ -2191,16 +2022,15 @@ function $append_0(this$static, x){
return this$static; return this$static;
} }
function $replace_0(this$static, end){ function $delete(this$static, end){
$replace(this$static.data, 0, end, ''); return $replace(this$static.data, 0, end, '') , this$static;
return this$static;
} }
function StringBuffer_0(){ function StringBuffer_0(){
this.data = $createData(); this.data = $createData();
} }
defineSeed(64, 1, makeCastMap([Q$CharSequence]), StringBuffer_0); defineSeed(58, 1, makeCastMap([Q$CharSequence]), StringBuffer_0);
function $append_1(this$static, x){ function $append_1(this$static, x){
$append(this$static.data, x); $append(this$static.data, x);
return this$static; return this$static;
...@@ -2210,7 +2040,7 @@ function $charAt_0(this$static, index){ ...@@ -2210,7 +2040,7 @@ function $charAt_0(this$static, index){
return $charAt($toString(this$static.data), index); return $charAt($toString(this$static.data), index);
} }
function $delete(this$static, start, end){ function $delete_0(this$static, start, end){
return $replace(this$static.data, start, end, '') , this$static; return $replace(this$static.data, start, end, '') , this$static;
} }
...@@ -2218,25 +2048,25 @@ function $insert(this$static, index, x){ ...@@ -2218,25 +2048,25 @@ function $insert(this$static, index, x){
return $replace(this$static.data, index, index, x) , this$static; return $replace(this$static.data, index, index, x) , this$static;
} }
function $replace_1(this$static, start, end, toInsert){ function $replace_0(this$static, start, end, toInsert){
$replace(this$static.data, start, end, toInsert); $replace(this$static.data, start, end, toInsert);
return this$static; return this$static;
} }
function $setCharAt(this$static, index, x){ function $setCharAt(this$static, index, x){
$replace_1(this$static, index, index + 1, String.fromCharCode(x)); $replace_0(this$static, index, index + 1, String.fromCharCode(x));
} }
function StringBuilder_0(){ function StringBuilder_0(){
this.data = $createData(); this.data = $createData();
} }
defineSeed(65, 1, makeCastMap([Q$CharSequence]), StringBuilder_0); defineSeed(59, 1, makeCastMap([Q$CharSequence]), StringBuilder_0);
function UnsupportedOperationException_0(){ function UnsupportedOperationException_0(){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(66, 6, makeCastMap([Q$Serializable, Q$Throwable]), UnsupportedOperationException_0); defineSeed(60, 6, makeCastMap([Q$Serializable, Q$Throwable]), UnsupportedOperationException_0);
function $advanceToFind(iter, o){ function $advanceToFind(iter, o){
var t; var t;
while (iter.hasNext()) { while (iter.hasNext()) {
...@@ -2248,7 +2078,7 @@ function $advanceToFind(iter, o){ ...@@ -2248,7 +2078,7 @@ function $advanceToFind(iter, o){
return null; return null;
} }
defineSeed(67, 1, {}); defineSeed(61, 1, {});
_.add = function add(o){ _.add = function add(o){
throw new UnsupportedOperationException_0; throw new UnsupportedOperationException_0;
} }
...@@ -2259,7 +2089,9 @@ _.contains = function contains(o){ ...@@ -2259,7 +2089,9 @@ _.contains = function contains(o){
return !!iter; return !!iter;
} }
; ;
defineSeed(69, 1, makeCastMap([Q$Map])); defineSeed(63, 1, makeCastMap([Q$Map]));
--></script>
<script><!--
_.equals$ = function equals_1(obj){ _.equals$ = function equals_1(obj){
var entry, entry$iterator, otherKey, otherMap, otherValue; var entry, entry$iterator, otherKey, otherMap, otherValue;
if (obj === this) { if (obj === this) {
...@@ -2360,8 +2192,6 @@ function $hasHashValue(this$static, key, hashCode){ ...@@ -2360,8 +2192,6 @@ function $hasHashValue(this$static, key, hashCode){
return false; return false;
} }
--></script>
<script><!--
function $hasStringValue(this$static, key){ function $hasStringValue(this$static, key){
return ':' + key in this$static.stringMap; return ':' + key in this$static.stringMap;
} }
...@@ -2411,7 +2241,7 @@ function $putStringValue(this$static, key, value){ ...@@ -2411,7 +2241,7 @@ function $putStringValue(this$static, key, value){
return result; return result;
} }
defineSeed(68, 69, makeCastMap([Q$Map])); defineSeed(62, 63, makeCastMap([Q$Map]));
_.equalsBridge = function equalsBridge(value1, value2){ _.equalsBridge = function equalsBridge(value1, value2){
return maskUndefined(value1) === maskUndefined(value2) || value1 != null && equals__devirtual$(value1, value2); return maskUndefined(value1) === maskUndefined(value2) || value1 != null && equals__devirtual$(value1, value2);
} }
...@@ -2421,7 +2251,7 @@ _.nullSlot = null; ...@@ -2421,7 +2251,7 @@ _.nullSlot = null;
_.nullSlotLive = false; _.nullSlotLive = false;
_.size = 0; _.size = 0;
_.stringMap = null; _.stringMap = null;
defineSeed(71, 67, makeCastMap([Q$Set])); defineSeed(65, 61, makeCastMap([Q$Set]));
_.equals$ = function equals_2(o){ _.equals$ = function equals_2(o){
var iter, other, otherItem; var iter, other, otherItem;
if (o === this) { if (o === this) {
...@@ -2460,7 +2290,7 @@ function AbstractHashMap$EntrySet_0(this$0){ ...@@ -2460,7 +2290,7 @@ function AbstractHashMap$EntrySet_0(this$0){
this.this$0 = this$0; this.this$0 = this$0;
} }
defineSeed(70, 71, makeCastMap([Q$Set]), AbstractHashMap$EntrySet_0); defineSeed(64, 65, makeCastMap([Q$Set]), AbstractHashMap$EntrySet_0);
_.contains = function contains_0(o){ _.contains = function contains_0(o){
var entry, key, value; var entry, key, value;
if (instanceOf(o, Q$Map$Entry)) { if (instanceOf(o, Q$Map$Entry)) {
...@@ -2492,7 +2322,7 @@ function AbstractHashMap$EntrySetIterator_0(this$0){ ...@@ -2492,7 +2322,7 @@ function AbstractHashMap$EntrySetIterator_0(this$0){
this.iter = new AbstractList$IteratorImpl_0(list); this.iter = new AbstractList$IteratorImpl_0(list);
} }
defineSeed(72, 1, {}, AbstractHashMap$EntrySetIterator_0); defineSeed(66, 1, {}, AbstractHashMap$EntrySetIterator_0);
_.hasNext = function hasNext(){ _.hasNext = function hasNext(){
return $hasNext(this.iter); return $hasNext(this.iter);
} }
...@@ -2502,7 +2332,7 @@ _.next = function next_0(){ ...@@ -2502,7 +2332,7 @@ _.next = function next_0(){
} }
; ;
_.iter = null; _.iter = null;
defineSeed(74, 1, makeCastMap([Q$Map$Entry])); defineSeed(68, 1, makeCastMap([Q$Map$Entry]));
_.equals$ = function equals_3(other){ _.equals$ = function equals_3(other){
var entry; var entry;
if (instanceOf(other, Q$Map$Entry)) { if (instanceOf(other, Q$Map$Entry)) {
...@@ -2527,7 +2357,7 @@ function AbstractHashMap$MapEntryNull_0(this$0){ ...@@ -2527,7 +2357,7 @@ function AbstractHashMap$MapEntryNull_0(this$0){
this.this$0 = this$0; this.this$0 = this$0;
} }
defineSeed(73, 74, makeCastMap([Q$Map$Entry]), AbstractHashMap$MapEntryNull_0); defineSeed(67, 68, makeCastMap([Q$Map$Entry]), AbstractHashMap$MapEntryNull_0);
_.getKey = function getKey(){ _.getKey = function getKey(){
return null; return null;
} }
...@@ -2546,7 +2376,7 @@ function AbstractHashMap$MapEntryString_0(this$0, key){ ...@@ -2546,7 +2376,7 @@ function AbstractHashMap$MapEntryString_0(this$0, key){
this.key = key; this.key = key;
} }
defineSeed(75, 74, makeCastMap([Q$Map$Entry]), AbstractHashMap$MapEntryString_0); defineSeed(69, 68, makeCastMap([Q$Map$Entry]), AbstractHashMap$MapEntryString_0);
_.getKey = function getKey_0(){ _.getKey = function getKey_0(){
return this.key; return this.key;
} }
...@@ -2569,7 +2399,7 @@ function indexOutOfBounds(index, size){ ...@@ -2569,7 +2399,7 @@ function indexOutOfBounds(index, size){
throw new IndexOutOfBoundsException_0('Index: ' + index + ', Size: ' + size); throw new IndexOutOfBoundsException_0('Index: ' + index + ', Size: ' + size);
} }
defineSeed(76, 67, makeCastMap([Q$List])); defineSeed(70, 61, makeCastMap([Q$List]));
_.add = function add_0(obj){ _.add = function add_0(obj){
$add(this, this.size_0(), obj); $add(this, this.size_0(), obj);
return true; return true;
...@@ -2630,7 +2460,7 @@ function AbstractList$IteratorImpl_0(this$0){ ...@@ -2630,7 +2460,7 @@ function AbstractList$IteratorImpl_0(this$0){
this.this$0 = this$0; this.this$0 = this$0;
} }
defineSeed(77, 1, {}, AbstractList$IteratorImpl_0); defineSeed(71, 1, {}, AbstractList$IteratorImpl_0);
_.hasNext = function hasNext_0(){ _.hasNext = function hasNext_0(){
return $hasNext(this); return $hasNext(this);
} }
...@@ -2674,7 +2504,7 @@ function splice(array, index, deleteCount, value){ ...@@ -2674,7 +2504,7 @@ function splice(array, index, deleteCount, value){
array.splice(index, deleteCount, value); array.splice(index, deleteCount, value);
} }
defineSeed(78, 76, makeCastMap([Q$Serializable, Q$List]), ArrayList_0); defineSeed(72, 70, makeCastMap([Q$Serializable, Q$List]), ArrayList_0);
_.add = function add_1(o){ _.add = function add_1(o){
return $add_0(this, o); return $add_0(this, o);
} }
...@@ -2707,13 +2537,13 @@ function HashMap_0(){ ...@@ -2707,13 +2537,13 @@ function HashMap_0(){
this.size = 0; this.size = 0;
} }
defineSeed(80, 68, makeCastMap([Q$Serializable, Q$Map]), HashMap_0); defineSeed(74, 62, makeCastMap([Q$Serializable, Q$Map]), HashMap_0);
function MapEntryImpl_0(key, value){ function MapEntryImpl_0(key, value){
this.key = key; this.key = key;
this.value = value; this.value = value;
} }
defineSeed(81, 74, makeCastMap([Q$Map$Entry]), MapEntryImpl_0); defineSeed(75, 68, makeCastMap([Q$Map$Entry]), MapEntryImpl_0);
_.getKey = function getKey_1(){ _.getKey = function getKey_1(){
return this.key; return this.key;
} }
...@@ -2735,7 +2565,7 @@ function NoSuchElementException_0(){ ...@@ -2735,7 +2565,7 @@ function NoSuchElementException_0(){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(82, 6, makeCastMap([Q$Serializable, Q$Throwable]), NoSuchElementException_0); defineSeed(76, 6, makeCastMap([Q$Serializable, Q$Throwable]), NoSuchElementException_0);
function equalsWithNullCheck(a, b){ function equalsWithNullCheck(a, b){
return maskUndefined(a) === maskUndefined(b) || a != null && equals__devirtual$(a, b); return maskUndefined(a) === maskUndefined(b) || a != null && equals__devirtual$(a, b);
} }
...@@ -2744,8 +2574,8 @@ function ExportAllExporterImpl_0(){ ...@@ -2744,8 +2574,8 @@ function ExportAllExporterImpl_0(){
new APIExporterImpl_0; new APIExporterImpl_0;
} }
defineSeed(84, 1, {}, ExportAllExporterImpl_0); defineSeed(78, 1, {}, ExportAllExporterImpl_0);
defineSeed(86, 1, {}); defineSeed(80, 1, {});
function $addTypeMap(this$static, type, exportedConstructor){ function $addTypeMap(this$static, type, exportedConstructor){
$put(this$static.typeMap, type, exportedConstructor); $put(this$static.typeMap, type, exportedConstructor);
} }
...@@ -2765,59 +2595,14 @@ function $declarePackage(qualifiedExportName){ ...@@ -2765,59 +2595,14 @@ function $declarePackage(qualifiedExportName){
return o; return o;
} }
function $setWrapper(this$static, type){
var cons, wrapper;
if ((getClass__devirtual$(type).modifiers & 4) != 0) {
return [];
}
cons = $typeConstructor(this$static, getClass__devirtual$(type));
wrapper = cons && typeof cons == 'function'?new cons(type):type;
type['__gwtex_wrap'] = wrapper;
return wrapper;
}
function $typeConstructor(this$static, type){
var o, sup;
o = $get(this$static.typeMap, type);
sup = type.superclass;
if (o == null && !!sup && sup != Ljava_lang_Object_2_classLit) {
return $typeConstructor(this$static, sup);
}
return dynamicCastJso(o);
}
function $wrap(this$static, type){
var wrapper;
if (type == null) {
return null;
}
return wrapper = type['__gwtex_wrap'] , !wrapper && (wrapper = $setWrapper(this$static, type)) , wrapper;
}
function $wrap_0(this$static, type){
var i, wrapperArray;
if (type == null) {
return null;
}
wrapperArray = [];
for (i = 0; i < type.length; ++i) {
wrapperArray[i] = $wrap(this$static, type[i]);
}
return wrapperArray;
}
function ExporterBaseActual_0(){ function ExporterBaseActual_0(){
this.typeMap = new HashMap_0; this.typeMap = new HashMap_0;
new HashMap_0; new HashMap_0;
new HashMap_0; new HashMap_0;
} }
function getGwtInstance(o){
return o && o.g?o.g:null;
}
function isAssignableToClass(o, clazz){ function isAssignableToClass(o, clazz){
var sup; var sup, maybeJsoInvocation;
if (Ljava_lang_Object_2_classLit == clazz) { if (Ljava_lang_Object_2_classLit == clazz) {
return true; return true;
} }
...@@ -2825,7 +2610,7 @@ function isAssignableToClass(o, clazz){ ...@@ -2825,7 +2610,7 @@ function isAssignableToClass(o, clazz){
return true; return true;
} }
if (o != null) { if (o != null) {
for (sup = getClass__devirtual$(o); !!sup && sup != Ljava_lang_Object_2_classLit; sup = sup.superclass) { for (sup = (maybeJsoInvocation = o , isJavaObject(maybeJsoInvocation)?maybeJsoInvocation.___clazz$:Lcom_google_gwt_core_client_JavaScriptObject_2_classLit); !!sup && sup != Ljava_lang_Object_2_classLit; sup = sup.superclass) {
if (sup == clazz) { if (sup == clazz) {
return true; return true;
} }
...@@ -2834,7 +2619,7 @@ function isAssignableToClass(o, clazz){ ...@@ -2834,7 +2619,7 @@ function isAssignableToClass(o, clazz){
return false; return false;
} }
defineSeed(85, 86, {}, ExporterBaseActual_0); defineSeed(79, 80, {}, ExporterBaseActual_0);
function $clinit_ExporterUtil(){ function $clinit_ExporterUtil(){
$clinit_ExporterUtil = nullMethod; $clinit_ExporterUtil = nullMethod;
impl = new ExporterBaseActual_0; impl = new ExporterBaseActual_0;
...@@ -2845,38 +2630,12 @@ function addTypeMap(type, exportedConstructor){ ...@@ -2845,38 +2630,12 @@ function addTypeMap(type, exportedConstructor){
$addTypeMap(impl, type, exportedConstructor); $addTypeMap(impl, type, exportedConstructor);
} }
function declarePackage(qualifiedExportName){
$clinit_ExporterUtil();
return $declarePackage(qualifiedExportName);
}
function gwtInstance(o){
var g;
$clinit_ExporterUtil();
return o != null && instanceOfJso(o) && (g = getGwtInstance(dynamicCastJso(o))) != null?g:o;
}
function isAssignableToInstance(clazz, args){ function isAssignableToInstance(clazz, args){
var o; var o;
$clinit_ExporterUtil(); $clinit_ExporterUtil();
return o = args && args[0] && (typeof args[0] == 'object' || typeof args[0] == 'function')?args[0]:null , isAssignableToClass(o, clazz); return o = args && args[0] && (typeof args[0] == 'object' || typeof args[0] == 'function')?args[0]:null , isAssignableToClass(o, clazz);
} }
function setWrapper(instance, wrapper){
$clinit_ExporterUtil();
instance['__gwtex_wrap'] = wrapper;
}
function wrap(type){
$clinit_ExporterUtil();
return $wrap(impl, type);
}
function wrap_0(type){
$clinit_ExporterUtil();
return $wrap_0(impl, type);
}
var impl; var impl;
var $entry = entry_0; var $entry = entry_0;
function gwtOnLoad(errFn, modName, modBase, softPermutationId){ function gwtOnLoad(errFn, modName, modBase, softPermutationId){
...@@ -2894,7 +2653,7 @@ function gwtOnLoad(errFn, modName, modBase, softPermutationId){ ...@@ -2894,7 +2653,7 @@ function gwtOnLoad(errFn, modName, modBase, softPermutationId){
} }
} }
var Ljava_lang_Object_2_classLit = createForClass('java.lang.', 'Object', 1, null), Lcom_google_gwt_core_client_JavaScriptObject_2_classLit = createForClass('com.google.gwt.core.client.', 'JavaScriptObject$', 9, Ljava_lang_Object_2_classLit), _3I_classLit = createForArray('', '[I', 94), _3Ljava_lang_Object_2_classLit = createForArray('[Ljava.lang.', 'Object;', 92), Ljava_lang_Throwable_2_classLit = createForClass('java.lang.', 'Throwable', 8, Ljava_lang_Object_2_classLit), Ljava_lang_Exception_2_classLit = createForClass('java.lang.', 'Exception', 7, Ljava_lang_Throwable_2_classLit), Ljava_lang_RuntimeException_2_classLit = createForClass('java.lang.', 'RuntimeException', 6, Ljava_lang_Exception_2_classLit), Ljava_lang_StackTraceElement_2_classLit = createForClass('java.lang.', 'StackTraceElement', 62, Ljava_lang_Object_2_classLit), _3Ljava_lang_StackTraceElement_2_classLit = createForArray('[Ljava.lang.', 'StackTraceElement;', 95), Lcom_google_gwt_lang_SeedUtil_2_classLit = createForClass('com.google.gwt.lang.', 'SeedUtil', 34, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Info_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalcAPI$Info', 47, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Task_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalcAPI$Task', 48, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$API_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalcAPI$API', 46, Ljava_lang_Object_2_classLit), _3Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Task_2_classLit = createForArray('[Ledu.umb.bio.jsMolCalc.client.', 'JsMolCalcAPI$Task;', 96), Ljava_lang_Class_2_classLit = createForClass('java.lang.', 'Class', 54, Ljava_lang_Object_2_classLit), Ljava_lang_String_2_classLit = createForClass('java.lang.', 'String', 2, Ljava_lang_Object_2_classLit), _3Ljava_lang_String_2_classLit = createForArray('[Ljava.lang.', 'String;', 93), Ljava_lang_ClassCastException_2_classLit = createForClass('java.lang.', 'ClassCastException', 55, Ljava_lang_RuntimeException_2_classLit), Ljava_lang_StringBuilder_2_classLit = createForClass('java.lang.', 'StringBuilder', 65, Ljava_lang_Object_2_classLit), Ljava_lang_ArrayStoreException_2_classLit = createForClass('java.lang.', 'ArrayStoreException', 52, Ljava_lang_RuntimeException_2_classLit), Lcom_google_gwt_core_client_JavaScriptException_2_classLit = createForClass('com.google.gwt.core.client.', 'JavaScriptException', 5, Ljava_lang_RuntimeException_2_classLit), Ledu_umb_bio_jsMolCalc_client_TaskExporterImpl_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'TaskExporterImpl', 51, Ljava_lang_Object_2_classLit), Lorg_timepedia_exporter_client_ExporterBaseImpl_2_classLit = createForClass('org.timepedia.exporter.client.', 'ExporterBaseImpl', 86, Ljava_lang_Object_2_classLit), Lorg_timepedia_exporter_client_ExporterBaseActual_2_classLit = createForClass('org.timepedia.exporter.client.', 'ExporterBaseActual', 85, Lorg_timepedia_exporter_client_ExporterBaseImpl_2_classLit), Lorg_timepedia_exporter_client_Exportable_2_classLit = createForInterface('org.timepedia.exporter.client.', 'Exportable'), Lorg_timepedia_exporter_client_ExportAllExporterImpl_2_classLit = createForClass('org.timepedia.exporter.client.', 'ExportAllExporterImpl', 84, Ljava_lang_Object_2_classLit), Lcom_google_gwt_core_client_impl_StackTraceCreator$Collector_2_classLit = createForClass('com.google.gwt.core.client.impl.', 'StackTraceCreator$Collector', 17, Ljava_lang_Object_2_classLit), Lcom_google_gwt_core_client_Scheduler_2_classLit = createForClass('com.google.gwt.core.client.', 'Scheduler', 12, Ljava_lang_Object_2_classLit), Lcom_google_gwt_core_client_impl_SchedulerImpl_2_classLit = createForClass('com.google.gwt.core.client.impl.', 'SchedulerImpl', 14, Lcom_google_gwt_core_client_Scheduler_2_classLit), Ledu_umb_bio_jsMolCalc_client_InfoExporterImpl_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'InfoExporterImpl', 44, Ljava_lang_Object_2_classLit), Ljava_util_AbstractMap_2_classLit = createForClass('java.util.', 'AbstractMap', 69, Ljava_lang_Object_2_classLit), Ljava_util_AbstractHashMap_2_classLit = createForClass('java.util.', 'AbstractHashMap', 68, Ljava_util_AbstractMap_2_classLit), Ljava_util_AbstractCollection_2_classLit = createForClass('java.util.', 'AbstractCollection', 67, Ljava_lang_Object_2_classLit), Ljava_util_AbstractSet_2_classLit = createForClass('java.util.', 'AbstractSet', 71, Ljava_util_AbstractCollection_2_classLit), Ljava_util_AbstractHashMap$EntrySet_2_classLit = createForClass('java.util.', 'AbstractHashMap$EntrySet', 70, Ljava_util_AbstractSet_2_classLit), Ljava_util_AbstractHashMap$EntrySetIterator_2_classLit = createForClass('java.util.', 'AbstractHashMap$EntrySetIterator', 72, Ljava_lang_Object_2_classLit), Ljava_util_AbstractMapEntry_2_classLit = createForClass('java.util.', 'AbstractMapEntry', 74, Ljava_lang_Object_2_classLit), Ljava_util_AbstractHashMap$MapEntryNull_2_classLit = createForClass('java.util.', 'AbstractHashMap$MapEntryNull', 73, Ljava_util_AbstractMapEntry_2_classLit), Ljava_util_AbstractHashMap$MapEntryString_2_classLit = createForClass('java.util.', 'AbstractHashMap$MapEntryString', 75, Ljava_util_AbstractMapEntry_2_classLit), Ljava_lang_NullPointerException_2_classLit = createForClass('java.lang.', 'NullPointerException', 60, Ljava_lang_RuntimeException_2_classLit), Ljava_lang_IllegalArgumentException_2_classLit = createForClass('java.lang.', 'IllegalArgumentException', 58, Ljava_lang_RuntimeException_2_classLit), Ledu_umb_bio_jsMolCalc_client_Target_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'Target', 50, Ljava_lang_Object_2_classLit), Ljava_util_HashMap_2_classLit = createForClass('java.util.', 'HashMap', 80, Ljava_util_AbstractHashMap_2_classLit), Ledu_umb_bio_jsMolCalc_client_APIExporterImpl_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'APIExporterImpl', 40, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_MoleculeInfo_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'MoleculeInfo', 49, Ljava_lang_Object_2_classLit), Lcom_google_gwt_i18n_client_NumberFormat_2_classLit = createForClass('com.google.gwt.i18n.client.', 'NumberFormat', 25, Ljava_lang_Object_2_classLit), Ljava_lang_StringBuffer_2_classLit = createForClass('java.lang.', 'StringBuffer', 64, Ljava_lang_Object_2_classLit), Lcom_google_gwt_i18n_client_LocaleInfo_2_classLit = createForClass('com.google.gwt.i18n.client.', 'LocaleInfo', 24, Ljava_lang_Object_2_classLit), Ljava_lang_UnsupportedOperationException_2_classLit = createForClass('java.lang.', 'UnsupportedOperationException', 66, Ljava_lang_RuntimeException_2_classLit), Ledu_umb_bio_jsMolCalc_client_InfoAndTargets_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'InfoAndTargets', 43, Ljava_lang_Object_2_classLit), _3_3I_classLit = createForArray('', '[[I', 97), _3Ledu_umb_bio_jsMolCalc_client_Target_2_classLit = createForArray('[Ledu.umb.bio.jsMolCalc.client.', 'Target;', 98), Ljava_lang_NumberFormatException_2_classLit = createForClass('java.lang.', 'NumberFormatException', 61, Ljava_lang_IllegalArgumentException_2_classLit), Ljava_util_MapEntryImpl_2_classLit = createForClass('java.util.', 'MapEntryImpl', 81, Ljava_util_AbstractMapEntry_2_classLit), Ljava_util_AbstractList_2_classLit = createForClass('java.util.', 'AbstractList', 76, Ljava_util_AbstractCollection_2_classLit), Ljava_util_ArrayList_2_classLit = createForClass('java.util.', 'ArrayList', 78, Ljava_util_AbstractList_2_classLit), Ljava_util_AbstractList$IteratorImpl_2_classLit = createForClass('java.util.', 'AbstractList$IteratorImpl', 77, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_Atom_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'Atom', 41, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_AtomSpec_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'AtomSpec', 42, Ljava_lang_Object_2_classLit), Lcom_google_gwt_i18n_client_constants_NumberConstantsImpl_1_2_classLit = createForClass('com.google.gwt.i18n.client.constants.', 'NumberConstantsImpl_', 26, Ljava_lang_Object_2_classLit), Ljava_lang_IndexOutOfBoundsException_2_classLit = createForClass('java.lang.', 'IndexOutOfBoundsException', 59, Ljava_lang_RuntimeException_2_classLit), Ljava_util_NoSuchElementException_2_classLit = createForClass('java.util.', 'NoSuchElementException', 82, Ljava_lang_RuntimeException_2_classLit); var Ljava_lang_Object_2_classLit = createForClass('java.lang.', 'Object', 1, null), Lcom_google_gwt_core_client_JavaScriptObject_2_classLit = createForClass('com.google.gwt.core.client.', 'JavaScriptObject$', 9, Ljava_lang_Object_2_classLit), _3I_classLit = createForArray('', '[I', 87), _3Ljava_lang_Object_2_classLit = createForArray('[Ljava.lang.', 'Object;', 85), Ljava_lang_Throwable_2_classLit = createForClass('java.lang.', 'Throwable', 8, Ljava_lang_Object_2_classLit), Ljava_lang_Exception_2_classLit = createForClass('java.lang.', 'Exception', 7, Ljava_lang_Throwable_2_classLit), Ljava_lang_RuntimeException_2_classLit = createForClass('java.lang.', 'RuntimeException', 6, Ljava_lang_Exception_2_classLit), Ljava_lang_StackTraceElement_2_classLit = createForClass('java.lang.', 'StackTraceElement', 56, Ljava_lang_Object_2_classLit), _3Ljava_lang_StackTraceElement_2_classLit = createForArray('[Ljava.lang.', 'StackTraceElement;', 88), Lcom_google_gwt_lang_SeedUtil_2_classLit = createForClass('com.google.gwt.lang.', 'SeedUtil', 34, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$API_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalcAPI$API', 45, Ljava_lang_Object_2_classLit), Ljava_lang_Class_2_classLit = createForClass('java.lang.', 'Class', 48, Ljava_lang_Object_2_classLit), Ljava_lang_String_2_classLit = createForClass('java.lang.', 'String', 2, Ljava_lang_Object_2_classLit), _3Ljava_lang_String_2_classLit = createForArray('[Ljava.lang.', 'String;', 86), Ljava_lang_ClassCastException_2_classLit = createForClass('java.lang.', 'ClassCastException', 49, Ljava_lang_RuntimeException_2_classLit), Ljava_lang_StringBuilder_2_classLit = createForClass('java.lang.', 'StringBuilder', 59, Ljava_lang_Object_2_classLit), Ljava_lang_ArrayStoreException_2_classLit = createForClass('java.lang.', 'ArrayStoreException', 46, Ljava_lang_RuntimeException_2_classLit), Lcom_google_gwt_core_client_JavaScriptException_2_classLit = createForClass('com.google.gwt.core.client.', 'JavaScriptException', 5, Ljava_lang_RuntimeException_2_classLit), Lorg_timepedia_exporter_client_ExporterBaseImpl_2_classLit = createForClass('org.timepedia.exporter.client.', 'ExporterBaseImpl', 80, Ljava_lang_Object_2_classLit), Lorg_timepedia_exporter_client_ExporterBaseActual_2_classLit = createForClass('org.timepedia.exporter.client.', 'ExporterBaseActual', 79, Lorg_timepedia_exporter_client_ExporterBaseImpl_2_classLit), Lorg_timepedia_exporter_client_Exportable_2_classLit = createForInterface('org.timepedia.exporter.client.', 'Exportable'), Lorg_timepedia_exporter_client_ExportAllExporterImpl_2_classLit = createForClass('org.timepedia.exporter.client.', 'ExportAllExporterImpl', 78, Ljava_lang_Object_2_classLit), Lcom_google_gwt_core_client_impl_StackTraceCreator$Collector_2_classLit = createForClass('com.google.gwt.core.client.impl.', 'StackTraceCreator$Collector', 17, Ljava_lang_Object_2_classLit), Lcom_google_gwt_core_client_Scheduler_2_classLit = createForClass('com.google.gwt.core.client.', 'Scheduler', 12, Ljava_lang_Object_2_classLit), Lcom_google_gwt_core_client_impl_SchedulerImpl_2_classLit = createForClass('com.google.gwt.core.client.impl.', 'SchedulerImpl', 14, Lcom_google_gwt_core_client_Scheduler_2_classLit), Ljava_util_AbstractMap_2_classLit = createForClass('java.util.', 'AbstractMap', 63, Ljava_lang_Object_2_classLit), Ljava_util_AbstractHashMap_2_classLit = createForClass('java.util.', 'AbstractHashMap', 62, Ljava_util_AbstractMap_2_classLit), Ljava_util_AbstractCollection_2_classLit = createForClass('java.util.', 'AbstractCollection', 61, Ljava_lang_Object_2_classLit), Ljava_util_AbstractSet_2_classLit = createForClass('java.util.', 'AbstractSet', 65, Ljava_util_AbstractCollection_2_classLit), Ljava_util_AbstractHashMap$EntrySet_2_classLit = createForClass('java.util.', 'AbstractHashMap$EntrySet', 64, Ljava_util_AbstractSet_2_classLit), Ljava_util_AbstractHashMap$EntrySetIterator_2_classLit = createForClass('java.util.', 'AbstractHashMap$EntrySetIterator', 66, Ljava_lang_Object_2_classLit), Ljava_util_AbstractMapEntry_2_classLit = createForClass('java.util.', 'AbstractMapEntry', 68, Ljava_lang_Object_2_classLit), Ljava_util_AbstractHashMap$MapEntryNull_2_classLit = createForClass('java.util.', 'AbstractHashMap$MapEntryNull', 67, Ljava_util_AbstractMapEntry_2_classLit), Ljava_util_AbstractHashMap$MapEntryString_2_classLit = createForClass('java.util.', 'AbstractHashMap$MapEntryString', 69, Ljava_util_AbstractMapEntry_2_classLit), Ljava_lang_NullPointerException_2_classLit = createForClass('java.lang.', 'NullPointerException', 54, Ljava_lang_RuntimeException_2_classLit), Ljava_lang_IllegalArgumentException_2_classLit = createForClass('java.lang.', 'IllegalArgumentException', 52, Ljava_lang_RuntimeException_2_classLit), Ljava_util_HashMap_2_classLit = createForClass('java.util.', 'HashMap', 74, Ljava_util_AbstractHashMap_2_classLit), Ledu_umb_bio_jsMolCalc_client_APIExporterImpl_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'APIExporterImpl', 40, Ljava_lang_Object_2_classLit), Ljava_lang_StringBuffer_2_classLit = createForClass('java.lang.', 'StringBuffer', 58, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalc_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalc', 41, Ljava_lang_Object_2_classLit), _3_3I_classLit = createForArray('', '[[I', 89), Ledu_umb_bio_jsMolCalc_client_JsMolCalc$Atom_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalc$Atom', 42, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalc$AtomSpec_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalc$AtomSpec', 43, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalc$InfoAndTargets_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalc$InfoAndTargets', 44, Ljava_lang_Object_2_classLit), Ljava_util_AbstractList_2_classLit = createForClass('java.util.', 'AbstractList', 70, Ljava_util_AbstractCollection_2_classLit), Ljava_util_ArrayList_2_classLit = createForClass('java.util.', 'ArrayList', 72, Ljava_util_AbstractList_2_classLit), Ljava_util_AbstractList$IteratorImpl_2_classLit = createForClass('java.util.', 'AbstractList$IteratorImpl', 71, Ljava_lang_Object_2_classLit), Ljava_lang_UnsupportedOperationException_2_classLit = createForClass('java.lang.', 'UnsupportedOperationException', 60, Ljava_lang_RuntimeException_2_classLit), Lcom_google_gwt_i18n_client_NumberFormat_2_classLit = createForClass('com.google.gwt.i18n.client.', 'NumberFormat', 25, Ljava_lang_Object_2_classLit), Ljava_lang_NumberFormatException_2_classLit = createForClass('java.lang.', 'NumberFormatException', 55, Ljava_lang_IllegalArgumentException_2_classLit), Lcom_google_gwt_i18n_client_LocaleInfo_2_classLit = createForClass('com.google.gwt.i18n.client.', 'LocaleInfo', 24, Ljava_lang_Object_2_classLit), Ljava_util_MapEntryImpl_2_classLit = createForClass('java.util.', 'MapEntryImpl', 75, Ljava_util_AbstractMapEntry_2_classLit), Ljava_lang_IndexOutOfBoundsException_2_classLit = createForClass('java.lang.', 'IndexOutOfBoundsException', 53, Ljava_lang_RuntimeException_2_classLit), Ljava_util_NoSuchElementException_2_classLit = createForClass('java.util.', 'NoSuchElementException', 76, Ljava_lang_RuntimeException_2_classLit), Lcom_google_gwt_i18n_client_constants_NumberConstantsImpl_1_2_classLit = createForClass('com.google.gwt.i18n.client.constants.', 'NumberConstantsImpl_', 26, Ljava_lang_Object_2_classLit);
$stats && $stats({moduleName:'jsmolcalc',sessionId:$sessionId,subSystem:'startup',evtGroup:'moduleStartup',millis:(new Date()).getTime(),type:'moduleEvalEnd'}); $stats && $stats({moduleName:'jsmolcalc',sessionId:$sessionId,subSystem:'startup',evtGroup:'moduleStartup',millis:(new Date()).getTime(),type:'moduleEvalEnd'});
if ($wnd.jsmolcalc) $wnd.jsmolcalc.onScriptLoad(); if ($wnd.jsmolcalc) $wnd.jsmolcalc.onScriptLoad();
--></script></body></html> --></script></body></html>
...@@ -4,14 +4,14 @@ var $gwt_version = "2.5.0"; ...@@ -4,14 +4,14 @@ var $gwt_version = "2.5.0";
var $wnd = parent; var $wnd = parent;
var $doc = $wnd.document; var $doc = $wnd.document;
var $moduleName, $moduleBase; var $moduleName, $moduleBase;
var $strongName = '2264BD6A2D261E441E8A63207DEF3E41'; var $strongName = '468C0B0171166372F064D287492CBD1E';
var $stats = $wnd.__gwtStatsEvent ? function(a) {return $wnd.__gwtStatsEvent(a);} : null, var $stats = $wnd.__gwtStatsEvent ? function(a) {return $wnd.__gwtStatsEvent(a);} : null,
$sessionId = $wnd.__gwtStatsSessionId ? $wnd.__gwtStatsSessionId : null; $sessionId = $wnd.__gwtStatsSessionId ? $wnd.__gwtStatsSessionId : null;
$stats && $stats({moduleName:'jsmolcalc',sessionId:$sessionId,subSystem:'startup',evtGroup:'moduleStartup',millis:(new Date()).getTime(),type:'moduleEvalStart'}); $stats && $stats({moduleName:'jsmolcalc',sessionId:$sessionId,subSystem:'startup',evtGroup:'moduleStartup',millis:(new Date()).getTime(),type:'moduleEvalStart'});
</script></head> </script></head>
<body> <body>
<script><!-- <script><!--
var _, seedTable = {}, Q$Object = 0, Q$String = 1, Q$LongLibBase$LongEmul = 2, Q$Atom = 3, Q$JsMolCalcAPI$Task = 4, Q$Target = 5, Q$int_$1 = 6, Q$Serializable = 7, Q$CharSequence = 8, Q$Comparable = 9, Q$StackTraceElement = 10, Q$Throwable = 11, Q$List = 12, Q$Map = 13, Q$Map$Entry = 14, Q$Set = 15, Q$Exportable = 16, CM$ = {}; var _, seedTable = {}, Q$Object = 0, Q$String = 1, Q$LongLibBase$LongEmul = 2, Q$JsMolCalc$Atom = 3, Q$int_$1 = 4, Q$Serializable = 5, Q$CharSequence = 6, Q$Comparable = 7, Q$StackTraceElement = 8, Q$Throwable = 9, Q$List = 10, Q$Map = 11, Q$Map$Entry = 12, Q$Set = 13, Q$Exportable = 14, CM$ = {};
function newSeed(id){ function newSeed(id){
return new seedTable[id]; return new seedTable[id];
} }
...@@ -89,11 +89,6 @@ function equals__devirtual$(this$static, other){ ...@@ -89,11 +89,6 @@ function equals__devirtual$(this$static, other){
return maybeJsoInvocation = this$static , isJavaObject(maybeJsoInvocation)?maybeJsoInvocation.equals$(other):maybeJsoInvocation === other; return maybeJsoInvocation = this$static , isJavaObject(maybeJsoInvocation)?maybeJsoInvocation.equals$(other):maybeJsoInvocation === other;
} }
function getClass__devirtual$(this$static){
var maybeJsoInvocation;
return maybeJsoInvocation = this$static , isJavaObject(maybeJsoInvocation)?maybeJsoInvocation.___clazz$:Lcom_google_gwt_core_client_JavaScriptObject_2_classLit;
}
function hashCode__devirtual$(this$static){ function hashCode__devirtual$(this$static){
var maybeJsoInvocation; var maybeJsoInvocation;
return maybeJsoInvocation = this$static , isJavaObject(maybeJsoInvocation)?maybeJsoInvocation.hashCode$():getHashCode(maybeJsoInvocation); return maybeJsoInvocation = this$static , isJavaObject(maybeJsoInvocation)?maybeJsoInvocation.hashCode$():getHashCode(maybeJsoInvocation);
...@@ -340,7 +335,7 @@ function $getDefaultNative(){ ...@@ -340,7 +335,7 @@ function $getDefaultNative(){
function $clinit_LocaleInfo(){ function $clinit_LocaleInfo(){
$clinit_LocaleInfo = nullMethod; $clinit_LocaleInfo = nullMethod;
instance_0 = new LocaleInfo_0; instance = new LocaleInfo_0;
} }
function $getNumberConstants(this$static){ function $getNumberConstants(this$static){
...@@ -353,10 +348,10 @@ function LocaleInfo_0(){ ...@@ -353,10 +348,10 @@ function LocaleInfo_0(){
defineSeed(24, 1, {}, LocaleInfo_0); defineSeed(24, 1, {}, LocaleInfo_0);
_.numberConstants = null; _.numberConstants = null;
var instance_0; var instance;
function $clinit_NumberFormat(){ function $clinit_NumberFormat(){
$clinit_NumberFormat = nullMethod; $clinit_NumberFormat = nullMethod;
$getNumberConstants(($clinit_LocaleInfo() , $clinit_LocaleInfo() , instance_0)); $getNumberConstants(($clinit_LocaleInfo() , $clinit_LocaleInfo() , instance));
} }
function $addExponent(this$static, digits){ function $addExponent(this$static, digits){
...@@ -401,7 +396,7 @@ function $adjustFractionDigits(this$static, digits){ ...@@ -401,7 +396,7 @@ function $adjustFractionDigits(this$static, digits){
--toRemove; --toRemove;
} }
if (toRemove < this$static.digitsLength) { if (toRemove < this$static.digitsLength) {
$delete(digits, toRemove, this$static.digitsLength); $delete_0(digits, toRemove, this$static.digitsLength);
this$static.digitsLength = toRemove; this$static.digitsLength = toRemove;
} }
} }
...@@ -455,7 +450,7 @@ function $format(this$static, number){ ...@@ -455,7 +450,7 @@ function $format(this$static, number){
if (preRound > 0 && preRound < $toString(buf.data).length && $charAt($toString(buf.data), preRound) == 57) { if (preRound > 0 && preRound < $toString(buf.data).length && $charAt($toString(buf.data), preRound) == 57) {
$propagateCarry(this$static, buf, preRound - 1); $propagateCarry(this$static, buf, preRound - 1);
scale += $toString(buf.data).length - preRound; scale += $toString(buf.data).length - preRound;
$delete(buf, preRound, $toString(buf.data).length); $delete_0(buf, preRound, $toString(buf.data).length);
} }
this$static.exponent = 0; this$static.exponent = 0;
this$static.digitsLength = $toString(buf.data).length; this$static.digitsLength = $toString(buf.data).length;
...@@ -488,7 +483,7 @@ function $insertGroupingSeparators(this$static, digits, g){ ...@@ -488,7 +483,7 @@ function $insertGroupingSeparators(this$static, digits, g){
function $parseAffix(this$static, pattern, start, affix, inNegativePattern){ function $parseAffix(this$static, pattern, start, affix, inNegativePattern){
var ch, inQuote, len, pos; var ch, inQuote, len, pos;
$replace_0(affix, $toString(affix.data).length); $delete(affix, $toString(affix.data).length);
inQuote = false; inQuote = false;
len = pattern.length; len = pattern.length;
for (pos = start; pos < len; ++pos) { for (pos = start; pos < len; ++pos) {
...@@ -765,7 +760,7 @@ function toScaledString(buf, val){ ...@@ -765,7 +760,7 @@ function toScaledString(buf, val){
expDigits = expIdx + 1; expDigits = expIdx + 1;
expDigits < $toString(buf.data).length && $charAt($toString(buf.data), expDigits) == 43 && ++expDigits; expDigits < $toString(buf.data).length && $charAt($toString(buf.data), expDigits) == 43 && ++expDigits;
expDigits < $toString(buf.data).length && (scale = __parseAndValidateInt($substring($toString(buf.data), expDigits))); expDigits < $toString(buf.data).length && (scale = __parseAndValidateInt($substring($toString(buf.data), expDigits)));
$delete(buf, expIdx, $toString(buf.data).length); $delete_0(buf, expIdx, $toString(buf.data).length);
} }
dot = $indexOf_0($toString(buf.data), '.', startLen); dot = $indexOf_0($toString(buf.data), '.', startLen);
if (dot >= 0) { if (dot >= 0) {
...@@ -948,7 +943,6 @@ function init(){ ...@@ -948,7 +943,6 @@ function init(){
!!$stats && onModuleStart('com.google.gwt.user.client.DocumentModeAsserter'); !!$stats && onModuleStart('com.google.gwt.user.client.DocumentModeAsserter');
$onModuleLoad(); $onModuleLoad();
!!$stats && onModuleStart('edu.umb.bio.jsMolCalc.client.JsMolCalcAPI'); !!$stats && onModuleStart('edu.umb.bio.jsMolCalc.client.JsMolCalcAPI');
new TaskExporterImpl_0;
$clinit_ExporterUtil(); $clinit_ExporterUtil();
new ExportAllExporterImpl_0; new ExportAllExporterImpl_0;
} }
...@@ -1022,30 +1016,30 @@ function $getRuntimeValue(){ ...@@ -1022,30 +1016,30 @@ function $getRuntimeValue(){
function $export(){ function $export(){
if (!exported) { if (!exported) {
exported = true; exported = true;
new InfoExporterImpl_0;
$export0(); $export0();
} }
} }
function $export0(){ function $export0(){
var pkg = declarePackage('jsmol.API'); var pkg = ($clinit_ExporterUtil() , $declarePackage('jsmol.API'));
var __0; var __0;
$wnd.jsmol.API = $entry(function(){ $wnd.jsmol.API = $entry(function(){
var g, j = this; var g, j = this;
isAssignableToInstance(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$API_2_classLit, arguments)?(g = arguments[0]):arguments.length == 0 && (g = new JsMolCalcAPI$API_0); isAssignableToInstance(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$API_2_classLit, arguments)?(g = arguments[0]):arguments.length == 0 && (g = new JsMolCalcAPI$API_0);
j.g = g; j.g = g;
setWrapper(g, j); g['__gwtex_wrap'] = j;
return j; return j;
} }
); );
__0 = $wnd.jsmol.API.prototype = new Object; __0 = $wnd.jsmol.API.prototype = new Object;
$wnd.jsmol.API.getInfo = $entry(function(a0, a1, a2){ $wnd.jsmol.API.getErrors = $entry(function(a0, a1, a2){
var result; var iat, info;
return wrap((result = computeAndDisplay(a0, a1, a2) , new JsMolCalcAPI$Info_0(result.info))); return new JsMolCalc_0 , iat = $computeAndDisplay(a0, a1, a2) , info = iat.info , info.indexOf('It is not possible') == 0?info:'';
} }
); );
$wnd.jsmol.API.getTasks = $entry(function(a0, a1, a2){ $wnd.jsmol.API.getInfo = $entry(function(a0, a1, a2){
return wrap_0(getTasks(a0, a1, a2)); var iat;
return new JsMolCalc_0 , iat = $computeAndDisplay(a0, a1, a2) , iat.info;
} }
); );
addTypeMap(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$API_2_classLit, $wnd.jsmol.API); addTypeMap(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$API_2_classLit, $wnd.jsmol.API);
...@@ -1060,6 +1054,312 @@ function APIExporterImpl_0(){ ...@@ -1060,6 +1054,312 @@ function APIExporterImpl_0(){
defineSeed(40, 1, {}, APIExporterImpl_0); defineSeed(40, 1, {}, APIExporterImpl_0);
var exported = false; var exported = false;
function $computeAndDisplay(molString, smileString, jmeString){
var atom, atomDataLines, atomLineParts, atomList, atomNumber, bondArray, bondIndex, bondLineParts, bondString, br, c, canMakeHbonds, canMakeIonicBonds, charge, chargeLineParts, cl, currentAtom, currentAtomSpec, currentNeighbor, element, errorString, f, fifthAtom, firstAtom, formula, formulaString, fourthAtom, h, i, illegalAtoms, iodine, j, k, l, line3Parts, logp, logpString, m, molStringLines, moleculeInfo, n, neighbors, nf, numAromaticAtoms, numAtoms, numBonds, o, p_0, s, secondAtom, sixthAtom, targets, thirdAtom;
if ($equals(molString, '') || $equals(smileString, '') || $equals(jmeString, '')) {
return new JsMolCalc$InfoAndTargets_0('');
}
atomDataLines = new StringBuffer_0;
logpString = '';
bondString = '';
atomList = new ArrayList_0;
$add_0(atomList, new JsMolCalc$Atom_0);
molStringLines = $split(molString, '\n', 0);
line3Parts = $split(molStringLines[3], '[ ]+', 0);
numAtoms = __parseAndValidateInt(line3Parts[1]);
numBonds = __parseAndValidateInt(line3Parts[2]);
for (i = 1; i < numAtoms + 1; ++i) {
atomLineParts = $split(molStringLines[i + 3], '[ ]+', 0);
element = atomLineParts[4];
atom = new JsMolCalc$Atom_0;
atom.element = element;
setCheck(atomList.array, atomList.size++, atom);
}
for (i = 0; i < molStringLines.length; ++i) {
if (molStringLines[i].indexOf('CHG') != -1) {
chargeLineParts = $split(molStringLines[i], '[ ]+', 0);
atomNumber = __parseAndValidateInt(chargeLineParts[3]);
charge = __parseAndValidateInt(chargeLineParts[4]);
atom = dynamicCast((checkIndex(atomNumber, atomList.size) , atomList.array[atomNumber]), Q$JsMolCalc$Atom);
atom.charge = charge;
}
}
bondArray = initDims([_3_3I_classLit, _3I_classLit], [makeCastMap([Q$Serializable]), makeCastMap([Q$int_$1, Q$Serializable])], [Q$int_$1, -1], [numAtoms + 1, numAtoms + 1], 2, 1);
for (i = 1; i < numAtoms + 1; ++i) {
fill(bondArray[i], bondArray[i].length);
}
for (i = 1; i < numBonds + 1; ++i) {
bondLineParts = $split(molStringLines[i + numAtoms + 3], '[ ]+', 0);
firstAtom = __parseAndValidateInt(bondLineParts[1]);
secondAtom = __parseAndValidateInt(bondLineParts[2]);
bondIndex = __parseAndValidateInt(bondLineParts[3]);
bondArray[firstAtom][secondAtom] = bondIndex;
bondArray[secondAtom][firstAtom] = bondIndex;
$addBondToNonHAtom(dynamicCast((checkIndex(firstAtom, atomList.size) , atomList.array[firstAtom]), Q$JsMolCalc$Atom), bondIndex);
$addBondToNonHAtom(dynamicCast((checkIndex(secondAtom, atomList.size) , atomList.array[secondAtom]), Q$JsMolCalc$Atom), bondIndex);
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
bondArray[i][j] != 0 && $updateHybridization(currentAtom, bondArray[i][j]);
}
}
for (i = 1; i < numAtoms + 1; ++i) {
firstAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
if (($equals(firstAtom.element, 'C') || $equals(firstAtom.element, 'N')) && (firstAtom.hybridization == 2 || firstAtom.aromatic)) {
for (j = 1; j < numAtoms + 1; ++j) {
secondAtom = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$JsMolCalc$Atom);
if ((bondArray[i][j] == 1 || bondArray[i][j] == 2 || secondAtom.aromatic && bondArray[i][j] != 0 || firstAtom.aromatic && bondArray[i][j] != 0) && ($equals(secondAtom.element, 'C') || $equals(secondAtom.element, 'N')) && secondAtom.hybridization == 2 && i != j) {
for (k = 1; k < numAtoms + 1; ++k) {
thirdAtom = dynamicCast((checkIndex(k, atomList.size) , atomList.array[k]), Q$JsMolCalc$Atom);
if ((bondArray[j][k] == 1 && bondArray[i][j] == 2 || bondArray[j][k] == 2 && bondArray[i][j] == 1 || thirdAtom.aromatic && bondArray[j][k] != 0 || secondAtom.aromatic && bondArray[j][k] != 0) && ($equals(thirdAtom.element, 'C') || $equals(thirdAtom.element, 'N')) && thirdAtom.hybridization == 2 && k != i && k != j) {
for (l = 1; l < numAtoms + 1; ++l) {
fourthAtom = dynamicCast((checkIndex(l, atomList.size) , atomList.array[l]), Q$JsMolCalc$Atom);
if ((bondArray[k][l] == 1 && bondArray[j][k] == 2 || bondArray[k][l] == 2 && bondArray[j][k] == 1 || fourthAtom.aromatic && bondArray[k][l] != 0 || thirdAtom.aromatic && bondArray[k][l] != 0) && ($equals(fourthAtom.element, 'C') || $equals(fourthAtom.element, 'N')) && fourthAtom.hybridization == 2 && l != i && l != j && l != k) {
for (m = 1; m < numAtoms + 1; ++m) {
fifthAtom = dynamicCast((checkIndex(m, atomList.size) , atomList.array[m]), Q$JsMolCalc$Atom);
if ((bondArray[l][m] == 1 && bondArray[k][l] == 2 || bondArray[l][m] == 2 && bondArray[k][l] == 1 || fifthAtom.aromatic && bondArray[l][m] != 0 || fourthAtom.aromatic && bondArray[l][m] != 0) && ($equals(fifthAtom.element, 'C') || $equals(fifthAtom.element, 'N')) && fifthAtom.hybridization == 2 && m != i && m != j && m != k && m != l) {
for (n = 1; n < numAtoms + 1; ++n) {
sixthAtom = dynamicCast((checkIndex(n, atomList.size) , atomList.array[n]), Q$JsMolCalc$Atom);
if ((bondArray[m][n] == 1 && bondArray[l][m] == 2 || bondArray[m][n] == 2 && bondArray[l][m] == 1 || sixthAtom.aromatic && bondArray[m][n] != 0 || fifthAtom.aromatic && bondArray[m][n] != 0) && ($equals(sixthAtom.element, 'C') || $equals(sixthAtom.element, 'N')) && sixthAtom.hybridization == 2 && n != i && n != j && n != k && n != l && n != m) {
if (bondArray[n][i] == 2 && bondArray[m][n] == 1 || bondArray[n][i] == 1 && bondArray[m][n] == 2) {
firstAtom.aromatic = true;
secondAtom.aromatic = true;
thirdAtom.aromatic = true;
fourthAtom.aromatic = true;
fifthAtom.aromatic = true;
sixthAtom.aromatic = true;
}
}
}
}
}
}
}
}
}
}
}
}
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
if (bondArray[i][j] != 0) {
currentNeighbor = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$JsMolCalc$Atom);
$processNeighbor(currentAtom, currentNeighbor.element, bondArray[i][j], currentNeighbor.aromatic);
}
}
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
if (bondArray[i][j] != 0) {
currentNeighbor = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$JsMolCalc$Atom);
if (currentNeighbor.hybridization < 3) {
for (k = 1; k < numAtoms + 1; ++k) {
bondArray[j][k] > 1 && k != i && ++currentAtom.numNeighborPi;
}
}
}
}
}
h = 0;
charge = 0;
for (i = 1; i < numAtoms + 1; ++i) {
atom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
$getNumNeighborHs(atom);
h = h + atom.numNeighborHs;
charge = charge + atom.charge;
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
if (bondArray[i][j] != 0) {
currentNeighbor = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$JsMolCalc$Atom);
$equals(currentAtom.element, 'N') && currentNeighbor.isACarbonyl && (currentAtom.amide = true);
}
}
}
illegalAtoms = new StringBuffer_0;
for (i = 1; i < numAtoms + 1; ++i) {
atom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
$equals(atom.element, 'C') && atom.charge != 0 && ($append(illegalAtoms.data, 'A Charged C atom.<br>') , illegalAtoms);
if ($equals(atom.element, 'N')) {
atom.charge > 1 && ($append(illegalAtoms.data, 'An N atom with too high + charge.<br>') , illegalAtoms);
atom.charge < 0 && ($append(illegalAtoms.data, 'An N atom with - charge.<br>') , illegalAtoms);
$getNumNeighborHs(atom) < 0 && !($equals(atom.doubleBondedNeighbor, 'O2') && $getNumNeighborHs(atom) == -2 && atom.numNeighborCs == 1 && atom.numNeighborXs == 2 && atom.charge == 0) && ($append(illegalAtoms.data, 'An N atom making too many bonds.<br>') , illegalAtoms);
}
if ($equals(atom.element, 'O')) {
atom.charge < -1 && ($append(illegalAtoms.data, 'An O atom with too high - charge.<br>') , illegalAtoms);
atom.charge > 0 && ($append(illegalAtoms.data, 'An O atom with + charge.<br>') , illegalAtoms);
}
if ($equals(atom.element, 'S')) {
atom.charge > 0 && ($append(illegalAtoms.data, 'An S atom with a + charge.<br>') , illegalAtoms);
$getNumNeighborHs(atom) < 0 && $getNumNeighborHs(atom) != -4 && $getNumNeighborHs(atom) != -2 && ($append(illegalAtoms.data, 'An S atom not making 2, 4, or 6 bonds.<br>') , illegalAtoms);
}
if ($equals(atom.element, 'P')) {
atom.charge != 0 && ($append(illegalAtoms.data, 'A Charged P atom.<br>') , illegalAtoms);
atom.numNeighborHs != -3 && ($append(illegalAtoms.data, 'A P atom not making 5 bonds.<br>') , illegalAtoms);
}
if ($equals(atom.element, 'F') || $equals(atom.element, 'Cl') || $equals(atom.element, 'Br') || $equals(atom.element, 'I')) {
atom.charge != 0 && $append_0(illegalAtoms, 'A Charged ' + atom.element + ' atom.<br>');
atom.numBondsToNonHAtoms > 1 && $append_0(illegalAtoms, 'A ' + atom.element + ' atom making more than one bond.<br>');
}
$equals(atom.element, 'X') && ($append(illegalAtoms.data, 'An X atom.<br>') , illegalAtoms);
}
errorString = '';
$toString(illegalAtoms.data).length != 0 && (errorString = '<html><body>It is not possible to calculate the properties<br>of your molecule because it contains:<br>' + $toString(illegalAtoms.data) + '<\/body><\/html>');
logp = 0;
canMakeHbonds = false;
canMakeIonicBonds = false;
if ($toString(illegalAtoms.data).length == 0) {
nf = ($clinit_NumberFormat() , new NumberFormat_1($getDefaultNative()));
for (i = 1; i < numAtoms + 1; ++i) {
atom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
currentAtomSpec = $getAtomSpec(atom);
logp = logp + currentAtomSpec.logp;
canMakeHbonds = canMakeHbonds || currentAtomSpec.canMakeHbonds;
canMakeIonicBonds = canMakeIonicBonds || currentAtomSpec.canMakeIonicBonds;
neighbors = new StringBuffer_0;
for (j = 1; j < numAtoms + 1; ++j) {
bondArray[i][j] != 0 && ($append(neighbors.data, j + ' ') , neighbors);
}
$append_0(atomDataLines, i + ' ' + currentAtomSpec.type + '; bonded to: ' + $toString(neighbors.data) + '; logp= ' + $format(nf, currentAtomSpec.logp) + '; H-bonds: ' + currentAtomSpec.canMakeHbonds + '; ionic bonds: ' + currentAtomSpec.canMakeIonicBonds + '\n');
}
logp < 0?(logpString = '<font color=green>Hydrophobicity index = ' + $format(nf, logp) + '<\/font>'):(logpString = '<font color=red>Hydrophobicity index = ' + $format(nf, logp) + '<\/font>');
canMakeHbonds?(bondString = '<font color=green>Can Make Strong Hydrogen Bonds<\/font><br>'):(bondString = '<font color=red>Can not Make Strong Hydrogen Bonds<\/font><br>');
canMakeIonicBonds?(bondString += '<font color=green>Can Make Ionic Bonds<\/font>'):(bondString += '<font color=red>Can not Make Ionic Bonds<\/font>');
}
numBonds = 0;
numAromaticAtoms = 0;
c = 0;
n = 0;
o = 0;
s = 0;
p_0 = 0;
cl = 0;
br = 0;
f = 0;
iodine = 0;
formula = new StringBuffer_0;
for (i = 0; i < smileString.length; ++i) {
switch (smileString.charCodeAt(i)) {
case 67:
++c;
break;
case 78:
++n;
break;
case 79:
++o;
break;
case 83:
++s;
break;
case 80:
++p_0;
break;
case 108:
--c;
++cl;
break;
case 66:
++br;
break;
case 70:
++f;
break;
case 73:
++iodine;
break;
case 99:
++c;
++numAromaticAtoms;
break;
case 110:
++n;
++numAromaticAtoms;
break;
case 115:
++s;
++numAromaticAtoms;
break;
case 111:
++o;
++numAromaticAtoms;
break;
case 35:
++numBonds;
case 61:
++numBonds;
}
}
$prettyPrint('C', c, formula);
$prettyPrint('H', h, formula);
$prettyPrint('N', n, formula);
$prettyPrint('O', o, formula);
$prettyPrint('P', p_0, formula);
$prettyPrint('S', s, formula);
$prettyPrint('Cl', cl, formula);
$prettyPrint('Br', br, formula);
$prettyPrint('F', f, formula);
$prettyPrint('I', iodine, formula);
if (charge != 0) {
$append(formula.data, '(');
charge == -1?($append(formula.data, '-') , formula):charge > 0 && ($append(formula.data, '+') , formula);
(charge < 0?-charge:charge) != 1 && ($append(formula.data, '' + charge) , formula);
$append(formula.data, ')');
}
formulaString = 'Formula: ' + $toString(formula.data);
$equals(errorString, '')?(moleculeInfo = '<html><body>' + formulaString + '<br>' + logpString + '<br>' + bondString + '<\/body><\/html>'):(moleculeInfo = errorString);
if ($equals(errorString, '')) {
nf = ($clinit_NumberFormat() , new NumberFormat_1($getDefaultNative()));
targets = '<html><body>Edit the molecule so that it:<br><ul>';
targets += '<li>can ';
canMakeHbonds && (targets += ' not ');
targets += 'make Hydrogen bonds<\/li>';
targets += '<li>can ';
canMakeIonicBonds && (targets += ' not ');
targets += 'make Ionic bonds<\/li>';
targets += '<li>has a relative hydrophobicity between ';
targets += $format(nf, logp - 1.5);
targets += ' and ';
targets += $format(nf, logp - 0.5);
targets += '<\/li>';
targets += '<li>has a relative hydrophobicity between ';
targets += $format(nf, logp + 0.5);
targets += ' and ';
targets += $format(nf, logp + 1.5);
targets += '<\/li>';
targets += '<\/ul><\/body><\/html>';
}
return new JsMolCalc$InfoAndTargets_0(moleculeInfo);
}
function $prettyPrint(atomLabel, number, outString){
if (number == 0) {
return;
}
$append(outString.data, atomLabel);
if (number == 1) {
$append(outString.data, ' ');
return;
}
$append(outString.data, '<sub>' + number + '<\/sub> ');
}
function JsMolCalc_0(){
new ArrayList_0;
}
defineSeed(41, 1, {}, JsMolCalc_0);
function $addBondToNonHAtom(this$static, bondIndex){
this$static.numBondsToNonHAtoms = this$static.numBondsToNonHAtoms + bondIndex;
}
--></script>
<script><!--
function $getAtomSpec(this$static){ function $getAtomSpec(this$static){
var charged; var charged;
this$static.chargeOffset = 0; this$static.chargeOffset = 0;
...@@ -1069,30 +1369,30 @@ function $getAtomSpec(this$static){ ...@@ -1069,30 +1369,30 @@ function $getAtomSpec(this$static){
case 3: case 3:
switch (this$static.numNeighborHs) { switch (this$static.numNeighborHs) {
case 4: case 4:
return new AtomSpec_0(0.528, 'C: sp3, H4', false, false); return new JsMolCalc$AtomSpec_0(0.528, 'C: sp3, H4', false, false);
case 3: case 3:
return this$static.numNeighborXs == 0?this$static.numNeighborPi == 0?new AtomSpec_0(0.528, 'C: sp3; C H H H, no pi', false, false):new AtomSpec_0(0.267, 'C: sp3; C H H H, pi', false, false):new AtomSpec_0(-0.032, 'C: sp3; X H H H', false, false); return this$static.numNeighborXs == 0?this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.528, 'C: sp3; C H H H, no pi', false, false):new JsMolCalc$AtomSpec_0(0.267, 'C: sp3; C H H H, pi', false, false):new JsMolCalc$AtomSpec_0(-0.032, 'C: sp3; X H H H', false, false);
case 2: case 2:
if (this$static.numNeighborXs == 0) { if (this$static.numNeighborXs == 0) {
switch (this$static.numNeighborPi) { switch (this$static.numNeighborPi) {
case 0: case 0:
return new AtomSpec_0(0.358, 'C: sp3; C C H H, no pi', false, false); return new JsMolCalc$AtomSpec_0(0.358, 'C: sp3; C C H H, no pi', false, false);
case 1: case 1:
return new AtomSpec_0(-0.008, 'C: sp3; C C H H, 1 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.008, 'C: sp3; C C H H, 1 pi', false, false);
case 2: case 2:
return new AtomSpec_0(-0.185, 'C: sp3; C C H H, 2 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.185, 'C: sp3; C C H H, 2 pi', false, false);
default:return new AtomSpec_0(0, 'C: sp3; ? ? H H', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: sp3; ? ? H H', false, false);
} }
} }
else { else {
switch (this$static.numNeighborPi) { switch (this$static.numNeighborPi) {
case 0: case 0:
return new AtomSpec_0(-0.137, 'C: sp3; C X H H, no pi', false, false); return new JsMolCalc$AtomSpec_0(-0.137, 'C: sp3; C X H H, no pi', false, false);
case 1: case 1:
return new AtomSpec_0(-0.303, 'C: sp3; C X H H, 1 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.303, 'C: sp3; C X H H, 1 pi', false, false);
case 2: case 2:
return new AtomSpec_0(-0.815, 'C: sp3; C X H H, 2 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.815, 'C: sp3; C X H H, 2 pi', false, false);
default:return new AtomSpec_0(0, 'C: sp3; ? X H H, H2', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: sp3; ? X H H, H2', false, false);
} }
} }
...@@ -1100,19 +1400,19 @@ function $getAtomSpec(this$static){ ...@@ -1100,19 +1400,19 @@ function $getAtomSpec(this$static){
if (this$static.numNeighborXs == 0) { if (this$static.numNeighborXs == 0) {
switch (this$static.numNeighborPi) { switch (this$static.numNeighborPi) {
case 0: case 0:
return new AtomSpec_0(0.127, 'C: sp3; C C C H, no pi', false, false); return new JsMolCalc$AtomSpec_0(0.127, 'C: sp3; C C C H, no pi', false, false);
case 1: case 1:
return new AtomSpec_0(-0.243, 'C: sp3; C C C H, 1 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.243, 'C: sp3; C C C H, 1 pi', false, false);
default:return new AtomSpec_0(-0.499, 'C: sp3; C C C H, >1 pi', false, false); default:return new JsMolCalc$AtomSpec_0(-0.499, 'C: sp3; C C C H, >1 pi', false, false);
} }
} }
else { else {
switch (this$static.numNeighborPi) { switch (this$static.numNeighborPi) {
case 0: case 0:
return new AtomSpec_0(-0.205, 'C: sp3; C C/X X H, no pi', false, false); return new JsMolCalc$AtomSpec_0(-0.205, 'C: sp3; C C/X X H, no pi', false, false);
case 1: case 1:
return new AtomSpec_0(-0.305, 'C: sp3; C C/X X H, 1 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.305, 'C: sp3; C C/X X H, 1 pi', false, false);
default:return new AtomSpec_0(-0.709, 'C: sp3; C C/X X H, >1 pi', false, false); default:return new JsMolCalc$AtomSpec_0(-0.709, 'C: sp3; C C/X X H, >1 pi', false, false);
} }
} }
...@@ -1120,74 +1420,74 @@ function $getAtomSpec(this$static){ ...@@ -1120,74 +1420,74 @@ function $getAtomSpec(this$static){
if (this$static.numNeighborXs == 0) { if (this$static.numNeighborXs == 0) {
switch (this$static.numNeighborPi) { switch (this$static.numNeighborPi) {
case 0: case 0:
return new AtomSpec_0(-0.006, 'C: sp3; C C C C, no pi', false, false); return new JsMolCalc$AtomSpec_0(-0.006, 'C: sp3; C C C C, no pi', false, false);
case 1: case 1:
return new AtomSpec_0(-0.57, 'C: sp3; C C C C, 1 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.57, 'C: sp3; C C C C, 1 pi', false, false);
default:return new AtomSpec_0(-0.317, 'C: sp3; C C C C, >1 pi', false, false); default:return new JsMolCalc$AtomSpec_0(-0.317, 'C: sp3; C C C C, >1 pi', false, false);
} }
} }
else { else {
switch (this$static.numNeighborPi) { switch (this$static.numNeighborPi) {
case 0: case 0:
return new AtomSpec_0(-0.316, 'C: sp3; C C/X C/X X, no pi', false, false); return new JsMolCalc$AtomSpec_0(-0.316, 'C: sp3; C C/X C/X X, no pi', false, false);
default:return new AtomSpec_0(-0.723, 'C: sp3; C C/X C/X X, pi', false, false); default:return new JsMolCalc$AtomSpec_0(-0.723, 'C: sp3; C C/X C/X X, pi', false, false);
} }
} }
default:return new AtomSpec_0(0, 'C: sp3; unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: sp3; unknown', false, false);
} }
case 2: case 2:
if (!this$static.aromatic) { if (!this$static.aromatic) {
switch (this$static.numNeighborHs) { switch (this$static.numNeighborHs) {
case 2: case 2:
return new AtomSpec_0(0.42, 'C: sp2; =? H H', false, false); return new JsMolCalc$AtomSpec_0(0.42, 'C: sp2; =? H H', false, false);
case 1: case 1:
switch (this$static.numNeighborXs) { switch (this$static.numNeighborXs) {
case 1: case 1:
return this$static.numNeighborPi == 0?new AtomSpec_0(0.001, 'C: sp2; =? X H, no pi', false, false):new AtomSpec_0(-0.31, 'C: sp2; =? X H, 1 pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.001, 'C: sp2; =? X H, no pi', false, false):new JsMolCalc$AtomSpec_0(-0.31, 'C: sp2; =? X H, 1 pi', false, false);
case 0: case 0:
return this$static.numNeighborPi == 0?new AtomSpec_0(0.466, 'C: sp2; =? C H, no pi', false, false):new AtomSpec_0(0.136, 'C: sp2; =? C H, 1 pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.466, 'C: sp2; =? C H, no pi', false, false):new JsMolCalc$AtomSpec_0(0.136, 'C: sp2; =? C H, 1 pi', false, false);
default:return new AtomSpec_0(0, 'C: sp2; =? H, unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: sp2; =? H, unknown', false, false);
} }
case 0: case 0:
switch (this$static.numNeighborXs) { switch (this$static.numNeighborXs) {
case 2: case 2:
return this$static.numNeighborPi == 0?new AtomSpec_0(0.005, 'C: sp2; =? X X, no pi', false, false):new AtomSpec_0(-0.315, 'C: sp2; =? X X, pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.005, 'C: sp2; =? X X, no pi', false, false):new JsMolCalc$AtomSpec_0(-0.315, 'C: sp2; =? X X, pi', false, false);
case 1: case 1:
return this$static.numNeighborPi == 0?new AtomSpec_0(-0.03, 'C: sp2; =? C X, no pi', false, false):new AtomSpec_0(-0.027, 'C: sp2; =? C X, pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(-0.03, 'C: sp2; =? C X, no pi', false, false):new JsMolCalc$AtomSpec_0(-0.027, 'C: sp2; =? C X, pi', false, false);
case 0: case 0:
return this$static.numNeighborPi == 0?new AtomSpec_0(0.05, 'C: sp2; =? C C, no pi', false, false):new AtomSpec_0(0.013, 'C: sp2; =? C C, pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.05, 'C: sp2; =? C C, no pi', false, false):new JsMolCalc$AtomSpec_0(0.013, 'C: sp2; =? C C, pi', false, false);
default:return new AtomSpec_0(0, 'C: sp2; =? C C, unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: sp2; =? C C, unknown', false, false);
} }
default:return new AtomSpec_0(0, 'C: sp2; unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: sp2; unknown', false, false);
} }
} }
switch (this$static.numNeighborHs) { switch (this$static.numNeighborHs) {
case 1: case 1:
return this$static.numNeighborNAro == 0?new AtomSpec_0(0.337, 'C: aromatic; C C H', false, false):new AtomSpec_0(0.126, 'C: aromatic; aro-N C H', false, false); return this$static.numNeighborNAro == 0?new JsMolCalc$AtomSpec_0(0.337, 'C: aromatic; C C H', false, false):new JsMolCalc$AtomSpec_0(0.126, 'C: aromatic; aro-N C H', false, false);
case 0: case 0:
switch (this$static.numNeighborXs) { switch (this$static.numNeighborXs) {
case 2: case 2:
return this$static.numNeighborNAro == 0?new AtomSpec_0(0, 'C: aromatic; unknown C X X', false, false):new AtomSpec_0(0.366, 'C: aromatic; aro-N C X', false, false); return this$static.numNeighborNAro == 0?new JsMolCalc$AtomSpec_0(0, 'C: aromatic; unknown C X X', false, false):new JsMolCalc$AtomSpec_0(0.366, 'C: aromatic; aro-N C X', false, false);
case 1: case 1:
return this$static.numNeighborNAro == 0?new AtomSpec_0(-0.151, 'C: aromatic; C C X', false, false):new AtomSpec_0(0.174, 'C: aromatic; aro-N C C', false, false); return this$static.numNeighborNAro == 0?new JsMolCalc$AtomSpec_0(-0.151, 'C: aromatic; C C X', false, false):new JsMolCalc$AtomSpec_0(0.174, 'C: aromatic; aro-N C C', false, false);
case 0: case 0:
return new AtomSpec_0(0.296, 'C: aromatic; C C C', false, false); return new JsMolCalc$AtomSpec_0(0.296, 'C: aromatic; C C C', false, false);
default:return new AtomSpec_0(0, 'C: aromatic; unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: aromatic; unknown', false, false);
} }
default:return new AtomSpec_0(0, 'C: aromatic; unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: aromatic; unknown', false, false);
} }
case 1: case 1:
if (this$static.isAnAllene) if (this$static.isAnAllene)
return new AtomSpec_0(2.073, 'C: =C=', false, false); return new JsMolCalc$AtomSpec_0(2.073, 'C: =C=', false, false);
return this$static.numNeighborHs == 0?new AtomSpec_0(0.33, 'C: sp; ? ?', false, false):new AtomSpec_0(0.209, 'C: sp; ? H', false, false); return this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(0.33, 'C: sp; ? ?', false, false):new JsMolCalc$AtomSpec_0(0.209, 'C: sp; ? H', false, false);
default:return new AtomSpec_0(0, 'C: unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: unknown', false, false);
} }
} }
if ($equals(this$static.element, 'N')) { if ($equals(this$static.element, 'N')) {
...@@ -1224,11 +1524,11 @@ function $getAtomSpec(this$static){ ...@@ -1224,11 +1524,11 @@ function $getAtomSpec(this$static){
if (this$static.amide) { if (this$static.amide) {
switch (this$static.numNeighborHs) { switch (this$static.numNeighborHs) {
case 2: case 2:
return new AtomSpec_0(-0.646 + this$static.chargeOffset, 'N: amide; C=O H H' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(-0.646 + this$static.chargeOffset, 'N: amide; C=O H H' + this$static.chargeString, true, charged);
case 1: case 1:
return this$static.numNeighborXs == 0?new AtomSpec_0(-0.096 + this$static.chargeOffset, 'N: amide; C=O C H' + this$static.chargeString, true, charged):new AtomSpec_0(-0.044 + this$static.chargeOffset, 'N: amide; C=O X H' + this$static.chargeString, true, charged); return this$static.numNeighborXs == 0?new JsMolCalc$AtomSpec_0(-0.096 + this$static.chargeOffset, 'N: amide; C=O C H' + this$static.chargeString, true, charged):new JsMolCalc$AtomSpec_0(-0.044 + this$static.chargeOffset, 'N: amide; C=O X H' + this$static.chargeString, true, charged);
case 0: case 0:
return this$static.numNeighborXs == 0?new AtomSpec_0(0.078 + this$static.chargeOffset, 'N: amide; C=O C C' + this$static.chargeString, !charged, charged):new AtomSpec_0(-0.118 + this$static.chargeOffset, 'N: amide; C=O C X' + this$static.chargeString, !charged, charged); return this$static.numNeighborXs == 0?new JsMolCalc$AtomSpec_0(0.078 + this$static.chargeOffset, 'N: amide; C=O C C' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(-0.118 + this$static.chargeOffset, 'N: amide; C=O C X' + this$static.chargeString, !charged, charged);
} }
} }
switch (this$static.hybridization) { switch (this$static.hybridization) {
...@@ -1236,40 +1536,40 @@ function $getAtomSpec(this$static){ ...@@ -1236,40 +1536,40 @@ function $getAtomSpec(this$static){
switch (this$static.numNeighborHs) { switch (this$static.numNeighborHs) {
case 2: case 2:
if (this$static.numNeighborXs != 0) if (this$static.numNeighborXs != 0)
return new AtomSpec_0(-1.082 + this$static.chargeOffset, 'N: sp3; X H H' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(-1.082 + this$static.chargeOffset, 'N: sp3; X H H' + this$static.chargeString, true, charged);
return this$static.numNeighborPi == 0?new AtomSpec_0(-0.534 + this$static.chargeOffset, 'N: sp3; C H H, no pi' + this$static.chargeString, true, charged):new AtomSpec_0(-0.329 + this$static.chargeOffset, 'N: sp3; C H H, pi' + this$static.chargeString, true, charged); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(-0.534 + this$static.chargeOffset, 'N: sp3; C H H, no pi' + this$static.chargeString, true, charged):new JsMolCalc$AtomSpec_0(-0.329 + this$static.chargeOffset, 'N: sp3; C H H, pi' + this$static.chargeString, true, charged);
case 1: case 1:
if (this$static.numNeighborXs != 0) if (this$static.numNeighborXs != 0)
return new AtomSpec_0(0.324 + this$static.chargeOffset, 'N: sp3; C X H' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(0.324 + this$static.chargeOffset, 'N: sp3; C X H' + this$static.chargeString, true, charged);
return this$static.numNeighborPi == 0?new AtomSpec_0(-0.112 + this$static.chargeOffset, 'N: sp3; C C H, no pi' + this$static.chargeString, true, charged):new AtomSpec_0(0.166 + this$static.chargeOffset, 'N: sp3; C C H, pi' + this$static.chargeString, true, charged); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(-0.112 + this$static.chargeOffset, 'N: sp3; C C H, no pi' + this$static.chargeString, true, charged):new JsMolCalc$AtomSpec_0(0.166 + this$static.chargeOffset, 'N: sp3; C C H, pi' + this$static.chargeString, true, charged);
case 0: case 0:
if (this$static.numNeighborXs != 0) if (this$static.numNeighborXs != 0)
return new AtomSpec_0(-0.239 + this$static.chargeOffset, 'N: sp3; C C X' + this$static.chargeString, !charged, charged); return new JsMolCalc$AtomSpec_0(-0.239 + this$static.chargeOffset, 'N: sp3; C C X' + this$static.chargeString, !charged, charged);
return this$static.numNeighborPi == 0?new AtomSpec_0(0.159 + this$static.chargeOffset, 'N: sp3; C C C, no pi' + this$static.chargeString, !charged, charged):new AtomSpec_0(0.761 + this$static.chargeOffset, 'N: sp3; C C C, pi' + this$static.chargeString, !charged, charged); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.159 + this$static.chargeOffset, 'N: sp3; C C C, no pi' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(0.761 + this$static.chargeOffset, 'N: sp3; C C C, pi' + this$static.chargeString, !charged, charged);
default:return new AtomSpec_0(this$static.chargeOffset, 'N: sp3; unknown' + this$static.chargeString, true, charged); default:return new JsMolCalc$AtomSpec_0(this$static.chargeOffset, 'N: sp3; unknown' + this$static.chargeString, true, charged);
} }
case 2: case 2:
if (this$static.aromatic) { if (this$static.aromatic) {
return new AtomSpec_0(-0.493 + this$static.chargeOffset, 'N: aromatic' + this$static.chargeString, !charged, charged); return new JsMolCalc$AtomSpec_0(-0.493 + this$static.chargeOffset, 'N: aromatic' + this$static.chargeString, !charged, charged);
} }
if ($equals(this$static.doubleBondedNeighbor, 'C')) { if ($equals(this$static.doubleBondedNeighbor, 'C')) {
return this$static.numNeighborXs == 0?this$static.numNeighborPi == 0?this$static.numNeighborHs == 0?new AtomSpec_0(0.007 + this$static.chargeOffset, 'N: sp2; =C ? no H, no pi' + this$static.chargeString, !charged, charged):new AtomSpec_0(0.007 + this$static.chargeOffset, 'N: sp2; =C ? H, no pi' + this$static.chargeString, true, charged):this$static.numNeighborHs == 0?new AtomSpec_0(-0.275 + this$static.chargeOffset, 'N: sp2; =C ? no H, pi' + this$static.chargeString, !charged, charged):new AtomSpec_0(-0.275 + this$static.chargeOffset, 'N: sp2; =C ? H, pi' + this$static.chargeString, true, charged):this$static.numNeighborPi == 0?this$static.numNeighborHs == 0?new AtomSpec_0(0.366 + this$static.chargeOffset, 'N: sp2; =C X no H, no pi' + this$static.chargeString, !charged, charged):new AtomSpec_0(0.366 + this$static.chargeOffset, 'N: sp2; =C X H, no pi' + this$static.chargeString, true, charged):this$static.numNeighborHs == 0?new AtomSpec_0(0.251 + this$static.chargeOffset, 'N: sp2; =C X no H, pi' + this$static.chargeString, !charged, charged):new AtomSpec_0(0.251 + this$static.chargeOffset, 'N: sp2; =C X H, pi' + this$static.chargeString, true, charged); return this$static.numNeighborXs == 0?this$static.numNeighborPi == 0?this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(0.007 + this$static.chargeOffset, 'N: sp2; =C ? no H, no pi' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(0.007 + this$static.chargeOffset, 'N: sp2; =C ? H, no pi' + this$static.chargeString, true, charged):this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(-0.275 + this$static.chargeOffset, 'N: sp2; =C ? no H, pi' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(-0.275 + this$static.chargeOffset, 'N: sp2; =C ? H, pi' + this$static.chargeString, true, charged):this$static.numNeighborPi == 0?this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(0.366 + this$static.chargeOffset, 'N: sp2; =C X no H, no pi' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(0.366 + this$static.chargeOffset, 'N: sp2; =C X H, no pi' + this$static.chargeString, true, charged):this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(0.251 + this$static.chargeOffset, 'N: sp2; =C X no H, pi' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(0.251 + this$static.chargeOffset, 'N: sp2; =C X H, pi' + this$static.chargeString, true, charged);
} }
if ($equals(this$static.doubleBondedNeighbor, 'N')) { if ($equals(this$static.doubleBondedNeighbor, 'N')) {
return this$static.numNeighborXs == 1?this$static.numNeighborHs == 0?new AtomSpec_0(0.536 + this$static.chargeOffset, 'N: sp2; =N ? no H' + this$static.chargeString, !charged, charged):new AtomSpec_0(0.536 + this$static.chargeOffset, 'N: sp2; =N ? H' + this$static.chargeString, true, charged):this$static.numNeighborHs == 0?new AtomSpec_0(-0.597 + this$static.chargeOffset, 'N: sp2; =N X no H' + this$static.chargeString, !charged, charged):new AtomSpec_0(-0.597 + this$static.chargeOffset, 'N: sp2; =N X H' + this$static.chargeString, true, charged); return this$static.numNeighborXs == 1?this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(0.536 + this$static.chargeOffset, 'N: sp2; =N ? no H' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(0.536 + this$static.chargeOffset, 'N: sp2; =N ? H' + this$static.chargeString, true, charged):this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(-0.597 + this$static.chargeOffset, 'N: sp2; =N X no H' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(-0.597 + this$static.chargeOffset, 'N: sp2; =N X H' + this$static.chargeString, true, charged);
} }
if ($equals(this$static.doubleBondedNeighbor, 'O')) if ($equals(this$static.doubleBondedNeighbor, 'O'))
return new AtomSpec_0(0.427 + this$static.chargeOffset, 'N: nitroso' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(0.427 + this$static.chargeOffset, 'N: nitroso' + this$static.chargeString, true, charged);
if (this$static.numNeighborXs != 0) if (this$static.numNeighborXs != 0)
return new AtomSpec_0(0.427, 'N: sp2; =? ?', true, charged); return new JsMolCalc$AtomSpec_0(0.427, 'N: sp2; =? ?', true, charged);
return new AtomSpec_0(this$static.chargeOffset, 'N: sp2; unknown' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(this$static.chargeOffset, 'N: sp2; unknown' + this$static.chargeString, true, charged);
case 1: case 1:
return $equals(this$static.doubleBondedNeighbor, 'O2')?new AtomSpec_0(1.178, 'N: nitro', true, false):this$static.numNeighborHs == 0?new AtomSpec_0(-0.566 + this$static.chargeOffset, 'N: sp no H' + this$static.chargeString, !charged, charged):new AtomSpec_0(-0.566 + this$static.chargeOffset, 'N: sp H' + this$static.chargeString, true, charged); return $equals(this$static.doubleBondedNeighbor, 'O2')?new JsMolCalc$AtomSpec_0(1.178, 'N: nitro', true, false):this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(-0.566 + this$static.chargeOffset, 'N: sp no H' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(-0.566 + this$static.chargeOffset, 'N: sp H' + this$static.chargeString, true, charged);
default:return new AtomSpec_0(this$static.chargeOffset, 'N: unknown' + this$static.chargeString, true, charged); default:return new JsMolCalc$AtomSpec_0(this$static.chargeOffset, 'N: unknown' + this$static.chargeString, true, charged);
} }
} }
if ($equals(this$static.element, 'O')) { if ($equals(this$static.element, 'O')) {
...@@ -1284,18 +1584,18 @@ function $getAtomSpec(this$static){ ...@@ -1284,18 +1584,18 @@ function $getAtomSpec(this$static){
switch (this$static.numNeighborHs) { switch (this$static.numNeighborHs) {
case 1: case 1:
if (this$static.numNeighborXs != 0) if (this$static.numNeighborXs != 0)
return new AtomSpec_0(-0.522 + this$static.chargeOffset, 'O: sp3; X H' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(-0.522 + this$static.chargeOffset, 'O: sp3; X H' + this$static.chargeString, true, charged);
return this$static.numNeighborPi == 0?new AtomSpec_0(-0.467 + this$static.chargeOffset, 'O: sp3; C H, no pi' + this$static.chargeString, true, charged):new AtomSpec_0(0.082 + this$static.chargeOffset, 'O: sp3; C H, pi' + this$static.chargeString, true, charged); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(-0.467 + this$static.chargeOffset, 'O: sp3; C H, no pi' + this$static.chargeString, true, charged):new JsMolCalc$AtomSpec_0(0.082 + this$static.chargeOffset, 'O: sp3; C H, pi' + this$static.chargeString, true, charged);
case 0: case 0:
if (this$static.numNeighborXs != 0) if (this$static.numNeighborXs != 0)
return new AtomSpec_0(0.105 + this$static.chargeOffset, 'O: sp3; C X' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(0.105 + this$static.chargeOffset, 'O: sp3; C X' + this$static.chargeString, true, charged);
return this$static.numNeighborPi == 0?new AtomSpec_0(0.084 + this$static.chargeOffset, 'O: sp3; C C, no pi' + this$static.chargeString, true, charged):new AtomSpec_0(0.435 + this$static.chargeOffset, 'O: sp3; C C, pi' + this$static.chargeString, true, charged); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.084 + this$static.chargeOffset, 'O: sp3; C C, no pi' + this$static.chargeString, true, charged):new JsMolCalc$AtomSpec_0(0.435 + this$static.chargeOffset, 'O: sp3; C C, pi' + this$static.chargeString, true, charged);
default:return new AtomSpec_0(this$static.chargeOffset, 'O: sp3; unknown' + this$static.chargeString, true, charged); default:return new JsMolCalc$AtomSpec_0(this$static.chargeOffset, 'O: sp3; unknown' + this$static.chargeString, true, charged);
} }
case 2: case 2:
return new AtomSpec_0(-0.399 + this$static.chargeOffset, 'O: sp2' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(-0.399 + this$static.chargeOffset, 'O: sp2' + this$static.chargeString, true, charged);
default:return new AtomSpec_0(this$static.chargeOffset, 'O: unknown' + this$static.chargeString, true, charged); default:return new JsMolCalc$AtomSpec_0(this$static.chargeOffset, 'O: unknown' + this$static.chargeString, true, charged);
} }
} }
if ($equals(this$static.element, 'S')) { if ($equals(this$static.element, 'S')) {
...@@ -1307,39 +1607,39 @@ function $getAtomSpec(this$static){ ...@@ -1307,39 +1607,39 @@ function $getAtomSpec(this$static){
} }
switch (this$static.hybridization) { switch (this$static.hybridization) {
case 3: case 3:
return this$static.numNeighborHs == 0?new AtomSpec_0(0.255 + this$static.chargeOffset, 'S: sp3; C/X C/X' + this$static.chargeString, false, charged):new AtomSpec_0(0.419 + this$static.chargeOffset, 'S: sp3; C/X H' + this$static.chargeString, false, charged); return this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(0.255 + this$static.chargeOffset, 'S: sp3; C/X C/X' + this$static.chargeString, false, charged):new JsMolCalc$AtomSpec_0(0.419 + this$static.chargeOffset, 'S: sp3; C/X H' + this$static.chargeString, false, charged);
case 2: case 2:
return $equals(this$static.doubleBondedNeighbor, 'O')?new AtomSpec_0(-1.375, 'S: sulfoxide', false, charged):new AtomSpec_0(-0.148 + this$static.chargeOffset, 'S: sp2' + this$static.chargeString, false, charged); return $equals(this$static.doubleBondedNeighbor, 'O')?new JsMolCalc$AtomSpec_0(-1.375, 'S: sulfoxide', false, charged):new JsMolCalc$AtomSpec_0(-0.148 + this$static.chargeOffset, 'S: sp2' + this$static.chargeString, false, charged);
case 1: case 1:
if ($equals(this$static.doubleBondedNeighbor, 'O2')) { if ($equals(this$static.doubleBondedNeighbor, 'O2')) {
return new AtomSpec_0(-0.168, 'S: sulfone', false, charged); return new JsMolCalc$AtomSpec_0(-0.168, 'S: sulfone', false, charged);
} }
default:return new AtomSpec_0(this$static.chargeOffset, 'S: unknown' + this$static.chargeString, false, charged); default:return new JsMolCalc$AtomSpec_0(this$static.chargeOffset, 'S: unknown' + this$static.chargeString, false, charged);
} }
} }
if ($equals(this$static.element, 'P') && this$static.hybridization == 2) { if ($equals(this$static.element, 'P') && this$static.hybridization == 2) {
if ($equals(this$static.doubleBondedNeighbor, 'O')) { if ($equals(this$static.doubleBondedNeighbor, 'O')) {
return new AtomSpec_0(-0.447, 'P: in phosphate', false, false); return new JsMolCalc$AtomSpec_0(-0.447, 'P: in phosphate', false, false);
} }
if ($equals(this$static.doubleBondedNeighbor, 'S')) { if ($equals(this$static.doubleBondedNeighbor, 'S')) {
return new AtomSpec_0(1.253, 'P: in thio-phosphate', false, false); return new JsMolCalc$AtomSpec_0(1.253, 'P: in thio-phosphate', false, false);
} }
return new AtomSpec_0(0, 'P: unknown', false, false); return new JsMolCalc$AtomSpec_0(0, 'P: unknown', false, false);
} }
if ($equals(this$static.element, 'F')) { if ($equals(this$static.element, 'F')) {
return this$static.numNeighborPi == 0?new AtomSpec_0(0.375, 'F; no pi', false, false):new AtomSpec_0(0.202, 'F; pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.375, 'F; no pi', false, false):new JsMolCalc$AtomSpec_0(0.202, 'F; pi', false, false);
} }
if ($equals(this$static.element, 'Cl')) { if ($equals(this$static.element, 'Cl')) {
return this$static.numNeighborPi == 0?new AtomSpec_0(0.512, 'Cl; no pi', false, false):new AtomSpec_0(0.663, 'Cl; pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.512, 'Cl; no pi', false, false):new JsMolCalc$AtomSpec_0(0.663, 'Cl; pi', false, false);
} }
if ($equals(this$static.element, 'Br')) { if ($equals(this$static.element, 'Br')) {
return this$static.numNeighborPi == 0?new AtomSpec_0(0.85, 'Br; no pi', false, false):new AtomSpec_0(0.839, 'Br; pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.85, 'Br; no pi', false, false):new JsMolCalc$AtomSpec_0(0.839, 'Br; pi', false, false);
} }
if ($equals(this$static.element, 'I')) { if ($equals(this$static.element, 'I')) {
return this$static.numNeighborPi == 0?new AtomSpec_0(1.05, 'I; no pi', false, false):new AtomSpec_0(1.109, 'I; pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(1.05, 'I; no pi', false, false):new JsMolCalc$AtomSpec_0(1.109, 'I; pi', false, false);
} }
return new AtomSpec_0(0, 'unknown atom', false, false); return new JsMolCalc$AtomSpec_0(0, 'unknown atom', false, false);
} }
function $getNumNeighborHs(this$static){ function $getNumNeighborHs(this$static){
...@@ -1389,7 +1689,7 @@ function $updateHybridization(this$static, bondIndex){ ...@@ -1389,7 +1689,7 @@ function $updateHybridization(this$static, bondIndex){
} }
} }
function Atom_0(){ function JsMolCalc$Atom_0(){
this.element = ''; this.element = '';
this.charge = 0; this.charge = 0;
this.aromatic = false; this.aromatic = false;
...@@ -1408,9 +1708,10 @@ function Atom_0(){ ...@@ -1408,9 +1708,10 @@ function Atom_0(){
this.alreadyHasOneDoubleBond = false; this.alreadyHasOneDoubleBond = false;
this.isAnAllene = false; this.isAnAllene = false;
this.currentMaxBondIndex = 0; this.currentMaxBondIndex = 0;
this.numBondsToNonHAtoms = 0;
} }
defineSeed(41, 1, makeCastMap([Q$Atom]), Atom_0); defineSeed(42, 1, makeCastMap([Q$JsMolCalc$Atom]), JsMolCalc$Atom_0);
_.alreadyHasOneDoubleBond = false; _.alreadyHasOneDoubleBond = false;
_.amide = false; _.amide = false;
_.aromatic = false; _.aromatic = false;
...@@ -1423,507 +1724,40 @@ _.element = null; ...@@ -1423,507 +1724,40 @@ _.element = null;
_.hybridization = 0; _.hybridization = 0;
_.isACarbonyl = false; _.isACarbonyl = false;
_.isAnAllene = false; _.isAnAllene = false;
_.numBondsToNonHAtoms = 0;
_.numNeighborAro = 0; _.numNeighborAro = 0;
_.numNeighborCs = 0; _.numNeighborCs = 0;
_.numNeighborHs = 0; _.numNeighborHs = 0;
_.numNeighborNAro = 0; _.numNeighborNAro = 0;
_.numNeighborPi = 0; _.numNeighborPi = 0;
_.numNeighborXs = 0; _.numNeighborXs = 0;
function AtomSpec_0(logp, type, canMakeHbonds, canMakeIonicBonds){ function JsMolCalc$AtomSpec_0(logp, type, canMakeHbonds, canMakeIonicBonds){
this.type = type; this.type = type;
this.logp = logp; this.logp = logp;
this.canMakeHbonds = canMakeHbonds; this.canMakeHbonds = canMakeHbonds;
this.canMakeIonicBonds = canMakeIonicBonds; this.canMakeIonicBonds = canMakeIonicBonds;
} }
defineSeed(42, 1, {}, AtomSpec_0); defineSeed(43, 1, {}, JsMolCalc$AtomSpec_0);
_.canMakeHbonds = false; _.canMakeHbonds = false;
_.canMakeIonicBonds = false; _.canMakeIonicBonds = false;
_.logp = 0; _.logp = 0;
_.type = null; _.type = null;
function InfoAndTargets_0(info, targets){ function JsMolCalc$InfoAndTargets_0(info){
this.info = info; this.info = info;
this.targets = targets;
} }
defineSeed(43, 1, {}, InfoAndTargets_0); defineSeed(44, 1, {}, JsMolCalc$InfoAndTargets_0);
_.info = null; _.info = null;
_.targets = null; function JsMolCalcAPI$API_0(){
function $export_0(){
if (!exported_0) {
exported_0 = true;
$export0_0();
}
}
function $export0_0(){
var pkg = declarePackage('edu.umb.bio.jsMolCalc.JsMolCalcAPI.Info');
var __0;
$wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Info = $entry(function(){
var g, j = this;
isAssignableToInstance(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Info_2_classLit, arguments)?(g = arguments[0]):arguments.length == 1 && (g = ___create(gwtInstance(arguments[0])));
j.g = g;
setWrapper(g, j);
return j;
}
);
__0 = $wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Info.prototype = new Object;
__0.toString = $entry(function(){
return this.g.toString_0();
}
);
addTypeMap(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Info_2_classLit, $wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Info);
if (pkg)
for (p in pkg)
$wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Info[p] === undefined && ($wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Info[p] = pkg[p]);
} }
function InfoExporterImpl_0(){ defineSeed(45, 1, makeCastMap([Q$Exportable]), JsMolCalcAPI$API_0);
$export_0(); function ArrayStoreException_0(){
$fillInStackTrace();
} }
function ___create(a0){ defineSeed(46, 6, makeCastMap([Q$Serializable, Q$Throwable]), ArrayStoreException_0);
return new JsMolCalcAPI$Info_0(a0);
}
defineSeed(44, 1, {}, InfoExporterImpl_0);
var exported_0 = false;
--></script>
<script><!--
function computeAndDisplay(molString, smileString, jmeString){
var atom, atomDataLines, atomLineParts, atomList, atomNumber, bondArray, bondIndex, bondLineParts, br, c, canMakeHbonds, canMakeIonicBonds, charge, chargeLineParts, cl, currentAtom, currentAtomSpec, currentNeighbor, element, errorString, f, fifthAtom, firstAtom, formula, fourthAtom, h, i, illegalAtoms, info, iodine, j, k, l, line3Parts, logp, m, molStringLines, n, neighbors, nf, numAromaticAtoms, numAtoms, numBonds, o, p_0, s, secondAtom, sixthAtom, targets, thirdAtom;
if ($equals(molString, '') || $equals(smileString, '') || $equals(jmeString, '')) {
return new InfoAndTargets_0(null, null);
}
atomDataLines = new StringBuffer_0;
atomList = new ArrayList_0;
$add_0(atomList, new Atom_0);
molStringLines = $split(molString, '\n', 0);
line3Parts = $split(molStringLines[3], '[ ]+', 0);
numAtoms = __parseAndValidateInt(line3Parts[1]);
numBonds = __parseAndValidateInt(line3Parts[2]);
for (i = 1; i < numAtoms + 1; ++i) {
atomLineParts = $split(molStringLines[i + 3], '[ ]+', 0);
element = atomLineParts[4];
atom = new Atom_0;
atom.element = element;
setCheck(atomList.array, atomList.size++, atom);
}
for (i = 0; i < molStringLines.length; ++i) {
if (molStringLines[i].indexOf('CHG') != -1) {
chargeLineParts = $split(molStringLines[i], '[ ]+', 0);
atomNumber = __parseAndValidateInt(chargeLineParts[3]);
charge = __parseAndValidateInt(chargeLineParts[4]);
atom = dynamicCast((checkIndex(atomNumber, atomList.size) , atomList.array[atomNumber]), Q$Atom);
atom.charge = charge;
}
}
bondArray = initDims([_3_3I_classLit, _3I_classLit], [makeCastMap([Q$Serializable]), makeCastMap([Q$int_$1, Q$Serializable])], [Q$int_$1, -1], [numAtoms + 1, numAtoms + 1], 2, 1);
for (i = 1; i < numAtoms + 1; ++i) {
fill(bondArray[i], bondArray[i].length);
}
for (i = 1; i < numBonds + 1; ++i) {
bondLineParts = $split(molStringLines[i + numAtoms + 3], '[ ]+', 0);
firstAtom = __parseAndValidateInt(bondLineParts[1]);
secondAtom = __parseAndValidateInt(bondLineParts[2]);
bondIndex = __parseAndValidateInt(bondLineParts[3]);
bondArray[firstAtom][secondAtom] = bondIndex;
bondArray[secondAtom][firstAtom] = bondIndex;
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
bondArray[i][j] != 0 && $updateHybridization(currentAtom, bondArray[i][j]);
}
}
for (i = 1; i < numAtoms + 1; ++i) {
firstAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
if (($equals(firstAtom.element, 'C') || $equals(firstAtom.element, 'N')) && (firstAtom.hybridization == 2 || firstAtom.aromatic)) {
for (j = 1; j < numAtoms + 1; ++j) {
secondAtom = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$Atom);
if ((bondArray[i][j] == 1 || bondArray[i][j] == 2 || secondAtom.aromatic && bondArray[i][j] != 0 || firstAtom.aromatic && bondArray[i][j] != 0) && ($equals(secondAtom.element, 'C') || $equals(secondAtom.element, 'N')) && secondAtom.hybridization == 2 && i != j) {
for (k = 1; k < numAtoms + 1; ++k) {
thirdAtom = dynamicCast((checkIndex(k, atomList.size) , atomList.array[k]), Q$Atom);
if ((bondArray[j][k] == 1 && bondArray[i][j] == 2 || bondArray[j][k] == 2 && bondArray[i][j] == 1 || thirdAtom.aromatic && bondArray[j][k] != 0 || secondAtom.aromatic && bondArray[j][k] != 0) && ($equals(thirdAtom.element, 'C') || $equals(thirdAtom.element, 'N')) && thirdAtom.hybridization == 2 && k != i && k != j) {
for (l = 1; l < numAtoms + 1; ++l) {
fourthAtom = dynamicCast((checkIndex(l, atomList.size) , atomList.array[l]), Q$Atom);
if ((bondArray[k][l] == 1 && bondArray[j][k] == 2 || bondArray[k][l] == 2 && bondArray[j][k] == 1 || fourthAtom.aromatic && bondArray[k][l] != 0 || thirdAtom.aromatic && bondArray[k][l] != 0) && ($equals(fourthAtom.element, 'C') || $equals(fourthAtom.element, 'N')) && fourthAtom.hybridization == 2 && l != i && l != j && l != k) {
for (m = 1; m < numAtoms + 1; ++m) {
fifthAtom = dynamicCast((checkIndex(m, atomList.size) , atomList.array[m]), Q$Atom);
if ((bondArray[l][m] == 1 && bondArray[k][l] == 2 || bondArray[l][m] == 2 && bondArray[k][l] == 1 || fifthAtom.aromatic && bondArray[l][m] != 0 || fourthAtom.aromatic && bondArray[l][m] != 0) && ($equals(fifthAtom.element, 'C') || $equals(fifthAtom.element, 'N')) && fifthAtom.hybridization == 2 && m != i && m != j && m != k && m != l) {
for (n = 1; n < numAtoms + 1; ++n) {
sixthAtom = dynamicCast((checkIndex(n, atomList.size) , atomList.array[n]), Q$Atom);
if ((bondArray[m][n] == 1 && bondArray[l][m] == 2 || bondArray[m][n] == 2 && bondArray[l][m] == 1 || sixthAtom.aromatic && bondArray[m][n] != 0 || fifthAtom.aromatic && bondArray[m][n] != 0) && ($equals(sixthAtom.element, 'C') || $equals(sixthAtom.element, 'N')) && sixthAtom.hybridization == 2 && n != i && n != j && n != k && n != l && n != m) {
if (bondArray[n][i] == 2 && bondArray[m][n] == 1 || bondArray[n][i] == 1 && bondArray[m][n] == 2) {
firstAtom.aromatic = true;
secondAtom.aromatic = true;
thirdAtom.aromatic = true;
fourthAtom.aromatic = true;
fifthAtom.aromatic = true;
sixthAtom.aromatic = true;
}
}
}
}
}
}
}
}
}
}
}
}
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
if (bondArray[i][j] != 0) {
currentNeighbor = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$Atom);
$processNeighbor(currentAtom, currentNeighbor.element, bondArray[i][j], currentNeighbor.aromatic);
}
}
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
if (bondArray[i][j] != 0) {
currentNeighbor = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$Atom);
if (currentNeighbor.hybridization < 3) {
for (k = 1; k < numAtoms + 1; ++k) {
bondArray[j][k] > 1 && k != i && ++currentAtom.numNeighborPi;
}
}
}
}
}
h = 0;
charge = 0;
for (i = 1; i < numAtoms + 1; ++i) {
atom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
$getNumNeighborHs(atom);
h = h + atom.numNeighborHs;
charge = charge + atom.charge;
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
if (bondArray[i][j] != 0) {
currentNeighbor = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$Atom);
$equals(currentAtom.element, 'N') && currentNeighbor.isACarbonyl && (currentAtom.amide = true);
}
}
}
illegalAtoms = new StringBuffer_0;
for (i = 1; i < numAtoms + 1; ++i) {
atom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
$equals(atom.element, 'C') && atom.charge != 0 && ($append(illegalAtoms.data, 'A Charged C atom.<br>') , illegalAtoms);
if ($equals(atom.element, 'N')) {
atom.charge > 1 && ($append(illegalAtoms.data, 'An N atom with too high + charge.<br>') , illegalAtoms);
atom.charge < 0 && ($append(illegalAtoms.data, 'An N atom with - charge.<br>') , illegalAtoms);
$getNumNeighborHs(atom) < 0 && !($equals(atom.doubleBondedNeighbor, 'O2') && $getNumNeighborHs(atom) == -2 && atom.numNeighborCs == 1 && atom.numNeighborXs == 2 && atom.charge == 0) && ($append(illegalAtoms.data, 'An N atom making too many bonds.<br>') , illegalAtoms);
}
if ($equals(atom.element, 'O')) {
atom.charge < -1 && ($append(illegalAtoms.data, 'An O atom with too high - charge.<br>') , illegalAtoms);
atom.charge > 0 && ($append(illegalAtoms.data, 'An O atom with + charge.<br>') , illegalAtoms);
}
if ($equals(atom.element, 'S')) {
atom.charge > 0 && ($append(illegalAtoms.data, 'An S atom with a + charge.<br>') , illegalAtoms);
$getNumNeighborHs(atom) < 0 && $getNumNeighborHs(atom) != -4 && $getNumNeighborHs(atom) != -2 && ($append(illegalAtoms.data, 'An S atom not making 2, 4, or 6 bonds.<br>') , illegalAtoms);
}
if ($equals(atom.element, 'P')) {
atom.charge != 0 && ($append(illegalAtoms.data, 'A Charged P atom.<br>') , illegalAtoms);
atom.numNeighborHs != -3 && ($append(illegalAtoms.data, 'A P atom not making 5 bonds.<br>') , illegalAtoms);
}
($equals(atom.element, 'F') || $equals(atom.element, 'Cl') || $equals(atom.element, 'Br') || $equals(atom.element, 'I')) && atom.charge != 0 && $append_0(illegalAtoms, 'A Charged ' + atom.element + ' atom.<br>');
$equals(atom.element, 'X') && ($append(illegalAtoms.data, 'An X atom.<br>') , illegalAtoms);
}
errorString = '';
$toString(illegalAtoms.data).length != 0 && (errorString = '<html><body>It is not possible to calculate logp<br>for your molecule because it contains:<br>' + $toString(illegalAtoms.data) + '<\/body><\/html>');
logp = 0;
canMakeHbonds = false;
canMakeIonicBonds = false;
if ($toString(illegalAtoms.data).length == 0) {
nf = ($clinit_NumberFormat() , new NumberFormat_1($getDefaultNative()));
for (i = 1; i < numAtoms + 1; ++i) {
atom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
currentAtomSpec = $getAtomSpec(atom);
logp = logp + currentAtomSpec.logp;
canMakeHbonds = canMakeHbonds || currentAtomSpec.canMakeHbonds;
canMakeIonicBonds = canMakeIonicBonds || currentAtomSpec.canMakeIonicBonds;
neighbors = new StringBuffer_0;
for (j = 1; j < numAtoms + 1; ++j) {
bondArray[i][j] != 0 && ($append(neighbors.data, j + ' ') , neighbors);
}
$append_0(atomDataLines, i + ' ' + currentAtomSpec.type + '; bonded to: ' + $toString(neighbors.data) + '; logp= ' + $format(nf, currentAtomSpec.logp) + '; H-bonds: ' + currentAtomSpec.canMakeHbonds + '; ionic bonds: ' + currentAtomSpec.canMakeIonicBonds + '\n');
}
}
numBonds = 0;
numAromaticAtoms = 0;
c = 0;
n = 0;
o = 0;
s = 0;
p_0 = 0;
cl = 0;
br = 0;
f = 0;
iodine = 0;
formula = new StringBuffer_0;
for (i = 0; i < smileString.length; ++i) {
switch (smileString.charCodeAt(i)) {
case 67:
++c;
break;
case 78:
++n;
break;
case 79:
++o;
break;
case 83:
++s;
break;
case 80:
++p_0;
break;
case 108:
--c;
++cl;
break;
case 66:
++br;
break;
case 70:
++f;
break;
case 73:
++iodine;
break;
case 99:
++c;
++numAromaticAtoms;
break;
case 110:
++n;
++numAromaticAtoms;
break;
case 115:
++s;
++numAromaticAtoms;
break;
case 111:
++o;
++numAromaticAtoms;
break;
case 35:
++numBonds;
case 61:
++numBonds;
}
}
prettyPrint('C', c, formula);
prettyPrint('H', h, formula);
prettyPrint('N', n, formula);
prettyPrint('O', o, formula);
prettyPrint('P', p_0, formula);
prettyPrint('S', s, formula);
prettyPrint('Cl', cl, formula);
prettyPrint('Br', br, formula);
prettyPrint('F', f, formula);
prettyPrint('I', iodine, formula);
if (charge != 0) {
$append(formula.data, '(');
charge == -1?($append(formula.data, '-') , formula):charge > 0 && ($append(formula.data, '+') , formula);
(charge < 0?-charge:charge) != 1 && ($append(formula.data, '' + charge) , formula);
$append(formula.data, ')');
}
'Formula: ' + $toString(formula.data);
$equals(errorString, '')?(info = new MoleculeInfo_0(canMakeHbonds, canMakeIonicBonds, logp, null)):(info = new MoleculeInfo_0(false, false, 0, errorString));
targets = initDim(_3Ledu_umb_bio_jsMolCalc_client_Target_2_classLit, makeCastMap([Q$Serializable]), Q$Target, 4, 0);
if ($equals(errorString, '')) {
canMakeHbonds?(targets[0] = new Target_1(1)):(targets[0] = new Target_1(2));
canMakeIonicBonds?(targets[1] = new Target_1(3)):(targets[1] = new Target_1(4));
targets[2] = new Target_0(logp - 1.5, logp - 0.5);
targets[3] = new Target_0(logp + 0.5, logp + 1.5);
}
return new InfoAndTargets_0(info, targets);
}
function prettyPrint(atomLabel, number, outString){
if (number == 0) {
return;
}
$append(outString.data, atomLabel);
if (number == 1) {
$append(outString.data, ' ');
return;
}
$append(outString.data, '<sub>' + number + '<\/sub> ');
}
function JsMolCalcAPI$API_0(){
}
function getTasks(mol, smile, jme){
var i, length_0, result, tasks;
result = computeAndDisplay(mol, smile, jme);
length_0 = result.targets.length;
tasks = initDim(_3Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Task_2_classLit, makeCastMap([Q$Serializable]), Q$JsMolCalcAPI$Task, length_0, 0);
for (i = 0; i < length_0; ++i) {
tasks[i] = new JsMolCalcAPI$Task_0(result.targets[i]);
}
return tasks;
}
defineSeed(46, 1, makeCastMap([Q$Exportable]), JsMolCalcAPI$API_0);
function JsMolCalcAPI$Info_0(info){
this._info = info;
}
defineSeed(47, 1, makeCastMap([Q$Exportable]), JsMolCalcAPI$Info_0);
_.toString_0 = function toString_0(){
return $toString_0(this._info);
}
;
_._info = null;
function JsMolCalcAPI$Task_0(target){
this._target = target;
}
defineSeed(48, 1, makeCastMap([Q$JsMolCalcAPI$Task, Q$Exportable]), JsMolCalcAPI$Task_0);
_.check_0 = function check(info){
return $isCorrect(this._target, info._info)?'correct':'incorrect';
}
;
_.toString_0 = function toString_1(){
return $toString_1(this._target);
}
;
_._target = null;
function $toString_0(this$static){
var b, nf;
nf = ($clinit_NumberFormat() , new NumberFormat_1($getDefaultNative()));
b = new StringBuffer_0;
if (this$static.errorString != null) {
$append_0(b, this$static.errorString);
}
else {
this$static.phobicity < 0?$append_0(b, '<font color=green>Hydrophobicity index = ' + $format(nf, this$static.phobicity) + '<\/font><br>'):$append_0(b, '<font color=red>Hydrophobicity index = ' + $format(nf, this$static.phobicity) + '<\/font><br>');
this$static.canMakeHBonds?($append(b.data, '<font color=green>Can Make Strong Hydrogen Bonds<\/font><br>') , b):($append(b.data, '<font color=red>Can not Make Strong Hydrogen Bonds<\/font><br>') , b);
this$static.canMakeIonicBonds?($append(b.data, '<font color=green>Can Make Ionic Bonds<\/font><br>') , b):($append(b.data, '<font color=red>Can not Make Ionic Bonds<\/font><br>') , b);
}
return $toString(b.data);
}
function MoleculeInfo_0(hBonds, iBonds, phobicity, errorString){
this.canMakeHBonds = hBonds;
this.canMakeIonicBonds = iBonds;
this.phobicity = phobicity;
this.errorString = errorString;
}
defineSeed(49, 1, {}, MoleculeInfo_0);
_.canMakeHBonds = false;
_.canMakeIonicBonds = false;
_.errorString = null;
_.phobicity = 0;
function $isCorrect(this$static, info){
switch (this$static.type) {
case 0:
return info.phobicity > this$static.loPhobicLimit && info.phobicity < this$static.hiPhobicLimit;
case 1:
return !info.canMakeHBonds;
case 2:
return info.canMakeHBonds;
case 3:
return !info.canMakeIonicBonds;
case 4:
return info.canMakeIonicBonds;
default:return false;
}
}
function $toString_1(this$static){
var nf;
switch (this$static.type) {
case 0:
nf = ($clinit_NumberFormat() , new NumberFormat_1($getDefaultNative()));
return 'Has a relative hydrophobicity betweeen ' + $format(nf, this$static.loPhobicLimit) + ' and ' + $format(nf, this$static.hiPhobicLimit);
case 1:
return 'Can not make strong Hydrogen Bonds';
case 2:
return 'Can make strong Hydrogen Bonds';
case 3:
return 'Can not make Ionic Bonds';
case 4:
return 'Can make Ionic Bonds';
default:return 'Error in setting target type';
}
}
function Target_0(loPhobicLimit, hiPhobicLimit){
this.type = 0;
this.loPhobicLimit = loPhobicLimit;
this.hiPhobicLimit = hiPhobicLimit;
}
function Target_1(type){
this.type = type;
}
defineSeed(50, 1, makeCastMap([Q$Target]), Target_0, Target_1);
_.hiPhobicLimit = 0;
_.loPhobicLimit = 0;
_.type = 0;
function $export_1(){
if (!exported_1) {
exported_1 = true;
new InfoExporterImpl_0;
$export0_1();
}
}
function $export0_1(){
var pkg = declarePackage('edu.umb.bio.jsMolCalc.JsMolCalcAPI.Task');
var __0;
$wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Task = $entry(function(){
var g, j = this;
isAssignableToInstance(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Task_2_classLit, arguments)?(g = arguments[0]):arguments.length == 1 && (g = ___create_0(gwtInstance(arguments[0])));
j.g = g;
setWrapper(g, j);
return j;
}
);
__0 = $wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Task.prototype = new Object;
__0.check = $entry(function(a0){
return this.g.check_0(a0.g);
}
);
__0.toString = $entry(function(){
return this.g.toString_0();
}
);
addTypeMap(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Task_2_classLit, $wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Task);
if (pkg)
for (p in pkg)
$wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Task[p] === undefined && ($wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Task[p] = pkg[p]);
}
function TaskExporterImpl_0(){
$export_1();
}
function ___create_0(a0){
return new JsMolCalcAPI$Task_0(a0);
}
defineSeed(51, 1, {}, TaskExporterImpl_0);
var exported_1 = false;
function ArrayStoreException_0(){
$fillInStackTrace();
}
defineSeed(52, 6, makeCastMap([Q$Serializable, Q$Throwable]), ArrayStoreException_0);
function digit_0(c){ function digit_0(c){
if (c >= 48 && c < 58) { if (c >= 48 && c < 58) {
return c - 48; return c - 48;
...@@ -1944,7 +1778,6 @@ function createForArray(packageName, className, seedId){ ...@@ -1944,7 +1778,6 @@ function createForArray(packageName, className, seedId){
var clazz; var clazz;
clazz = new Class_0; clazz = new Class_0;
isInstantiable(seedId != 0?-seedId:0) && setClassLiteral(seedId != 0?-seedId:0, clazz); isInstantiable(seedId != 0?-seedId:0) && setClassLiteral(seedId != 0?-seedId:0, clazz);
clazz.modifiers = 4;
clazz.superclass = Ljava_lang_Object_2_classLit; clazz.superclass = Ljava_lang_Object_2_classLit;
return clazz; return clazz;
} }
...@@ -1961,7 +1794,6 @@ function createForInterface(packageName, className){ ...@@ -1961,7 +1794,6 @@ function createForInterface(packageName, className){
var clazz; var clazz;
clazz = new Class_0; clazz = new Class_0;
isInstantiable(0) && setClassLiteral(0, clazz); isInstantiable(0) && setClassLiteral(0, clazz);
clazz.modifiers = 2;
return clazz; return clazz;
} }
...@@ -2002,15 +1834,14 @@ function setClassLiteral(seedId, clazz){ ...@@ -2002,15 +1834,14 @@ function setClassLiteral(seedId, clazz){
proto.___clazz$ = clazz; proto.___clazz$ = clazz;
} }
defineSeed(54, 1, {}, Class_0); defineSeed(48, 1, {}, Class_0);
_.modifiers = 0;
_.seedId = 0; _.seedId = 0;
_.superclass = null; _.superclass = null;
function ClassCastException_0(){ function ClassCastException_0(){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(55, 6, makeCastMap([Q$Serializable, Q$Throwable]), ClassCastException_0); defineSeed(49, 6, makeCastMap([Q$Serializable, Q$Throwable]), ClassCastException_0);
function __parseAndValidateInt(s){ function __parseAndValidateInt(s){
var i, length_0, startIndex, toReturn; var i, length_0, startIndex, toReturn;
if (s == null) { if (s == null) {
...@@ -2037,26 +1868,26 @@ function IllegalArgumentException_0(message){ ...@@ -2037,26 +1868,26 @@ function IllegalArgumentException_0(message){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(58, 6, makeCastMap([Q$Serializable, Q$Throwable]), IllegalArgumentException_0); defineSeed(52, 6, makeCastMap([Q$Serializable, Q$Throwable]), IllegalArgumentException_0);
function IndexOutOfBoundsException_0(message){ function IndexOutOfBoundsException_0(message){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(59, 6, makeCastMap([Q$Serializable, Q$Throwable]), IndexOutOfBoundsException_0); defineSeed(53, 6, makeCastMap([Q$Serializable, Q$Throwable]), IndexOutOfBoundsException_0);
function NullPointerException_0(){ function NullPointerException_0(){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(60, 6, makeCastMap([Q$Serializable, Q$Throwable]), NullPointerException_0); defineSeed(54, 6, makeCastMap([Q$Serializable, Q$Throwable]), NullPointerException_0);
function NumberFormatException_0(message){ function NumberFormatException_0(message){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(61, 58, makeCastMap([Q$Serializable, Q$Throwable]), NumberFormatException_0); defineSeed(55, 52, makeCastMap([Q$Serializable, Q$Throwable]), NumberFormatException_0);
function StackTraceElement_0(methodName){ function StackTraceElement_0(methodName){
} }
defineSeed(62, 1, makeCastMap([Q$Serializable, Q$StackTraceElement]), StackTraceElement_0); defineSeed(56, 1, makeCastMap([Q$Serializable, Q$StackTraceElement]), StackTraceElement_0);
function $charAt(this$static, index){ function $charAt(this$static, index){
return this$static.charCodeAt(index); return this$static.charCodeAt(index);
} }
...@@ -2191,16 +2022,15 @@ function $append_0(this$static, x){ ...@@ -2191,16 +2022,15 @@ function $append_0(this$static, x){
return this$static; return this$static;
} }
function $replace_0(this$static, end){ function $delete(this$static, end){
$replace(this$static.data, 0, end, ''); return $replace(this$static.data, 0, end, '') , this$static;
return this$static;
} }
function StringBuffer_0(){ function StringBuffer_0(){
this.data = $createData(); this.data = $createData();
} }
defineSeed(64, 1, makeCastMap([Q$CharSequence]), StringBuffer_0); defineSeed(58, 1, makeCastMap([Q$CharSequence]), StringBuffer_0);
function $append_1(this$static, x){ function $append_1(this$static, x){
$append(this$static.data, x); $append(this$static.data, x);
return this$static; return this$static;
...@@ -2210,7 +2040,7 @@ function $charAt_0(this$static, index){ ...@@ -2210,7 +2040,7 @@ function $charAt_0(this$static, index){
return $charAt($toString(this$static.data), index); return $charAt($toString(this$static.data), index);
} }
function $delete(this$static, start, end){ function $delete_0(this$static, start, end){
return $replace(this$static.data, start, end, '') , this$static; return $replace(this$static.data, start, end, '') , this$static;
} }
...@@ -2218,25 +2048,25 @@ function $insert(this$static, index, x){ ...@@ -2218,25 +2048,25 @@ function $insert(this$static, index, x){
return $replace(this$static.data, index, index, x) , this$static; return $replace(this$static.data, index, index, x) , this$static;
} }
function $replace_1(this$static, start, end, toInsert){ function $replace_0(this$static, start, end, toInsert){
$replace(this$static.data, start, end, toInsert); $replace(this$static.data, start, end, toInsert);
return this$static; return this$static;
} }
function $setCharAt(this$static, index, x){ function $setCharAt(this$static, index, x){
$replace_1(this$static, index, index + 1, String.fromCharCode(x)); $replace_0(this$static, index, index + 1, String.fromCharCode(x));
} }
function StringBuilder_0(){ function StringBuilder_0(){
this.data = $createData(); this.data = $createData();
} }
defineSeed(65, 1, makeCastMap([Q$CharSequence]), StringBuilder_0); defineSeed(59, 1, makeCastMap([Q$CharSequence]), StringBuilder_0);
function UnsupportedOperationException_0(){ function UnsupportedOperationException_0(){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(66, 6, makeCastMap([Q$Serializable, Q$Throwable]), UnsupportedOperationException_0); defineSeed(60, 6, makeCastMap([Q$Serializable, Q$Throwable]), UnsupportedOperationException_0);
function $advanceToFind(iter, o){ function $advanceToFind(iter, o){
var t; var t;
while (iter.hasNext()) { while (iter.hasNext()) {
...@@ -2248,7 +2078,7 @@ function $advanceToFind(iter, o){ ...@@ -2248,7 +2078,7 @@ function $advanceToFind(iter, o){
return null; return null;
} }
defineSeed(67, 1, {}); defineSeed(61, 1, {});
_.add = function add(o){ _.add = function add(o){
throw new UnsupportedOperationException_0; throw new UnsupportedOperationException_0;
} }
...@@ -2259,7 +2089,9 @@ _.contains = function contains(o){ ...@@ -2259,7 +2089,9 @@ _.contains = function contains(o){
return !!iter; return !!iter;
} }
; ;
defineSeed(69, 1, makeCastMap([Q$Map])); defineSeed(63, 1, makeCastMap([Q$Map]));
--></script>
<script><!--
_.equals$ = function equals_1(obj){ _.equals$ = function equals_1(obj){
var entry, entry$iterator, otherKey, otherMap, otherValue; var entry, entry$iterator, otherKey, otherMap, otherValue;
if (obj === this) { if (obj === this) {
...@@ -2360,8 +2192,6 @@ function $hasHashValue(this$static, key, hashCode){ ...@@ -2360,8 +2192,6 @@ function $hasHashValue(this$static, key, hashCode){
return false; return false;
} }
--></script>
<script><!--
function $hasStringValue(this$static, key){ function $hasStringValue(this$static, key){
return ':' + key in this$static.stringMap; return ':' + key in this$static.stringMap;
} }
...@@ -2411,7 +2241,7 @@ function $putStringValue(this$static, key, value){ ...@@ -2411,7 +2241,7 @@ function $putStringValue(this$static, key, value){
return result; return result;
} }
defineSeed(68, 69, makeCastMap([Q$Map])); defineSeed(62, 63, makeCastMap([Q$Map]));
_.equalsBridge = function equalsBridge(value1, value2){ _.equalsBridge = function equalsBridge(value1, value2){
return maskUndefined(value1) === maskUndefined(value2) || value1 != null && equals__devirtual$(value1, value2); return maskUndefined(value1) === maskUndefined(value2) || value1 != null && equals__devirtual$(value1, value2);
} }
...@@ -2421,7 +2251,7 @@ _.nullSlot = null; ...@@ -2421,7 +2251,7 @@ _.nullSlot = null;
_.nullSlotLive = false; _.nullSlotLive = false;
_.size = 0; _.size = 0;
_.stringMap = null; _.stringMap = null;
defineSeed(71, 67, makeCastMap([Q$Set])); defineSeed(65, 61, makeCastMap([Q$Set]));
_.equals$ = function equals_2(o){ _.equals$ = function equals_2(o){
var iter, other, otherItem; var iter, other, otherItem;
if (o === this) { if (o === this) {
...@@ -2460,7 +2290,7 @@ function AbstractHashMap$EntrySet_0(this$0){ ...@@ -2460,7 +2290,7 @@ function AbstractHashMap$EntrySet_0(this$0){
this.this$0 = this$0; this.this$0 = this$0;
} }
defineSeed(70, 71, makeCastMap([Q$Set]), AbstractHashMap$EntrySet_0); defineSeed(64, 65, makeCastMap([Q$Set]), AbstractHashMap$EntrySet_0);
_.contains = function contains_0(o){ _.contains = function contains_0(o){
var entry, key, value; var entry, key, value;
if (instanceOf(o, Q$Map$Entry)) { if (instanceOf(o, Q$Map$Entry)) {
...@@ -2492,7 +2322,7 @@ function AbstractHashMap$EntrySetIterator_0(this$0){ ...@@ -2492,7 +2322,7 @@ function AbstractHashMap$EntrySetIterator_0(this$0){
this.iter = new AbstractList$IteratorImpl_0(list); this.iter = new AbstractList$IteratorImpl_0(list);
} }
defineSeed(72, 1, {}, AbstractHashMap$EntrySetIterator_0); defineSeed(66, 1, {}, AbstractHashMap$EntrySetIterator_0);
_.hasNext = function hasNext(){ _.hasNext = function hasNext(){
return $hasNext(this.iter); return $hasNext(this.iter);
} }
...@@ -2502,7 +2332,7 @@ _.next = function next_0(){ ...@@ -2502,7 +2332,7 @@ _.next = function next_0(){
} }
; ;
_.iter = null; _.iter = null;
defineSeed(74, 1, makeCastMap([Q$Map$Entry])); defineSeed(68, 1, makeCastMap([Q$Map$Entry]));
_.equals$ = function equals_3(other){ _.equals$ = function equals_3(other){
var entry; var entry;
if (instanceOf(other, Q$Map$Entry)) { if (instanceOf(other, Q$Map$Entry)) {
...@@ -2527,7 +2357,7 @@ function AbstractHashMap$MapEntryNull_0(this$0){ ...@@ -2527,7 +2357,7 @@ function AbstractHashMap$MapEntryNull_0(this$0){
this.this$0 = this$0; this.this$0 = this$0;
} }
defineSeed(73, 74, makeCastMap([Q$Map$Entry]), AbstractHashMap$MapEntryNull_0); defineSeed(67, 68, makeCastMap([Q$Map$Entry]), AbstractHashMap$MapEntryNull_0);
_.getKey = function getKey(){ _.getKey = function getKey(){
return null; return null;
} }
...@@ -2546,7 +2376,7 @@ function AbstractHashMap$MapEntryString_0(this$0, key){ ...@@ -2546,7 +2376,7 @@ function AbstractHashMap$MapEntryString_0(this$0, key){
this.key = key; this.key = key;
} }
defineSeed(75, 74, makeCastMap([Q$Map$Entry]), AbstractHashMap$MapEntryString_0); defineSeed(69, 68, makeCastMap([Q$Map$Entry]), AbstractHashMap$MapEntryString_0);
_.getKey = function getKey_0(){ _.getKey = function getKey_0(){
return this.key; return this.key;
} }
...@@ -2569,7 +2399,7 @@ function indexOutOfBounds(index, size){ ...@@ -2569,7 +2399,7 @@ function indexOutOfBounds(index, size){
throw new IndexOutOfBoundsException_0('Index: ' + index + ', Size: ' + size); throw new IndexOutOfBoundsException_0('Index: ' + index + ', Size: ' + size);
} }
defineSeed(76, 67, makeCastMap([Q$List])); defineSeed(70, 61, makeCastMap([Q$List]));
_.add = function add_0(obj){ _.add = function add_0(obj){
$add(this, this.size_0(), obj); $add(this, this.size_0(), obj);
return true; return true;
...@@ -2630,7 +2460,7 @@ function AbstractList$IteratorImpl_0(this$0){ ...@@ -2630,7 +2460,7 @@ function AbstractList$IteratorImpl_0(this$0){
this.this$0 = this$0; this.this$0 = this$0;
} }
defineSeed(77, 1, {}, AbstractList$IteratorImpl_0); defineSeed(71, 1, {}, AbstractList$IteratorImpl_0);
_.hasNext = function hasNext_0(){ _.hasNext = function hasNext_0(){
return $hasNext(this); return $hasNext(this);
} }
...@@ -2674,7 +2504,7 @@ function splice(array, index, deleteCount, value){ ...@@ -2674,7 +2504,7 @@ function splice(array, index, deleteCount, value){
array.splice(index, deleteCount, value); array.splice(index, deleteCount, value);
} }
defineSeed(78, 76, makeCastMap([Q$Serializable, Q$List]), ArrayList_0); defineSeed(72, 70, makeCastMap([Q$Serializable, Q$List]), ArrayList_0);
_.add = function add_1(o){ _.add = function add_1(o){
return $add_0(this, o); return $add_0(this, o);
} }
...@@ -2707,13 +2537,13 @@ function HashMap_0(){ ...@@ -2707,13 +2537,13 @@ function HashMap_0(){
this.size = 0; this.size = 0;
} }
defineSeed(80, 68, makeCastMap([Q$Serializable, Q$Map]), HashMap_0); defineSeed(74, 62, makeCastMap([Q$Serializable, Q$Map]), HashMap_0);
function MapEntryImpl_0(key, value){ function MapEntryImpl_0(key, value){
this.key = key; this.key = key;
this.value = value; this.value = value;
} }
defineSeed(81, 74, makeCastMap([Q$Map$Entry]), MapEntryImpl_0); defineSeed(75, 68, makeCastMap([Q$Map$Entry]), MapEntryImpl_0);
_.getKey = function getKey_1(){ _.getKey = function getKey_1(){
return this.key; return this.key;
} }
...@@ -2735,7 +2565,7 @@ function NoSuchElementException_0(){ ...@@ -2735,7 +2565,7 @@ function NoSuchElementException_0(){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(82, 6, makeCastMap([Q$Serializable, Q$Throwable]), NoSuchElementException_0); defineSeed(76, 6, makeCastMap([Q$Serializable, Q$Throwable]), NoSuchElementException_0);
function equalsWithNullCheck(a, b){ function equalsWithNullCheck(a, b){
return maskUndefined(a) === maskUndefined(b) || a != null && equals__devirtual$(a, b); return maskUndefined(a) === maskUndefined(b) || a != null && equals__devirtual$(a, b);
} }
...@@ -2744,8 +2574,8 @@ function ExportAllExporterImpl_0(){ ...@@ -2744,8 +2574,8 @@ function ExportAllExporterImpl_0(){
new APIExporterImpl_0; new APIExporterImpl_0;
} }
defineSeed(84, 1, {}, ExportAllExporterImpl_0); defineSeed(78, 1, {}, ExportAllExporterImpl_0);
defineSeed(86, 1, {}); defineSeed(80, 1, {});
function $addTypeMap(this$static, type, exportedConstructor){ function $addTypeMap(this$static, type, exportedConstructor){
$put(this$static.typeMap, type, exportedConstructor); $put(this$static.typeMap, type, exportedConstructor);
} }
...@@ -2765,59 +2595,14 @@ function $declarePackage(qualifiedExportName){ ...@@ -2765,59 +2595,14 @@ function $declarePackage(qualifiedExportName){
return o; return o;
} }
function $setWrapper(this$static, type){
var cons, wrapper;
if ((getClass__devirtual$(type).modifiers & 4) != 0) {
return [];
}
cons = $typeConstructor(this$static, getClass__devirtual$(type));
wrapper = cons && typeof cons == 'function'?new cons(type):type;
type['__gwtex_wrap'] = wrapper;
return wrapper;
}
function $typeConstructor(this$static, type){
var o, sup;
o = $get(this$static.typeMap, type);
sup = type.superclass;
if (o == null && !!sup && sup != Ljava_lang_Object_2_classLit) {
return $typeConstructor(this$static, sup);
}
return dynamicCastJso(o);
}
function $wrap(this$static, type){
var wrapper;
if (type == null) {
return null;
}
return wrapper = type['__gwtex_wrap'] , !wrapper && (wrapper = $setWrapper(this$static, type)) , wrapper;
}
function $wrap_0(this$static, type){
var i, wrapperArray;
if (type == null) {
return null;
}
wrapperArray = [];
for (i = 0; i < type.length; ++i) {
wrapperArray[i] = $wrap(this$static, type[i]);
}
return wrapperArray;
}
function ExporterBaseActual_0(){ function ExporterBaseActual_0(){
this.typeMap = new HashMap_0; this.typeMap = new HashMap_0;
new HashMap_0; new HashMap_0;
new HashMap_0; new HashMap_0;
} }
function getGwtInstance(o){
return o && o.g?o.g:null;
}
function isAssignableToClass(o, clazz){ function isAssignableToClass(o, clazz){
var sup; var sup, maybeJsoInvocation;
if (Ljava_lang_Object_2_classLit == clazz) { if (Ljava_lang_Object_2_classLit == clazz) {
return true; return true;
} }
...@@ -2825,7 +2610,7 @@ function isAssignableToClass(o, clazz){ ...@@ -2825,7 +2610,7 @@ function isAssignableToClass(o, clazz){
return true; return true;
} }
if (o != null) { if (o != null) {
for (sup = getClass__devirtual$(o); !!sup && sup != Ljava_lang_Object_2_classLit; sup = sup.superclass) { for (sup = (maybeJsoInvocation = o , isJavaObject(maybeJsoInvocation)?maybeJsoInvocation.___clazz$:Lcom_google_gwt_core_client_JavaScriptObject_2_classLit); !!sup && sup != Ljava_lang_Object_2_classLit; sup = sup.superclass) {
if (sup == clazz) { if (sup == clazz) {
return true; return true;
} }
...@@ -2834,7 +2619,7 @@ function isAssignableToClass(o, clazz){ ...@@ -2834,7 +2619,7 @@ function isAssignableToClass(o, clazz){
return false; return false;
} }
defineSeed(85, 86, {}, ExporterBaseActual_0); defineSeed(79, 80, {}, ExporterBaseActual_0);
function $clinit_ExporterUtil(){ function $clinit_ExporterUtil(){
$clinit_ExporterUtil = nullMethod; $clinit_ExporterUtil = nullMethod;
impl = new ExporterBaseActual_0; impl = new ExporterBaseActual_0;
...@@ -2845,38 +2630,12 @@ function addTypeMap(type, exportedConstructor){ ...@@ -2845,38 +2630,12 @@ function addTypeMap(type, exportedConstructor){
$addTypeMap(impl, type, exportedConstructor); $addTypeMap(impl, type, exportedConstructor);
} }
function declarePackage(qualifiedExportName){
$clinit_ExporterUtil();
return $declarePackage(qualifiedExportName);
}
function gwtInstance(o){
var g;
$clinit_ExporterUtil();
return o != null && instanceOfJso(o) && (g = getGwtInstance(dynamicCastJso(o))) != null?g:o;
}
function isAssignableToInstance(clazz, args){ function isAssignableToInstance(clazz, args){
var o; var o;
$clinit_ExporterUtil(); $clinit_ExporterUtil();
return o = args && args[0] && (typeof args[0] == 'object' || typeof args[0] == 'function')?args[0]:null , isAssignableToClass(o, clazz); return o = args && args[0] && (typeof args[0] == 'object' || typeof args[0] == 'function')?args[0]:null , isAssignableToClass(o, clazz);
} }
function setWrapper(instance, wrapper){
$clinit_ExporterUtil();
instance['__gwtex_wrap'] = wrapper;
}
function wrap(type){
$clinit_ExporterUtil();
return $wrap(impl, type);
}
function wrap_0(type){
$clinit_ExporterUtil();
return $wrap_0(impl, type);
}
var impl; var impl;
var $entry = entry_0; var $entry = entry_0;
function gwtOnLoad(errFn, modName, modBase, softPermutationId){ function gwtOnLoad(errFn, modName, modBase, softPermutationId){
...@@ -2894,7 +2653,7 @@ function gwtOnLoad(errFn, modName, modBase, softPermutationId){ ...@@ -2894,7 +2653,7 @@ function gwtOnLoad(errFn, modName, modBase, softPermutationId){
} }
} }
var Ljava_lang_Object_2_classLit = createForClass('java.lang.', 'Object', 1, null), Lcom_google_gwt_core_client_JavaScriptObject_2_classLit = createForClass('com.google.gwt.core.client.', 'JavaScriptObject$', 9, Ljava_lang_Object_2_classLit), _3I_classLit = createForArray('', '[I', 94), _3Ljava_lang_Object_2_classLit = createForArray('[Ljava.lang.', 'Object;', 92), Ljava_lang_Throwable_2_classLit = createForClass('java.lang.', 'Throwable', 8, Ljava_lang_Object_2_classLit), Ljava_lang_Exception_2_classLit = createForClass('java.lang.', 'Exception', 7, Ljava_lang_Throwable_2_classLit), Ljava_lang_RuntimeException_2_classLit = createForClass('java.lang.', 'RuntimeException', 6, Ljava_lang_Exception_2_classLit), Ljava_lang_StackTraceElement_2_classLit = createForClass('java.lang.', 'StackTraceElement', 62, Ljava_lang_Object_2_classLit), _3Ljava_lang_StackTraceElement_2_classLit = createForArray('[Ljava.lang.', 'StackTraceElement;', 95), Lcom_google_gwt_lang_SeedUtil_2_classLit = createForClass('com.google.gwt.lang.', 'SeedUtil', 34, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Info_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalcAPI$Info', 47, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Task_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalcAPI$Task', 48, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$API_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalcAPI$API', 46, Ljava_lang_Object_2_classLit), _3Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Task_2_classLit = createForArray('[Ledu.umb.bio.jsMolCalc.client.', 'JsMolCalcAPI$Task;', 96), Ljava_lang_Class_2_classLit = createForClass('java.lang.', 'Class', 54, Ljava_lang_Object_2_classLit), Ljava_lang_String_2_classLit = createForClass('java.lang.', 'String', 2, Ljava_lang_Object_2_classLit), _3Ljava_lang_String_2_classLit = createForArray('[Ljava.lang.', 'String;', 93), Ljava_lang_ClassCastException_2_classLit = createForClass('java.lang.', 'ClassCastException', 55, Ljava_lang_RuntimeException_2_classLit), Ljava_lang_StringBuilder_2_classLit = createForClass('java.lang.', 'StringBuilder', 65, Ljava_lang_Object_2_classLit), Ljava_lang_ArrayStoreException_2_classLit = createForClass('java.lang.', 'ArrayStoreException', 52, Ljava_lang_RuntimeException_2_classLit), Lcom_google_gwt_core_client_JavaScriptException_2_classLit = createForClass('com.google.gwt.core.client.', 'JavaScriptException', 5, Ljava_lang_RuntimeException_2_classLit), Ledu_umb_bio_jsMolCalc_client_TaskExporterImpl_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'TaskExporterImpl', 51, Ljava_lang_Object_2_classLit), Lorg_timepedia_exporter_client_ExporterBaseImpl_2_classLit = createForClass('org.timepedia.exporter.client.', 'ExporterBaseImpl', 86, Ljava_lang_Object_2_classLit), Lorg_timepedia_exporter_client_ExporterBaseActual_2_classLit = createForClass('org.timepedia.exporter.client.', 'ExporterBaseActual', 85, Lorg_timepedia_exporter_client_ExporterBaseImpl_2_classLit), Lorg_timepedia_exporter_client_Exportable_2_classLit = createForInterface('org.timepedia.exporter.client.', 'Exportable'), Lorg_timepedia_exporter_client_ExportAllExporterImpl_2_classLit = createForClass('org.timepedia.exporter.client.', 'ExportAllExporterImpl', 84, Ljava_lang_Object_2_classLit), Lcom_google_gwt_core_client_impl_StackTraceCreator$Collector_2_classLit = createForClass('com.google.gwt.core.client.impl.', 'StackTraceCreator$Collector', 17, Ljava_lang_Object_2_classLit), Lcom_google_gwt_core_client_Scheduler_2_classLit = createForClass('com.google.gwt.core.client.', 'Scheduler', 12, Ljava_lang_Object_2_classLit), Lcom_google_gwt_core_client_impl_SchedulerImpl_2_classLit = createForClass('com.google.gwt.core.client.impl.', 'SchedulerImpl', 14, Lcom_google_gwt_core_client_Scheduler_2_classLit), Ledu_umb_bio_jsMolCalc_client_InfoExporterImpl_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'InfoExporterImpl', 44, Ljava_lang_Object_2_classLit), Ljava_util_AbstractMap_2_classLit = createForClass('java.util.', 'AbstractMap', 69, Ljava_lang_Object_2_classLit), Ljava_util_AbstractHashMap_2_classLit = createForClass('java.util.', 'AbstractHashMap', 68, Ljava_util_AbstractMap_2_classLit), Ljava_util_AbstractCollection_2_classLit = createForClass('java.util.', 'AbstractCollection', 67, Ljava_lang_Object_2_classLit), Ljava_util_AbstractSet_2_classLit = createForClass('java.util.', 'AbstractSet', 71, Ljava_util_AbstractCollection_2_classLit), Ljava_util_AbstractHashMap$EntrySet_2_classLit = createForClass('java.util.', 'AbstractHashMap$EntrySet', 70, Ljava_util_AbstractSet_2_classLit), Ljava_util_AbstractHashMap$EntrySetIterator_2_classLit = createForClass('java.util.', 'AbstractHashMap$EntrySetIterator', 72, Ljava_lang_Object_2_classLit), Ljava_util_AbstractMapEntry_2_classLit = createForClass('java.util.', 'AbstractMapEntry', 74, Ljava_lang_Object_2_classLit), Ljava_util_AbstractHashMap$MapEntryNull_2_classLit = createForClass('java.util.', 'AbstractHashMap$MapEntryNull', 73, Ljava_util_AbstractMapEntry_2_classLit), Ljava_util_AbstractHashMap$MapEntryString_2_classLit = createForClass('java.util.', 'AbstractHashMap$MapEntryString', 75, Ljava_util_AbstractMapEntry_2_classLit), Ljava_lang_NullPointerException_2_classLit = createForClass('java.lang.', 'NullPointerException', 60, Ljava_lang_RuntimeException_2_classLit), Ljava_lang_IllegalArgumentException_2_classLit = createForClass('java.lang.', 'IllegalArgumentException', 58, Ljava_lang_RuntimeException_2_classLit), Ledu_umb_bio_jsMolCalc_client_Target_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'Target', 50, Ljava_lang_Object_2_classLit), Ljava_util_HashMap_2_classLit = createForClass('java.util.', 'HashMap', 80, Ljava_util_AbstractHashMap_2_classLit), Ledu_umb_bio_jsMolCalc_client_APIExporterImpl_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'APIExporterImpl', 40, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_MoleculeInfo_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'MoleculeInfo', 49, Ljava_lang_Object_2_classLit), Lcom_google_gwt_i18n_client_NumberFormat_2_classLit = createForClass('com.google.gwt.i18n.client.', 'NumberFormat', 25, Ljava_lang_Object_2_classLit), Ljava_lang_StringBuffer_2_classLit = createForClass('java.lang.', 'StringBuffer', 64, Ljava_lang_Object_2_classLit), Lcom_google_gwt_i18n_client_LocaleInfo_2_classLit = createForClass('com.google.gwt.i18n.client.', 'LocaleInfo', 24, Ljava_lang_Object_2_classLit), Ljava_lang_UnsupportedOperationException_2_classLit = createForClass('java.lang.', 'UnsupportedOperationException', 66, Ljava_lang_RuntimeException_2_classLit), Ledu_umb_bio_jsMolCalc_client_InfoAndTargets_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'InfoAndTargets', 43, Ljava_lang_Object_2_classLit), _3_3I_classLit = createForArray('', '[[I', 97), _3Ledu_umb_bio_jsMolCalc_client_Target_2_classLit = createForArray('[Ledu.umb.bio.jsMolCalc.client.', 'Target;', 98), Ljava_lang_NumberFormatException_2_classLit = createForClass('java.lang.', 'NumberFormatException', 61, Ljava_lang_IllegalArgumentException_2_classLit), Ljava_util_MapEntryImpl_2_classLit = createForClass('java.util.', 'MapEntryImpl', 81, Ljava_util_AbstractMapEntry_2_classLit), Ljava_util_AbstractList_2_classLit = createForClass('java.util.', 'AbstractList', 76, Ljava_util_AbstractCollection_2_classLit), Ljava_util_ArrayList_2_classLit = createForClass('java.util.', 'ArrayList', 78, Ljava_util_AbstractList_2_classLit), Ljava_util_AbstractList$IteratorImpl_2_classLit = createForClass('java.util.', 'AbstractList$IteratorImpl', 77, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_Atom_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'Atom', 41, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_AtomSpec_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'AtomSpec', 42, Ljava_lang_Object_2_classLit), Lcom_google_gwt_i18n_client_constants_NumberConstantsImpl_1_2_classLit = createForClass('com.google.gwt.i18n.client.constants.', 'NumberConstantsImpl_', 26, Ljava_lang_Object_2_classLit), Ljava_lang_IndexOutOfBoundsException_2_classLit = createForClass('java.lang.', 'IndexOutOfBoundsException', 59, Ljava_lang_RuntimeException_2_classLit), Ljava_util_NoSuchElementException_2_classLit = createForClass('java.util.', 'NoSuchElementException', 82, Ljava_lang_RuntimeException_2_classLit); var Ljava_lang_Object_2_classLit = createForClass('java.lang.', 'Object', 1, null), Lcom_google_gwt_core_client_JavaScriptObject_2_classLit = createForClass('com.google.gwt.core.client.', 'JavaScriptObject$', 9, Ljava_lang_Object_2_classLit), _3I_classLit = createForArray('', '[I', 87), _3Ljava_lang_Object_2_classLit = createForArray('[Ljava.lang.', 'Object;', 85), Ljava_lang_Throwable_2_classLit = createForClass('java.lang.', 'Throwable', 8, Ljava_lang_Object_2_classLit), Ljava_lang_Exception_2_classLit = createForClass('java.lang.', 'Exception', 7, Ljava_lang_Throwable_2_classLit), Ljava_lang_RuntimeException_2_classLit = createForClass('java.lang.', 'RuntimeException', 6, Ljava_lang_Exception_2_classLit), Ljava_lang_StackTraceElement_2_classLit = createForClass('java.lang.', 'StackTraceElement', 56, Ljava_lang_Object_2_classLit), _3Ljava_lang_StackTraceElement_2_classLit = createForArray('[Ljava.lang.', 'StackTraceElement;', 88), Lcom_google_gwt_lang_SeedUtil_2_classLit = createForClass('com.google.gwt.lang.', 'SeedUtil', 34, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$API_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalcAPI$API', 45, Ljava_lang_Object_2_classLit), Ljava_lang_Class_2_classLit = createForClass('java.lang.', 'Class', 48, Ljava_lang_Object_2_classLit), Ljava_lang_String_2_classLit = createForClass('java.lang.', 'String', 2, Ljava_lang_Object_2_classLit), _3Ljava_lang_String_2_classLit = createForArray('[Ljava.lang.', 'String;', 86), Ljava_lang_ClassCastException_2_classLit = createForClass('java.lang.', 'ClassCastException', 49, Ljava_lang_RuntimeException_2_classLit), Ljava_lang_StringBuilder_2_classLit = createForClass('java.lang.', 'StringBuilder', 59, Ljava_lang_Object_2_classLit), Ljava_lang_ArrayStoreException_2_classLit = createForClass('java.lang.', 'ArrayStoreException', 46, Ljava_lang_RuntimeException_2_classLit), Lcom_google_gwt_core_client_JavaScriptException_2_classLit = createForClass('com.google.gwt.core.client.', 'JavaScriptException', 5, Ljava_lang_RuntimeException_2_classLit), Lorg_timepedia_exporter_client_ExporterBaseImpl_2_classLit = createForClass('org.timepedia.exporter.client.', 'ExporterBaseImpl', 80, Ljava_lang_Object_2_classLit), Lorg_timepedia_exporter_client_ExporterBaseActual_2_classLit = createForClass('org.timepedia.exporter.client.', 'ExporterBaseActual', 79, Lorg_timepedia_exporter_client_ExporterBaseImpl_2_classLit), Lorg_timepedia_exporter_client_Exportable_2_classLit = createForInterface('org.timepedia.exporter.client.', 'Exportable'), Lorg_timepedia_exporter_client_ExportAllExporterImpl_2_classLit = createForClass('org.timepedia.exporter.client.', 'ExportAllExporterImpl', 78, Ljava_lang_Object_2_classLit), Lcom_google_gwt_core_client_impl_StackTraceCreator$Collector_2_classLit = createForClass('com.google.gwt.core.client.impl.', 'StackTraceCreator$Collector', 17, Ljava_lang_Object_2_classLit), Lcom_google_gwt_core_client_Scheduler_2_classLit = createForClass('com.google.gwt.core.client.', 'Scheduler', 12, Ljava_lang_Object_2_classLit), Lcom_google_gwt_core_client_impl_SchedulerImpl_2_classLit = createForClass('com.google.gwt.core.client.impl.', 'SchedulerImpl', 14, Lcom_google_gwt_core_client_Scheduler_2_classLit), Ljava_util_AbstractMap_2_classLit = createForClass('java.util.', 'AbstractMap', 63, Ljava_lang_Object_2_classLit), Ljava_util_AbstractHashMap_2_classLit = createForClass('java.util.', 'AbstractHashMap', 62, Ljava_util_AbstractMap_2_classLit), Ljava_util_AbstractCollection_2_classLit = createForClass('java.util.', 'AbstractCollection', 61, Ljava_lang_Object_2_classLit), Ljava_util_AbstractSet_2_classLit = createForClass('java.util.', 'AbstractSet', 65, Ljava_util_AbstractCollection_2_classLit), Ljava_util_AbstractHashMap$EntrySet_2_classLit = createForClass('java.util.', 'AbstractHashMap$EntrySet', 64, Ljava_util_AbstractSet_2_classLit), Ljava_util_AbstractHashMap$EntrySetIterator_2_classLit = createForClass('java.util.', 'AbstractHashMap$EntrySetIterator', 66, Ljava_lang_Object_2_classLit), Ljava_util_AbstractMapEntry_2_classLit = createForClass('java.util.', 'AbstractMapEntry', 68, Ljava_lang_Object_2_classLit), Ljava_util_AbstractHashMap$MapEntryNull_2_classLit = createForClass('java.util.', 'AbstractHashMap$MapEntryNull', 67, Ljava_util_AbstractMapEntry_2_classLit), Ljava_util_AbstractHashMap$MapEntryString_2_classLit = createForClass('java.util.', 'AbstractHashMap$MapEntryString', 69, Ljava_util_AbstractMapEntry_2_classLit), Ljava_lang_NullPointerException_2_classLit = createForClass('java.lang.', 'NullPointerException', 54, Ljava_lang_RuntimeException_2_classLit), Ljava_lang_IllegalArgumentException_2_classLit = createForClass('java.lang.', 'IllegalArgumentException', 52, Ljava_lang_RuntimeException_2_classLit), Ljava_util_HashMap_2_classLit = createForClass('java.util.', 'HashMap', 74, Ljava_util_AbstractHashMap_2_classLit), Ledu_umb_bio_jsMolCalc_client_APIExporterImpl_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'APIExporterImpl', 40, Ljava_lang_Object_2_classLit), Ljava_lang_StringBuffer_2_classLit = createForClass('java.lang.', 'StringBuffer', 58, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalc_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalc', 41, Ljava_lang_Object_2_classLit), _3_3I_classLit = createForArray('', '[[I', 89), Ledu_umb_bio_jsMolCalc_client_JsMolCalc$Atom_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalc$Atom', 42, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalc$AtomSpec_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalc$AtomSpec', 43, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalc$InfoAndTargets_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalc$InfoAndTargets', 44, Ljava_lang_Object_2_classLit), Ljava_util_AbstractList_2_classLit = createForClass('java.util.', 'AbstractList', 70, Ljava_util_AbstractCollection_2_classLit), Ljava_util_ArrayList_2_classLit = createForClass('java.util.', 'ArrayList', 72, Ljava_util_AbstractList_2_classLit), Ljava_util_AbstractList$IteratorImpl_2_classLit = createForClass('java.util.', 'AbstractList$IteratorImpl', 71, Ljava_lang_Object_2_classLit), Ljava_lang_UnsupportedOperationException_2_classLit = createForClass('java.lang.', 'UnsupportedOperationException', 60, Ljava_lang_RuntimeException_2_classLit), Lcom_google_gwt_i18n_client_NumberFormat_2_classLit = createForClass('com.google.gwt.i18n.client.', 'NumberFormat', 25, Ljava_lang_Object_2_classLit), Ljava_lang_NumberFormatException_2_classLit = createForClass('java.lang.', 'NumberFormatException', 55, Ljava_lang_IllegalArgumentException_2_classLit), Lcom_google_gwt_i18n_client_LocaleInfo_2_classLit = createForClass('com.google.gwt.i18n.client.', 'LocaleInfo', 24, Ljava_lang_Object_2_classLit), Ljava_util_MapEntryImpl_2_classLit = createForClass('java.util.', 'MapEntryImpl', 75, Ljava_util_AbstractMapEntry_2_classLit), Ljava_lang_IndexOutOfBoundsException_2_classLit = createForClass('java.lang.', 'IndexOutOfBoundsException', 53, Ljava_lang_RuntimeException_2_classLit), Ljava_util_NoSuchElementException_2_classLit = createForClass('java.util.', 'NoSuchElementException', 76, Ljava_lang_RuntimeException_2_classLit), Lcom_google_gwt_i18n_client_constants_NumberConstantsImpl_1_2_classLit = createForClass('com.google.gwt.i18n.client.constants.', 'NumberConstantsImpl_', 26, Ljava_lang_Object_2_classLit);
$stats && $stats({moduleName:'jsmolcalc',sessionId:$sessionId,subSystem:'startup',evtGroup:'moduleStartup',millis:(new Date()).getTime(),type:'moduleEvalEnd'}); $stats && $stats({moduleName:'jsmolcalc',sessionId:$sessionId,subSystem:'startup',evtGroup:'moduleStartup',millis:(new Date()).getTime(),type:'moduleEvalEnd'});
if ($wnd.jsmolcalc) $wnd.jsmolcalc.onScriptLoad(); if ($wnd.jsmolcalc) $wnd.jsmolcalc.onScriptLoad();
--></script></body></html> --></script></body></html>
...@@ -4,14 +4,14 @@ var $gwt_version = "2.5.0"; ...@@ -4,14 +4,14 @@ var $gwt_version = "2.5.0";
var $wnd = parent; var $wnd = parent;
var $doc = $wnd.document; var $doc = $wnd.document;
var $moduleName, $moduleBase; var $moduleName, $moduleBase;
var $strongName = '280D82581672593B003FDD949FD05A1A'; var $strongName = 'E8EDF03FE9C26D69E2C7DB17E15CF0ED';
var $stats = $wnd.__gwtStatsEvent ? function(a) {return $wnd.__gwtStatsEvent(a);} : null, var $stats = $wnd.__gwtStatsEvent ? function(a) {return $wnd.__gwtStatsEvent(a);} : null,
$sessionId = $wnd.__gwtStatsSessionId ? $wnd.__gwtStatsSessionId : null; $sessionId = $wnd.__gwtStatsSessionId ? $wnd.__gwtStatsSessionId : null;
$stats && $stats({moduleName:'jsmolcalc',sessionId:$sessionId,subSystem:'startup',evtGroup:'moduleStartup',millis:(new Date()).getTime(),type:'moduleEvalStart'}); $stats && $stats({moduleName:'jsmolcalc',sessionId:$sessionId,subSystem:'startup',evtGroup:'moduleStartup',millis:(new Date()).getTime(),type:'moduleEvalStart'});
</script></head> </script></head>
<body> <body>
<script><!-- <script><!--
var _, seedTable = {}, Q$Object = 0, Q$String = 1, Q$LongLibBase$LongEmul = 2, Q$Atom = 3, Q$JsMolCalcAPI$Task = 4, Q$Target = 5, Q$int_$1 = 6, Q$Serializable = 7, Q$CharSequence = 8, Q$Comparable = 9, Q$StackTraceElement = 10, Q$Throwable = 11, Q$List = 12, Q$Map = 13, Q$Map$Entry = 14, Q$Set = 15, Q$Exportable = 16, CM$ = {}; var _, seedTable = {}, Q$Object = 0, Q$String = 1, Q$LongLibBase$LongEmul = 2, Q$JsMolCalc$Atom = 3, Q$int_$1 = 4, Q$Serializable = 5, Q$CharSequence = 6, Q$Comparable = 7, Q$StackTraceElement = 8, Q$Throwable = 9, Q$List = 10, Q$Map = 11, Q$Map$Entry = 12, Q$Set = 13, Q$Exportable = 14, CM$ = {};
function newSeed(id){ function newSeed(id){
return new seedTable[id]; return new seedTable[id];
} }
...@@ -89,11 +89,6 @@ function equals__devirtual$(this$static, other){ ...@@ -89,11 +89,6 @@ function equals__devirtual$(this$static, other){
return maybeJsoInvocation = this$static , isJavaObject(maybeJsoInvocation)?maybeJsoInvocation.equals$(other):maybeJsoInvocation === other; return maybeJsoInvocation = this$static , isJavaObject(maybeJsoInvocation)?maybeJsoInvocation.equals$(other):maybeJsoInvocation === other;
} }
function getClass__devirtual$(this$static){
var maybeJsoInvocation;
return maybeJsoInvocation = this$static , isJavaObject(maybeJsoInvocation)?maybeJsoInvocation.___clazz$:Lcom_google_gwt_core_client_JavaScriptObject_2_classLit;
}
function hashCode__devirtual$(this$static){ function hashCode__devirtual$(this$static){
var maybeJsoInvocation; var maybeJsoInvocation;
return maybeJsoInvocation = this$static , isJavaObject(maybeJsoInvocation)?maybeJsoInvocation.hashCode$():getHashCode(maybeJsoInvocation); return maybeJsoInvocation = this$static , isJavaObject(maybeJsoInvocation)?maybeJsoInvocation.hashCode$():getHashCode(maybeJsoInvocation);
...@@ -312,7 +307,7 @@ function $getDefaultNative(){ ...@@ -312,7 +307,7 @@ function $getDefaultNative(){
function $clinit_LocaleInfo(){ function $clinit_LocaleInfo(){
$clinit_LocaleInfo = nullMethod; $clinit_LocaleInfo = nullMethod;
instance_0 = new LocaleInfo_0; instance = new LocaleInfo_0;
} }
function $getNumberConstants(this$static){ function $getNumberConstants(this$static){
...@@ -325,10 +320,10 @@ function LocaleInfo_0(){ ...@@ -325,10 +320,10 @@ function LocaleInfo_0(){
defineSeed(26, 1, {}, LocaleInfo_0); defineSeed(26, 1, {}, LocaleInfo_0);
_.numberConstants = null; _.numberConstants = null;
var instance_0; var instance;
function $clinit_NumberFormat(){ function $clinit_NumberFormat(){
$clinit_NumberFormat = nullMethod; $clinit_NumberFormat = nullMethod;
$getNumberConstants(($clinit_LocaleInfo() , $clinit_LocaleInfo() , instance_0)); $getNumberConstants(($clinit_LocaleInfo() , $clinit_LocaleInfo() , instance));
} }
function $addExponent(this$static, digits){ function $addExponent(this$static, digits){
...@@ -373,7 +368,7 @@ function $adjustFractionDigits(this$static, digits){ ...@@ -373,7 +368,7 @@ function $adjustFractionDigits(this$static, digits){
--toRemove; --toRemove;
} }
if (toRemove < this$static.digitsLength) { if (toRemove < this$static.digitsLength) {
$delete(digits, toRemove, this$static.digitsLength); $delete_0(digits, toRemove, this$static.digitsLength);
this$static.digitsLength = toRemove; this$static.digitsLength = toRemove;
} }
} }
...@@ -427,7 +422,7 @@ function $format(this$static, number){ ...@@ -427,7 +422,7 @@ function $format(this$static, number){
if (preRound > 0 && preRound < buf.impl.string.length && $charAt(buf.impl.string, preRound) == 57) { if (preRound > 0 && preRound < buf.impl.string.length && $charAt(buf.impl.string, preRound) == 57) {
$propagateCarry(this$static, buf, preRound - 1); $propagateCarry(this$static, buf, preRound - 1);
scale += buf.impl.string.length - preRound; scale += buf.impl.string.length - preRound;
$delete(buf, preRound, buf.impl.string.length); $delete_0(buf, preRound, buf.impl.string.length);
} }
this$static.exponent = 0; this$static.exponent = 0;
this$static.digitsLength = buf.impl.string.length; this$static.digitsLength = buf.impl.string.length;
...@@ -460,7 +455,7 @@ function $insertGroupingSeparators(this$static, digits, g){ ...@@ -460,7 +455,7 @@ function $insertGroupingSeparators(this$static, digits, g){
function $parseAffix(this$static, pattern, start, affix, inNegativePattern){ function $parseAffix(this$static, pattern, start, affix, inNegativePattern){
var ch, inQuote, len, pos; var ch, inQuote, len, pos;
$replace_0(affix, affix.impl.string.length); $delete(affix, affix.impl.string.length);
inQuote = false; inQuote = false;
len = pattern.length; len = pattern.length;
for (pos = start; pos < len; ++pos) { for (pos = start; pos < len; ++pos) {
...@@ -737,7 +732,7 @@ function toScaledString(buf, val){ ...@@ -737,7 +732,7 @@ function toScaledString(buf, val){
expDigits = expIdx + 1; expDigits = expIdx + 1;
expDigits < buf.impl.string.length && $charAt(buf.impl.string, expDigits) == 43 && ++expDigits; expDigits < buf.impl.string.length && $charAt(buf.impl.string, expDigits) == 43 && ++expDigits;
expDigits < buf.impl.string.length && (scale = __parseAndValidateInt($substring(buf.impl.string, expDigits))); expDigits < buf.impl.string.length && (scale = __parseAndValidateInt($substring(buf.impl.string, expDigits)));
$delete(buf, expIdx, buf.impl.string.length); $delete_0(buf, expIdx, buf.impl.string.length);
} }
dot = $indexOf(buf.impl.string, '.', startLen); dot = $indexOf(buf.impl.string, '.', startLen);
if (dot >= 0) { if (dot >= 0) {
...@@ -920,7 +915,6 @@ function init(){ ...@@ -920,7 +915,6 @@ function init(){
!!$stats && onModuleStart('com.google.gwt.user.client.DocumentModeAsserter'); !!$stats && onModuleStart('com.google.gwt.user.client.DocumentModeAsserter');
$onModuleLoad(); $onModuleLoad();
!!$stats && onModuleStart('edu.umb.bio.jsMolCalc.client.JsMolCalcAPI'); !!$stats && onModuleStart('edu.umb.bio.jsMolCalc.client.JsMolCalcAPI');
new TaskExporterImpl_0;
$clinit_ExporterUtil(); $clinit_ExporterUtil();
new ExportAllExporterImpl_0; new ExportAllExporterImpl_0;
} }
...@@ -994,30 +988,30 @@ function $getRuntimeValue(){ ...@@ -994,30 +988,30 @@ function $getRuntimeValue(){
function $export(){ function $export(){
if (!exported) { if (!exported) {
exported = true; exported = true;
new InfoExporterImpl_0;
$export0(); $export0();
} }
} }
function $export0(){ function $export0(){
var pkg = declarePackage('jsmol.API'); var pkg = ($clinit_ExporterUtil() , $declarePackage('jsmol.API'));
var __0; var __0;
$wnd.jsmol.API = $entry(function(){ $wnd.jsmol.API = $entry(function(){
var g, j = this; var g, j = this;
isAssignableToInstance(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$API_2_classLit, arguments)?(g = arguments[0]):arguments.length == 0 && (g = new JsMolCalcAPI$API_0); isAssignableToInstance(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$API_2_classLit, arguments)?(g = arguments[0]):arguments.length == 0 && (g = new JsMolCalcAPI$API_0);
j.g = g; j.g = g;
setWrapper(g, j); g['__gwtex_wrap'] = j;
return j; return j;
} }
); );
__0 = $wnd.jsmol.API.prototype = new Object; __0 = $wnd.jsmol.API.prototype = new Object;
$wnd.jsmol.API.getInfo = $entry(function(a0, a1, a2){ $wnd.jsmol.API.getErrors = $entry(function(a0, a1, a2){
var result; var iat, info;
return wrap((result = computeAndDisplay(a0, a1, a2) , new JsMolCalcAPI$Info_0(result.info))); return new JsMolCalc_0 , iat = $computeAndDisplay(a0, a1, a2) , info = iat.info , info.indexOf('It is not possible') == 0?info:'';
} }
); );
$wnd.jsmol.API.getTasks = $entry(function(a0, a1, a2){ $wnd.jsmol.API.getInfo = $entry(function(a0, a1, a2){
return wrap_0(getTasks(a0, a1, a2)); var iat;
return new JsMolCalc_0 , iat = $computeAndDisplay(a0, a1, a2) , iat.info;
} }
); );
addTypeMap(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$API_2_classLit, $wnd.jsmol.API); addTypeMap(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$API_2_classLit, $wnd.jsmol.API);
...@@ -1032,6 +1026,312 @@ function APIExporterImpl_0(){ ...@@ -1032,6 +1026,312 @@ function APIExporterImpl_0(){
defineSeed(42, 1, {}, APIExporterImpl_0); defineSeed(42, 1, {}, APIExporterImpl_0);
var exported = false; var exported = false;
function $computeAndDisplay(molString, smileString, jmeString){
var atom, atomDataLines, atomLineParts, atomList, atomNumber, bondArray, bondIndex, bondLineParts, bondString, br, c, canMakeHbonds, canMakeIonicBonds, charge, chargeLineParts, cl, currentAtom, currentAtomSpec, currentNeighbor, element, errorString, f, fifthAtom, firstAtom, formula, formulaString, fourthAtom, h, i, illegalAtoms, iodine, j, k, l, line3Parts, logp, logpString, m, molStringLines, moleculeInfo, n, neighbors, nf, numAromaticAtoms, numAtoms, numBonds, o, p_0, s, secondAtom, sixthAtom, targets, thirdAtom;
if ($equals(molString, '') || $equals(smileString, '') || $equals(jmeString, '')) {
return new JsMolCalc$InfoAndTargets_0('');
}
atomDataLines = new StringBuffer_0;
logpString = '';
bondString = '';
atomList = new ArrayList_0;
$add_0(atomList, new JsMolCalc$Atom_0);
molStringLines = $split(molString, '\n', 0);
line3Parts = $split(molStringLines[3], '[ ]+', 0);
numAtoms = __parseAndValidateInt(line3Parts[1]);
numBonds = __parseAndValidateInt(line3Parts[2]);
for (i = 1; i < numAtoms + 1; ++i) {
atomLineParts = $split(molStringLines[i + 3], '[ ]+', 0);
element = atomLineParts[4];
atom = new JsMolCalc$Atom_0;
atom.element = element;
setCheck(atomList.array, atomList.size++, atom);
}
for (i = 0; i < molStringLines.length; ++i) {
if (molStringLines[i].indexOf('CHG') != -1) {
chargeLineParts = $split(molStringLines[i], '[ ]+', 0);
atomNumber = __parseAndValidateInt(chargeLineParts[3]);
charge = __parseAndValidateInt(chargeLineParts[4]);
atom = dynamicCast((checkIndex(atomNumber, atomList.size) , atomList.array[atomNumber]), Q$JsMolCalc$Atom);
atom.charge = charge;
}
}
bondArray = initDims([_3_3I_classLit, _3I_classLit], [makeCastMap([Q$Serializable]), makeCastMap([Q$int_$1, Q$Serializable])], [Q$int_$1, -1], [numAtoms + 1, numAtoms + 1], 2, 1);
for (i = 1; i < numAtoms + 1; ++i) {
fill(bondArray[i], bondArray[i].length);
}
for (i = 1; i < numBonds + 1; ++i) {
bondLineParts = $split(molStringLines[i + numAtoms + 3], '[ ]+', 0);
firstAtom = __parseAndValidateInt(bondLineParts[1]);
secondAtom = __parseAndValidateInt(bondLineParts[2]);
bondIndex = __parseAndValidateInt(bondLineParts[3]);
bondArray[firstAtom][secondAtom] = bondIndex;
bondArray[secondAtom][firstAtom] = bondIndex;
$addBondToNonHAtom(dynamicCast((checkIndex(firstAtom, atomList.size) , atomList.array[firstAtom]), Q$JsMolCalc$Atom), bondIndex);
$addBondToNonHAtom(dynamicCast((checkIndex(secondAtom, atomList.size) , atomList.array[secondAtom]), Q$JsMolCalc$Atom), bondIndex);
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
bondArray[i][j] != 0 && $updateHybridization(currentAtom, bondArray[i][j]);
}
}
for (i = 1; i < numAtoms + 1; ++i) {
firstAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
if (($equals(firstAtom.element, 'C') || $equals(firstAtom.element, 'N')) && (firstAtom.hybridization == 2 || firstAtom.aromatic)) {
for (j = 1; j < numAtoms + 1; ++j) {
secondAtom = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$JsMolCalc$Atom);
if ((bondArray[i][j] == 1 || bondArray[i][j] == 2 || secondAtom.aromatic && bondArray[i][j] != 0 || firstAtom.aromatic && bondArray[i][j] != 0) && ($equals(secondAtom.element, 'C') || $equals(secondAtom.element, 'N')) && secondAtom.hybridization == 2 && i != j) {
for (k = 1; k < numAtoms + 1; ++k) {
thirdAtom = dynamicCast((checkIndex(k, atomList.size) , atomList.array[k]), Q$JsMolCalc$Atom);
if ((bondArray[j][k] == 1 && bondArray[i][j] == 2 || bondArray[j][k] == 2 && bondArray[i][j] == 1 || thirdAtom.aromatic && bondArray[j][k] != 0 || secondAtom.aromatic && bondArray[j][k] != 0) && ($equals(thirdAtom.element, 'C') || $equals(thirdAtom.element, 'N')) && thirdAtom.hybridization == 2 && k != i && k != j) {
for (l = 1; l < numAtoms + 1; ++l) {
fourthAtom = dynamicCast((checkIndex(l, atomList.size) , atomList.array[l]), Q$JsMolCalc$Atom);
if ((bondArray[k][l] == 1 && bondArray[j][k] == 2 || bondArray[k][l] == 2 && bondArray[j][k] == 1 || fourthAtom.aromatic && bondArray[k][l] != 0 || thirdAtom.aromatic && bondArray[k][l] != 0) && ($equals(fourthAtom.element, 'C') || $equals(fourthAtom.element, 'N')) && fourthAtom.hybridization == 2 && l != i && l != j && l != k) {
for (m = 1; m < numAtoms + 1; ++m) {
fifthAtom = dynamicCast((checkIndex(m, atomList.size) , atomList.array[m]), Q$JsMolCalc$Atom);
if ((bondArray[l][m] == 1 && bondArray[k][l] == 2 || bondArray[l][m] == 2 && bondArray[k][l] == 1 || fifthAtom.aromatic && bondArray[l][m] != 0 || fourthAtom.aromatic && bondArray[l][m] != 0) && ($equals(fifthAtom.element, 'C') || $equals(fifthAtom.element, 'N')) && fifthAtom.hybridization == 2 && m != i && m != j && m != k && m != l) {
for (n = 1; n < numAtoms + 1; ++n) {
sixthAtom = dynamicCast((checkIndex(n, atomList.size) , atomList.array[n]), Q$JsMolCalc$Atom);
if ((bondArray[m][n] == 1 && bondArray[l][m] == 2 || bondArray[m][n] == 2 && bondArray[l][m] == 1 || sixthAtom.aromatic && bondArray[m][n] != 0 || fifthAtom.aromatic && bondArray[m][n] != 0) && ($equals(sixthAtom.element, 'C') || $equals(sixthAtom.element, 'N')) && sixthAtom.hybridization == 2 && n != i && n != j && n != k && n != l && n != m) {
if (bondArray[n][i] == 2 && bondArray[m][n] == 1 || bondArray[n][i] == 1 && bondArray[m][n] == 2) {
firstAtom.aromatic = true;
secondAtom.aromatic = true;
thirdAtom.aromatic = true;
fourthAtom.aromatic = true;
fifthAtom.aromatic = true;
sixthAtom.aromatic = true;
}
}
}
}
}
}
}
}
}
}
}
}
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
if (bondArray[i][j] != 0) {
currentNeighbor = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$JsMolCalc$Atom);
$processNeighbor(currentAtom, currentNeighbor.element, bondArray[i][j], currentNeighbor.aromatic);
}
}
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
if (bondArray[i][j] != 0) {
currentNeighbor = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$JsMolCalc$Atom);
if (currentNeighbor.hybridization < 3) {
for (k = 1; k < numAtoms + 1; ++k) {
bondArray[j][k] > 1 && k != i && ++currentAtom.numNeighborPi;
}
}
}
}
}
h = 0;
charge = 0;
for (i = 1; i < numAtoms + 1; ++i) {
atom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
$getNumNeighborHs(atom);
h = h + atom.numNeighborHs;
charge = charge + atom.charge;
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
if (bondArray[i][j] != 0) {
currentNeighbor = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$JsMolCalc$Atom);
$equals(currentAtom.element, 'N') && currentNeighbor.isACarbonyl && (currentAtom.amide = true);
}
}
}
illegalAtoms = new StringBuffer_0;
for (i = 1; i < numAtoms + 1; ++i) {
atom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
$equals(atom.element, 'C') && atom.charge != 0 && (illegalAtoms.impl.string += 'A Charged C atom.<br>' , illegalAtoms);
if ($equals(atom.element, 'N')) {
atom.charge > 1 && (illegalAtoms.impl.string += 'An N atom with too high + charge.<br>' , illegalAtoms);
atom.charge < 0 && (illegalAtoms.impl.string += 'An N atom with - charge.<br>' , illegalAtoms);
$getNumNeighborHs(atom) < 0 && !($equals(atom.doubleBondedNeighbor, 'O2') && $getNumNeighborHs(atom) == -2 && atom.numNeighborCs == 1 && atom.numNeighborXs == 2 && atom.charge == 0) && (illegalAtoms.impl.string += 'An N atom making too many bonds.<br>' , illegalAtoms);
}
if ($equals(atom.element, 'O')) {
atom.charge < -1 && (illegalAtoms.impl.string += 'An O atom with too high - charge.<br>' , illegalAtoms);
atom.charge > 0 && (illegalAtoms.impl.string += 'An O atom with + charge.<br>' , illegalAtoms);
}
if ($equals(atom.element, 'S')) {
atom.charge > 0 && (illegalAtoms.impl.string += 'An S atom with a + charge.<br>' , illegalAtoms);
$getNumNeighborHs(atom) < 0 && $getNumNeighborHs(atom) != -4 && $getNumNeighborHs(atom) != -2 && (illegalAtoms.impl.string += 'An S atom not making 2, 4, or 6 bonds.<br>' , illegalAtoms);
}
if ($equals(atom.element, 'P')) {
atom.charge != 0 && (illegalAtoms.impl.string += 'A Charged P atom.<br>' , illegalAtoms);
atom.numNeighborHs != -3 && (illegalAtoms.impl.string += 'A P atom not making 5 bonds.<br>' , illegalAtoms);
}
if ($equals(atom.element, 'F') || $equals(atom.element, 'Cl') || $equals(atom.element, 'Br') || $equals(atom.element, 'I')) {
atom.charge != 0 && $append_0(illegalAtoms, 'A Charged ' + atom.element + ' atom.<br>');
atom.numBondsToNonHAtoms > 1 && $append_0(illegalAtoms, 'A ' + atom.element + ' atom making more than one bond.<br>');
}
$equals(atom.element, 'X') && (illegalAtoms.impl.string += 'An X atom.<br>' , illegalAtoms);
}
errorString = '';
illegalAtoms.impl.string.length != 0 && (errorString = '<html><body>It is not possible to calculate the properties<br>of your molecule because it contains:<br>' + illegalAtoms.impl.string + '<\/body><\/html>');
logp = 0;
canMakeHbonds = false;
canMakeIonicBonds = false;
if (illegalAtoms.impl.string.length == 0) {
nf = ($clinit_NumberFormat() , new NumberFormat_1($getDefaultNative()));
for (i = 1; i < numAtoms + 1; ++i) {
atom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
currentAtomSpec = $getAtomSpec(atom);
logp = logp + currentAtomSpec.logp;
canMakeHbonds = canMakeHbonds || currentAtomSpec.canMakeHbonds;
canMakeIonicBonds = canMakeIonicBonds || currentAtomSpec.canMakeIonicBonds;
neighbors = new StringBuffer_0;
for (j = 1; j < numAtoms + 1; ++j) {
bondArray[i][j] != 0 && ($append(neighbors.impl, j + ' ') , neighbors);
}
$append_0(atomDataLines, i + ' ' + currentAtomSpec.type + '; bonded to: ' + neighbors.impl.string + '; logp= ' + $format(nf, currentAtomSpec.logp) + '; H-bonds: ' + currentAtomSpec.canMakeHbonds + '; ionic bonds: ' + currentAtomSpec.canMakeIonicBonds + '\n');
}
logp < 0?(logpString = '<font color=green>Hydrophobicity index = ' + $format(nf, logp) + '<\/font>'):(logpString = '<font color=red>Hydrophobicity index = ' + $format(nf, logp) + '<\/font>');
canMakeHbonds?(bondString = '<font color=green>Can Make Strong Hydrogen Bonds<\/font><br>'):(bondString = '<font color=red>Can not Make Strong Hydrogen Bonds<\/font><br>');
canMakeIonicBonds?(bondString += '<font color=green>Can Make Ionic Bonds<\/font>'):(bondString += '<font color=red>Can not Make Ionic Bonds<\/font>');
}
numBonds = 0;
numAromaticAtoms = 0;
c = 0;
n = 0;
o = 0;
s = 0;
p_0 = 0;
cl = 0;
br = 0;
f = 0;
iodine = 0;
formula = new StringBuffer_0;
for (i = 0; i < smileString.length; ++i) {
switch (smileString.charCodeAt(i)) {
case 67:
++c;
break;
case 78:
++n;
break;
case 79:
++o;
break;
case 83:
++s;
break;
case 80:
++p_0;
break;
case 108:
--c;
++cl;
break;
case 66:
++br;
break;
case 70:
++f;
break;
case 73:
++iodine;
break;
case 99:
++c;
++numAromaticAtoms;
break;
case 110:
++n;
++numAromaticAtoms;
break;
case 115:
++s;
++numAromaticAtoms;
break;
case 111:
++o;
++numAromaticAtoms;
break;
case 35:
++numBonds;
case 61:
++numBonds;
}
}
$prettyPrint('C', c, formula);
$prettyPrint('H', h, formula);
$prettyPrint('N', n, formula);
$prettyPrint('O', o, formula);
$prettyPrint('P', p_0, formula);
$prettyPrint('S', s, formula);
$prettyPrint('Cl', cl, formula);
$prettyPrint('Br', br, formula);
$prettyPrint('F', f, formula);
$prettyPrint('I', iodine, formula);
if (charge != 0) {
formula.impl.string += '(';
charge == -1?(formula.impl.string += '-' , formula):charge > 0 && (formula.impl.string += '+' , formula);
(charge < 0?-charge:charge) != 1 && ($append(formula.impl, '' + charge) , formula);
formula.impl.string += ')';
}
formulaString = 'Formula: ' + formula.impl.string;
$equals(errorString, '')?(moleculeInfo = '<html><body>' + formulaString + '<br>' + logpString + '<br>' + bondString + '<\/body><\/html>'):(moleculeInfo = errorString);
if ($equals(errorString, '')) {
nf = ($clinit_NumberFormat() , new NumberFormat_1($getDefaultNative()));
targets = '<html><body>Edit the molecule so that it:<br><ul>';
targets += '<li>can ';
canMakeHbonds && (targets += ' not ');
targets += 'make Hydrogen bonds<\/li>';
targets += '<li>can ';
canMakeIonicBonds && (targets += ' not ');
targets += 'make Ionic bonds<\/li>';
targets += '<li>has a relative hydrophobicity between ';
targets += $format(nf, logp - 1.5);
targets += ' and ';
targets += $format(nf, logp - 0.5);
targets += '<\/li>';
targets += '<li>has a relative hydrophobicity between ';
targets += $format(nf, logp + 0.5);
targets += ' and ';
targets += $format(nf, logp + 1.5);
targets += '<\/li>';
targets += '<\/ul><\/body><\/html>';
}
return new JsMolCalc$InfoAndTargets_0(moleculeInfo);
}
function $prettyPrint(atomLabel, number, outString){
if (number == 0) {
return;
}
$append(outString.impl, atomLabel);
if (number == 1) {
outString.impl.string += ' ';
return;
}
$append(outString.impl, '<sub>' + number + '<\/sub> ');
}
function JsMolCalc_0(){
new ArrayList_0;
}
defineSeed(43, 1, {}, JsMolCalc_0);
function $addBondToNonHAtom(this$static, bondIndex){
this$static.numBondsToNonHAtoms = this$static.numBondsToNonHAtoms + bondIndex;
}
--></script>
<script><!--
function $getAtomSpec(this$static){ function $getAtomSpec(this$static){
var charged; var charged;
this$static.chargeOffset = 0; this$static.chargeOffset = 0;
...@@ -1041,30 +1341,30 @@ function $getAtomSpec(this$static){ ...@@ -1041,30 +1341,30 @@ function $getAtomSpec(this$static){
case 3: case 3:
switch (this$static.numNeighborHs) { switch (this$static.numNeighborHs) {
case 4: case 4:
return new AtomSpec_0(0.528, 'C: sp3, H4', false, false); return new JsMolCalc$AtomSpec_0(0.528, 'C: sp3, H4', false, false);
case 3: case 3:
return this$static.numNeighborXs == 0?this$static.numNeighborPi == 0?new AtomSpec_0(0.528, 'C: sp3; C H H H, no pi', false, false):new AtomSpec_0(0.267, 'C: sp3; C H H H, pi', false, false):new AtomSpec_0(-0.032, 'C: sp3; X H H H', false, false); return this$static.numNeighborXs == 0?this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.528, 'C: sp3; C H H H, no pi', false, false):new JsMolCalc$AtomSpec_0(0.267, 'C: sp3; C H H H, pi', false, false):new JsMolCalc$AtomSpec_0(-0.032, 'C: sp3; X H H H', false, false);
case 2: case 2:
if (this$static.numNeighborXs == 0) { if (this$static.numNeighborXs == 0) {
switch (this$static.numNeighborPi) { switch (this$static.numNeighborPi) {
case 0: case 0:
return new AtomSpec_0(0.358, 'C: sp3; C C H H, no pi', false, false); return new JsMolCalc$AtomSpec_0(0.358, 'C: sp3; C C H H, no pi', false, false);
case 1: case 1:
return new AtomSpec_0(-0.008, 'C: sp3; C C H H, 1 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.008, 'C: sp3; C C H H, 1 pi', false, false);
case 2: case 2:
return new AtomSpec_0(-0.185, 'C: sp3; C C H H, 2 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.185, 'C: sp3; C C H H, 2 pi', false, false);
default:return new AtomSpec_0(0, 'C: sp3; ? ? H H', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: sp3; ? ? H H', false, false);
} }
} }
else { else {
switch (this$static.numNeighborPi) { switch (this$static.numNeighborPi) {
case 0: case 0:
return new AtomSpec_0(-0.137, 'C: sp3; C X H H, no pi', false, false); return new JsMolCalc$AtomSpec_0(-0.137, 'C: sp3; C X H H, no pi', false, false);
case 1: case 1:
return new AtomSpec_0(-0.303, 'C: sp3; C X H H, 1 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.303, 'C: sp3; C X H H, 1 pi', false, false);
case 2: case 2:
return new AtomSpec_0(-0.815, 'C: sp3; C X H H, 2 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.815, 'C: sp3; C X H H, 2 pi', false, false);
default:return new AtomSpec_0(0, 'C: sp3; ? X H H, H2', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: sp3; ? X H H, H2', false, false);
} }
} }
...@@ -1072,19 +1372,19 @@ function $getAtomSpec(this$static){ ...@@ -1072,19 +1372,19 @@ function $getAtomSpec(this$static){
if (this$static.numNeighborXs == 0) { if (this$static.numNeighborXs == 0) {
switch (this$static.numNeighborPi) { switch (this$static.numNeighborPi) {
case 0: case 0:
return new AtomSpec_0(0.127, 'C: sp3; C C C H, no pi', false, false); return new JsMolCalc$AtomSpec_0(0.127, 'C: sp3; C C C H, no pi', false, false);
case 1: case 1:
return new AtomSpec_0(-0.243, 'C: sp3; C C C H, 1 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.243, 'C: sp3; C C C H, 1 pi', false, false);
default:return new AtomSpec_0(-0.499, 'C: sp3; C C C H, >1 pi', false, false); default:return new JsMolCalc$AtomSpec_0(-0.499, 'C: sp3; C C C H, >1 pi', false, false);
} }
} }
else { else {
switch (this$static.numNeighborPi) { switch (this$static.numNeighborPi) {
case 0: case 0:
return new AtomSpec_0(-0.205, 'C: sp3; C C/X X H, no pi', false, false); return new JsMolCalc$AtomSpec_0(-0.205, 'C: sp3; C C/X X H, no pi', false, false);
case 1: case 1:
return new AtomSpec_0(-0.305, 'C: sp3; C C/X X H, 1 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.305, 'C: sp3; C C/X X H, 1 pi', false, false);
default:return new AtomSpec_0(-0.709, 'C: sp3; C C/X X H, >1 pi', false, false); default:return new JsMolCalc$AtomSpec_0(-0.709, 'C: sp3; C C/X X H, >1 pi', false, false);
} }
} }
...@@ -1092,74 +1392,74 @@ function $getAtomSpec(this$static){ ...@@ -1092,74 +1392,74 @@ function $getAtomSpec(this$static){
if (this$static.numNeighborXs == 0) { if (this$static.numNeighborXs == 0) {
switch (this$static.numNeighborPi) { switch (this$static.numNeighborPi) {
case 0: case 0:
return new AtomSpec_0(-0.006, 'C: sp3; C C C C, no pi', false, false); return new JsMolCalc$AtomSpec_0(-0.006, 'C: sp3; C C C C, no pi', false, false);
case 1: case 1:
return new AtomSpec_0(-0.57, 'C: sp3; C C C C, 1 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.57, 'C: sp3; C C C C, 1 pi', false, false);
default:return new AtomSpec_0(-0.317, 'C: sp3; C C C C, >1 pi', false, false); default:return new JsMolCalc$AtomSpec_0(-0.317, 'C: sp3; C C C C, >1 pi', false, false);
} }
} }
else { else {
switch (this$static.numNeighborPi) { switch (this$static.numNeighborPi) {
case 0: case 0:
return new AtomSpec_0(-0.316, 'C: sp3; C C/X C/X X, no pi', false, false); return new JsMolCalc$AtomSpec_0(-0.316, 'C: sp3; C C/X C/X X, no pi', false, false);
default:return new AtomSpec_0(-0.723, 'C: sp3; C C/X C/X X, pi', false, false); default:return new JsMolCalc$AtomSpec_0(-0.723, 'C: sp3; C C/X C/X X, pi', false, false);
} }
} }
default:return new AtomSpec_0(0, 'C: sp3; unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: sp3; unknown', false, false);
} }
case 2: case 2:
if (!this$static.aromatic) { if (!this$static.aromatic) {
switch (this$static.numNeighborHs) { switch (this$static.numNeighborHs) {
case 2: case 2:
return new AtomSpec_0(0.42, 'C: sp2; =? H H', false, false); return new JsMolCalc$AtomSpec_0(0.42, 'C: sp2; =? H H', false, false);
case 1: case 1:
switch (this$static.numNeighborXs) { switch (this$static.numNeighborXs) {
case 1: case 1:
return this$static.numNeighborPi == 0?new AtomSpec_0(0.001, 'C: sp2; =? X H, no pi', false, false):new AtomSpec_0(-0.31, 'C: sp2; =? X H, 1 pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.001, 'C: sp2; =? X H, no pi', false, false):new JsMolCalc$AtomSpec_0(-0.31, 'C: sp2; =? X H, 1 pi', false, false);
case 0: case 0:
return this$static.numNeighborPi == 0?new AtomSpec_0(0.466, 'C: sp2; =? C H, no pi', false, false):new AtomSpec_0(0.136, 'C: sp2; =? C H, 1 pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.466, 'C: sp2; =? C H, no pi', false, false):new JsMolCalc$AtomSpec_0(0.136, 'C: sp2; =? C H, 1 pi', false, false);
default:return new AtomSpec_0(0, 'C: sp2; =? H, unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: sp2; =? H, unknown', false, false);
} }
case 0: case 0:
switch (this$static.numNeighborXs) { switch (this$static.numNeighborXs) {
case 2: case 2:
return this$static.numNeighborPi == 0?new AtomSpec_0(0.005, 'C: sp2; =? X X, no pi', false, false):new AtomSpec_0(-0.315, 'C: sp2; =? X X, pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.005, 'C: sp2; =? X X, no pi', false, false):new JsMolCalc$AtomSpec_0(-0.315, 'C: sp2; =? X X, pi', false, false);
case 1: case 1:
return this$static.numNeighborPi == 0?new AtomSpec_0(-0.03, 'C: sp2; =? C X, no pi', false, false):new AtomSpec_0(-0.027, 'C: sp2; =? C X, pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(-0.03, 'C: sp2; =? C X, no pi', false, false):new JsMolCalc$AtomSpec_0(-0.027, 'C: sp2; =? C X, pi', false, false);
case 0: case 0:
return this$static.numNeighborPi == 0?new AtomSpec_0(0.05, 'C: sp2; =? C C, no pi', false, false):new AtomSpec_0(0.013, 'C: sp2; =? C C, pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.05, 'C: sp2; =? C C, no pi', false, false):new JsMolCalc$AtomSpec_0(0.013, 'C: sp2; =? C C, pi', false, false);
default:return new AtomSpec_0(0, 'C: sp2; =? C C, unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: sp2; =? C C, unknown', false, false);
} }
default:return new AtomSpec_0(0, 'C: sp2; unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: sp2; unknown', false, false);
} }
} }
switch (this$static.numNeighborHs) { switch (this$static.numNeighborHs) {
case 1: case 1:
return this$static.numNeighborNAro == 0?new AtomSpec_0(0.337, 'C: aromatic; C C H', false, false):new AtomSpec_0(0.126, 'C: aromatic; aro-N C H', false, false); return this$static.numNeighborNAro == 0?new JsMolCalc$AtomSpec_0(0.337, 'C: aromatic; C C H', false, false):new JsMolCalc$AtomSpec_0(0.126, 'C: aromatic; aro-N C H', false, false);
case 0: case 0:
switch (this$static.numNeighborXs) { switch (this$static.numNeighborXs) {
case 2: case 2:
return this$static.numNeighborNAro == 0?new AtomSpec_0(0, 'C: aromatic; unknown C X X', false, false):new AtomSpec_0(0.366, 'C: aromatic; aro-N C X', false, false); return this$static.numNeighborNAro == 0?new JsMolCalc$AtomSpec_0(0, 'C: aromatic; unknown C X X', false, false):new JsMolCalc$AtomSpec_0(0.366, 'C: aromatic; aro-N C X', false, false);
case 1: case 1:
return this$static.numNeighborNAro == 0?new AtomSpec_0(-0.151, 'C: aromatic; C C X', false, false):new AtomSpec_0(0.174, 'C: aromatic; aro-N C C', false, false); return this$static.numNeighborNAro == 0?new JsMolCalc$AtomSpec_0(-0.151, 'C: aromatic; C C X', false, false):new JsMolCalc$AtomSpec_0(0.174, 'C: aromatic; aro-N C C', false, false);
case 0: case 0:
return new AtomSpec_0(0.296, 'C: aromatic; C C C', false, false); return new JsMolCalc$AtomSpec_0(0.296, 'C: aromatic; C C C', false, false);
default:return new AtomSpec_0(0, 'C: aromatic; unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: aromatic; unknown', false, false);
} }
default:return new AtomSpec_0(0, 'C: aromatic; unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: aromatic; unknown', false, false);
} }
case 1: case 1:
if (this$static.isAnAllene) if (this$static.isAnAllene)
return new AtomSpec_0(2.073, 'C: =C=', false, false); return new JsMolCalc$AtomSpec_0(2.073, 'C: =C=', false, false);
return this$static.numNeighborHs == 0?new AtomSpec_0(0.33, 'C: sp; ? ?', false, false):new AtomSpec_0(0.209, 'C: sp; ? H', false, false); return this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(0.33, 'C: sp; ? ?', false, false):new JsMolCalc$AtomSpec_0(0.209, 'C: sp; ? H', false, false);
default:return new AtomSpec_0(0, 'C: unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: unknown', false, false);
} }
} }
if ($equals(this$static.element, 'N')) { if ($equals(this$static.element, 'N')) {
...@@ -1196,11 +1496,11 @@ function $getAtomSpec(this$static){ ...@@ -1196,11 +1496,11 @@ function $getAtomSpec(this$static){
if (this$static.amide) { if (this$static.amide) {
switch (this$static.numNeighborHs) { switch (this$static.numNeighborHs) {
case 2: case 2:
return new AtomSpec_0(-0.646 + this$static.chargeOffset, 'N: amide; C=O H H' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(-0.646 + this$static.chargeOffset, 'N: amide; C=O H H' + this$static.chargeString, true, charged);
case 1: case 1:
return this$static.numNeighborXs == 0?new AtomSpec_0(-0.096 + this$static.chargeOffset, 'N: amide; C=O C H' + this$static.chargeString, true, charged):new AtomSpec_0(-0.044 + this$static.chargeOffset, 'N: amide; C=O X H' + this$static.chargeString, true, charged); return this$static.numNeighborXs == 0?new JsMolCalc$AtomSpec_0(-0.096 + this$static.chargeOffset, 'N: amide; C=O C H' + this$static.chargeString, true, charged):new JsMolCalc$AtomSpec_0(-0.044 + this$static.chargeOffset, 'N: amide; C=O X H' + this$static.chargeString, true, charged);
case 0: case 0:
return this$static.numNeighborXs == 0?new AtomSpec_0(0.078 + this$static.chargeOffset, 'N: amide; C=O C C' + this$static.chargeString, !charged, charged):new AtomSpec_0(-0.118 + this$static.chargeOffset, 'N: amide; C=O C X' + this$static.chargeString, !charged, charged); return this$static.numNeighborXs == 0?new JsMolCalc$AtomSpec_0(0.078 + this$static.chargeOffset, 'N: amide; C=O C C' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(-0.118 + this$static.chargeOffset, 'N: amide; C=O C X' + this$static.chargeString, !charged, charged);
} }
} }
switch (this$static.hybridization) { switch (this$static.hybridization) {
...@@ -1208,40 +1508,40 @@ function $getAtomSpec(this$static){ ...@@ -1208,40 +1508,40 @@ function $getAtomSpec(this$static){
switch (this$static.numNeighborHs) { switch (this$static.numNeighborHs) {
case 2: case 2:
if (this$static.numNeighborXs != 0) if (this$static.numNeighborXs != 0)
return new AtomSpec_0(-1.082 + this$static.chargeOffset, 'N: sp3; X H H' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(-1.082 + this$static.chargeOffset, 'N: sp3; X H H' + this$static.chargeString, true, charged);
return this$static.numNeighborPi == 0?new AtomSpec_0(-0.534 + this$static.chargeOffset, 'N: sp3; C H H, no pi' + this$static.chargeString, true, charged):new AtomSpec_0(-0.329 + this$static.chargeOffset, 'N: sp3; C H H, pi' + this$static.chargeString, true, charged); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(-0.534 + this$static.chargeOffset, 'N: sp3; C H H, no pi' + this$static.chargeString, true, charged):new JsMolCalc$AtomSpec_0(-0.329 + this$static.chargeOffset, 'N: sp3; C H H, pi' + this$static.chargeString, true, charged);
case 1: case 1:
if (this$static.numNeighborXs != 0) if (this$static.numNeighborXs != 0)
return new AtomSpec_0(0.324 + this$static.chargeOffset, 'N: sp3; C X H' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(0.324 + this$static.chargeOffset, 'N: sp3; C X H' + this$static.chargeString, true, charged);
return this$static.numNeighborPi == 0?new AtomSpec_0(-0.112 + this$static.chargeOffset, 'N: sp3; C C H, no pi' + this$static.chargeString, true, charged):new AtomSpec_0(0.166 + this$static.chargeOffset, 'N: sp3; C C H, pi' + this$static.chargeString, true, charged); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(-0.112 + this$static.chargeOffset, 'N: sp3; C C H, no pi' + this$static.chargeString, true, charged):new JsMolCalc$AtomSpec_0(0.166 + this$static.chargeOffset, 'N: sp3; C C H, pi' + this$static.chargeString, true, charged);
case 0: case 0:
if (this$static.numNeighborXs != 0) if (this$static.numNeighborXs != 0)
return new AtomSpec_0(-0.239 + this$static.chargeOffset, 'N: sp3; C C X' + this$static.chargeString, !charged, charged); return new JsMolCalc$AtomSpec_0(-0.239 + this$static.chargeOffset, 'N: sp3; C C X' + this$static.chargeString, !charged, charged);
return this$static.numNeighborPi == 0?new AtomSpec_0(0.159 + this$static.chargeOffset, 'N: sp3; C C C, no pi' + this$static.chargeString, !charged, charged):new AtomSpec_0(0.761 + this$static.chargeOffset, 'N: sp3; C C C, pi' + this$static.chargeString, !charged, charged); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.159 + this$static.chargeOffset, 'N: sp3; C C C, no pi' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(0.761 + this$static.chargeOffset, 'N: sp3; C C C, pi' + this$static.chargeString, !charged, charged);
default:return new AtomSpec_0(this$static.chargeOffset, 'N: sp3; unknown' + this$static.chargeString, true, charged); default:return new JsMolCalc$AtomSpec_0(this$static.chargeOffset, 'N: sp3; unknown' + this$static.chargeString, true, charged);
} }
case 2: case 2:
if (this$static.aromatic) { if (this$static.aromatic) {
return new AtomSpec_0(-0.493 + this$static.chargeOffset, 'N: aromatic' + this$static.chargeString, !charged, charged); return new JsMolCalc$AtomSpec_0(-0.493 + this$static.chargeOffset, 'N: aromatic' + this$static.chargeString, !charged, charged);
} }
if ($equals(this$static.doubleBondedNeighbor, 'C')) { if ($equals(this$static.doubleBondedNeighbor, 'C')) {
return this$static.numNeighborXs == 0?this$static.numNeighborPi == 0?this$static.numNeighborHs == 0?new AtomSpec_0(0.007 + this$static.chargeOffset, 'N: sp2; =C ? no H, no pi' + this$static.chargeString, !charged, charged):new AtomSpec_0(0.007 + this$static.chargeOffset, 'N: sp2; =C ? H, no pi' + this$static.chargeString, true, charged):this$static.numNeighborHs == 0?new AtomSpec_0(-0.275 + this$static.chargeOffset, 'N: sp2; =C ? no H, pi' + this$static.chargeString, !charged, charged):new AtomSpec_0(-0.275 + this$static.chargeOffset, 'N: sp2; =C ? H, pi' + this$static.chargeString, true, charged):this$static.numNeighborPi == 0?this$static.numNeighborHs == 0?new AtomSpec_0(0.366 + this$static.chargeOffset, 'N: sp2; =C X no H, no pi' + this$static.chargeString, !charged, charged):new AtomSpec_0(0.366 + this$static.chargeOffset, 'N: sp2; =C X H, no pi' + this$static.chargeString, true, charged):this$static.numNeighborHs == 0?new AtomSpec_0(0.251 + this$static.chargeOffset, 'N: sp2; =C X no H, pi' + this$static.chargeString, !charged, charged):new AtomSpec_0(0.251 + this$static.chargeOffset, 'N: sp2; =C X H, pi' + this$static.chargeString, true, charged); return this$static.numNeighborXs == 0?this$static.numNeighborPi == 0?this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(0.007 + this$static.chargeOffset, 'N: sp2; =C ? no H, no pi' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(0.007 + this$static.chargeOffset, 'N: sp2; =C ? H, no pi' + this$static.chargeString, true, charged):this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(-0.275 + this$static.chargeOffset, 'N: sp2; =C ? no H, pi' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(-0.275 + this$static.chargeOffset, 'N: sp2; =C ? H, pi' + this$static.chargeString, true, charged):this$static.numNeighborPi == 0?this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(0.366 + this$static.chargeOffset, 'N: sp2; =C X no H, no pi' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(0.366 + this$static.chargeOffset, 'N: sp2; =C X H, no pi' + this$static.chargeString, true, charged):this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(0.251 + this$static.chargeOffset, 'N: sp2; =C X no H, pi' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(0.251 + this$static.chargeOffset, 'N: sp2; =C X H, pi' + this$static.chargeString, true, charged);
} }
if ($equals(this$static.doubleBondedNeighbor, 'N')) { if ($equals(this$static.doubleBondedNeighbor, 'N')) {
return this$static.numNeighborXs == 1?this$static.numNeighborHs == 0?new AtomSpec_0(0.536 + this$static.chargeOffset, 'N: sp2; =N ? no H' + this$static.chargeString, !charged, charged):new AtomSpec_0(0.536 + this$static.chargeOffset, 'N: sp2; =N ? H' + this$static.chargeString, true, charged):this$static.numNeighborHs == 0?new AtomSpec_0(-0.597 + this$static.chargeOffset, 'N: sp2; =N X no H' + this$static.chargeString, !charged, charged):new AtomSpec_0(-0.597 + this$static.chargeOffset, 'N: sp2; =N X H' + this$static.chargeString, true, charged); return this$static.numNeighborXs == 1?this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(0.536 + this$static.chargeOffset, 'N: sp2; =N ? no H' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(0.536 + this$static.chargeOffset, 'N: sp2; =N ? H' + this$static.chargeString, true, charged):this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(-0.597 + this$static.chargeOffset, 'N: sp2; =N X no H' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(-0.597 + this$static.chargeOffset, 'N: sp2; =N X H' + this$static.chargeString, true, charged);
} }
if ($equals(this$static.doubleBondedNeighbor, 'O')) if ($equals(this$static.doubleBondedNeighbor, 'O'))
return new AtomSpec_0(0.427 + this$static.chargeOffset, 'N: nitroso' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(0.427 + this$static.chargeOffset, 'N: nitroso' + this$static.chargeString, true, charged);
if (this$static.numNeighborXs != 0) if (this$static.numNeighborXs != 0)
return new AtomSpec_0(0.427, 'N: sp2; =? ?', true, charged); return new JsMolCalc$AtomSpec_0(0.427, 'N: sp2; =? ?', true, charged);
return new AtomSpec_0(this$static.chargeOffset, 'N: sp2; unknown' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(this$static.chargeOffset, 'N: sp2; unknown' + this$static.chargeString, true, charged);
case 1: case 1:
return $equals(this$static.doubleBondedNeighbor, 'O2')?new AtomSpec_0(1.178, 'N: nitro', true, false):this$static.numNeighborHs == 0?new AtomSpec_0(-0.566 + this$static.chargeOffset, 'N: sp no H' + this$static.chargeString, !charged, charged):new AtomSpec_0(-0.566 + this$static.chargeOffset, 'N: sp H' + this$static.chargeString, true, charged); return $equals(this$static.doubleBondedNeighbor, 'O2')?new JsMolCalc$AtomSpec_0(1.178, 'N: nitro', true, false):this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(-0.566 + this$static.chargeOffset, 'N: sp no H' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(-0.566 + this$static.chargeOffset, 'N: sp H' + this$static.chargeString, true, charged);
default:return new AtomSpec_0(this$static.chargeOffset, 'N: unknown' + this$static.chargeString, true, charged); default:return new JsMolCalc$AtomSpec_0(this$static.chargeOffset, 'N: unknown' + this$static.chargeString, true, charged);
} }
} }
if ($equals(this$static.element, 'O')) { if ($equals(this$static.element, 'O')) {
...@@ -1256,18 +1556,18 @@ function $getAtomSpec(this$static){ ...@@ -1256,18 +1556,18 @@ function $getAtomSpec(this$static){
switch (this$static.numNeighborHs) { switch (this$static.numNeighborHs) {
case 1: case 1:
if (this$static.numNeighborXs != 0) if (this$static.numNeighborXs != 0)
return new AtomSpec_0(-0.522 + this$static.chargeOffset, 'O: sp3; X H' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(-0.522 + this$static.chargeOffset, 'O: sp3; X H' + this$static.chargeString, true, charged);
return this$static.numNeighborPi == 0?new AtomSpec_0(-0.467 + this$static.chargeOffset, 'O: sp3; C H, no pi' + this$static.chargeString, true, charged):new AtomSpec_0(0.082 + this$static.chargeOffset, 'O: sp3; C H, pi' + this$static.chargeString, true, charged); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(-0.467 + this$static.chargeOffset, 'O: sp3; C H, no pi' + this$static.chargeString, true, charged):new JsMolCalc$AtomSpec_0(0.082 + this$static.chargeOffset, 'O: sp3; C H, pi' + this$static.chargeString, true, charged);
case 0: case 0:
if (this$static.numNeighborXs != 0) if (this$static.numNeighborXs != 0)
return new AtomSpec_0(0.105 + this$static.chargeOffset, 'O: sp3; C X' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(0.105 + this$static.chargeOffset, 'O: sp3; C X' + this$static.chargeString, true, charged);
return this$static.numNeighborPi == 0?new AtomSpec_0(0.084 + this$static.chargeOffset, 'O: sp3; C C, no pi' + this$static.chargeString, true, charged):new AtomSpec_0(0.435 + this$static.chargeOffset, 'O: sp3; C C, pi' + this$static.chargeString, true, charged); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.084 + this$static.chargeOffset, 'O: sp3; C C, no pi' + this$static.chargeString, true, charged):new JsMolCalc$AtomSpec_0(0.435 + this$static.chargeOffset, 'O: sp3; C C, pi' + this$static.chargeString, true, charged);
default:return new AtomSpec_0(this$static.chargeOffset, 'O: sp3; unknown' + this$static.chargeString, true, charged); default:return new JsMolCalc$AtomSpec_0(this$static.chargeOffset, 'O: sp3; unknown' + this$static.chargeString, true, charged);
} }
case 2: case 2:
return new AtomSpec_0(-0.399 + this$static.chargeOffset, 'O: sp2' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(-0.399 + this$static.chargeOffset, 'O: sp2' + this$static.chargeString, true, charged);
default:return new AtomSpec_0(this$static.chargeOffset, 'O: unknown' + this$static.chargeString, true, charged); default:return new JsMolCalc$AtomSpec_0(this$static.chargeOffset, 'O: unknown' + this$static.chargeString, true, charged);
} }
} }
if ($equals(this$static.element, 'S')) { if ($equals(this$static.element, 'S')) {
...@@ -1279,39 +1579,39 @@ function $getAtomSpec(this$static){ ...@@ -1279,39 +1579,39 @@ function $getAtomSpec(this$static){
} }
switch (this$static.hybridization) { switch (this$static.hybridization) {
case 3: case 3:
return this$static.numNeighborHs == 0?new AtomSpec_0(0.255 + this$static.chargeOffset, 'S: sp3; C/X C/X' + this$static.chargeString, false, charged):new AtomSpec_0(0.419 + this$static.chargeOffset, 'S: sp3; C/X H' + this$static.chargeString, false, charged); return this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(0.255 + this$static.chargeOffset, 'S: sp3; C/X C/X' + this$static.chargeString, false, charged):new JsMolCalc$AtomSpec_0(0.419 + this$static.chargeOffset, 'S: sp3; C/X H' + this$static.chargeString, false, charged);
case 2: case 2:
return $equals(this$static.doubleBondedNeighbor, 'O')?new AtomSpec_0(-1.375, 'S: sulfoxide', false, charged):new AtomSpec_0(-0.148 + this$static.chargeOffset, 'S: sp2' + this$static.chargeString, false, charged); return $equals(this$static.doubleBondedNeighbor, 'O')?new JsMolCalc$AtomSpec_0(-1.375, 'S: sulfoxide', false, charged):new JsMolCalc$AtomSpec_0(-0.148 + this$static.chargeOffset, 'S: sp2' + this$static.chargeString, false, charged);
case 1: case 1:
if ($equals(this$static.doubleBondedNeighbor, 'O2')) { if ($equals(this$static.doubleBondedNeighbor, 'O2')) {
return new AtomSpec_0(-0.168, 'S: sulfone', false, charged); return new JsMolCalc$AtomSpec_0(-0.168, 'S: sulfone', false, charged);
} }
default:return new AtomSpec_0(this$static.chargeOffset, 'S: unknown' + this$static.chargeString, false, charged); default:return new JsMolCalc$AtomSpec_0(this$static.chargeOffset, 'S: unknown' + this$static.chargeString, false, charged);
} }
} }
if ($equals(this$static.element, 'P') && this$static.hybridization == 2) { if ($equals(this$static.element, 'P') && this$static.hybridization == 2) {
if ($equals(this$static.doubleBondedNeighbor, 'O')) { if ($equals(this$static.doubleBondedNeighbor, 'O')) {
return new AtomSpec_0(-0.447, 'P: in phosphate', false, false); return new JsMolCalc$AtomSpec_0(-0.447, 'P: in phosphate', false, false);
} }
if ($equals(this$static.doubleBondedNeighbor, 'S')) { if ($equals(this$static.doubleBondedNeighbor, 'S')) {
return new AtomSpec_0(1.253, 'P: in thio-phosphate', false, false); return new JsMolCalc$AtomSpec_0(1.253, 'P: in thio-phosphate', false, false);
} }
return new AtomSpec_0(0, 'P: unknown', false, false); return new JsMolCalc$AtomSpec_0(0, 'P: unknown', false, false);
} }
if ($equals(this$static.element, 'F')) { if ($equals(this$static.element, 'F')) {
return this$static.numNeighborPi == 0?new AtomSpec_0(0.375, 'F; no pi', false, false):new AtomSpec_0(0.202, 'F; pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.375, 'F; no pi', false, false):new JsMolCalc$AtomSpec_0(0.202, 'F; pi', false, false);
} }
if ($equals(this$static.element, 'Cl')) { if ($equals(this$static.element, 'Cl')) {
return this$static.numNeighborPi == 0?new AtomSpec_0(0.512, 'Cl; no pi', false, false):new AtomSpec_0(0.663, 'Cl; pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.512, 'Cl; no pi', false, false):new JsMolCalc$AtomSpec_0(0.663, 'Cl; pi', false, false);
} }
if ($equals(this$static.element, 'Br')) { if ($equals(this$static.element, 'Br')) {
return this$static.numNeighborPi == 0?new AtomSpec_0(0.85, 'Br; no pi', false, false):new AtomSpec_0(0.839, 'Br; pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.85, 'Br; no pi', false, false):new JsMolCalc$AtomSpec_0(0.839, 'Br; pi', false, false);
} }
if ($equals(this$static.element, 'I')) { if ($equals(this$static.element, 'I')) {
return this$static.numNeighborPi == 0?new AtomSpec_0(1.05, 'I; no pi', false, false):new AtomSpec_0(1.109, 'I; pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(1.05, 'I; no pi', false, false):new JsMolCalc$AtomSpec_0(1.109, 'I; pi', false, false);
} }
return new AtomSpec_0(0, 'unknown atom', false, false); return new JsMolCalc$AtomSpec_0(0, 'unknown atom', false, false);
} }
function $getNumNeighborHs(this$static){ function $getNumNeighborHs(this$static){
...@@ -1361,7 +1661,7 @@ function $updateHybridization(this$static, bondIndex){ ...@@ -1361,7 +1661,7 @@ function $updateHybridization(this$static, bondIndex){
} }
} }
function Atom_0(){ function JsMolCalc$Atom_0(){
this.element = ''; this.element = '';
this.charge = 0; this.charge = 0;
this.aromatic = false; this.aromatic = false;
...@@ -1380,9 +1680,10 @@ function Atom_0(){ ...@@ -1380,9 +1680,10 @@ function Atom_0(){
this.alreadyHasOneDoubleBond = false; this.alreadyHasOneDoubleBond = false;
this.isAnAllene = false; this.isAnAllene = false;
this.currentMaxBondIndex = 0; this.currentMaxBondIndex = 0;
this.numBondsToNonHAtoms = 0;
} }
defineSeed(43, 1, makeCastMap([Q$Atom]), Atom_0); defineSeed(44, 1, makeCastMap([Q$JsMolCalc$Atom]), JsMolCalc$Atom_0);
_.alreadyHasOneDoubleBond = false; _.alreadyHasOneDoubleBond = false;
_.amide = false; _.amide = false;
_.aromatic = false; _.aromatic = false;
...@@ -1395,506 +1696,40 @@ _.element = null; ...@@ -1395,506 +1696,40 @@ _.element = null;
_.hybridization = 0; _.hybridization = 0;
_.isACarbonyl = false; _.isACarbonyl = false;
_.isAnAllene = false; _.isAnAllene = false;
_.numBondsToNonHAtoms = 0;
_.numNeighborAro = 0; _.numNeighborAro = 0;
_.numNeighborCs = 0; _.numNeighborCs = 0;
_.numNeighborHs = 0; _.numNeighborHs = 0;
_.numNeighborNAro = 0; _.numNeighborNAro = 0;
_.numNeighborPi = 0; _.numNeighborPi = 0;
_.numNeighborXs = 0; _.numNeighborXs = 0;
function AtomSpec_0(logp, type, canMakeHbonds, canMakeIonicBonds){ function JsMolCalc$AtomSpec_0(logp, type, canMakeHbonds, canMakeIonicBonds){
this.type = type; this.type = type;
this.logp = logp; this.logp = logp;
this.canMakeHbonds = canMakeHbonds; this.canMakeHbonds = canMakeHbonds;
this.canMakeIonicBonds = canMakeIonicBonds; this.canMakeIonicBonds = canMakeIonicBonds;
} }
defineSeed(44, 1, {}, AtomSpec_0); defineSeed(45, 1, {}, JsMolCalc$AtomSpec_0);
_.canMakeHbonds = false; _.canMakeHbonds = false;
_.canMakeIonicBonds = false; _.canMakeIonicBonds = false;
_.logp = 0; _.logp = 0;
_.type = null; _.type = null;
function InfoAndTargets_0(info, targets){ function JsMolCalc$InfoAndTargets_0(info){
this.info = info; this.info = info;
this.targets = targets;
} }
defineSeed(45, 1, {}, InfoAndTargets_0); defineSeed(46, 1, {}, JsMolCalc$InfoAndTargets_0);
_.info = null; _.info = null;
_.targets = null; function JsMolCalcAPI$API_0(){
function $export_0(){
if (!exported_0) {
exported_0 = true;
$export0_0();
}
}
function $export0_0(){
var pkg = declarePackage('edu.umb.bio.jsMolCalc.JsMolCalcAPI.Info');
var __0;
$wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Info = $entry(function(){
var g, j = this;
isAssignableToInstance(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Info_2_classLit, arguments)?(g = arguments[0]):arguments.length == 1 && (g = ___create(gwtInstance(arguments[0])));
j.g = g;
setWrapper(g, j);
return j;
}
);
__0 = $wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Info.prototype = new Object;
__0.toString = $entry(function(){
return this.g.toString_0();
}
);
addTypeMap(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Info_2_classLit, $wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Info);
if (pkg)
for (p in pkg)
$wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Info[p] === undefined && ($wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Info[p] = pkg[p]);
} }
function InfoExporterImpl_0(){ defineSeed(47, 1, makeCastMap([Q$Exportable]), JsMolCalcAPI$API_0);
$export_0(); function ArrayStoreException_0(){
$fillInStackTrace();
} }
function ___create(a0){ defineSeed(48, 6, makeCastMap([Q$Serializable, Q$Throwable]), ArrayStoreException_0);
return new JsMolCalcAPI$Info_0(a0);
}
defineSeed(46, 1, {}, InfoExporterImpl_0);
var exported_0 = false;
--></script>
<script><!--
function computeAndDisplay(molString, smileString, jmeString){
var atom, atomDataLines, atomLineParts, atomList, atomNumber, bondArray, bondIndex, bondLineParts, br, c, canMakeHbonds, canMakeIonicBonds, charge, chargeLineParts, cl, currentAtom, currentAtomSpec, currentNeighbor, element, errorString, f, fifthAtom, firstAtom, formula, fourthAtom, h, i, illegalAtoms, info, iodine, j, k, l, line3Parts, logp, m, molStringLines, n, neighbors, nf, numAromaticAtoms, numAtoms, numBonds, o, p_0, s, secondAtom, sixthAtom, targets, thirdAtom;
if ($equals(molString, '') || $equals(smileString, '') || $equals(jmeString, '')) {
return new InfoAndTargets_0(null, null);
}
atomDataLines = new StringBuffer_0;
atomList = new ArrayList_0;
$add_0(atomList, new Atom_0);
molStringLines = $split(molString, '\n', 0);
line3Parts = $split(molStringLines[3], '[ ]+', 0);
numAtoms = __parseAndValidateInt(line3Parts[1]);
numBonds = __parseAndValidateInt(line3Parts[2]);
for (i = 1; i < numAtoms + 1; ++i) {
atomLineParts = $split(molStringLines[i + 3], '[ ]+', 0);
element = atomLineParts[4];
atom = new Atom_0;
atom.element = element;
setCheck(atomList.array, atomList.size++, atom);
}
for (i = 0; i < molStringLines.length; ++i) {
if (molStringLines[i].indexOf('CHG') != -1) {
chargeLineParts = $split(molStringLines[i], '[ ]+', 0);
atomNumber = __parseAndValidateInt(chargeLineParts[3]);
charge = __parseAndValidateInt(chargeLineParts[4]);
atom = dynamicCast((checkIndex(atomNumber, atomList.size) , atomList.array[atomNumber]), Q$Atom);
atom.charge = charge;
}
}
bondArray = initDims([_3_3I_classLit, _3I_classLit], [makeCastMap([Q$Serializable]), makeCastMap([Q$int_$1, Q$Serializable])], [Q$int_$1, -1], [numAtoms + 1, numAtoms + 1], 2, 1);
for (i = 1; i < numAtoms + 1; ++i) {
fill(bondArray[i], bondArray[i].length);
}
for (i = 1; i < numBonds + 1; ++i) {
bondLineParts = $split(molStringLines[i + numAtoms + 3], '[ ]+', 0);
firstAtom = __parseAndValidateInt(bondLineParts[1]);
secondAtom = __parseAndValidateInt(bondLineParts[2]);
bondIndex = __parseAndValidateInt(bondLineParts[3]);
bondArray[firstAtom][secondAtom] = bondIndex;
bondArray[secondAtom][firstAtom] = bondIndex;
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
bondArray[i][j] != 0 && $updateHybridization(currentAtom, bondArray[i][j]);
}
}
for (i = 1; i < numAtoms + 1; ++i) {
firstAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
if (($equals(firstAtom.element, 'C') || $equals(firstAtom.element, 'N')) && (firstAtom.hybridization == 2 || firstAtom.aromatic)) {
for (j = 1; j < numAtoms + 1; ++j) {
secondAtom = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$Atom);
if ((bondArray[i][j] == 1 || bondArray[i][j] == 2 || secondAtom.aromatic && bondArray[i][j] != 0 || firstAtom.aromatic && bondArray[i][j] != 0) && ($equals(secondAtom.element, 'C') || $equals(secondAtom.element, 'N')) && secondAtom.hybridization == 2 && i != j) {
for (k = 1; k < numAtoms + 1; ++k) {
thirdAtom = dynamicCast((checkIndex(k, atomList.size) , atomList.array[k]), Q$Atom);
if ((bondArray[j][k] == 1 && bondArray[i][j] == 2 || bondArray[j][k] == 2 && bondArray[i][j] == 1 || thirdAtom.aromatic && bondArray[j][k] != 0 || secondAtom.aromatic && bondArray[j][k] != 0) && ($equals(thirdAtom.element, 'C') || $equals(thirdAtom.element, 'N')) && thirdAtom.hybridization == 2 && k != i && k != j) {
for (l = 1; l < numAtoms + 1; ++l) {
fourthAtom = dynamicCast((checkIndex(l, atomList.size) , atomList.array[l]), Q$Atom);
if ((bondArray[k][l] == 1 && bondArray[j][k] == 2 || bondArray[k][l] == 2 && bondArray[j][k] == 1 || fourthAtom.aromatic && bondArray[k][l] != 0 || thirdAtom.aromatic && bondArray[k][l] != 0) && ($equals(fourthAtom.element, 'C') || $equals(fourthAtom.element, 'N')) && fourthAtom.hybridization == 2 && l != i && l != j && l != k) {
for (m = 1; m < numAtoms + 1; ++m) {
fifthAtom = dynamicCast((checkIndex(m, atomList.size) , atomList.array[m]), Q$Atom);
if ((bondArray[l][m] == 1 && bondArray[k][l] == 2 || bondArray[l][m] == 2 && bondArray[k][l] == 1 || fifthAtom.aromatic && bondArray[l][m] != 0 || fourthAtom.aromatic && bondArray[l][m] != 0) && ($equals(fifthAtom.element, 'C') || $equals(fifthAtom.element, 'N')) && fifthAtom.hybridization == 2 && m != i && m != j && m != k && m != l) {
for (n = 1; n < numAtoms + 1; ++n) {
sixthAtom = dynamicCast((checkIndex(n, atomList.size) , atomList.array[n]), Q$Atom);
if ((bondArray[m][n] == 1 && bondArray[l][m] == 2 || bondArray[m][n] == 2 && bondArray[l][m] == 1 || sixthAtom.aromatic && bondArray[m][n] != 0 || fifthAtom.aromatic && bondArray[m][n] != 0) && ($equals(sixthAtom.element, 'C') || $equals(sixthAtom.element, 'N')) && sixthAtom.hybridization == 2 && n != i && n != j && n != k && n != l && n != m) {
if (bondArray[n][i] == 2 && bondArray[m][n] == 1 || bondArray[n][i] == 1 && bondArray[m][n] == 2) {
firstAtom.aromatic = true;
secondAtom.aromatic = true;
thirdAtom.aromatic = true;
fourthAtom.aromatic = true;
fifthAtom.aromatic = true;
sixthAtom.aromatic = true;
}
}
}
}
}
}
}
}
}
}
}
}
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
if (bondArray[i][j] != 0) {
currentNeighbor = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$Atom);
$processNeighbor(currentAtom, currentNeighbor.element, bondArray[i][j], currentNeighbor.aromatic);
}
}
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
if (bondArray[i][j] != 0) {
currentNeighbor = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$Atom);
if (currentNeighbor.hybridization < 3) {
for (k = 1; k < numAtoms + 1; ++k) {
bondArray[j][k] > 1 && k != i && ++currentAtom.numNeighborPi;
}
}
}
}
}
h = 0;
charge = 0;
for (i = 1; i < numAtoms + 1; ++i) {
atom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
$getNumNeighborHs(atom);
h = h + atom.numNeighborHs;
charge = charge + atom.charge;
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
if (bondArray[i][j] != 0) {
currentNeighbor = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$Atom);
$equals(currentAtom.element, 'N') && currentNeighbor.isACarbonyl && (currentAtom.amide = true);
}
}
}
illegalAtoms = new StringBuffer_0;
for (i = 1; i < numAtoms + 1; ++i) {
atom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
$equals(atom.element, 'C') && atom.charge != 0 && (illegalAtoms.impl.string += 'A Charged C atom.<br>' , illegalAtoms);
if ($equals(atom.element, 'N')) {
atom.charge > 1 && (illegalAtoms.impl.string += 'An N atom with too high + charge.<br>' , illegalAtoms);
atom.charge < 0 && (illegalAtoms.impl.string += 'An N atom with - charge.<br>' , illegalAtoms);
$getNumNeighborHs(atom) < 0 && !($equals(atom.doubleBondedNeighbor, 'O2') && $getNumNeighborHs(atom) == -2 && atom.numNeighborCs == 1 && atom.numNeighborXs == 2 && atom.charge == 0) && (illegalAtoms.impl.string += 'An N atom making too many bonds.<br>' , illegalAtoms);
}
if ($equals(atom.element, 'O')) {
atom.charge < -1 && (illegalAtoms.impl.string += 'An O atom with too high - charge.<br>' , illegalAtoms);
atom.charge > 0 && (illegalAtoms.impl.string += 'An O atom with + charge.<br>' , illegalAtoms);
}
if ($equals(atom.element, 'S')) {
atom.charge > 0 && (illegalAtoms.impl.string += 'An S atom with a + charge.<br>' , illegalAtoms);
$getNumNeighborHs(atom) < 0 && $getNumNeighborHs(atom) != -4 && $getNumNeighborHs(atom) != -2 && (illegalAtoms.impl.string += 'An S atom not making 2, 4, or 6 bonds.<br>' , illegalAtoms);
}
if ($equals(atom.element, 'P')) {
atom.charge != 0 && (illegalAtoms.impl.string += 'A Charged P atom.<br>' , illegalAtoms);
atom.numNeighborHs != -3 && (illegalAtoms.impl.string += 'A P atom not making 5 bonds.<br>' , illegalAtoms);
}
($equals(atom.element, 'F') || $equals(atom.element, 'Cl') || $equals(atom.element, 'Br') || $equals(atom.element, 'I')) && atom.charge != 0 && $append_0(illegalAtoms, 'A Charged ' + atom.element + ' atom.<br>');
$equals(atom.element, 'X') && (illegalAtoms.impl.string += 'An X atom.<br>' , illegalAtoms);
}
errorString = '';
illegalAtoms.impl.string.length != 0 && (errorString = '<html><body>It is not possible to calculate logp<br>for your molecule because it contains:<br>' + illegalAtoms.impl.string + '<\/body><\/html>');
logp = 0;
canMakeHbonds = false;
canMakeIonicBonds = false;
if (illegalAtoms.impl.string.length == 0) {
nf = ($clinit_NumberFormat() , new NumberFormat_1($getDefaultNative()));
for (i = 1; i < numAtoms + 1; ++i) {
atom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
currentAtomSpec = $getAtomSpec(atom);
logp = logp + currentAtomSpec.logp;
canMakeHbonds = canMakeHbonds || currentAtomSpec.canMakeHbonds;
canMakeIonicBonds = canMakeIonicBonds || currentAtomSpec.canMakeIonicBonds;
neighbors = new StringBuffer_0;
for (j = 1; j < numAtoms + 1; ++j) {
bondArray[i][j] != 0 && ($append(neighbors.impl, j + ' ') , neighbors);
}
$append_0(atomDataLines, i + ' ' + currentAtomSpec.type + '; bonded to: ' + neighbors.impl.string + '; logp= ' + $format(nf, currentAtomSpec.logp) + '; H-bonds: ' + currentAtomSpec.canMakeHbonds + '; ionic bonds: ' + currentAtomSpec.canMakeIonicBonds + '\n');
}
}
numBonds = 0;
numAromaticAtoms = 0;
c = 0;
n = 0;
o = 0;
s = 0;
p_0 = 0;
cl = 0;
br = 0;
f = 0;
iodine = 0;
formula = new StringBuffer_0;
for (i = 0; i < smileString.length; ++i) {
switch (smileString.charCodeAt(i)) {
case 67:
++c;
break;
case 78:
++n;
break;
case 79:
++o;
break;
case 83:
++s;
break;
case 80:
++p_0;
break;
case 108:
--c;
++cl;
break;
case 66:
++br;
break;
case 70:
++f;
break;
case 73:
++iodine;
break;
case 99:
++c;
++numAromaticAtoms;
break;
case 110:
++n;
++numAromaticAtoms;
break;
case 115:
++s;
++numAromaticAtoms;
break;
case 111:
++o;
++numAromaticAtoms;
break;
case 35:
++numBonds;
case 61:
++numBonds;
}
}
prettyPrint('C', c, formula);
prettyPrint('H', h, formula);
prettyPrint('N', n, formula);
prettyPrint('O', o, formula);
prettyPrint('P', p_0, formula);
prettyPrint('S', s, formula);
prettyPrint('Cl', cl, formula);
prettyPrint('Br', br, formula);
prettyPrint('F', f, formula);
prettyPrint('I', iodine, formula);
if (charge != 0) {
formula.impl.string += '(';
charge == -1?(formula.impl.string += '-' , formula):charge > 0 && (formula.impl.string += '+' , formula);
(charge < 0?-charge:charge) != 1 && ($append(formula.impl, '' + charge) , formula);
formula.impl.string += ')';
}
$equals(errorString, '')?(info = new MoleculeInfo_0(canMakeHbonds, canMakeIonicBonds, logp, null)):(info = new MoleculeInfo_0(false, false, 0, errorString));
targets = initDim(_3Ledu_umb_bio_jsMolCalc_client_Target_2_classLit, makeCastMap([Q$Serializable]), Q$Target, 4, 0);
if ($equals(errorString, '')) {
canMakeHbonds?(targets[0] = new Target_1(1)):(targets[0] = new Target_1(2));
canMakeIonicBonds?(targets[1] = new Target_1(3)):(targets[1] = new Target_1(4));
targets[2] = new Target_0(logp - 1.5, logp - 0.5);
targets[3] = new Target_0(logp + 0.5, logp + 1.5);
}
return new InfoAndTargets_0(info, targets);
}
function prettyPrint(atomLabel, number, outString){
if (number == 0) {
return;
}
$append(outString.impl, atomLabel);
if (number == 1) {
outString.impl.string += ' ';
return;
}
$append(outString.impl, '<sub>' + number + '<\/sub> ');
}
function JsMolCalcAPI$API_0(){
}
function getTasks(mol, smile, jme){
var i, length_0, result, tasks;
result = computeAndDisplay(mol, smile, jme);
length_0 = result.targets.length;
tasks = initDim(_3Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Task_2_classLit, makeCastMap([Q$Serializable]), Q$JsMolCalcAPI$Task, length_0, 0);
for (i = 0; i < length_0; ++i) {
tasks[i] = new JsMolCalcAPI$Task_0(result.targets[i]);
}
return tasks;
}
defineSeed(48, 1, makeCastMap([Q$Exportable]), JsMolCalcAPI$API_0);
function JsMolCalcAPI$Info_0(info){
this._info = info;
}
defineSeed(49, 1, makeCastMap([Q$Exportable]), JsMolCalcAPI$Info_0);
_.toString_0 = function toString_0(){
return $toString(this._info);
}
;
_._info = null;
function JsMolCalcAPI$Task_0(target){
this._target = target;
}
defineSeed(50, 1, makeCastMap([Q$JsMolCalcAPI$Task, Q$Exportable]), JsMolCalcAPI$Task_0);
_.check_0 = function check(info){
return $isCorrect(this._target, info._info)?'correct':'incorrect';
}
;
_.toString_0 = function toString_1(){
return $toString_0(this._target);
}
;
_._target = null;
function $toString(this$static){
var b, nf;
nf = ($clinit_NumberFormat() , new NumberFormat_1($getDefaultNative()));
b = new StringBuffer_0;
if (this$static.errorString != null) {
$append_0(b, this$static.errorString);
}
else {
this$static.phobicity < 0?$append_0(b, '<font color=green>Hydrophobicity index = ' + $format(nf, this$static.phobicity) + '<\/font><br>'):$append_0(b, '<font color=red>Hydrophobicity index = ' + $format(nf, this$static.phobicity) + '<\/font><br>');
this$static.canMakeHBonds?(b.impl.string += '<font color=green>Can Make Strong Hydrogen Bonds<\/font><br>' , b):(b.impl.string += '<font color=red>Can not Make Strong Hydrogen Bonds<\/font><br>' , b);
this$static.canMakeIonicBonds?(b.impl.string += '<font color=green>Can Make Ionic Bonds<\/font><br>' , b):(b.impl.string += '<font color=red>Can not Make Ionic Bonds<\/font><br>' , b);
}
return b.impl.string;
}
function MoleculeInfo_0(hBonds, iBonds, phobicity, errorString){
this.canMakeHBonds = hBonds;
this.canMakeIonicBonds = iBonds;
this.phobicity = phobicity;
this.errorString = errorString;
}
defineSeed(51, 1, {}, MoleculeInfo_0);
_.canMakeHBonds = false;
_.canMakeIonicBonds = false;
_.errorString = null;
_.phobicity = 0;
function $isCorrect(this$static, info){
switch (this$static.type) {
case 0:
return info.phobicity > this$static.loPhobicLimit && info.phobicity < this$static.hiPhobicLimit;
case 1:
return !info.canMakeHBonds;
case 2:
return info.canMakeHBonds;
case 3:
return !info.canMakeIonicBonds;
case 4:
return info.canMakeIonicBonds;
default:return false;
}
}
function $toString_0(this$static){
var nf;
switch (this$static.type) {
case 0:
nf = ($clinit_NumberFormat() , new NumberFormat_1($getDefaultNative()));
return 'Has a relative hydrophobicity betweeen ' + $format(nf, this$static.loPhobicLimit) + ' and ' + $format(nf, this$static.hiPhobicLimit);
case 1:
return 'Can not make strong Hydrogen Bonds';
case 2:
return 'Can make strong Hydrogen Bonds';
case 3:
return 'Can not make Ionic Bonds';
case 4:
return 'Can make Ionic Bonds';
default:return 'Error in setting target type';
}
}
function Target_0(loPhobicLimit, hiPhobicLimit){
this.type = 0;
this.loPhobicLimit = loPhobicLimit;
this.hiPhobicLimit = hiPhobicLimit;
}
function Target_1(type){
this.type = type;
}
defineSeed(52, 1, makeCastMap([Q$Target]), Target_0, Target_1);
_.hiPhobicLimit = 0;
_.loPhobicLimit = 0;
_.type = 0;
function $export_1(){
if (!exported_1) {
exported_1 = true;
new InfoExporterImpl_0;
$export0_1();
}
}
function $export0_1(){
var pkg = declarePackage('edu.umb.bio.jsMolCalc.JsMolCalcAPI.Task');
var __0;
$wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Task = $entry(function(){
var g, j = this;
isAssignableToInstance(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Task_2_classLit, arguments)?(g = arguments[0]):arguments.length == 1 && (g = ___create_0(gwtInstance(arguments[0])));
j.g = g;
setWrapper(g, j);
return j;
}
);
__0 = $wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Task.prototype = new Object;
__0.check = $entry(function(a0){
return this.g.check_0(a0.g);
}
);
__0.toString = $entry(function(){
return this.g.toString_0();
}
);
addTypeMap(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Task_2_classLit, $wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Task);
if (pkg)
for (p in pkg)
$wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Task[p] === undefined && ($wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Task[p] = pkg[p]);
}
function TaskExporterImpl_0(){
$export_1();
}
function ___create_0(a0){
return new JsMolCalcAPI$Task_0(a0);
}
defineSeed(53, 1, {}, TaskExporterImpl_0);
var exported_1 = false;
function ArrayStoreException_0(){
$fillInStackTrace();
}
defineSeed(54, 6, makeCastMap([Q$Serializable, Q$Throwable]), ArrayStoreException_0);
function digit_0(c){ function digit_0(c){
if (c >= 48 && c < 58) { if (c >= 48 && c < 58) {
return c - 48; return c - 48;
...@@ -1915,7 +1750,6 @@ function createForArray(packageName, className, seedId){ ...@@ -1915,7 +1750,6 @@ function createForArray(packageName, className, seedId){
var clazz; var clazz;
clazz = new Class_0; clazz = new Class_0;
isInstantiable(seedId != 0?-seedId:0) && setClassLiteral(seedId != 0?-seedId:0, clazz); isInstantiable(seedId != 0?-seedId:0) && setClassLiteral(seedId != 0?-seedId:0, clazz);
clazz.modifiers = 4;
clazz.superclass = Ljava_lang_Object_2_classLit; clazz.superclass = Ljava_lang_Object_2_classLit;
return clazz; return clazz;
} }
...@@ -1932,7 +1766,6 @@ function createForInterface(packageName, className){ ...@@ -1932,7 +1766,6 @@ function createForInterface(packageName, className){
var clazz; var clazz;
clazz = new Class_0; clazz = new Class_0;
isInstantiable(0) && setClassLiteral(0, clazz); isInstantiable(0) && setClassLiteral(0, clazz);
clazz.modifiers = 2;
return clazz; return clazz;
} }
...@@ -1973,15 +1806,14 @@ function setClassLiteral(seedId, clazz){ ...@@ -1973,15 +1806,14 @@ function setClassLiteral(seedId, clazz){
proto.___clazz$ = clazz; proto.___clazz$ = clazz;
} }
defineSeed(56, 1, {}, Class_0); defineSeed(50, 1, {}, Class_0);
_.modifiers = 0;
_.seedId = 0; _.seedId = 0;
_.superclass = null; _.superclass = null;
function ClassCastException_0(){ function ClassCastException_0(){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(57, 6, makeCastMap([Q$Serializable, Q$Throwable]), ClassCastException_0); defineSeed(51, 6, makeCastMap([Q$Serializable, Q$Throwable]), ClassCastException_0);
function __parseAndValidateInt(s){ function __parseAndValidateInt(s){
var i, length_0, startIndex, toReturn; var i, length_0, startIndex, toReturn;
if (s == null) { if (s == null) {
...@@ -2008,26 +1840,26 @@ function IllegalArgumentException_0(message){ ...@@ -2008,26 +1840,26 @@ function IllegalArgumentException_0(message){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(60, 6, makeCastMap([Q$Serializable, Q$Throwable]), IllegalArgumentException_0); defineSeed(54, 6, makeCastMap([Q$Serializable, Q$Throwable]), IllegalArgumentException_0);
function IndexOutOfBoundsException_0(message){ function IndexOutOfBoundsException_0(message){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(61, 6, makeCastMap([Q$Serializable, Q$Throwable]), IndexOutOfBoundsException_0); defineSeed(55, 6, makeCastMap([Q$Serializable, Q$Throwable]), IndexOutOfBoundsException_0);
function NullPointerException_0(){ function NullPointerException_0(){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(62, 6, makeCastMap([Q$Serializable, Q$Throwable]), NullPointerException_0); defineSeed(56, 6, makeCastMap([Q$Serializable, Q$Throwable]), NullPointerException_0);
function NumberFormatException_0(message){ function NumberFormatException_0(message){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(63, 60, makeCastMap([Q$Serializable, Q$Throwable]), NumberFormatException_0); defineSeed(57, 54, makeCastMap([Q$Serializable, Q$Throwable]), NumberFormatException_0);
function StackTraceElement_0(methodName){ function StackTraceElement_0(methodName){
} }
defineSeed(64, 1, makeCastMap([Q$Serializable, Q$StackTraceElement]), StackTraceElement_0); defineSeed(58, 1, makeCastMap([Q$Serializable, Q$StackTraceElement]), StackTraceElement_0);
function $charAt(this$static, index){ function $charAt(this$static, index){
return this$static.charCodeAt(index); return this$static.charCodeAt(index);
} }
...@@ -2162,16 +1994,15 @@ function $append_0(this$static, x){ ...@@ -2162,16 +1994,15 @@ function $append_0(this$static, x){
return this$static; return this$static;
} }
function $replace_0(this$static, end){ function $delete(this$static, end){
$replace(this$static.impl, 0, end, ''); return $replace(this$static.impl, 0, end, '') , this$static;
return this$static;
} }
function StringBuffer_0(){ function StringBuffer_0(){
this.impl = new StringBufferImplAppend_0; this.impl = new StringBufferImplAppend_0;
} }
defineSeed(66, 1, makeCastMap([Q$CharSequence]), StringBuffer_0); defineSeed(60, 1, makeCastMap([Q$CharSequence]), StringBuffer_0);
function $append_1(this$static, x){ function $append_1(this$static, x){
$append(this$static.impl, x); $append(this$static.impl, x);
return this$static; return this$static;
...@@ -2181,7 +2012,7 @@ function $charAt_0(this$static, index){ ...@@ -2181,7 +2012,7 @@ function $charAt_0(this$static, index){
return $charAt(this$static.impl.string, index); return $charAt(this$static.impl.string, index);
} }
function $delete(this$static, start, end){ function $delete_0(this$static, start, end){
return $replace(this$static.impl, start, end, '') , this$static; return $replace(this$static.impl, start, end, '') , this$static;
} }
...@@ -2189,25 +2020,25 @@ function $insert(this$static, index, x){ ...@@ -2189,25 +2020,25 @@ function $insert(this$static, index, x){
return $replace(this$static.impl, index, index, x) , this$static; return $replace(this$static.impl, index, index, x) , this$static;
} }
function $replace_1(this$static, start, end, toInsert){ function $replace_0(this$static, start, end, toInsert){
$replace(this$static.impl, start, end, toInsert); $replace(this$static.impl, start, end, toInsert);
return this$static; return this$static;
} }
function $setCharAt(this$static, index, x){ function $setCharAt(this$static, index, x){
$replace_1(this$static, index, index + 1, String.fromCharCode(x)); $replace_0(this$static, index, index + 1, String.fromCharCode(x));
} }
function StringBuilder_0(){ function StringBuilder_0(){
this.impl = new StringBufferImplAppend_0; this.impl = new StringBufferImplAppend_0;
} }
defineSeed(67, 1, makeCastMap([Q$CharSequence]), StringBuilder_0); defineSeed(61, 1, makeCastMap([Q$CharSequence]), StringBuilder_0);
function UnsupportedOperationException_0(){ function UnsupportedOperationException_0(){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(68, 6, makeCastMap([Q$Serializable, Q$Throwable]), UnsupportedOperationException_0); defineSeed(62, 6, makeCastMap([Q$Serializable, Q$Throwable]), UnsupportedOperationException_0);
function $advanceToFind(iter, o){ function $advanceToFind(iter, o){
var t; var t;
while (iter.hasNext()) { while (iter.hasNext()) {
...@@ -2219,7 +2050,7 @@ function $advanceToFind(iter, o){ ...@@ -2219,7 +2050,7 @@ function $advanceToFind(iter, o){
return null; return null;
} }
defineSeed(69, 1, {}); defineSeed(63, 1, {});
_.add = function add(o){ _.add = function add(o){
throw new UnsupportedOperationException_0; throw new UnsupportedOperationException_0;
} }
...@@ -2230,7 +2061,9 @@ _.contains = function contains(o){ ...@@ -2230,7 +2061,9 @@ _.contains = function contains(o){
return !!iter; return !!iter;
} }
; ;
defineSeed(71, 1, makeCastMap([Q$Map])); --></script>
<script><!--
defineSeed(65, 1, makeCastMap([Q$Map]));
_.equals$ = function equals_1(obj){ _.equals$ = function equals_1(obj){
var entry, entry$iterator, otherKey, otherMap, otherValue; var entry, entry$iterator, otherKey, otherMap, otherValue;
if (obj === this) { if (obj === this) {
...@@ -2331,8 +2164,6 @@ function $hasHashValue(this$static, key, hashCode){ ...@@ -2331,8 +2164,6 @@ function $hasHashValue(this$static, key, hashCode){
return false; return false;
} }
--></script>
<script><!--
function $hasStringValue(this$static, key){ function $hasStringValue(this$static, key){
return ':' + key in this$static.stringMap; return ':' + key in this$static.stringMap;
} }
...@@ -2382,7 +2213,7 @@ function $putStringValue(this$static, key, value){ ...@@ -2382,7 +2213,7 @@ function $putStringValue(this$static, key, value){
return result; return result;
} }
defineSeed(70, 71, makeCastMap([Q$Map])); defineSeed(64, 65, makeCastMap([Q$Map]));
_.equalsBridge = function equalsBridge(value1, value2){ _.equalsBridge = function equalsBridge(value1, value2){
return maskUndefined(value1) === maskUndefined(value2) || value1 != null && equals__devirtual$(value1, value2); return maskUndefined(value1) === maskUndefined(value2) || value1 != null && equals__devirtual$(value1, value2);
} }
...@@ -2392,7 +2223,7 @@ _.nullSlot = null; ...@@ -2392,7 +2223,7 @@ _.nullSlot = null;
_.nullSlotLive = false; _.nullSlotLive = false;
_.size = 0; _.size = 0;
_.stringMap = null; _.stringMap = null;
defineSeed(73, 69, makeCastMap([Q$Set])); defineSeed(67, 63, makeCastMap([Q$Set]));
_.equals$ = function equals_2(o){ _.equals$ = function equals_2(o){
var iter, other, otherItem; var iter, other, otherItem;
if (o === this) { if (o === this) {
...@@ -2431,7 +2262,7 @@ function AbstractHashMap$EntrySet_0(this$0){ ...@@ -2431,7 +2262,7 @@ function AbstractHashMap$EntrySet_0(this$0){
this.this$0 = this$0; this.this$0 = this$0;
} }
defineSeed(72, 73, makeCastMap([Q$Set]), AbstractHashMap$EntrySet_0); defineSeed(66, 67, makeCastMap([Q$Set]), AbstractHashMap$EntrySet_0);
_.contains = function contains_0(o){ _.contains = function contains_0(o){
var entry, key, value; var entry, key, value;
if (instanceOf(o, Q$Map$Entry)) { if (instanceOf(o, Q$Map$Entry)) {
...@@ -2463,7 +2294,7 @@ function AbstractHashMap$EntrySetIterator_0(this$0){ ...@@ -2463,7 +2294,7 @@ function AbstractHashMap$EntrySetIterator_0(this$0){
this.iter = new AbstractList$IteratorImpl_0(list); this.iter = new AbstractList$IteratorImpl_0(list);
} }
defineSeed(74, 1, {}, AbstractHashMap$EntrySetIterator_0); defineSeed(68, 1, {}, AbstractHashMap$EntrySetIterator_0);
_.hasNext = function hasNext(){ _.hasNext = function hasNext(){
return $hasNext(this.iter); return $hasNext(this.iter);
} }
...@@ -2473,7 +2304,7 @@ _.next = function next_0(){ ...@@ -2473,7 +2304,7 @@ _.next = function next_0(){
} }
; ;
_.iter = null; _.iter = null;
defineSeed(76, 1, makeCastMap([Q$Map$Entry])); defineSeed(70, 1, makeCastMap([Q$Map$Entry]));
_.equals$ = function equals_3(other){ _.equals$ = function equals_3(other){
var entry; var entry;
if (instanceOf(other, Q$Map$Entry)) { if (instanceOf(other, Q$Map$Entry)) {
...@@ -2498,7 +2329,7 @@ function AbstractHashMap$MapEntryNull_0(this$0){ ...@@ -2498,7 +2329,7 @@ function AbstractHashMap$MapEntryNull_0(this$0){
this.this$0 = this$0; this.this$0 = this$0;
} }
defineSeed(75, 76, makeCastMap([Q$Map$Entry]), AbstractHashMap$MapEntryNull_0); defineSeed(69, 70, makeCastMap([Q$Map$Entry]), AbstractHashMap$MapEntryNull_0);
_.getKey = function getKey(){ _.getKey = function getKey(){
return null; return null;
} }
...@@ -2517,7 +2348,7 @@ function AbstractHashMap$MapEntryString_0(this$0, key){ ...@@ -2517,7 +2348,7 @@ function AbstractHashMap$MapEntryString_0(this$0, key){
this.key = key; this.key = key;
} }
defineSeed(77, 76, makeCastMap([Q$Map$Entry]), AbstractHashMap$MapEntryString_0); defineSeed(71, 70, makeCastMap([Q$Map$Entry]), AbstractHashMap$MapEntryString_0);
_.getKey = function getKey_0(){ _.getKey = function getKey_0(){
return this.key; return this.key;
} }
...@@ -2540,7 +2371,7 @@ function indexOutOfBounds(index, size){ ...@@ -2540,7 +2371,7 @@ function indexOutOfBounds(index, size){
throw new IndexOutOfBoundsException_0('Index: ' + index + ', Size: ' + size); throw new IndexOutOfBoundsException_0('Index: ' + index + ', Size: ' + size);
} }
defineSeed(78, 69, makeCastMap([Q$List])); defineSeed(72, 63, makeCastMap([Q$List]));
_.add = function add_0(obj){ _.add = function add_0(obj){
$add(this, this.size_0(), obj); $add(this, this.size_0(), obj);
return true; return true;
...@@ -2601,7 +2432,7 @@ function AbstractList$IteratorImpl_0(this$0){ ...@@ -2601,7 +2432,7 @@ function AbstractList$IteratorImpl_0(this$0){
this.this$0 = this$0; this.this$0 = this$0;
} }
defineSeed(79, 1, {}, AbstractList$IteratorImpl_0); defineSeed(73, 1, {}, AbstractList$IteratorImpl_0);
_.hasNext = function hasNext_0(){ _.hasNext = function hasNext_0(){
return $hasNext(this); return $hasNext(this);
} }
...@@ -2645,7 +2476,7 @@ function splice_0(array, index, deleteCount, value){ ...@@ -2645,7 +2476,7 @@ function splice_0(array, index, deleteCount, value){
array.splice(index, deleteCount, value); array.splice(index, deleteCount, value);
} }
defineSeed(80, 78, makeCastMap([Q$Serializable, Q$List]), ArrayList_0); defineSeed(74, 72, makeCastMap([Q$Serializable, Q$List]), ArrayList_0);
_.add = function add_1(o){ _.add = function add_1(o){
return $add_0(this, o); return $add_0(this, o);
} }
...@@ -2678,13 +2509,13 @@ function HashMap_0(){ ...@@ -2678,13 +2509,13 @@ function HashMap_0(){
this.size = 0; this.size = 0;
} }
defineSeed(82, 70, makeCastMap([Q$Serializable, Q$Map]), HashMap_0); defineSeed(76, 64, makeCastMap([Q$Serializable, Q$Map]), HashMap_0);
function MapEntryImpl_0(key, value){ function MapEntryImpl_0(key, value){
this.key = key; this.key = key;
this.value = value; this.value = value;
} }
defineSeed(83, 76, makeCastMap([Q$Map$Entry]), MapEntryImpl_0); defineSeed(77, 70, makeCastMap([Q$Map$Entry]), MapEntryImpl_0);
_.getKey = function getKey_1(){ _.getKey = function getKey_1(){
return this.key; return this.key;
} }
...@@ -2706,7 +2537,7 @@ function NoSuchElementException_0(){ ...@@ -2706,7 +2537,7 @@ function NoSuchElementException_0(){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(84, 6, makeCastMap([Q$Serializable, Q$Throwable]), NoSuchElementException_0); defineSeed(78, 6, makeCastMap([Q$Serializable, Q$Throwable]), NoSuchElementException_0);
function equalsWithNullCheck(a, b){ function equalsWithNullCheck(a, b){
return maskUndefined(a) === maskUndefined(b) || a != null && equals__devirtual$(a, b); return maskUndefined(a) === maskUndefined(b) || a != null && equals__devirtual$(a, b);
} }
...@@ -2715,8 +2546,8 @@ function ExportAllExporterImpl_0(){ ...@@ -2715,8 +2546,8 @@ function ExportAllExporterImpl_0(){
new APIExporterImpl_0; new APIExporterImpl_0;
} }
defineSeed(86, 1, {}, ExportAllExporterImpl_0); defineSeed(80, 1, {}, ExportAllExporterImpl_0);
defineSeed(88, 1, {}); defineSeed(82, 1, {});
function $addTypeMap(this$static, type, exportedConstructor){ function $addTypeMap(this$static, type, exportedConstructor){
$put(this$static.typeMap, type, exportedConstructor); $put(this$static.typeMap, type, exportedConstructor);
} }
...@@ -2736,59 +2567,14 @@ function $declarePackage(qualifiedExportName){ ...@@ -2736,59 +2567,14 @@ function $declarePackage(qualifiedExportName){
return o; return o;
} }
function $setWrapper(this$static, type){
var cons, wrapper;
if ((getClass__devirtual$(type).modifiers & 4) != 0) {
return [];
}
cons = $typeConstructor(this$static, getClass__devirtual$(type));
wrapper = cons && typeof cons == 'function'?new cons(type):type;
type['__gwtex_wrap'] = wrapper;
return wrapper;
}
function $typeConstructor(this$static, type){
var o, sup;
o = $get(this$static.typeMap, type);
sup = type.superclass;
if (o == null && !!sup && sup != Ljava_lang_Object_2_classLit) {
return $typeConstructor(this$static, sup);
}
return dynamicCastJso(o);
}
function $wrap(this$static, type){
var wrapper;
if (type == null) {
return null;
}
return wrapper = type['__gwtex_wrap'] , !wrapper && (wrapper = $setWrapper(this$static, type)) , wrapper;
}
function $wrap_0(this$static, type){
var i, wrapperArray;
if (type == null) {
return null;
}
wrapperArray = [];
for (i = 0; i < type.length; ++i) {
wrapperArray[i] = $wrap(this$static, type[i]);
}
return wrapperArray;
}
function ExporterBaseActual_0(){ function ExporterBaseActual_0(){
this.typeMap = new HashMap_0; this.typeMap = new HashMap_0;
new HashMap_0; new HashMap_0;
new HashMap_0; new HashMap_0;
} }
function getGwtInstance(o){
return o && o.g?o.g:null;
}
function isAssignableToClass(o, clazz){ function isAssignableToClass(o, clazz){
var sup; var sup, maybeJsoInvocation;
if (Ljava_lang_Object_2_classLit == clazz) { if (Ljava_lang_Object_2_classLit == clazz) {
return true; return true;
} }
...@@ -2796,7 +2582,7 @@ function isAssignableToClass(o, clazz){ ...@@ -2796,7 +2582,7 @@ function isAssignableToClass(o, clazz){
return true; return true;
} }
if (o != null) { if (o != null) {
for (sup = getClass__devirtual$(o); !!sup && sup != Ljava_lang_Object_2_classLit; sup = sup.superclass) { for (sup = (maybeJsoInvocation = o , isJavaObject(maybeJsoInvocation)?maybeJsoInvocation.___clazz$:Lcom_google_gwt_core_client_JavaScriptObject_2_classLit); !!sup && sup != Ljava_lang_Object_2_classLit; sup = sup.superclass) {
if (sup == clazz) { if (sup == clazz) {
return true; return true;
} }
...@@ -2805,7 +2591,7 @@ function isAssignableToClass(o, clazz){ ...@@ -2805,7 +2591,7 @@ function isAssignableToClass(o, clazz){
return false; return false;
} }
defineSeed(87, 88, {}, ExporterBaseActual_0); defineSeed(81, 82, {}, ExporterBaseActual_0);
function $clinit_ExporterUtil(){ function $clinit_ExporterUtil(){
$clinit_ExporterUtil = nullMethod; $clinit_ExporterUtil = nullMethod;
impl = new ExporterBaseActual_0; impl = new ExporterBaseActual_0;
...@@ -2816,38 +2602,12 @@ function addTypeMap(type, exportedConstructor){ ...@@ -2816,38 +2602,12 @@ function addTypeMap(type, exportedConstructor){
$addTypeMap(impl, type, exportedConstructor); $addTypeMap(impl, type, exportedConstructor);
} }
function declarePackage(qualifiedExportName){
$clinit_ExporterUtil();
return $declarePackage(qualifiedExportName);
}
function gwtInstance(o){
var g;
$clinit_ExporterUtil();
return o != null && instanceOfJso(o) && (g = getGwtInstance(dynamicCastJso(o))) != null?g:o;
}
function isAssignableToInstance(clazz, args){ function isAssignableToInstance(clazz, args){
var o; var o;
$clinit_ExporterUtil(); $clinit_ExporterUtil();
return o = args && args[0] && (typeof args[0] == 'object' || typeof args[0] == 'function')?args[0]:null , isAssignableToClass(o, clazz); return o = args && args[0] && (typeof args[0] == 'object' || typeof args[0] == 'function')?args[0]:null , isAssignableToClass(o, clazz);
} }
function setWrapper(instance, wrapper){
$clinit_ExporterUtil();
instance['__gwtex_wrap'] = wrapper;
}
function wrap(type){
$clinit_ExporterUtil();
return $wrap(impl, type);
}
function wrap_0(type){
$clinit_ExporterUtil();
return $wrap_0(impl, type);
}
var impl; var impl;
var $entry = entry_0; var $entry = entry_0;
function gwtOnLoad(errFn, modName, modBase, softPermutationId){ function gwtOnLoad(errFn, modName, modBase, softPermutationId){
...@@ -2865,7 +2625,7 @@ function gwtOnLoad(errFn, modName, modBase, softPermutationId){ ...@@ -2865,7 +2625,7 @@ function gwtOnLoad(errFn, modName, modBase, softPermutationId){
} }
} }
var Ljava_lang_Object_2_classLit = createForClass('java.lang.', 'Object', 1, null), Lcom_google_gwt_core_client_JavaScriptObject_2_classLit = createForClass('com.google.gwt.core.client.', 'JavaScriptObject$', 9, Ljava_lang_Object_2_classLit), _3I_classLit = createForArray('', '[I', 96), _3Ljava_lang_Object_2_classLit = createForArray('[Ljava.lang.', 'Object;', 94), Ljava_lang_Throwable_2_classLit = createForClass('java.lang.', 'Throwable', 8, Ljava_lang_Object_2_classLit), Ljava_lang_Exception_2_classLit = createForClass('java.lang.', 'Exception', 7, Ljava_lang_Throwable_2_classLit), Ljava_lang_RuntimeException_2_classLit = createForClass('java.lang.', 'RuntimeException', 6, Ljava_lang_Exception_2_classLit), Ljava_lang_StackTraceElement_2_classLit = createForClass('java.lang.', 'StackTraceElement', 64, Ljava_lang_Object_2_classLit), _3Ljava_lang_StackTraceElement_2_classLit = createForArray('[Ljava.lang.', 'StackTraceElement;', 97), Lcom_google_gwt_lang_SeedUtil_2_classLit = createForClass('com.google.gwt.lang.', 'SeedUtil', 36, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Info_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalcAPI$Info', 49, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Task_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalcAPI$Task', 50, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$API_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalcAPI$API', 48, Ljava_lang_Object_2_classLit), _3Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Task_2_classLit = createForArray('[Ledu.umb.bio.jsMolCalc.client.', 'JsMolCalcAPI$Task;', 98), Ljava_lang_Class_2_classLit = createForClass('java.lang.', 'Class', 56, Ljava_lang_Object_2_classLit), Ljava_lang_String_2_classLit = createForClass('java.lang.', 'String', 2, Ljava_lang_Object_2_classLit), _3Ljava_lang_String_2_classLit = createForArray('[Ljava.lang.', 'String;', 95), Ljava_lang_ClassCastException_2_classLit = createForClass('java.lang.', 'ClassCastException', 57, Ljava_lang_RuntimeException_2_classLit), Ljava_lang_StringBuilder_2_classLit = createForClass('java.lang.', 'StringBuilder', 67, Ljava_lang_Object_2_classLit), Ljava_lang_ArrayStoreException_2_classLit = createForClass('java.lang.', 'ArrayStoreException', 54, Ljava_lang_RuntimeException_2_classLit), Lcom_google_gwt_core_client_JavaScriptException_2_classLit = createForClass('com.google.gwt.core.client.', 'JavaScriptException', 5, Ljava_lang_RuntimeException_2_classLit), Ledu_umb_bio_jsMolCalc_client_TaskExporterImpl_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'TaskExporterImpl', 53, Ljava_lang_Object_2_classLit), Lcom_google_gwt_core_client_impl_StringBufferImpl_2_classLit = createForClass('com.google.gwt.core.client.impl.', 'StringBufferImpl', 20, Ljava_lang_Object_2_classLit), Lorg_timepedia_exporter_client_ExporterBaseImpl_2_classLit = createForClass('org.timepedia.exporter.client.', 'ExporterBaseImpl', 88, Ljava_lang_Object_2_classLit), Lorg_timepedia_exporter_client_ExporterBaseActual_2_classLit = createForClass('org.timepedia.exporter.client.', 'ExporterBaseActual', 87, Lorg_timepedia_exporter_client_ExporterBaseImpl_2_classLit), Lorg_timepedia_exporter_client_Exportable_2_classLit = createForInterface('org.timepedia.exporter.client.', 'Exportable'), Lorg_timepedia_exporter_client_ExportAllExporterImpl_2_classLit = createForClass('org.timepedia.exporter.client.', 'ExportAllExporterImpl', 86, Ljava_lang_Object_2_classLit), Lcom_google_gwt_core_client_impl_StringBufferImplAppend_2_classLit = createForClass('com.google.gwt.core.client.impl.', 'StringBufferImplAppend', 21, Lcom_google_gwt_core_client_impl_StringBufferImpl_2_classLit), Lcom_google_gwt_core_client_Scheduler_2_classLit = createForClass('com.google.gwt.core.client.', 'Scheduler', 12, Ljava_lang_Object_2_classLit), Lcom_google_gwt_core_client_impl_SchedulerImpl_2_classLit = createForClass('com.google.gwt.core.client.impl.', 'SchedulerImpl', 14, Lcom_google_gwt_core_client_Scheduler_2_classLit), Ledu_umb_bio_jsMolCalc_client_InfoExporterImpl_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'InfoExporterImpl', 46, Ljava_lang_Object_2_classLit), Ljava_util_AbstractMap_2_classLit = createForClass('java.util.', 'AbstractMap', 71, Ljava_lang_Object_2_classLit), Ljava_util_AbstractHashMap_2_classLit = createForClass('java.util.', 'AbstractHashMap', 70, Ljava_util_AbstractMap_2_classLit), Ljava_util_AbstractCollection_2_classLit = createForClass('java.util.', 'AbstractCollection', 69, Ljava_lang_Object_2_classLit), Ljava_util_AbstractSet_2_classLit = createForClass('java.util.', 'AbstractSet', 73, Ljava_util_AbstractCollection_2_classLit), Ljava_util_AbstractHashMap$EntrySet_2_classLit = createForClass('java.util.', 'AbstractHashMap$EntrySet', 72, Ljava_util_AbstractSet_2_classLit), Ljava_util_AbstractHashMap$EntrySetIterator_2_classLit = createForClass('java.util.', 'AbstractHashMap$EntrySetIterator', 74, Ljava_lang_Object_2_classLit), Ljava_util_AbstractMapEntry_2_classLit = createForClass('java.util.', 'AbstractMapEntry', 76, Ljava_lang_Object_2_classLit), Ljava_util_AbstractHashMap$MapEntryNull_2_classLit = createForClass('java.util.', 'AbstractHashMap$MapEntryNull', 75, Ljava_util_AbstractMapEntry_2_classLit), Ljava_util_AbstractHashMap$MapEntryString_2_classLit = createForClass('java.util.', 'AbstractHashMap$MapEntryString', 77, Ljava_util_AbstractMapEntry_2_classLit), Ljava_lang_NullPointerException_2_classLit = createForClass('java.lang.', 'NullPointerException', 62, Ljava_lang_RuntimeException_2_classLit), Ljava_lang_IllegalArgumentException_2_classLit = createForClass('java.lang.', 'IllegalArgumentException', 60, Ljava_lang_RuntimeException_2_classLit), Ledu_umb_bio_jsMolCalc_client_Target_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'Target', 52, Ljava_lang_Object_2_classLit), Ljava_util_HashMap_2_classLit = createForClass('java.util.', 'HashMap', 82, Ljava_util_AbstractHashMap_2_classLit), Ledu_umb_bio_jsMolCalc_client_APIExporterImpl_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'APIExporterImpl', 42, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_MoleculeInfo_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'MoleculeInfo', 51, Ljava_lang_Object_2_classLit), Lcom_google_gwt_i18n_client_NumberFormat_2_classLit = createForClass('com.google.gwt.i18n.client.', 'NumberFormat', 27, Ljava_lang_Object_2_classLit), Ljava_lang_StringBuffer_2_classLit = createForClass('java.lang.', 'StringBuffer', 66, Ljava_lang_Object_2_classLit), Lcom_google_gwt_i18n_client_LocaleInfo_2_classLit = createForClass('com.google.gwt.i18n.client.', 'LocaleInfo', 26, Ljava_lang_Object_2_classLit), Ljava_lang_UnsupportedOperationException_2_classLit = createForClass('java.lang.', 'UnsupportedOperationException', 68, Ljava_lang_RuntimeException_2_classLit), Ledu_umb_bio_jsMolCalc_client_InfoAndTargets_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'InfoAndTargets', 45, Ljava_lang_Object_2_classLit), _3_3I_classLit = createForArray('', '[[I', 99), _3Ledu_umb_bio_jsMolCalc_client_Target_2_classLit = createForArray('[Ledu.umb.bio.jsMolCalc.client.', 'Target;', 100), Ljava_lang_NumberFormatException_2_classLit = createForClass('java.lang.', 'NumberFormatException', 63, Ljava_lang_IllegalArgumentException_2_classLit), Ljava_util_MapEntryImpl_2_classLit = createForClass('java.util.', 'MapEntryImpl', 83, Ljava_util_AbstractMapEntry_2_classLit), Ljava_util_AbstractList_2_classLit = createForClass('java.util.', 'AbstractList', 78, Ljava_util_AbstractCollection_2_classLit), Ljava_util_ArrayList_2_classLit = createForClass('java.util.', 'ArrayList', 80, Ljava_util_AbstractList_2_classLit), Ljava_util_AbstractList$IteratorImpl_2_classLit = createForClass('java.util.', 'AbstractList$IteratorImpl', 79, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_Atom_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'Atom', 43, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_AtomSpec_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'AtomSpec', 44, Ljava_lang_Object_2_classLit), Lcom_google_gwt_i18n_client_constants_NumberConstantsImpl_1_2_classLit = createForClass('com.google.gwt.i18n.client.constants.', 'NumberConstantsImpl_', 28, Ljava_lang_Object_2_classLit), Ljava_lang_IndexOutOfBoundsException_2_classLit = createForClass('java.lang.', 'IndexOutOfBoundsException', 61, Ljava_lang_RuntimeException_2_classLit), Ljava_util_NoSuchElementException_2_classLit = createForClass('java.util.', 'NoSuchElementException', 84, Ljava_lang_RuntimeException_2_classLit); var Ljava_lang_Object_2_classLit = createForClass('java.lang.', 'Object', 1, null), Lcom_google_gwt_core_client_JavaScriptObject_2_classLit = createForClass('com.google.gwt.core.client.', 'JavaScriptObject$', 9, Ljava_lang_Object_2_classLit), _3I_classLit = createForArray('', '[I', 89), _3Ljava_lang_Object_2_classLit = createForArray('[Ljava.lang.', 'Object;', 87), Ljava_lang_Throwable_2_classLit = createForClass('java.lang.', 'Throwable', 8, Ljava_lang_Object_2_classLit), Ljava_lang_Exception_2_classLit = createForClass('java.lang.', 'Exception', 7, Ljava_lang_Throwable_2_classLit), Ljava_lang_RuntimeException_2_classLit = createForClass('java.lang.', 'RuntimeException', 6, Ljava_lang_Exception_2_classLit), Ljava_lang_StackTraceElement_2_classLit = createForClass('java.lang.', 'StackTraceElement', 58, Ljava_lang_Object_2_classLit), _3Ljava_lang_StackTraceElement_2_classLit = createForArray('[Ljava.lang.', 'StackTraceElement;', 90), Lcom_google_gwt_lang_SeedUtil_2_classLit = createForClass('com.google.gwt.lang.', 'SeedUtil', 36, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$API_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalcAPI$API', 47, Ljava_lang_Object_2_classLit), Ljava_lang_Class_2_classLit = createForClass('java.lang.', 'Class', 50, Ljava_lang_Object_2_classLit), Ljava_lang_String_2_classLit = createForClass('java.lang.', 'String', 2, Ljava_lang_Object_2_classLit), _3Ljava_lang_String_2_classLit = createForArray('[Ljava.lang.', 'String;', 88), Ljava_lang_ClassCastException_2_classLit = createForClass('java.lang.', 'ClassCastException', 51, Ljava_lang_RuntimeException_2_classLit), Ljava_lang_StringBuilder_2_classLit = createForClass('java.lang.', 'StringBuilder', 61, Ljava_lang_Object_2_classLit), Ljava_lang_ArrayStoreException_2_classLit = createForClass('java.lang.', 'ArrayStoreException', 48, Ljava_lang_RuntimeException_2_classLit), Lcom_google_gwt_core_client_JavaScriptException_2_classLit = createForClass('com.google.gwt.core.client.', 'JavaScriptException', 5, Ljava_lang_RuntimeException_2_classLit), Lcom_google_gwt_core_client_impl_StringBufferImpl_2_classLit = createForClass('com.google.gwt.core.client.impl.', 'StringBufferImpl', 20, Ljava_lang_Object_2_classLit), Lorg_timepedia_exporter_client_ExporterBaseImpl_2_classLit = createForClass('org.timepedia.exporter.client.', 'ExporterBaseImpl', 82, Ljava_lang_Object_2_classLit), Lorg_timepedia_exporter_client_ExporterBaseActual_2_classLit = createForClass('org.timepedia.exporter.client.', 'ExporterBaseActual', 81, Lorg_timepedia_exporter_client_ExporterBaseImpl_2_classLit), Lorg_timepedia_exporter_client_Exportable_2_classLit = createForInterface('org.timepedia.exporter.client.', 'Exportable'), Lorg_timepedia_exporter_client_ExportAllExporterImpl_2_classLit = createForClass('org.timepedia.exporter.client.', 'ExportAllExporterImpl', 80, Ljava_lang_Object_2_classLit), Lcom_google_gwt_core_client_impl_StringBufferImplAppend_2_classLit = createForClass('com.google.gwt.core.client.impl.', 'StringBufferImplAppend', 21, Lcom_google_gwt_core_client_impl_StringBufferImpl_2_classLit), Lcom_google_gwt_core_client_Scheduler_2_classLit = createForClass('com.google.gwt.core.client.', 'Scheduler', 12, Ljava_lang_Object_2_classLit), Lcom_google_gwt_core_client_impl_SchedulerImpl_2_classLit = createForClass('com.google.gwt.core.client.impl.', 'SchedulerImpl', 14, Lcom_google_gwt_core_client_Scheduler_2_classLit), Ljava_util_AbstractMap_2_classLit = createForClass('java.util.', 'AbstractMap', 65, Ljava_lang_Object_2_classLit), Ljava_util_AbstractHashMap_2_classLit = createForClass('java.util.', 'AbstractHashMap', 64, Ljava_util_AbstractMap_2_classLit), Ljava_util_AbstractCollection_2_classLit = createForClass('java.util.', 'AbstractCollection', 63, Ljava_lang_Object_2_classLit), Ljava_util_AbstractSet_2_classLit = createForClass('java.util.', 'AbstractSet', 67, Ljava_util_AbstractCollection_2_classLit), Ljava_util_AbstractHashMap$EntrySet_2_classLit = createForClass('java.util.', 'AbstractHashMap$EntrySet', 66, Ljava_util_AbstractSet_2_classLit), Ljava_util_AbstractHashMap$EntrySetIterator_2_classLit = createForClass('java.util.', 'AbstractHashMap$EntrySetIterator', 68, Ljava_lang_Object_2_classLit), Ljava_util_AbstractMapEntry_2_classLit = createForClass('java.util.', 'AbstractMapEntry', 70, Ljava_lang_Object_2_classLit), Ljava_util_AbstractHashMap$MapEntryNull_2_classLit = createForClass('java.util.', 'AbstractHashMap$MapEntryNull', 69, Ljava_util_AbstractMapEntry_2_classLit), Ljava_util_AbstractHashMap$MapEntryString_2_classLit = createForClass('java.util.', 'AbstractHashMap$MapEntryString', 71, Ljava_util_AbstractMapEntry_2_classLit), Ljava_lang_NullPointerException_2_classLit = createForClass('java.lang.', 'NullPointerException', 56, Ljava_lang_RuntimeException_2_classLit), Ljava_lang_IllegalArgumentException_2_classLit = createForClass('java.lang.', 'IllegalArgumentException', 54, Ljava_lang_RuntimeException_2_classLit), Ljava_util_HashMap_2_classLit = createForClass('java.util.', 'HashMap', 76, Ljava_util_AbstractHashMap_2_classLit), Ledu_umb_bio_jsMolCalc_client_APIExporterImpl_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'APIExporterImpl', 42, Ljava_lang_Object_2_classLit), Ljava_lang_StringBuffer_2_classLit = createForClass('java.lang.', 'StringBuffer', 60, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalc_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalc', 43, Ljava_lang_Object_2_classLit), _3_3I_classLit = createForArray('', '[[I', 91), Ledu_umb_bio_jsMolCalc_client_JsMolCalc$Atom_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalc$Atom', 44, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalc$AtomSpec_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalc$AtomSpec', 45, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalc$InfoAndTargets_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalc$InfoAndTargets', 46, Ljava_lang_Object_2_classLit), Ljava_util_AbstractList_2_classLit = createForClass('java.util.', 'AbstractList', 72, Ljava_util_AbstractCollection_2_classLit), Ljava_util_ArrayList_2_classLit = createForClass('java.util.', 'ArrayList', 74, Ljava_util_AbstractList_2_classLit), Ljava_util_AbstractList$IteratorImpl_2_classLit = createForClass('java.util.', 'AbstractList$IteratorImpl', 73, Ljava_lang_Object_2_classLit), Ljava_lang_UnsupportedOperationException_2_classLit = createForClass('java.lang.', 'UnsupportedOperationException', 62, Ljava_lang_RuntimeException_2_classLit), Lcom_google_gwt_i18n_client_NumberFormat_2_classLit = createForClass('com.google.gwt.i18n.client.', 'NumberFormat', 27, Ljava_lang_Object_2_classLit), Ljava_lang_NumberFormatException_2_classLit = createForClass('java.lang.', 'NumberFormatException', 57, Ljava_lang_IllegalArgumentException_2_classLit), Lcom_google_gwt_i18n_client_LocaleInfo_2_classLit = createForClass('com.google.gwt.i18n.client.', 'LocaleInfo', 26, Ljava_lang_Object_2_classLit), Ljava_util_MapEntryImpl_2_classLit = createForClass('java.util.', 'MapEntryImpl', 77, Ljava_util_AbstractMapEntry_2_classLit), Ljava_lang_IndexOutOfBoundsException_2_classLit = createForClass('java.lang.', 'IndexOutOfBoundsException', 55, Ljava_lang_RuntimeException_2_classLit), Ljava_util_NoSuchElementException_2_classLit = createForClass('java.util.', 'NoSuchElementException', 78, Ljava_lang_RuntimeException_2_classLit), Lcom_google_gwt_i18n_client_constants_NumberConstantsImpl_1_2_classLit = createForClass('com.google.gwt.i18n.client.constants.', 'NumberConstantsImpl_', 28, Ljava_lang_Object_2_classLit);
$stats && $stats({moduleName:'jsmolcalc',sessionId:$sessionId,subSystem:'startup',evtGroup:'moduleStartup',millis:(new Date()).getTime(),type:'moduleEvalEnd'}); $stats && $stats({moduleName:'jsmolcalc',sessionId:$sessionId,subSystem:'startup',evtGroup:'moduleStartup',millis:(new Date()).getTime(),type:'moduleEvalEnd'});
if ($wnd.jsmolcalc) $wnd.jsmolcalc.onScriptLoad(); if ($wnd.jsmolcalc) $wnd.jsmolcalc.onScriptLoad();
--></script></body></html> --></script></body></html>
...@@ -4,14 +4,14 @@ var $gwt_version = "2.5.0"; ...@@ -4,14 +4,14 @@ var $gwt_version = "2.5.0";
var $wnd = parent; var $wnd = parent;
var $doc = $wnd.document; var $doc = $wnd.document;
var $moduleName, $moduleBase; var $moduleName, $moduleBase;
var $strongName = 'C6CC2FE28A276F9AD839FEB4866C99F7'; var $strongName = 'F8283183F9546F019176F75A8E25B0F0';
var $stats = $wnd.__gwtStatsEvent ? function(a) {return $wnd.__gwtStatsEvent(a);} : null, var $stats = $wnd.__gwtStatsEvent ? function(a) {return $wnd.__gwtStatsEvent(a);} : null,
$sessionId = $wnd.__gwtStatsSessionId ? $wnd.__gwtStatsSessionId : null; $sessionId = $wnd.__gwtStatsSessionId ? $wnd.__gwtStatsSessionId : null;
$stats && $stats({moduleName:'jsmolcalc',sessionId:$sessionId,subSystem:'startup',evtGroup:'moduleStartup',millis:(new Date()).getTime(),type:'moduleEvalStart'}); $stats && $stats({moduleName:'jsmolcalc',sessionId:$sessionId,subSystem:'startup',evtGroup:'moduleStartup',millis:(new Date()).getTime(),type:'moduleEvalStart'});
</script></head> </script></head>
<body> <body>
<script><!-- <script><!--
var _, seedTable = {}, Q$Object = 0, Q$String = 1, Q$LongLibBase$LongEmul = 2, Q$Atom = 3, Q$JsMolCalcAPI$Task = 4, Q$Target = 5, Q$int_$1 = 6, Q$Serializable = 7, Q$CharSequence = 8, Q$Comparable = 9, Q$StackTraceElement = 10, Q$Throwable = 11, Q$List = 12, Q$Map = 13, Q$Map$Entry = 14, Q$Set = 15, Q$Exportable = 16, CM$ = {}; var _, seedTable = {}, Q$Object = 0, Q$String = 1, Q$LongLibBase$LongEmul = 2, Q$JsMolCalc$Atom = 3, Q$int_$1 = 4, Q$Serializable = 5, Q$CharSequence = 6, Q$Comparable = 7, Q$StackTraceElement = 8, Q$Throwable = 9, Q$List = 10, Q$Map = 11, Q$Map$Entry = 12, Q$Set = 13, Q$Exportable = 14, CM$ = {};
function newSeed(id){ function newSeed(id){
return new seedTable[id]; return new seedTable[id];
} }
...@@ -89,11 +89,6 @@ function equals__devirtual$(this$static, other){ ...@@ -89,11 +89,6 @@ function equals__devirtual$(this$static, other){
return maybeJsoInvocation = this$static , isJavaObject(maybeJsoInvocation)?maybeJsoInvocation.equals$(other):maybeJsoInvocation === other; return maybeJsoInvocation = this$static , isJavaObject(maybeJsoInvocation)?maybeJsoInvocation.equals$(other):maybeJsoInvocation === other;
} }
function getClass__devirtual$(this$static){
var maybeJsoInvocation;
return maybeJsoInvocation = this$static , isJavaObject(maybeJsoInvocation)?maybeJsoInvocation.___clazz$:Lcom_google_gwt_core_client_JavaScriptObject_2_classLit;
}
function hashCode__devirtual$(this$static){ function hashCode__devirtual$(this$static){
var maybeJsoInvocation; var maybeJsoInvocation;
return maybeJsoInvocation = this$static , isJavaObject(maybeJsoInvocation)?maybeJsoInvocation.hashCode$():getHashCode(maybeJsoInvocation); return maybeJsoInvocation = this$static , isJavaObject(maybeJsoInvocation)?maybeJsoInvocation.hashCode$():getHashCode(maybeJsoInvocation);
...@@ -340,7 +335,7 @@ function $getDefaultNative(){ ...@@ -340,7 +335,7 @@ function $getDefaultNative(){
function $clinit_LocaleInfo(){ function $clinit_LocaleInfo(){
$clinit_LocaleInfo = nullMethod; $clinit_LocaleInfo = nullMethod;
instance_0 = new LocaleInfo_0; instance = new LocaleInfo_0;
} }
function $getNumberConstants(this$static){ function $getNumberConstants(this$static){
...@@ -353,10 +348,10 @@ function LocaleInfo_0(){ ...@@ -353,10 +348,10 @@ function LocaleInfo_0(){
defineSeed(24, 1, {}, LocaleInfo_0); defineSeed(24, 1, {}, LocaleInfo_0);
_.numberConstants = null; _.numberConstants = null;
var instance_0; var instance;
function $clinit_NumberFormat(){ function $clinit_NumberFormat(){
$clinit_NumberFormat = nullMethod; $clinit_NumberFormat = nullMethod;
$getNumberConstants(($clinit_LocaleInfo() , $clinit_LocaleInfo() , instance_0)); $getNumberConstants(($clinit_LocaleInfo() , $clinit_LocaleInfo() , instance));
} }
function $addExponent(this$static, digits){ function $addExponent(this$static, digits){
...@@ -401,7 +396,7 @@ function $adjustFractionDigits(this$static, digits){ ...@@ -401,7 +396,7 @@ function $adjustFractionDigits(this$static, digits){
--toRemove; --toRemove;
} }
if (toRemove < this$static.digitsLength) { if (toRemove < this$static.digitsLength) {
$delete(digits, toRemove, this$static.digitsLength); $delete_0(digits, toRemove, this$static.digitsLength);
this$static.digitsLength = toRemove; this$static.digitsLength = toRemove;
} }
} }
...@@ -455,7 +450,7 @@ function $format(this$static, number){ ...@@ -455,7 +450,7 @@ function $format(this$static, number){
if (preRound > 0 && preRound < $toString(buf.data).length && $charAt($toString(buf.data), preRound) == 57) { if (preRound > 0 && preRound < $toString(buf.data).length && $charAt($toString(buf.data), preRound) == 57) {
$propagateCarry(this$static, buf, preRound - 1); $propagateCarry(this$static, buf, preRound - 1);
scale += $toString(buf.data).length - preRound; scale += $toString(buf.data).length - preRound;
$delete(buf, preRound, $toString(buf.data).length); $delete_0(buf, preRound, $toString(buf.data).length);
} }
this$static.exponent = 0; this$static.exponent = 0;
this$static.digitsLength = $toString(buf.data).length; this$static.digitsLength = $toString(buf.data).length;
...@@ -488,7 +483,7 @@ function $insertGroupingSeparators(this$static, digits, g){ ...@@ -488,7 +483,7 @@ function $insertGroupingSeparators(this$static, digits, g){
function $parseAffix(this$static, pattern, start, affix, inNegativePattern){ function $parseAffix(this$static, pattern, start, affix, inNegativePattern){
var ch, inQuote, len, pos; var ch, inQuote, len, pos;
$replace_0(affix, $toString(affix.data).length); $delete(affix, $toString(affix.data).length);
inQuote = false; inQuote = false;
len = pattern.length; len = pattern.length;
for (pos = start; pos < len; ++pos) { for (pos = start; pos < len; ++pos) {
...@@ -765,7 +760,7 @@ function toScaledString(buf, val){ ...@@ -765,7 +760,7 @@ function toScaledString(buf, val){
expDigits = expIdx + 1; expDigits = expIdx + 1;
expDigits < $toString(buf.data).length && $charAt($toString(buf.data), expDigits) == 43 && ++expDigits; expDigits < $toString(buf.data).length && $charAt($toString(buf.data), expDigits) == 43 && ++expDigits;
expDigits < $toString(buf.data).length && (scale = __parseAndValidateInt($substring($toString(buf.data), expDigits))); expDigits < $toString(buf.data).length && (scale = __parseAndValidateInt($substring($toString(buf.data), expDigits)));
$delete(buf, expIdx, $toString(buf.data).length); $delete_0(buf, expIdx, $toString(buf.data).length);
} }
dot = $indexOf_0($toString(buf.data), '.', startLen); dot = $indexOf_0($toString(buf.data), '.', startLen);
if (dot >= 0) { if (dot >= 0) {
...@@ -948,7 +943,6 @@ function init(){ ...@@ -948,7 +943,6 @@ function init(){
!!$stats && onModuleStart('com.google.gwt.user.client.DocumentModeAsserter'); !!$stats && onModuleStart('com.google.gwt.user.client.DocumentModeAsserter');
$onModuleLoad(); $onModuleLoad();
!!$stats && onModuleStart('edu.umb.bio.jsMolCalc.client.JsMolCalcAPI'); !!$stats && onModuleStart('edu.umb.bio.jsMolCalc.client.JsMolCalcAPI');
new TaskExporterImpl_0;
$clinit_ExporterUtil(); $clinit_ExporterUtil();
new ExportAllExporterImpl_0; new ExportAllExporterImpl_0;
} }
...@@ -1022,30 +1016,30 @@ function $getRuntimeValue(){ ...@@ -1022,30 +1016,30 @@ function $getRuntimeValue(){
function $export(){ function $export(){
if (!exported) { if (!exported) {
exported = true; exported = true;
new InfoExporterImpl_0;
$export0(); $export0();
} }
} }
function $export0(){ function $export0(){
var pkg = declarePackage('jsmol.API'); var pkg = ($clinit_ExporterUtil() , $declarePackage('jsmol.API'));
var __0; var __0;
$wnd.jsmol.API = $entry(function(){ $wnd.jsmol.API = $entry(function(){
var g, j = this; var g, j = this;
isAssignableToInstance(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$API_2_classLit, arguments)?(g = arguments[0]):arguments.length == 0 && (g = new JsMolCalcAPI$API_0); isAssignableToInstance(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$API_2_classLit, arguments)?(g = arguments[0]):arguments.length == 0 && (g = new JsMolCalcAPI$API_0);
j.g = g; j.g = g;
setWrapper(g, j); g['__gwtex_wrap'] = j;
return j; return j;
} }
); );
__0 = $wnd.jsmol.API.prototype = new Object; __0 = $wnd.jsmol.API.prototype = new Object;
$wnd.jsmol.API.getInfo = $entry(function(a0, a1, a2){ $wnd.jsmol.API.getErrors = $entry(function(a0, a1, a2){
var result; var iat, info;
return wrap((result = computeAndDisplay(a0, a1, a2) , new JsMolCalcAPI$Info_0(result.info))); return new JsMolCalc_0 , iat = $computeAndDisplay(a0, a1, a2) , info = iat.info , info.indexOf('It is not possible') == 0?info:'';
} }
); );
$wnd.jsmol.API.getTasks = $entry(function(a0, a1, a2){ $wnd.jsmol.API.getInfo = $entry(function(a0, a1, a2){
return wrap_0(getTasks(a0, a1, a2)); var iat;
return new JsMolCalc_0 , iat = $computeAndDisplay(a0, a1, a2) , iat.info;
} }
); );
addTypeMap(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$API_2_classLit, $wnd.jsmol.API); addTypeMap(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$API_2_classLit, $wnd.jsmol.API);
...@@ -1060,6 +1054,312 @@ function APIExporterImpl_0(){ ...@@ -1060,6 +1054,312 @@ function APIExporterImpl_0(){
defineSeed(40, 1, {}, APIExporterImpl_0); defineSeed(40, 1, {}, APIExporterImpl_0);
var exported = false; var exported = false;
function $computeAndDisplay(molString, smileString, jmeString){
var atom, atomDataLines, atomLineParts, atomList, atomNumber, bondArray, bondIndex, bondLineParts, bondString, br, c, canMakeHbonds, canMakeIonicBonds, charge, chargeLineParts, cl, currentAtom, currentAtomSpec, currentNeighbor, element, errorString, f, fifthAtom, firstAtom, formula, formulaString, fourthAtom, h, i, illegalAtoms, iodine, j, k, l, line3Parts, logp, logpString, m, molStringLines, moleculeInfo, n, neighbors, nf, numAromaticAtoms, numAtoms, numBonds, o, p_0, s, secondAtom, sixthAtom, targets, thirdAtom;
if ($equals(molString, '') || $equals(smileString, '') || $equals(jmeString, '')) {
return new JsMolCalc$InfoAndTargets_0('');
}
atomDataLines = new StringBuffer_0;
logpString = '';
bondString = '';
atomList = new ArrayList_0;
$add_0(atomList, new JsMolCalc$Atom_0);
molStringLines = $split(molString, '\n', 0);
line3Parts = $split(molStringLines[3], '[ ]+', 0);
numAtoms = __parseAndValidateInt(line3Parts[1]);
numBonds = __parseAndValidateInt(line3Parts[2]);
for (i = 1; i < numAtoms + 1; ++i) {
atomLineParts = $split(molStringLines[i + 3], '[ ]+', 0);
element = atomLineParts[4];
atom = new JsMolCalc$Atom_0;
atom.element = element;
setCheck(atomList.array, atomList.size++, atom);
}
for (i = 0; i < molStringLines.length; ++i) {
if (molStringLines[i].indexOf('CHG') != -1) {
chargeLineParts = $split(molStringLines[i], '[ ]+', 0);
atomNumber = __parseAndValidateInt(chargeLineParts[3]);
charge = __parseAndValidateInt(chargeLineParts[4]);
atom = dynamicCast((checkIndex(atomNumber, atomList.size) , atomList.array[atomNumber]), Q$JsMolCalc$Atom);
atom.charge = charge;
}
}
bondArray = initDims([_3_3I_classLit, _3I_classLit], [makeCastMap([Q$Serializable]), makeCastMap([Q$int_$1, Q$Serializable])], [Q$int_$1, -1], [numAtoms + 1, numAtoms + 1], 2, 1);
for (i = 1; i < numAtoms + 1; ++i) {
fill(bondArray[i], bondArray[i].length);
}
for (i = 1; i < numBonds + 1; ++i) {
bondLineParts = $split(molStringLines[i + numAtoms + 3], '[ ]+', 0);
firstAtom = __parseAndValidateInt(bondLineParts[1]);
secondAtom = __parseAndValidateInt(bondLineParts[2]);
bondIndex = __parseAndValidateInt(bondLineParts[3]);
bondArray[firstAtom][secondAtom] = bondIndex;
bondArray[secondAtom][firstAtom] = bondIndex;
$addBondToNonHAtom(dynamicCast((checkIndex(firstAtom, atomList.size) , atomList.array[firstAtom]), Q$JsMolCalc$Atom), bondIndex);
$addBondToNonHAtom(dynamicCast((checkIndex(secondAtom, atomList.size) , atomList.array[secondAtom]), Q$JsMolCalc$Atom), bondIndex);
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
bondArray[i][j] != 0 && $updateHybridization(currentAtom, bondArray[i][j]);
}
}
for (i = 1; i < numAtoms + 1; ++i) {
firstAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
if (($equals(firstAtom.element, 'C') || $equals(firstAtom.element, 'N')) && (firstAtom.hybridization == 2 || firstAtom.aromatic)) {
for (j = 1; j < numAtoms + 1; ++j) {
secondAtom = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$JsMolCalc$Atom);
if ((bondArray[i][j] == 1 || bondArray[i][j] == 2 || secondAtom.aromatic && bondArray[i][j] != 0 || firstAtom.aromatic && bondArray[i][j] != 0) && ($equals(secondAtom.element, 'C') || $equals(secondAtom.element, 'N')) && secondAtom.hybridization == 2 && i != j) {
for (k = 1; k < numAtoms + 1; ++k) {
thirdAtom = dynamicCast((checkIndex(k, atomList.size) , atomList.array[k]), Q$JsMolCalc$Atom);
if ((bondArray[j][k] == 1 && bondArray[i][j] == 2 || bondArray[j][k] == 2 && bondArray[i][j] == 1 || thirdAtom.aromatic && bondArray[j][k] != 0 || secondAtom.aromatic && bondArray[j][k] != 0) && ($equals(thirdAtom.element, 'C') || $equals(thirdAtom.element, 'N')) && thirdAtom.hybridization == 2 && k != i && k != j) {
for (l = 1; l < numAtoms + 1; ++l) {
fourthAtom = dynamicCast((checkIndex(l, atomList.size) , atomList.array[l]), Q$JsMolCalc$Atom);
if ((bondArray[k][l] == 1 && bondArray[j][k] == 2 || bondArray[k][l] == 2 && bondArray[j][k] == 1 || fourthAtom.aromatic && bondArray[k][l] != 0 || thirdAtom.aromatic && bondArray[k][l] != 0) && ($equals(fourthAtom.element, 'C') || $equals(fourthAtom.element, 'N')) && fourthAtom.hybridization == 2 && l != i && l != j && l != k) {
for (m = 1; m < numAtoms + 1; ++m) {
fifthAtom = dynamicCast((checkIndex(m, atomList.size) , atomList.array[m]), Q$JsMolCalc$Atom);
if ((bondArray[l][m] == 1 && bondArray[k][l] == 2 || bondArray[l][m] == 2 && bondArray[k][l] == 1 || fifthAtom.aromatic && bondArray[l][m] != 0 || fourthAtom.aromatic && bondArray[l][m] != 0) && ($equals(fifthAtom.element, 'C') || $equals(fifthAtom.element, 'N')) && fifthAtom.hybridization == 2 && m != i && m != j && m != k && m != l) {
for (n = 1; n < numAtoms + 1; ++n) {
sixthAtom = dynamicCast((checkIndex(n, atomList.size) , atomList.array[n]), Q$JsMolCalc$Atom);
if ((bondArray[m][n] == 1 && bondArray[l][m] == 2 || bondArray[m][n] == 2 && bondArray[l][m] == 1 || sixthAtom.aromatic && bondArray[m][n] != 0 || fifthAtom.aromatic && bondArray[m][n] != 0) && ($equals(sixthAtom.element, 'C') || $equals(sixthAtom.element, 'N')) && sixthAtom.hybridization == 2 && n != i && n != j && n != k && n != l && n != m) {
if (bondArray[n][i] == 2 && bondArray[m][n] == 1 || bondArray[n][i] == 1 && bondArray[m][n] == 2) {
firstAtom.aromatic = true;
secondAtom.aromatic = true;
thirdAtom.aromatic = true;
fourthAtom.aromatic = true;
fifthAtom.aromatic = true;
sixthAtom.aromatic = true;
}
}
}
}
}
}
}
}
}
}
}
}
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
if (bondArray[i][j] != 0) {
currentNeighbor = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$JsMolCalc$Atom);
$processNeighbor(currentAtom, currentNeighbor.element, bondArray[i][j], currentNeighbor.aromatic);
}
}
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
if (bondArray[i][j] != 0) {
currentNeighbor = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$JsMolCalc$Atom);
if (currentNeighbor.hybridization < 3) {
for (k = 1; k < numAtoms + 1; ++k) {
bondArray[j][k] > 1 && k != i && ++currentAtom.numNeighborPi;
}
}
}
}
}
h = 0;
charge = 0;
for (i = 1; i < numAtoms + 1; ++i) {
atom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
$getNumNeighborHs(atom);
h = h + atom.numNeighborHs;
charge = charge + atom.charge;
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
if (bondArray[i][j] != 0) {
currentNeighbor = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$JsMolCalc$Atom);
$equals(currentAtom.element, 'N') && currentNeighbor.isACarbonyl && (currentAtom.amide = true);
}
}
}
illegalAtoms = new StringBuffer_0;
for (i = 1; i < numAtoms + 1; ++i) {
atom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
$equals(atom.element, 'C') && atom.charge != 0 && ($append(illegalAtoms.data, 'A Charged C atom.<br>') , illegalAtoms);
if ($equals(atom.element, 'N')) {
atom.charge > 1 && ($append(illegalAtoms.data, 'An N atom with too high + charge.<br>') , illegalAtoms);
atom.charge < 0 && ($append(illegalAtoms.data, 'An N atom with - charge.<br>') , illegalAtoms);
$getNumNeighborHs(atom) < 0 && !($equals(atom.doubleBondedNeighbor, 'O2') && $getNumNeighborHs(atom) == -2 && atom.numNeighborCs == 1 && atom.numNeighborXs == 2 && atom.charge == 0) && ($append(illegalAtoms.data, 'An N atom making too many bonds.<br>') , illegalAtoms);
}
if ($equals(atom.element, 'O')) {
atom.charge < -1 && ($append(illegalAtoms.data, 'An O atom with too high - charge.<br>') , illegalAtoms);
atom.charge > 0 && ($append(illegalAtoms.data, 'An O atom with + charge.<br>') , illegalAtoms);
}
if ($equals(atom.element, 'S')) {
atom.charge > 0 && ($append(illegalAtoms.data, 'An S atom with a + charge.<br>') , illegalAtoms);
$getNumNeighborHs(atom) < 0 && $getNumNeighborHs(atom) != -4 && $getNumNeighborHs(atom) != -2 && ($append(illegalAtoms.data, 'An S atom not making 2, 4, or 6 bonds.<br>') , illegalAtoms);
}
if ($equals(atom.element, 'P')) {
atom.charge != 0 && ($append(illegalAtoms.data, 'A Charged P atom.<br>') , illegalAtoms);
atom.numNeighborHs != -3 && ($append(illegalAtoms.data, 'A P atom not making 5 bonds.<br>') , illegalAtoms);
}
if ($equals(atom.element, 'F') || $equals(atom.element, 'Cl') || $equals(atom.element, 'Br') || $equals(atom.element, 'I')) {
atom.charge != 0 && $append_0(illegalAtoms, 'A Charged ' + atom.element + ' atom.<br>');
atom.numBondsToNonHAtoms > 1 && $append_0(illegalAtoms, 'A ' + atom.element + ' atom making more than one bond.<br>');
}
$equals(atom.element, 'X') && ($append(illegalAtoms.data, 'An X atom.<br>') , illegalAtoms);
}
errorString = '';
$toString(illegalAtoms.data).length != 0 && (errorString = '<html><body>It is not possible to calculate the properties<br>of your molecule because it contains:<br>' + $toString(illegalAtoms.data) + '<\/body><\/html>');
logp = 0;
canMakeHbonds = false;
canMakeIonicBonds = false;
if ($toString(illegalAtoms.data).length == 0) {
nf = ($clinit_NumberFormat() , new NumberFormat_1($getDefaultNative()));
for (i = 1; i < numAtoms + 1; ++i) {
atom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$JsMolCalc$Atom);
currentAtomSpec = $getAtomSpec(atom);
logp = logp + currentAtomSpec.logp;
canMakeHbonds = canMakeHbonds || currentAtomSpec.canMakeHbonds;
canMakeIonicBonds = canMakeIonicBonds || currentAtomSpec.canMakeIonicBonds;
neighbors = new StringBuffer_0;
for (j = 1; j < numAtoms + 1; ++j) {
bondArray[i][j] != 0 && ($append(neighbors.data, j + ' ') , neighbors);
}
$append_0(atomDataLines, i + ' ' + currentAtomSpec.type + '; bonded to: ' + $toString(neighbors.data) + '; logp= ' + $format(nf, currentAtomSpec.logp) + '; H-bonds: ' + currentAtomSpec.canMakeHbonds + '; ionic bonds: ' + currentAtomSpec.canMakeIonicBonds + '\n');
}
logp < 0?(logpString = '<font color=green>Hydrophobicity index = ' + $format(nf, logp) + '<\/font>'):(logpString = '<font color=red>Hydrophobicity index = ' + $format(nf, logp) + '<\/font>');
canMakeHbonds?(bondString = '<font color=green>Can Make Strong Hydrogen Bonds<\/font><br>'):(bondString = '<font color=red>Can not Make Strong Hydrogen Bonds<\/font><br>');
canMakeIonicBonds?(bondString += '<font color=green>Can Make Ionic Bonds<\/font>'):(bondString += '<font color=red>Can not Make Ionic Bonds<\/font>');
}
numBonds = 0;
numAromaticAtoms = 0;
c = 0;
n = 0;
o = 0;
s = 0;
p_0 = 0;
cl = 0;
br = 0;
f = 0;
iodine = 0;
formula = new StringBuffer_0;
for (i = 0; i < smileString.length; ++i) {
switch (smileString.charCodeAt(i)) {
case 67:
++c;
break;
case 78:
++n;
break;
case 79:
++o;
break;
case 83:
++s;
break;
case 80:
++p_0;
break;
case 108:
--c;
++cl;
break;
case 66:
++br;
break;
case 70:
++f;
break;
case 73:
++iodine;
break;
case 99:
++c;
++numAromaticAtoms;
break;
case 110:
++n;
++numAromaticAtoms;
break;
case 115:
++s;
++numAromaticAtoms;
break;
case 111:
++o;
++numAromaticAtoms;
break;
case 35:
++numBonds;
case 61:
++numBonds;
}
}
$prettyPrint('C', c, formula);
$prettyPrint('H', h, formula);
$prettyPrint('N', n, formula);
$prettyPrint('O', o, formula);
$prettyPrint('P', p_0, formula);
$prettyPrint('S', s, formula);
$prettyPrint('Cl', cl, formula);
$prettyPrint('Br', br, formula);
$prettyPrint('F', f, formula);
$prettyPrint('I', iodine, formula);
if (charge != 0) {
$append(formula.data, '(');
charge == -1?($append(formula.data, '-') , formula):charge > 0 && ($append(formula.data, '+') , formula);
(charge < 0?-charge:charge) != 1 && ($append(formula.data, '' + charge) , formula);
$append(formula.data, ')');
}
formulaString = 'Formula: ' + $toString(formula.data);
$equals(errorString, '')?(moleculeInfo = '<html><body>' + formulaString + '<br>' + logpString + '<br>' + bondString + '<\/body><\/html>'):(moleculeInfo = errorString);
if ($equals(errorString, '')) {
nf = ($clinit_NumberFormat() , new NumberFormat_1($getDefaultNative()));
targets = '<html><body>Edit the molecule so that it:<br><ul>';
targets += '<li>can ';
canMakeHbonds && (targets += ' not ');
targets += 'make Hydrogen bonds<\/li>';
targets += '<li>can ';
canMakeIonicBonds && (targets += ' not ');
targets += 'make Ionic bonds<\/li>';
targets += '<li>has a relative hydrophobicity between ';
targets += $format(nf, logp - 1.5);
targets += ' and ';
targets += $format(nf, logp - 0.5);
targets += '<\/li>';
targets += '<li>has a relative hydrophobicity between ';
targets += $format(nf, logp + 0.5);
targets += ' and ';
targets += $format(nf, logp + 1.5);
targets += '<\/li>';
targets += '<\/ul><\/body><\/html>';
}
return new JsMolCalc$InfoAndTargets_0(moleculeInfo);
}
function $prettyPrint(atomLabel, number, outString){
if (number == 0) {
return;
}
$append(outString.data, atomLabel);
if (number == 1) {
$append(outString.data, ' ');
return;
}
$append(outString.data, '<sub>' + number + '<\/sub> ');
}
function JsMolCalc_0(){
new ArrayList_0;
}
defineSeed(41, 1, {}, JsMolCalc_0);
function $addBondToNonHAtom(this$static, bondIndex){
this$static.numBondsToNonHAtoms = this$static.numBondsToNonHAtoms + bondIndex;
}
--></script>
<script><!--
function $getAtomSpec(this$static){ function $getAtomSpec(this$static){
var charged; var charged;
this$static.chargeOffset = 0; this$static.chargeOffset = 0;
...@@ -1069,30 +1369,30 @@ function $getAtomSpec(this$static){ ...@@ -1069,30 +1369,30 @@ function $getAtomSpec(this$static){
case 3: case 3:
switch (this$static.numNeighborHs) { switch (this$static.numNeighborHs) {
case 4: case 4:
return new AtomSpec_0(0.528, 'C: sp3, H4', false, false); return new JsMolCalc$AtomSpec_0(0.528, 'C: sp3, H4', false, false);
case 3: case 3:
return this$static.numNeighborXs == 0?this$static.numNeighborPi == 0?new AtomSpec_0(0.528, 'C: sp3; C H H H, no pi', false, false):new AtomSpec_0(0.267, 'C: sp3; C H H H, pi', false, false):new AtomSpec_0(-0.032, 'C: sp3; X H H H', false, false); return this$static.numNeighborXs == 0?this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.528, 'C: sp3; C H H H, no pi', false, false):new JsMolCalc$AtomSpec_0(0.267, 'C: sp3; C H H H, pi', false, false):new JsMolCalc$AtomSpec_0(-0.032, 'C: sp3; X H H H', false, false);
case 2: case 2:
if (this$static.numNeighborXs == 0) { if (this$static.numNeighborXs == 0) {
switch (this$static.numNeighborPi) { switch (this$static.numNeighborPi) {
case 0: case 0:
return new AtomSpec_0(0.358, 'C: sp3; C C H H, no pi', false, false); return new JsMolCalc$AtomSpec_0(0.358, 'C: sp3; C C H H, no pi', false, false);
case 1: case 1:
return new AtomSpec_0(-0.008, 'C: sp3; C C H H, 1 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.008, 'C: sp3; C C H H, 1 pi', false, false);
case 2: case 2:
return new AtomSpec_0(-0.185, 'C: sp3; C C H H, 2 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.185, 'C: sp3; C C H H, 2 pi', false, false);
default:return new AtomSpec_0(0, 'C: sp3; ? ? H H', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: sp3; ? ? H H', false, false);
} }
} }
else { else {
switch (this$static.numNeighborPi) { switch (this$static.numNeighborPi) {
case 0: case 0:
return new AtomSpec_0(-0.137, 'C: sp3; C X H H, no pi', false, false); return new JsMolCalc$AtomSpec_0(-0.137, 'C: sp3; C X H H, no pi', false, false);
case 1: case 1:
return new AtomSpec_0(-0.303, 'C: sp3; C X H H, 1 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.303, 'C: sp3; C X H H, 1 pi', false, false);
case 2: case 2:
return new AtomSpec_0(-0.815, 'C: sp3; C X H H, 2 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.815, 'C: sp3; C X H H, 2 pi', false, false);
default:return new AtomSpec_0(0, 'C: sp3; ? X H H, H2', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: sp3; ? X H H, H2', false, false);
} }
} }
...@@ -1100,19 +1400,19 @@ function $getAtomSpec(this$static){ ...@@ -1100,19 +1400,19 @@ function $getAtomSpec(this$static){
if (this$static.numNeighborXs == 0) { if (this$static.numNeighborXs == 0) {
switch (this$static.numNeighborPi) { switch (this$static.numNeighborPi) {
case 0: case 0:
return new AtomSpec_0(0.127, 'C: sp3; C C C H, no pi', false, false); return new JsMolCalc$AtomSpec_0(0.127, 'C: sp3; C C C H, no pi', false, false);
case 1: case 1:
return new AtomSpec_0(-0.243, 'C: sp3; C C C H, 1 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.243, 'C: sp3; C C C H, 1 pi', false, false);
default:return new AtomSpec_0(-0.499, 'C: sp3; C C C H, >1 pi', false, false); default:return new JsMolCalc$AtomSpec_0(-0.499, 'C: sp3; C C C H, >1 pi', false, false);
} }
} }
else { else {
switch (this$static.numNeighborPi) { switch (this$static.numNeighborPi) {
case 0: case 0:
return new AtomSpec_0(-0.205, 'C: sp3; C C/X X H, no pi', false, false); return new JsMolCalc$AtomSpec_0(-0.205, 'C: sp3; C C/X X H, no pi', false, false);
case 1: case 1:
return new AtomSpec_0(-0.305, 'C: sp3; C C/X X H, 1 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.305, 'C: sp3; C C/X X H, 1 pi', false, false);
default:return new AtomSpec_0(-0.709, 'C: sp3; C C/X X H, >1 pi', false, false); default:return new JsMolCalc$AtomSpec_0(-0.709, 'C: sp3; C C/X X H, >1 pi', false, false);
} }
} }
...@@ -1120,74 +1420,74 @@ function $getAtomSpec(this$static){ ...@@ -1120,74 +1420,74 @@ function $getAtomSpec(this$static){
if (this$static.numNeighborXs == 0) { if (this$static.numNeighborXs == 0) {
switch (this$static.numNeighborPi) { switch (this$static.numNeighborPi) {
case 0: case 0:
return new AtomSpec_0(-0.006, 'C: sp3; C C C C, no pi', false, false); return new JsMolCalc$AtomSpec_0(-0.006, 'C: sp3; C C C C, no pi', false, false);
case 1: case 1:
return new AtomSpec_0(-0.57, 'C: sp3; C C C C, 1 pi', false, false); return new JsMolCalc$AtomSpec_0(-0.57, 'C: sp3; C C C C, 1 pi', false, false);
default:return new AtomSpec_0(-0.317, 'C: sp3; C C C C, >1 pi', false, false); default:return new JsMolCalc$AtomSpec_0(-0.317, 'C: sp3; C C C C, >1 pi', false, false);
} }
} }
else { else {
switch (this$static.numNeighborPi) { switch (this$static.numNeighborPi) {
case 0: case 0:
return new AtomSpec_0(-0.316, 'C: sp3; C C/X C/X X, no pi', false, false); return new JsMolCalc$AtomSpec_0(-0.316, 'C: sp3; C C/X C/X X, no pi', false, false);
default:return new AtomSpec_0(-0.723, 'C: sp3; C C/X C/X X, pi', false, false); default:return new JsMolCalc$AtomSpec_0(-0.723, 'C: sp3; C C/X C/X X, pi', false, false);
} }
} }
default:return new AtomSpec_0(0, 'C: sp3; unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: sp3; unknown', false, false);
} }
case 2: case 2:
if (!this$static.aromatic) { if (!this$static.aromatic) {
switch (this$static.numNeighborHs) { switch (this$static.numNeighborHs) {
case 2: case 2:
return new AtomSpec_0(0.42, 'C: sp2; =? H H', false, false); return new JsMolCalc$AtomSpec_0(0.42, 'C: sp2; =? H H', false, false);
case 1: case 1:
switch (this$static.numNeighborXs) { switch (this$static.numNeighborXs) {
case 1: case 1:
return this$static.numNeighborPi == 0?new AtomSpec_0(0.001, 'C: sp2; =? X H, no pi', false, false):new AtomSpec_0(-0.31, 'C: sp2; =? X H, 1 pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.001, 'C: sp2; =? X H, no pi', false, false):new JsMolCalc$AtomSpec_0(-0.31, 'C: sp2; =? X H, 1 pi', false, false);
case 0: case 0:
return this$static.numNeighborPi == 0?new AtomSpec_0(0.466, 'C: sp2; =? C H, no pi', false, false):new AtomSpec_0(0.136, 'C: sp2; =? C H, 1 pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.466, 'C: sp2; =? C H, no pi', false, false):new JsMolCalc$AtomSpec_0(0.136, 'C: sp2; =? C H, 1 pi', false, false);
default:return new AtomSpec_0(0, 'C: sp2; =? H, unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: sp2; =? H, unknown', false, false);
} }
case 0: case 0:
switch (this$static.numNeighborXs) { switch (this$static.numNeighborXs) {
case 2: case 2:
return this$static.numNeighborPi == 0?new AtomSpec_0(0.005, 'C: sp2; =? X X, no pi', false, false):new AtomSpec_0(-0.315, 'C: sp2; =? X X, pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.005, 'C: sp2; =? X X, no pi', false, false):new JsMolCalc$AtomSpec_0(-0.315, 'C: sp2; =? X X, pi', false, false);
case 1: case 1:
return this$static.numNeighborPi == 0?new AtomSpec_0(-0.03, 'C: sp2; =? C X, no pi', false, false):new AtomSpec_0(-0.027, 'C: sp2; =? C X, pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(-0.03, 'C: sp2; =? C X, no pi', false, false):new JsMolCalc$AtomSpec_0(-0.027, 'C: sp2; =? C X, pi', false, false);
case 0: case 0:
return this$static.numNeighborPi == 0?new AtomSpec_0(0.05, 'C: sp2; =? C C, no pi', false, false):new AtomSpec_0(0.013, 'C: sp2; =? C C, pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.05, 'C: sp2; =? C C, no pi', false, false):new JsMolCalc$AtomSpec_0(0.013, 'C: sp2; =? C C, pi', false, false);
default:return new AtomSpec_0(0, 'C: sp2; =? C C, unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: sp2; =? C C, unknown', false, false);
} }
default:return new AtomSpec_0(0, 'C: sp2; unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: sp2; unknown', false, false);
} }
} }
switch (this$static.numNeighborHs) { switch (this$static.numNeighborHs) {
case 1: case 1:
return this$static.numNeighborNAro == 0?new AtomSpec_0(0.337, 'C: aromatic; C C H', false, false):new AtomSpec_0(0.126, 'C: aromatic; aro-N C H', false, false); return this$static.numNeighborNAro == 0?new JsMolCalc$AtomSpec_0(0.337, 'C: aromatic; C C H', false, false):new JsMolCalc$AtomSpec_0(0.126, 'C: aromatic; aro-N C H', false, false);
case 0: case 0:
switch (this$static.numNeighborXs) { switch (this$static.numNeighborXs) {
case 2: case 2:
return this$static.numNeighborNAro == 0?new AtomSpec_0(0, 'C: aromatic; unknown C X X', false, false):new AtomSpec_0(0.366, 'C: aromatic; aro-N C X', false, false); return this$static.numNeighborNAro == 0?new JsMolCalc$AtomSpec_0(0, 'C: aromatic; unknown C X X', false, false):new JsMolCalc$AtomSpec_0(0.366, 'C: aromatic; aro-N C X', false, false);
case 1: case 1:
return this$static.numNeighborNAro == 0?new AtomSpec_0(-0.151, 'C: aromatic; C C X', false, false):new AtomSpec_0(0.174, 'C: aromatic; aro-N C C', false, false); return this$static.numNeighborNAro == 0?new JsMolCalc$AtomSpec_0(-0.151, 'C: aromatic; C C X', false, false):new JsMolCalc$AtomSpec_0(0.174, 'C: aromatic; aro-N C C', false, false);
case 0: case 0:
return new AtomSpec_0(0.296, 'C: aromatic; C C C', false, false); return new JsMolCalc$AtomSpec_0(0.296, 'C: aromatic; C C C', false, false);
default:return new AtomSpec_0(0, 'C: aromatic; unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: aromatic; unknown', false, false);
} }
default:return new AtomSpec_0(0, 'C: aromatic; unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: aromatic; unknown', false, false);
} }
case 1: case 1:
if (this$static.isAnAllene) if (this$static.isAnAllene)
return new AtomSpec_0(2.073, 'C: =C=', false, false); return new JsMolCalc$AtomSpec_0(2.073, 'C: =C=', false, false);
return this$static.numNeighborHs == 0?new AtomSpec_0(0.33, 'C: sp; ? ?', false, false):new AtomSpec_0(0.209, 'C: sp; ? H', false, false); return this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(0.33, 'C: sp; ? ?', false, false):new JsMolCalc$AtomSpec_0(0.209, 'C: sp; ? H', false, false);
default:return new AtomSpec_0(0, 'C: unknown', false, false); default:return new JsMolCalc$AtomSpec_0(0, 'C: unknown', false, false);
} }
} }
if ($equals(this$static.element, 'N')) { if ($equals(this$static.element, 'N')) {
...@@ -1224,11 +1524,11 @@ function $getAtomSpec(this$static){ ...@@ -1224,11 +1524,11 @@ function $getAtomSpec(this$static){
if (this$static.amide) { if (this$static.amide) {
switch (this$static.numNeighborHs) { switch (this$static.numNeighborHs) {
case 2: case 2:
return new AtomSpec_0(-0.646 + this$static.chargeOffset, 'N: amide; C=O H H' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(-0.646 + this$static.chargeOffset, 'N: amide; C=O H H' + this$static.chargeString, true, charged);
case 1: case 1:
return this$static.numNeighborXs == 0?new AtomSpec_0(-0.096 + this$static.chargeOffset, 'N: amide; C=O C H' + this$static.chargeString, true, charged):new AtomSpec_0(-0.044 + this$static.chargeOffset, 'N: amide; C=O X H' + this$static.chargeString, true, charged); return this$static.numNeighborXs == 0?new JsMolCalc$AtomSpec_0(-0.096 + this$static.chargeOffset, 'N: amide; C=O C H' + this$static.chargeString, true, charged):new JsMolCalc$AtomSpec_0(-0.044 + this$static.chargeOffset, 'N: amide; C=O X H' + this$static.chargeString, true, charged);
case 0: case 0:
return this$static.numNeighborXs == 0?new AtomSpec_0(0.078 + this$static.chargeOffset, 'N: amide; C=O C C' + this$static.chargeString, !charged, charged):new AtomSpec_0(-0.118 + this$static.chargeOffset, 'N: amide; C=O C X' + this$static.chargeString, !charged, charged); return this$static.numNeighborXs == 0?new JsMolCalc$AtomSpec_0(0.078 + this$static.chargeOffset, 'N: amide; C=O C C' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(-0.118 + this$static.chargeOffset, 'N: amide; C=O C X' + this$static.chargeString, !charged, charged);
} }
} }
switch (this$static.hybridization) { switch (this$static.hybridization) {
...@@ -1236,40 +1536,40 @@ function $getAtomSpec(this$static){ ...@@ -1236,40 +1536,40 @@ function $getAtomSpec(this$static){
switch (this$static.numNeighborHs) { switch (this$static.numNeighborHs) {
case 2: case 2:
if (this$static.numNeighborXs != 0) if (this$static.numNeighborXs != 0)
return new AtomSpec_0(-1.082 + this$static.chargeOffset, 'N: sp3; X H H' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(-1.082 + this$static.chargeOffset, 'N: sp3; X H H' + this$static.chargeString, true, charged);
return this$static.numNeighborPi == 0?new AtomSpec_0(-0.534 + this$static.chargeOffset, 'N: sp3; C H H, no pi' + this$static.chargeString, true, charged):new AtomSpec_0(-0.329 + this$static.chargeOffset, 'N: sp3; C H H, pi' + this$static.chargeString, true, charged); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(-0.534 + this$static.chargeOffset, 'N: sp3; C H H, no pi' + this$static.chargeString, true, charged):new JsMolCalc$AtomSpec_0(-0.329 + this$static.chargeOffset, 'N: sp3; C H H, pi' + this$static.chargeString, true, charged);
case 1: case 1:
if (this$static.numNeighborXs != 0) if (this$static.numNeighborXs != 0)
return new AtomSpec_0(0.324 + this$static.chargeOffset, 'N: sp3; C X H' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(0.324 + this$static.chargeOffset, 'N: sp3; C X H' + this$static.chargeString, true, charged);
return this$static.numNeighborPi == 0?new AtomSpec_0(-0.112 + this$static.chargeOffset, 'N: sp3; C C H, no pi' + this$static.chargeString, true, charged):new AtomSpec_0(0.166 + this$static.chargeOffset, 'N: sp3; C C H, pi' + this$static.chargeString, true, charged); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(-0.112 + this$static.chargeOffset, 'N: sp3; C C H, no pi' + this$static.chargeString, true, charged):new JsMolCalc$AtomSpec_0(0.166 + this$static.chargeOffset, 'N: sp3; C C H, pi' + this$static.chargeString, true, charged);
case 0: case 0:
if (this$static.numNeighborXs != 0) if (this$static.numNeighborXs != 0)
return new AtomSpec_0(-0.239 + this$static.chargeOffset, 'N: sp3; C C X' + this$static.chargeString, !charged, charged); return new JsMolCalc$AtomSpec_0(-0.239 + this$static.chargeOffset, 'N: sp3; C C X' + this$static.chargeString, !charged, charged);
return this$static.numNeighborPi == 0?new AtomSpec_0(0.159 + this$static.chargeOffset, 'N: sp3; C C C, no pi' + this$static.chargeString, !charged, charged):new AtomSpec_0(0.761 + this$static.chargeOffset, 'N: sp3; C C C, pi' + this$static.chargeString, !charged, charged); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.159 + this$static.chargeOffset, 'N: sp3; C C C, no pi' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(0.761 + this$static.chargeOffset, 'N: sp3; C C C, pi' + this$static.chargeString, !charged, charged);
default:return new AtomSpec_0(this$static.chargeOffset, 'N: sp3; unknown' + this$static.chargeString, true, charged); default:return new JsMolCalc$AtomSpec_0(this$static.chargeOffset, 'N: sp3; unknown' + this$static.chargeString, true, charged);
} }
case 2: case 2:
if (this$static.aromatic) { if (this$static.aromatic) {
return new AtomSpec_0(-0.493 + this$static.chargeOffset, 'N: aromatic' + this$static.chargeString, !charged, charged); return new JsMolCalc$AtomSpec_0(-0.493 + this$static.chargeOffset, 'N: aromatic' + this$static.chargeString, !charged, charged);
} }
if ($equals(this$static.doubleBondedNeighbor, 'C')) { if ($equals(this$static.doubleBondedNeighbor, 'C')) {
return this$static.numNeighborXs == 0?this$static.numNeighborPi == 0?this$static.numNeighborHs == 0?new AtomSpec_0(0.007 + this$static.chargeOffset, 'N: sp2; =C ? no H, no pi' + this$static.chargeString, !charged, charged):new AtomSpec_0(0.007 + this$static.chargeOffset, 'N: sp2; =C ? H, no pi' + this$static.chargeString, true, charged):this$static.numNeighborHs == 0?new AtomSpec_0(-0.275 + this$static.chargeOffset, 'N: sp2; =C ? no H, pi' + this$static.chargeString, !charged, charged):new AtomSpec_0(-0.275 + this$static.chargeOffset, 'N: sp2; =C ? H, pi' + this$static.chargeString, true, charged):this$static.numNeighborPi == 0?this$static.numNeighborHs == 0?new AtomSpec_0(0.366 + this$static.chargeOffset, 'N: sp2; =C X no H, no pi' + this$static.chargeString, !charged, charged):new AtomSpec_0(0.366 + this$static.chargeOffset, 'N: sp2; =C X H, no pi' + this$static.chargeString, true, charged):this$static.numNeighborHs == 0?new AtomSpec_0(0.251 + this$static.chargeOffset, 'N: sp2; =C X no H, pi' + this$static.chargeString, !charged, charged):new AtomSpec_0(0.251 + this$static.chargeOffset, 'N: sp2; =C X H, pi' + this$static.chargeString, true, charged); return this$static.numNeighborXs == 0?this$static.numNeighborPi == 0?this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(0.007 + this$static.chargeOffset, 'N: sp2; =C ? no H, no pi' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(0.007 + this$static.chargeOffset, 'N: sp2; =C ? H, no pi' + this$static.chargeString, true, charged):this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(-0.275 + this$static.chargeOffset, 'N: sp2; =C ? no H, pi' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(-0.275 + this$static.chargeOffset, 'N: sp2; =C ? H, pi' + this$static.chargeString, true, charged):this$static.numNeighborPi == 0?this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(0.366 + this$static.chargeOffset, 'N: sp2; =C X no H, no pi' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(0.366 + this$static.chargeOffset, 'N: sp2; =C X H, no pi' + this$static.chargeString, true, charged):this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(0.251 + this$static.chargeOffset, 'N: sp2; =C X no H, pi' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(0.251 + this$static.chargeOffset, 'N: sp2; =C X H, pi' + this$static.chargeString, true, charged);
} }
if ($equals(this$static.doubleBondedNeighbor, 'N')) { if ($equals(this$static.doubleBondedNeighbor, 'N')) {
return this$static.numNeighborXs == 1?this$static.numNeighborHs == 0?new AtomSpec_0(0.536 + this$static.chargeOffset, 'N: sp2; =N ? no H' + this$static.chargeString, !charged, charged):new AtomSpec_0(0.536 + this$static.chargeOffset, 'N: sp2; =N ? H' + this$static.chargeString, true, charged):this$static.numNeighborHs == 0?new AtomSpec_0(-0.597 + this$static.chargeOffset, 'N: sp2; =N X no H' + this$static.chargeString, !charged, charged):new AtomSpec_0(-0.597 + this$static.chargeOffset, 'N: sp2; =N X H' + this$static.chargeString, true, charged); return this$static.numNeighborXs == 1?this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(0.536 + this$static.chargeOffset, 'N: sp2; =N ? no H' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(0.536 + this$static.chargeOffset, 'N: sp2; =N ? H' + this$static.chargeString, true, charged):this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(-0.597 + this$static.chargeOffset, 'N: sp2; =N X no H' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(-0.597 + this$static.chargeOffset, 'N: sp2; =N X H' + this$static.chargeString, true, charged);
} }
if ($equals(this$static.doubleBondedNeighbor, 'O')) if ($equals(this$static.doubleBondedNeighbor, 'O'))
return new AtomSpec_0(0.427 + this$static.chargeOffset, 'N: nitroso' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(0.427 + this$static.chargeOffset, 'N: nitroso' + this$static.chargeString, true, charged);
if (this$static.numNeighborXs != 0) if (this$static.numNeighborXs != 0)
return new AtomSpec_0(0.427, 'N: sp2; =? ?', true, charged); return new JsMolCalc$AtomSpec_0(0.427, 'N: sp2; =? ?', true, charged);
return new AtomSpec_0(this$static.chargeOffset, 'N: sp2; unknown' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(this$static.chargeOffset, 'N: sp2; unknown' + this$static.chargeString, true, charged);
case 1: case 1:
return $equals(this$static.doubleBondedNeighbor, 'O2')?new AtomSpec_0(1.178, 'N: nitro', true, false):this$static.numNeighborHs == 0?new AtomSpec_0(-0.566 + this$static.chargeOffset, 'N: sp no H' + this$static.chargeString, !charged, charged):new AtomSpec_0(-0.566 + this$static.chargeOffset, 'N: sp H' + this$static.chargeString, true, charged); return $equals(this$static.doubleBondedNeighbor, 'O2')?new JsMolCalc$AtomSpec_0(1.178, 'N: nitro', true, false):this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(-0.566 + this$static.chargeOffset, 'N: sp no H' + this$static.chargeString, !charged, charged):new JsMolCalc$AtomSpec_0(-0.566 + this$static.chargeOffset, 'N: sp H' + this$static.chargeString, true, charged);
default:return new AtomSpec_0(this$static.chargeOffset, 'N: unknown' + this$static.chargeString, true, charged); default:return new JsMolCalc$AtomSpec_0(this$static.chargeOffset, 'N: unknown' + this$static.chargeString, true, charged);
} }
} }
if ($equals(this$static.element, 'O')) { if ($equals(this$static.element, 'O')) {
...@@ -1284,18 +1584,18 @@ function $getAtomSpec(this$static){ ...@@ -1284,18 +1584,18 @@ function $getAtomSpec(this$static){
switch (this$static.numNeighborHs) { switch (this$static.numNeighborHs) {
case 1: case 1:
if (this$static.numNeighborXs != 0) if (this$static.numNeighborXs != 0)
return new AtomSpec_0(-0.522 + this$static.chargeOffset, 'O: sp3; X H' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(-0.522 + this$static.chargeOffset, 'O: sp3; X H' + this$static.chargeString, true, charged);
return this$static.numNeighborPi == 0?new AtomSpec_0(-0.467 + this$static.chargeOffset, 'O: sp3; C H, no pi' + this$static.chargeString, true, charged):new AtomSpec_0(0.082 + this$static.chargeOffset, 'O: sp3; C H, pi' + this$static.chargeString, true, charged); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(-0.467 + this$static.chargeOffset, 'O: sp3; C H, no pi' + this$static.chargeString, true, charged):new JsMolCalc$AtomSpec_0(0.082 + this$static.chargeOffset, 'O: sp3; C H, pi' + this$static.chargeString, true, charged);
case 0: case 0:
if (this$static.numNeighborXs != 0) if (this$static.numNeighborXs != 0)
return new AtomSpec_0(0.105 + this$static.chargeOffset, 'O: sp3; C X' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(0.105 + this$static.chargeOffset, 'O: sp3; C X' + this$static.chargeString, true, charged);
return this$static.numNeighborPi == 0?new AtomSpec_0(0.084 + this$static.chargeOffset, 'O: sp3; C C, no pi' + this$static.chargeString, true, charged):new AtomSpec_0(0.435 + this$static.chargeOffset, 'O: sp3; C C, pi' + this$static.chargeString, true, charged); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.084 + this$static.chargeOffset, 'O: sp3; C C, no pi' + this$static.chargeString, true, charged):new JsMolCalc$AtomSpec_0(0.435 + this$static.chargeOffset, 'O: sp3; C C, pi' + this$static.chargeString, true, charged);
default:return new AtomSpec_0(this$static.chargeOffset, 'O: sp3; unknown' + this$static.chargeString, true, charged); default:return new JsMolCalc$AtomSpec_0(this$static.chargeOffset, 'O: sp3; unknown' + this$static.chargeString, true, charged);
} }
case 2: case 2:
return new AtomSpec_0(-0.399 + this$static.chargeOffset, 'O: sp2' + this$static.chargeString, true, charged); return new JsMolCalc$AtomSpec_0(-0.399 + this$static.chargeOffset, 'O: sp2' + this$static.chargeString, true, charged);
default:return new AtomSpec_0(this$static.chargeOffset, 'O: unknown' + this$static.chargeString, true, charged); default:return new JsMolCalc$AtomSpec_0(this$static.chargeOffset, 'O: unknown' + this$static.chargeString, true, charged);
} }
} }
if ($equals(this$static.element, 'S')) { if ($equals(this$static.element, 'S')) {
...@@ -1307,39 +1607,39 @@ function $getAtomSpec(this$static){ ...@@ -1307,39 +1607,39 @@ function $getAtomSpec(this$static){
} }
switch (this$static.hybridization) { switch (this$static.hybridization) {
case 3: case 3:
return this$static.numNeighborHs == 0?new AtomSpec_0(0.255 + this$static.chargeOffset, 'S: sp3; C/X C/X' + this$static.chargeString, false, charged):new AtomSpec_0(0.419 + this$static.chargeOffset, 'S: sp3; C/X H' + this$static.chargeString, false, charged); return this$static.numNeighborHs == 0?new JsMolCalc$AtomSpec_0(0.255 + this$static.chargeOffset, 'S: sp3; C/X C/X' + this$static.chargeString, false, charged):new JsMolCalc$AtomSpec_0(0.419 + this$static.chargeOffset, 'S: sp3; C/X H' + this$static.chargeString, false, charged);
case 2: case 2:
return $equals(this$static.doubleBondedNeighbor, 'O')?new AtomSpec_0(-1.375, 'S: sulfoxide', false, charged):new AtomSpec_0(-0.148 + this$static.chargeOffset, 'S: sp2' + this$static.chargeString, false, charged); return $equals(this$static.doubleBondedNeighbor, 'O')?new JsMolCalc$AtomSpec_0(-1.375, 'S: sulfoxide', false, charged):new JsMolCalc$AtomSpec_0(-0.148 + this$static.chargeOffset, 'S: sp2' + this$static.chargeString, false, charged);
case 1: case 1:
if ($equals(this$static.doubleBondedNeighbor, 'O2')) { if ($equals(this$static.doubleBondedNeighbor, 'O2')) {
return new AtomSpec_0(-0.168, 'S: sulfone', false, charged); return new JsMolCalc$AtomSpec_0(-0.168, 'S: sulfone', false, charged);
} }
default:return new AtomSpec_0(this$static.chargeOffset, 'S: unknown' + this$static.chargeString, false, charged); default:return new JsMolCalc$AtomSpec_0(this$static.chargeOffset, 'S: unknown' + this$static.chargeString, false, charged);
} }
} }
if ($equals(this$static.element, 'P') && this$static.hybridization == 2) { if ($equals(this$static.element, 'P') && this$static.hybridization == 2) {
if ($equals(this$static.doubleBondedNeighbor, 'O')) { if ($equals(this$static.doubleBondedNeighbor, 'O')) {
return new AtomSpec_0(-0.447, 'P: in phosphate', false, false); return new JsMolCalc$AtomSpec_0(-0.447, 'P: in phosphate', false, false);
} }
if ($equals(this$static.doubleBondedNeighbor, 'S')) { if ($equals(this$static.doubleBondedNeighbor, 'S')) {
return new AtomSpec_0(1.253, 'P: in thio-phosphate', false, false); return new JsMolCalc$AtomSpec_0(1.253, 'P: in thio-phosphate', false, false);
} }
return new AtomSpec_0(0, 'P: unknown', false, false); return new JsMolCalc$AtomSpec_0(0, 'P: unknown', false, false);
} }
if ($equals(this$static.element, 'F')) { if ($equals(this$static.element, 'F')) {
return this$static.numNeighborPi == 0?new AtomSpec_0(0.375, 'F; no pi', false, false):new AtomSpec_0(0.202, 'F; pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.375, 'F; no pi', false, false):new JsMolCalc$AtomSpec_0(0.202, 'F; pi', false, false);
} }
if ($equals(this$static.element, 'Cl')) { if ($equals(this$static.element, 'Cl')) {
return this$static.numNeighborPi == 0?new AtomSpec_0(0.512, 'Cl; no pi', false, false):new AtomSpec_0(0.663, 'Cl; pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.512, 'Cl; no pi', false, false):new JsMolCalc$AtomSpec_0(0.663, 'Cl; pi', false, false);
} }
if ($equals(this$static.element, 'Br')) { if ($equals(this$static.element, 'Br')) {
return this$static.numNeighborPi == 0?new AtomSpec_0(0.85, 'Br; no pi', false, false):new AtomSpec_0(0.839, 'Br; pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(0.85, 'Br; no pi', false, false):new JsMolCalc$AtomSpec_0(0.839, 'Br; pi', false, false);
} }
if ($equals(this$static.element, 'I')) { if ($equals(this$static.element, 'I')) {
return this$static.numNeighborPi == 0?new AtomSpec_0(1.05, 'I; no pi', false, false):new AtomSpec_0(1.109, 'I; pi', false, false); return this$static.numNeighborPi == 0?new JsMolCalc$AtomSpec_0(1.05, 'I; no pi', false, false):new JsMolCalc$AtomSpec_0(1.109, 'I; pi', false, false);
} }
return new AtomSpec_0(0, 'unknown atom', false, false); return new JsMolCalc$AtomSpec_0(0, 'unknown atom', false, false);
} }
function $getNumNeighborHs(this$static){ function $getNumNeighborHs(this$static){
...@@ -1389,7 +1689,7 @@ function $updateHybridization(this$static, bondIndex){ ...@@ -1389,7 +1689,7 @@ function $updateHybridization(this$static, bondIndex){
} }
} }
function Atom_0(){ function JsMolCalc$Atom_0(){
this.element = ''; this.element = '';
this.charge = 0; this.charge = 0;
this.aromatic = false; this.aromatic = false;
...@@ -1408,9 +1708,10 @@ function Atom_0(){ ...@@ -1408,9 +1708,10 @@ function Atom_0(){
this.alreadyHasOneDoubleBond = false; this.alreadyHasOneDoubleBond = false;
this.isAnAllene = false; this.isAnAllene = false;
this.currentMaxBondIndex = 0; this.currentMaxBondIndex = 0;
this.numBondsToNonHAtoms = 0;
} }
defineSeed(41, 1, makeCastMap([Q$Atom]), Atom_0); defineSeed(42, 1, makeCastMap([Q$JsMolCalc$Atom]), JsMolCalc$Atom_0);
_.alreadyHasOneDoubleBond = false; _.alreadyHasOneDoubleBond = false;
_.amide = false; _.amide = false;
_.aromatic = false; _.aromatic = false;
...@@ -1423,507 +1724,40 @@ _.element = null; ...@@ -1423,507 +1724,40 @@ _.element = null;
_.hybridization = 0; _.hybridization = 0;
_.isACarbonyl = false; _.isACarbonyl = false;
_.isAnAllene = false; _.isAnAllene = false;
_.numBondsToNonHAtoms = 0;
_.numNeighborAro = 0; _.numNeighborAro = 0;
_.numNeighborCs = 0; _.numNeighborCs = 0;
_.numNeighborHs = 0; _.numNeighborHs = 0;
_.numNeighborNAro = 0; _.numNeighborNAro = 0;
_.numNeighborPi = 0; _.numNeighborPi = 0;
_.numNeighborXs = 0; _.numNeighborXs = 0;
function AtomSpec_0(logp, type, canMakeHbonds, canMakeIonicBonds){ function JsMolCalc$AtomSpec_0(logp, type, canMakeHbonds, canMakeIonicBonds){
this.type = type; this.type = type;
this.logp = logp; this.logp = logp;
this.canMakeHbonds = canMakeHbonds; this.canMakeHbonds = canMakeHbonds;
this.canMakeIonicBonds = canMakeIonicBonds; this.canMakeIonicBonds = canMakeIonicBonds;
} }
defineSeed(42, 1, {}, AtomSpec_0); defineSeed(43, 1, {}, JsMolCalc$AtomSpec_0);
_.canMakeHbonds = false; _.canMakeHbonds = false;
_.canMakeIonicBonds = false; _.canMakeIonicBonds = false;
_.logp = 0; _.logp = 0;
_.type = null; _.type = null;
function InfoAndTargets_0(info, targets){ function JsMolCalc$InfoAndTargets_0(info){
this.info = info; this.info = info;
this.targets = targets;
} }
defineSeed(43, 1, {}, InfoAndTargets_0); defineSeed(44, 1, {}, JsMolCalc$InfoAndTargets_0);
_.info = null; _.info = null;
_.targets = null; function JsMolCalcAPI$API_0(){
function $export_0(){
if (!exported_0) {
exported_0 = true;
$export0_0();
}
}
function $export0_0(){
var pkg = declarePackage('edu.umb.bio.jsMolCalc.JsMolCalcAPI.Info');
var __0;
$wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Info = $entry(function(){
var g, j = this;
isAssignableToInstance(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Info_2_classLit, arguments)?(g = arguments[0]):arguments.length == 1 && (g = ___create(gwtInstance(arguments[0])));
j.g = g;
setWrapper(g, j);
return j;
}
);
__0 = $wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Info.prototype = new Object;
__0.toString = $entry(function(){
return this.g.toString_0();
}
);
addTypeMap(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Info_2_classLit, $wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Info);
if (pkg)
for (p in pkg)
$wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Info[p] === undefined && ($wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Info[p] = pkg[p]);
} }
function InfoExporterImpl_0(){ defineSeed(45, 1, makeCastMap([Q$Exportable]), JsMolCalcAPI$API_0);
$export_0(); function ArrayStoreException_0(){
$fillInStackTrace();
} }
function ___create(a0){ defineSeed(46, 6, makeCastMap([Q$Serializable, Q$Throwable]), ArrayStoreException_0);
return new JsMolCalcAPI$Info_0(a0);
}
defineSeed(44, 1, {}, InfoExporterImpl_0);
var exported_0 = false;
--></script>
<script><!--
function computeAndDisplay(molString, smileString, jmeString){
var atom, atomDataLines, atomLineParts, atomList, atomNumber, bondArray, bondIndex, bondLineParts, br, c, canMakeHbonds, canMakeIonicBonds, charge, chargeLineParts, cl, currentAtom, currentAtomSpec, currentNeighbor, element, errorString, f, fifthAtom, firstAtom, formula, fourthAtom, h, i, illegalAtoms, info, iodine, j, k, l, line3Parts, logp, m, molStringLines, n, neighbors, nf, numAromaticAtoms, numAtoms, numBonds, o, p_0, s, secondAtom, sixthAtom, targets, thirdAtom;
if ($equals(molString, '') || $equals(smileString, '') || $equals(jmeString, '')) {
return new InfoAndTargets_0(null, null);
}
atomDataLines = new StringBuffer_0;
atomList = new ArrayList_0;
$add_0(atomList, new Atom_0);
molStringLines = $split(molString, '\n', 0);
line3Parts = $split(molStringLines[3], '[ ]+', 0);
numAtoms = __parseAndValidateInt(line3Parts[1]);
numBonds = __parseAndValidateInt(line3Parts[2]);
for (i = 1; i < numAtoms + 1; ++i) {
atomLineParts = $split(molStringLines[i + 3], '[ ]+', 0);
element = atomLineParts[4];
atom = new Atom_0;
atom.element = element;
setCheck(atomList.array, atomList.size++, atom);
}
for (i = 0; i < molStringLines.length; ++i) {
if (molStringLines[i].indexOf('CHG') != -1) {
chargeLineParts = $split(molStringLines[i], '[ ]+', 0);
atomNumber = __parseAndValidateInt(chargeLineParts[3]);
charge = __parseAndValidateInt(chargeLineParts[4]);
atom = dynamicCast((checkIndex(atomNumber, atomList.size) , atomList.array[atomNumber]), Q$Atom);
atom.charge = charge;
}
}
bondArray = initDims([_3_3I_classLit, _3I_classLit], [makeCastMap([Q$Serializable]), makeCastMap([Q$int_$1, Q$Serializable])], [Q$int_$1, -1], [numAtoms + 1, numAtoms + 1], 2, 1);
for (i = 1; i < numAtoms + 1; ++i) {
fill(bondArray[i], bondArray[i].length);
}
for (i = 1; i < numBonds + 1; ++i) {
bondLineParts = $split(molStringLines[i + numAtoms + 3], '[ ]+', 0);
firstAtom = __parseAndValidateInt(bondLineParts[1]);
secondAtom = __parseAndValidateInt(bondLineParts[2]);
bondIndex = __parseAndValidateInt(bondLineParts[3]);
bondArray[firstAtom][secondAtom] = bondIndex;
bondArray[secondAtom][firstAtom] = bondIndex;
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
bondArray[i][j] != 0 && $updateHybridization(currentAtom, bondArray[i][j]);
}
}
for (i = 1; i < numAtoms + 1; ++i) {
firstAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
if (($equals(firstAtom.element, 'C') || $equals(firstAtom.element, 'N')) && (firstAtom.hybridization == 2 || firstAtom.aromatic)) {
for (j = 1; j < numAtoms + 1; ++j) {
secondAtom = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$Atom);
if ((bondArray[i][j] == 1 || bondArray[i][j] == 2 || secondAtom.aromatic && bondArray[i][j] != 0 || firstAtom.aromatic && bondArray[i][j] != 0) && ($equals(secondAtom.element, 'C') || $equals(secondAtom.element, 'N')) && secondAtom.hybridization == 2 && i != j) {
for (k = 1; k < numAtoms + 1; ++k) {
thirdAtom = dynamicCast((checkIndex(k, atomList.size) , atomList.array[k]), Q$Atom);
if ((bondArray[j][k] == 1 && bondArray[i][j] == 2 || bondArray[j][k] == 2 && bondArray[i][j] == 1 || thirdAtom.aromatic && bondArray[j][k] != 0 || secondAtom.aromatic && bondArray[j][k] != 0) && ($equals(thirdAtom.element, 'C') || $equals(thirdAtom.element, 'N')) && thirdAtom.hybridization == 2 && k != i && k != j) {
for (l = 1; l < numAtoms + 1; ++l) {
fourthAtom = dynamicCast((checkIndex(l, atomList.size) , atomList.array[l]), Q$Atom);
if ((bondArray[k][l] == 1 && bondArray[j][k] == 2 || bondArray[k][l] == 2 && bondArray[j][k] == 1 || fourthAtom.aromatic && bondArray[k][l] != 0 || thirdAtom.aromatic && bondArray[k][l] != 0) && ($equals(fourthAtom.element, 'C') || $equals(fourthAtom.element, 'N')) && fourthAtom.hybridization == 2 && l != i && l != j && l != k) {
for (m = 1; m < numAtoms + 1; ++m) {
fifthAtom = dynamicCast((checkIndex(m, atomList.size) , atomList.array[m]), Q$Atom);
if ((bondArray[l][m] == 1 && bondArray[k][l] == 2 || bondArray[l][m] == 2 && bondArray[k][l] == 1 || fifthAtom.aromatic && bondArray[l][m] != 0 || fourthAtom.aromatic && bondArray[l][m] != 0) && ($equals(fifthAtom.element, 'C') || $equals(fifthAtom.element, 'N')) && fifthAtom.hybridization == 2 && m != i && m != j && m != k && m != l) {
for (n = 1; n < numAtoms + 1; ++n) {
sixthAtom = dynamicCast((checkIndex(n, atomList.size) , atomList.array[n]), Q$Atom);
if ((bondArray[m][n] == 1 && bondArray[l][m] == 2 || bondArray[m][n] == 2 && bondArray[l][m] == 1 || sixthAtom.aromatic && bondArray[m][n] != 0 || fifthAtom.aromatic && bondArray[m][n] != 0) && ($equals(sixthAtom.element, 'C') || $equals(sixthAtom.element, 'N')) && sixthAtom.hybridization == 2 && n != i && n != j && n != k && n != l && n != m) {
if (bondArray[n][i] == 2 && bondArray[m][n] == 1 || bondArray[n][i] == 1 && bondArray[m][n] == 2) {
firstAtom.aromatic = true;
secondAtom.aromatic = true;
thirdAtom.aromatic = true;
fourthAtom.aromatic = true;
fifthAtom.aromatic = true;
sixthAtom.aromatic = true;
}
}
}
}
}
}
}
}
}
}
}
}
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
if (bondArray[i][j] != 0) {
currentNeighbor = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$Atom);
$processNeighbor(currentAtom, currentNeighbor.element, bondArray[i][j], currentNeighbor.aromatic);
}
}
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
if (bondArray[i][j] != 0) {
currentNeighbor = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$Atom);
if (currentNeighbor.hybridization < 3) {
for (k = 1; k < numAtoms + 1; ++k) {
bondArray[j][k] > 1 && k != i && ++currentAtom.numNeighborPi;
}
}
}
}
}
h = 0;
charge = 0;
for (i = 1; i < numAtoms + 1; ++i) {
atom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
$getNumNeighborHs(atom);
h = h + atom.numNeighborHs;
charge = charge + atom.charge;
}
for (i = 1; i < numAtoms + 1; ++i) {
currentAtom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
for (j = 1; j < numAtoms + 1; ++j) {
if (bondArray[i][j] != 0) {
currentNeighbor = dynamicCast((checkIndex(j, atomList.size) , atomList.array[j]), Q$Atom);
$equals(currentAtom.element, 'N') && currentNeighbor.isACarbonyl && (currentAtom.amide = true);
}
}
}
illegalAtoms = new StringBuffer_0;
for (i = 1; i < numAtoms + 1; ++i) {
atom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
$equals(atom.element, 'C') && atom.charge != 0 && ($append(illegalAtoms.data, 'A Charged C atom.<br>') , illegalAtoms);
if ($equals(atom.element, 'N')) {
atom.charge > 1 && ($append(illegalAtoms.data, 'An N atom with too high + charge.<br>') , illegalAtoms);
atom.charge < 0 && ($append(illegalAtoms.data, 'An N atom with - charge.<br>') , illegalAtoms);
$getNumNeighborHs(atom) < 0 && !($equals(atom.doubleBondedNeighbor, 'O2') && $getNumNeighborHs(atom) == -2 && atom.numNeighborCs == 1 && atom.numNeighborXs == 2 && atom.charge == 0) && ($append(illegalAtoms.data, 'An N atom making too many bonds.<br>') , illegalAtoms);
}
if ($equals(atom.element, 'O')) {
atom.charge < -1 && ($append(illegalAtoms.data, 'An O atom with too high - charge.<br>') , illegalAtoms);
atom.charge > 0 && ($append(illegalAtoms.data, 'An O atom with + charge.<br>') , illegalAtoms);
}
if ($equals(atom.element, 'S')) {
atom.charge > 0 && ($append(illegalAtoms.data, 'An S atom with a + charge.<br>') , illegalAtoms);
$getNumNeighborHs(atom) < 0 && $getNumNeighborHs(atom) != -4 && $getNumNeighborHs(atom) != -2 && ($append(illegalAtoms.data, 'An S atom not making 2, 4, or 6 bonds.<br>') , illegalAtoms);
}
if ($equals(atom.element, 'P')) {
atom.charge != 0 && ($append(illegalAtoms.data, 'A Charged P atom.<br>') , illegalAtoms);
atom.numNeighborHs != -3 && ($append(illegalAtoms.data, 'A P atom not making 5 bonds.<br>') , illegalAtoms);
}
($equals(atom.element, 'F') || $equals(atom.element, 'Cl') || $equals(atom.element, 'Br') || $equals(atom.element, 'I')) && atom.charge != 0 && $append_0(illegalAtoms, 'A Charged ' + atom.element + ' atom.<br>');
$equals(atom.element, 'X') && ($append(illegalAtoms.data, 'An X atom.<br>') , illegalAtoms);
}
errorString = '';
$toString(illegalAtoms.data).length != 0 && (errorString = '<html><body>It is not possible to calculate logp<br>for your molecule because it contains:<br>' + $toString(illegalAtoms.data) + '<\/body><\/html>');
logp = 0;
canMakeHbonds = false;
canMakeIonicBonds = false;
if ($toString(illegalAtoms.data).length == 0) {
nf = ($clinit_NumberFormat() , new NumberFormat_1($getDefaultNative()));
for (i = 1; i < numAtoms + 1; ++i) {
atom = dynamicCast((checkIndex(i, atomList.size) , atomList.array[i]), Q$Atom);
currentAtomSpec = $getAtomSpec(atom);
logp = logp + currentAtomSpec.logp;
canMakeHbonds = canMakeHbonds || currentAtomSpec.canMakeHbonds;
canMakeIonicBonds = canMakeIonicBonds || currentAtomSpec.canMakeIonicBonds;
neighbors = new StringBuffer_0;
for (j = 1; j < numAtoms + 1; ++j) {
bondArray[i][j] != 0 && ($append(neighbors.data, j + ' ') , neighbors);
}
$append_0(atomDataLines, i + ' ' + currentAtomSpec.type + '; bonded to: ' + $toString(neighbors.data) + '; logp= ' + $format(nf, currentAtomSpec.logp) + '; H-bonds: ' + currentAtomSpec.canMakeHbonds + '; ionic bonds: ' + currentAtomSpec.canMakeIonicBonds + '\n');
}
}
numBonds = 0;
numAromaticAtoms = 0;
c = 0;
n = 0;
o = 0;
s = 0;
p_0 = 0;
cl = 0;
br = 0;
f = 0;
iodine = 0;
formula = new StringBuffer_0;
for (i = 0; i < smileString.length; ++i) {
switch (smileString.charCodeAt(i)) {
case 67:
++c;
break;
case 78:
++n;
break;
case 79:
++o;
break;
case 83:
++s;
break;
case 80:
++p_0;
break;
case 108:
--c;
++cl;
break;
case 66:
++br;
break;
case 70:
++f;
break;
case 73:
++iodine;
break;
case 99:
++c;
++numAromaticAtoms;
break;
case 110:
++n;
++numAromaticAtoms;
break;
case 115:
++s;
++numAromaticAtoms;
break;
case 111:
++o;
++numAromaticAtoms;
break;
case 35:
++numBonds;
case 61:
++numBonds;
}
}
prettyPrint('C', c, formula);
prettyPrint('H', h, formula);
prettyPrint('N', n, formula);
prettyPrint('O', o, formula);
prettyPrint('P', p_0, formula);
prettyPrint('S', s, formula);
prettyPrint('Cl', cl, formula);
prettyPrint('Br', br, formula);
prettyPrint('F', f, formula);
prettyPrint('I', iodine, formula);
if (charge != 0) {
$append(formula.data, '(');
charge == -1?($append(formula.data, '-') , formula):charge > 0 && ($append(formula.data, '+') , formula);
(charge < 0?-charge:charge) != 1 && ($append(formula.data, '' + charge) , formula);
$append(formula.data, ')');
}
'Formula: ' + $toString(formula.data);
$equals(errorString, '')?(info = new MoleculeInfo_0(canMakeHbonds, canMakeIonicBonds, logp, null)):(info = new MoleculeInfo_0(false, false, 0, errorString));
targets = initDim(_3Ledu_umb_bio_jsMolCalc_client_Target_2_classLit, makeCastMap([Q$Serializable]), Q$Target, 4, 0);
if ($equals(errorString, '')) {
canMakeHbonds?(targets[0] = new Target_1(1)):(targets[0] = new Target_1(2));
canMakeIonicBonds?(targets[1] = new Target_1(3)):(targets[1] = new Target_1(4));
targets[2] = new Target_0(logp - 1.5, logp - 0.5);
targets[3] = new Target_0(logp + 0.5, logp + 1.5);
}
return new InfoAndTargets_0(info, targets);
}
function prettyPrint(atomLabel, number, outString){
if (number == 0) {
return;
}
$append(outString.data, atomLabel);
if (number == 1) {
$append(outString.data, ' ');
return;
}
$append(outString.data, '<sub>' + number + '<\/sub> ');
}
function JsMolCalcAPI$API_0(){
}
function getTasks(mol, smile, jme){
var i, length_0, result, tasks;
result = computeAndDisplay(mol, smile, jme);
length_0 = result.targets.length;
tasks = initDim(_3Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Task_2_classLit, makeCastMap([Q$Serializable]), Q$JsMolCalcAPI$Task, length_0, 0);
for (i = 0; i < length_0; ++i) {
tasks[i] = new JsMolCalcAPI$Task_0(result.targets[i]);
}
return tasks;
}
defineSeed(46, 1, makeCastMap([Q$Exportable]), JsMolCalcAPI$API_0);
function JsMolCalcAPI$Info_0(info){
this._info = info;
}
defineSeed(47, 1, makeCastMap([Q$Exportable]), JsMolCalcAPI$Info_0);
_.toString_0 = function toString_0(){
return $toString_0(this._info);
}
;
_._info = null;
function JsMolCalcAPI$Task_0(target){
this._target = target;
}
defineSeed(48, 1, makeCastMap([Q$JsMolCalcAPI$Task, Q$Exportable]), JsMolCalcAPI$Task_0);
_.check_0 = function check(info){
return $isCorrect(this._target, info._info)?'correct':'incorrect';
}
;
_.toString_0 = function toString_1(){
return $toString_1(this._target);
}
;
_._target = null;
function $toString_0(this$static){
var b, nf;
nf = ($clinit_NumberFormat() , new NumberFormat_1($getDefaultNative()));
b = new StringBuffer_0;
if (this$static.errorString != null) {
$append_0(b, this$static.errorString);
}
else {
this$static.phobicity < 0?$append_0(b, '<font color=green>Hydrophobicity index = ' + $format(nf, this$static.phobicity) + '<\/font><br>'):$append_0(b, '<font color=red>Hydrophobicity index = ' + $format(nf, this$static.phobicity) + '<\/font><br>');
this$static.canMakeHBonds?($append(b.data, '<font color=green>Can Make Strong Hydrogen Bonds<\/font><br>') , b):($append(b.data, '<font color=red>Can not Make Strong Hydrogen Bonds<\/font><br>') , b);
this$static.canMakeIonicBonds?($append(b.data, '<font color=green>Can Make Ionic Bonds<\/font><br>') , b):($append(b.data, '<font color=red>Can not Make Ionic Bonds<\/font><br>') , b);
}
return $toString(b.data);
}
function MoleculeInfo_0(hBonds, iBonds, phobicity, errorString){
this.canMakeHBonds = hBonds;
this.canMakeIonicBonds = iBonds;
this.phobicity = phobicity;
this.errorString = errorString;
}
defineSeed(49, 1, {}, MoleculeInfo_0);
_.canMakeHBonds = false;
_.canMakeIonicBonds = false;
_.errorString = null;
_.phobicity = 0;
function $isCorrect(this$static, info){
switch (this$static.type) {
case 0:
return info.phobicity > this$static.loPhobicLimit && info.phobicity < this$static.hiPhobicLimit;
case 1:
return !info.canMakeHBonds;
case 2:
return info.canMakeHBonds;
case 3:
return !info.canMakeIonicBonds;
case 4:
return info.canMakeIonicBonds;
default:return false;
}
}
function $toString_1(this$static){
var nf;
switch (this$static.type) {
case 0:
nf = ($clinit_NumberFormat() , new NumberFormat_1($getDefaultNative()));
return 'Has a relative hydrophobicity betweeen ' + $format(nf, this$static.loPhobicLimit) + ' and ' + $format(nf, this$static.hiPhobicLimit);
case 1:
return 'Can not make strong Hydrogen Bonds';
case 2:
return 'Can make strong Hydrogen Bonds';
case 3:
return 'Can not make Ionic Bonds';
case 4:
return 'Can make Ionic Bonds';
default:return 'Error in setting target type';
}
}
function Target_0(loPhobicLimit, hiPhobicLimit){
this.type = 0;
this.loPhobicLimit = loPhobicLimit;
this.hiPhobicLimit = hiPhobicLimit;
}
function Target_1(type){
this.type = type;
}
defineSeed(50, 1, makeCastMap([Q$Target]), Target_0, Target_1);
_.hiPhobicLimit = 0;
_.loPhobicLimit = 0;
_.type = 0;
function $export_1(){
if (!exported_1) {
exported_1 = true;
new InfoExporterImpl_0;
$export0_1();
}
}
function $export0_1(){
var pkg = declarePackage('edu.umb.bio.jsMolCalc.JsMolCalcAPI.Task');
var __0;
$wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Task = $entry(function(){
var g, j = this;
isAssignableToInstance(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Task_2_classLit, arguments)?(g = arguments[0]):arguments.length == 1 && (g = ___create_0(gwtInstance(arguments[0])));
j.g = g;
setWrapper(g, j);
return j;
}
);
__0 = $wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Task.prototype = new Object;
__0.check = $entry(function(a0){
return this.g.check_0(a0.g);
}
);
__0.toString = $entry(function(){
return this.g.toString_0();
}
);
addTypeMap(Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Task_2_classLit, $wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Task);
if (pkg)
for (p in pkg)
$wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Task[p] === undefined && ($wnd.edu.umb.bio.jsMolCalc.JsMolCalcAPI.Task[p] = pkg[p]);
}
function TaskExporterImpl_0(){
$export_1();
}
function ___create_0(a0){
return new JsMolCalcAPI$Task_0(a0);
}
defineSeed(51, 1, {}, TaskExporterImpl_0);
var exported_1 = false;
function ArrayStoreException_0(){
$fillInStackTrace();
}
defineSeed(52, 6, makeCastMap([Q$Serializable, Q$Throwable]), ArrayStoreException_0);
function digit_0(c){ function digit_0(c){
if (c >= 48 && c < 58) { if (c >= 48 && c < 58) {
return c - 48; return c - 48;
...@@ -1944,7 +1778,6 @@ function createForArray(packageName, className, seedId){ ...@@ -1944,7 +1778,6 @@ function createForArray(packageName, className, seedId){
var clazz; var clazz;
clazz = new Class_0; clazz = new Class_0;
isInstantiable(seedId != 0?-seedId:0) && setClassLiteral(seedId != 0?-seedId:0, clazz); isInstantiable(seedId != 0?-seedId:0) && setClassLiteral(seedId != 0?-seedId:0, clazz);
clazz.modifiers = 4;
clazz.superclass = Ljava_lang_Object_2_classLit; clazz.superclass = Ljava_lang_Object_2_classLit;
return clazz; return clazz;
} }
...@@ -1961,7 +1794,6 @@ function createForInterface(packageName, className){ ...@@ -1961,7 +1794,6 @@ function createForInterface(packageName, className){
var clazz; var clazz;
clazz = new Class_0; clazz = new Class_0;
isInstantiable(0) && setClassLiteral(0, clazz); isInstantiable(0) && setClassLiteral(0, clazz);
clazz.modifiers = 2;
return clazz; return clazz;
} }
...@@ -2002,15 +1834,14 @@ function setClassLiteral(seedId, clazz){ ...@@ -2002,15 +1834,14 @@ function setClassLiteral(seedId, clazz){
proto.___clazz$ = clazz; proto.___clazz$ = clazz;
} }
defineSeed(54, 1, {}, Class_0); defineSeed(48, 1, {}, Class_0);
_.modifiers = 0;
_.seedId = 0; _.seedId = 0;
_.superclass = null; _.superclass = null;
function ClassCastException_0(){ function ClassCastException_0(){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(55, 6, makeCastMap([Q$Serializable, Q$Throwable]), ClassCastException_0); defineSeed(49, 6, makeCastMap([Q$Serializable, Q$Throwable]), ClassCastException_0);
function __parseAndValidateInt(s){ function __parseAndValidateInt(s){
var i, length_0, startIndex, toReturn; var i, length_0, startIndex, toReturn;
if (s == null) { if (s == null) {
...@@ -2037,26 +1868,26 @@ function IllegalArgumentException_0(message){ ...@@ -2037,26 +1868,26 @@ function IllegalArgumentException_0(message){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(58, 6, makeCastMap([Q$Serializable, Q$Throwable]), IllegalArgumentException_0); defineSeed(52, 6, makeCastMap([Q$Serializable, Q$Throwable]), IllegalArgumentException_0);
function IndexOutOfBoundsException_0(message){ function IndexOutOfBoundsException_0(message){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(59, 6, makeCastMap([Q$Serializable, Q$Throwable]), IndexOutOfBoundsException_0); defineSeed(53, 6, makeCastMap([Q$Serializable, Q$Throwable]), IndexOutOfBoundsException_0);
function NullPointerException_0(){ function NullPointerException_0(){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(60, 6, makeCastMap([Q$Serializable, Q$Throwable]), NullPointerException_0); defineSeed(54, 6, makeCastMap([Q$Serializable, Q$Throwable]), NullPointerException_0);
function NumberFormatException_0(message){ function NumberFormatException_0(message){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(61, 58, makeCastMap([Q$Serializable, Q$Throwable]), NumberFormatException_0); defineSeed(55, 52, makeCastMap([Q$Serializable, Q$Throwable]), NumberFormatException_0);
function StackTraceElement_0(methodName){ function StackTraceElement_0(methodName){
} }
defineSeed(62, 1, makeCastMap([Q$Serializable, Q$StackTraceElement]), StackTraceElement_0); defineSeed(56, 1, makeCastMap([Q$Serializable, Q$StackTraceElement]), StackTraceElement_0);
function $charAt(this$static, index){ function $charAt(this$static, index){
return this$static.charCodeAt(index); return this$static.charCodeAt(index);
} }
...@@ -2191,16 +2022,15 @@ function $append_0(this$static, x){ ...@@ -2191,16 +2022,15 @@ function $append_0(this$static, x){
return this$static; return this$static;
} }
function $replace_0(this$static, end){ function $delete(this$static, end){
$replace(this$static.data, 0, end, ''); return $replace(this$static.data, 0, end, '') , this$static;
return this$static;
} }
function StringBuffer_0(){ function StringBuffer_0(){
this.data = $createData(); this.data = $createData();
} }
defineSeed(64, 1, makeCastMap([Q$CharSequence]), StringBuffer_0); defineSeed(58, 1, makeCastMap([Q$CharSequence]), StringBuffer_0);
function $append_1(this$static, x){ function $append_1(this$static, x){
$append(this$static.data, x); $append(this$static.data, x);
return this$static; return this$static;
...@@ -2210,7 +2040,7 @@ function $charAt_0(this$static, index){ ...@@ -2210,7 +2040,7 @@ function $charAt_0(this$static, index){
return $charAt($toString(this$static.data), index); return $charAt($toString(this$static.data), index);
} }
function $delete(this$static, start, end){ function $delete_0(this$static, start, end){
return $replace(this$static.data, start, end, '') , this$static; return $replace(this$static.data, start, end, '') , this$static;
} }
...@@ -2218,25 +2048,25 @@ function $insert(this$static, index, x){ ...@@ -2218,25 +2048,25 @@ function $insert(this$static, index, x){
return $replace(this$static.data, index, index, x) , this$static; return $replace(this$static.data, index, index, x) , this$static;
} }
function $replace_1(this$static, start, end, toInsert){ function $replace_0(this$static, start, end, toInsert){
$replace(this$static.data, start, end, toInsert); $replace(this$static.data, start, end, toInsert);
return this$static; return this$static;
} }
function $setCharAt(this$static, index, x){ function $setCharAt(this$static, index, x){
$replace_1(this$static, index, index + 1, String.fromCharCode(x)); $replace_0(this$static, index, index + 1, String.fromCharCode(x));
} }
function StringBuilder_0(){ function StringBuilder_0(){
this.data = $createData(); this.data = $createData();
} }
defineSeed(65, 1, makeCastMap([Q$CharSequence]), StringBuilder_0); defineSeed(59, 1, makeCastMap([Q$CharSequence]), StringBuilder_0);
function UnsupportedOperationException_0(){ function UnsupportedOperationException_0(){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(66, 6, makeCastMap([Q$Serializable, Q$Throwable]), UnsupportedOperationException_0); defineSeed(60, 6, makeCastMap([Q$Serializable, Q$Throwable]), UnsupportedOperationException_0);
function $advanceToFind(iter, o){ function $advanceToFind(iter, o){
var t; var t;
while (iter.hasNext()) { while (iter.hasNext()) {
...@@ -2248,7 +2078,7 @@ function $advanceToFind(iter, o){ ...@@ -2248,7 +2078,7 @@ function $advanceToFind(iter, o){
return null; return null;
} }
defineSeed(67, 1, {}); defineSeed(61, 1, {});
_.add = function add(o){ _.add = function add(o){
throw new UnsupportedOperationException_0; throw new UnsupportedOperationException_0;
} }
...@@ -2259,7 +2089,9 @@ _.contains = function contains(o){ ...@@ -2259,7 +2089,9 @@ _.contains = function contains(o){
return !!iter; return !!iter;
} }
; ;
defineSeed(69, 1, makeCastMap([Q$Map])); defineSeed(63, 1, makeCastMap([Q$Map]));
--></script>
<script><!--
_.equals$ = function equals_1(obj){ _.equals$ = function equals_1(obj){
var entry, entry$iterator, otherKey, otherMap, otherValue; var entry, entry$iterator, otherKey, otherMap, otherValue;
if (obj === this) { if (obj === this) {
...@@ -2360,8 +2192,6 @@ function $hasHashValue(this$static, key, hashCode){ ...@@ -2360,8 +2192,6 @@ function $hasHashValue(this$static, key, hashCode){
return false; return false;
} }
--></script>
<script><!--
function $hasStringValue(this$static, key){ function $hasStringValue(this$static, key){
return ':' + key in this$static.stringMap; return ':' + key in this$static.stringMap;
} }
...@@ -2411,7 +2241,7 @@ function $putStringValue(this$static, key, value){ ...@@ -2411,7 +2241,7 @@ function $putStringValue(this$static, key, value){
return result; return result;
} }
defineSeed(68, 69, makeCastMap([Q$Map])); defineSeed(62, 63, makeCastMap([Q$Map]));
_.equalsBridge = function equalsBridge(value1, value2){ _.equalsBridge = function equalsBridge(value1, value2){
return maskUndefined(value1) === maskUndefined(value2) || value1 != null && equals__devirtual$(value1, value2); return maskUndefined(value1) === maskUndefined(value2) || value1 != null && equals__devirtual$(value1, value2);
} }
...@@ -2421,7 +2251,7 @@ _.nullSlot = null; ...@@ -2421,7 +2251,7 @@ _.nullSlot = null;
_.nullSlotLive = false; _.nullSlotLive = false;
_.size = 0; _.size = 0;
_.stringMap = null; _.stringMap = null;
defineSeed(71, 67, makeCastMap([Q$Set])); defineSeed(65, 61, makeCastMap([Q$Set]));
_.equals$ = function equals_2(o){ _.equals$ = function equals_2(o){
var iter, other, otherItem; var iter, other, otherItem;
if (o === this) { if (o === this) {
...@@ -2460,7 +2290,7 @@ function AbstractHashMap$EntrySet_0(this$0){ ...@@ -2460,7 +2290,7 @@ function AbstractHashMap$EntrySet_0(this$0){
this.this$0 = this$0; this.this$0 = this$0;
} }
defineSeed(70, 71, makeCastMap([Q$Set]), AbstractHashMap$EntrySet_0); defineSeed(64, 65, makeCastMap([Q$Set]), AbstractHashMap$EntrySet_0);
_.contains = function contains_0(o){ _.contains = function contains_0(o){
var entry, key, value; var entry, key, value;
if (instanceOf(o, Q$Map$Entry)) { if (instanceOf(o, Q$Map$Entry)) {
...@@ -2492,7 +2322,7 @@ function AbstractHashMap$EntrySetIterator_0(this$0){ ...@@ -2492,7 +2322,7 @@ function AbstractHashMap$EntrySetIterator_0(this$0){
this.iter = new AbstractList$IteratorImpl_0(list); this.iter = new AbstractList$IteratorImpl_0(list);
} }
defineSeed(72, 1, {}, AbstractHashMap$EntrySetIterator_0); defineSeed(66, 1, {}, AbstractHashMap$EntrySetIterator_0);
_.hasNext = function hasNext(){ _.hasNext = function hasNext(){
return $hasNext(this.iter); return $hasNext(this.iter);
} }
...@@ -2502,7 +2332,7 @@ _.next = function next_0(){ ...@@ -2502,7 +2332,7 @@ _.next = function next_0(){
} }
; ;
_.iter = null; _.iter = null;
defineSeed(74, 1, makeCastMap([Q$Map$Entry])); defineSeed(68, 1, makeCastMap([Q$Map$Entry]));
_.equals$ = function equals_3(other){ _.equals$ = function equals_3(other){
var entry; var entry;
if (instanceOf(other, Q$Map$Entry)) { if (instanceOf(other, Q$Map$Entry)) {
...@@ -2527,7 +2357,7 @@ function AbstractHashMap$MapEntryNull_0(this$0){ ...@@ -2527,7 +2357,7 @@ function AbstractHashMap$MapEntryNull_0(this$0){
this.this$0 = this$0; this.this$0 = this$0;
} }
defineSeed(73, 74, makeCastMap([Q$Map$Entry]), AbstractHashMap$MapEntryNull_0); defineSeed(67, 68, makeCastMap([Q$Map$Entry]), AbstractHashMap$MapEntryNull_0);
_.getKey = function getKey(){ _.getKey = function getKey(){
return null; return null;
} }
...@@ -2546,7 +2376,7 @@ function AbstractHashMap$MapEntryString_0(this$0, key){ ...@@ -2546,7 +2376,7 @@ function AbstractHashMap$MapEntryString_0(this$0, key){
this.key = key; this.key = key;
} }
defineSeed(75, 74, makeCastMap([Q$Map$Entry]), AbstractHashMap$MapEntryString_0); defineSeed(69, 68, makeCastMap([Q$Map$Entry]), AbstractHashMap$MapEntryString_0);
_.getKey = function getKey_0(){ _.getKey = function getKey_0(){
return this.key; return this.key;
} }
...@@ -2569,7 +2399,7 @@ function indexOutOfBounds(index, size){ ...@@ -2569,7 +2399,7 @@ function indexOutOfBounds(index, size){
throw new IndexOutOfBoundsException_0('Index: ' + index + ', Size: ' + size); throw new IndexOutOfBoundsException_0('Index: ' + index + ', Size: ' + size);
} }
defineSeed(76, 67, makeCastMap([Q$List])); defineSeed(70, 61, makeCastMap([Q$List]));
_.add = function add_0(obj){ _.add = function add_0(obj){
$add(this, this.size_0(), obj); $add(this, this.size_0(), obj);
return true; return true;
...@@ -2630,7 +2460,7 @@ function AbstractList$IteratorImpl_0(this$0){ ...@@ -2630,7 +2460,7 @@ function AbstractList$IteratorImpl_0(this$0){
this.this$0 = this$0; this.this$0 = this$0;
} }
defineSeed(77, 1, {}, AbstractList$IteratorImpl_0); defineSeed(71, 1, {}, AbstractList$IteratorImpl_0);
_.hasNext = function hasNext_0(){ _.hasNext = function hasNext_0(){
return $hasNext(this); return $hasNext(this);
} }
...@@ -2674,7 +2504,7 @@ function splice(array, index, deleteCount, value){ ...@@ -2674,7 +2504,7 @@ function splice(array, index, deleteCount, value){
array.splice(index, deleteCount, value); array.splice(index, deleteCount, value);
} }
defineSeed(78, 76, makeCastMap([Q$Serializable, Q$List]), ArrayList_0); defineSeed(72, 70, makeCastMap([Q$Serializable, Q$List]), ArrayList_0);
_.add = function add_1(o){ _.add = function add_1(o){
return $add_0(this, o); return $add_0(this, o);
} }
...@@ -2707,13 +2537,13 @@ function HashMap_0(){ ...@@ -2707,13 +2537,13 @@ function HashMap_0(){
this.size = 0; this.size = 0;
} }
defineSeed(80, 68, makeCastMap([Q$Serializable, Q$Map]), HashMap_0); defineSeed(74, 62, makeCastMap([Q$Serializable, Q$Map]), HashMap_0);
function MapEntryImpl_0(key, value){ function MapEntryImpl_0(key, value){
this.key = key; this.key = key;
this.value = value; this.value = value;
} }
defineSeed(81, 74, makeCastMap([Q$Map$Entry]), MapEntryImpl_0); defineSeed(75, 68, makeCastMap([Q$Map$Entry]), MapEntryImpl_0);
_.getKey = function getKey_1(){ _.getKey = function getKey_1(){
return this.key; return this.key;
} }
...@@ -2735,7 +2565,7 @@ function NoSuchElementException_0(){ ...@@ -2735,7 +2565,7 @@ function NoSuchElementException_0(){
$fillInStackTrace(); $fillInStackTrace();
} }
defineSeed(82, 6, makeCastMap([Q$Serializable, Q$Throwable]), NoSuchElementException_0); defineSeed(76, 6, makeCastMap([Q$Serializable, Q$Throwable]), NoSuchElementException_0);
function equalsWithNullCheck(a, b){ function equalsWithNullCheck(a, b){
return maskUndefined(a) === maskUndefined(b) || a != null && equals__devirtual$(a, b); return maskUndefined(a) === maskUndefined(b) || a != null && equals__devirtual$(a, b);
} }
...@@ -2744,8 +2574,8 @@ function ExportAllExporterImpl_0(){ ...@@ -2744,8 +2574,8 @@ function ExportAllExporterImpl_0(){
new APIExporterImpl_0; new APIExporterImpl_0;
} }
defineSeed(84, 1, {}, ExportAllExporterImpl_0); defineSeed(78, 1, {}, ExportAllExporterImpl_0);
defineSeed(86, 1, {}); defineSeed(80, 1, {});
function $addTypeMap(this$static, type, exportedConstructor){ function $addTypeMap(this$static, type, exportedConstructor){
$put(this$static.typeMap, type, exportedConstructor); $put(this$static.typeMap, type, exportedConstructor);
} }
...@@ -2765,59 +2595,14 @@ function $declarePackage(qualifiedExportName){ ...@@ -2765,59 +2595,14 @@ function $declarePackage(qualifiedExportName){
return o; return o;
} }
function $setWrapper(this$static, type){
var cons, wrapper;
if ((getClass__devirtual$(type).modifiers & 4) != 0) {
return [];
}
cons = $typeConstructor(this$static, getClass__devirtual$(type));
wrapper = cons && typeof cons == 'function'?new cons(type):type;
type['__gwtex_wrap'] = wrapper;
return wrapper;
}
function $typeConstructor(this$static, type){
var o, sup;
o = $get(this$static.typeMap, type);
sup = type.superclass;
if (o == null && !!sup && sup != Ljava_lang_Object_2_classLit) {
return $typeConstructor(this$static, sup);
}
return dynamicCastJso(o);
}
function $wrap(this$static, type){
var wrapper;
if (type == null) {
return null;
}
return wrapper = type['__gwtex_wrap'] , !wrapper && (wrapper = $setWrapper(this$static, type)) , wrapper;
}
function $wrap_0(this$static, type){
var i, wrapperArray;
if (type == null) {
return null;
}
wrapperArray = [];
for (i = 0; i < type.length; ++i) {
wrapperArray[i] = $wrap(this$static, type[i]);
}
return wrapperArray;
}
function ExporterBaseActual_0(){ function ExporterBaseActual_0(){
this.typeMap = new HashMap_0; this.typeMap = new HashMap_0;
new HashMap_0; new HashMap_0;
new HashMap_0; new HashMap_0;
} }
function getGwtInstance(o){
return o && o.g?o.g:null;
}
function isAssignableToClass(o, clazz){ function isAssignableToClass(o, clazz){
var sup; var sup, maybeJsoInvocation;
if (Ljava_lang_Object_2_classLit == clazz) { if (Ljava_lang_Object_2_classLit == clazz) {
return true; return true;
} }
...@@ -2825,7 +2610,7 @@ function isAssignableToClass(o, clazz){ ...@@ -2825,7 +2610,7 @@ function isAssignableToClass(o, clazz){
return true; return true;
} }
if (o != null) { if (o != null) {
for (sup = getClass__devirtual$(o); !!sup && sup != Ljava_lang_Object_2_classLit; sup = sup.superclass) { for (sup = (maybeJsoInvocation = o , isJavaObject(maybeJsoInvocation)?maybeJsoInvocation.___clazz$:Lcom_google_gwt_core_client_JavaScriptObject_2_classLit); !!sup && sup != Ljava_lang_Object_2_classLit; sup = sup.superclass) {
if (sup == clazz) { if (sup == clazz) {
return true; return true;
} }
...@@ -2834,7 +2619,7 @@ function isAssignableToClass(o, clazz){ ...@@ -2834,7 +2619,7 @@ function isAssignableToClass(o, clazz){
return false; return false;
} }
defineSeed(85, 86, {}, ExporterBaseActual_0); defineSeed(79, 80, {}, ExporterBaseActual_0);
function $clinit_ExporterUtil(){ function $clinit_ExporterUtil(){
$clinit_ExporterUtil = nullMethod; $clinit_ExporterUtil = nullMethod;
impl = new ExporterBaseActual_0; impl = new ExporterBaseActual_0;
...@@ -2845,38 +2630,12 @@ function addTypeMap(type, exportedConstructor){ ...@@ -2845,38 +2630,12 @@ function addTypeMap(type, exportedConstructor){
$addTypeMap(impl, type, exportedConstructor); $addTypeMap(impl, type, exportedConstructor);
} }
function declarePackage(qualifiedExportName){
$clinit_ExporterUtil();
return $declarePackage(qualifiedExportName);
}
function gwtInstance(o){
var g;
$clinit_ExporterUtil();
return o != null && instanceOfJso(o) && (g = getGwtInstance(dynamicCastJso(o))) != null?g:o;
}
function isAssignableToInstance(clazz, args){ function isAssignableToInstance(clazz, args){
var o; var o;
$clinit_ExporterUtil(); $clinit_ExporterUtil();
return o = args && args[0] && (typeof args[0] == 'object' || typeof args[0] == 'function')?args[0]:null , isAssignableToClass(o, clazz); return o = args && args[0] && (typeof args[0] == 'object' || typeof args[0] == 'function')?args[0]:null , isAssignableToClass(o, clazz);
} }
function setWrapper(instance, wrapper){
$clinit_ExporterUtil();
instance['__gwtex_wrap'] = wrapper;
}
function wrap(type){
$clinit_ExporterUtil();
return $wrap(impl, type);
}
function wrap_0(type){
$clinit_ExporterUtil();
return $wrap_0(impl, type);
}
var impl; var impl;
var $entry = entry_0; var $entry = entry_0;
function gwtOnLoad(errFn, modName, modBase, softPermutationId){ function gwtOnLoad(errFn, modName, modBase, softPermutationId){
...@@ -2894,7 +2653,7 @@ function gwtOnLoad(errFn, modName, modBase, softPermutationId){ ...@@ -2894,7 +2653,7 @@ function gwtOnLoad(errFn, modName, modBase, softPermutationId){
} }
} }
var Ljava_lang_Object_2_classLit = createForClass('java.lang.', 'Object', 1, null), Lcom_google_gwt_core_client_JavaScriptObject_2_classLit = createForClass('com.google.gwt.core.client.', 'JavaScriptObject$', 9, Ljava_lang_Object_2_classLit), _3I_classLit = createForArray('', '[I', 94), _3Ljava_lang_Object_2_classLit = createForArray('[Ljava.lang.', 'Object;', 92), Ljava_lang_Throwable_2_classLit = createForClass('java.lang.', 'Throwable', 8, Ljava_lang_Object_2_classLit), Ljava_lang_Exception_2_classLit = createForClass('java.lang.', 'Exception', 7, Ljava_lang_Throwable_2_classLit), Ljava_lang_RuntimeException_2_classLit = createForClass('java.lang.', 'RuntimeException', 6, Ljava_lang_Exception_2_classLit), Ljava_lang_StackTraceElement_2_classLit = createForClass('java.lang.', 'StackTraceElement', 62, Ljava_lang_Object_2_classLit), _3Ljava_lang_StackTraceElement_2_classLit = createForArray('[Ljava.lang.', 'StackTraceElement;', 95), Lcom_google_gwt_lang_SeedUtil_2_classLit = createForClass('com.google.gwt.lang.', 'SeedUtil', 34, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Info_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalcAPI$Info', 47, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Task_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalcAPI$Task', 48, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$API_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalcAPI$API', 46, Ljava_lang_Object_2_classLit), _3Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$Task_2_classLit = createForArray('[Ledu.umb.bio.jsMolCalc.client.', 'JsMolCalcAPI$Task;', 96), Ljava_lang_Class_2_classLit = createForClass('java.lang.', 'Class', 54, Ljava_lang_Object_2_classLit), Ljava_lang_String_2_classLit = createForClass('java.lang.', 'String', 2, Ljava_lang_Object_2_classLit), _3Ljava_lang_String_2_classLit = createForArray('[Ljava.lang.', 'String;', 93), Ljava_lang_ClassCastException_2_classLit = createForClass('java.lang.', 'ClassCastException', 55, Ljava_lang_RuntimeException_2_classLit), Ljava_lang_StringBuilder_2_classLit = createForClass('java.lang.', 'StringBuilder', 65, Ljava_lang_Object_2_classLit), Ljava_lang_ArrayStoreException_2_classLit = createForClass('java.lang.', 'ArrayStoreException', 52, Ljava_lang_RuntimeException_2_classLit), Lcom_google_gwt_core_client_JavaScriptException_2_classLit = createForClass('com.google.gwt.core.client.', 'JavaScriptException', 5, Ljava_lang_RuntimeException_2_classLit), Ledu_umb_bio_jsMolCalc_client_TaskExporterImpl_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'TaskExporterImpl', 51, Ljava_lang_Object_2_classLit), Lorg_timepedia_exporter_client_ExporterBaseImpl_2_classLit = createForClass('org.timepedia.exporter.client.', 'ExporterBaseImpl', 86, Ljava_lang_Object_2_classLit), Lorg_timepedia_exporter_client_ExporterBaseActual_2_classLit = createForClass('org.timepedia.exporter.client.', 'ExporterBaseActual', 85, Lorg_timepedia_exporter_client_ExporterBaseImpl_2_classLit), Lorg_timepedia_exporter_client_Exportable_2_classLit = createForInterface('org.timepedia.exporter.client.', 'Exportable'), Lorg_timepedia_exporter_client_ExportAllExporterImpl_2_classLit = createForClass('org.timepedia.exporter.client.', 'ExportAllExporterImpl', 84, Ljava_lang_Object_2_classLit), Lcom_google_gwt_core_client_impl_StackTraceCreator$Collector_2_classLit = createForClass('com.google.gwt.core.client.impl.', 'StackTraceCreator$Collector', 17, Ljava_lang_Object_2_classLit), Lcom_google_gwt_core_client_Scheduler_2_classLit = createForClass('com.google.gwt.core.client.', 'Scheduler', 12, Ljava_lang_Object_2_classLit), Lcom_google_gwt_core_client_impl_SchedulerImpl_2_classLit = createForClass('com.google.gwt.core.client.impl.', 'SchedulerImpl', 14, Lcom_google_gwt_core_client_Scheduler_2_classLit), Ledu_umb_bio_jsMolCalc_client_InfoExporterImpl_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'InfoExporterImpl', 44, Ljava_lang_Object_2_classLit), Ljava_util_AbstractMap_2_classLit = createForClass('java.util.', 'AbstractMap', 69, Ljava_lang_Object_2_classLit), Ljava_util_AbstractHashMap_2_classLit = createForClass('java.util.', 'AbstractHashMap', 68, Ljava_util_AbstractMap_2_classLit), Ljava_util_AbstractCollection_2_classLit = createForClass('java.util.', 'AbstractCollection', 67, Ljava_lang_Object_2_classLit), Ljava_util_AbstractSet_2_classLit = createForClass('java.util.', 'AbstractSet', 71, Ljava_util_AbstractCollection_2_classLit), Ljava_util_AbstractHashMap$EntrySet_2_classLit = createForClass('java.util.', 'AbstractHashMap$EntrySet', 70, Ljava_util_AbstractSet_2_classLit), Ljava_util_AbstractHashMap$EntrySetIterator_2_classLit = createForClass('java.util.', 'AbstractHashMap$EntrySetIterator', 72, Ljava_lang_Object_2_classLit), Ljava_util_AbstractMapEntry_2_classLit = createForClass('java.util.', 'AbstractMapEntry', 74, Ljava_lang_Object_2_classLit), Ljava_util_AbstractHashMap$MapEntryNull_2_classLit = createForClass('java.util.', 'AbstractHashMap$MapEntryNull', 73, Ljava_util_AbstractMapEntry_2_classLit), Ljava_util_AbstractHashMap$MapEntryString_2_classLit = createForClass('java.util.', 'AbstractHashMap$MapEntryString', 75, Ljava_util_AbstractMapEntry_2_classLit), Ljava_lang_NullPointerException_2_classLit = createForClass('java.lang.', 'NullPointerException', 60, Ljava_lang_RuntimeException_2_classLit), Ljava_lang_IllegalArgumentException_2_classLit = createForClass('java.lang.', 'IllegalArgumentException', 58, Ljava_lang_RuntimeException_2_classLit), Ledu_umb_bio_jsMolCalc_client_Target_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'Target', 50, Ljava_lang_Object_2_classLit), Ljava_util_HashMap_2_classLit = createForClass('java.util.', 'HashMap', 80, Ljava_util_AbstractHashMap_2_classLit), Ledu_umb_bio_jsMolCalc_client_APIExporterImpl_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'APIExporterImpl', 40, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_MoleculeInfo_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'MoleculeInfo', 49, Ljava_lang_Object_2_classLit), Lcom_google_gwt_i18n_client_NumberFormat_2_classLit = createForClass('com.google.gwt.i18n.client.', 'NumberFormat', 25, Ljava_lang_Object_2_classLit), Ljava_lang_StringBuffer_2_classLit = createForClass('java.lang.', 'StringBuffer', 64, Ljava_lang_Object_2_classLit), Lcom_google_gwt_i18n_client_LocaleInfo_2_classLit = createForClass('com.google.gwt.i18n.client.', 'LocaleInfo', 24, Ljava_lang_Object_2_classLit), Ljava_lang_UnsupportedOperationException_2_classLit = createForClass('java.lang.', 'UnsupportedOperationException', 66, Ljava_lang_RuntimeException_2_classLit), Ledu_umb_bio_jsMolCalc_client_InfoAndTargets_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'InfoAndTargets', 43, Ljava_lang_Object_2_classLit), _3_3I_classLit = createForArray('', '[[I', 97), _3Ledu_umb_bio_jsMolCalc_client_Target_2_classLit = createForArray('[Ledu.umb.bio.jsMolCalc.client.', 'Target;', 98), Ljava_lang_NumberFormatException_2_classLit = createForClass('java.lang.', 'NumberFormatException', 61, Ljava_lang_IllegalArgumentException_2_classLit), Ljava_util_MapEntryImpl_2_classLit = createForClass('java.util.', 'MapEntryImpl', 81, Ljava_util_AbstractMapEntry_2_classLit), Ljava_util_AbstractList_2_classLit = createForClass('java.util.', 'AbstractList', 76, Ljava_util_AbstractCollection_2_classLit), Ljava_util_ArrayList_2_classLit = createForClass('java.util.', 'ArrayList', 78, Ljava_util_AbstractList_2_classLit), Ljava_util_AbstractList$IteratorImpl_2_classLit = createForClass('java.util.', 'AbstractList$IteratorImpl', 77, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_Atom_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'Atom', 41, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_AtomSpec_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'AtomSpec', 42, Ljava_lang_Object_2_classLit), Lcom_google_gwt_i18n_client_constants_NumberConstantsImpl_1_2_classLit = createForClass('com.google.gwt.i18n.client.constants.', 'NumberConstantsImpl_', 26, Ljava_lang_Object_2_classLit), Ljava_lang_IndexOutOfBoundsException_2_classLit = createForClass('java.lang.', 'IndexOutOfBoundsException', 59, Ljava_lang_RuntimeException_2_classLit), Ljava_util_NoSuchElementException_2_classLit = createForClass('java.util.', 'NoSuchElementException', 82, Ljava_lang_RuntimeException_2_classLit); var Ljava_lang_Object_2_classLit = createForClass('java.lang.', 'Object', 1, null), Lcom_google_gwt_core_client_JavaScriptObject_2_classLit = createForClass('com.google.gwt.core.client.', 'JavaScriptObject$', 9, Ljava_lang_Object_2_classLit), _3I_classLit = createForArray('', '[I', 87), _3Ljava_lang_Object_2_classLit = createForArray('[Ljava.lang.', 'Object;', 85), Ljava_lang_Throwable_2_classLit = createForClass('java.lang.', 'Throwable', 8, Ljava_lang_Object_2_classLit), Ljava_lang_Exception_2_classLit = createForClass('java.lang.', 'Exception', 7, Ljava_lang_Throwable_2_classLit), Ljava_lang_RuntimeException_2_classLit = createForClass('java.lang.', 'RuntimeException', 6, Ljava_lang_Exception_2_classLit), Ljava_lang_StackTraceElement_2_classLit = createForClass('java.lang.', 'StackTraceElement', 56, Ljava_lang_Object_2_classLit), _3Ljava_lang_StackTraceElement_2_classLit = createForArray('[Ljava.lang.', 'StackTraceElement;', 88), Lcom_google_gwt_lang_SeedUtil_2_classLit = createForClass('com.google.gwt.lang.', 'SeedUtil', 34, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalcAPI$API_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalcAPI$API', 45, Ljava_lang_Object_2_classLit), Ljava_lang_Class_2_classLit = createForClass('java.lang.', 'Class', 48, Ljava_lang_Object_2_classLit), Ljava_lang_String_2_classLit = createForClass('java.lang.', 'String', 2, Ljava_lang_Object_2_classLit), _3Ljava_lang_String_2_classLit = createForArray('[Ljava.lang.', 'String;', 86), Ljava_lang_ClassCastException_2_classLit = createForClass('java.lang.', 'ClassCastException', 49, Ljava_lang_RuntimeException_2_classLit), Ljava_lang_StringBuilder_2_classLit = createForClass('java.lang.', 'StringBuilder', 59, Ljava_lang_Object_2_classLit), Ljava_lang_ArrayStoreException_2_classLit = createForClass('java.lang.', 'ArrayStoreException', 46, Ljava_lang_RuntimeException_2_classLit), Lcom_google_gwt_core_client_JavaScriptException_2_classLit = createForClass('com.google.gwt.core.client.', 'JavaScriptException', 5, Ljava_lang_RuntimeException_2_classLit), Lorg_timepedia_exporter_client_ExporterBaseImpl_2_classLit = createForClass('org.timepedia.exporter.client.', 'ExporterBaseImpl', 80, Ljava_lang_Object_2_classLit), Lorg_timepedia_exporter_client_ExporterBaseActual_2_classLit = createForClass('org.timepedia.exporter.client.', 'ExporterBaseActual', 79, Lorg_timepedia_exporter_client_ExporterBaseImpl_2_classLit), Lorg_timepedia_exporter_client_Exportable_2_classLit = createForInterface('org.timepedia.exporter.client.', 'Exportable'), Lorg_timepedia_exporter_client_ExportAllExporterImpl_2_classLit = createForClass('org.timepedia.exporter.client.', 'ExportAllExporterImpl', 78, Ljava_lang_Object_2_classLit), Lcom_google_gwt_core_client_impl_StackTraceCreator$Collector_2_classLit = createForClass('com.google.gwt.core.client.impl.', 'StackTraceCreator$Collector', 17, Ljava_lang_Object_2_classLit), Lcom_google_gwt_core_client_Scheduler_2_classLit = createForClass('com.google.gwt.core.client.', 'Scheduler', 12, Ljava_lang_Object_2_classLit), Lcom_google_gwt_core_client_impl_SchedulerImpl_2_classLit = createForClass('com.google.gwt.core.client.impl.', 'SchedulerImpl', 14, Lcom_google_gwt_core_client_Scheduler_2_classLit), Ljava_util_AbstractMap_2_classLit = createForClass('java.util.', 'AbstractMap', 63, Ljava_lang_Object_2_classLit), Ljava_util_AbstractHashMap_2_classLit = createForClass('java.util.', 'AbstractHashMap', 62, Ljava_util_AbstractMap_2_classLit), Ljava_util_AbstractCollection_2_classLit = createForClass('java.util.', 'AbstractCollection', 61, Ljava_lang_Object_2_classLit), Ljava_util_AbstractSet_2_classLit = createForClass('java.util.', 'AbstractSet', 65, Ljava_util_AbstractCollection_2_classLit), Ljava_util_AbstractHashMap$EntrySet_2_classLit = createForClass('java.util.', 'AbstractHashMap$EntrySet', 64, Ljava_util_AbstractSet_2_classLit), Ljava_util_AbstractHashMap$EntrySetIterator_2_classLit = createForClass('java.util.', 'AbstractHashMap$EntrySetIterator', 66, Ljava_lang_Object_2_classLit), Ljava_util_AbstractMapEntry_2_classLit = createForClass('java.util.', 'AbstractMapEntry', 68, Ljava_lang_Object_2_classLit), Ljava_util_AbstractHashMap$MapEntryNull_2_classLit = createForClass('java.util.', 'AbstractHashMap$MapEntryNull', 67, Ljava_util_AbstractMapEntry_2_classLit), Ljava_util_AbstractHashMap$MapEntryString_2_classLit = createForClass('java.util.', 'AbstractHashMap$MapEntryString', 69, Ljava_util_AbstractMapEntry_2_classLit), Ljava_lang_NullPointerException_2_classLit = createForClass('java.lang.', 'NullPointerException', 54, Ljava_lang_RuntimeException_2_classLit), Ljava_lang_IllegalArgumentException_2_classLit = createForClass('java.lang.', 'IllegalArgumentException', 52, Ljava_lang_RuntimeException_2_classLit), Ljava_util_HashMap_2_classLit = createForClass('java.util.', 'HashMap', 74, Ljava_util_AbstractHashMap_2_classLit), Ledu_umb_bio_jsMolCalc_client_APIExporterImpl_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'APIExporterImpl', 40, Ljava_lang_Object_2_classLit), Ljava_lang_StringBuffer_2_classLit = createForClass('java.lang.', 'StringBuffer', 58, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalc_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalc', 41, Ljava_lang_Object_2_classLit), _3_3I_classLit = createForArray('', '[[I', 89), Ledu_umb_bio_jsMolCalc_client_JsMolCalc$Atom_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalc$Atom', 42, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalc$AtomSpec_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalc$AtomSpec', 43, Ljava_lang_Object_2_classLit), Ledu_umb_bio_jsMolCalc_client_JsMolCalc$InfoAndTargets_2_classLit = createForClass('edu.umb.bio.jsMolCalc.client.', 'JsMolCalc$InfoAndTargets', 44, Ljava_lang_Object_2_classLit), Ljava_util_AbstractList_2_classLit = createForClass('java.util.', 'AbstractList', 70, Ljava_util_AbstractCollection_2_classLit), Ljava_util_ArrayList_2_classLit = createForClass('java.util.', 'ArrayList', 72, Ljava_util_AbstractList_2_classLit), Ljava_util_AbstractList$IteratorImpl_2_classLit = createForClass('java.util.', 'AbstractList$IteratorImpl', 71, Ljava_lang_Object_2_classLit), Ljava_lang_UnsupportedOperationException_2_classLit = createForClass('java.lang.', 'UnsupportedOperationException', 60, Ljava_lang_RuntimeException_2_classLit), Lcom_google_gwt_i18n_client_NumberFormat_2_classLit = createForClass('com.google.gwt.i18n.client.', 'NumberFormat', 25, Ljava_lang_Object_2_classLit), Ljava_lang_NumberFormatException_2_classLit = createForClass('java.lang.', 'NumberFormatException', 55, Ljava_lang_IllegalArgumentException_2_classLit), Lcom_google_gwt_i18n_client_LocaleInfo_2_classLit = createForClass('com.google.gwt.i18n.client.', 'LocaleInfo', 24, Ljava_lang_Object_2_classLit), Ljava_util_MapEntryImpl_2_classLit = createForClass('java.util.', 'MapEntryImpl', 75, Ljava_util_AbstractMapEntry_2_classLit), Ljava_lang_IndexOutOfBoundsException_2_classLit = createForClass('java.lang.', 'IndexOutOfBoundsException', 53, Ljava_lang_RuntimeException_2_classLit), Ljava_util_NoSuchElementException_2_classLit = createForClass('java.util.', 'NoSuchElementException', 76, Ljava_lang_RuntimeException_2_classLit), Lcom_google_gwt_i18n_client_constants_NumberConstantsImpl_1_2_classLit = createForClass('com.google.gwt.i18n.client.constants.', 'NumberConstantsImpl_', 26, Ljava_lang_Object_2_classLit);
$stats && $stats({moduleName:'jsmolcalc',sessionId:$sessionId,subSystem:'startup',evtGroup:'moduleStartup',millis:(new Date()).getTime(),type:'moduleEvalEnd'}); $stats && $stats({moduleName:'jsmolcalc',sessionId:$sessionId,subSystem:'startup',evtGroup:'moduleStartup',millis:(new Date()).getTime(),type:'moduleEvalEnd'});
if ($wnd.jsmolcalc) $wnd.jsmolcalc.onScriptLoad(); if ($wnd.jsmolcalc) $wnd.jsmolcalc.onScriptLoad();
--></script></body></html> --></script></body></html>
...@@ -299,12 +299,12 @@ function jsmolcalc(){ ...@@ -299,12 +299,12 @@ function jsmolcalc(){
$stats && $stats({moduleName:'jsmolcalc', sessionId:$sessionId_0, subSystem:'startup', evtGroup:'bootstrap', millis:(new Date).getTime(), type:'selectingPermutation'}); $stats && $stats({moduleName:'jsmolcalc', sessionId:$sessionId_0, subSystem:'startup', evtGroup:'bootstrap', millis:(new Date).getTime(), type:'selectingPermutation'});
if (!isHostedMode()) { if (!isHostedMode()) {
try { try {
unflattenKeylistIntoAnswers(['ie8'], '2264BD6A2D261E441E8A63207DEF3E41'); unflattenKeylistIntoAnswers(['ie6'], '2F6BC62FA9B71FB5EB318145F5D37E84');
unflattenKeylistIntoAnswers(['opera'], '280D82581672593B003FDD949FD05A1A'); unflattenKeylistIntoAnswers(['ie8'], '468C0B0171166372F064D287492CBD1E');
unflattenKeylistIntoAnswers(['gecko1_8'], '62AEDCE3B4B02EAB0CE4B5E294387270'); unflattenKeylistIntoAnswers(['gecko1_8'], 'C43483CC355E7BFB7BE2F45092922897');
unflattenKeylistIntoAnswers(['ie6'], '787A0D27E3B86B1358ECC872176CB896'); unflattenKeylistIntoAnswers(['safari'], 'E38BF09B489084CBFD0BF2CB8A77BFAC');
unflattenKeylistIntoAnswers(['ie9'], 'C6CC2FE28A276F9AD839FEB4866C99F7'); unflattenKeylistIntoAnswers(['opera'], 'E8EDF03FE9C26D69E2C7DB17E15CF0ED');
unflattenKeylistIntoAnswers(['safari'], 'FE94467421A960F46BE7208756BA8AB4'); unflattenKeylistIntoAnswers(['ie9'], 'F8283183F9546F019176F75A8E25B0F0');
strongName = answers[computePropValue('user.agent')]; strongName = answers[computePropValue('user.agent')];
var idx = strongName.indexOf(':'); var idx = strongName.indexOf(':');
if (idx != -1) { if (idx != -1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment