icn3d 3.29.0 → 3.29.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.module.js CHANGED
@@ -6858,6 +6858,10 @@ class ClickMenu {
6858
6858
  me.myEventCls.onIds("#" + me.pre + "mn1_selection", "click", function(e) { me.icn3d; //e.preventDefault();
6859
6859
  me.htmlCls.dialogCls.openDlg('dl_selection', 'Please input the selection file');
6860
6860
  });
6861
+
6862
+ me.myEventCls.onIds("#" + me.pre + "mn1_collection", "click", function (e) { me.icn3d; //e.preventDefault();
6863
+ me.htmlCls.dialogCls.openDlg('dl_collection', 'Please input the collection file');
6864
+ });
6861
6865
 
6862
6866
  me.myEventCls.onIds("#" + me.pre + "mn1_dsn6", "click", function(e) { me.icn3d; //e.preventDefault();
6863
6867
  me.htmlCls.dialogCls.openDlg('dl_dsn6', 'Please input the map file to display electron density map');
@@ -9447,6 +9451,7 @@ class SetMenu {
9447
9451
  html += this.getLink('mn1_state', 'State/Script File', undefined, 2);
9448
9452
  html += this.getLink('mn1_fixedversion', 'Share Link in Archived Ver. ' + me.htmlCls.wifiStr, undefined, 2);
9449
9453
  html += this.getLink('mn1_selection', 'Selection File', undefined, 2);
9454
+ html += this.getLink("mn1_collection", "Collection File", undefined, 2);
9450
9455
 
9451
9456
  html += this.getMenuSep();
9452
9457
 
@@ -9563,14 +9568,14 @@ class SetMenu {
9563
9568
  }
9564
9569
 
9565
9570
  //!!!
9566
-
9571
+ /*
9567
9572
  html += this.getMenuText('m1_exportrefnum', 'Reference Numbers', undefined, undefined, 2);
9568
9573
  html += "<ul>";
9569
9574
  html += this.getLink('mn1_exportIgstrand', 'Ig Strand', undefined, 3);
9570
9575
  html += this.getLink('mn1_exportKabat', 'Kabat', undefined, 3);
9571
9576
  html += this.getLink('mn1_exportImgt', 'IMGT', undefined, 3);
9572
9577
  html += "</ul>";
9573
-
9578
+ */
9574
9579
 
9575
9580
  html += "<li><br/></li>";
9576
9581
 
@@ -10411,8 +10416,8 @@ class SetMenu {
10411
10416
  //}
10412
10417
 
10413
10418
  //!!!
10414
- html += this.getRadio('mn4_clr', 'mn4_clrIgstrand', 'Ig Strand', undefined, undefined, 2);
10415
- html += this.getRadio('mn4_clr', 'mn4_clrIgproto', 'Ig Protodomain', undefined, undefined, 2);
10419
+ //html += this.getRadio('mn4_clr', 'mn4_clrIgstrand', 'Ig Strand', undefined, undefined, 2);
10420
+ //html += this.getRadio('mn4_clr', 'mn4_clrIgproto', 'Ig Protodomain', undefined, undefined, 2);
10416
10421
  }
10417
10422
  else {
10418
10423
  //if(!me.cfg.hidelicense) html += this.getRadio('mn4_clr', 'mn1_delphi2', 'DelPhi<br><span style="padding-left:1.5em;">Potential ' + me.htmlCls.licenseStr + '</span>');
@@ -10543,7 +10548,7 @@ class SetMenu {
10543
10548
  html += this.getRadio('mn6_addlabel', 'mn6_addlabelResidues', 'per Residue', undefined, 1, 2);
10544
10549
  html += this.getRadio('mn6_addlabel', 'mn6_addlabelResnum', 'per Residue & Number', undefined, 1, 2);
10545
10550
  //!!!
10546
- html += this.getRadio('mn6_addlabel', 'mn6_addlabelRefnum', 'per Reference Number', undefined, 1, 2);
10551
+ //html += this.getRadio('mn6_addlabel', 'mn6_addlabelRefnum', 'per Reference Number', undefined, 1, 2);
10547
10552
  html += this.getRadio('mn6_addlabel', 'mn6_addlabelChains', 'per Chain', undefined, undefined, 2);
10548
10553
  html += this.getRadio('mn6_addlabel', 'mn6_addlabelTermini', 'N- & C-Termini', undefined, 1, 2);
10549
10554
  }
@@ -10635,13 +10640,13 @@ class SetMenu {
10635
10640
 
10636
10641
  html += "<ul>";
10637
10642
  //!!!
10638
-
10643
+ /*
10639
10644
  html += this.getLink('mn6_igrefYes', 'Show Ig Ref. Number', undefined, 2);
10640
10645
  html += this.getLink('mn6_igrefTpl', 'Ig w/ Specified Template', undefined, 2);
10641
10646
  html += this.getLink('mn6_igrefNo', 'Hide Ig Ref. Number', undefined, 2);
10642
10647
 
10643
10648
  html += this.getMenuSep();
10644
-
10649
+ */
10645
10650
  html += this.getLink('mn6_customref', 'Custom Ref. Number', undefined, 2);
10646
10651
  html += "</ul>";
10647
10652
  html += "</li>";
@@ -11867,11 +11872,26 @@ class SetDialog {
11867
11872
 
11868
11873
 
11869
11874
  html += me.htmlCls.divStr + "dl_selection' class='" + dialogClass + "'>";
11870
- html += this.addNotebookTitle('dl_selection', 'Load a selection file');
11875
+ html += this.addNotebookTitle('dl_selection', 'Please input the selection file');
11871
11876
  html += "Selection file: " + me.htmlCls.inputFileStr + "id='" + me.pre + "selectionfile'><br/>";
11872
11877
  html += me.htmlCls.buttonStr + "reload_selectionfile' style='margin-top: 6px;'>Load</button>";
11873
11878
  html += "</div>";
11874
11879
 
11880
+ html += me.htmlCls.divStr + "dl_collection' class='" + dialogClass + "'>";
11881
+ html += this.addNotebookTitle('dl_collection', 'Please input the collection file');
11882
+ html += "You can load a collection of structures via a file. Here is <a href='https://github.com/ncbi/icn3d/blob/master/example/collection.json' target='_blank'>one example file</a><br><br>";
11883
+ html += "Collection file: " + me.htmlCls.inputFileStr + "id='" + me.pre + "collectionfile'><br/>";
11884
+ html += me.htmlCls.buttonStr + "reload_collectionfile' style='margin-top: 6px;'>Load</button>";
11885
+ html += "</div>";
11886
+
11887
+ html += me.htmlCls.divStr + "dl_selectCollections' class='" + dialogClass + "'>";
11888
+ html += me.htmlCls.divStr + "dl_collectionsMenu'>";
11889
+ html += "<b>Structures:</b> <br/>";
11890
+ html += "<select id='" + me.pre + "collections_menu' multiple size='6' style='min-width:130px;'>";
11891
+ html += "</select>";
11892
+ html += "</div>";
11893
+ html += "</div>";
11894
+
11875
11895
  html += me.htmlCls.divStr + "dl_menuloadpref' class='" + dialogClass + "'>";
11876
11896
  html += this.addNotebookTitle('dl_menuloadpref', 'Load a preference file');
11877
11897
  html += "Preference file: " + me.htmlCls.inputFileStr + "id='" + me.pre + "menupreffile'><br/>";
@@ -14076,6 +14096,46 @@ class Events {
14076
14096
  }
14077
14097
  });
14078
14098
 
14099
+ me.myEventCls.onIds("#" + me.pre + "reload_collectionfile", "click", function (e) { let ic = me.icn3d;
14100
+ e.preventDefault();
14101
+ let file = $("#" + me.pre + "collectionfile")[0].files[0];
14102
+ if (!file) {
14103
+ alert("Please select a file before clicking 'Load'");
14104
+ } else {
14105
+ if (!me.cfg.notebook) dialog.dialog("close");
14106
+ if (!me.cfg.notebook) {
14107
+ $(".ui-dialog-content").dialog("close");
14108
+ } else {
14109
+ ic.resizeCanvasCls.closeDialogs();
14110
+ }
14111
+ me.htmlCls.setHtmlCls.fileSupport();
14112
+ let reader = new FileReader();
14113
+ reader.onload = async function (e) {
14114
+ let dataStr = JSON.parse(e.target.result);
14115
+ let collection = [dataStr["structures"].map(({ id }) => id), dataStr["structures"].map(({ title }) => title)];
14116
+ let collectionHtml = ic.selectCollectionsCls.setAtomMenu(collection[0], collection[1]);
14117
+ let bNoDuplicate = true;
14118
+ await ic.chainalignParserCls.downloadMmdbAf(collection[0][0], undefined, undefined, bNoDuplicate);
14119
+
14120
+ ic.opts["color"] = "structure";
14121
+ ic.setColorCls.setColorByOptions(ic.opts, ic.dAtoms);
14122
+
14123
+ $("#" + ic.pre + "collections_menu").html(collectionHtml);
14124
+ ic.selectCollectionsCls.clickStructure();
14125
+
14126
+ $("#" + ic.pre + "collections_menu").trigger("change");
14127
+
14128
+ me.htmlCls.clickMenuCls.setLogCmd(
14129
+ "load collection file " +
14130
+ $("#" + me.pre + "collectionfile").val(),
14131
+ false
14132
+ );
14133
+ };
14134
+ reader.readAsText(file);
14135
+ me.htmlCls.dialogCls.openDlg("dl_selectCollections", "Select Collections");
14136
+ }
14137
+ });
14138
+
14079
14139
  me.myEventCls.onIds("#" + me.pre + "reload_dsn6file2fofc", "click", function(e) { let ic = me.icn3d;
14080
14140
  e.preventDefault();
14081
14141
  //if(!me.cfg.notebook) dialog.dialog( "close" );
@@ -38478,7 +38538,8 @@ class AnnoDomain {
38478
38538
  for(let j = from; j <= to; ++j) {
38479
38539
  // 0-based
38480
38540
  let obj = {};
38481
- obj[chnid + '_' + (j+1).toString()] = domainName;
38541
+ let resi = ic.ParserUtilsCls.getResi(chnid, j+1);
38542
+ obj[chnid + '_' + resi] = domainName;
38482
38543
  ic.resid2domain[chnid].push(obj);
38483
38544
  }
38484
38545
  }
@@ -47038,7 +47099,7 @@ class LineGraph {
47038
47099
  console.log("domainid: " + domainid);
47039
47100
  }
47040
47101
 
47041
- if(!ic.domainid2score.hasOwnProperty(domainid) || queryData[0].score >= ic.domainid2score[domainid].split('_')[0]) {
47102
+ if(!domainid2segs.hasOwnProperty(domainid) || queryData[0].score >= ic.domainid2score[domainid].split('_')[0]) {
47042
47103
  ic.domainid2score[domainid] = queryData[0].score + '_' + queryData[0].frac_identical + '_' + queryData[0].num_res ;
47043
47104
 
47044
47105
  ic.domainid2refpdbname[domainid] = refpdbname;
@@ -47118,6 +47179,7 @@ class LineGraph {
47118
47179
 
47119
47180
  // combine domainid into chainid
47120
47181
  let processedChainid = {};
47182
+
47121
47183
  for(let domainid in ic.domainid2refpdbname) {
47122
47184
  // remove the first round template
47123
47185
  if(ic.domainid2refpdbname[domainid].substr(0,1) == '1') {
@@ -50590,6 +50652,7 @@ class ChainalignParser {
50590
50652
  me.htmlCls.clickMenuCls.setLogCmd("Align " + mmdbid1 + " with " + mmdbid2, false);
50591
50653
 
50592
50654
  let bNoAlert = true;
50655
+
50593
50656
  let bAligned = this.processAlign(align, i, queryData, bEqualMmdbid, bEqualChain, bNoAlert);
50594
50657
 
50595
50658
  if(bAligned) {
@@ -51101,7 +51164,6 @@ class ChainalignParser {
51101
51164
  ic.qt_start_end[index] = align[0].segs;
51102
51165
 
51103
51166
  let rmsd = align[0].super_rmsd;
51104
- console.log();
51105
51167
 
51106
51168
  let logStr = "alignment RMSD: " + rmsd.toPrecision(4);
51107
51169
  if(me.cfg.aligntool == 'tmalign') logStr += "; TM-score: " + align[0].score.toPrecision(4);
@@ -51186,7 +51248,7 @@ console.log();
51186
51248
  }
51187
51249
  }
51188
51250
 
51189
- async downloadMmdbAf(idlist, bQuery, vastplusAtype) { let ic = this.icn3d, me = ic.icn3dui;
51251
+ async downloadMmdbAf(idlist, bQuery, vastplusAtype, bNoDuplicate) { let ic = this.icn3d, me = ic.icn3dui;
51190
51252
  let thisClass = this;
51191
51253
 
51192
51254
  ic.structArray = (ic.structures) ? Object.keys(ic.structures) : [];
@@ -51205,11 +51267,17 @@ console.log();
51205
51267
  let structArrayTmp = idlist.split(',');
51206
51268
 
51207
51269
  let structArray = [];
51208
- // remove redundant structures
51270
+
51209
51271
  for(let i = 0, il = structArrayTmp.length; i < il; ++i) {
51210
- if(!ic.structures.hasOwnProperty(structArrayTmp[i].toUpperCase())) {
51272
+ let id = structArrayTmp[i].toUpperCase();
51273
+ // sometimes we want to load same structure multiple times
51274
+ if(!ic.structures.hasOwnProperty(id) && structArray.indexOf(id) == -1) {
51211
51275
  structArray.push(structArrayTmp[i]);
51212
51276
  }
51277
+ else {
51278
+ // only when bNoDuplicate is undefined/false, it's allowed to load multiple copies of the same structure
51279
+ if(!bNoDuplicate) structArray.push(structArrayTmp[i] + me.htmlCls.postfix);
51280
+ }
51213
51281
  }
51214
51282
 
51215
51283
  if(structArray.length == 0) return;
@@ -52644,7 +52712,6 @@ class MtzParser {
52644
52712
  else {
52645
52713
  sigma = await this.mtzParserBase(url, type, sigma, 'url');
52646
52714
 
52647
- console.log("### sigma " + sigma);
52648
52715
  //me.htmlCls.clickMenuCls.setLogCmd('set map ' + type + ' sigma ' + sigma + ' file mtz | ' + encodeURIComponent(url), true);
52649
52716
  }
52650
52717
  }
@@ -54684,6 +54751,7 @@ class RealignParser {
54684
54751
  // reinitialize
54685
54752
  ic.qt_start_end = [];
54686
54753
 
54754
+ let chainidHash = {};
54687
54755
  for(let index = 0, indexl = chainidArray.length - 1; index < indexl; ++index) {
54688
54756
  let fromStruct = chainidArray[index + 1].substr(0, chainidArray[index + 1].indexOf('_')); //.toUpperCase();
54689
54757
 
@@ -54691,6 +54759,8 @@ class RealignParser {
54691
54759
 
54692
54760
  let chainTo = toStruct + chainidArray[0].substr(chainidArray[0].indexOf('_'));
54693
54761
  let chainFrom = fromStruct + chainidArray[index + 1].substr(chainidArray[index + 1].indexOf('_'));
54762
+ chainidHash[chainTo] = 1;
54763
+ chainidHash[chainFrom] = 1;
54694
54764
 
54695
54765
  chainidArray[0] = chainTo;
54696
54766
  chainidArray[index + 1] = chainFrom;
@@ -54720,13 +54790,17 @@ class RealignParser {
54720
54790
  // set ic.qt_start_end in alignCoords()
54721
54791
 
54722
54792
  let result = ic.ParserUtilsCls.alignCoords(coord2, coord1, fromStruct, undefined, chainTo, chainFrom, index + 1, bChainAlign);
54793
+
54723
54794
  hAtoms = me.hashUtilsCls.unionHash(hAtoms, result.hAtoms);
54724
54795
  rmsd = parseFloat(result.rmsd);
54725
54796
  }
54726
54797
 
54727
54798
  // If rmsd from vastsrv is too large, realign the chains
54728
- if(me.cfg.chainalign && !me.cfg.usepdbnum && me.cfg.resdef && rmsd > 5) {
54729
- let nameArray = me.cfg.chainalign.split(',');
54799
+ //if(me.cfg.chainalign && !me.cfg.usepdbnum && me.cfg.resdef && rmsd > 5) {
54800
+ if(!me.cfg.usepdbnum && me.cfg.resdef && rmsd > 5) {
54801
+ console.log("RMSD from VAST is larger than 5. Realign the chains with TM-align.");
54802
+ //let nameArray = me.cfg.chainalign.split(',');
54803
+ let nameArray = Object.keys(chainidHash);
54730
54804
  if(nameArray.length > 0) {
54731
54805
  ic.hAtoms = ic.definedSetsCls.getAtomsFromNameArray(nameArray);
54732
54806
  }
@@ -55170,7 +55244,7 @@ class RealignParser {
55170
55244
  struct2resid[chainid] = [];
55171
55245
  }
55172
55246
 
55173
- if(bPredefined) {
55247
+ if(bPredefined) {
55174
55248
  //base = parseInt(ic.chainsSeq[chainid][0].resi);
55175
55249
 
55176
55250
  if(i == 0) ;
@@ -55186,6 +55260,7 @@ class RealignParser {
55186
55260
 
55187
55261
  // master
55188
55262
  resiArray = predefinedResPair[0].split(",");
55263
+
55189
55264
  result = thisClass.getSeqCoorResid(resiArray, chainid_t);
55190
55265
 
55191
55266
  hAtoms = me.hashUtilsCls.unionHash(hAtoms, result.hAtoms);
@@ -55200,6 +55275,7 @@ class RealignParser {
55200
55275
 
55201
55276
  // slave
55202
55277
  resiArray = predefinedResPair[1].split(",");
55278
+
55203
55279
  result = thisClass.getSeqCoorResid(resiArray, chainid);
55204
55280
  hAtoms = me.hashUtilsCls.unionHash(hAtoms, result.hAtoms);
55205
55281
 
@@ -56425,6 +56501,7 @@ class ParserUtils {
56425
56501
  if(rmsd) {
56426
56502
  me.htmlCls.clickMenuCls.setLogCmd("realignment RMSD: " + rmsd.toPrecision(4), false);
56427
56503
  let html = "<br><b>Realignment RMSD</b>: " + rmsd.toPrecision(4) + " &#8491;<br><br>";
56504
+
56428
56505
  if(ic.bAfMem && !me.cfg.chainalign) {
56429
56506
  //if(window.dialog && window.dialog.hasClass('ui-dialog-content')) window.dialog.dialog( "close" );
56430
56507
  html += me.utilsCls.getMemDesc();
@@ -57339,7 +57416,7 @@ class LoadAtomData {
57339
57416
  if(!bTitle) ic.molTitle = '';
57340
57417
  }
57341
57418
  else { // mmdbid or mmcifid
57342
- if(data.descr !== undefined) ic.molTitle += data.descr.name;
57419
+ if(data.descr !== undefined) ic.molTitle = data.descr.name;
57343
57420
  if(type === 'mmdbid') {
57344
57421
  let pdbidTmp = (isNaN(id)) ? id : data.pdbId;
57345
57422
  let chainHash = {};
@@ -62970,7 +63047,7 @@ class DefinedSets {
62970
63047
  }
62971
63048
 
62972
63049
  //Set the menu of defined sets with an array of defined names "commandnameArray".
62973
- setAtomMenu(commandnameArray) { let ic = this.icn3d; ic.icn3dui;
63050
+ setAtomMenu(commandnameArray) { let ic = this.icn3d, me = ic.icn3dui;
62974
63051
  let html = "";
62975
63052
 
62976
63053
  let nameArray1 =(ic.defNames2Residues !== undefined) ? Object.keys(ic.defNames2Residues) : [];
@@ -62979,12 +63056,22 @@ class DefinedSets {
62979
63056
  let nameArrayTmp = nameArray1.concat(nameArray2).sort();
62980
63057
 
62981
63058
  let nameArray = [];
62982
- // $.each(nameArrayTmp, function(i, el){
62983
- // if($.inArray(el, nameArray) === -1) nameArray.push(el);
62984
- // });
62985
- nameArrayTmp.forEach(elem => {
62986
- if($.inArray(elem, nameArray) === -1) nameArray.push(elem);
62987
- });
63059
+ // $.each(nameArrayTmp, function(i, el){
63060
+ // if($.inArray(el, nameArray) === -1) nameArray.push(el);
63061
+ // });
63062
+ // nameArrayTmp.forEach(elem => {
63063
+ // if($.inArray(elem, nameArray) === -1) nameArray.push(elem);
63064
+ // });
63065
+
63066
+ let structureArray = Object.keys(me.utilsCls.getStructures(ic.dAtoms));
63067
+
63068
+ nameArrayTmp.forEach((elem) => {
63069
+ structureArray.forEach((structure) => {
63070
+ if (ic.defNames2Residues[elem] && ic.defNames2Residues[elem][0] && ic.defNames2Residues[elem][0].split("_")[0].includes(structure.split("_")[0])){
63071
+ if ($.inArray(elem, nameArray) === -1) nameArray.push(elem);
63072
+ }
63073
+ });
63074
+ });
62988
63075
 
62989
63076
  //for(let i in ic.defNames2Atoms) {
62990
63077
  for(let i = 0, il = nameArray.length; i < il; ++i) {
@@ -63550,6 +63637,129 @@ class DefinedSets {
63550
63637
 
63551
63638
  }
63552
63639
 
63640
+ /**
63641
+ * @author Jack Lin <th3linja@yahoo.com> / https://github.com/ncbi/icn3d
63642
+ */
63643
+
63644
+ class SelectCollections {
63645
+ constructor(icn3d) {
63646
+ this.icn3d = icn3d;
63647
+ }
63648
+
63649
+ //Set the menu of defined sets with an array of defined names "commandnameArray".
63650
+ setAtomMenu(nameArray, titleArray) {
63651
+ let ic = this.icn3d;
63652
+ ic.icn3dui;
63653
+ let html = "";
63654
+ let commandnameArray = [nameArray[0]];
63655
+ //for(let i in ic.defNames2Atoms) {
63656
+ for (let i = 0, il = nameArray.length; i < il; ++i) {
63657
+ let name = nameArray[i];
63658
+ let title = titleArray[i];
63659
+
63660
+ let atomHash;
63661
+ if (
63662
+ ic.defNames2Atoms !== undefined &&
63663
+ ic.defNames2Atoms.hasOwnProperty(name)
63664
+ ) {
63665
+ let atomArray = ic.defNames2Atoms[name];
63666
+
63667
+ if (atomArray.length > 0) ic.atoms[atomArray[0]];
63668
+ } else if (
63669
+ ic.defNames2Residues !== undefined &&
63670
+ ic.defNames2Residues.hasOwnProperty(name)
63671
+ ) {
63672
+ let residueArray = ic.defNames2Residues[name];
63673
+ if (residueArray.length > 0) {
63674
+ atomHash = ic.residues[residueArray[0]];
63675
+ if (atomHash) {
63676
+ ic.atoms[Object.keys(atomHash)[0]];
63677
+ }
63678
+ }
63679
+ }
63680
+
63681
+ if (commandnameArray.indexOf(name) != -1) {
63682
+ html +=
63683
+ "<option value='" +
63684
+ name +
63685
+ "' selected='selected'>" +
63686
+ title +
63687
+ "</option>";
63688
+ } else {
63689
+ html += "<option value='" + name + "'>" + title + "</option>";
63690
+ }
63691
+ }
63692
+
63693
+ return html;
63694
+ }
63695
+
63696
+ clickStructure() {
63697
+ let ic = this.icn3d,
63698
+ me = ic.icn3dui;
63699
+ let thisClass = this;
63700
+
63701
+ //me.myEventCls.onIds("#" + ic.pre + "atomsCustom", "change", function(e) { let ic = thisClass.icn3d;
63702
+ $("#" + ic.pre + "collections_menu").change(async function (e) {
63703
+ let ic = thisClass.icn3d;
63704
+ // ic.init()
63705
+ let nameArray = $(this).val();
63706
+ let nameStructure = $(this).find("option:selected").text();
63707
+
63708
+ ic.nameArray = nameArray;
63709
+ if (nameArray !== null) {
63710
+ ic.bShowHighlight = false;
63711
+ let bNoDuplicate = true;
63712
+ await ic.chainalignParserCls.downloadMmdbAf(nameArray.toString(), undefined, undefined, bNoDuplicate);
63713
+
63714
+ ic.dAtoms = {};
63715
+ ic.hAtoms = {};
63716
+ // ic.ssbondpnts = {};
63717
+ let chainIdHash = {};
63718
+
63719
+ for (const name in nameArray) {
63720
+ for (const key in ic.chains) {
63721
+ if (key.includes(nameArray[name])) {
63722
+ chainIdHash[key] = 1;
63723
+ if (ic.chains.hasOwnProperty(key)) {
63724
+ const innerDict = ic.chains[key];
63725
+ for (const innerKey in innerDict) {
63726
+ if (innerDict.hasOwnProperty(innerKey)) {
63727
+ ic.dAtoms[innerKey] = innerDict[innerKey];
63728
+ ic.hAtoms[innerKey] = innerDict[innerKey];
63729
+ }
63730
+ }
63731
+ }
63732
+ }
63733
+ }
63734
+ }
63735
+
63736
+ ic.transformCls.zoominSelection();
63737
+ ic.definedSetsCls.showSets();
63738
+
63739
+
63740
+ await ic.drawCls.draw();
63741
+ ic.saveFileCls.showTitle();
63742
+
63743
+ me.htmlCls.clickMenuCls.setLogCmd(
63744
+ "select structure " + "[" + nameStructure + "]",
63745
+ true
63746
+ );
63747
+ ic.bSelectResidue = false;
63748
+ }
63749
+ });
63750
+
63751
+ me.myEventCls.onIds(
63752
+ "#" + ic.pre + "collections_menu",
63753
+ "focus",
63754
+ function (e) {
63755
+ let ic = thisClass.icn3d;
63756
+ if (me.utilsCls.isMobile())
63757
+ $("#" + ic.pre + "collections_menu").val("");
63758
+ }
63759
+ );
63760
+ }
63761
+ }
63762
+
63553
63763
  /**
63554
63764
  * @author Jiyao Wang <wangjiy@ncbi.nlm.nih.gov> / https://github.com/ncbi/icn3d
63555
63765
  */
@@ -74754,7 +74964,8 @@ class iCn3D {
74754
74964
  this.setSeqAlignCls = new SetSeqAlign(this);
74755
74965
 
74756
74966
  this.applyCommandCls = new ApplyCommand(this);
74757
- this.definedSetsCls = new DefinedSets(this);
74967
+ this.definedSetsCls = new DefinedSets(this);
74968
+ this.selectCollectionsCls = new SelectCollections(this);
74758
74969
  this.legendTableCls = new LegendTable(this);
74759
74970
  this.loadScriptCls = new LoadScript(this);
74760
74971
  this.selByCommCls = new SelectByCommand(this);
@@ -75001,7 +75212,7 @@ class iCn3DUI {
75001
75212
  //even when multiple iCn3D viewers are shown together.
75002
75213
  this.pre = this.cfg.divid + "_";
75003
75214
 
75004
- this.REVISION = '3.29.0';
75215
+ this.REVISION = '3.29.1';
75005
75216
 
75006
75217
  // In nodejs, iCn3D defines "window = {navigator: {}}"
75007
75218
  this.bNode = (Object.keys(window).length < 2) ? true : false;
@@ -75227,7 +75438,7 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
75227
75438
  // load multiple PDBs
75228
75439
  // ic.bNCBI = true;
75229
75440
  ic.bMmdbafid = true;
75230
-
75441
+
75231
75442
  let bQuery = true;
75232
75443
  await ic.chainalignParserCls.downloadMmdbAf(mmdbafid, bQuery);
75233
75444
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icn3d",
3
- "version": "3.29.0",
3
+ "version": "3.29.2",
4
4
  "main": "./icn3d.js",
5
5
  "exports": {
6
6
  ".": {