icn3d 3.28.4 → 3.28.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/README.md +3 -3
- package/icn3d.js +80 -73
- package/icn3d.min.js +3 -3
- package/icn3d.module.js +80 -73
- package/package.json +1 -1
package/icn3d.module.js
CHANGED
|
@@ -6666,7 +6666,7 @@ class ClickMenu {
|
|
|
6666
6666
|
continue;
|
|
6667
6667
|
}
|
|
6668
6668
|
|
|
6669
|
-
if(id == '
|
|
6669
|
+
if(id == 'mn1_searchgrooup') {
|
|
6670
6670
|
html += "<td valign='top'>";
|
|
6671
6671
|
}
|
|
6672
6672
|
else if(id == 'mn2_definedsets') {
|
|
@@ -9428,12 +9428,12 @@ class SetMenu {
|
|
|
9428
9428
|
//html += this.getMenuText('mn1_fold', 'AlphaFold/ESM', undefined, undefined, 1);
|
|
9429
9429
|
html += this.getMenuText('mn1_fold', 'Predict by Seq.', undefined, undefined, 1);
|
|
9430
9430
|
html += "<ul>";
|
|
9431
|
-
html += this.getLink('mn1_esmfold', 'ESMFold', undefined, 2);
|
|
9432
|
-
html += this.
|
|
9431
|
+
//html += this.getLink('mn1_esmfold', 'ESMFold', undefined, 2);
|
|
9432
|
+
html += this.getMenuUrl('mn1_esmfold_link', "https://colab.research.google.com/github/sokrypton/ColabFold/blob/main/ESMFold.ipynb", "ESMFold via ColabFold" + me.htmlCls.wifiStr, undefined, 2);
|
|
9433
|
+
html += this.getLink('mn1_alphafold', 'AlphaFold2 via ColabFold' + me.htmlCls.wifiStr, undefined, 2);
|
|
9433
9434
|
html += "</ul>";
|
|
9434
9435
|
|
|
9435
9436
|
|
|
9436
|
-
|
|
9437
9437
|
html += this.getMenuText('mn1_alignwrap', 'Align', undefined, 1, 1);
|
|
9438
9438
|
html += "<ul>";
|
|
9439
9439
|
|
|
@@ -10672,7 +10672,7 @@ class SetMenu {
|
|
|
10672
10672
|
html += this.getMenuUrl('abouticn3d', me.htmlCls.baseUrl + "icn3d/icn3d.html#about", "About iCn3D<span style='font-size:0.9em'> " + me.REVISION + "</span>", 1, 1);
|
|
10673
10673
|
|
|
10674
10674
|
html += this.getMenuUrl('gallery', me.htmlCls.baseUrl + "icn3d/icn3d.html#gallery", "Live Gallery " + me.htmlCls.wifiStr, 1, 1);
|
|
10675
|
-
html += this.getMenuUrl('video', me.htmlCls.baseUrl + "icn3d/icn3d.html#videos", "
|
|
10675
|
+
html += this.getMenuUrl('video', me.htmlCls.baseUrl + "icn3d/icn3d.html#videos", "Videos & Tutorials", 1, 1);
|
|
10676
10676
|
|
|
10677
10677
|
html += this.getMenuText('mn6_faq', 'FAQ', undefined, 1, 1);
|
|
10678
10678
|
|
|
@@ -11489,7 +11489,7 @@ class SetDialog {
|
|
|
11489
11489
|
html += 'Note: <b>VAST</b> identifies 3D domains (substructures) within each protein structure in the Molecular Modeling Database (MMDB), and then finds other protein structures that have one or more similar 3D domains, using purely geometric criteria. You have two ways to do a VAST search.<br><br>';
|
|
11490
11490
|
|
|
11491
11491
|
html += '<b>Option 1</b>, search with your selection (all residues are selected by default) in the loaded structures:<br>';
|
|
11492
|
-
html += '<form method=post enctype=multipart/form-data action="https://www.ncbi.nlm.nih.gov/Structure/vast/VSMmdb.cgi" id="' + me.pre + 'newvs2" name="newvs2" target="_blank">';
|
|
11492
|
+
html += '<form data-ncbi-sg-search="true" method=post enctype=multipart/form-data action="https://www.ncbi.nlm.nih.gov/Structure/vast/VSMmdb.cgi" id="' + me.pre + 'newvs2" name="newvs2" target="_blank">';
|
|
11493
11493
|
html += '<input type=hidden id="' + me.pre + 'pdbstr" name="pdbstr">';
|
|
11494
11494
|
html += "Searching against: <input type='radio' name='dataset' value='Non-redundant subset' checked> Medium-redundancy Subset of PDB <a href='https://www.ncbi.nlm.nih.gov/Structure/VAST/vasthelp.html#VASTNR' title='Medium-redundancy Subset' target='_blank'>?</a> <input type='radio' name='dataset' value='All'>All of PDB <br>";
|
|
11495
11495
|
// the submit value has to be "Submit" in order to make the backend cgi works
|
|
@@ -11503,12 +11503,12 @@ class SetDialog {
|
|
|
11503
11503
|
html += me.htmlCls.buttonStr + "reload_vast'>VAST</button><br><br>";
|
|
11504
11504
|
|
|
11505
11505
|
html += '<b>Option 3</b>, search with a PDB file:<br>';
|
|
11506
|
-
html += '<form method=post enctype=multipart/form-data action="https://www.ncbi.nlm.nih.gov/Structure/vast/VSMmdb.cgi" id="' + me.pre + 'newvs" name="newvs" target="_blank">';
|
|
11506
|
+
html += '<form data-ncbi-sg-search="true" method=post enctype=multipart/form-data action="https://www.ncbi.nlm.nih.gov/Structure/vast/VSMmdb.cgi" id="' + me.pre + 'newvs" name="newvs" target="_blank">';
|
|
11507
11507
|
html += "PDB File: " + me.htmlCls.inputFileStr + " name='pdbfile' size=8><br>";
|
|
11508
11508
|
html += "Searching against: <input type='radio' name='dataset' value='Non-redundant subset' checked> Medium-redundancy Subset of PDB <a href='https://www.ncbi.nlm.nih.gov/Structure/VAST/vasthelp.html#VASTNR' title='Medium-redundancy Subset' target='_blank'>?</a> <input type='radio' name='dataset' value='All'>All of PDB <br>";
|
|
11509
11509
|
// the submit value has to be "Submit" in order to make the backend cgi works
|
|
11510
11510
|
//html += '<input type="submit" name="' + me.pre + 'cmdVSMmdb" value="VAST Search"></input>';
|
|
11511
|
-
html += '<input type="submit" name="cmdVSMmdb" value="Submit"></input>';
|
|
11511
|
+
html += '<input type="submit" id="' + me.pre + 'cmdVSMmdb" name="cmdVSMmdb" value="Submit"></input>';
|
|
11512
11512
|
html += "</form><br>";
|
|
11513
11513
|
|
|
11514
11514
|
html += "</div>";
|
|
@@ -11744,7 +11744,7 @@ class SetDialog {
|
|
|
11744
11744
|
html += me.htmlCls.divStr + "dl_mmdbid' class='" + dialogClass + "' style='max-width:500px'>";
|
|
11745
11745
|
html += this.addNotebookTitle('dl_mmdbid', 'Please input an MMDB ID');
|
|
11746
11746
|
html += "MMDB or PDB ID: " + me.htmlCls.inputTextStr + "id='" + me.pre + "mmdbid' value='1TUP' size=8> <br><br>";
|
|
11747
|
-
html += me.htmlCls.buttonStr + "
|
|
11747
|
+
html += me.htmlCls.buttonStr + "reload_mmdb'>Load Biological Unit</button>" + me.htmlCls.buttonStr + "reload_mmdb_asym' style='margin-left:30px'>Load Asymmetric Unit (All Chains)</button><br/><br/><br/>";
|
|
11748
11748
|
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="'
|
|
11749
11749
|
+ me.pre + 'asu_bu_expand" class="ui-icon ui-icon-plus icn3d-expand icn3d-link" style="width:15px;" title="Expand"></span><span id="'
|
|
11750
11750
|
+ me.pre + 'asu_bu_shrink" class="ui-icon ui-icon-minus icn3d-shrink icn3d-link" style="display:none; width:15px;" title="Shrink"></span></div>';
|
|
@@ -15704,7 +15704,7 @@ class SetHtml {
|
|
|
15704
15704
|
if(selType) me.htmlCls.allMenusSel[id] = selType;
|
|
15705
15705
|
if(bSimpleMenu) me.htmlCls.simpleMenus[id] = 1;
|
|
15706
15706
|
|
|
15707
|
-
return "<li><span id='" + me.pre + id + "' class='icn3d-link'>" + text + "</span></li>";
|
|
15707
|
+
return "<li><span data-pinger id='" + me.pre + id + "' class='icn3d-link'>" + text + "</span></li>";
|
|
15708
15708
|
}
|
|
15709
15709
|
|
|
15710
15710
|
// a group of menus
|
|
@@ -15716,7 +15716,7 @@ class SetHtml {
|
|
|
15716
15716
|
let styleStr = (classname == 'icn3d-menupd') ? " style='padding-left:1.5em!important;'" : "";
|
|
15717
15717
|
|
|
15718
15718
|
// no ending "</li>"" since this is usually the start of a group of menus
|
|
15719
|
-
return "<li><span id='" + me.pre + id + "'" + styleStr + ">" + text + "</span>";
|
|
15719
|
+
return "<li><span data-pinger id='" + me.pre + id + "'" + styleStr + ">" + text + "</span>";
|
|
15720
15720
|
}
|
|
15721
15721
|
|
|
15722
15722
|
getMenuUrl(id, url, text, bSimpleMenu, selType) { let me = this.icn3dui; me.icn3d;
|
|
@@ -15737,7 +15737,7 @@ class SetHtml {
|
|
|
15737
15737
|
if(bSimpleMenu) me.htmlCls.simpleMenus[id] = 1;
|
|
15738
15738
|
|
|
15739
15739
|
let hideStr = (bHide) ? ' style="display:none"' : '';
|
|
15740
|
-
return "<li id='" + me.pre + wrapper + "'" + hideStr + "><span id='" + me.pre + id + "' class='icn3d-link'>" + text + "</span></li>";
|
|
15740
|
+
return "<li id='" + me.pre + wrapper + "'" + hideStr + "><span data-pinger id='" + me.pre + id + "' class='icn3d-link'>" + text + "</span></li>";
|
|
15741
15741
|
}
|
|
15742
15742
|
|
|
15743
15743
|
getLinkWrapper2(id, text, wrapper, bSimpleMenu, selType) { let me = this.icn3dui; me.icn3d;
|
|
@@ -15745,7 +15745,7 @@ class SetHtml {
|
|
|
15745
15745
|
if(selType) me.htmlCls.allMenusSel[id] = selType;
|
|
15746
15746
|
if(bSimpleMenu) me.htmlCls.simpleMenus[id] = 1;
|
|
15747
15747
|
|
|
15748
|
-
return "<li id='" + me.pre + wrapper + "'><span id='" + me.pre + id + "' class='icn3d-link'>" + text + "</span>";
|
|
15748
|
+
return "<li id='" + me.pre + wrapper + "'><span data-pinger id='" + me.pre + id + "' class='icn3d-link'>" + text + "</span>";
|
|
15749
15749
|
}
|
|
15750
15750
|
|
|
15751
15751
|
getRadio(radioid, id, text, bChecked, bSimpleMenu, selType) { let me = this.icn3dui; me.icn3d;
|
|
@@ -15756,8 +15756,7 @@ class SetHtml {
|
|
|
15756
15756
|
let checkedStr =(bChecked) ? ' checked' : '';
|
|
15757
15757
|
|
|
15758
15758
|
//https://stackoverflow.com/questions/17541614/use-images-instead-of-radio-buttons/17541916
|
|
15759
|
-
|
|
15760
|
-
return "<li><label id='" + me.pre + id + "' class='icn3d-rad'>" + me.htmlCls.inputRadioStr + "name='" + me.pre + radioid + "' " + "class='" + me.pre + radioid + "' " + "v='" + text + "'" + checkedStr + "><span class='ui-icon ui-icon-blank'></span> <span class='icn3d-rad-text'>" + text + "</span></label></li>";
|
|
15759
|
+
return "<li><label data-pinger id='" + me.pre + id + "' class='icn3d-rad'>" + me.htmlCls.inputRadioStr + "name='" + me.pre + radioid + "' " + "class='" + me.pre + radioid + "' " + "v='" + text + "'" + checkedStr + "><span class='ui-icon ui-icon-blank'></span> <span class='icn3d-rad-text'>" + text + "</span></label></li>";
|
|
15761
15760
|
}
|
|
15762
15761
|
|
|
15763
15762
|
getRadioColor(radioid, id, text, color, bChecked, bSimpleMenu, selType) { let me = this.icn3dui; me.icn3d;
|
|
@@ -15768,8 +15767,7 @@ class SetHtml {
|
|
|
15768
15767
|
let checkedStr =(bChecked) ? ' checked' : '';
|
|
15769
15768
|
|
|
15770
15769
|
//https://stackoverflow.com/questions/17541614/use-images-instead-of-radio-buttons/17541916
|
|
15771
|
-
|
|
15772
|
-
return "<li><label id='" + me.pre + id + "' class='icn3d-rad'>" + me.htmlCls.inputRadioStr + "name='" + me.pre + radioid + "'" + checkedStr + "><span class='ui-icon ui-icon-blank'></span> <span class='icn3d-color-rad-text' color='" + color + "'><span style='background-color:#" + color + "'>" + me.htmlCls.space3 + "</span> " + text + "</span></label></li>";
|
|
15770
|
+
return "<li><label data-pinger id='" + me.pre + id + "' class='icn3d-rad'>" + me.htmlCls.inputRadioStr + "name='" + me.pre + radioid + "'" + checkedStr + "><span class='ui-icon ui-icon-blank'></span> <span class='icn3d-color-rad-text' color='" + color + "'><span style='background-color:#" + color + "'>" + me.htmlCls.space3 + "</span> " + text + "</span></label></li>";
|
|
15773
15771
|
}
|
|
15774
15772
|
|
|
15775
15773
|
setAdvanced(index) { let me = this.icn3dui; me.icn3d;
|
|
@@ -36575,7 +36573,7 @@ class SetOption {
|
|
|
36575
36573
|
me.htmlCls.dialogCls.openDlg('dl_legend', 'Color Legend');
|
|
36576
36574
|
}
|
|
36577
36575
|
else {
|
|
36578
|
-
$("#" + me.pre + "dl_legend").dialog("close");
|
|
36576
|
+
if($('#' + me.pre + 'dl_legend').hasClass('ui-dialog-content') && $('#' + me.pre + 'dl_legend').dialog( 'isOpen' )) $("#" + me.pre + "dl_legend").dialog("close");
|
|
36579
36577
|
}
|
|
36580
36578
|
|
|
36581
36579
|
// if(bClose) {
|
|
@@ -36823,7 +36821,7 @@ class AnnoCddSite {
|
|
|
36823
36821
|
//if(me.cfg.afid) {
|
|
36824
36822
|
|
|
36825
36823
|
// use precalculated CDD annotation if
|
|
36826
|
-
if( (Object.keys(ic.structures).length == 1 && (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))
|
|
36824
|
+
if( (Object.keys(ic.structures).length == 1 && !me.cfg.afid && (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))
|
|
36827
36825
|
|| (Object.keys(ic.structures).length == 2 && me.cfg.align) ) {
|
|
36828
36826
|
let data = {};
|
|
36829
36827
|
try {
|
|
@@ -40660,7 +40658,7 @@ class AddTrack {
|
|
|
40660
40658
|
if(exonArray) {
|
|
40661
40659
|
for(let j = 0, jl = exonArray.length; j < jl; ++j) {
|
|
40662
40660
|
let start = exonArray[j].resStart, end = exonArray[j].resEnd;
|
|
40663
|
-
let genStart = exonArray[j].genomeRange.split('-')[0];
|
|
40661
|
+
let genStart = parseInt(exonArray[j].genomeRange.split('-')[0]);
|
|
40664
40662
|
|
|
40665
40663
|
for(let k = 0, kl = end - start + 1; k < kl; ++k) {
|
|
40666
40664
|
let colorStr = this.getExonColor(start, end, cnt);
|
|
@@ -42925,7 +42923,7 @@ class ShowAnno {
|
|
|
42925
42923
|
url = "https://rest.uniprot.org/uniprotkb/search?format=json&fields=xref_geneid,gene_names&query=" + structure;
|
|
42926
42924
|
let geneData = await me.getAjaxPromise(url, 'json');
|
|
42927
42925
|
let geneId = (geneData.results[0] && geneData.results[0].uniProtKBCrossReferences && geneData.results[0].uniProtKBCrossReferences[0]) ? geneData.results[0].uniProtKBCrossReferences[0].id : undefined;
|
|
42928
|
-
let geneSymbol = (geneData.results[0] && geneData.results[0].genes && geneData.results[0].genes[0] && geneData.results[0].genes[0].geneName) ? geneData.results[0].genes[0].geneName.value :
|
|
42926
|
+
let geneSymbol = (geneData.results[0] && geneData.results[0].genes && geneData.results[0].genes[0] && geneData.results[0].genes[0].geneName) ? geneData.results[0].genes[0].geneName.value : 'ID ' + geneId;
|
|
42929
42927
|
ic.chainsGene[chnid] = {geneId: geneId, geneSymbol: geneSymbol};
|
|
42930
42928
|
}
|
|
42931
42929
|
}
|
|
@@ -51287,7 +51285,7 @@ class MmdbParser {
|
|
|
51287
51285
|
if(Object.keys(data.atoms).length == 0) { // for large structures such as 3J3Q
|
|
51288
51286
|
// use mmtfid
|
|
51289
51287
|
let pdbid = data.pdbId;
|
|
51290
|
-
ic.mmtfParserCls.downloadMmtf(pdbid);
|
|
51288
|
+
await ic.mmtfParserCls.downloadMmtf(pdbid);
|
|
51291
51289
|
|
|
51292
51290
|
return;
|
|
51293
51291
|
}
|
|
@@ -51679,7 +51677,7 @@ class MmdbParser {
|
|
|
51679
51677
|
url = me.htmlCls.baseUrl + "mmdb/mmdb_strview.cgi?v=2&program=icn3d&b=1&s=1&ft=1&bu=" + me.cfg.bu + "&simple=1&uid=" + mmdbid;
|
|
51680
51678
|
}
|
|
51681
51679
|
|
|
51682
|
-
// use asymmetric unit for BLAST search, e.g., https://www.ncbi.nlm.nih.gov/Structure/icn3d
|
|
51680
|
+
// use asymmetric unit for BLAST search, e.g., https://www.ncbi.nlm.nih.gov/Structure/icn3d/?from=blast&blast_rep_id=5XZC_B&query_id=1TUP_A&command=view+annotations;set+annotation+cdd;set+annotation+site;set+view+detailed+view;select+chain+5XZC_B;show+selection&log$=align&blast_rank=1&RID=EPUCYNVV014&bu=0
|
|
51683
51681
|
if(me.cfg.blast_rep_id !== undefined) url += '&bu=0';
|
|
51684
51682
|
|
|
51685
51683
|
//ic.bCid = undefined;
|
|
@@ -51711,57 +51709,31 @@ class MmtfParser {
|
|
|
51711
51709
|
|
|
51712
51710
|
//MMTF is a new binary data format besides the previous PDB and mmCIF formats for 3D structures.
|
|
51713
51711
|
//The JavaScript Methods at http://mmtf.rcsb.org/ was used to load and parse the data.
|
|
51714
|
-
downloadMmtf(mmtfid) { let ic = this.icn3d
|
|
51712
|
+
async downloadMmtf(mmtfid) { let ic = this.icn3d, me = ic.icn3dui;
|
|
51715
51713
|
ic.ParserUtilsCls.setYourNote(mmtfid.toUpperCase() + '(MMTF) in iCn3D');
|
|
51716
51714
|
//ic.bCid = undefined;
|
|
51717
51715
|
|
|
51718
|
-
|
|
51719
|
-
|
|
51720
|
-
|
|
51721
|
-
|
|
51722
|
-
|
|
51723
|
-
|
|
51724
|
-
|
|
51725
|
-
alert('This PDB structure is not found at RCSB...');
|
|
51726
|
-
return;
|
|
51727
|
-
}
|
|
51716
|
+
let mmtfData = await me.getMmtfReducedPromise(mmtfid);
|
|
51717
|
+
if(mmtfData.numAtoms * 10 > ic.maxatomcnt) {
|
|
51718
|
+
let bFull = false;
|
|
51719
|
+
if(Object.keys(mmtfData).length == 0) {
|
|
51720
|
+
alert('This PDB structure is not found at RCSB...');
|
|
51721
|
+
return;
|
|
51722
|
+
}
|
|
51728
51723
|
|
|
51729
|
-
|
|
51730
|
-
|
|
51731
|
-
|
|
51732
|
-
|
|
51733
|
-
|
|
51734
|
-
|
|
51735
|
-
|
|
51736
|
-
|
|
51737
|
-
|
|
51738
|
-
let bFull = true;
|
|
51739
|
-
if(Object.keys(mmtfData2).length == 0) {
|
|
51740
|
-
alert('This PDB structure is not found at RCSB...');
|
|
51741
|
-
return;
|
|
51742
|
-
}
|
|
51743
|
-
// ic.deferredOpm = $.Deferred(function() {
|
|
51744
|
-
// ic.opmParserCls.loadOpmData(mmtfData2, mmtfid, bFull, 'mmtf');
|
|
51745
|
-
// });
|
|
51746
|
-
|
|
51747
|
-
// return ic.deferredOpm.promise();
|
|
51748
|
-
|
|
51749
|
-
await ic.opmParserCls.loadOpmData(mmtfData2, mmtfid, bFull, 'mmtf');
|
|
51750
|
-
},
|
|
51751
|
-
// onError callback
|
|
51752
|
-
function( error ){
|
|
51753
|
-
//alert('This PDB structure is not found at RCSB...');
|
|
51754
|
-
//console.error( error )
|
|
51755
|
-
}
|
|
51756
|
-
);
|
|
51757
|
-
}
|
|
51758
|
-
},
|
|
51759
|
-
// onError callback
|
|
51760
|
-
function( error ){
|
|
51761
|
-
//alert('This PDB structure is not found at RCSB...');
|
|
51762
|
-
//console.error( error )
|
|
51724
|
+
await ic.opmParserCls.loadOpmData(mmtfData, mmtfid, bFull, 'mmtf');
|
|
51725
|
+
}
|
|
51726
|
+
else {
|
|
51727
|
+
let mmtfData2 = await me.getMmtfPromise(mmtfid);
|
|
51728
|
+
|
|
51729
|
+
let bFull = true;
|
|
51730
|
+
if(Object.keys(mmtfData2).length == 0) {
|
|
51731
|
+
alert('This PDB structure is not found at RCSB...');
|
|
51732
|
+
return;
|
|
51763
51733
|
}
|
|
51764
|
-
|
|
51734
|
+
|
|
51735
|
+
await ic.opmParserCls.loadOpmData(mmtfData2, mmtfid, bFull, 'mmtf');
|
|
51736
|
+
}
|
|
51765
51737
|
}
|
|
51766
51738
|
|
|
51767
51739
|
async parseMmtfData(mmtfData, mmtfid, bFull) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -59646,7 +59618,6 @@ class ApplyCommand {
|
|
|
59646
59618
|
let command = commandOri.toLowerCase();
|
|
59647
59619
|
|
|
59648
59620
|
// exact match =============
|
|
59649
|
-
|
|
59650
59621
|
//var file_pref =(ic.inputid) ? ic.inputid : "custom";
|
|
59651
59622
|
if(command == 'share link') {
|
|
59652
59623
|
await ic.shareLinkCls.shareLink();
|
|
@@ -62560,6 +62531,7 @@ class LoadScript {
|
|
|
62560
62531
|
ic.inputid = id;
|
|
62561
62532
|
if(command.indexOf('load mmtf') !== -1) {
|
|
62562
62533
|
me.cfg.mmtfid = id;
|
|
62534
|
+
|
|
62563
62535
|
await ic.mmtfParserCls.downloadMmtf(id);
|
|
62564
62536
|
}
|
|
62565
62537
|
else if(command.indexOf('load pdb') !== -1) {
|
|
@@ -70306,7 +70278,8 @@ class ShareLink {
|
|
|
70306
70278
|
let url = this.shareLinkUrl();
|
|
70307
70279
|
|
|
70308
70280
|
let bTooLong =(url.length > 4000 || url.indexOf('http') !== 0) ? true : false;
|
|
70309
|
-
if(bPngHtml) url += "&random=" + parseInt(Math.random() * 1000); // generate a new shorten URL and thus image name everytime
|
|
70281
|
+
//if(bPngHtml) url += "&random=" + parseInt(Math.random() * 1000); // generate a new shorten URL and thus image name everytime
|
|
70282
|
+
|
|
70310
70283
|
//var inputid =(ic.inputid) ? ic.inputid : "custom";
|
|
70311
70284
|
let inputid = Object.keys(ic.structures).join('_');
|
|
70312
70285
|
if(inputid == ic.defaultPdbId) {
|
|
@@ -70414,7 +70387,7 @@ class ShareLink {
|
|
|
70414
70387
|
}
|
|
70415
70388
|
|
|
70416
70389
|
shareLinkUrl(bAllCommands, bOutputCmd) { let ic = this.icn3d, me = ic.icn3dui;
|
|
70417
|
-
let url = me.htmlCls.baseUrl + "icn3d
|
|
70390
|
+
let url = me.htmlCls.baseUrl + "icn3d/?";
|
|
70418
70391
|
let outputCmd = '';
|
|
70419
70392
|
if(me.cfg.bSidebyside) url = me.htmlCls.baseUrl + "icn3d/full2.html?";
|
|
70420
70393
|
|
|
@@ -73479,7 +73452,7 @@ class iCn3DUI {
|
|
|
73479
73452
|
//even when multiple iCn3D viewers are shown together.
|
|
73480
73453
|
this.pre = this.cfg.divid + "_";
|
|
73481
73454
|
|
|
73482
|
-
this.REVISION = '3.28.
|
|
73455
|
+
this.REVISION = '3.28.1';
|
|
73483
73456
|
|
|
73484
73457
|
// In nodejs, iCn3D defines "window = {navigator: {}}"
|
|
73485
73458
|
this.bNode = (Object.keys(window).length < 2) ? true : false;
|
|
@@ -73966,6 +73939,40 @@ iCn3DUI.prototype.setIcn3d = function() { let me = this;
|
|
|
73966
73939
|
me.setDialogAjax();
|
|
73967
73940
|
};
|
|
73968
73941
|
|
|
73942
|
+
iCn3DUI.prototype.getMmtfPromise = function(mmtfid) { return new Promise(function(resolve, reject) {
|
|
73943
|
+
MMTF.fetch(
|
|
73944
|
+
mmtfid,
|
|
73945
|
+
// onLoad callback
|
|
73946
|
+
async function( mmtfData ){
|
|
73947
|
+
resolve(mmtfData);
|
|
73948
|
+
},
|
|
73949
|
+
// onError callback
|
|
73950
|
+
function( error ){
|
|
73951
|
+
//alert('This PDB structure is not found at RCSB...');
|
|
73952
|
+
//console.error( error )
|
|
73953
|
+
reject('error');
|
|
73954
|
+
}
|
|
73955
|
+
);
|
|
73956
|
+
});
|
|
73957
|
+
};
|
|
73958
|
+
|
|
73959
|
+
iCn3DUI.prototype.getMmtfReducedPromise = function(mmtfid) { return new Promise(function(resolve, reject) {
|
|
73960
|
+
MMTF.fetchReduced(
|
|
73961
|
+
mmtfid,
|
|
73962
|
+
// onLoad callback
|
|
73963
|
+
async function( mmtfData ){
|
|
73964
|
+
resolve(mmtfData);
|
|
73965
|
+
},
|
|
73966
|
+
// onError callback
|
|
73967
|
+
function( error ){
|
|
73968
|
+
//alert('This PDB structure is not found at RCSB...');
|
|
73969
|
+
//console.error( error )
|
|
73970
|
+
reject('error');
|
|
73971
|
+
}
|
|
73972
|
+
);
|
|
73973
|
+
});
|
|
73974
|
+
};
|
|
73975
|
+
|
|
73969
73976
|
iCn3DUI.prototype.getAjaxPromise = function(url, dataType, beforeSend, alertMess, logMess, complete, bNode) { let me = this;
|
|
73970
73977
|
// if(!bNode || dataType != 'json') {
|
|
73971
73978
|
return new Promise(function(resolve, reject) {
|