icn3d 3.39.0 → 3.39.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/icn3d.js +26 -8
- package/icn3d.min.js +3 -3
- package/icn3d.module.js +26 -8
- package/package.json +1 -1
package/icn3d.js
CHANGED
|
@@ -52051,7 +52051,10 @@ class ViewInterPairs {
|
|
|
52051
52051
|
cntHbond += result.cnt;
|
|
52052
52052
|
svgHtmlNode += result.svgHtmlNode;
|
|
52053
52053
|
svgHtmlLine += result.svgHtmlLine;
|
|
52054
|
-
if(result.cnt > 0) residname2List += residname2 + ":hbond_" + result.cnt + " ";
|
|
52054
|
+
// if(result.cnt > 0) residname2List += residname2 + ":hbond_" + result.cnt + " ";
|
|
52055
|
+
// add hydrogen bond between main or side chains. result.mainside has value such as main,side,side,side
|
|
52056
|
+
// for two hydrogens between main and side, and side and side chains
|
|
52057
|
+
if(result.cnt > 0) residname2List += residname2 + ":hbond_" + result.cnt + ":type_" + result.mainside + " ";
|
|
52055
52058
|
|
|
52056
52059
|
labels2dist = ic.resids2inter[resids]['ionic'];
|
|
52057
52060
|
result = this.getInteractionPairDetails(labels2dist, type, 'ionic', index2xy, xlen, ylen, xcenter, ycenter);
|
|
@@ -52059,7 +52062,7 @@ class ViewInterPairs {
|
|
|
52059
52062
|
cntIonic += result.cnt;
|
|
52060
52063
|
svgHtmlNode += result.svgHtmlNode;
|
|
52061
52064
|
svgHtmlLine += result.svgHtmlLine;
|
|
52062
|
-
if(result.cnt > 0) residname2List += residname2 + ":ionic_" + result.cnt + " ";
|
|
52065
|
+
if(result.cnt > 0) residname2List += residname2 + ":ionic_" + result.cnt + ":type_" + result.mainside + " ";
|
|
52063
52066
|
|
|
52064
52067
|
labels2dist = ic.resids2inter[resids]['halogen'];
|
|
52065
52068
|
result = this.getInteractionPairDetails(labels2dist, type, 'halogen', index2xy, xlen, ylen, xcenter, ycenter);
|
|
@@ -52067,7 +52070,7 @@ class ViewInterPairs {
|
|
|
52067
52070
|
cntHalegen += result.cnt;
|
|
52068
52071
|
svgHtmlNode += result.svgHtmlNode;
|
|
52069
52072
|
svgHtmlLine += result.svgHtmlLine;
|
|
52070
|
-
if(result.cnt > 0) residname2List += residname2 + ":halogen_" + result.cnt + " ";
|
|
52073
|
+
if(result.cnt > 0) residname2List += residname2 + ":halogen_" + result.cnt + ":type_" + result.mainside + " ";
|
|
52071
52074
|
|
|
52072
52075
|
labels2dist = ic.resids2inter[resids]['pi-cation'];
|
|
52073
52076
|
result = this.getInteractionPairDetails(labels2dist, type, 'pi-cation', index2xy, xlen, ylen, xcenter, ycenter);
|
|
@@ -52075,7 +52078,7 @@ class ViewInterPairs {
|
|
|
52075
52078
|
cntPication += result.cnt;
|
|
52076
52079
|
svgHtmlNode += result.svgHtmlNode;
|
|
52077
52080
|
svgHtmlLine += result.svgHtmlLine;
|
|
52078
|
-
if(result.cnt > 0) residname2List += residname2 + ":pi-cation_" + result.cnt + " ";
|
|
52081
|
+
if(result.cnt > 0) residname2List += residname2 + ":pi-cation_" + result.cnt + ":type_" + result.mainside + " ";
|
|
52079
52082
|
|
|
52080
52083
|
labels2dist = ic.resids2inter[resids]['pi-stacking'];
|
|
52081
52084
|
result = this.getInteractionPairDetails(labels2dist, type, 'pi-stacking', index2xy, xlen, ylen, xcenter, ycenter);
|
|
@@ -52083,7 +52086,7 @@ class ViewInterPairs {
|
|
|
52083
52086
|
cntPistacking += result.cnt;
|
|
52084
52087
|
svgHtmlNode += result.svgHtmlNode;
|
|
52085
52088
|
svgHtmlLine += result.svgHtmlLine;
|
|
52086
|
-
if(result.cnt > 0) residname2List += residname2 + ":pi-stacking_" + result.cnt + " ";
|
|
52089
|
+
if(result.cnt > 0) residname2List += residname2 + ":pi-stacking_" + result.cnt + ":type_" + result.mainside + " ";
|
|
52087
52090
|
|
|
52088
52091
|
// put contact as the last one since contact will use the same node as other interactions in ligand-protein interactoin
|
|
52089
52092
|
labels2dist = ic.resids2inter[resids]['contact'];
|
|
@@ -52137,7 +52140,7 @@ class ViewInterPairs {
|
|
|
52137
52140
|
return tmpText;
|
|
52138
52141
|
}
|
|
52139
52142
|
getInteractionPairDetails(labels2dist, type, interactionType, index2xy, xlen, ylen, xcenter, ycenter) { let ic = this.icn3d; ic.icn3dui;
|
|
52140
|
-
let svgHtmlNode = '', svgHtmlLine = '', tmpText = '', cnt = 0;
|
|
52143
|
+
let svgHtmlNode = '', svgHtmlLine = '', tmpText = '', cnt = 0, mainside= '';
|
|
52141
52144
|
let colorText1 = ' <span style="background-color:#';
|
|
52142
52145
|
let colorText2 = '"> </span>';
|
|
52143
52146
|
if(labels2dist !== undefined) {
|
|
@@ -52154,6 +52157,12 @@ class ViewInterPairs {
|
|
|
52154
52157
|
let resid1 = resid1Ori.substr(0, pos1);
|
|
52155
52158
|
let resid2 = resid2Ori.substr(0, pos2);
|
|
52156
52159
|
|
|
52160
|
+
let atomName1 = resid1.substr(resid1.indexOf('@') + 1);
|
|
52161
|
+
resid2.substr(resid2.indexOf('@') + 1);
|
|
52162
|
+
let atomType1 = (atomName1 === "N" || atomName1 === "C" || atomName1 === "O" || atomName1 === "CA") ? 'main' : 'side';
|
|
52163
|
+
if(mainside) mainside += ';';
|
|
52164
|
+
mainside += atomType1 + ',' + atomType1;
|
|
52165
|
+
|
|
52157
52166
|
let resid1Real = ic.getGraphCls.convertLabel2Resid(resid1);
|
|
52158
52167
|
let atom1 = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid1Real]);
|
|
52159
52168
|
let color1 = (atom1.color) ? atom1.color.getHexString() : '';
|
|
@@ -52175,7 +52184,7 @@ class ViewInterPairs {
|
|
|
52175
52184
|
}
|
|
52176
52185
|
}
|
|
52177
52186
|
}
|
|
52178
|
-
return {html: tmpText, cnt: cnt, svgHtmlNode: svgHtmlNode, svgHtmlLine: svgHtmlLine}
|
|
52187
|
+
return {html: tmpText, cnt: cnt, svgHtmlNode: svgHtmlNode, svgHtmlLine: svgHtmlLine, mainside: mainside}
|
|
52179
52188
|
}
|
|
52180
52189
|
|
|
52181
52190
|
getContactPairDetails(labels2dist, type, interactionType, index2xy, xlen, ylen, xcenter, ycenter) { let ic = this.icn3d; ic.icn3dui;
|
|
@@ -63581,6 +63590,9 @@ class LoadPDB {
|
|
|
63581
63590
|
|
|
63582
63591
|
///id = line.substr(62, 4).trim();
|
|
63583
63592
|
id = line.substr(62).trim();
|
|
63593
|
+
// remove "_" in the id
|
|
63594
|
+
id = id.replace(/_/g, '-');
|
|
63595
|
+
|
|
63584
63596
|
oriId = id;
|
|
63585
63597
|
|
|
63586
63598
|
if(id == '') {
|
|
@@ -64491,6 +64503,8 @@ class LoadCIF {
|
|
|
64491
64503
|
|
|
64492
64504
|
if(block.getCategory("_entry")) {
|
|
64493
64505
|
id = block.getCategory("_entry").getColumn("id").getString(0);
|
|
64506
|
+
// remove "_" in the id
|
|
64507
|
+
id = id.replace(/_/g, '-');
|
|
64494
64508
|
|
|
64495
64509
|
if(id == '') {
|
|
64496
64510
|
if(bAppend) {
|
|
@@ -72213,7 +72227,6 @@ class Dssp {
|
|
|
72213
72227
|
if(ssHash !== undefined && JSON.stringify(ssHash).indexOf('Oops there was a problem') === -1) {
|
|
72214
72228
|
for(let chainNum in ic.chainsSeq) {
|
|
72215
72229
|
let pos = chainNum.indexOf('_');
|
|
72216
|
-
|
|
72217
72230
|
// one structure at a time
|
|
72218
72231
|
if(chainNum.substr(0, pos) != struArray[index]) continue;
|
|
72219
72232
|
|
|
@@ -79425,6 +79438,11 @@ class SaveFile {
|
|
|
79425
79438
|
|
|
79426
79439
|
$("#" + ic.pre + "title").html("PubChem CID <a id='" + ic.pre + "titlelink' href='" + url + "' style='color:" + titlelinkColor + "' target='_blank'>" + ic.inputid.toUpperCase() + "</a>: " + title);
|
|
79427
79440
|
}
|
|
79441
|
+
else if(me.cfg.smiles !== undefined) {
|
|
79442
|
+
let text = decodeURIComponent(me.cfg.smiles);
|
|
79443
|
+
if(text.length > 60) text = text.substr(0, 60) + "...";
|
|
79444
|
+
$("#" + ic.pre + "title").html("SMILES: " + text);
|
|
79445
|
+
}
|
|
79428
79446
|
else if(me.cfg.align !== undefined) {
|
|
79429
79447
|
title = 'VAST+ alignment of ' + Object.keys(ic.structures);
|
|
79430
79448
|
|