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.js
CHANGED
|
@@ -7361,6 +7361,13 @@ class ClickMenu {
|
|
|
7361
7361
|
ic.drawCls.draw();
|
|
7362
7362
|
});
|
|
7363
7363
|
|
|
7364
|
+
me.myEventCls.onIds("#" + me.pre + "mn6_addlabelRefnum", "click", function(e) { let ic = me.icn3d; e.preventDefault();
|
|
7365
|
+
ic.residueLabelsCls.addResidueLabels(ic.hAtoms, undefined, undefined, undefined, true);
|
|
7366
|
+
ic.selectionCls.saveSelectionIfSelected();
|
|
7367
|
+
thisClass.setLogCmd('add reference number labels', true);
|
|
7368
|
+
ic.drawCls.draw();
|
|
7369
|
+
});
|
|
7370
|
+
|
|
7364
7371
|
me.myEventCls.onIds("#" + me.pre + "mn6_addlabelChains", "click", function(e) { let ic = me.icn3d; e.preventDefault();
|
|
7365
7372
|
ic.analysisCls.addChainLabels(ic.hAtoms);
|
|
7366
7373
|
ic.selectionCls.saveSelectionIfSelected();
|
|
@@ -9389,8 +9396,8 @@ class SetMenu {
|
|
|
9389
9396
|
//}
|
|
9390
9397
|
|
|
9391
9398
|
//!!!
|
|
9392
|
-
|
|
9393
|
-
|
|
9399
|
+
html += this.getRadio('mn4_clr', 'mn4_clrIgstrand', 'Ig Strand', undefined, undefined, 2);
|
|
9400
|
+
html += this.getRadio('mn4_clr', 'mn4_clrIgproto', 'Ig Protodomain', undefined, undefined, 2);
|
|
9394
9401
|
}
|
|
9395
9402
|
else {
|
|
9396
9403
|
//if(!me.cfg.hidelicense) html += this.getRadio('mn4_clr', 'mn1_delphi2', 'DelPhi<br><span style="padding-left:1.5em;">Potential ' + me.htmlCls.licenseStr + '</span>');
|
|
@@ -9520,6 +9527,8 @@ class SetMenu {
|
|
|
9520
9527
|
if(me.cfg.cid === undefined) {
|
|
9521
9528
|
html += this.getRadio('mn6_addlabel', 'mn6_addlabelResidues', 'per Residue', undefined, 1, 2);
|
|
9522
9529
|
html += this.getRadio('mn6_addlabel', 'mn6_addlabelResnum', 'per Residue & Number', undefined, 1, 2);
|
|
9530
|
+
//!!!
|
|
9531
|
+
html += this.getRadio('mn6_addlabel', 'mn6_addlabelRefnum', 'per Reference Number', undefined, 1, 2);
|
|
9523
9532
|
html += this.getRadio('mn6_addlabel', 'mn6_addlabelChains', 'per Chain', undefined, undefined, 2);
|
|
9524
9533
|
html += this.getRadio('mn6_addlabel', 'mn6_addlabelTermini', 'N- & C-Termini', undefined, 1, 2);
|
|
9525
9534
|
}
|
|
@@ -9611,12 +9620,11 @@ class SetMenu {
|
|
|
9611
9620
|
|
|
9612
9621
|
html += "<ul>";
|
|
9613
9622
|
//!!!
|
|
9614
|
-
/*
|
|
9615
9623
|
html += this.getLink('mn6_igrefYes', 'Show Ig Ref. Number', undefined, 2);
|
|
9616
9624
|
html += this.getLink('mn6_igrefNo', 'Hide Ig Ref. Number', undefined, 2);
|
|
9617
9625
|
|
|
9618
9626
|
html += this.getMenuSep();
|
|
9619
|
-
|
|
9627
|
+
|
|
9620
9628
|
html += this.getLink('mn6_customref', 'Custom Ref. Number', undefined, 2);
|
|
9621
9629
|
html += "</ul>";
|
|
9622
9630
|
html += "</li>";
|
|
@@ -11534,7 +11542,7 @@ class SetDialog {
|
|
|
11534
11542
|
|
|
11535
11543
|
html += me.htmlCls.divStr + "dl_copyurl' style='width:520px;' class='" + dialogClass + "'>";
|
|
11536
11544
|
html += this.addNotebookTitle('dl_copyurl', 'Share Link');
|
|
11537
|
-
|
|
11545
|
+
html += "<br>";
|
|
11538
11546
|
html += "1. <b>URLs Used in Browsers</b><br><br>";
|
|
11539
11547
|
|
|
11540
11548
|
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>";
|
|
@@ -11543,7 +11551,6 @@ class SetDialog {
|
|
|
11543
11551
|
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>";
|
|
11544
11552
|
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>";
|
|
11545
11553
|
}
|
|
11546
|
-
html += "<br>";
|
|
11547
11554
|
|
|
11548
11555
|
html += "2. <b>Commands Used in Jupyter Noteboook</b><br><br>";
|
|
11549
11556
|
html += "Please copy the following commands into a cell in Jupyter Notebook to show the same result.<br><br>";
|
|
@@ -30739,7 +30746,7 @@ class ResidueLabels {
|
|
|
30739
30746
|
|
|
30740
30747
|
//Add labels for all residues containing the input "atoms". The labels are one-letter residue abbreviations.
|
|
30741
30748
|
//If "bSchematic" is true, the labels are in circles. Otherwise, they are in round-corner rectangles.
|
|
30742
|
-
addResidueLabels(atoms, bSchematic, alpha, bNumber) { let ic = this.icn3d, me = ic.icn3dui;
|
|
30749
|
+
addResidueLabels(atoms, bSchematic, alpha, bNumber, bRefnum) { let ic = this.icn3d, me = ic.icn3dui;
|
|
30743
30750
|
if(me.bNode) return;
|
|
30744
30751
|
|
|
30745
30752
|
let size = 18;
|
|
@@ -30779,6 +30786,15 @@ class ResidueLabels {
|
|
|
30779
30786
|
label.text += atom.resi;
|
|
30780
30787
|
//label.factor = 0.3;
|
|
30781
30788
|
}
|
|
30789
|
+
else if(bRefnum) {
|
|
30790
|
+
let resid = atom.structure + '_' + atom.chain + '_' + atom.resi;
|
|
30791
|
+
let refnum = '';
|
|
30792
|
+
if(ic.resid2refnum[resid]) {
|
|
30793
|
+
refnum = (ic.resid2refnum[resid].substr(0, 1) == ' ') ? '' : ic.resid2refnum[resid];
|
|
30794
|
+
}
|
|
30795
|
+
|
|
30796
|
+
label.text = refnum;
|
|
30797
|
+
}
|
|
30782
30798
|
label.size = size;
|
|
30783
30799
|
label.factor = 0.3;
|
|
30784
30800
|
|
|
@@ -30789,6 +30805,9 @@ class ResidueLabels {
|
|
|
30789
30805
|
if(bNumber) {
|
|
30790
30806
|
label.color = (ic.opts.background != 'black') ? ic.colorWhitebkgd : ic.colorBlackbkgd;
|
|
30791
30807
|
}
|
|
30808
|
+
else if(bRefnum) {
|
|
30809
|
+
label.color = '#00FFFF';
|
|
30810
|
+
}
|
|
30792
30811
|
else {
|
|
30793
30812
|
label.color = (atomColorStr === "CCCCCC" || atomColorStr === "C8C8C8") ? "#888888" : "#" + atomColorStr;
|
|
30794
30813
|
}
|
|
@@ -30994,7 +31013,7 @@ class Impostor {
|
|
|
30994
31013
|
|
|
30995
31014
|
setParametersForShader (opacity) { let ic = this.icn3d, me = ic.icn3dui;
|
|
30996
31015
|
let background = me.parasCls.backgroundColors[ic.opts.background.toLowerCase()];
|
|
30997
|
-
if(!background) background = me.parasCls.thr(0x000000);
|
|
31016
|
+
//if(!background) background = me.parasCls.thr(0x000000);
|
|
30998
31017
|
|
|
30999
31018
|
let near = 2.5*ic.maxD;
|
|
31000
31019
|
let far = 4*ic.maxD;
|
|
@@ -31999,6 +32018,8 @@ class Alternate {
|
|
|
31999
32018
|
// change the display atom when alternating
|
|
32000
32019
|
//Show structures one by one.
|
|
32001
32020
|
alternateStructures() { let ic = this.icn3d, me = ic.icn3dui;
|
|
32021
|
+
//ic.transformCls.zoominSelection();
|
|
32022
|
+
|
|
32002
32023
|
// default ic.ALTERNATE_STRUCTURE = -1
|
|
32003
32024
|
if(ic.ALTERNATE_STRUCTURE == -1) {
|
|
32004
32025
|
ic.viewSelectionAtoms = me.hashUtilsCls.cloneHash(ic.dAtoms);
|
|
@@ -35592,23 +35613,27 @@ class SetOption {
|
|
|
35592
35613
|
let html = '';
|
|
35593
35614
|
|
|
35594
35615
|
const name2color = {
|
|
35616
|
+
"<b>Protodomain 1</b>": "",
|
|
35595
35617
|
"A Strand": "0000FF",
|
|
35596
35618
|
"B Strand": "006400",
|
|
35597
35619
|
"C Strand": "FFFF00", //"F0E68C",
|
|
35598
35620
|
"C' Strand": "FFA500",
|
|
35621
|
+
"<br><b>Linker</b>": "",
|
|
35599
35622
|
"C'' Strand": "FF0000",
|
|
35623
|
+
"<br><b>Protodomain 2</b>": "",
|
|
35600
35624
|
"D Strand": "0000FF",
|
|
35601
35625
|
"E Strand": "006400",
|
|
35602
35626
|
"F Strand": "FFFF00", //"F0E68C",
|
|
35603
35627
|
"G Strand": "FFA500",
|
|
35628
|
+
"": "",
|
|
35604
35629
|
"Loop": "CCCCCC"
|
|
35605
35630
|
};
|
|
35606
35631
|
|
|
35607
|
-
html += "<div>";
|
|
35632
|
+
html += "<div>A protodomain is a supersecondary structure <br>that by its duplication, symmetry operations <br>can generate a structural domain.<br><br>";
|
|
35608
35633
|
for (let name in name2color) {
|
|
35609
35634
|
let color = name2color[name];
|
|
35610
35635
|
html += "<span>";
|
|
35611
|
-
html += "<div style='width: 10px; height: 10px; background-color:#" + color + "; border: 0px;display:inline-block;' ></div> ";
|
|
35636
|
+
if(color) html += "<div style='width: 10px; height: 10px; background-color:#" + color + "; border: 0px;display:inline-block;' ></div> ";
|
|
35612
35637
|
html += name;
|
|
35613
35638
|
html += "</span><br>";
|
|
35614
35639
|
}
|
|
@@ -37856,7 +37881,7 @@ class Domain3d {
|
|
|
37856
37881
|
this.nc_fact = 0.0; // size factor for internal contacts
|
|
37857
37882
|
|
|
37858
37883
|
// added by Jiyao
|
|
37859
|
-
this.min_contacts =
|
|
37884
|
+
this.min_contacts = 3; // minimum number of contacts to be considered as neighbors
|
|
37860
37885
|
|
|
37861
37886
|
//let this.elements[2*this.MAX_SSE]; // sets of this.elements to be split
|
|
37862
37887
|
this.elements = [];
|
|
@@ -38911,7 +38936,7 @@ class Domain3d {
|
|
|
38911
38936
|
}
|
|
38912
38937
|
}
|
|
38913
38938
|
}
|
|
38914
|
-
|
|
38939
|
+
|
|
38915
38940
|
return {subdomains: subdomains, substruct: substruct, pos2resi:pos2resi };
|
|
38916
38941
|
} // end c2b_NewSplitChain
|
|
38917
38942
|
|
|
@@ -56539,6 +56564,11 @@ class ApplyCommand {
|
|
|
56539
56564
|
|
|
56540
56565
|
ic.drawCls.draw();
|
|
56541
56566
|
}
|
|
56567
|
+
else if(command == 'add reference number labels') {
|
|
56568
|
+
ic.residueLabelsCls.addResidueLabels(ic.hAtoms, undefined, undefined, undefined, true);
|
|
56569
|
+
|
|
56570
|
+
ic.drawCls.draw();
|
|
56571
|
+
}
|
|
56542
56572
|
else if(command == 'add atom labels') {
|
|
56543
56573
|
ic.residueLabelsCls.addAtomLabels(ic.hAtoms);
|
|
56544
56574
|
|
|
@@ -64490,14 +64520,17 @@ class Diagram2d {
|
|
|
64490
64520
|
|
|
64491
64521
|
ic.hlUpdateCls.updateHlAll();
|
|
64492
64522
|
|
|
64523
|
+
ic.transformCls.zoominSelection();
|
|
64524
|
+
|
|
64493
64525
|
me.htmlCls.clickMenuCls.setLogCmd(select, true);
|
|
64494
64526
|
});
|
|
64495
64527
|
|
|
64496
64528
|
//$("#" + ic.pre + "dl_scatterplot .icn3d-interaction", "click", function(e) { let ic = this.icn3d, me = ic.icn3dui;
|
|
64497
|
-
$(document).on("click", "#" + ic.pre + "dl_scatterplot .icn3d-interaction", function(e) { thisClass.icn3d;
|
|
64529
|
+
$(document).on("click", "#" + ic.pre + "dl_scatterplot .icn3d-interaction", function(e) { let ic = thisClass.icn3d;
|
|
64498
64530
|
e.stopImmediatePropagation();
|
|
64499
64531
|
|
|
64500
64532
|
thisClass.clickInteraction(this);
|
|
64533
|
+
ic.transformCls.zoominSelection();
|
|
64501
64534
|
});
|
|
64502
64535
|
|
|
64503
64536
|
$(document).on("click", "#" + ic.pre + "dl_contactmap .icn3d-interaction", function(e) { thisClass.icn3d;
|
|
@@ -66536,7 +66569,6 @@ class SaveFile {
|
|
|
66536
66569
|
let bMulStruc =(struArray.length > 1) ? true : false;
|
|
66537
66570
|
|
|
66538
66571
|
let molNum = 1, prevStru = '', prevChain = '';
|
|
66539
|
-
//pdbStr += '\n';
|
|
66540
66572
|
|
|
66541
66573
|
let addedChainResiHash = {};
|
|
66542
66574
|
for(let i in atomHash) {
|
|
@@ -66556,20 +66588,24 @@ class SaveFile {
|
|
|
66556
66588
|
|
|
66557
66589
|
// add header
|
|
66558
66590
|
let mutantInfo = (chainResi2pdb) ? "Mutated chain_residue " + Object.keys(chainResi2pdb) + '; ' : '';
|
|
66559
|
-
if(!bNoHeader)
|
|
66591
|
+
if(!bNoHeader) {
|
|
66592
|
+
pdbStr += this.getPDBHeader(molNum - 1, stru2header, mutantInfo, pdbid);
|
|
66593
|
+
//pdbStr += '\n'; // separate from incomplete secondary structures
|
|
66594
|
+
}
|
|
66560
66595
|
|
|
66561
|
-
prevStru = atom.structure;
|
|
66596
|
+
//prevStru = atom.structure;
|
|
66562
66597
|
++molNum;
|
|
66563
66598
|
}
|
|
66564
|
-
else {
|
|
66565
|
-
if(atom.chain != prevChain) {
|
|
66599
|
+
//else {
|
|
66600
|
+
//if(atom.chain != prevChain) {
|
|
66601
|
+
if(atom.chain != prevChain && atom.structure == prevStru) {
|
|
66566
66602
|
// add a line "TER" to work with scap/profix to add missing atoms
|
|
66567
66603
|
if(prevChain) {
|
|
66568
66604
|
pdbStr += 'TER\n';
|
|
66569
66605
|
}
|
|
66570
|
-
prevChain = atom.chain;
|
|
66606
|
+
//prevChain = atom.chain;
|
|
66571
66607
|
}
|
|
66572
|
-
}
|
|
66608
|
+
//}
|
|
66573
66609
|
|
|
66574
66610
|
let chainResi = atom.chain + '_' + atom.resi;
|
|
66575
66611
|
if(chainResi2pdb && chainResi2pdb.hasOwnProperty(chainResi)) {
|
|
@@ -66734,6 +66770,9 @@ class SaveFile {
|
|
|
66734
66770
|
}
|
|
66735
66771
|
|
|
66736
66772
|
pdbStr += line + '\n';
|
|
66773
|
+
|
|
66774
|
+
prevStru = atom.structure;
|
|
66775
|
+
prevChain = atom.chain;
|
|
66737
66776
|
}
|
|
66738
66777
|
|
|
66739
66778
|
pdbStr += connStr;
|