icn3d 3.24.1 → 3.24.2
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 +59 -20
- package/icn3d.min.js +7 -3
- package/icn3d.module.js +59 -20
- package/package.json +1 -1
package/icn3d.module.js
CHANGED
|
@@ -8262,6 +8262,13 @@ class ClickMenu {
|
|
|
8262
8262
|
ic.drawCls.draw();
|
|
8263
8263
|
});
|
|
8264
8264
|
|
|
8265
|
+
me.myEventCls.onIds("#" + me.pre + "mn6_addlabelRefnum", "click", function(e) { let ic = me.icn3d; e.preventDefault();
|
|
8266
|
+
ic.residueLabelsCls.addResidueLabels(ic.hAtoms, undefined, undefined, undefined, true);
|
|
8267
|
+
ic.selectionCls.saveSelectionIfSelected();
|
|
8268
|
+
thisClass.setLogCmd('add reference number labels', true);
|
|
8269
|
+
ic.drawCls.draw();
|
|
8270
|
+
});
|
|
8271
|
+
|
|
8265
8272
|
me.myEventCls.onIds("#" + me.pre + "mn6_addlabelChains", "click", function(e) { let ic = me.icn3d; e.preventDefault();
|
|
8266
8273
|
ic.analysisCls.addChainLabels(ic.hAtoms);
|
|
8267
8274
|
ic.selectionCls.saveSelectionIfSelected();
|
|
@@ -10290,8 +10297,8 @@ class SetMenu {
|
|
|
10290
10297
|
//}
|
|
10291
10298
|
|
|
10292
10299
|
//!!!
|
|
10293
|
-
|
|
10294
|
-
|
|
10300
|
+
html += this.getRadio('mn4_clr', 'mn4_clrIgstrand', 'Ig Strand', undefined, undefined, 2);
|
|
10301
|
+
html += this.getRadio('mn4_clr', 'mn4_clrIgproto', 'Ig Protodomain', undefined, undefined, 2);
|
|
10295
10302
|
}
|
|
10296
10303
|
else {
|
|
10297
10304
|
//if(!me.cfg.hidelicense) html += this.getRadio('mn4_clr', 'mn1_delphi2', 'DelPhi<br><span style="padding-left:1.5em;">Potential ' + me.htmlCls.licenseStr + '</span>');
|
|
@@ -10421,6 +10428,8 @@ class SetMenu {
|
|
|
10421
10428
|
if(me.cfg.cid === undefined) {
|
|
10422
10429
|
html += this.getRadio('mn6_addlabel', 'mn6_addlabelResidues', 'per Residue', undefined, 1, 2);
|
|
10423
10430
|
html += this.getRadio('mn6_addlabel', 'mn6_addlabelResnum', 'per Residue & Number', undefined, 1, 2);
|
|
10431
|
+
//!!!
|
|
10432
|
+
html += this.getRadio('mn6_addlabel', 'mn6_addlabelRefnum', 'per Reference Number', undefined, 1, 2);
|
|
10424
10433
|
html += this.getRadio('mn6_addlabel', 'mn6_addlabelChains', 'per Chain', undefined, undefined, 2);
|
|
10425
10434
|
html += this.getRadio('mn6_addlabel', 'mn6_addlabelTermini', 'N- & C-Termini', undefined, 1, 2);
|
|
10426
10435
|
}
|
|
@@ -10512,12 +10521,11 @@ class SetMenu {
|
|
|
10512
10521
|
|
|
10513
10522
|
html += "<ul>";
|
|
10514
10523
|
//!!!
|
|
10515
|
-
/*
|
|
10516
10524
|
html += this.getLink('mn6_igrefYes', 'Show Ig Ref. Number', undefined, 2);
|
|
10517
10525
|
html += this.getLink('mn6_igrefNo', 'Hide Ig Ref. Number', undefined, 2);
|
|
10518
10526
|
|
|
10519
10527
|
html += this.getMenuSep();
|
|
10520
|
-
|
|
10528
|
+
|
|
10521
10529
|
html += this.getLink('mn6_customref', 'Custom Ref. Number', undefined, 2);
|
|
10522
10530
|
html += "</ul>";
|
|
10523
10531
|
html += "</li>";
|
|
@@ -12435,7 +12443,7 @@ class SetDialog {
|
|
|
12435
12443
|
|
|
12436
12444
|
html += me.htmlCls.divStr + "dl_copyurl' style='width:520px;' class='" + dialogClass + "'>";
|
|
12437
12445
|
html += this.addNotebookTitle('dl_copyurl', 'Share Link');
|
|
12438
|
-
|
|
12446
|
+
html += "<br>";
|
|
12439
12447
|
html += "1. <b>URLs Used in Browsers</b><br><br>";
|
|
12440
12448
|
|
|
12441
12449
|
html += "Please copy one of the URLs below. They show the same result.<br>(To add a title to share link, click \"Windows > Your Note\" and click \"File > Share Link\" again.)<br><br>";
|
|
@@ -12444,7 +12452,6 @@ class SetDialog {
|
|
|
12444
12452
|
html += "Lifelong Short URL:(To replace this URL, send a pull request to update share.html at <a href='https://github.com/ncbi/icn3d' target='_blank'>iCn3D GitHub</a>)<br>" + me.htmlCls.inputTextStr + "id='" + me.pre + "short_url' value='' style='width:100%'><br><br>";
|
|
12445
12453
|
html += "Lifelong Short URL + Window Title:(To update the window title, click \"Analysis > Your Note/Window Title\".)<br>" + me.htmlCls.inputTextStr + "id='" + me.pre + "short_url_title' value='' style='width:100%'><br><br>";
|
|
12446
12454
|
}
|
|
12447
|
-
html += "<br>";
|
|
12448
12455
|
|
|
12449
12456
|
html += "2. <b>Commands Used in Jupyter Noteboook</b><br><br>";
|
|
12450
12457
|
html += "Please copy the following commands into a cell in Jupyter Notebook to show the same result.<br><br>";
|
|
@@ -31640,7 +31647,7 @@ class ResidueLabels {
|
|
|
31640
31647
|
|
|
31641
31648
|
//Add labels for all residues containing the input "atoms". The labels are one-letter residue abbreviations.
|
|
31642
31649
|
//If "bSchematic" is true, the labels are in circles. Otherwise, they are in round-corner rectangles.
|
|
31643
|
-
addResidueLabels(atoms, bSchematic, alpha, bNumber) { let ic = this.icn3d, me = ic.icn3dui;
|
|
31650
|
+
addResidueLabels(atoms, bSchematic, alpha, bNumber, bRefnum) { let ic = this.icn3d, me = ic.icn3dui;
|
|
31644
31651
|
if(me.bNode) return;
|
|
31645
31652
|
|
|
31646
31653
|
let size = 18;
|
|
@@ -31680,6 +31687,15 @@ class ResidueLabels {
|
|
|
31680
31687
|
label.text += atom.resi;
|
|
31681
31688
|
//label.factor = 0.3;
|
|
31682
31689
|
}
|
|
31690
|
+
else if(bRefnum) {
|
|
31691
|
+
let resid = atom.structure + '_' + atom.chain + '_' + atom.resi;
|
|
31692
|
+
let refnum = '';
|
|
31693
|
+
if(ic.resid2refnum[resid]) {
|
|
31694
|
+
refnum = (ic.resid2refnum[resid].substr(0, 1) == ' ') ? '' : ic.resid2refnum[resid];
|
|
31695
|
+
}
|
|
31696
|
+
|
|
31697
|
+
label.text = refnum;
|
|
31698
|
+
}
|
|
31683
31699
|
label.size = size;
|
|
31684
31700
|
label.factor = 0.3;
|
|
31685
31701
|
|
|
@@ -31690,6 +31706,9 @@ class ResidueLabels {
|
|
|
31690
31706
|
if(bNumber) {
|
|
31691
31707
|
label.color = (ic.opts.background != 'black') ? ic.colorWhitebkgd : ic.colorBlackbkgd;
|
|
31692
31708
|
}
|
|
31709
|
+
else if(bRefnum) {
|
|
31710
|
+
label.color = '#00FFFF';
|
|
31711
|
+
}
|
|
31693
31712
|
else {
|
|
31694
31713
|
label.color = (atomColorStr === "CCCCCC" || atomColorStr === "C8C8C8") ? "#888888" : "#" + atomColorStr;
|
|
31695
31714
|
}
|
|
@@ -31895,7 +31914,7 @@ class Impostor {
|
|
|
31895
31914
|
|
|
31896
31915
|
setParametersForShader (opacity) { let ic = this.icn3d, me = ic.icn3dui;
|
|
31897
31916
|
let background = me.parasCls.backgroundColors[ic.opts.background.toLowerCase()];
|
|
31898
|
-
if(!background) background = me.parasCls.thr(0x000000);
|
|
31917
|
+
//if(!background) background = me.parasCls.thr(0x000000);
|
|
31899
31918
|
|
|
31900
31919
|
let near = 2.5*ic.maxD;
|
|
31901
31920
|
let far = 4*ic.maxD;
|
|
@@ -32900,6 +32919,8 @@ class Alternate {
|
|
|
32900
32919
|
// change the display atom when alternating
|
|
32901
32920
|
//Show structures one by one.
|
|
32902
32921
|
alternateStructures() { let ic = this.icn3d, me = ic.icn3dui;
|
|
32922
|
+
//ic.transformCls.zoominSelection();
|
|
32923
|
+
|
|
32903
32924
|
// default ic.ALTERNATE_STRUCTURE = -1
|
|
32904
32925
|
if(ic.ALTERNATE_STRUCTURE == -1) {
|
|
32905
32926
|
ic.viewSelectionAtoms = me.hashUtilsCls.cloneHash(ic.dAtoms);
|
|
@@ -36493,23 +36514,27 @@ class SetOption {
|
|
|
36493
36514
|
let html = '';
|
|
36494
36515
|
|
|
36495
36516
|
const name2color = {
|
|
36517
|
+
"<b>Protodomain 1</b>": "",
|
|
36496
36518
|
"A Strand": "0000FF",
|
|
36497
36519
|
"B Strand": "006400",
|
|
36498
36520
|
"C Strand": "FFFF00", //"F0E68C",
|
|
36499
36521
|
"C' Strand": "FFA500",
|
|
36522
|
+
"<br><b>Linker</b>": "",
|
|
36500
36523
|
"C'' Strand": "FF0000",
|
|
36524
|
+
"<br><b>Protodomain 2</b>": "",
|
|
36501
36525
|
"D Strand": "0000FF",
|
|
36502
36526
|
"E Strand": "006400",
|
|
36503
36527
|
"F Strand": "FFFF00", //"F0E68C",
|
|
36504
36528
|
"G Strand": "FFA500",
|
|
36529
|
+
"": "",
|
|
36505
36530
|
"Loop": "CCCCCC"
|
|
36506
36531
|
};
|
|
36507
36532
|
|
|
36508
|
-
html += "<div>";
|
|
36533
|
+
html += "<div>A protodomain is a supersecondary structure <br>that by its duplication, symmetry operations <br>can generate a structural domain.<br><br>";
|
|
36509
36534
|
for (let name in name2color) {
|
|
36510
36535
|
let color = name2color[name];
|
|
36511
36536
|
html += "<span>";
|
|
36512
|
-
html += "<div style='width: 10px; height: 10px; background-color:#" + color + "; border: 0px;display:inline-block;' ></div> ";
|
|
36537
|
+
if(color) html += "<div style='width: 10px; height: 10px; background-color:#" + color + "; border: 0px;display:inline-block;' ></div> ";
|
|
36513
36538
|
html += name;
|
|
36514
36539
|
html += "</span><br>";
|
|
36515
36540
|
}
|
|
@@ -38757,7 +38782,7 @@ class Domain3d {
|
|
|
38757
38782
|
this.nc_fact = 0.0; // size factor for internal contacts
|
|
38758
38783
|
|
|
38759
38784
|
// added by Jiyao
|
|
38760
|
-
this.min_contacts =
|
|
38785
|
+
this.min_contacts = 3; // minimum number of contacts to be considered as neighbors
|
|
38761
38786
|
|
|
38762
38787
|
//let this.elements[2*this.MAX_SSE]; // sets of this.elements to be split
|
|
38763
38788
|
this.elements = [];
|
|
@@ -39812,7 +39837,7 @@ class Domain3d {
|
|
|
39812
39837
|
}
|
|
39813
39838
|
}
|
|
39814
39839
|
}
|
|
39815
|
-
|
|
39840
|
+
|
|
39816
39841
|
return {subdomains: subdomains, substruct: substruct, pos2resi:pos2resi };
|
|
39817
39842
|
} // end c2b_NewSplitChain
|
|
39818
39843
|
|
|
@@ -57440,6 +57465,11 @@ class ApplyCommand {
|
|
|
57440
57465
|
|
|
57441
57466
|
ic.drawCls.draw();
|
|
57442
57467
|
}
|
|
57468
|
+
else if(command == 'add reference number labels') {
|
|
57469
|
+
ic.residueLabelsCls.addResidueLabels(ic.hAtoms, undefined, undefined, undefined, true);
|
|
57470
|
+
|
|
57471
|
+
ic.drawCls.draw();
|
|
57472
|
+
}
|
|
57443
57473
|
else if(command == 'add atom labels') {
|
|
57444
57474
|
ic.residueLabelsCls.addAtomLabels(ic.hAtoms);
|
|
57445
57475
|
|
|
@@ -65391,14 +65421,17 @@ class Diagram2d {
|
|
|
65391
65421
|
|
|
65392
65422
|
ic.hlUpdateCls.updateHlAll();
|
|
65393
65423
|
|
|
65424
|
+
ic.transformCls.zoominSelection();
|
|
65425
|
+
|
|
65394
65426
|
me.htmlCls.clickMenuCls.setLogCmd(select, true);
|
|
65395
65427
|
});
|
|
65396
65428
|
|
|
65397
65429
|
//$("#" + ic.pre + "dl_scatterplot .icn3d-interaction", "click", function(e) { let ic = this.icn3d, me = ic.icn3dui;
|
|
65398
|
-
$(document).on("click", "#" + ic.pre + "dl_scatterplot .icn3d-interaction", function(e) { thisClass.icn3d;
|
|
65430
|
+
$(document).on("click", "#" + ic.pre + "dl_scatterplot .icn3d-interaction", function(e) { let ic = thisClass.icn3d;
|
|
65399
65431
|
e.stopImmediatePropagation();
|
|
65400
65432
|
|
|
65401
65433
|
thisClass.clickInteraction(this);
|
|
65434
|
+
ic.transformCls.zoominSelection();
|
|
65402
65435
|
});
|
|
65403
65436
|
|
|
65404
65437
|
$(document).on("click", "#" + ic.pre + "dl_contactmap .icn3d-interaction", function(e) { thisClass.icn3d;
|
|
@@ -67437,7 +67470,6 @@ class SaveFile {
|
|
|
67437
67470
|
let bMulStruc =(struArray.length > 1) ? true : false;
|
|
67438
67471
|
|
|
67439
67472
|
let molNum = 1, prevStru = '', prevChain = '';
|
|
67440
|
-
//pdbStr += '\n';
|
|
67441
67473
|
|
|
67442
67474
|
let addedChainResiHash = {};
|
|
67443
67475
|
for(let i in atomHash) {
|
|
@@ -67457,20 +67489,24 @@ class SaveFile {
|
|
|
67457
67489
|
|
|
67458
67490
|
// add header
|
|
67459
67491
|
let mutantInfo = (chainResi2pdb) ? "Mutated chain_residue " + Object.keys(chainResi2pdb) + '; ' : '';
|
|
67460
|
-
if(!bNoHeader)
|
|
67492
|
+
if(!bNoHeader) {
|
|
67493
|
+
pdbStr += this.getPDBHeader(molNum - 1, stru2header, mutantInfo, pdbid);
|
|
67494
|
+
//pdbStr += '\n'; // separate from incomplete secondary structures
|
|
67495
|
+
}
|
|
67461
67496
|
|
|
67462
|
-
prevStru = atom.structure;
|
|
67497
|
+
//prevStru = atom.structure;
|
|
67463
67498
|
++molNum;
|
|
67464
67499
|
}
|
|
67465
|
-
else {
|
|
67466
|
-
if(atom.chain != prevChain) {
|
|
67500
|
+
//else {
|
|
67501
|
+
//if(atom.chain != prevChain) {
|
|
67502
|
+
if(atom.chain != prevChain && atom.structure == prevStru) {
|
|
67467
67503
|
// add a line "TER" to work with scap/profix to add missing atoms
|
|
67468
67504
|
if(prevChain) {
|
|
67469
67505
|
pdbStr += 'TER\n';
|
|
67470
67506
|
}
|
|
67471
|
-
prevChain = atom.chain;
|
|
67507
|
+
//prevChain = atom.chain;
|
|
67472
67508
|
}
|
|
67473
|
-
}
|
|
67509
|
+
//}
|
|
67474
67510
|
|
|
67475
67511
|
let chainResi = atom.chain + '_' + atom.resi;
|
|
67476
67512
|
if(chainResi2pdb && chainResi2pdb.hasOwnProperty(chainResi)) {
|
|
@@ -67635,6 +67671,9 @@ class SaveFile {
|
|
|
67635
67671
|
}
|
|
67636
67672
|
|
|
67637
67673
|
pdbStr += line + '\n';
|
|
67674
|
+
|
|
67675
|
+
prevStru = atom.structure;
|
|
67676
|
+
prevChain = atom.chain;
|
|
67638
67677
|
}
|
|
67639
67678
|
|
|
67640
67679
|
pdbStr += connStr;
|