icn3d 3.23.4 → 3.23.6
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 +300 -50
- package/icn3d.min.js +4 -2
- package/icn3d.module.js +300 -50
- package/package.json +1 -1
package/icn3d.js
CHANGED
|
@@ -7039,6 +7039,18 @@ class ClickMenu {
|
|
|
7039
7039
|
thisClass.setLogCmd('color confidence', true);
|
|
7040
7040
|
});
|
|
7041
7041
|
|
|
7042
|
+
me.myEventCls.onIds("#" + me.pre + "mn4_clrIgstrand", "click", function(e) { let ic = me.icn3d; //e.preventDefault();
|
|
7043
|
+
//ic.legendClick = 6;
|
|
7044
|
+
ic.setOptionCls.setOption('color', 'ig strand');
|
|
7045
|
+
thisClass.setLogCmd('color ig strand', true);
|
|
7046
|
+
});
|
|
7047
|
+
|
|
7048
|
+
me.myEventCls.onIds("#" + me.pre + "mn4_clrIgproto", "click", function(e) { let ic = me.icn3d; //e.preventDefault();
|
|
7049
|
+
//ic.legendClick = 6;
|
|
7050
|
+
ic.setOptionCls.setOption('color', 'ig protodomain');
|
|
7051
|
+
thisClass.setLogCmd('color ig protodomain', true);
|
|
7052
|
+
});
|
|
7053
|
+
|
|
7042
7054
|
|
|
7043
7055
|
me.myEventCls.onIds("#" + me.pre + "mn4_clrArea", "click", function(e) { me.icn3d; //e.preventDefault();
|
|
7044
7056
|
me.htmlCls.dialogCls.openDlg('dl_colorbyarea', "Color based on residue's solvent accessibility");
|
|
@@ -9354,6 +9366,10 @@ class SetMenu {
|
|
|
9354
9366
|
//if(!me.cfg.mmtfid && !me.cfg.pdbid && !me.cfg.opmid && !me.cfg.mmdbid && !me.cfg.gi && !me.cfg.uniprotid && !me.cfg.blast_rep_id && !me.cfg.cid && !me.cfg.mmcifid && !me.cfg.align && !me.cfg.chainalign) {
|
|
9355
9367
|
html += this.getRadio('mn4_clr', 'mn4_clrConfidence', 'AlphaFold<br><span style="padding-left:1.5em;">Confidence</span>', undefined, 1, 1);
|
|
9356
9368
|
//}
|
|
9369
|
+
|
|
9370
|
+
//!!!
|
|
9371
|
+
//html += this.getRadio('mn4_clr', 'mn4_clrIgstrand', 'Ig Strand', undefined, undefined, 2);
|
|
9372
|
+
//html += this.getRadio('mn4_clr', 'mn4_clrIgproto', 'Ig Protodomain', undefined, undefined, 2);
|
|
9357
9373
|
}
|
|
9358
9374
|
else {
|
|
9359
9375
|
//if(!me.cfg.hidelicense) html += this.getRadio('mn4_clr', 'mn1_delphi2', 'DelPhi<br><span style="padding-left:1.5em;">Potential ' + me.htmlCls.licenseStr + '</span>');
|
|
@@ -9572,6 +9588,7 @@ class SetMenu {
|
|
|
9572
9588
|
html += this.getMenuText('mn6_igrefwrap', 'Ref. Number', undefined, undefined, 1);
|
|
9573
9589
|
|
|
9574
9590
|
html += "<ul>";
|
|
9591
|
+
//!!!
|
|
9575
9592
|
/*
|
|
9576
9593
|
html += this.getLink('mn6_igrefYes', 'Show Ig Ref. Number', undefined, 2);
|
|
9577
9594
|
html += this.getLink('mn6_igrefNo', 'Hide Ig Ref. Number', undefined, 2);
|
|
@@ -10677,7 +10694,7 @@ class SetDialog {
|
|
|
10677
10694
|
html += me.htmlCls.divStr + "dl_mmdbafid' class='" + dialogClass + "' style='max-width:600px'>";
|
|
10678
10695
|
html += "List of PDB, MMDB, or AlphaFold UniProt structures: " + me.htmlCls.inputTextStr + "id='" + me.pre + "mmdbafid' placeholder='e.g., 1HHO,4N7N,P69905,P01942' size=30> <br><br>";
|
|
10679
10696
|
html += "<div style='display:inline-block; width:20px'></div>" + me.htmlCls.buttonStr + "reload_mmdbaf' style='width:150px'>Load Biological Unit</button>" + me.htmlCls.buttonStr + "reload_mmdbaf_asym' style='margin-left:30px; width:250px'>Load Asymmetric Unit (All Chains)</button>" + "<br/><br/>";
|
|
10680
|
-
html += "<div style='display:inline-block; width:20px'>or</div>" + me.htmlCls.buttonStr + "reload_mmdbaf_append' style='width:150px'>Append Biological Unit</button>" + me.htmlCls.buttonStr + "reload_mmdbaf_asym_append' style='margin-left:30px; width:250px'>Append Asymmetric
|
|
10697
|
+
html += "<div style='display:inline-block; width:20px'>or</div>" + me.htmlCls.buttonStr + "reload_mmdbaf_append' style='width:150px'>Append Biological Unit</button>" + me.htmlCls.buttonStr + "reload_mmdbaf_asym_append' style='margin-left:30px; width:250px'>Append Asymmetric Unit (All Chains)</button>" + "<br/><br/>";
|
|
10681
10698
|
|
|
10682
10699
|
html += '<b>Note</b>: The "<b>biological unit</b>" is the <b>biochemically active form of a biomolecule</b>, <div style="width:20px; margin:6px 0 0 20px; display:inline-block;"><span id="'
|
|
10683
10700
|
+ me.pre + 'asu_bu2_expand" class="ui-icon ui-icon-plus icn3d-expand icn3d-link" style="width:15px;" title="Expand"></span><span id="'
|
|
@@ -11811,9 +11828,16 @@ class Events {
|
|
|
11811
11828
|
else {
|
|
11812
11829
|
ic.loadCmd = 'load mmdbaf0 ' + me.cfg.mmdbafid;
|
|
11813
11830
|
}
|
|
11814
|
-
me.htmlCls.clickMenuCls.setLogCmd(ic.loadCmd, true);
|
|
11831
|
+
me.htmlCls.clickMenuCls.setLogCmd(ic.loadCmd, true);
|
|
11832
|
+
|
|
11833
|
+
let bStructures = (ic.structures && Object.keys(ic.structures).length > 0) ? true : false;
|
|
11815
11834
|
|
|
11816
11835
|
await ic.chainalignParserCls.downloadMmdbAf(me.cfg.mmdbafid);
|
|
11836
|
+
|
|
11837
|
+
if(bStructures) {
|
|
11838
|
+
if(ic.bSetChainsAdvancedMenu) ic.definedSetsCls.showSets();
|
|
11839
|
+
if(ic.bAnnoShown) await ic.showAnnoCls.showAnnotations();
|
|
11840
|
+
}
|
|
11817
11841
|
}
|
|
11818
11842
|
}
|
|
11819
11843
|
}
|
|
@@ -31837,6 +31861,8 @@ class Alternate {
|
|
|
31837
31861
|
|
|
31838
31862
|
ic.dAtoms = {};
|
|
31839
31863
|
|
|
31864
|
+
let bMutation = moleculeArray.length == 2 && moleculeArray[1].replace(moleculeArray[0], '') == '2';
|
|
31865
|
+
|
|
31840
31866
|
for(let i = 0, il = moleculeArray.length; i < il; ++i) {
|
|
31841
31867
|
let structure = moleculeArray[i];
|
|
31842
31868
|
//if(i > ic.ALTERNATE_STRUCTURE || (ic.ALTERNATE_STRUCTURE === il - 1 && i === 0) ) {
|
|
@@ -31869,7 +31895,17 @@ class Alternate {
|
|
|
31869
31895
|
|
|
31870
31896
|
if(ic.ALTERNATE_STRUCTURE < 0) ic.ALTERNATE_STRUCTURE += il;
|
|
31871
31897
|
|
|
31872
|
-
|
|
31898
|
+
let label = '';
|
|
31899
|
+
if(bMutation) {
|
|
31900
|
+
if(i == 0) {
|
|
31901
|
+
label = "Wild Type ";
|
|
31902
|
+
}
|
|
31903
|
+
else if(i == 1) {
|
|
31904
|
+
label = "Mutant ";
|
|
31905
|
+
}
|
|
31906
|
+
}
|
|
31907
|
+
|
|
31908
|
+
$("#" + ic.pre + "title").html(label + structure);
|
|
31873
31909
|
|
|
31874
31910
|
break;
|
|
31875
31911
|
}
|
|
@@ -34366,6 +34402,64 @@ class SetColor {
|
|
|
34366
34402
|
|
|
34367
34403
|
break;
|
|
34368
34404
|
|
|
34405
|
+
case 'ig strand':
|
|
34406
|
+
if(ic.bShowRefnum) {
|
|
34407
|
+
for(let resid in ic.resid2refnum) {
|
|
34408
|
+
let refnumLabel = ic.resid2refnum[resid];
|
|
34409
|
+
let color;
|
|
34410
|
+
if(!refnumLabel) {
|
|
34411
|
+
color = me.parasCls.thr(me.htmlCls.GREYB);
|
|
34412
|
+
}
|
|
34413
|
+
else {
|
|
34414
|
+
let refnumStr = refnumLabel.replace(/'/g, '').replace(/\*/g, '').replace(/\^/g, '').substr(1); // C', C''
|
|
34415
|
+
let currStrand = refnumLabel.replace(new RegExp(refnumStr,'g'), '');
|
|
34416
|
+
color = ic.showSeqCls.getRefnumColor(currStrand);
|
|
34417
|
+
|
|
34418
|
+
if(ic.residIgLoop.hasOwnProperty(resid)) {
|
|
34419
|
+
color = me.parasCls.thr(me.htmlCls.GREYB);
|
|
34420
|
+
}
|
|
34421
|
+
}
|
|
34422
|
+
|
|
34423
|
+
for (let i in ic.residues[resid]) {
|
|
34424
|
+
let atom = ic.atoms[i];
|
|
34425
|
+
atom.color = me.parasCls.thr(color);
|
|
34426
|
+
|
|
34427
|
+
ic.atomPrevColors[i] = atom.color;
|
|
34428
|
+
}
|
|
34429
|
+
}
|
|
34430
|
+
}
|
|
34431
|
+
|
|
34432
|
+
break;
|
|
34433
|
+
|
|
34434
|
+
case 'ig protodomain':
|
|
34435
|
+
if(ic.bShowRefnum) {
|
|
34436
|
+
for(let resid in ic.resid2refnum) {
|
|
34437
|
+
let refnumLabel = ic.resid2refnum[resid];
|
|
34438
|
+
let color;
|
|
34439
|
+
if(!refnumLabel) {
|
|
34440
|
+
color = me.parasCls.thr(me.htmlCls.GREYB);
|
|
34441
|
+
}
|
|
34442
|
+
else {
|
|
34443
|
+
let refnumStr = refnumLabel.replace(/'/g, '').replace(/\*/g, '').replace(/\^/g, '').substr(1); // C', C''
|
|
34444
|
+
let currStrand = refnumLabel.replace(new RegExp(refnumStr,'g'), '');
|
|
34445
|
+
color = ic.showSeqCls.getProtodomainColor(currStrand);
|
|
34446
|
+
|
|
34447
|
+
if(ic.residIgLoop.hasOwnProperty(resid)) {
|
|
34448
|
+
color = me.parasCls.thr(me.htmlCls.GREYB);
|
|
34449
|
+
}
|
|
34450
|
+
}
|
|
34451
|
+
|
|
34452
|
+
for (let i in ic.residues[resid]) {
|
|
34453
|
+
let atom = ic.atoms[i];
|
|
34454
|
+
atom.color = me.parasCls.thr(color);
|
|
34455
|
+
|
|
34456
|
+
ic.atomPrevColors[i] = atom.color;
|
|
34457
|
+
}
|
|
34458
|
+
}
|
|
34459
|
+
}
|
|
34460
|
+
|
|
34461
|
+
break;
|
|
34462
|
+
|
|
34369
34463
|
case 'residue custom':
|
|
34370
34464
|
for (let i in atoms) {
|
|
34371
34465
|
let atom = ic.atoms[i];
|
|
@@ -35027,6 +35121,12 @@ class SetOption {
|
|
|
35027
35121
|
else if(colorType == 'hydrophobic') {
|
|
35028
35122
|
colorLabel = 'Hydrophobicity';
|
|
35029
35123
|
}
|
|
35124
|
+
else if(colorType == 'ig strand') {
|
|
35125
|
+
colorLabel = 'Ig Strand';
|
|
35126
|
+
}
|
|
35127
|
+
else if(colorType == 'ig protodomain') {
|
|
35128
|
+
colorLabel = 'Ig Protodomain';
|
|
35129
|
+
}
|
|
35030
35130
|
|
|
35031
35131
|
let html = "Color by <b>" + colorLabel + "</b><br><br>";
|
|
35032
35132
|
|
|
@@ -35047,6 +35147,12 @@ class SetOption {
|
|
|
35047
35147
|
else if (colorType == 'charge'){
|
|
35048
35148
|
html += this.getColorLegendForCharge(ic.hAtoms);
|
|
35049
35149
|
}
|
|
35150
|
+
else if (colorType == 'ig strand'){
|
|
35151
|
+
html += this.getColorLegendForIgstrand(ic.hAtoms);
|
|
35152
|
+
}
|
|
35153
|
+
else if (colorType == 'ig protodomain'){
|
|
35154
|
+
html += this.getColorLegendForIgproto(ic.hAtoms);
|
|
35155
|
+
}
|
|
35050
35156
|
//else if (ic.legendClick == 4){
|
|
35051
35157
|
else if (colorType == 'normalized hydrophobic' || colorType == 'hydrophobic') {
|
|
35052
35158
|
let bOriResn = true;
|
|
@@ -35270,6 +35376,70 @@ class SetOption {
|
|
|
35270
35376
|
|
|
35271
35377
|
return html;
|
|
35272
35378
|
}
|
|
35379
|
+
|
|
35380
|
+
getColorLegendForIgstrand(atomHash) { let ic = this.icn3d; ic.icn3dui;
|
|
35381
|
+
let html = '';
|
|
35382
|
+
|
|
35383
|
+
const name2color = {
|
|
35384
|
+
"A^ Strand": "FF00FF",
|
|
35385
|
+
"A Strand": "663399",
|
|
35386
|
+
"A* Strand": "FFC0CB",
|
|
35387
|
+
"A' Strand": "663399", //"9370db",
|
|
35388
|
+
"B Strand": "ba55d3",
|
|
35389
|
+
"C Strand": "0000FF",
|
|
35390
|
+
"C' Strand": "6495ED",
|
|
35391
|
+
"C'' Strand": "006400",
|
|
35392
|
+
"D Strand": "00FF00",
|
|
35393
|
+
"E Strand": "F7DC6F", //"F0E68C",
|
|
35394
|
+
"F Strand": "FFA500",
|
|
35395
|
+
"G Strand": "FF0000",
|
|
35396
|
+
"G* Strand": "8B0000",
|
|
35397
|
+
"Loop": "CCCCCC"
|
|
35398
|
+
};
|
|
35399
|
+
|
|
35400
|
+
html += "<div>";
|
|
35401
|
+
for (let name in name2color) {
|
|
35402
|
+
let color = name2color[name];
|
|
35403
|
+
html += "<span>";
|
|
35404
|
+
html += "<div style='width: 10px; height: 10px; background-color:#" + color + "; border: 0px;display:inline-block;' ></div> ";
|
|
35405
|
+
html += name;
|
|
35406
|
+
html += "</span><br>";
|
|
35407
|
+
}
|
|
35408
|
+
|
|
35409
|
+
html += "</div>";
|
|
35410
|
+
|
|
35411
|
+
return html;
|
|
35412
|
+
}
|
|
35413
|
+
|
|
35414
|
+
getColorLegendForIgproto(atomHash) { let ic = this.icn3d; ic.icn3dui;
|
|
35415
|
+
let html = '';
|
|
35416
|
+
|
|
35417
|
+
const name2color = {
|
|
35418
|
+
"A Strand": "0000FF",
|
|
35419
|
+
"B Strand": "006400",
|
|
35420
|
+
"C Strand": "F7DC6F", //"F0E68C",
|
|
35421
|
+
"C' Strand": "FFA500",
|
|
35422
|
+
"C'' Strand": "FF0000",
|
|
35423
|
+
"D Strand": "0000FF",
|
|
35424
|
+
"E Strand": "006400",
|
|
35425
|
+
"F Strand": "F7DC6F", //"F0E68C",
|
|
35426
|
+
"G Strand": "FFA500",
|
|
35427
|
+
"Loop": "CCCCCC"
|
|
35428
|
+
};
|
|
35429
|
+
|
|
35430
|
+
html += "<div>";
|
|
35431
|
+
for (let name in name2color) {
|
|
35432
|
+
let color = name2color[name];
|
|
35433
|
+
html += "<span>";
|
|
35434
|
+
html += "<div style='width: 10px; height: 10px; background-color:#" + color + "; border: 0px;display:inline-block;' ></div> ";
|
|
35435
|
+
html += name;
|
|
35436
|
+
html += "</span><br>";
|
|
35437
|
+
}
|
|
35438
|
+
|
|
35439
|
+
html += "</div>";
|
|
35440
|
+
|
|
35441
|
+
return html;
|
|
35442
|
+
}
|
|
35273
35443
|
}
|
|
35274
35444
|
|
|
35275
35445
|
/**
|
|
@@ -40388,6 +40558,14 @@ class ShowAnno {
|
|
|
40388
40558
|
} // align seq to structure
|
|
40389
40559
|
}
|
|
40390
40560
|
ic.bAnnoShown = true;
|
|
40561
|
+
|
|
40562
|
+
if(ic.bShowRefnum) {
|
|
40563
|
+
ic.opts.color = 'ig strand';
|
|
40564
|
+
ic.setColorCls.setColorByOptions(ic.opts, ic.atoms);
|
|
40565
|
+
|
|
40566
|
+
ic.selectionCls.selectAll_base();
|
|
40567
|
+
ic.hlUpdateCls.updateHlAll();
|
|
40568
|
+
}
|
|
40391
40569
|
}
|
|
40392
40570
|
|
|
40393
40571
|
async showAnnoSeqData(nucleotide_chainid, chemical_chainid, chemical_set) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -41387,6 +41565,8 @@ class ShowSeq {
|
|
|
41387
41565
|
let html = '', html3 = '';
|
|
41388
41566
|
|
|
41389
41567
|
let chainList = '';
|
|
41568
|
+
if(!ic.chainid2index[chnid]) return {html: html, html3: html3};
|
|
41569
|
+
|
|
41390
41570
|
for(let i = 0, il = ic.chainid2index[chnid].length; i < il; ++i) {
|
|
41391
41571
|
chainList += ic.refpdbArray[ic.chainid2index[chnid][i]] + " ";
|
|
41392
41572
|
}
|
|
@@ -41678,6 +41858,7 @@ class ShowSeq {
|
|
|
41678
41858
|
else {
|
|
41679
41859
|
if(bShowRefnum && currStrand != ' ') {
|
|
41680
41860
|
html += this.getRefnumHtml(residueid, refnumStr, refnumStr_ori, refnumLabel, currStrand, bLoop, bHidelabel);
|
|
41861
|
+
if(bLoop) ic.residIgLoop[residueid] = 1;
|
|
41681
41862
|
}
|
|
41682
41863
|
else {
|
|
41683
41864
|
html += '<span></span>';
|
|
@@ -41725,6 +41906,7 @@ class ShowSeq {
|
|
|
41725
41906
|
|
|
41726
41907
|
if(bShowRefnum && currStrand != ' ') {
|
|
41727
41908
|
html += this.getRefnumHtml(residueid, refnumStr, refnumStr_ori, refnumLabel, currStrand, bLoop, bHidelabel);
|
|
41909
|
+
if(bLoop) ic.residIgLoop[residueid] = 1;
|
|
41728
41910
|
}
|
|
41729
41911
|
else {
|
|
41730
41912
|
html += '<span></span>';
|
|
@@ -41857,48 +42039,69 @@ class ShowSeq {
|
|
|
41857
42039
|
return html;
|
|
41858
42040
|
}
|
|
41859
42041
|
|
|
41860
|
-
getRefnumColor(currStrand) { let ic = this.icn3d
|
|
41861
|
-
if(currStrand == "A^") { // deep sky blue
|
|
41862
|
-
return '#9900ff'; //'#00BFFF';
|
|
42042
|
+
getRefnumColor(currStrand) { let ic = this.icn3d, me = ic.icn3dui;
|
|
42043
|
+
if(currStrand == "A^") { //magenta // deep sky blue
|
|
42044
|
+
return '#FF00FF'; //'#9900ff'; //'#00BFFF';
|
|
42045
|
+
}
|
|
42046
|
+
else if(currStrand == "A") { //rebecca purple // blue
|
|
42047
|
+
return '#663399'; //'#9900ff'; //'#0000FF';
|
|
42048
|
+
}
|
|
42049
|
+
else if(currStrand == "A*") { //pink // sky blue
|
|
42050
|
+
return '#FFC0CB'; //'#9900ff'; //'#87CEEB';
|
|
42051
|
+
}
|
|
42052
|
+
else if(currStrand == "A'") { //medium purple // steel blue
|
|
42053
|
+
return '#663399'; //'#9370db'; //'#9900ff'; //'#4682B4';
|
|
42054
|
+
}
|
|
42055
|
+
else if(currStrand == "B") { //medium orchid // cyan
|
|
42056
|
+
return '#ba55d3'; //'#0000FF'; //'#4a86e8'; //'#00FFFF';
|
|
42057
|
+
}
|
|
42058
|
+
else if(currStrand == "C") { //blue // green
|
|
42059
|
+
return '#0000FF'; //'#76d6ff'; //'#00FF00';
|
|
42060
|
+
}
|
|
42061
|
+
else if(currStrand == "C'") { //corn blue // yellow
|
|
42062
|
+
return '#6495ED'; //'#006400'; //'#00b050'; //'#FFFF00';
|
|
41863
42063
|
}
|
|
41864
|
-
else if(currStrand == "
|
|
41865
|
-
return '#
|
|
42064
|
+
else if(currStrand == "C''") { //dark green // orange
|
|
42065
|
+
return '#006400'; //'#00ff00'; //'#FFA500';
|
|
41866
42066
|
}
|
|
41867
|
-
else if(currStrand == "
|
|
41868
|
-
return '#
|
|
42067
|
+
else if(currStrand == "D") { //green // brown
|
|
42068
|
+
return '#00FF00'; //'#fffb00'; //'#A52A2A';
|
|
41869
42069
|
}
|
|
41870
|
-
else if(currStrand == "
|
|
41871
|
-
return '#
|
|
42070
|
+
else if(currStrand == "E") { //yellow // pink
|
|
42071
|
+
return "#F7DC6F"; //'#F0E68C'; //'#ff9900'; //'#ffd966'; //'#FFC0CB';
|
|
41872
42072
|
}
|
|
41873
|
-
else if(currStrand == "
|
|
41874
|
-
return '#
|
|
42073
|
+
else if(currStrand == "F") { //orange // magenta
|
|
42074
|
+
return '#FFA500'; //'#FF00FF'; //'#ff9900'; //'#FF00FF';
|
|
41875
42075
|
}
|
|
41876
|
-
else if(currStrand == "
|
|
41877
|
-
return '#
|
|
42076
|
+
else if(currStrand == "G") { //red // red
|
|
42077
|
+
return '#FF0000'; //'#ff2600'; //'#FF0000';
|
|
41878
42078
|
}
|
|
41879
|
-
else if(currStrand == "
|
|
41880
|
-
return '#
|
|
42079
|
+
else if(currStrand == "G*") { //dark red // salmon
|
|
42080
|
+
return '#8B0000'; //'#ff2600'; //'#FA8072';
|
|
41881
42081
|
}
|
|
41882
|
-
else
|
|
41883
|
-
return
|
|
42082
|
+
else {
|
|
42083
|
+
return me.htmlCls.GREYB;
|
|
41884
42084
|
}
|
|
41885
|
-
|
|
41886
|
-
|
|
42085
|
+
}
|
|
42086
|
+
|
|
42087
|
+
getProtodomainColor(currStrand) { let ic = this.icn3d, me = ic.icn3dui;
|
|
42088
|
+
if((currStrand && currStrand.substr(0,1) == "A") || currStrand == "D") {
|
|
42089
|
+
return '#0000FF';
|
|
41887
42090
|
}
|
|
41888
|
-
else if(currStrand == "E") {
|
|
41889
|
-
return '#
|
|
42091
|
+
else if(currStrand == "B" || currStrand == "E") {
|
|
42092
|
+
return '#006400';
|
|
41890
42093
|
}
|
|
41891
|
-
else if(currStrand == "F") {
|
|
41892
|
-
return
|
|
42094
|
+
else if(currStrand == "C" || currStrand == "F") {
|
|
42095
|
+
return "#F7DC6F"; //'#F0E68C';
|
|
41893
42096
|
}
|
|
41894
|
-
else if(currStrand == "G") {
|
|
41895
|
-
return '#
|
|
42097
|
+
else if(currStrand == "C'" || (currStrand && currStrand.substr(0, 1) == "G")) {
|
|
42098
|
+
return '#FFA500';
|
|
41896
42099
|
}
|
|
41897
|
-
else if(currStrand == "
|
|
41898
|
-
return '#
|
|
42100
|
+
else if(currStrand == "C''") { //linker
|
|
42101
|
+
return '#FF0000';
|
|
41899
42102
|
}
|
|
41900
42103
|
else {
|
|
41901
|
-
return
|
|
42104
|
+
return me.htmlCls.GREYB;
|
|
41902
42105
|
}
|
|
41903
42106
|
}
|
|
41904
42107
|
|
|
@@ -42964,7 +43167,7 @@ class LineGraph {
|
|
|
42964
43167
|
// Node for common interaction: {id : "Q24.A.2AJF|Q24", r : "1_1_2AJF_A_24", s: "a", ...}
|
|
42965
43168
|
let nodeArray1SplitCommon = [], nodeArray2SplitCommon = [], linkArraySplitCommon = [], nameHashSplitCommon = [];
|
|
42966
43169
|
let nodeArray1SplitDiff = [], nodeArray2SplitDiff = [], linkArraySplitDiff = [], nameHashSplitDiff = [];
|
|
42967
|
-
let linkedNodeCnt = {};
|
|
43170
|
+
let linkedNodeCnt = {}, linkedNodeInterDiff = {};
|
|
42968
43171
|
|
|
42969
43172
|
for(let i = 0, il = structureArray.length; i < il; ++i) {
|
|
42970
43173
|
nodeArray1Split[i] = [];
|
|
@@ -42984,7 +43187,7 @@ class LineGraph {
|
|
|
42984
43187
|
|
|
42985
43188
|
struc2index[structureArray[i]] = i;
|
|
42986
43189
|
}
|
|
42987
|
-
|
|
43190
|
+
|
|
42988
43191
|
for(let i = 0, il = linkArray.length; i < il; ++i) {
|
|
42989
43192
|
let link = linkArray[i];
|
|
42990
43193
|
let nodeA = name2node[link.source];
|
|
@@ -43020,9 +43223,11 @@ class LineGraph {
|
|
|
43020
43223
|
|
|
43021
43224
|
if(!linkedNodeCnt.hasOwnProperty(mappingid)) {
|
|
43022
43225
|
linkedNodeCnt[mappingid] = 1;
|
|
43226
|
+
linkedNodeInterDiff[mappingid] = link.n;
|
|
43023
43227
|
}
|
|
43024
43228
|
else {
|
|
43025
43229
|
++linkedNodeCnt[mappingid];
|
|
43230
|
+
linkedNodeInterDiff[mappingid] -= link.n; // show difference
|
|
43026
43231
|
}
|
|
43027
43232
|
}
|
|
43028
43233
|
}
|
|
@@ -43073,7 +43278,7 @@ class LineGraph {
|
|
|
43073
43278
|
linkDiff.source += separatorDiff + ic.chainsMapping[chainid1][resid1];
|
|
43074
43279
|
linkDiff.target += separatorDiff + ic.chainsMapping[chainid2][resid2];
|
|
43075
43280
|
|
|
43076
|
-
if(linkedNodeCnt[mappingid] == structureArray.length) {
|
|
43281
|
+
if(linkedNodeCnt[mappingid] == structureArray.length && linkedNodeInterDiff[mappingid] == 0) {
|
|
43077
43282
|
linkArraySplitCommon[index].push(linkCommon);
|
|
43078
43283
|
}
|
|
43079
43284
|
else {
|
|
@@ -43862,7 +44067,10 @@ class GetGraph {
|
|
|
43862
44067
|
ic.hBondCls.calculateChemicalHbonds(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge, 'graph', true );
|
|
43863
44068
|
resid2ResidhashHbond = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
43864
44069
|
}
|
|
43865
|
-
|
|
44070
|
+
|
|
44071
|
+
//let hbondStr = this.getGraphLinks(resid2ResidhashHbond, resid2ResidhashHbond, me.htmlCls.hbondInsideColor, labelType, me.htmlCls.hbondValuehbondInsideValue);
|
|
44072
|
+
let hbondStr = this.getGraphLinks(resid2ResidhashHbond, resid2ResidhashHbond, me.htmlCls.hbondInsideColor, labelType, me.htmlCls.hbondInsideValue);
|
|
44073
|
+
|
|
43866
44074
|
return hbondStr;
|
|
43867
44075
|
}
|
|
43868
44076
|
getIonicLinksForSet(atoms, labelType) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -43962,9 +44170,10 @@ class GetGraph {
|
|
|
43962
44170
|
getGraphLinks(hash1, hash2, color, labelType, value, bCartoon2d) {var ic = this.icn3d, me = ic.icn3dui;
|
|
43963
44171
|
let hbondStr = '';
|
|
43964
44172
|
value =(value === undefined) ? 1 : value;
|
|
43965
|
-
let prevLinkStr = '';
|
|
43966
|
-
let sourceTargetHash = {};
|
|
44173
|
+
//let prevLinkStr = '';
|
|
44174
|
+
//let sourceTargetHash = {};
|
|
43967
44175
|
|
|
44176
|
+
let linkstr2cnt = {};
|
|
43968
44177
|
for(let resid1 in hash1) {
|
|
43969
44178
|
//ASN $1KQ2.A:6@ND2
|
|
43970
44179
|
//or ASN $1KQ2.A:6
|
|
@@ -43995,7 +44204,7 @@ class GetGraph {
|
|
|
43995
44204
|
resName1 = ic.resi2resirange[resName1];
|
|
43996
44205
|
resName2 = ic.resi2resirange[resName2];
|
|
43997
44206
|
}
|
|
43998
|
-
|
|
44207
|
+
/*
|
|
43999
44208
|
if(!sourceTargetHash.hasOwnProperty(resName1 + '_' + resName2) && resName1 !== undefined && resName2 !== undefined ) {
|
|
44000
44209
|
let linkStr = ', {"source": "' + resName1 + '", "target": "' + resName2 + '", "v": ' + value + ', "c": "' + color + '"}';
|
|
44001
44210
|
if(linkStr != prevLinkStr) hbondStr += linkStr;
|
|
@@ -44004,8 +44213,29 @@ class GetGraph {
|
|
|
44004
44213
|
sourceTargetHash[resName1 + '_' + resName2] = 1;
|
|
44005
44214
|
sourceTargetHash[resName2 + '_' + resName1] = 1;
|
|
44006
44215
|
}
|
|
44216
|
+
*/
|
|
44217
|
+
|
|
44218
|
+
if(resName1 !== undefined && resName2 !== undefined ) {
|
|
44219
|
+
let linkStr = '"source": "' + resName1 + '", "target": "' + resName2 + '", "v": ' + value + ', "c": "' + color + '"';
|
|
44220
|
+
|
|
44221
|
+
//prevLinkStr = linkStr;
|
|
44222
|
+
|
|
44223
|
+
if(!linkstr2cnt.hasOwnProperty(linkStr)) {
|
|
44224
|
+
linkstr2cnt[linkStr] = 1;
|
|
44225
|
+
linkstr2cnt[linkStr] = 1;
|
|
44226
|
+
}
|
|
44227
|
+
else {
|
|
44228
|
+
linkstr2cnt[linkStr] += 1;
|
|
44229
|
+
linkstr2cnt[linkStr] += 1;
|
|
44230
|
+
}
|
|
44231
|
+
}
|
|
44007
44232
|
}
|
|
44008
44233
|
}
|
|
44234
|
+
|
|
44235
|
+
for(let linkStr in linkstr2cnt) {
|
|
44236
|
+
hbondStr += ', {' + linkStr + ', "n": ' + linkstr2cnt[linkStr] + '}';
|
|
44237
|
+
}
|
|
44238
|
+
|
|
44009
44239
|
return hbondStr;
|
|
44010
44240
|
}
|
|
44011
44241
|
convertLabel2Resid(residLabel) {var ic = this.icn3d; ic.icn3dui;
|
|
@@ -44441,12 +44671,14 @@ class ViewInterPairs {
|
|
|
44441
44671
|
let bondCnt;
|
|
44442
44672
|
|
|
44443
44673
|
// reset
|
|
44444
|
-
|
|
44445
|
-
|
|
44446
|
-
|
|
44447
|
-
|
|
44448
|
-
|
|
44449
|
-
|
|
44674
|
+
if(!bHbondCalc) {
|
|
44675
|
+
ic.hbondpnts = [];
|
|
44676
|
+
ic.saltbridgepnts = [];
|
|
44677
|
+
ic.contactpnts = [];
|
|
44678
|
+
ic.halogenpnts = [];
|
|
44679
|
+
ic.picationpnts = [];
|
|
44680
|
+
ic.pistackingpnts = [];
|
|
44681
|
+
}
|
|
44450
44682
|
|
|
44451
44683
|
// type: view, save, forcegraph
|
|
44452
44684
|
ic.bRender = false;
|
|
@@ -47140,7 +47372,18 @@ class ChainalignParser {
|
|
|
47140
47372
|
}
|
|
47141
47373
|
|
|
47142
47374
|
// ic.deferredMmdbaf = $.Deferred(function() {
|
|
47143
|
-
let
|
|
47375
|
+
let structArrayTmp = idlist.split(',');
|
|
47376
|
+
|
|
47377
|
+
let structArray = [];
|
|
47378
|
+
// remove redundant structures
|
|
47379
|
+
for(let i = 0, il = structArrayTmp.length; i < il; ++i) {
|
|
47380
|
+
if(!ic.structures.hasOwnProperty(structArrayTmp[i].toUpperCase())) {
|
|
47381
|
+
structArray.push(structArrayTmp[i]);
|
|
47382
|
+
}
|
|
47383
|
+
}
|
|
47384
|
+
|
|
47385
|
+
if(structArray.length == 0) return;
|
|
47386
|
+
|
|
47144
47387
|
ic.structArray = ic.structArray.concat(structArray);
|
|
47145
47388
|
|
|
47146
47389
|
let ajaxArray = [];
|
|
@@ -47597,7 +47840,7 @@ class MmcifParser {
|
|
|
47597
47840
|
}
|
|
47598
47841
|
|
|
47599
47842
|
async downloadMmcifSymmetry(mmcifid, type) { let ic = this.icn3d, me = ic.icn3dui;
|
|
47600
|
-
// https://files.rcsb.org/header/
|
|
47843
|
+
// https://files.rcsb.org/header/ is not accessible in Node.js
|
|
47601
47844
|
let url = (me.bNode) ? "https://files.rcsb.org/view/" + mmcifid + ".cif" : "https://files.rcsb.org/header/" + mmcifid + ".cif";
|
|
47602
47845
|
|
|
47603
47846
|
//ic.bCid = undefined;
|
|
@@ -48896,7 +49139,8 @@ class PdbParser {
|
|
|
48896
49139
|
}
|
|
48897
49140
|
else {
|
|
48898
49141
|
url = "https://files.rcsb.org/view/" + pdbid + ".pdb";
|
|
48899
|
-
|
|
49142
|
+
pdbid = pdbid.toUpperCase();
|
|
49143
|
+
ic.ParserUtilsCls.setYourNote(pdbid + '(PDB) in iCn3D');
|
|
48900
49144
|
}
|
|
48901
49145
|
|
|
48902
49146
|
//ic.bCid = undefined;
|
|
@@ -54205,6 +54449,7 @@ class LoadPDB {
|
|
|
54205
54449
|
//let chainMissingResidueArray = {}
|
|
54206
54450
|
|
|
54207
54451
|
let id = (pdbid) ? pdbid : ic.defaultPdbId;
|
|
54452
|
+
|
|
54208
54453
|
let structure = id;
|
|
54209
54454
|
|
|
54210
54455
|
let prevMissingChain = '';
|
|
@@ -58627,6 +58872,10 @@ class LoadScript {
|
|
|
58627
58872
|
|
|
58628
58873
|
// load pdb, mmcif, mmdb, cid
|
|
58629
58874
|
let id = loadStr.substr(loadStr.lastIndexOf(' ') + 1);
|
|
58875
|
+
|
|
58876
|
+
// skip loading the structure if it was loaded before
|
|
58877
|
+
if(ic.structures.hasOwnProperty(id)) return;
|
|
58878
|
+
|
|
58630
58879
|
ic.inputid = id;
|
|
58631
58880
|
if(command.indexOf('load mmtf') !== -1) {
|
|
58632
58881
|
me.cfg.mmtfid = id;
|
|
@@ -58701,7 +58950,7 @@ class LoadScript {
|
|
|
58701
58950
|
else if(command.indexOf('load alignment') !== -1) {
|
|
58702
58951
|
me.cfg.align = id;
|
|
58703
58952
|
|
|
58704
|
-
if(me.cfg.inpara.indexOf('atype=2') == -1) {
|
|
58953
|
+
if(me.cfg.inpara || me.cfg.inpara.indexOf('atype=2') == -1) {
|
|
58705
58954
|
await ic.alignParserCls.downloadAlignment(me.cfg.align);
|
|
58706
58955
|
}
|
|
58707
58956
|
else {
|
|
@@ -69257,7 +69506,7 @@ class iCn3D {
|
|
|
69257
69506
|
this.optsOri = {};
|
|
69258
69507
|
this.optsOri['camera'] = 'perspective'; //perspective, orthographic
|
|
69259
69508
|
this.optsOri['background'] = 'black'; //transparent, black, grey, white
|
|
69260
|
-
this.optsOri['color'] = 'chain'; //spectrum, secondary structure, charge, hydrophobic, conserved, chain, residue, atom, b factor, red, green, blue, magenta, yellow, cyan, white, grey, custom
|
|
69509
|
+
this.optsOri['color'] = 'chain'; //spectrum, secondary structure, charge, hydrophobic, conserved, chain, residue, atom, b factor, red, green, blue, magenta, yellow, cyan, white, grey, custom, ig strand
|
|
69261
69510
|
this.optsOri['proteins'] = 'ribbon'; //ribbon, strand, cylinder and plate, schematic, c alpha trace, backbone, b factor tube, lines, stick, ball and stick, sphere, nothing
|
|
69262
69511
|
this.optsOri['sidec'] = 'nothing'; //lines2, stick2, ball and stick2, sphere2, nothing
|
|
69263
69512
|
this.optsOri['nucleotides'] = 'nucleotide cartoon'; //nucleotide cartoon, o3 trace, backbone, schematic, lines, stick,
|
|
@@ -69524,6 +69773,7 @@ iCn3D.prototype.init_base = function (bKeepCmd) {
|
|
|
69524
69773
|
|
|
69525
69774
|
this.chainsMapping = {}; // structure_chain name -> residue id hash such as {'structure_chain_resi1': 'reference residue such as K10', ...}
|
|
69526
69775
|
this.resid2refnum = {}; // residue id -> reference number, e.g., {'1WIO_A_16': '2150', ...}
|
|
69776
|
+
this.residIgLoop = {}; // residue ids in the loop regions of ig domain
|
|
69527
69777
|
this.refnum2residArray = {}; // reference number -> array of residue id, e.g., {'2150': ['1WIO_A_16', ...], ...}
|
|
69528
69778
|
this.bShowRefnum = false;
|
|
69529
69779
|
|
|
@@ -69696,7 +69946,7 @@ class iCn3DUI {
|
|
|
69696
69946
|
//even when multiple iCn3D viewers are shown together.
|
|
69697
69947
|
this.pre = this.cfg.divid + "_";
|
|
69698
69948
|
|
|
69699
|
-
this.REVISION = '3.23.
|
|
69949
|
+
this.REVISION = '3.23.2';
|
|
69700
69950
|
|
|
69701
69951
|
// In nodejs, iCn3D defines "window = {navigator: {}}"
|
|
69702
69952
|
this.bNode = (Object.keys(window).length < 2) ? true : false;
|