icn3d 3.28.5 → 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 +79 -72
- package/icn3d.min.js +3 -3
- package/icn3d.module.js +79 -72
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ Usage
|
|
|
52
52
|
import * as icn3d from 'icn3d/module'
|
|
53
53
|
import "../node_modules/icn3d/css/icn3d.css"
|
|
54
54
|
|
|
55
|
-
function Icn3dViewer() {
|
|
55
|
+
async function Icn3dViewer() {
|
|
56
56
|
useEffect(() => {
|
|
57
57
|
const cfg = {
|
|
58
58
|
divid: 'viewer',
|
|
@@ -60,7 +60,7 @@ Usage
|
|
|
60
60
|
};
|
|
61
61
|
cfg['mmdbid'] = '1tup';
|
|
62
62
|
const icn3dui = new icn3d.iCn3DUI(cfg);
|
|
63
|
-
icn3dui.show3DStructure();
|
|
63
|
+
await icn3dui.show3DStructure();
|
|
64
64
|
}, []);
|
|
65
65
|
return <div id="viewer"></div>;
|
|
66
66
|
}
|
|
@@ -73,5 +73,5 @@ Usage
|
|
|
73
73
|
|
|
74
74
|
var cfg = {'mmdbid': '1tup'};
|
|
75
75
|
var icn3dui = new icn3d.iCn3DUI(cfg);
|
|
76
|
-
icn3dui.show3DStructure();
|
|
76
|
+
await icn3dui.show3DStructure();
|
|
77
77
|
|
package/icn3d.js
CHANGED
|
@@ -5765,7 +5765,7 @@ class ClickMenu {
|
|
|
5765
5765
|
continue;
|
|
5766
5766
|
}
|
|
5767
5767
|
|
|
5768
|
-
if(id == '
|
|
5768
|
+
if(id == 'mn1_searchgrooup') {
|
|
5769
5769
|
html += "<td valign='top'>";
|
|
5770
5770
|
}
|
|
5771
5771
|
else if(id == 'mn2_definedsets') {
|
|
@@ -8527,12 +8527,12 @@ class SetMenu {
|
|
|
8527
8527
|
//html += this.getMenuText('mn1_fold', 'AlphaFold/ESM', undefined, undefined, 1);
|
|
8528
8528
|
html += this.getMenuText('mn1_fold', 'Predict by Seq.', undefined, undefined, 1);
|
|
8529
8529
|
html += "<ul>";
|
|
8530
|
-
html += this.getLink('mn1_esmfold', 'ESMFold', undefined, 2);
|
|
8531
|
-
html += this.
|
|
8530
|
+
//html += this.getLink('mn1_esmfold', 'ESMFold', undefined, 2);
|
|
8531
|
+
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);
|
|
8532
|
+
html += this.getLink('mn1_alphafold', 'AlphaFold2 via ColabFold' + me.htmlCls.wifiStr, undefined, 2);
|
|
8532
8533
|
html += "</ul>";
|
|
8533
8534
|
|
|
8534
8535
|
|
|
8535
|
-
|
|
8536
8536
|
html += this.getMenuText('mn1_alignwrap', 'Align', undefined, 1, 1);
|
|
8537
8537
|
html += "<ul>";
|
|
8538
8538
|
|
|
@@ -9771,7 +9771,7 @@ class SetMenu {
|
|
|
9771
9771
|
html += this.getMenuUrl('abouticn3d', me.htmlCls.baseUrl + "icn3d/icn3d.html#about", "About iCn3D<span style='font-size:0.9em'> " + me.REVISION + "</span>", 1, 1);
|
|
9772
9772
|
|
|
9773
9773
|
html += this.getMenuUrl('gallery', me.htmlCls.baseUrl + "icn3d/icn3d.html#gallery", "Live Gallery " + me.htmlCls.wifiStr, 1, 1);
|
|
9774
|
-
html += this.getMenuUrl('video', me.htmlCls.baseUrl + "icn3d/icn3d.html#videos", "
|
|
9774
|
+
html += this.getMenuUrl('video', me.htmlCls.baseUrl + "icn3d/icn3d.html#videos", "Videos & Tutorials", 1, 1);
|
|
9775
9775
|
|
|
9776
9776
|
html += this.getMenuText('mn6_faq', 'FAQ', undefined, 1, 1);
|
|
9777
9777
|
|
|
@@ -10588,7 +10588,7 @@ class SetDialog {
|
|
|
10588
10588
|
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>';
|
|
10589
10589
|
|
|
10590
10590
|
html += '<b>Option 1</b>, search with your selection (all residues are selected by default) in the loaded structures:<br>';
|
|
10591
|
-
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">';
|
|
10591
|
+
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">';
|
|
10592
10592
|
html += '<input type=hidden id="' + me.pre + 'pdbstr" name="pdbstr">';
|
|
10593
10593
|
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>";
|
|
10594
10594
|
// the submit value has to be "Submit" in order to make the backend cgi works
|
|
@@ -10602,12 +10602,12 @@ class SetDialog {
|
|
|
10602
10602
|
html += me.htmlCls.buttonStr + "reload_vast'>VAST</button><br><br>";
|
|
10603
10603
|
|
|
10604
10604
|
html += '<b>Option 3</b>, search with a PDB file:<br>';
|
|
10605
|
-
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">';
|
|
10605
|
+
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">';
|
|
10606
10606
|
html += "PDB File: " + me.htmlCls.inputFileStr + " name='pdbfile' size=8><br>";
|
|
10607
10607
|
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>";
|
|
10608
10608
|
// the submit value has to be "Submit" in order to make the backend cgi works
|
|
10609
10609
|
//html += '<input type="submit" name="' + me.pre + 'cmdVSMmdb" value="VAST Search"></input>';
|
|
10610
|
-
html += '<input type="submit" name="cmdVSMmdb" value="Submit"></input>';
|
|
10610
|
+
html += '<input type="submit" id="' + me.pre + 'cmdVSMmdb" name="cmdVSMmdb" value="Submit"></input>';
|
|
10611
10611
|
html += "</form><br>";
|
|
10612
10612
|
|
|
10613
10613
|
html += "</div>";
|
|
@@ -10843,7 +10843,7 @@ class SetDialog {
|
|
|
10843
10843
|
html += me.htmlCls.divStr + "dl_mmdbid' class='" + dialogClass + "' style='max-width:500px'>";
|
|
10844
10844
|
html += this.addNotebookTitle('dl_mmdbid', 'Please input an MMDB ID');
|
|
10845
10845
|
html += "MMDB or PDB ID: " + me.htmlCls.inputTextStr + "id='" + me.pre + "mmdbid' value='1TUP' size=8> <br><br>";
|
|
10846
|
-
html += me.htmlCls.buttonStr + "
|
|
10846
|
+
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/>";
|
|
10847
10847
|
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="'
|
|
10848
10848
|
+ me.pre + 'asu_bu_expand" class="ui-icon ui-icon-plus icn3d-expand icn3d-link" style="width:15px;" title="Expand"></span><span id="'
|
|
10849
10849
|
+ me.pre + 'asu_bu_shrink" class="ui-icon ui-icon-minus icn3d-shrink icn3d-link" style="display:none; width:15px;" title="Shrink"></span></div>';
|
|
@@ -14803,7 +14803,7 @@ class SetHtml {
|
|
|
14803
14803
|
if(selType) me.htmlCls.allMenusSel[id] = selType;
|
|
14804
14804
|
if(bSimpleMenu) me.htmlCls.simpleMenus[id] = 1;
|
|
14805
14805
|
|
|
14806
|
-
return "<li><span id='" + me.pre + id + "' class='icn3d-link'>" + text + "</span></li>";
|
|
14806
|
+
return "<li><span data-pinger id='" + me.pre + id + "' class='icn3d-link'>" + text + "</span></li>";
|
|
14807
14807
|
}
|
|
14808
14808
|
|
|
14809
14809
|
// a group of menus
|
|
@@ -14815,7 +14815,7 @@ class SetHtml {
|
|
|
14815
14815
|
let styleStr = (classname == 'icn3d-menupd') ? " style='padding-left:1.5em!important;'" : "";
|
|
14816
14816
|
|
|
14817
14817
|
// no ending "</li>"" since this is usually the start of a group of menus
|
|
14818
|
-
return "<li><span id='" + me.pre + id + "'" + styleStr + ">" + text + "</span>";
|
|
14818
|
+
return "<li><span data-pinger id='" + me.pre + id + "'" + styleStr + ">" + text + "</span>";
|
|
14819
14819
|
}
|
|
14820
14820
|
|
|
14821
14821
|
getMenuUrl(id, url, text, bSimpleMenu, selType) { let me = this.icn3dui; me.icn3d;
|
|
@@ -14836,7 +14836,7 @@ class SetHtml {
|
|
|
14836
14836
|
if(bSimpleMenu) me.htmlCls.simpleMenus[id] = 1;
|
|
14837
14837
|
|
|
14838
14838
|
let hideStr = (bHide) ? ' style="display:none"' : '';
|
|
14839
|
-
return "<li id='" + me.pre + wrapper + "'" + hideStr + "><span id='" + me.pre + id + "' class='icn3d-link'>" + text + "</span></li>";
|
|
14839
|
+
return "<li id='" + me.pre + wrapper + "'" + hideStr + "><span data-pinger id='" + me.pre + id + "' class='icn3d-link'>" + text + "</span></li>";
|
|
14840
14840
|
}
|
|
14841
14841
|
|
|
14842
14842
|
getLinkWrapper2(id, text, wrapper, bSimpleMenu, selType) { let me = this.icn3dui; me.icn3d;
|
|
@@ -14844,7 +14844,7 @@ class SetHtml {
|
|
|
14844
14844
|
if(selType) me.htmlCls.allMenusSel[id] = selType;
|
|
14845
14845
|
if(bSimpleMenu) me.htmlCls.simpleMenus[id] = 1;
|
|
14846
14846
|
|
|
14847
|
-
return "<li id='" + me.pre + wrapper + "'><span id='" + me.pre + id + "' class='icn3d-link'>" + text + "</span>";
|
|
14847
|
+
return "<li id='" + me.pre + wrapper + "'><span data-pinger id='" + me.pre + id + "' class='icn3d-link'>" + text + "</span>";
|
|
14848
14848
|
}
|
|
14849
14849
|
|
|
14850
14850
|
getRadio(radioid, id, text, bChecked, bSimpleMenu, selType) { let me = this.icn3dui; me.icn3d;
|
|
@@ -14855,8 +14855,7 @@ class SetHtml {
|
|
|
14855
14855
|
let checkedStr =(bChecked) ? ' checked' : '';
|
|
14856
14856
|
|
|
14857
14857
|
//https://stackoverflow.com/questions/17541614/use-images-instead-of-radio-buttons/17541916
|
|
14858
|
-
|
|
14859
|
-
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>";
|
|
14858
|
+
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>";
|
|
14860
14859
|
}
|
|
14861
14860
|
|
|
14862
14861
|
getRadioColor(radioid, id, text, color, bChecked, bSimpleMenu, selType) { let me = this.icn3dui; me.icn3d;
|
|
@@ -14867,8 +14866,7 @@ class SetHtml {
|
|
|
14867
14866
|
let checkedStr =(bChecked) ? ' checked' : '';
|
|
14868
14867
|
|
|
14869
14868
|
//https://stackoverflow.com/questions/17541614/use-images-instead-of-radio-buttons/17541916
|
|
14870
|
-
|
|
14871
|
-
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>";
|
|
14869
|
+
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>";
|
|
14872
14870
|
}
|
|
14873
14871
|
|
|
14874
14872
|
setAdvanced(index) { let me = this.icn3dui; me.icn3d;
|
|
@@ -35922,7 +35920,7 @@ class AnnoCddSite {
|
|
|
35922
35920
|
//if(me.cfg.afid) {
|
|
35923
35921
|
|
|
35924
35922
|
// use precalculated CDD annotation if
|
|
35925
|
-
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))
|
|
35923
|
+
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))
|
|
35926
35924
|
|| (Object.keys(ic.structures).length == 2 && me.cfg.align) ) {
|
|
35927
35925
|
let data = {};
|
|
35928
35926
|
try {
|
|
@@ -39759,7 +39757,7 @@ class AddTrack {
|
|
|
39759
39757
|
if(exonArray) {
|
|
39760
39758
|
for(let j = 0, jl = exonArray.length; j < jl; ++j) {
|
|
39761
39759
|
let start = exonArray[j].resStart, end = exonArray[j].resEnd;
|
|
39762
|
-
let genStart = exonArray[j].genomeRange.split('-')[0];
|
|
39760
|
+
let genStart = parseInt(exonArray[j].genomeRange.split('-')[0]);
|
|
39763
39761
|
|
|
39764
39762
|
for(let k = 0, kl = end - start + 1; k < kl; ++k) {
|
|
39765
39763
|
let colorStr = this.getExonColor(start, end, cnt);
|
|
@@ -42024,7 +42022,7 @@ class ShowAnno {
|
|
|
42024
42022
|
url = "https://rest.uniprot.org/uniprotkb/search?format=json&fields=xref_geneid,gene_names&query=" + structure;
|
|
42025
42023
|
let geneData = await me.getAjaxPromise(url, 'json');
|
|
42026
42024
|
let geneId = (geneData.results[0] && geneData.results[0].uniProtKBCrossReferences && geneData.results[0].uniProtKBCrossReferences[0]) ? geneData.results[0].uniProtKBCrossReferences[0].id : undefined;
|
|
42027
|
-
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 :
|
|
42025
|
+
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;
|
|
42028
42026
|
ic.chainsGene[chnid] = {geneId: geneId, geneSymbol: geneSymbol};
|
|
42029
42027
|
}
|
|
42030
42028
|
}
|
|
@@ -50386,7 +50384,7 @@ class MmdbParser {
|
|
|
50386
50384
|
if(Object.keys(data.atoms).length == 0) { // for large structures such as 3J3Q
|
|
50387
50385
|
// use mmtfid
|
|
50388
50386
|
let pdbid = data.pdbId;
|
|
50389
|
-
ic.mmtfParserCls.downloadMmtf(pdbid);
|
|
50387
|
+
await ic.mmtfParserCls.downloadMmtf(pdbid);
|
|
50390
50388
|
|
|
50391
50389
|
return;
|
|
50392
50390
|
}
|
|
@@ -50778,7 +50776,7 @@ class MmdbParser {
|
|
|
50778
50776
|
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;
|
|
50779
50777
|
}
|
|
50780
50778
|
|
|
50781
|
-
// use asymmetric unit for BLAST search, e.g., https://www.ncbi.nlm.nih.gov/Structure/icn3d
|
|
50779
|
+
// 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
|
|
50782
50780
|
if(me.cfg.blast_rep_id !== undefined) url += '&bu=0';
|
|
50783
50781
|
|
|
50784
50782
|
//ic.bCid = undefined;
|
|
@@ -50810,57 +50808,31 @@ class MmtfParser {
|
|
|
50810
50808
|
|
|
50811
50809
|
//MMTF is a new binary data format besides the previous PDB and mmCIF formats for 3D structures.
|
|
50812
50810
|
//The JavaScript Methods at http://mmtf.rcsb.org/ was used to load and parse the data.
|
|
50813
|
-
downloadMmtf(mmtfid) { let ic = this.icn3d
|
|
50811
|
+
async downloadMmtf(mmtfid) { let ic = this.icn3d, me = ic.icn3dui;
|
|
50814
50812
|
ic.ParserUtilsCls.setYourNote(mmtfid.toUpperCase() + '(MMTF) in iCn3D');
|
|
50815
50813
|
//ic.bCid = undefined;
|
|
50816
50814
|
|
|
50817
|
-
|
|
50818
|
-
|
|
50819
|
-
|
|
50820
|
-
|
|
50821
|
-
|
|
50822
|
-
|
|
50823
|
-
|
|
50824
|
-
var aaa = 1; //alert('This PDB structure is not found at RCSB...');
|
|
50825
|
-
return;
|
|
50826
|
-
}
|
|
50815
|
+
let mmtfData = await me.getMmtfReducedPromise(mmtfid);
|
|
50816
|
+
if(mmtfData.numAtoms * 10 > ic.maxatomcnt) {
|
|
50817
|
+
let bFull = false;
|
|
50818
|
+
if(Object.keys(mmtfData).length == 0) {
|
|
50819
|
+
var aaa = 1; //alert('This PDB structure is not found at RCSB...');
|
|
50820
|
+
return;
|
|
50821
|
+
}
|
|
50827
50822
|
|
|
50828
|
-
|
|
50829
|
-
|
|
50830
|
-
|
|
50831
|
-
|
|
50832
|
-
|
|
50833
|
-
|
|
50834
|
-
|
|
50835
|
-
|
|
50836
|
-
|
|
50837
|
-
let bFull = true;
|
|
50838
|
-
if(Object.keys(mmtfData2).length == 0) {
|
|
50839
|
-
var aaa = 1; //alert('This PDB structure is not found at RCSB...');
|
|
50840
|
-
return;
|
|
50841
|
-
}
|
|
50842
|
-
// ic.deferredOpm = $.Deferred(function() {
|
|
50843
|
-
// ic.opmParserCls.loadOpmData(mmtfData2, mmtfid, bFull, 'mmtf');
|
|
50844
|
-
// });
|
|
50845
|
-
|
|
50846
|
-
// return ic.deferredOpm.promise();
|
|
50847
|
-
|
|
50848
|
-
await ic.opmParserCls.loadOpmData(mmtfData2, mmtfid, bFull, 'mmtf');
|
|
50849
|
-
},
|
|
50850
|
-
// onError callback
|
|
50851
|
-
function( error ){
|
|
50852
|
-
//var aaa = 1; //alert('This PDB structure is not found at RCSB...');
|
|
50853
|
-
//console.error( error )
|
|
50854
|
-
}
|
|
50855
|
-
);
|
|
50856
|
-
}
|
|
50857
|
-
},
|
|
50858
|
-
// onError callback
|
|
50859
|
-
function( error ){
|
|
50860
|
-
//var aaa = 1; //alert('This PDB structure is not found at RCSB...');
|
|
50861
|
-
//console.error( error )
|
|
50823
|
+
await ic.opmParserCls.loadOpmData(mmtfData, mmtfid, bFull, 'mmtf');
|
|
50824
|
+
}
|
|
50825
|
+
else {
|
|
50826
|
+
let mmtfData2 = await me.getMmtfPromise(mmtfid);
|
|
50827
|
+
|
|
50828
|
+
let bFull = true;
|
|
50829
|
+
if(Object.keys(mmtfData2).length == 0) {
|
|
50830
|
+
var aaa = 1; //alert('This PDB structure is not found at RCSB...');
|
|
50831
|
+
return;
|
|
50862
50832
|
}
|
|
50863
|
-
|
|
50833
|
+
|
|
50834
|
+
await ic.opmParserCls.loadOpmData(mmtfData2, mmtfid, bFull, 'mmtf');
|
|
50835
|
+
}
|
|
50864
50836
|
}
|
|
50865
50837
|
|
|
50866
50838
|
async parseMmtfData(mmtfData, mmtfid, bFull) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -58745,7 +58717,6 @@ class ApplyCommand {
|
|
|
58745
58717
|
let command = commandOri.toLowerCase();
|
|
58746
58718
|
|
|
58747
58719
|
// exact match =============
|
|
58748
|
-
|
|
58749
58720
|
//var file_pref =(ic.inputid) ? ic.inputid : "custom";
|
|
58750
58721
|
if(command == 'share link') {
|
|
58751
58722
|
await ic.shareLinkCls.shareLink();
|
|
@@ -61659,6 +61630,7 @@ class LoadScript {
|
|
|
61659
61630
|
ic.inputid = id;
|
|
61660
61631
|
if(command.indexOf('load mmtf') !== -1) {
|
|
61661
61632
|
me.cfg.mmtfid = id;
|
|
61633
|
+
|
|
61662
61634
|
await ic.mmtfParserCls.downloadMmtf(id);
|
|
61663
61635
|
}
|
|
61664
61636
|
else if(command.indexOf('load pdb') !== -1) {
|
|
@@ -69405,7 +69377,8 @@ class ShareLink {
|
|
|
69405
69377
|
let url = this.shareLinkUrl();
|
|
69406
69378
|
|
|
69407
69379
|
let bTooLong =(url.length > 4000 || url.indexOf('http') !== 0) ? true : false;
|
|
69408
|
-
if(bPngHtml) url += "&random=" + parseInt(Math.random() * 1000); // generate a new shorten URL and thus image name everytime
|
|
69380
|
+
//if(bPngHtml) url += "&random=" + parseInt(Math.random() * 1000); // generate a new shorten URL and thus image name everytime
|
|
69381
|
+
|
|
69409
69382
|
//var inputid =(ic.inputid) ? ic.inputid : "custom";
|
|
69410
69383
|
let inputid = Object.keys(ic.structures).join('_');
|
|
69411
69384
|
if(inputid == ic.defaultPdbId) {
|
|
@@ -69513,7 +69486,7 @@ class ShareLink {
|
|
|
69513
69486
|
}
|
|
69514
69487
|
|
|
69515
69488
|
shareLinkUrl(bAllCommands, bOutputCmd) { let ic = this.icn3d, me = ic.icn3dui;
|
|
69516
|
-
let url = me.htmlCls.baseUrl + "icn3d
|
|
69489
|
+
let url = me.htmlCls.baseUrl + "icn3d/?";
|
|
69517
69490
|
let outputCmd = '';
|
|
69518
69491
|
if(me.cfg.bSidebyside) url = me.htmlCls.baseUrl + "icn3d/full2.html?";
|
|
69519
69492
|
|
|
@@ -72578,7 +72551,7 @@ class iCn3DUI {
|
|
|
72578
72551
|
//even when multiple iCn3D viewers are shown together.
|
|
72579
72552
|
this.pre = this.cfg.divid + "_";
|
|
72580
72553
|
|
|
72581
|
-
this.REVISION = '3.28.
|
|
72554
|
+
this.REVISION = '3.28.1';
|
|
72582
72555
|
|
|
72583
72556
|
// In nodejs, iCn3D defines "window = {navigator: {}}"
|
|
72584
72557
|
this.bNode = (Object.keys(window).length < 2) ? true : false;
|
|
@@ -73065,6 +73038,40 @@ iCn3DUI.prototype.setIcn3d = function() { let me = this;
|
|
|
73065
73038
|
me.setDialogAjax();
|
|
73066
73039
|
};
|
|
73067
73040
|
|
|
73041
|
+
iCn3DUI.prototype.getMmtfPromise = function(mmtfid) { return new Promise(function(resolve, reject) {
|
|
73042
|
+
MMTF.fetch(
|
|
73043
|
+
mmtfid,
|
|
73044
|
+
// onLoad callback
|
|
73045
|
+
async function( mmtfData ){
|
|
73046
|
+
resolve(mmtfData);
|
|
73047
|
+
},
|
|
73048
|
+
// onError callback
|
|
73049
|
+
function( error ){
|
|
73050
|
+
//var aaa = 1; //alert('This PDB structure is not found at RCSB...');
|
|
73051
|
+
//console.error( error )
|
|
73052
|
+
reject('error');
|
|
73053
|
+
}
|
|
73054
|
+
);
|
|
73055
|
+
});
|
|
73056
|
+
};
|
|
73057
|
+
|
|
73058
|
+
iCn3DUI.prototype.getMmtfReducedPromise = function(mmtfid) { return new Promise(function(resolve, reject) {
|
|
73059
|
+
MMTF.fetchReduced(
|
|
73060
|
+
mmtfid,
|
|
73061
|
+
// onLoad callback
|
|
73062
|
+
async function( mmtfData ){
|
|
73063
|
+
resolve(mmtfData);
|
|
73064
|
+
},
|
|
73065
|
+
// onError callback
|
|
73066
|
+
function( error ){
|
|
73067
|
+
//var aaa = 1; //alert('This PDB structure is not found at RCSB...');
|
|
73068
|
+
//console.error( error )
|
|
73069
|
+
reject('error');
|
|
73070
|
+
}
|
|
73071
|
+
);
|
|
73072
|
+
});
|
|
73073
|
+
};
|
|
73074
|
+
|
|
73068
73075
|
iCn3DUI.prototype.getAjaxPromise = function(url, dataType, beforeSend, alertMess, logMess, complete, bNode) { let me = this;
|
|
73069
73076
|
// if(!bNode || dataType != 'json') {
|
|
73070
73077
|
return new Promise(function(resolve, reject) {
|