icn3d 3.23.5 → 3.24.0

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
@@ -6586,7 +6586,7 @@ class ClickMenu {
6586
6586
  if(!bOneset) $("#" + me.pre + id2).resizable();
6587
6587
  }
6588
6588
 
6589
- applyShownMenus() { let me = this.icn3dui; me.icn3d;
6589
+ applyShownMenus(bNoSave) { let me = this.icn3dui; me.icn3d;
6590
6590
  let idArray = [];
6591
6591
  for(let id in me.htmlCls.allMenus) {
6592
6592
  if(me.htmlCls.shownMenus.hasOwnProperty(id)) {
@@ -6606,7 +6606,7 @@ class ClickMenu {
6606
6606
  }
6607
6607
 
6608
6608
  // save to localStorage
6609
- if(localStorage) localStorage.setItem('hiddenmenus', JSON.stringify(idArray));
6609
+ if(localStorage && !bNoSave) localStorage.setItem('hiddenmenus', JSON.stringify(idArray));
6610
6610
  }
6611
6611
 
6612
6612
  getHiddenMenusFromCache() { let me = this.icn3dui; me.icn3d;
@@ -7857,7 +7857,7 @@ class ClickMenu {
7857
7857
 
7858
7858
  let legendHtml = thisClass.setLegendHtml();
7859
7859
  //$("#" + me.pre + "legend").html(legendHtml).show();
7860
- $("#" + me.pre + "dl_legend").html(legendHtml);
7860
+ $("#" + me.pre + "dl_legend_html").html(legendHtml);
7861
7861
  me.htmlCls.dialogCls.openDlg('dl_legend', 'Color range');
7862
7862
 
7863
7863
  ic.addTrackCls.setCustomFile('color', ic.startColor, ic.midColor, ic.endColor);
@@ -7946,6 +7946,12 @@ class ClickMenu {
7946
7946
  thisClass.setLogCmd('color ig strand', true);
7947
7947
  });
7948
7948
 
7949
+ me.myEventCls.onIds("#" + me.pre + "mn4_clrIgproto", "click", function(e) { let ic = me.icn3d; //e.preventDefault();
7950
+ //ic.legendClick = 6;
7951
+ ic.setOptionCls.setOption('color', 'ig protodomain');
7952
+ thisClass.setLogCmd('color ig protodomain', true);
7953
+ });
7954
+
7949
7955
 
7950
7956
  me.myEventCls.onIds("#" + me.pre + "mn4_clrArea", "click", function(e) { me.icn3d; //e.preventDefault();
7951
7957
  me.htmlCls.dialogCls.openDlg('dl_colorbyarea', "Color based on residue's solvent accessibility");
@@ -8203,11 +8209,27 @@ class ClickMenu {
8203
8209
  me.myEventCls.onIds("#" + me.pre + "mn6_igrefYes", "click", async function(e) { let ic = me.icn3d; //e.preventDefault();
8204
8210
  thisClass.setLogCmd('ig refnum on', true);
8205
8211
  await ic.refnumCls.showIgRefNum();
8212
+
8213
+ if(ic.bShowRefnum) {
8214
+ ic.opts.color = 'ig strand';
8215
+ ic.setColorCls.setColorByOptions(ic.opts, ic.atoms);
8216
+
8217
+ ic.selectionCls.selectAll_base();
8218
+ ic.hlUpdateCls.updateHlAll();
8219
+ ic.drawCls.draw();
8220
+ }
8206
8221
  });
8207
8222
 
8208
8223
  me.myEventCls.onIds("#" + me.pre + "mn6_igrefNo", "click", async function(e) { let ic = me.icn3d; //e.preventDefault();
8209
8224
  thisClass.setLogCmd('ig refnum off', true);
8210
8225
  await ic.refnumCls.hideIgRefNum();
8226
+
8227
+ ic.opts.color = 'chain';
8228
+ ic.setColorCls.setColorByOptions(ic.opts, ic.atoms);
8229
+
8230
+ ic.selectionCls.selectAll_base();
8231
+ ic.hlUpdateCls.updateHlAll();
8232
+ ic.drawCls.draw();
8211
8233
  });
8212
8234
 
8213
8235
 
@@ -10262,7 +10284,9 @@ class SetMenu {
10262
10284
  html += this.getRadio('mn4_clr', 'mn4_clrConfidence', 'AlphaFold<br><span style="padding-left:1.5em;">Confidence</span>', undefined, 1, 1);
10263
10285
  //}
10264
10286
 
10265
- html += this.getRadio('mn4_clr', 'mn4_clrIgstrand', 'Ig Strand', undefined, undefined, 2);
10287
+ //!!!
10288
+ //!!!html += this.getRadio('mn4_clr', 'mn4_clrIgstrand', 'Ig Strand', undefined, undefined, 2);
10289
+ //!!!html += this.getRadio('mn4_clr', 'mn4_clrIgproto', 'Ig Protodomain', undefined, undefined, 2);
10266
10290
  }
10267
10291
  else {
10268
10292
  //if(!me.cfg.hidelicense) html += this.getRadio('mn4_clr', 'mn1_delphi2', 'DelPhi<br><span style="padding-left:1.5em;">Potential ' + me.htmlCls.licenseStr + '</span>');
@@ -10343,14 +10367,15 @@ class SetMenu {
10343
10367
 
10344
10368
  html += this.getLink('mn6_contactmap', 'Contact Map', undefined, 1);
10345
10369
 
10346
- if(!me.cfg.notebook) {
10370
+ //if(!me.cfg.notebook) {
10347
10371
  html += this.getLink('mn1_mutation', 'Mutation ' + me.htmlCls.wifiStr, 1, 1);
10348
- }
10372
+ //}
10349
10373
 
10350
10374
  //html += this.getMenuSep();
10351
10375
  }
10352
10376
 
10353
- if(!me.cfg.notebook && !me.cfg.hidelicense) {
10377
+ //if(!me.cfg.notebook && !me.cfg.hidelicense) {
10378
+ if(!me.cfg.hidelicense) {
10354
10379
  html += this.getMenuText('mn1_delphiwrap', 'DelPhi Potential', undefined, 1, 1);
10355
10380
 
10356
10381
  html += "<ul>";
@@ -10481,12 +10506,13 @@ class SetMenu {
10481
10506
  html += this.getMenuText('mn6_igrefwrap', 'Ref. Number', undefined, undefined, 1);
10482
10507
 
10483
10508
  html += "<ul>";
10484
-
10509
+ //!!!
10510
+ /*
10485
10511
  html += this.getLink('mn6_igrefYes', 'Show Ig Ref. Number', undefined, 2);
10486
10512
  html += this.getLink('mn6_igrefNo', 'Hide Ig Ref. Number', undefined, 2);
10487
10513
 
10488
10514
  html += this.getMenuSep();
10489
-
10515
+ */
10490
10516
  html += this.getLink('mn6_customref', 'Custom Ref. Number', undefined, 2);
10491
10517
  html += "</ul>";
10492
10518
  html += "</li>";
@@ -11163,6 +11189,7 @@ class Dialog {
11163
11189
 
11164
11190
  if(id === me.pre + 'dl_selectannotations' || id === me.pre + 'dl_graph' || id === me.pre + 'dl_linegraph' || id === me.pre + 'dl_scatterplot' || id === me.pre + 'dl_contactmap' || id === me.pre + 'dl_alignerrormap' || id === me.pre + 'dl_interactionsorted' || id === me.pre + 'dl_alignment') {
11165
11191
  $( "#" + id ).show();
11192
+ $( "#" + id + "_nb").show();
11166
11193
 
11167
11194
  height =(me.htmlCls.HEIGHT) * 0.5;
11168
11195
 
@@ -11207,7 +11234,10 @@ class Dialog {
11207
11234
  });
11208
11235
  }
11209
11236
  else {
11210
- if(ic.bRender) $( "#" + id ).show();
11237
+ if(ic.bRender) {
11238
+ $( "#" + id ).show();
11239
+ $( "#" + id + "_nb").show();
11240
+ }
11211
11241
 
11212
11242
  height = 'auto';
11213
11243
  width = 'auto';
@@ -11257,6 +11287,18 @@ class SetDialog {
11257
11287
  return html;
11258
11288
  }
11259
11289
 
11290
+ addNotebookTitle(id, title, bAddExtraDiv) { let me = this.icn3dui; me.icn3d;
11291
+ //return '<div id="' + me.pre + id + '_nb" style="display:none; background-color:#1c94c4; width:100%"><span style="color:white; font-weight:bold">' + title + '</span>&nbsp;&nbsp;&nbsp;<span onclick="$(\'#' + me.pre + id + '\').hide(); return false;" class="icn3d-nbclose" title="Close">x</span></div>';
11292
+
11293
+ let html = '<div id="' + me.pre + id + '_nb" style="display:none; background-color:#5C9CCC; width:100%"><span style="color:white; font-weight:bold">' + title + '</span>&nbsp;&nbsp;&nbsp;<div onclick="$(\'#' + me.pre + id + '\').hide(); return false;" class="icn3d-nbclose ui-icon ui-icon-close" title="Close"></div></div>';
11294
+
11295
+ if(bAddExtraDiv) {
11296
+ html += '<div id="' + me.pre + id + '_html"></div>';
11297
+ }
11298
+
11299
+ return html;
11300
+ }
11301
+
11260
11302
  //Set the html for all popup dialogs.
11261
11303
  setDialogs() { let me = this.icn3dui, ic = me.icn3d;
11262
11304
  if(me.bNode) return '';
@@ -11271,12 +11313,15 @@ class SetDialog {
11271
11313
 
11272
11314
  let divClass =(me.cfg.notebook) ? '' : 'icn3d-hidden';
11273
11315
  let dialogClass =(me.cfg.notebook) ? 'icn3d-hidden' : '';
11274
- html += me.htmlCls.divStr + "alldialogs' class='" + divClass + " icn3d-dialog'>";
11316
+ //html += me.htmlCls.divStr + "alldialogs' class='" + divClass + " icn3d-dialog' style='margin-top:" + me.htmlCls.CMD_HEIGHT + "px'>";
11317
+ html += me.htmlCls.divStr + "alldialogs' class='" + divClass + " icn3d-dialog' style='margin-top:12px'>";
11275
11318
 
11276
11319
  html += me.htmlCls.divStr + "dl_2ddgm' class='" + dialogClass + " icn3d-dl_2ddgm' style='background-color:white'>";
11320
+ html += this.addNotebookTitle('dl_2ddgm', '2D Diagram', true);
11277
11321
  html += "</div>";
11278
11322
 
11279
11323
  html += me.htmlCls.divStr + "dl_2dctn' class='" + dialogClass + " icn3d-dl_2dctn' style='background-color:white'>";
11324
+ html += this.addNotebookTitle('dl_2dctn', '2D Cartoon');
11280
11325
 
11281
11326
  me.svgid_ct = me.pre + "icn3d_cartoon";
11282
11327
 
@@ -11304,14 +11349,17 @@ class SetDialog {
11304
11349
 
11305
11350
  // if(me.cfg.align !== undefined || me.cfg.chainalign !== undefined || ic.bRealign || ic.bSymd) {
11306
11351
  html += me.htmlCls.divStr + "dl_alignment' class='" + dialogClass + "' style='background-color:white;'>";
11352
+ html += this.addNotebookTitle('dl_alignment', 'Dynamically Calculated Symmetry using SymD');
11307
11353
  html += me.htmlCls.divStr + "symd_info'></div>";
11308
11354
  html += me.htmlCls.divStr + "alignseqguide_wrapper'><br>" + me.htmlCls.setHtmlCls.setAlignSequenceGuide() + "</div>";
11309
11355
  html += me.htmlCls.divStr + "dl_sequence2' class='icn3d-dl_sequence'>";
11356
+ html += this.addNotebookTitle('dl_sequence2', 'Select Residues in Aligned Sequences');
11310
11357
  html += "</div>";
11311
11358
  html += "</div>";
11312
11359
  // }
11313
11360
 
11314
11361
  html += me.htmlCls.divStr + "dl_definedsets' class='" + dialogClass + "'>";
11362
+ html += this.addNotebookTitle('dl_definedsets', 'Defined Sets');
11315
11363
  html += me.htmlCls.divStr + "dl_setsmenu'>";
11316
11364
  html += "<b>Defined Sets:</b> <br/>";
11317
11365
  html += "<select id='" + me.pre + "atomsCustom' multiple size='6' style='min-width:130px;'>";
@@ -11335,12 +11383,14 @@ class SetDialog {
11335
11383
  html += me.htmlCls.setHtmlCls.setAdvanced(2);
11336
11384
 
11337
11385
  html += me.htmlCls.divStr + "dl_vastplus' class='" + dialogClass + "' style='max-width:500px'>";
11386
+ html += this.addNotebookTitle('dl_vastplus', 'Please input PDB ID for VAST+');
11338
11387
  html += "Note: <b>VAST+</b> finds other macromolecular structures that have a similar biological unit. To do this, VAST+ takes into consideration the complete set of 3D domains that VAST identified within a query structure, throughout all of its component protein molecules, and finds other macromolecular structures that have a similar set of proteins/3D domains.<br><br>";
11339
11388
  html += "PDB ID: " + me.htmlCls.inputTextStr + "id='" + me.pre + "vastpluspdbid' value='6VXX' size=8><br>";
11340
11389
  html += me.htmlCls.buttonStr + "reload_vastplus'>VAST+</button>";
11341
11390
  html += "</div>";
11342
11391
 
11343
11392
  html += me.htmlCls.divStr + "dl_vast' class='" + dialogClass + "' style='max-width:500px'>";
11393
+ html += this.addNotebookTitle('dl_vast', 'Pleaes input chain or PDB file for VAST');
11344
11394
  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>';
11345
11395
 
11346
11396
  html += '<b>Optione 1</b>, search with your selection (all residues are selected by default) in the loaded structures:<br>';
@@ -11369,6 +11419,7 @@ class SetDialog {
11369
11419
  html += "</div>";
11370
11420
 
11371
11421
  html += me.htmlCls.divStr + "dl_foldseek' class='" + dialogClass + "' style='max-width:500px'>";
11422
+ html += this.addNotebookTitle('dl_foldseek', 'Submit your selection to Foldseek');
11372
11423
  html += '1. <input type="submit" id="' + me.pre + 'fssubmit" name="fssubmit" value="Submit"></input> your selection (all residues are selected by default) in the loaded structures to <a href="https://search.foldseek.com/search" target="_blank">Foldseek</a> web server.<br><br>';
11373
11424
  html += '2 (Optional). Once you see the structure neighbors, you can view the alignment in iCn3D by inputing a list of PDB chain IDs or AlphaFold UniProt IDs below. <br><br>The PDB chain IDs are the same as the record names such as "1HHO_A". The UniProt ID is the text between "AF-" and "-F1". For example, the UniProt ID for the record name "AF-P69905-F1-model_v4" is "P69905".<br><br>';
11374
11425
 
@@ -11377,16 +11428,19 @@ class SetDialog {
11377
11428
  html += "</div>";
11378
11429
 
11379
11430
  html += me.htmlCls.divStr + "dl_mmtfid' class='" + dialogClass + "'>";
11431
+ html += this.addNotebookTitle('dl_mmtfid', 'Please input an MMTF ID');
11380
11432
  html += "MMTF ID: " + me.htmlCls.inputTextStr + "id='" + me.pre + "mmtfid' value='1TUP' size=8> ";
11381
11433
  html += me.htmlCls.buttonStr + "reload_mmtf'>Load</button>";
11382
11434
  html += "</div>";
11383
11435
 
11384
11436
  html += me.htmlCls.divStr + "dl_pdbid' class='" + dialogClass + "'>";
11437
+ html += this.addNotebookTitle('dl_pdbid', 'Please input a PDB ID');
11385
11438
  html += "PDB ID: " + me.htmlCls.inputTextStr + "id='" + me.pre + "pdbid' value='1TUP' size=8> ";
11386
11439
  html += me.htmlCls.buttonStr + "reload_pdb'>Load</button>";
11387
11440
  html += "</div>";
11388
11441
 
11389
11442
  html += me.htmlCls.divStr + "dl_afid' class='" + dialogClass + "'>";
11443
+ html += this.addNotebookTitle('dl_afid', 'Please input an AlphaFold UniProt ID');
11390
11444
  html += "Note: AlphaFold produces a per-residue confidence score (pLDDT) between 0 and 100:<br>";
11391
11445
  html += me.htmlCls.clickMenuCls.setAlphaFoldLegend() + "<br>";
11392
11446
 
@@ -11399,27 +11453,32 @@ class SetDialog {
11399
11453
  html += "</div>";
11400
11454
 
11401
11455
  html += me.htmlCls.divStr + "dl_refseqid' class='" + dialogClass + "'>";
11456
+ html += this.addNotebookTitle('dl_refseqid', 'Please input an NCBI protein accession');
11402
11457
  html += "NCBI Protein Accession: " + me.htmlCls.inputTextStr + "id='" + me.pre + "refseqid' value='NP_001743.1' size=8> ";
11403
11458
  html += me.htmlCls.buttonStr + "reload_refseq'>Load</button>";
11404
11459
  html += "</div>";
11405
11460
 
11406
11461
  html += me.htmlCls.divStr + "dl_opmid' class='" + dialogClass + "'>";
11462
+ html += this.addNotebookTitle('dl_opmid', 'Please input an OPM PDB ID');
11407
11463
  html += "<a href='https://opm.phar.umich.edu' target='_blank'>Orientations of Proteins in Membranes(OPM)</a> PDB ID: " + me.htmlCls.inputTextStr + "id='" + me.pre + "opmid' value='6JXR' size=8> ";
11408
11464
  html += me.htmlCls.buttonStr + "reload_opm'>Load</button>";
11409
11465
  html += "</div>";
11410
11466
 
11411
11467
  html += me.htmlCls.divStr + "dl_pdbfile' class='" + dialogClass + "'>";
11468
+ html += this.addNotebookTitle('dl_pdbfile', 'Please input a PDB file');
11412
11469
  html += "Note: Several PDB files could be concatenated into a single PDB file. Use the line \"ENDMDL\" to separate PDB files.<br><br>";
11413
11470
  html += "PDB File: " + me.htmlCls.inputFileStr + " id='" + me.pre + "pdbfile' size=8> ";
11414
11471
  html += me.htmlCls.buttonStr + "reload_pdbfile'>Load</button>";
11415
11472
  html += "</div>";
11416
11473
 
11417
11474
  html += me.htmlCls.divStr + "dl_pdbfile_app' class='" + dialogClass + "'>";
11475
+ html += this.addNotebookTitle('dl_pdbfile_app', 'Please append PDB files');
11418
11476
  html += "Multiple PDB Files: <input type='file' multiple id='" + me.pre + "pdbfile_app' size=8> ";
11419
11477
  html += me.htmlCls.buttonStr + "reload_pdbfile_app'>Append</button>";
11420
11478
  html += "</div>";
11421
11479
 
11422
11480
  html += me.htmlCls.divStr + "dl_rescolorfile' class='" + dialogClass + "'>";
11481
+ html += this.addNotebookTitle('dl_rescolorfile', 'Please input a residue color file');
11423
11482
  html += '<div style="width:450px;">The custom JSON file on residue colors has the following format for proteins("ALA" and "ARG") and nucleotides("G" and "A"):<br>';
11424
11483
  html += '{"ALA":"#C8C8C8", "ARG":"#145AFF", ..., "G":"#008000", "A":"#6080FF", ...}</div><br>';
11425
11484
  html += "Residue Color File: " + me.htmlCls.inputFileStr + "id='" + me.pre + "rescolorfile' size=8> ";
@@ -11427,6 +11486,7 @@ class SetDialog {
11427
11486
  html += "</div>";
11428
11487
 
11429
11488
  html += me.htmlCls.divStr + "dl_customcolor' class='" + dialogClass + "'>";
11489
+ html += this.addNotebookTitle('dl_customcolor', 'Please input a custom color file');
11430
11490
  html += " <input type='hidden' id='" + me.pre + "customcolor_chainid' value=''>";
11431
11491
  html += '<div style="width:450px;">The custom file for the structure has two columns separated by space or tab: ';
11432
11492
  html += 'residue number, and score in the range of 0-100. If you click "Apply Custom Color" button, ';
@@ -11454,6 +11514,7 @@ class SetDialog {
11454
11514
  html += "</div>";
11455
11515
 
11456
11516
  html += me.htmlCls.divStr + "dl_customref' class='" + dialogClass + "'>";
11517
+ html += this.addNotebookTitle('dl_customref', 'Please input a reference number file');
11457
11518
  html += '<div style="width:550px;">You can define your own reference numbers in a custom file using Excel, and then export it as a CSV file. An example file is shown below with cells separated by commas.<br>';
11458
11519
  html += '<pre>refnum,11,12,,21,22,,10C,11C,20C<br>';
11459
11520
  html += '1TUP_A,100,101,,,132,,,,<br>';
@@ -11467,17 +11528,20 @@ class SetDialog {
11467
11528
  html += "</div>";
11468
11529
 
11469
11530
  html += me.htmlCls.divStr + "dl_align' class='" + dialogClass + "'>";
11531
+ html += this.addNotebookTitle('dl_align', 'Please select residues in aligned sequences');
11470
11532
  html += "Enter the PDB IDs or MMDB IDs of the structures: <br/><br/>ID1: " + me.htmlCls.inputTextStr + "id='" + me.pre + "alignid1' value='2DN3' size=8>" + me.htmlCls.space3 + me.htmlCls.space3 + "ID2: " + me.htmlCls.inputTextStr + "id='" + me.pre + "alignid2' value='4N7N' size=8><br/><br/>";
11471
11533
  html += "<b>VAST+ based on VAST</b>: " + me.htmlCls.buttonStr + "reload_align_ori'>All Matching Molecules Superposed</button>" + me.htmlCls.space3 + me.htmlCls.buttonStr + "reload_align_refined'>Invariant Substructure Superposed</button><br><br>";
11472
11534
  html += "<b>VAST+ based on TM-align</b>: " + me.htmlCls.buttonStr + "reload_align_tmalign'>All Matching Molecules Superposed</button><br><br>";
11473
11535
  html += "</div>";
11474
11536
 
11475
11537
  html += me.htmlCls.divStr + "dl_alignaf' class='" + dialogClass + "'>";
11538
+ html += this.addNotebookTitle('dl_alignaf', 'Align AlphaFold structures');
11476
11539
  html += "Enter two <a href='https://alphafold.ebi.ac.uk/' target='_blank'>AlphaFold Uniprot</a> IDs: <br/><br/>ID1: " + me.htmlCls.inputTextStr + "id='" + me.pre + "alignafid1' value='P41327' size=8>" + me.htmlCls.space3 + me.htmlCls.space3 + "ID2: " + me.htmlCls.inputTextStr + "id='" + me.pre + "alignafid2' value='P41331' size=8><br/><br/>";
11477
11540
  html += me.htmlCls.buttonStr + "reload_alignaf_tmalign'>Align with TM-align</button>" + me.htmlCls.buttonStr + "reload_alignaf' style='margin-left:30px'>Align with VAST</button>";
11478
11541
  html += "</div>";
11479
11542
 
11480
11543
  html += me.htmlCls.divStr + "dl_chainalign' class='" + dialogClass + "'>";
11544
+ html += this.addNotebookTitle('dl_chainalign', 'Align chains');
11481
11545
  html += "<div style='width:550px'>";
11482
11546
  html += "All chains will be aligned to the first chain in the comma-separated chain IDs. Each chain ID has the form of PDBID_chain (e.g., 1HHO_A, case sensitive) or UniprotID (e.g., P69905 for AlphaFold structures).<br/><br/>";
11483
11547
  html += "<b>Chain IDs</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "chainalignids' value='P69905,P01942,1HHO_A' size=50><br/><br/>";
@@ -11487,6 +11551,7 @@ class SetDialog {
11487
11551
  html += "</div></div>";
11488
11552
 
11489
11553
  html += me.htmlCls.divStr + "dl_chainalign2' class='" + dialogClass + "'>";
11554
+ html += this.addNotebookTitle('dl_chainalign2', 'Align chains');
11490
11555
  html += "<div style='width:550px'>";
11491
11556
  html += "All chains will be aligned to the first chain in the comma-separated chain IDs. Each chain ID has the form of PDBID_chain (e.g., 1HHO_A, case sensitive) or UniprotID (e.g., P69905 for AlphaFold structures).<br/><br/>";
11492
11557
  html += "<b>Chain IDs</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "chainalignids2' value='P69905,P01942,1HHO_A' size=50><br/><br/>";
@@ -11498,11 +11563,13 @@ class SetDialog {
11498
11563
  html += "</div></div>";
11499
11564
 
11500
11565
  html += me.htmlCls.divStr + "dl_chainalign3' class='" + dialogClass + "'>";
11566
+ html += this.addNotebookTitle('dl_chainalign3', 'Align chains');
11501
11567
  html += "<div style='width:550px'>";
11502
11568
  html += this.getHtmlAlignResidueByResidue('chainalignids3', 'predefinedres', 'reload_chainalign_asym3');
11503
11569
  html += "</div></div>";
11504
11570
 
11505
11571
  html += me.htmlCls.divStr + "dl_realignresbyres' class='" + dialogClass + "'>";
11572
+ html += this.addNotebookTitle('dl_realignresbyres', 'Realign residue by residue');
11506
11573
  html += "<div style='width:550px'>";
11507
11574
  html += "<b>Option 1</b>: " + me.htmlCls.buttonStr + "realignSelection'><b>Realign Current Selection Residue by Residue</b></button><br/><br/>";
11508
11575
  html += "<b>Option 2</b>: <br>";
@@ -11510,6 +11577,7 @@ class SetDialog {
11510
11577
  html += "</div></div>";
11511
11578
 
11512
11579
  html += me.htmlCls.divStr + "dl_mutation' class='" + dialogClass + "'>";
11580
+ html += this.addNotebookTitle('dl_mutation', 'Mutation analysis');
11513
11581
  html += "<div style='width:500px'>";
11514
11582
  html += 'Please specify the mutations with a comma separated mutation list. Each mutation can be specified as "[<b>uppercase</b> PDB ID or AlphaFold UniProt ID]_[Chain Name]_[Residue Number]_[One Letter Mutant Residue]". E.g., the mutation of N501Y in the E chain of PDB 6M0J can be specified as "6M0J_E_501_Y". For AlphaFold structures, the "Chain ID" is "A".<br/>If you load a custom structure without PDB or UniProt ID, you can open "Seq. & Annotations" window and find the chain ID such as "stru_A". The part before the underscore is the structure ID, which can be used to specify the mutation such as "stru_A_...". Remember to choose "Show Mutation in: Current Page".<br/><br/>';
11515
11583
  html += "<div style='display:inline-block; width:110px'>Mutations: </div>" + me.htmlCls.inputTextStr + "id='" + me.pre + "mutationids' value='6M0J_E_484_K,6M0J_E_501_Y,6M0J_E_417_N' size=50><br/><br/>";
@@ -11528,25 +11596,30 @@ class SetDialog {
11528
11596
  html += "<br/><br/></div></div>";
11529
11597
 
11530
11598
  html += me.htmlCls.divStr + "dl_mol2file' class='" + dialogClass + "'>";
11599
+ html += this.addNotebookTitle('dl_mol2file', 'Please input a Mol2 file');
11531
11600
  html += "Mol2 File: " + me.htmlCls.inputFileStr + "id='" + me.pre + "mol2file' size=8> ";
11532
11601
  html += me.htmlCls.buttonStr + "reload_mol2file'>Load</button>";
11533
11602
  html += "</div>";
11534
11603
  html += me.htmlCls.divStr + "dl_sdffile' class='" + dialogClass + "'>";
11604
+ html += this.addNotebookTitle('dl_sdffile', 'Please input an SDF file');
11535
11605
  html += "SDF File: " + me.htmlCls.inputFileStr + "id='" + me.pre + "sdffile' size=8> ";
11536
11606
  html += me.htmlCls.buttonStr + "reload_sdffile'>Load</button>";
11537
11607
  html += "</div>";
11538
11608
  html += me.htmlCls.divStr + "dl_xyzfile' class='" + dialogClass + "'>";
11609
+ html += this.addNotebookTitle('dl_xyzfile', 'Please input an XYZ file');
11539
11610
  html += "XYZ File: " + me.htmlCls.inputFileStr + "id='" + me.pre + "xyzfile' size=8> ";
11540
11611
  html += me.htmlCls.buttonStr + "reload_xyzfile'>Load</button>";
11541
11612
  html += "</div>";
11542
11613
 
11543
11614
  html += me.htmlCls.divStr + "dl_afmapfile' class='" + dialogClass + "'>";
11615
+ html += this.addNotebookTitle('dl_afmapfile', 'Please input an AlphaFold PAE file');
11544
11616
  html += "AlphaFold PAE File: " + me.htmlCls.inputFileStr + "id='" + me.pre + "afmapfile' size=8> <br><br>";
11545
11617
  html += me.htmlCls.buttonStr + "reload_afmapfile'>Load Half PAE Map</button>"
11546
11618
  + me.htmlCls.buttonStr + "reload_afmapfilefull' style='margin-left:30px'>Load Full PAE Map (slow)</button>";
11547
11619
  html += "</div>";
11548
11620
 
11549
11621
  html += me.htmlCls.divStr + "dl_urlfile' class='" + dialogClass + "'>";
11622
+ html += this.addNotebookTitle('dl_urlfile', 'Please input a file via URL');
11550
11623
  html += "File type: ";
11551
11624
  html += "<select id='" + me.pre + "filetype'>";
11552
11625
  html += me.htmlCls.optionStr + "'pdb' selected>PDB</option>";
@@ -11562,16 +11635,19 @@ class SetDialog {
11562
11635
  html += "</div>";
11563
11636
 
11564
11637
  html += me.htmlCls.divStr + "dl_mmciffile' class='" + dialogClass + "'>";
11638
+ html += this.addNotebookTitle('dl_mmciffile', 'Please input an mmCIF file');
11565
11639
  html += "mmCIF File: " + me.htmlCls.inputFileStr + "id='" + me.pre + "mmciffile' value='1TUP' size=8> ";
11566
11640
  html += me.htmlCls.buttonStr + "reload_mmciffile'>Load</button>";
11567
11641
  html += "</div>";
11568
11642
 
11569
11643
  html += me.htmlCls.divStr + "dl_mmcifid' class='" + dialogClass + "'>";
11644
+ html += this.addNotebookTitle('dl_mmcifid', 'Please input an mmCIF ID');
11570
11645
  html += "mmCIF ID: " + me.htmlCls.inputTextStr + "id='" + me.pre + "mmcifid' value='1TUP' size=8> ";
11571
11646
  html += me.htmlCls.buttonStr + "reload_mmcif'>Load</button>";
11572
11647
  html += "</div>";
11573
11648
 
11574
11649
  html += me.htmlCls.divStr + "dl_mmdbid' class='" + dialogClass + "' style='max-width:500px'>";
11650
+ html += this.addNotebookTitle('dl_mmdbid', 'Please input an MMDB ID');
11575
11651
  html += "MMDB or PDB ID: " + me.htmlCls.inputTextStr + "id='" + me.pre + "mmdbid' value='1TUP' size=8> <br><br>";
11576
11652
  html += me.htmlCls.buttonStr + "reload_mmdb_asym'>Load Asymmetric Unit (All Chains)</button>" + me.htmlCls.buttonStr + "reload_mmdb' style='margin-left:30px'>Load Biological Unit</button><br/><br/><br>";
11577
11653
  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="'
@@ -11584,6 +11660,7 @@ class SetDialog {
11584
11660
  html += "</div>";
11585
11661
 
11586
11662
  html += me.htmlCls.divStr + "dl_mmdbafid' class='" + dialogClass + "' style='max-width:600px'>";
11663
+ html += this.addNotebookTitle('dl_mmdbafid', 'Please input a list of PDB/AlphaFold IDs');
11587
11664
  html += "List of PDB, MMDB, or AlphaFold UniProt structures: " + me.htmlCls.inputTextStr + "id='" + me.pre + "mmdbafid' placeholder='e.g., 1HHO,4N7N,P69905,P01942' size=30> <br><br>";
11588
11665
  html += "<div style='display:inline-block; width:20px'></div>" + me.htmlCls.buttonStr + "reload_mmdbaf' style='width:150px'>Load Biological Unit</button>" + me.htmlCls.buttonStr + "reload_mmdbaf_asym' style='margin-left:30px; width:250px'>Load Asymmetric Unit (All Chains)</button>" + "<br/><br/>";
11589
11666
  html += "<div style='display:inline-block; width:20px'>or</div>" + me.htmlCls.buttonStr + "reload_mmdbaf_append' style='width:150px'>Append Biological Unit</button>" + me.htmlCls.buttonStr + "reload_mmdbaf_asym_append' style='margin-left:30px; width:250px'>Append Asymmetric Unit (All Chains)</button>" + "<br/><br/>";
@@ -11598,6 +11675,7 @@ class SetDialog {
11598
11675
  html += "</div>";
11599
11676
 
11600
11677
  html += me.htmlCls.divStr + "dl_blast_rep_id' style='max-width:600px;' class='" + dialogClass + "'>";
11678
+ html += this.addNotebookTitle('dl_blast_rep_id', 'Align sequence to structure');
11601
11679
  html += "Enter a Sequence ID (or FASTA sequence) and the aligned protein accession, which can be found using the <a href='https://blast.ncbi.nlm.nih.gov/Blast.cgi?PROGRAM=blastp&PAGE_TYPE=BlastSearch' target='_blank'>BLAST</a> search with the Sequence ID or FASTA sequence as input. If the protein accession is not a PDB chain, the corresponding AlphaFold UniProt structure is used.<br><br> ";
11602
11680
  html += "<b>Sequence ID</b>(NCBI protein accession of a sequence): " + me.htmlCls.inputTextStr + "id='" + me.pre + "query_id' value='NP_001108451.1' size=8><br> ";
11603
11681
  html += "or FASTA sequence: <br><textarea id='" + me.pre + "query_fasta' rows='5' style='width: 100%; height: " +(me.htmlCls.LOG_HEIGHT) + "px; padding: 0px; border: 0px;'></textarea><br><br>";
@@ -11609,32 +11687,38 @@ class SetDialog {
11609
11687
  html += "</div>";
11610
11688
 
11611
11689
  html += me.htmlCls.divStr + "dl_yournote' class='" + dialogClass + "'>";
11690
+ html += this.addNotebookTitle('dl_yournote', 'Your Note');
11612
11691
  html += "Your note will be saved in the HTML file when you click \"File > Save File > iCn3D PNG Image\".<br><br>";
11613
11692
  html += "<textarea id='" + me.pre + "yournote' rows='5' style='width: 100%; height: " +(me.htmlCls.LOG_HEIGHT) + "px; padding: 0px; border: 0px;' placeholder='Enter your note here'></textarea><br>";
11614
11693
  html += me.htmlCls.buttonStr + "applyyournote'>Save</button>";
11615
11694
  html += "</div>";
11616
11695
 
11617
11696
  html += me.htmlCls.divStr + "dl_gi' class='" + dialogClass + "'>";
11697
+ html += this.addNotebookTitle('dl_gi', 'Please input an NCBI gi');
11618
11698
  html += "Protein gi: " + me.htmlCls.inputTextStr + "id='" + me.pre + "gi' value='1310960' size=8> ";
11619
11699
  html += me.htmlCls.buttonStr + "reload_gi'>Load</button>";
11620
11700
  html += "</div>";
11621
11701
 
11622
11702
  html += me.htmlCls.divStr + "dl_cid' class='" + dialogClass + "'>";
11703
+ html += this.addNotebookTitle('dl_cid', 'Please input a PubChem CID');
11623
11704
  html += "PubChem CID: " + me.htmlCls.inputTextStr + "id='" + me.pre + "cid' value='2244' size=8> ";
11624
11705
  html += me.htmlCls.buttonStr + "reload_cid'>Load</button>";
11625
11706
  html += "</div>";
11626
11707
 
11627
11708
  html += me.htmlCls.divStr + "dl_pngimage' class='" + dialogClass + "'>";
11709
+ html += this.addNotebookTitle('dl_pngimage', 'Please input an iCn3D PNG Image file');
11628
11710
  html += "iCn3D PNG image: " + me.htmlCls.inputFileStr + "id='" + me.pre + "pngimage'><br/>";
11629
11711
  html += me.htmlCls.buttonStr + "reload_pngimage' style='margin-top: 6px;'>Load</button>";
11630
11712
  html += "</div>";
11631
11713
 
11632
11714
  html += me.htmlCls.divStr + "dl_state' class='" + dialogClass + "'>";
11715
+ html += this.addNotebookTitle('dl_state', 'Please input a state file');
11633
11716
  html += "State file: " + me.htmlCls.inputFileStr + "id='" + me.pre + "state'><br/>";
11634
11717
  html += me.htmlCls.buttonStr + "reload_state' style='margin-top: 6px;'>Load</button>";
11635
11718
  html += "</div>";
11636
11719
 
11637
11720
  html += me.htmlCls.divStr + "dl_fixedversion' style='max-width:500px' class='" + dialogClass + "'>";
11721
+ html += this.addNotebookTitle('dl_fixedversion', 'Use fixed version of iCn3D');
11638
11722
  html += "Since January 6, 2021, you can show the original view with the archived version of iCn3D by pasting your URL below and click \"Show Originial View\". Note the version in the parameter \"v\" was used to replace \"full.html\" with \"full_[v].html\" in the URL.<br><br>";
11639
11723
  html += "Share Link URL: " + me.htmlCls.inputTextStr + "id='" + me.pre + "sharelinkurl' size=60><br>";
11640
11724
  html += me.htmlCls.buttonStr + "reload_fixedversion'>Show Original View</button><br><br>";
@@ -11642,16 +11726,19 @@ class SetDialog {
11642
11726
 
11643
11727
 
11644
11728
  html += me.htmlCls.divStr + "dl_selection' class='" + dialogClass + "'>";
11729
+ html += this.addNotebookTitle('dl_selection', 'Load a selection file');
11645
11730
  html += "Selection file: " + me.htmlCls.inputFileStr + "id='" + me.pre + "selectionfile'><br/>";
11646
11731
  html += me.htmlCls.buttonStr + "reload_selectionfile' style='margin-top: 6px;'>Load</button>";
11647
11732
  html += "</div>";
11648
11733
 
11649
11734
  html += me.htmlCls.divStr + "dl_menuloadpref' class='" + dialogClass + "'>";
11735
+ html += this.addNotebookTitle('dl_menuloadpref', 'Load a preference file');
11650
11736
  html += "Preference file: " + me.htmlCls.inputFileStr + "id='" + me.pre + "menupreffile'><br/>";
11651
11737
  html += me.htmlCls.buttonStr + "reload_menupreffile' style='margin-top: 6px;'>Load</button>";
11652
11738
  html += "</div>";
11653
11739
 
11654
11740
  html += me.htmlCls.divStr + "dl_dsn6' class='" + dialogClass + "'>";
11741
+ html += this.addNotebookTitle('dl_dsn6', 'Load a DSN6 file');
11655
11742
  html += "<b>Note</b>: Always load a PDB file before loading DSN6 files. <br/><br/><br/>";
11656
11743
 
11657
11744
  html += "<span style='white-space:nowrap;font-weight:bold;'>2fofc contour at: <select id='" + me.pre + "dsn6sigma2fofc'>";
@@ -11674,6 +11761,7 @@ class SetDialog {
11674
11761
  html += "</div>";
11675
11762
 
11676
11763
  html += me.htmlCls.divStr + "dl_dsn6url' class='" + dialogClass + "'>";
11764
+ html += this.addNotebookTitle('dl_dsn6url', 'Load a selection file via a URL');
11677
11765
  html += "<b>Note</b>: Always load a PDB file before loading DSN6 files. <br/><br/><br/>";
11678
11766
 
11679
11767
  html += "<span style='white-space:nowrap;font-weight:bold;'>2fofc contour at: <select id='" + me.pre + "dsn6sigmaurl2fofc'>";
@@ -11695,6 +11783,7 @@ class SetDialog {
11695
11783
  html += "</div>";
11696
11784
 
11697
11785
  html += me.htmlCls.divStr + "dl_clr' class='" + dialogClass + "'>";
11786
+ html += this.addNotebookTitle('dl_clr', 'Pick a color');
11698
11787
  html += "Click in the input box to use the color picker:<br><br> ";
11699
11788
  html += "Custom Color: " + me.htmlCls.inputTextStr + "id='" + me.pre + "colorcustom' value='FF0000' size=8> ";
11700
11789
  html += me.htmlCls.buttonStr + "applycustomcolor'>Apply</button>";
@@ -11706,6 +11795,7 @@ class SetDialog {
11706
11795
  html += me.htmlCls.setHtmlCls.getPotentialHtml('url', dialogClass);
11707
11796
 
11708
11797
  html += me.htmlCls.divStr + "dl_symmetry' class='" + dialogClass + "'><br>";
11798
+ html += this.addNotebookTitle('dl_symmetry', 'Symmetry');
11709
11799
  html += me.htmlCls.divNowrapStr + "Symmetry: <select id='" + me.pre + "selectSymmetry'>";
11710
11800
  html += "</select>" + me.htmlCls.space3;
11711
11801
  html += me.htmlCls.buttonStr + "applysymmetry'>Apply</button>" + me.htmlCls.space3;
@@ -11713,10 +11803,12 @@ class SetDialog {
11713
11803
  html += "</div>";
11714
11804
 
11715
11805
  html += me.htmlCls.divStr + "dl_symd' style='max-width:400px' class='" + dialogClass + "'><br>";
11806
+ html += this.addNotebookTitle('dl_symd', 'Dynamically symmetry calculation using SymD');
11716
11807
 
11717
11808
  html += "</div>";
11718
11809
 
11719
11810
  html += me.htmlCls.divStr + "dl_contact' class='" + dialogClass + "'>";
11811
+ html += this.addNotebookTitle('dl_contact', 'Contact Map');
11720
11812
  html += "<span style='white-space:nowrap;font-weight:bold;'>Distance: <select id='" + me.pre + "contactdist'>";
11721
11813
  html += me.htmlCls.setHtmlCls.getOptionHtml(['4', '5', '6', '7', '8', '9', '10'], 4);
11722
11814
  html += "</select></span>";
@@ -11729,6 +11821,7 @@ class SetDialog {
11729
11821
  html += "</div>";
11730
11822
 
11731
11823
  html += me.htmlCls.divStr + "dl_hbonds' class='" + dialogClass + "'>";
11824
+ html += this.addNotebookTitle('dl_hbonds', 'Interaction Analysis');
11732
11825
  html += "1. Choose interaction types and their thresholds:<br>";
11733
11826
  html += "<div class='icn3d-box'><table border=0 width=450><tr>";
11734
11827
  html += "<td style='white-space:nowrap'>" + me.htmlCls.inputCheckStr + "id='" + me.pre + "analysis_hbond' checked>Hydrogen Bonds <span style='background-color:#" + me.htmlCls.hbondColor + "'>" + me.htmlCls.space3 + "</span></td>";
@@ -11827,6 +11920,7 @@ class SetDialog {
11827
11920
  html += "</div>";
11828
11921
 
11829
11922
  html += me.htmlCls.divStr + "dl_realign' class='" + dialogClass + "'>";
11923
+ html += this.addNotebookTitle('dl_realign', 'Realign by sequence');
11830
11924
 
11831
11925
  html += me.htmlCls.divNowrapStr + "1. Select sets below <br>or use your current selection:</div><br>";
11832
11926
  html += "<div style='text-indent:1.1em'><select id='" + me.pre + "atomsCustomRealign' multiple size='5' style='min-width:130px;'>";
@@ -11836,6 +11930,7 @@ class SetDialog {
11836
11930
  html += "</div>";
11837
11931
 
11838
11932
  html += me.htmlCls.divStr + "dl_realignbystruct' class='" + dialogClass + "' style='max-width:500px'>";
11933
+ html += this.addNotebookTitle('dl_realignbystruct', 'Realign by structure');
11839
11934
 
11840
11935
  //html += "<div><b>1</b>. There are two options to align chains. Option \"a\" is to select a list of chains below, and align all chains to the first chain. Option \"b\" is to select sets below or use your current selection, and align all chains pairwise.</div><br>";
11841
11936
  html += "<div><b>1</b>. Select sets below or use your current selection.</div><br>";
@@ -11851,6 +11946,7 @@ class SetDialog {
11851
11946
  html += "</div>";
11852
11947
 
11853
11948
  html += me.htmlCls.divStr + "dl_realigntwostru' class='" + dialogClass + "'>";
11949
+ html += this.addNotebookTitle('dl_realigntwostru', 'Realign two structure complexes');
11854
11950
 
11855
11951
  html += me.htmlCls.divNowrapStr + "1. Select sets below or use your current selection:</div><br>";
11856
11952
  html += "<div style='text-indent:1.1em'><select id='" + me.pre + "atomsCustomRealignByStruct2' multiple size='5' style='min-width:130px;'>";
@@ -11863,6 +11959,7 @@ class SetDialog {
11863
11959
 
11864
11960
 
11865
11961
  html += me.htmlCls.divStr + "dl_colorspectrumacrosssets' class='" + dialogClass + "'>";
11962
+ html += this.addNotebookTitle('dl_colorspectrumacrosssets', 'Set color spectrum across sets');
11866
11963
 
11867
11964
  html += me.htmlCls.divNowrapStr + "1. Select sets below:</div><br>";
11868
11965
  html += "<div style='text-indent:1.1em'><select id='" + me.pre + "atomsCustomColorSpectrumAcross' multiple size='5' style='min-width:130px;'>";
@@ -11873,7 +11970,7 @@ class SetDialog {
11873
11970
 
11874
11971
 
11875
11972
  html += me.htmlCls.divStr + "dl_colorspectrumbysets' class='" + dialogClass + "'>";
11876
-
11973
+ html += this.addNotebookTitle('dl_colorspectrumbysets', 'Set color spectrum for residues in sets');
11877
11974
  html += me.htmlCls.divNowrapStr + "1. Select sets below:</div><br>";
11878
11975
  html += "<div style='text-indent:1.1em'><select id='" + me.pre + "atomsCustomColorSpectrum' multiple size='5' style='min-width:130px;'>";
11879
11976
  html += "</select></div>";
@@ -11883,7 +11980,7 @@ class SetDialog {
11883
11980
 
11884
11981
 
11885
11982
  html += me.htmlCls.divStr + "dl_colorrainbowacrosssets' class='" + dialogClass + "'>";
11886
-
11983
+ html += this.addNotebookTitle('dl_colorrainbowacrosssets', 'Set color rainbow across sets');
11887
11984
  html += me.htmlCls.divNowrapStr + "1. Select sets below:</div><br>";
11888
11985
  html += "<div style='text-indent:1.1em'><select id='" + me.pre + "atomsCustomColorRainbowAcross' multiple size='5' style='min-width:130px;'>";
11889
11986
  html += "</select></div>";
@@ -11893,7 +11990,7 @@ class SetDialog {
11893
11990
 
11894
11991
 
11895
11992
  html += me.htmlCls.divStr + "dl_colorrainbowbysets' class='" + dialogClass + "'>";
11896
-
11993
+ html += this.addNotebookTitle('dl_colorrainbowbysets', 'Set color rainbow for residues in sets');
11897
11994
  html += me.htmlCls.divNowrapStr + "1. Select sets below:</div><br>";
11898
11995
  html += "<div style='text-indent:1.1em'><select id='" + me.pre + "atomsCustomColorRainbow' multiple size='5' style='min-width:130px;'>";
11899
11996
  html += "</select></div>";
@@ -11903,12 +12000,15 @@ class SetDialog {
11903
12000
 
11904
12001
 
11905
12002
  html += me.htmlCls.divStr + "dl_allinteraction' style='background-color:white' class='" + dialogClass + "'>";
12003
+ html += this.addNotebookTitle('dl_allinteraction', 'All interactions', true);
11906
12004
  html += "</div>";
11907
12005
 
11908
12006
  html += me.htmlCls.divStr + "dl_interactionsorted' style='background-color:white' class='" + dialogClass + "'>";
12007
+ html += this.addNotebookTitle('dl_interactionsorted', 'Sorted interactions', true);
11909
12008
  html += "</div>";
11910
12009
 
11911
12010
  html += me.htmlCls.divStr + "dl_linegraph' style='background-color:white' class='" + dialogClass + "'>";
12011
+ html += this.addNotebookTitle('dl_linegraph', '2D Interaction Network');
11912
12012
 
11913
12013
  html += me.htmlCls.divNowrapStr + '<div style="width:20px; margin-top:6px; display:inline-block;"><span id="'
11914
12014
  + me.pre + 'dl_linegraphcolor_expand" class="ui-icon ui-icon-plus icn3d-expand icn3d-link" style="display:none; width:15px;" title="Expand"></span><span id="'
@@ -11939,6 +12039,7 @@ class SetDialog {
11939
12039
  html += "</div>";
11940
12040
 
11941
12041
  html += me.htmlCls.divStr + "dl_scatterplot' style='background-color:white' class='" + dialogClass + "'>";
12042
+ html += this.addNotebookTitle('dl_scatterplot', '2D Interaction Map');
11942
12043
 
11943
12044
  html += me.htmlCls.divNowrapStr + "Hold Ctrl key to select multiple nodes." + me.htmlCls.space3;
11944
12045
 
@@ -11965,6 +12066,7 @@ class SetDialog {
11965
12066
  html += "</div>";
11966
12067
 
11967
12068
  html += me.htmlCls.divStr + "dl_contactmap' style='background-color:white' class='" + dialogClass + "'>";
12069
+ html += this.addNotebookTitle('dl_contactmap', 'Contact Map');
11968
12070
 
11969
12071
  html += me.htmlCls.divNowrapStr + "Hold Ctrl key to select multiple nodes." + me.htmlCls.space3 + "</div>";
11970
12072
 
@@ -11983,6 +12085,7 @@ class SetDialog {
11983
12085
  html += "</div>";
11984
12086
 
11985
12087
  html += me.htmlCls.divStr + "dl_alignerrormap' style='background-color:white' class='" + dialogClass + "'>";
12088
+ html += this.addNotebookTitle('dl_alignerrormap', 'PAE Map');
11986
12089
 
11987
12090
  html += me.htmlCls.divNowrapStr + "Hold Ctrl key to select multiple nodes." + me.htmlCls.space3 + "</div>";
11988
12091
 
@@ -12010,6 +12113,7 @@ class SetDialog {
12010
12113
  html += "</div>";
12011
12114
 
12012
12115
  html += me.htmlCls.divStr + "dl_elecmap2fofc' class='" + dialogClass + "'>";
12116
+ html += this.addNotebookTitle('dl_elecmap2fofc', 'Electron Density 2F0-Fc Map');
12013
12117
  html += "<span style='white-space:nowrap;font-weight:bold;'>Contour at: <select id='" + me.pre + "sigma2fofc'>";
12014
12118
 
12015
12119
  html += me.htmlCls.setHtmlCls.getOptionHtml(optArray1, 3);
@@ -12018,6 +12122,7 @@ class SetDialog {
12018
12122
  html += "</div>";
12019
12123
 
12020
12124
  html += me.htmlCls.divStr + "dl_elecmapfofc' class='" + dialogClass + "'>";
12125
+ html += this.addNotebookTitle('dl_elecmapfofc', 'Electron Density F0-Fc Map');
12021
12126
  html += "<span style='white-space:nowrap;font-weight:bold;'>Contour at: <select id='" + me.pre + "sigmafofc'>";
12022
12127
 
12023
12128
  html += me.htmlCls.setHtmlCls.getOptionHtml(optArray1, 5);
@@ -12026,6 +12131,7 @@ class SetDialog {
12026
12131
  html += "</div>";
12027
12132
 
12028
12133
  html += me.htmlCls.divStr + "dl_emmap' class='" + dialogClass + "'>";
12134
+ html += this.addNotebookTitle('dl_emmap', 'EM Density Map');
12029
12135
  html += "<span style='white-space:nowrap;font-weight:bold;'>Contour at: <select id='" + me.pre + "empercentage'>";
12030
12136
 
12031
12137
  html += me.htmlCls.setHtmlCls.getOptionHtml(['0', '10', '20', '30', '40', '50', '60', '70', '80', '90', '100'], 3);
@@ -12034,6 +12140,7 @@ class SetDialog {
12034
12140
  html += "</div>";
12035
12141
 
12036
12142
  html += me.htmlCls.divStr + "dl_aroundsphere' class='" + dialogClass + "'>";
12143
+ html += this.addNotebookTitle('dl_aroundsphere', 'Select a sphere around a set of residues');
12037
12144
  html += me.htmlCls.divNowrapStr + "1. Select the first set:</div>";
12038
12145
  html += "<div style='text-indent:1.1em'><select id='" + me.pre + "atomsCustomSphere2' multiple size='3' style='min-width:130px;'>";
12039
12146
  html += "</select></div><br>";
@@ -12048,6 +12155,7 @@ class SetDialog {
12048
12155
  html += "</div>";
12049
12156
 
12050
12157
  html += me.htmlCls.divStr + "dl_adjustmem' class='" + dialogClass + "'>";
12158
+ html += this.addNotebookTitle('dl_adjustmem', 'Adjust membranes');
12051
12159
  html += "<b>Note</b>: The membranes are parallel to the X-Y plane. The center of the membranes is at Z = 0. <br/><br/>";
12052
12160
  html += me.htmlCls.divNowrapStr + "1. Extracellular membrane Z-axis position: " + me.htmlCls.inputTextStr + "id='" + me.pre + "extra_mem_z' value='' size='3'> &#197;</div><br/>";
12053
12161
  html += me.htmlCls.divNowrapStr + "2. intracellular membrane Z-axis position: " + me.htmlCls.inputTextStr + "id='" + me.pre + "intra_mem_z' value='' size='3'> &#197;</div><br/>";
@@ -12055,6 +12163,7 @@ class SetDialog {
12055
12163
  html += "</div>";
12056
12164
 
12057
12165
  html += me.htmlCls.divStr + "dl_selectplane' class='" + dialogClass + "'>";
12166
+ html += this.addNotebookTitle('dl_selectplane', 'Select a plane');
12058
12167
  html += "<b>Note</b>: The membranes are parallel to the X-Y plane. The center of the membranes is at Z = 0. <br/><br/>";
12059
12168
  html += me.htmlCls.divNowrapStr + "1. Z-axis position of the first X-Y plane: " + me.htmlCls.inputTextStr + "id='" + me.pre + "selectplane_z1' value='15' size='3'> &#197;</div><br/>";
12060
12169
  html += me.htmlCls.divNowrapStr + "2. Z-axis position of the second X-Y plane: " + me.htmlCls.inputTextStr + "id='" + me.pre + "selectplane_z2' value='-15' size='3'> &#197;</div><br/>";
@@ -12062,6 +12171,7 @@ class SetDialog {
12062
12171
  html += "</div>";
12063
12172
 
12064
12173
  html += me.htmlCls.divStr + "dl_addlabel' class='" + dialogClass + "'>";
12174
+ html += this.addNotebookTitle('dl_addlabel', 'Add labels between two atoms');
12065
12175
  html += "1. Text: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labeltext' value='Text' size=4><br/>";
12066
12176
  html += "2. Size: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labelsize' value='18' size=4 maxlength=2><br/>";
12067
12177
  html += "3. Color: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labelcolor' value='" + defaultColor + "' size=4><br/>";
@@ -12076,6 +12186,7 @@ class SetDialog {
12076
12186
  html += "</div>";
12077
12187
 
12078
12188
  html += me.htmlCls.divStr + "dl_addlabelselection' class='" + dialogClass + "'>";
12189
+ html += this.addNotebookTitle('dl_addlabelselection', 'Add labels for your selection');
12079
12190
  html += "1. Text: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labeltext2' value='Text' size=4><br/>";
12080
12191
  html += "2. Size: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labelsize2' value='18' size=4 maxlength=2><br/>";
12081
12192
  html += "3. Color: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labelcolor2' value='" + defaultColor + "' size=4><br/>";
@@ -12084,11 +12195,13 @@ class SetDialog {
12084
12195
  html += "</div>";
12085
12196
 
12086
12197
  html += me.htmlCls.divStr + "dl_labelColor' class='" + dialogClass + "'>";
12198
+ html += this.addNotebookTitle('dl_labelColor', 'Change label color');
12087
12199
  html += "Color for all labels: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labelcolorall' value='" + defaultColor + "' size=4><br/><br/>";
12088
12200
  html += me.htmlCls.spanNowrapStr + me.htmlCls.buttonStr + "applylabelcolor'>Display</button></span>";
12089
12201
  html += "</div>";
12090
12202
 
12091
12203
  html += me.htmlCls.divStr + "dl_distance' class='" + dialogClass + "'>";
12204
+ html += this.addNotebookTitle('dl_distance', 'Measure distance');
12092
12205
  if(me.utilsCls.isMobile()) {
12093
12206
  html += me.htmlCls.spanNowrapStr + "1. Touch TWO atoms</span><br/>";
12094
12207
  }
@@ -12100,6 +12213,7 @@ class SetDialog {
12100
12213
  html += "</div>";
12101
12214
 
12102
12215
  html += me.htmlCls.divStr + "dl_stabilizer' class='" + dialogClass + "'>";
12216
+ html += this.addNotebookTitle('dl_stabilizer', 'Add a stabilizer');
12103
12217
  if(me.utilsCls.isMobile()) {
12104
12218
  html += me.htmlCls.spanNowrapStr + "1. Touch TWO atoms</span><br/>";
12105
12219
  }
@@ -12111,6 +12225,7 @@ class SetDialog {
12111
12225
  html += "</div>";
12112
12226
 
12113
12227
  html += me.htmlCls.divStr + "dl_disttwosets' class='" + dialogClass + "'>";
12228
+ html += this.addNotebookTitle('dl_disttwosets', 'Measure the distance between two sets');
12114
12229
  html += me.htmlCls.spanNowrapStr + "1. Select two sets</span><br/>";
12115
12230
  html += "<table border=0 width=400 cellspacing=10><tr><td>";
12116
12231
 
@@ -12132,6 +12247,7 @@ class SetDialog {
12132
12247
 
12133
12248
 
12134
12249
  html += me.htmlCls.divStr + "dl_linebtwsets' class='" + dialogClass + "'>";
12250
+ html += this.addNotebookTitle('dl_linebtwsets', 'Add a line between two sets');
12135
12251
  html += me.htmlCls.spanNowrapStr + "1. Select two sets</span><br/>";
12136
12252
  html += "<table border=0 width=400 cellspacing=10><tr><td>";
12137
12253
 
@@ -12165,6 +12281,7 @@ class SetDialog {
12165
12281
 
12166
12282
 
12167
12283
  html += me.htmlCls.divStr + "dl_cartoonshape' class='" + dialogClass + "'>";
12284
+ html += this.addNotebookTitle('dl_cartoonshape', 'Cartoon Shape');
12168
12285
  html += me.htmlCls.spanNowrapStr + "1. Select a set:</span><br/>";
12169
12286
  html += "<div style='text-indent:1.1em'><select style='max-width:200px' id='" + me.pre + "cartoonshape' multiple size='5' style='min-width:130px;'>";
12170
12287
  html += "</select></div><br>";
@@ -12187,6 +12304,7 @@ class SetDialog {
12187
12304
 
12188
12305
 
12189
12306
  html += me.htmlCls.divStr + "dl_distmanysets' class='" + dialogClass + "'>";
12307
+ html += this.addNotebookTitle('dl_distmanysets', 'Measure distances among many sets');
12190
12308
  html += me.htmlCls.spanNowrapStr + "1. Select sets for pairwise distances</span><br/>";
12191
12309
  html += "<table border=0 width=400 cellspacing=10><tr><td>";
12192
12310
 
@@ -12206,6 +12324,7 @@ class SetDialog {
12206
12324
  html += "</div>";
12207
12325
 
12208
12326
  html += me.htmlCls.divStr + "dl_stabilizer_rm' class='" + dialogClass + "'>";
12327
+ html += this.addNotebookTitle('dl_stabilizer_rm', 'Remove a stabilizer');
12209
12328
  if(me.utilsCls.isMobile()) {
12210
12329
  html += me.htmlCls.spanNowrapStr + "1. Touch TWO atoms</span><br/>";
12211
12330
  }
@@ -12216,14 +12335,17 @@ class SetDialog {
12216
12335
  html += "</div>";
12217
12336
 
12218
12337
  html += me.htmlCls.divStr + "dl_thickness' class='" + dialogClass + "'>";
12338
+ html += this.addNotebookTitle('dl_thickness', 'Set thickness');
12219
12339
  html += me.htmlCls.setHtmlCls.setThicknessHtml('3dprint');
12220
12340
  html += "</div>";
12221
12341
 
12222
12342
  html += me.htmlCls.divStr + "dl_thickness2' class='" + dialogClass + "'>";
12343
+ html += this.addNotebookTitle('dl_thickness2', 'Set thickness');
12223
12344
  html += me.htmlCls.setHtmlCls.setThicknessHtml('style');
12224
12345
  html += "</div>";
12225
12346
 
12226
12347
  html += me.htmlCls.divStr + "dl_menupref' class='" + dialogClass + "'>";
12348
+ html += this.addNotebookTitle('dl_menupref', 'Preferences for menus');
12227
12349
  html += "<b>Note</b>: The following parameters will be saved in cache. You just need to set them once. <br><br>";
12228
12350
 
12229
12351
  html += me.htmlCls.spanNowrapStr + "" + me.htmlCls.buttonStr + "apply_menupref'>Apply</button></span>";
@@ -12239,6 +12361,7 @@ class SetDialog {
12239
12361
  html += "</div>";
12240
12362
 
12241
12363
  html += me.htmlCls.divStr + "dl_addtrack' class='" + dialogClass + "'>";
12364
+ html += this.addNotebookTitle('dl_addtrack', 'Add a track');
12242
12365
  html += " <input type='hidden' id='" + me.pre + "track_chainid' value=''>";
12243
12366
 
12244
12367
  html += me.htmlCls.divStr + "dl_addtrack_tabs' style='border:0px;'>";
@@ -12294,6 +12417,7 @@ class SetDialog {
12294
12417
  html += "</div>";
12295
12418
 
12296
12419
  html += me.htmlCls.divStr + "dl_saveselection' class='" + dialogClass + "'>";
12420
+ html += this.addNotebookTitle('dl_saveselection', 'Save Selection');
12297
12421
  let index =(ic && ic.defNames2Atoms) ? Object.keys(ic.defNames2Atoms).length : 1;
12298
12422
  let suffix = '';
12299
12423
  html += "Name: " + me.htmlCls.inputTextStr + "id='" + me.pre + "seq_command_name" + suffix + "' value='seq_" + index + "' size='5'> <br>";
@@ -12303,6 +12427,7 @@ class SetDialog {
12303
12427
 
12304
12428
 
12305
12429
  html += me.htmlCls.divStr + "dl_copyurl' style='width:520px;' class='" + dialogClass + "'>";
12430
+ html += this.addNotebookTitle('dl_copyurl', 'Share Link');
12306
12431
  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>";
12307
12432
  html += "Original URL with commands: <br><textarea id='" + me.pre + "ori_url' rows='4' style='width:100%'></textarea><br><br>";
12308
12433
  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>";
@@ -12310,6 +12435,7 @@ class SetDialog {
12310
12435
  html += "</div>";
12311
12436
 
12312
12437
  html += me.htmlCls.divStr + "dl_selectannotations' class='" + dialogClass + " icn3d-annotation' style='background-color:white;'>";
12438
+ html += this.addNotebookTitle('dl_selectannotations', 'Sequences & Annotations');
12313
12439
 
12314
12440
  html += me.htmlCls.divStr + "dl_annotations_tabs'>";
12315
12441
 
@@ -12338,6 +12464,7 @@ class SetDialog {
12338
12464
  html += "</div>";
12339
12465
 
12340
12466
  html += me.htmlCls.divStr + "dl_graph' style='background-color:white;' class='" + dialogClass + "'>";
12467
+ html += this.addNotebookTitle('dl_graph', 'Interactions');
12341
12468
  me.svgid = me.pre + 'icn3d_viz';
12342
12469
  html += '<style>';
12343
12470
  html += '#' + me.svgid + ' svg { border: 1px solid; font: 13px sans-serif; text-anchor: end; }';
@@ -12392,6 +12519,7 @@ class SetDialog {
12392
12519
  html += "</div>";
12393
12520
 
12394
12521
  html += me.htmlCls.divStr + "dl_area' class='" + dialogClass + "'>";
12522
+ html += this.addNotebookTitle('dl_area', 'Surface Area');
12395
12523
  html += "Solvent Accessible Surface Area(SASA) calculated using the <a href='https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0008140' target='_blank'>EDTSurf algorithm</a>: <br>";
12396
12524
  html += '(0-20% out is considered "in". 50-100% out is considered "out".)<br><br>';
12397
12525
  html += "<b>Toal</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "areavalue' value='' size='10'> &#8491;<sup>2</sup><br><br>";
@@ -12399,19 +12527,23 @@ class SetDialog {
12399
12527
  html += "</div>";
12400
12528
 
12401
12529
  html += me.htmlCls.divStr + "dl_colorbyarea' class='" + dialogClass + "'>";
12530
+ html += this.addNotebookTitle('dl_colorbyarea', 'Color by surface area');
12402
12531
  html += "<div style='width:500px'>Color each residue based on the percentage of solvent accessilbe surface area. The color ranges from blue, to white, to red for a percentage of 0, 35(variable), and 100, respectively.</div><br>";
12403
12532
  html += "<b>Middle Percentage(White)</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "midpercent' value='35' size='10'>% <br><br>";
12404
12533
  html += "<button style='white-space:nowrap;' id='" + me.pre + "applycolorbyarea'>Color</button><br/><br/>";
12405
12534
  html += "</div>";
12406
12535
 
12407
12536
  html += me.htmlCls.divStr + "dl_rmsd' class='" + dialogClass + "' style='max-width:300px'>";
12537
+ html += this.addNotebookTitle('dl_rmsd', 'RMSD', true);
12408
12538
 
12409
12539
  html += "</div>";
12410
12540
 
12411
12541
  html += me.htmlCls.divStr + "dl_buriedarea' class='" + dialogClass + "'>";
12542
+ html += this.addNotebookTitle('dl_buriedarea', 'Buried surface area', true);
12412
12543
  html += "</div>";
12413
12544
 
12414
12545
  html += me.htmlCls.divStr + "dl_propbypercentout' class='" + dialogClass + "'>";
12546
+ html += this.addNotebookTitle('dl_propbypercentout', 'Select residues basen on solvent accessilbe surface area');
12415
12547
  html += "<div style='width:400px'>Select residue based on the percentage of solvent accessilbe surface area. The values are in the range of 0-100.</div><br>";
12416
12548
  html += "<b>Min Percentage</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "minpercentout' value='0' size='10'>% <br>";
12417
12549
  html += "<b>Max Percentage</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "maxpercentout' value='100' size='10'>% <br>";
@@ -12419,6 +12551,7 @@ class SetDialog {
12419
12551
  html += "</div>";
12420
12552
 
12421
12553
  html += me.htmlCls.divStr + "dl_propbybfactor' class='" + dialogClass + "'>";
12554
+ html += this.addNotebookTitle('dl_propbybfactor', 'Select residues basen on B-factor');
12422
12555
  html += "<div style='width:400px'>Select residue based on B-factor. The values are in the range of 0-100.</div><br>";
12423
12556
  html += "<b>Min B-factor</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "minbfactor' value='0' size='10'>% <br>";
12424
12557
  html += "<b>Max B-factor</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "maxbfactor' value='100' size='10'>% <br>";
@@ -12426,9 +12559,11 @@ class SetDialog {
12426
12559
  html += "</div>";
12427
12560
 
12428
12561
  html += me.htmlCls.divStr + "dl_legend' class='" + dialogClass + "' style='max-width:500px; background-color:white'>";
12562
+ html += this.addNotebookTitle('dl_legend', 'Legend', true);
12429
12563
  html += "</div>";
12430
12564
 
12431
12565
  html += me.htmlCls.divStr + "dl_disttable' class='" + dialogClass + "'>";
12566
+ html += this.addNotebookTitle('dl_disttable', 'Distance Table', true);
12432
12567
  html += "</div>";
12433
12568
 
12434
12569
  html += "</div>";
@@ -15744,6 +15879,8 @@ class SetHtml {
15744
15879
  }
15745
15880
 
15746
15881
  html += me.htmlCls.divStr + "dl_" + name1 + "' class='" + dialogClass + "'>";
15882
+ html += me.htmlCls.setDialogCls.addNotebookTitle("dl_" + name1, 'DelPhi Potential');
15883
+
15747
15884
  html += me.htmlCls.divStr + "dl_" + name1 + "_tabs' style='border:0px;'>";
15748
15885
  html += "<ul>";
15749
15886
  html += "<li><a href='#" + me.pre + name1 + "tab1'>" + tab1 + "</a></li>";
@@ -16057,7 +16194,7 @@ class SetHtml {
16057
16194
  statefile = imageStr.substr(posState + matchedStrState.length, posStateEnd - posState- matchedStrState.length);
16058
16195
  //statefile = decodeURIComponent(statefile);
16059
16196
  statefile = decodeURIComponent(statefile + "\n" + commandStr);
16060
-
16197
+
16061
16198
  if(type === 'pdb') {
16062
16199
  await ic.pdbParserCls.loadPdbData(data);
16063
16200
 
@@ -23059,7 +23196,7 @@ class Scene {
23059
23196
  ic.cam.remove( ic.canvasUI.mesh );
23060
23197
  }
23061
23198
 
23062
- if (controllerInfo !== undefined){
23199
+ if (controller && controllerInfo !== undefined){
23063
23200
  // "trigger":{"button":0},
23064
23201
  // "squeeze":{"button":1},
23065
23202
  // "thumbstick":{"button":3,"xAxis":2,"yAxis":3}, "touchpad":{"button":2,"xAxis":0,"yAxis":1},
@@ -23141,8 +23278,11 @@ class Scene {
23141
23278
  ic.cam.remove( ic.canvasUI.mesh );
23142
23279
  } },
23143
23280
  sphere: { type: "button", position:{ top: margin + (btnHeight + margin), left: margin + 4*(btnWidth + margin) }, width: btnWidth, height: btnHeight, fontColor: fontColor, fontSize: fontSize, backgroundColor: bkgdColor, hover: hoverColor, onSelect: function() {
23144
- ic.setOptionCls.setStyle("proteins", "sphere");
23145
- ic.setOptionCls.setStyle("nucleotides", "sphere");
23281
+ // ic.setOptionCls.setStyle("proteins", "sphere");
23282
+ // ic.setOptionCls.setStyle("nucleotides", "sphere");
23283
+ ic.opts['surface'] = 'molecular surface';
23284
+ ic.applyMapCls.applySurfaceOptions();
23285
+
23146
23286
  ic.cam.remove( ic.canvasUI.mesh );
23147
23287
  } },
23148
23288
 
@@ -23208,14 +23348,17 @@ class Scene {
23208
23348
  //ic.canvasUILog.updateElement( "info", "ERROR: " + err );
23209
23349
  }
23210
23350
  } },
23211
- // delphi: { type: "button", position:{ top: margin + 4*(btnHeight + margin), left: margin + 2*(btnWidth + margin)}, width: btnWidth, height: btnHeight, fontColor: fontColor, fontSize: fontSize, backgroundColor: bkgdColor, hover: hoverColor, onSelect: function() {
23212
- // ic.debugStr = '###ic.hAtoms: ' + Object.keys(ic.hAtoms).length + ' ic.dAtoms: ' + Object.keys(ic.dAtoms).length;
23213
- // let gsize = 65, salt = 0.15, contour = 2, bSurface = true;
23214
- // ic.delphiCls.CalcPhi(gsize, salt, contour, bSurface);
23215
- // ic.canvasUILog.updateElement( "info", "debug: " + ic.debugStr );
23216
- // ic.cam.remove( ic.canvasUI.mesh );
23217
- // } },
23218
- removeLabel: { type: "button", position:{ top: margin + 4*(btnHeight + margin), left: margin + 2*(btnWidth + margin) }, width: btnWidth, height: btnHeight, fontColor: fontColor, fontSize: fontSize, backgroundColor: bkgdColor, hover: hoverColor, onSelect: function() {
23351
+ delphi: { type: "button", position:{ top: margin + 4*(btnHeight + margin), left: margin + 2*(btnWidth + margin)}, width: btnWidth, height: btnHeight, fontColor: fontColor, fontSize: fontSize, backgroundColor: bkgdColor, hover: hoverColor, onSelect: async function() {
23352
+ let gsize = 65, salt = 0.15, contour = 2, bSurface = true;
23353
+ ic.phisurftype = 22; // molecular surface
23354
+ ic.phisurfop = 1.0; // opacity
23355
+ ic.phisurfwf = 'no'; // wireframe
23356
+ await ic.delphiCls.CalcPhi(gsize, salt, contour, bSurface);
23357
+
23358
+ //ic.canvasUILog.updateElement( "info", "debug: " + ic.debugStr );
23359
+ ic.cam.remove( ic.canvasUI.mesh );
23360
+ } },
23361
+ removeLabel: { type: "button", position:{ top: margin + 4*(btnHeight + margin), left: margin + 3*(btnWidth + margin) }, width: btnWidth, height: btnHeight, fontColor: fontColor, fontSize: fontSize, backgroundColor: bkgdColor, hover: hoverColor, onSelect: function() {
23219
23362
  for(let name in ic.labels) {
23220
23363
  //if(name === 'residue' || name === 'custom') {
23221
23364
  ic.labels[name] = [];
@@ -23225,7 +23368,7 @@ class Scene {
23225
23368
  ic.drawCls.draw();
23226
23369
  ic.cam.remove( ic.canvasUI.mesh );
23227
23370
  } },
23228
- reset: { type: "button", position:{ top: margin + 4*(btnHeight + margin), left: margin + 3*(btnWidth + margin) }, width: btnWidth, height: btnHeight, fontColor: fontColor, fontSize: fontSize, backgroundColor: bkgdColor, hover: hoverColor, onSelect: function() {
23371
+ reset: { type: "button", position:{ top: margin + 4*(btnHeight + margin), left: margin + 4*(btnWidth + margin) }, width: btnWidth, height: btnHeight, fontColor: fontColor, fontSize: fontSize, backgroundColor: bkgdColor, hover: hoverColor, onSelect: function() {
23229
23372
  ic.selectionCls.resetAll();
23230
23373
 
23231
23374
  ic.cam.remove( ic.canvasUI.mesh );
@@ -23245,7 +23388,8 @@ class Scene {
23245
23388
  ribbon: "Ribbon",
23246
23389
  schematic: "Schem.",
23247
23390
  stick: "Stick",
23248
- sphere: "Sphere",
23391
+ //sphere: "Sphere",
23392
+ sphere: "Surface",
23249
23393
 
23250
23394
  color: "Color",
23251
23395
  rainbow: "Rainbow",
@@ -23265,7 +23409,7 @@ class Scene {
23265
23409
 
23266
23410
  analysis: "Analysis",
23267
23411
  interaction: "Interact",
23268
- //delphi: "DelPhi",
23412
+ delphi: "DelPhi",
23269
23413
  removeLabel: "No Label",
23270
23414
  reset: "Reset"
23271
23415
  };
@@ -23316,6 +23460,8 @@ class Scene {
23316
23460
 
23317
23461
  for(let i=0; i<=1; i++){
23318
23462
  const controller = ic.renderer.xr.getController( i );
23463
+ if(!controller) continue;
23464
+
23319
23465
  ic.dolly.add( controller );
23320
23466
 
23321
23467
  controller.add( line.clone() );
@@ -26625,6 +26771,8 @@ class TextSprite {
26625
26771
  sprite.scale.set(expandWidthFactor * factor, factor, 1.0);
26626
26772
  }
26627
26773
 
26774
+ sprite.renderOrder = 1; // larger than the default 0
26775
+
26628
26776
  return sprite;
26629
26777
  }
26630
26778
 
@@ -29414,11 +29562,12 @@ class Surface {
29414
29562
  cfg.isovalue = ic.mapData.contourPhi;
29415
29563
  cfg.type = 'phi';
29416
29564
  cfg.loadPhiFrom = ic.loadPhiFrom;
29417
-
29565
+
29418
29566
  ps = this.SetupMap(cfg);
29419
29567
  }
29420
29568
  else {
29421
29569
  //1: van der waals surface, 2: molecular surface, 3: solvent accessible surface
29570
+
29422
29571
 
29423
29572
  //exclude water
29424
29573
  let atomsToShow = me.hashUtilsCls.exclHash(atoms, ic.water);
@@ -29452,7 +29601,7 @@ class Surface {
29452
29601
 
29453
29602
  ps = this.SetupSurface(cfg);
29454
29603
  }
29455
-
29604
+
29456
29605
  if(ic.bCalcArea) {
29457
29606
  ic.areavalue = ps.area.toFixed(2);
29458
29607
  let serial2area = ps.serial2area;
@@ -29531,7 +29680,7 @@ class Surface {
29531
29680
  //geo = new THREE.Geometry();
29532
29681
  geo = new THREE.BufferGeometry();
29533
29682
  let verticeArray = [], colorArray = [], indexArray = [], color;
29534
-
29683
+
29535
29684
  //var geoVertices = verts.map(function (v) {
29536
29685
  let offset = 0;
29537
29686
  for(let i = 0, il = verts.length; i < il; ++i, offset += 3) {
@@ -29606,9 +29755,8 @@ class Surface {
29606
29755
  //geo.normalsNeedUpdate = true;
29607
29756
 
29608
29757
  geo.computeVertexNormals();
29609
-
29758
+
29610
29759
  geo.type = 'Surface'; // to be recognized in vrml.js for 3D printing
29611
-
29612
29760
  // use the regular way to show transparency for type == 15 (surface with potential)
29613
29761
  // if(ic.transparentRenderOrder && (type == 1 || type == 2 || type == 3)) { // WebGL has some ordering problem when dealing with transparency
29614
29762
  if(ic.transparentRenderOrder) { // WebGL has some ordering problem when dealing with transparency
@@ -29796,7 +29944,7 @@ class Surface {
29796
29944
  mesh.renderOrder = -2; // default: 0, picking: -1
29797
29945
 
29798
29946
  ic.mdl.add(mesh);
29799
-
29947
+
29800
29948
  if(type == 11 || type == 12) {
29801
29949
  ic.prevMaps.push(mesh);
29802
29950
  }
@@ -29879,7 +30027,7 @@ class Surface {
29879
30027
 
29880
30028
  SetupMap(data) { let ic = this.icn3d; ic.icn3dui;
29881
30029
  let ps = new ElectronMap(ic);
29882
-
30030
+
29883
30031
  ps.initparm(data.header, data.data, data.matrix, data.isovalue, data.center, data.maxdist,
29884
30032
  data.pmin, data.pmax, data.water, data.type, data.rmsd_supr, data.loadPhiFrom, data.icn3d);
29885
30033
 
@@ -29888,7 +30036,7 @@ class Surface {
29888
30036
  if(!data.header.bSurface) ps.buildboundary();
29889
30037
 
29890
30038
  if(!data.header.bSurface) ps.marchingcube();
29891
-
30039
+
29892
30040
  ps.vpBits = null; // uint8 array of bitmasks
29893
30041
  //ps.vpDistance = null; // floatarray of _squared_ distances
29894
30042
  ps.vpAtomID = null; // intarray
@@ -32753,6 +32901,8 @@ class Alternate {
32753
32901
 
32754
32902
  ic.dAtoms = {};
32755
32903
 
32904
+ let bMutation = moleculeArray.length == 2 && moleculeArray[1].replace(moleculeArray[0], '') == '2';
32905
+
32756
32906
  for(let i = 0, il = moleculeArray.length; i < il; ++i) {
32757
32907
  let structure = moleculeArray[i];
32758
32908
  //if(i > ic.ALTERNATE_STRUCTURE || (ic.ALTERNATE_STRUCTURE === il - 1 && i === 0) ) {
@@ -32785,7 +32935,17 @@ class Alternate {
32785
32935
 
32786
32936
  if(ic.ALTERNATE_STRUCTURE < 0) ic.ALTERNATE_STRUCTURE += il;
32787
32937
 
32788
- $("#" + ic.pre + "title").html(structure);
32938
+ let label = '';
32939
+ if(bMutation) {
32940
+ if(i == 0) {
32941
+ label = "Wild Type ";
32942
+ }
32943
+ else if(i == 1) {
32944
+ label = "Mutant ";
32945
+ }
32946
+ }
32947
+
32948
+ $("#" + ic.pre + "title").html(label + structure);
32789
32949
 
32790
32950
  break;
32791
32951
  }
@@ -32903,7 +33063,7 @@ class Alternate {
32903
33063
  //if(window.dialog) window.dialog.dialog( "close" );
32904
33064
 
32905
33065
  let html = me.utilsCls.getMemDesc();
32906
- $("#" + ic.pre + "dl_rmsd").html(html);
33066
+ $("#" + ic.pre + "dl_rmsd_html").html(html);
32907
33067
  if(!me.cfg.bSidebyside) me.htmlCls.dialogCls.openDlg('dl_rmsd', 'Membranes');
32908
33068
  }
32909
33069
  }
@@ -33074,6 +33234,8 @@ class Alternate {
33074
33234
 
33075
33235
  for(let i = 0, il = ic.controllers.length; i < il; ++i) {
33076
33236
  let controller = ic.controllers[i];
33237
+ if(!controller) continue;
33238
+
33077
33239
  dt = (i % 2 == 0) ? dt : -dt; // dt * y;
33078
33240
  thisClass.handleController( controller, dt, controller.userData.selectPressed, controller.userData.squeezePressed, result.xArray, result.yArray );
33079
33241
  //thisClass.handleController( controller, dt, pressed );
@@ -33082,13 +33244,13 @@ class Alternate {
33082
33244
 
33083
33245
  if ( ic.renderer.xr.isPresenting){
33084
33246
  if(ic.canvasUI) ic.canvasUI.update();
33085
- //if(ic.canvasUILog) ic.canvasUILog.update();
33247
+ if(ic.canvasUILog) ic.canvasUILog.update();
33086
33248
  }
33087
33249
  }
33088
33250
  else if(ic.bAr) {
33089
33251
  if ( ic.renderer.xr.isPresenting ){
33090
33252
  ic.gestures.update();
33091
- //if(ic.canvasUILog) ic.canvasUILog.update();
33253
+ if(ic.canvasUILog) ic.canvasUILog.update();
33092
33254
  }
33093
33255
  }
33094
33256
 
@@ -35284,20 +35446,61 @@ class SetColor {
35284
35446
 
35285
35447
  case 'ig strand':
35286
35448
  if(ic.bShowRefnum) {
35287
- for(let resid in ic.resid2refnum) {
35288
- let refnumLabel = ic.resid2refnum[resid];
35289
- let color;
35290
- if(!refnumLabel) {
35291
- color = me.parasCls.thr(me.htmlCls.GREYB);
35449
+ let color;
35450
+ for(let resid in ic.residues) {
35451
+ if(!ic.resid2refnum[resid]) {
35452
+ color = me.parasCls.thr('#FFFFFF');
35292
35453
  }
35293
35454
  else {
35294
- let refnumStr = refnumLabel.replace(/'/g, '').replace(/\*/g, '').replace(/\^/g, '').substr(1); // C', C''
35295
- let currStrand = refnumLabel.replace(new RegExp(refnumStr,'g'), '');
35296
- color = ic.showSeqCls.getRefnumColor(currStrand);
35455
+ let refnumLabel = ic.resid2refnum[resid];
35456
+
35457
+ if(!refnumLabel) {
35458
+ color = me.parasCls.thr(me.htmlCls.GREYB);
35459
+ }
35460
+ else {
35461
+ let refnumStr = refnumLabel.replace(/'/g, '').replace(/\*/g, '').replace(/\^/g, '').substr(1); // C', C''
35462
+ let currStrand = refnumLabel.replace(new RegExp(refnumStr,'g'), '');
35463
+ color = ic.showSeqCls.getRefnumColor(currStrand);
35297
35464
 
35298
- if(ic.residIgLoop.hasOwnProperty(resid)) {
35465
+ if(ic.residIgLoop.hasOwnProperty(resid)) {
35466
+ color = me.parasCls.thr(me.htmlCls.GREYB);
35467
+ }
35468
+ }
35469
+ }
35470
+
35471
+ for (let i in ic.residues[resid]) {
35472
+ let atom = ic.atoms[i];
35473
+ atom.color = me.parasCls.thr(color);
35474
+
35475
+ ic.atomPrevColors[i] = atom.color;
35476
+ }
35477
+ }
35478
+ }
35479
+
35480
+ break;
35481
+
35482
+ case 'ig protodomain':
35483
+ if(ic.bShowRefnum) {
35484
+ let color;
35485
+ for(let resid in ic.residues) {
35486
+ if(!ic.resid2refnum[resid]) {
35487
+ color = me.parasCls.thr('#FFFFFF');
35488
+ }
35489
+ else {
35490
+ let refnumLabel = ic.resid2refnum[resid];
35491
+
35492
+ if(!refnumLabel) {
35299
35493
  color = me.parasCls.thr(me.htmlCls.GREYB);
35300
35494
  }
35495
+ else {
35496
+ let refnumStr = refnumLabel.replace(/'/g, '').replace(/\*/g, '').replace(/\^/g, '').substr(1); // C', C''
35497
+ let currStrand = refnumLabel.replace(new RegExp(refnumStr,'g'), '');
35498
+ color = ic.showSeqCls.getProtodomainColor(currStrand);
35499
+
35500
+ if(ic.residIgLoop.hasOwnProperty(resid)) {
35501
+ color = me.parasCls.thr(me.htmlCls.GREYB);
35502
+ }
35503
+ }
35301
35504
  }
35302
35505
 
35303
35506
  for (let i in ic.residues[resid]) {
@@ -35975,6 +36178,9 @@ class SetOption {
35975
36178
  else if(colorType == 'ig strand') {
35976
36179
  colorLabel = 'Ig Strand';
35977
36180
  }
36181
+ else if(colorType == 'ig protodomain') {
36182
+ colorLabel = 'Ig Protodomain';
36183
+ }
35978
36184
 
35979
36185
  let html = "Color by <b>" + colorLabel + "</b><br><br>";
35980
36186
 
@@ -35998,6 +36204,9 @@ class SetOption {
35998
36204
  else if (colorType == 'ig strand'){
35999
36205
  html += this.getColorLegendForIgstrand(ic.hAtoms);
36000
36206
  }
36207
+ else if (colorType == 'ig protodomain'){
36208
+ html += this.getColorLegendForIgproto(ic.hAtoms);
36209
+ }
36001
36210
  //else if (ic.legendClick == 4){
36002
36211
  else if (colorType == 'normalized hydrophobic' || colorType == 'hydrophobic') {
36003
36212
  let bOriResn = true;
@@ -36069,7 +36278,7 @@ class SetOption {
36069
36278
  bClose = true;
36070
36279
  }
36071
36280
 
36072
- $("#" + me.pre + "dl_legend").html(html);
36281
+ $("#" + me.pre + "dl_legend_html").html(html);
36073
36282
  me.htmlCls.dialogCls.openDlg('dl_legend', 'Color Legend');
36074
36283
 
36075
36284
  if(bClose) {
@@ -36229,19 +36438,49 @@ class SetOption {
36229
36438
  "A^ Strand": "FF00FF",
36230
36439
  "A Strand": "663399",
36231
36440
  "A* Strand": "FFC0CB",
36232
- "A Strand": "9370db",
36441
+ "A' Strand": "663399", //"9370db",
36233
36442
  "B Strand": "ba55d3",
36234
36443
  "C Strand": "0000FF",
36235
36444
  "C' Strand": "6495ED",
36236
36445
  "C'' Strand": "006400",
36237
36446
  "D Strand": "00FF00",
36238
- "E Strand": "FFFF00",
36447
+ "E Strand": "FFFF00", //"F0E68C",
36239
36448
  "F Strand": "FFA500",
36240
36449
  "G Strand": "FF0000",
36241
36450
  "G* Strand": "8B0000",
36242
36451
  "Loop": "CCCCCC"
36243
36452
  };
36244
-
36453
+
36454
+ html += "<div>";
36455
+ for (let name in name2color) {
36456
+ let color = name2color[name];
36457
+ html += "<span>";
36458
+ html += "<div style='width: 10px; height: 10px; background-color:#" + color + "; border: 0px;display:inline-block;' ></div> ";
36459
+ html += name;
36460
+ html += "</span><br>";
36461
+ }
36462
+
36463
+ html += "</div>";
36464
+
36465
+ return html;
36466
+ }
36467
+
36468
+ getColorLegendForIgproto(atomHash) { let ic = this.icn3d; ic.icn3dui;
36469
+ let html = '';
36470
+
36471
+ const name2color = {
36472
+ "A Strand": "0000FF",
36473
+ "B Strand": "006400",
36474
+ "C Strand": "FFFF00", //"F0E68C",
36475
+ "C' Strand": "FFA500",
36476
+ "C'' Strand": "FF0000",
36477
+ "D Strand": "0000FF",
36478
+ "E Strand": "006400",
36479
+ "F Strand": "FFFF00", //"F0E68C",
36480
+ "G Strand": "FFA500",
36481
+ "Loop": "CCCCCC"
36482
+ };
36483
+
36245
36484
  html += "<div>";
36246
36485
  for (let name in name2color) {
36247
36486
  let color = name2color[name];
@@ -38457,6 +38696,7 @@ class Domain3d {
38457
38696
  this.icn3d = icn3d;
38458
38697
 
38459
38698
  //this.dcut = 8; // threshold for C-alpha interactions
38699
+
38460
38700
  // It seemed the threshold 7 angstrom works better
38461
38701
  this.dcut = 7; // threshold for C-alpha interactions
38462
38702
 
@@ -38492,6 +38732,9 @@ class Domain3d {
38492
38732
  this.c_delta = 3; // cut set parameter
38493
38733
  this.nc_fact = 0.0; // size factor for internal contacts
38494
38734
 
38735
+ // added by Jiyao
38736
+ this.min_contacts = 10; // minimum number of contacts to be considered as neighbors
38737
+
38495
38738
  //let this.elements[2*this.MAX_SSE]; // sets of this.elements to be split
38496
38739
  this.elements = [];
38497
38740
  this.elements.length = 2*this.MAX_SSE;
@@ -39040,6 +39283,7 @@ class Domain3d {
39040
39283
  //https://www.geeksforgeeks.org/number-groups-formed-graph-friends/
39041
39284
  countUtil(ss1, sheetNeighbor, existing_groups) {
39042
39285
  this.visited[ss1] = true;
39286
+
39043
39287
  if(!this.groupnum2sheet[existing_groups]) this.groupnum2sheet[existing_groups] = [];
39044
39288
  this.groupnum2sheet[existing_groups].push(parseInt(ss1));
39045
39289
 
@@ -39083,6 +39327,7 @@ class Domain3d {
39083
39327
  let chnid = residueArray[0].substr(0, residueArray[0].lastIndexOf('_'));
39084
39328
 
39085
39329
  let substructItem = {};
39330
+ let pos2resi = {};
39086
39331
  for(let i = 0; i < residueArray.length; ++i) {
39087
39332
  let resid = residueArray[i];
39088
39333
 
@@ -39120,22 +39365,26 @@ class Domain3d {
39120
39365
  x0.push(atom.coord.x);
39121
39366
  y0.push(atom.coord.y);
39122
39367
  z0.push(atom.coord.z);
39123
- resiArray.push(resi);
39368
+ //resiArray.push(resi);
39369
+ resiArray.push(i+1);
39370
+ pos2resi[i+1] = resi;
39124
39371
 
39125
39372
  if(atom.ssend) {
39126
- substructItem.To = parseInt(resi);
39373
+ //substructItem.To = parseInt(resi);
39374
+ substructItem.To = i + 1;
39127
39375
  substructItem.x2 = atom.coord.x;
39128
39376
  substructItem.y2 = atom.coord.y;
39129
39377
  substructItem.z2 = atom.coord.z;
39130
39378
 
39131
39379
  substructItem.Sheet = (atom.ss == 'sheet') ? true : false;
39132
39380
  substruct.push(substructItem);
39133
- substructItem = {};
39381
+ substructItem = {};
39134
39382
  }
39135
39383
 
39136
39384
  // a residue could be both start and end. check ssend first, then check ssbegin
39137
39385
  if(atom.ssbegin) {
39138
- substructItem.From = parseInt(resi);
39386
+ //substructItem.From = parseInt(resi);
39387
+ substructItem.From = i + 1;
39139
39388
  substructItem.x1 = atom.coord.x;
39140
39389
  substructItem.y1 = atom.coord.y;
39141
39390
  substructItem.z1 = atom.coord.z;
@@ -39155,7 +39404,8 @@ class Domain3d {
39155
39404
  }
39156
39405
 
39157
39406
  let seqLen = residueArray.length; // + resiOffset;
39158
- let lastResi = resiArray[seqLen - 1];
39407
+ //let lastResi = resiArray[seqLen - 1];
39408
+ let lastResi = seqLen;
39159
39409
 
39160
39410
  // get a list of Calpha-Calpha contacts
39161
39411
  ///list< pair< pair< int, let >, let > >
@@ -39234,7 +39484,8 @@ class Domain3d {
39234
39484
  let ss2 = parseInt(ssPair[1]);
39235
39485
 
39236
39486
  // both are sheets
39237
- if(substruct[ss1 - 1].Sheet && substruct[ss2 - 1].Sheet) {
39487
+ // min number of contacts: this.min_contacts
39488
+ if(substruct[ss1 - 1].Sheet && substruct[ss2 - 1].Sheet && ctable[pair] >= this.min_contacts ) {
39238
39489
  if(!sheetNeighbor[ss1]) sheetNeighbor[ss1] = {};
39239
39490
  if(!sheetNeighbor[ss2]) sheetNeighbor[ss2] = {};
39240
39491
 
@@ -39257,13 +39508,13 @@ class Domain3d {
39257
39508
  // If not in any group.
39258
39509
  if (this.visited[ss1] == false) {
39259
39510
  existing_groups++;
39260
-
39511
+
39261
39512
  this.countUtil(ss1, sheetNeighbor, existing_groups);
39262
39513
  }
39263
39514
  }
39264
39515
 
39265
39516
  // get sheet2sheetnum
39266
- // each neighboring sheet willbe represented by the sheet with the smallest sse
39517
+ // each neighboring sheet will be represented by the sheet with the smallest sse
39267
39518
  for(let groupnum in this.groupnum2sheet) {
39268
39519
  let ssArray = this.groupnum2sheet[groupnum].sort();
39269
39520
  for(let i = 0, il = ssArray.length; i < il; ++i) {
@@ -39366,7 +39617,7 @@ class Domain3d {
39366
39617
  this.parts[2*i] = this.parts[2*i + 1] = 0;
39367
39618
  ratios[i] = 0.0;
39368
39619
  }
39369
-
39620
+
39370
39621
  n_saved = this.new_split_chain(nsse, sratio, minSize, minSSE, maxCsz, avgCts, cDelta, ncFact, this.parts, n_saved, ratios);
39371
39622
 
39372
39623
  // save domain data
@@ -39407,14 +39658,14 @@ class Domain3d {
39407
39658
  //resflags.clear();
39408
39659
 
39409
39660
  //let resflags = [];
39410
- let resflags = {};
39661
+ let resflags = {}; // keys are 1-based positions
39411
39662
 
39412
39663
  // a domain must have at least 3 SSEs...
39413
39664
  if (prts.length <= 2) continue;
39414
39665
 
39415
39666
  for (let i = 0; i < seqLen; i++) {
39416
39667
  //resflags.push(0);
39417
- resflags[resiArray[i]] = 0;
39668
+ resflags[i + 1] = 0;
39418
39669
  }
39419
39670
 
39420
39671
  for (let i = 0; i < prts.length; i++) {
@@ -39430,17 +39681,14 @@ class Domain3d {
39430
39681
  let To = sserec.To;
39431
39682
 
39432
39683
  for (let j = From; j <= To; j++) {
39433
- //resflags[j - 1] = 1;
39434
39684
  resflags[j] = 1;
39435
39685
  }
39436
39686
 
39437
39687
  if ((k == 0) && (From > 1)) {
39438
39688
  // residues with negative residue numbers will not be included
39439
39689
  for (let j = 1; j < From; j++) {
39440
- //resflags[j - 1] = 1;
39441
39690
  // include at most 10 residues
39442
39691
  if(From - j <= 10) {
39443
- //resflags[j - 1] = 1;
39444
39692
  resflags[j] = 1;
39445
39693
  }
39446
39694
  }
@@ -39450,10 +39698,8 @@ class Domain3d {
39450
39698
  if ((k == substruct.length - 1) && (To < parseInt(lastResi))) {
39451
39699
  //for (let j = To + 1; j <= seqLen; j++) {
39452
39700
  for (let j = To + 1; j <= parseInt(lastResi); j++) {
39453
- //resflags[j - 1] = 1;
39454
39701
  // include at most 10 residues
39455
39702
  if(j - To <= 10) {
39456
- //resflags[j - 1] = 1;
39457
39703
  resflags[j] = 1;
39458
39704
  }
39459
39705
  }
@@ -39469,7 +39715,6 @@ class Domain3d {
39469
39715
 
39470
39716
  if (ll > 0) {
39471
39717
  for (let j = From - ll; j <= From - 1; j++) {
39472
- //resflags[j - 1] = 1;
39473
39718
  resflags[j] = 1;
39474
39719
  }
39475
39720
  }
@@ -39488,7 +39733,6 @@ class Domain3d {
39488
39733
 
39489
39734
  if (ll > 0) {
39490
39735
  for (let j = To + 1; j <= To + ll; j++) {
39491
- //resflags[j - 1] = 1;
39492
39736
  resflags[j] = 1;
39493
39737
  }
39494
39738
  }
@@ -39500,16 +39744,15 @@ class Domain3d {
39500
39744
  let startseg;
39501
39745
  //vector<int> segments;
39502
39746
  //segments.clear();
39503
- let segments = [];
39747
+ let segments = []; //use position instead of residue number
39504
39748
 
39505
39749
  for (let i = 0; i < seqLen; i++) {
39506
39750
  //let rf = resflags[i];
39507
- let rf = resflags[resiArray[i]];
39751
+ let rf = resflags[i + 1];
39508
39752
 
39509
39753
  if (!inseg && (rf == 1)) {
39510
39754
  // new segment starts here
39511
- //startseg = i + 1;
39512
- startseg = resiArray[i];
39755
+ startseg = i + 1;
39513
39756
  inseg = true;
39514
39757
  continue;
39515
39758
  }
@@ -39517,8 +39760,7 @@ class Domain3d {
39517
39760
  if (inseg && (rf == 0)) {
39518
39761
  // segment ends
39519
39762
  segments.push(startseg);
39520
- //segments.push(i);
39521
- segments.push(resiArray[i]);
39763
+ segments.push(i);
39522
39764
  inseg = false;
39523
39765
  }
39524
39766
  }
@@ -39526,7 +39768,6 @@ class Domain3d {
39526
39768
  // check for the last segment
39527
39769
  if (inseg) {
39528
39770
  segments.push(startseg);
39529
- //segments.push(seqLen);
39530
39771
  segments.push(lastResi);
39531
39772
  }
39532
39773
 
@@ -39547,8 +39788,8 @@ class Domain3d {
39547
39788
  }
39548
39789
  }
39549
39790
  }
39550
-
39551
- return {subdomains: subdomains, substruct: substruct};
39791
+
39792
+ return {subdomains: subdomains, substruct: substruct, pos2resi:pos2resi };
39552
39793
  } // end c2b_NewSplitChain
39553
39794
 
39554
39795
  getDomainJsonForAlign(atoms) { let ic = this.icn3d, me = ic.icn3dui;
@@ -39556,6 +39797,7 @@ class Domain3d {
39556
39797
 
39557
39798
  let subdomains = result.subdomains;
39558
39799
  let substruct = result.substruct;
39800
+ let pos2resi = result.pos2resi;
39559
39801
 
39560
39802
  let residueHash = ic.firstAtomObjCls.getResiduesFromAtoms(atoms);
39561
39803
  let residueArray = Object.keys(residueHash);
@@ -39583,8 +39825,8 @@ class Domain3d {
39583
39825
  //ss: sstype ss_start ss_end x1 y1 z1 x2 y2 z2
39584
39826
  //sstype: 1 (helix), 2 (sheet)
39585
39827
  let sstype = (substruct[k].Sheet) ? 2 : 1;
39586
- let from = substruct[k].From;
39587
- let to = substruct[k].To;
39828
+ let from = pos2resi[substruct[k].From];
39829
+ let to = pos2resi[substruct[k].To];
39588
39830
 
39589
39831
  let residFrom = chnid + "_" + from;
39590
39832
  let atomFrom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[residFrom]);
@@ -40601,7 +40843,7 @@ class AddTrack {
40601
40843
  let legendHtml = me.htmlCls.clickMenuCls.setLegendHtml();
40602
40844
 
40603
40845
  //$("#" + me.pre + "legend").html(legendHtml);
40604
- $("#" + me.pre + "dl_legend").html(legendHtml);
40846
+ $("#" + me.pre + "dl_legend_html").html(legendHtml);
40605
40847
  me.htmlCls.dialogCls.openDlg('dl_legend', 'Color range');
40606
40848
  }
40607
40849
  else if(type == 'tube') {
@@ -42380,6 +42622,8 @@ class ShowSeq {
42380
42622
  let html = '', html3 = '';
42381
42623
 
42382
42624
  let chainList = '';
42625
+ if(!ic.chainid2index[chnid]) return {html: html, html3: html3};
42626
+
42383
42627
  for(let i = 0, il = ic.chainid2index[chnid].length; i < il; ++i) {
42384
42628
  chainList += ic.refpdbArray[ic.chainid2index[chnid][i]] + " ";
42385
42629
  }
@@ -42655,7 +42899,7 @@ class ShowSeq {
42655
42899
  }
42656
42900
  else {
42657
42901
  let refnum = parseInt(refnumStr).toString();
42658
- let color = this.getRefnumColor(currStrand);
42902
+ let color = this.getRefnumColor(currStrand, true);
42659
42903
  let colorStr = 'style="color:' + color + '"';
42660
42904
 
42661
42905
  let lastTwo = parseInt(refnum.substr(refnum.length - 2, 2));
@@ -42826,7 +43070,7 @@ class ShowSeq {
42826
43070
 
42827
43071
  getRefnumHtml(residueid, refnumStr, refnumStr_ori, refnumLabel, currStrand, bLoop, bHidelabel) { let ic = this.icn3d, me = ic.icn3dui;
42828
43072
  let refnum = parseInt(refnumStr).toString();
42829
- let color = this.getRefnumColor(currStrand);
43073
+ let color = this.getRefnumColor(currStrand, true);
42830
43074
  let colorStr = (!bLoop) ? 'style="color:' + color + '; text-decoration: underline overline;"' : 'style="color:' + color + '"';
42831
43075
 
42832
43076
  let lastTwo = parseInt(refnum.substr(refnum.length - 2, 2));
@@ -42852,45 +43096,66 @@ class ShowSeq {
42852
43096
  return html;
42853
43097
  }
42854
43098
 
42855
- getRefnumColor(currStrand) { let ic = this.icn3d, me = ic.icn3dui;
42856
- if(currStrand == "A^") { //magenta // deep sky blue
42857
- return '#FF00FF'; //'#9900ff'; //'#00BFFF';
43099
+ getRefnumColor(currStrand, bText) { let ic = this.icn3d, me = ic.icn3dui;
43100
+ if(currStrand == "A^") {
43101
+ return '#FF00FF';
42858
43102
  }
42859
- else if(currStrand == "A") { //rebecca purple // blue
42860
- return '#663399'; //'#9900ff'; //'#0000FF';
43103
+ else if(currStrand == "A") {
43104
+ return '#663399';
42861
43105
  }
42862
- else if(currStrand == "A*") { //pink // sky blue
42863
- return '#FFC0CB'; //'#9900ff'; //'#87CEEB';
43106
+ else if(currStrand == "A*") {
43107
+ return '#FFC0CB';
42864
43108
  }
42865
- else if(currStrand == "A'") { //medium purple // steel blue
42866
- return '#9370db'; //'#9900ff'; //'#4682B4';
43109
+ else if(currStrand == "A'") {
43110
+ return '#663399';
42867
43111
  }
42868
- else if(currStrand == "B") { //medium orchid // cyan
42869
- return '#ba55d3'; //'#0000FF'; //'#4a86e8'; //'#00FFFF';
43112
+ else if(currStrand == "B") {
43113
+ return '#ba55d3';
42870
43114
  }
42871
- else if(currStrand == "C") { //blue // green
42872
- return '#0000FF'; //'#76d6ff'; //'#00FF00';
43115
+ else if(currStrand == "C") {
43116
+ return '#0000FF';
42873
43117
  }
42874
- else if(currStrand == "C'") { //corn blue // yellow
42875
- return '#6495ED'; //'#006400'; //'#00b050'; //'#FFFF00';
43118
+ else if(currStrand == "C'") {
43119
+ return '#6495ED';
42876
43120
  }
42877
- else if(currStrand == "C''") { //dark green // orange
42878
- return '#006400'; //'#00ff00'; //'#FFA500';
43121
+ else if(currStrand == "C''") {
43122
+ return '#006400';
42879
43123
  }
42880
- else if(currStrand == "D") { //green // brown
42881
- return '#00FF00'; //'#fffb00'; //'#A52A2A';
43124
+ else if(currStrand == "D") {
43125
+ return '#00FF00';
42882
43126
  }
42883
- else if(currStrand == "E") { //yellow // pink
42884
- return '#F0E68C'; //'#ff9900'; //'#ffd966'; //'#FFC0CB';
43127
+ else if(currStrand == "E") {
43128
+ return (bText) ? "#F7DC6F" : "#FFFF00";
42885
43129
  }
42886
- else if(currStrand == "F") { //orange // magenta
42887
- return '#FFA500'; //'#FF00FF'; //'#ff9900'; //'#FF00FF';
43130
+ else if(currStrand == "F") {
43131
+ return '#FFA500';
42888
43132
  }
42889
- else if(currStrand == "G") { //red // red
42890
- return '#FF0000'; //'#ff2600'; //'#FF0000';
43133
+ else if(currStrand == "G") {
43134
+ return '#FF0000';
42891
43135
  }
42892
- else if(currStrand == "G*") { //dark red // salmon
42893
- return '#8B0000'; //'#ff2600'; //'#FA8072';
43136
+ else if(currStrand == "G*") {
43137
+ return '#8B0000';
43138
+ }
43139
+ else {
43140
+ return me.htmlCls.GREYB;
43141
+ }
43142
+ }
43143
+
43144
+ getProtodomainColor(currStrand) { let ic = this.icn3d, me = ic.icn3dui;
43145
+ if((currStrand && currStrand.substr(0,1) == "A") || currStrand == "D") {
43146
+ return '#0000FF';
43147
+ }
43148
+ else if(currStrand == "B" || currStrand == "E") {
43149
+ return '#006400';
43150
+ }
43151
+ else if(currStrand == "C" || currStrand == "F") {
43152
+ return "#FFFF00"; //'#F0E68C';
43153
+ }
43154
+ else if(currStrand == "C'" || (currStrand && currStrand.substr(0, 1) == "G")) {
43155
+ return '#FFA500';
43156
+ }
43157
+ else if(currStrand == "C''") { //linker
43158
+ return '#FF0000';
42894
43159
  }
42895
43160
  else {
42896
43161
  return me.htmlCls.GREYB;
@@ -43468,7 +43733,7 @@ class HlUpdate {
43468
43733
  html2ddgm += ic.diagram2dCls.draw2Ddgm(ic.interactionData, ic.inputid, undefined, true);
43469
43734
  html2ddgm += ic.diagram2dCls.set2DdgmNote();
43470
43735
 
43471
- $("#" + ic.pre + "dl_2ddgm").html(html2ddgm);
43736
+ $("#" + ic.pre + "dl_2ddgm_html").html(html2ddgm);
43472
43737
  }
43473
43738
  else if(ic.mmdbidArray &&(me.cfg.align !== undefined || me.cfg.chainalign !== undefined || ic.bRealign)) {
43474
43739
  html2ddgm += ic.diagram2dCls.draw2Ddgm(ic.interactionData1, ic.mmdbidArray[0].toUpperCase(), 0, true);
@@ -43480,7 +43745,7 @@ class HlUpdate {
43480
43745
  }
43481
43746
  html2ddgm += ic.diagram2dCls.set2DdgmNote(true);
43482
43747
 
43483
- $("#" + ic.pre + "dl_2ddgm").html(html2ddgm);
43748
+ $("#" + ic.pre + "dl_2ddgm_html").html(html2ddgm);
43484
43749
  }
43485
43750
  }
43486
43751
 
@@ -43959,7 +44224,7 @@ class LineGraph {
43959
44224
  // Node for common interaction: {id : "Q24.A.2AJF|Q24", r : "1_1_2AJF_A_24", s: "a", ...}
43960
44225
  let nodeArray1SplitCommon = [], nodeArray2SplitCommon = [], linkArraySplitCommon = [], nameHashSplitCommon = [];
43961
44226
  let nodeArray1SplitDiff = [], nodeArray2SplitDiff = [], linkArraySplitDiff = [], nameHashSplitDiff = [];
43962
- let linkedNodeCnt = {};
44227
+ let linkedNodeCnt = {}, linkedNodeInterDiff = {};
43963
44228
 
43964
44229
  for(let i = 0, il = structureArray.length; i < il; ++i) {
43965
44230
  nodeArray1Split[i] = [];
@@ -43979,7 +44244,7 @@ class LineGraph {
43979
44244
 
43980
44245
  struc2index[structureArray[i]] = i;
43981
44246
  }
43982
-
44247
+
43983
44248
  for(let i = 0, il = linkArray.length; i < il; ++i) {
43984
44249
  let link = linkArray[i];
43985
44250
  let nodeA = name2node[link.source];
@@ -44015,9 +44280,11 @@ class LineGraph {
44015
44280
 
44016
44281
  if(!linkedNodeCnt.hasOwnProperty(mappingid)) {
44017
44282
  linkedNodeCnt[mappingid] = 1;
44283
+ linkedNodeInterDiff[mappingid] = link.n;
44018
44284
  }
44019
- else {
44020
- ++linkedNodeCnt[mappingid];
44285
+ else {
44286
+ ++linkedNodeCnt[mappingid];
44287
+ linkedNodeInterDiff[mappingid] -= link.n; // show difference
44021
44288
  }
44022
44289
  }
44023
44290
  }
@@ -44068,7 +44335,7 @@ class LineGraph {
44068
44335
  linkDiff.source += separatorDiff + ic.chainsMapping[chainid1][resid1];
44069
44336
  linkDiff.target += separatorDiff + ic.chainsMapping[chainid2][resid2];
44070
44337
 
44071
- if(linkedNodeCnt[mappingid] == structureArray.length) {
44338
+ if(linkedNodeCnt[mappingid] == structureArray.length && linkedNodeInterDiff[mappingid] == 0) {
44072
44339
  linkArraySplitCommon[index].push(linkCommon);
44073
44340
  }
44074
44341
  else {
@@ -44366,9 +44633,9 @@ class LineGraph {
44366
44633
  if(pos1 === undefined || pos2 === undefined) continue;
44367
44634
  let linestrokewidth;
44368
44635
  if(link.v == me.htmlCls.contactValue) {
44369
- linestrokewidth = 1;
44636
+ linestrokewidth = (link.n == 1) ? 1 : 3;
44370
44637
  } else {
44371
- linestrokewidth = 2;
44638
+ linestrokewidth = (link.n == 1) ? 2 : 4;
44372
44639
  }
44373
44640
  let strokecolor;
44374
44641
  if(link.v == me.htmlCls.hbondValue) {
@@ -44385,8 +44652,9 @@ class LineGraph {
44385
44652
  strokecolor = "#" + me.htmlCls.contactColor;
44386
44653
  }
44387
44654
  html += "<g class='icn3d-interaction' resid1='" + resid1 + "' resid2='" + resid2 + "' >";
44388
- html += "<title>Interaction of residue " + node1.id + " with residue " + node2.id + "</title>";
44389
- html += "<line x1='" + pos1.x + "' y1='" + pos1.y + "' x2='" + pos2.x + "' y2='" + pos2.y + "' stroke='" + strokecolor + "' stroke-width='" + linestrokewidth + "' /></g>";
44655
+ let interactStr = (link.n == 1) ? 'Interaction' : link.n + ' interactions';
44656
+ if(link.n > 1) html += "<title>" + interactStr + " of residue " + node1.id + " with residue " + node2.id + "</title>";
44657
+ html += "<line x1='" + pos1.x + "' y1='" + pos1.y + "' x2='" + pos2.x + "' y2='" + pos2.y + "' stroke='" + strokecolor + "' stroke-width='" + linestrokewidth + "'/></g>";
44390
44658
  }
44391
44659
  // show nodes later
44392
44660
  html += nodeHtml;
@@ -44479,9 +44747,9 @@ class LineGraph {
44479
44747
 
44480
44748
  let linestrokewidth;
44481
44749
  if(link.v == me.htmlCls.contactValue) {
44482
- linestrokewidth = 1;
44750
+ linestrokewidth = (link.n == 1) ? 1 : 3;
44483
44751
  } else {
44484
- linestrokewidth = 2;
44752
+ linestrokewidth = (link.n == 1) ? 2 : 4;
44485
44753
  }
44486
44754
 
44487
44755
  if(bAfMap && ic.hex2skip[link.c]) ;
@@ -44496,7 +44764,8 @@ class LineGraph {
44496
44764
  }
44497
44765
  else {
44498
44766
  html += "<g class='icn3d-interaction' resid1='" + resid1 + "' resid2='" + resid2 + "' >";
44499
- html += "<title>Interaction of residue " + node1.id + " with residue " + node2.id + "</title>";
44767
+ let interactStr = (link.n == 1) ? 'Interaction' : link.n + ' interactions';
44768
+ if(link.n > 1) html += "<title>" + interactStr + " of residue " + node1.id + " with residue " + node2.id + "</title>";
44500
44769
  if(bContactMap) {
44501
44770
  html += "<rect x='" +(pos2.x - halfSize).toString() + "' y='" +(pos1.y - halfSize).toString() + "' width='" + rectSize + "' height='" + rectSize + "' fill='" + strokecolor + "' stroke-width='" + linestrokewidth + "' stroke='" + strokecolor + "' />";
44502
44771
  }
@@ -44857,7 +45126,10 @@ class GetGraph {
44857
45126
  ic.hBondCls.calculateChemicalHbonds(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge, 'graph', true );
44858
45127
  resid2ResidhashHbond = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
44859
45128
  }
44860
- let hbondStr = this.getGraphLinks(resid2ResidhashHbond, resid2ResidhashHbond, me.htmlCls.hbondInsideColor, labelType, me.htmlCls.hbondValuehbondInsideValue);
45129
+
45130
+ //let hbondStr = this.getGraphLinks(resid2ResidhashHbond, resid2ResidhashHbond, me.htmlCls.hbondInsideColor, labelType, me.htmlCls.hbondValuehbondInsideValue);
45131
+ let hbondStr = this.getGraphLinks(resid2ResidhashHbond, resid2ResidhashHbond, me.htmlCls.hbondInsideColor, labelType, me.htmlCls.hbondInsideValue);
45132
+
44861
45133
  return hbondStr;
44862
45134
  }
44863
45135
  getIonicLinksForSet(atoms, labelType) { let ic = this.icn3d, me = ic.icn3dui;
@@ -44957,9 +45229,10 @@ class GetGraph {
44957
45229
  getGraphLinks(hash1, hash2, color, labelType, value, bCartoon2d) {var ic = this.icn3d, me = ic.icn3dui;
44958
45230
  let hbondStr = '';
44959
45231
  value =(value === undefined) ? 1 : value;
44960
- let prevLinkStr = '';
44961
- let sourceTargetHash = {};
45232
+ //let prevLinkStr = '';
45233
+ //let sourceTargetHash = {};
44962
45234
 
45235
+ let linkstr2cnt = {};
44963
45236
  for(let resid1 in hash1) {
44964
45237
  //ASN $1KQ2.A:6@ND2
44965
45238
  //or ASN $1KQ2.A:6
@@ -44990,7 +45263,7 @@ class GetGraph {
44990
45263
  resName1 = ic.resi2resirange[resName1];
44991
45264
  resName2 = ic.resi2resirange[resName2];
44992
45265
  }
44993
-
45266
+ /*
44994
45267
  if(!sourceTargetHash.hasOwnProperty(resName1 + '_' + resName2) && resName1 !== undefined && resName2 !== undefined ) {
44995
45268
  let linkStr = ', {"source": "' + resName1 + '", "target": "' + resName2 + '", "v": ' + value + ', "c": "' + color + '"}';
44996
45269
  if(linkStr != prevLinkStr) hbondStr += linkStr;
@@ -44999,8 +45272,27 @@ class GetGraph {
44999
45272
  sourceTargetHash[resName1 + '_' + resName2] = 1;
45000
45273
  sourceTargetHash[resName2 + '_' + resName1] = 1;
45001
45274
  }
45275
+ */
45276
+
45277
+ if(resName1 !== undefined && resName2 !== undefined ) {
45278
+ let linkStr = '"source": "' + resName1 + '", "target": "' + resName2 + '", "v": ' + value + ', "c": "' + color + '"';
45279
+
45280
+ //prevLinkStr = linkStr;
45281
+
45282
+ if(!linkstr2cnt.hasOwnProperty(linkStr)) {
45283
+ linkstr2cnt[linkStr] = 1;
45284
+ }
45285
+ else {
45286
+ ++linkstr2cnt[linkStr];
45287
+ }
45288
+ }
45002
45289
  }
45003
45290
  }
45291
+
45292
+ for(let linkStr in linkstr2cnt) {
45293
+ hbondStr += ', {' + linkStr + ', "n": ' + linkstr2cnt[linkStr] + '}';
45294
+ }
45295
+
45004
45296
  return hbondStr;
45005
45297
  }
45006
45298
  convertLabel2Resid(residLabel) {var ic = this.icn3d; ic.icn3dui;
@@ -45436,12 +45728,14 @@ class ViewInterPairs {
45436
45728
  let bondCnt;
45437
45729
 
45438
45730
  // reset
45439
- ic.hbondpnts = [];
45440
- ic.saltbridgepnts = [];
45441
- ic.contactpnts = [];
45442
- ic.halogenpnts = [];
45443
- ic.picationpnts = [];
45444
- ic.pistackingpnts = [];
45731
+ if(!bHbondCalc) {
45732
+ ic.hbondpnts = [];
45733
+ ic.saltbridgepnts = [];
45734
+ ic.contactpnts = [];
45735
+ ic.halogenpnts = [];
45736
+ ic.picationpnts = [];
45737
+ ic.pistackingpnts = [];
45738
+ }
45445
45739
 
45446
45740
  // type: view, save, forcegraph
45447
45741
  ic.bRender = false;
@@ -45713,11 +46007,11 @@ class ViewInterPairs {
45713
46007
  html += result.html;
45714
46008
  bondCnt = result.bondCnt;
45715
46009
 
45716
- $("#" + ic.pre + "dl_interactionsorted").html(html);
46010
+ $("#" + ic.pre + "dl_interactionsorted_html").html(html);
45717
46011
  me.htmlCls.dialogCls.openDlg('dl_interactionsorted', 'Show sorted interactions');
45718
46012
  }
45719
46013
  else if(type == 'view') {
45720
- $("#" + ic.pre + "dl_allinteraction").html(html);
46014
+ $("#" + ic.pre + "dl_allinteraction_html").html(html);
45721
46015
  me.htmlCls.dialogCls.openDlg('dl_allinteraction', 'Show interactions');
45722
46016
  }
45723
46017
  else if(type == 'linegraph') {
@@ -48045,7 +48339,7 @@ class ChainalignParser {
48045
48339
  me.htmlCls.clickMenuCls.setLogCmd(logStr, false);
48046
48340
  let html = "<br><b>Alignment RMSD</b>: " + rmsd.toPrecision(4) + " &#8491;<br>";
48047
48341
  if(me.cfg.aligntool == 'tmalign') html += "<b>TM-score</b>: " + align[0].score.toPrecision(4) + "<br><br>";
48048
- $("#" + ic.pre + "dl_rmsd").html(html);
48342
+ $("#" + ic.pre + "dl_rmsd_html").html(html);
48049
48343
  if(!me.cfg.bSidebyside) me.htmlCls.dialogCls.openDlg('dl_rmsd', 'RMSD of alignment');
48050
48344
 
48051
48345
  bAligned = true;
@@ -48603,7 +48897,7 @@ class MmcifParser {
48603
48897
  }
48604
48898
 
48605
48899
  async downloadMmcifSymmetry(mmcifid, type) { let ic = this.icn3d, me = ic.icn3dui;
48606
- // https://files.rcsb.org/header/ i snot accessible in Node.js
48900
+ // https://files.rcsb.org/header/ is not accessible in Node.js
48607
48901
  let url = (me.bNode) ? "https://files.rcsb.org/view/" + mmcifid + ".cif" : "https://files.rcsb.org/header/" + mmcifid + ".cif";
48608
48902
 
48609
48903
  //ic.bCid = undefined;
@@ -49902,7 +50196,8 @@ class PdbParser {
49902
50196
  }
49903
50197
  else {
49904
50198
  url = "https://files.rcsb.org/view/" + pdbid + ".pdb";
49905
- ic.ParserUtilsCls.setYourNote(pdbid.toUpperCase() + '(PDB) in iCn3D');
50199
+ pdbid = pdbid.toUpperCase();
50200
+ ic.ParserUtilsCls.setYourNote(pdbid + '(PDB) in iCn3D');
49906
50201
  }
49907
50202
 
49908
50203
  //ic.bCid = undefined;
@@ -52310,7 +52605,7 @@ class ParserUtils {
52310
52605
  //if(window.dialog) window.dialog.dialog( "close" );
52311
52606
  html += me.utilsCls.getMemDesc();
52312
52607
  }
52313
- $("#" + ic.pre + "dl_rmsd").html(html);
52608
+ $("#" + ic.pre + "dl_rmsd_html").html(html);
52314
52609
  if(!me.cfg.bSidebyside) me.htmlCls.dialogCls.openDlg('dl_rmsd', 'Realignment RMSD');
52315
52610
  }
52316
52611
 
@@ -52491,7 +52786,7 @@ class ParserUtils {
52491
52786
  ic.diagram2dCls.draw2Ddgm(ic.interactionData2, mmdbid2, 1);
52492
52787
 
52493
52788
  ic.html2ddgm += "<br>" + ic.diagram2dCls.set2DdgmNote(true);
52494
- $("#" + ic.pre + "dl_2ddgm").html(ic.html2ddgm);
52789
+ $("#" + ic.pre + "dl_2ddgm_html").html(ic.html2ddgm);
52495
52790
 
52496
52791
  ic.b2DShown = true;
52497
52792
 
@@ -52544,7 +52839,7 @@ class ParserUtils {
52544
52839
  ic.html2ddgm += "<br>" + ic.diagram2dCls.set2DdgmNote(true);
52545
52840
 
52546
52841
  ic.b2DShown = true;
52547
- $("#" + ic.pre + "dl_2ddgm").html(ic.html2ddgm);
52842
+ $("#" + ic.pre + "dl_2ddgm_html").html(ic.html2ddgm);
52548
52843
  if(me.cfg.show2d) me.htmlCls.dialogCls.openDlg('dl_2ddgm', 'Interactions');
52549
52844
 
52550
52845
  /// if(ic.deferredViewinteraction !== undefined) ic.deferredViewinteraction.resolve();
@@ -52562,7 +52857,7 @@ class ParserUtils {
52562
52857
  ic.diagram2dCls.draw2Ddgm(ic.interactionData, mmdbid);
52563
52858
 
52564
52859
  ic.html2ddgm += "<br>" + ic.diagram2dCls.set2DdgmNote();
52565
- $("#" + ic.pre + "dl_2ddgm").html(ic.html2ddgm);
52860
+ $("#" + ic.pre + "dl_2ddgm_html").html(ic.html2ddgm);
52566
52861
  }
52567
52862
 
52568
52863
  ic.b2DShown = true;
@@ -52665,7 +52960,7 @@ class ParserUtils {
52665
52960
  let rmsd = ic.rmsd_supr.rmsd;
52666
52961
 
52667
52962
  me.htmlCls.clickMenuCls.setLogCmd("RMSD of alignment to OPM: " + rmsd.toPrecision(4), false);
52668
- //$("#" + ic.pre + "dl_rmsd").html("<br><b>RMSD of alignment to OPM</b>: " + rmsd.toPrecision(4) + " &#8491;<br><br>");
52963
+ //$("#" + ic.pre + "dl_rmsd_html").html("<br><b>RMSD of alignment to OPM</b>: " + rmsd.toPrecision(4) + " &#8491;<br><br>");
52669
52964
  //if(!me.cfg.bSidebyside) me.htmlCls.dialogCls.openDlg('dl_rmsd', 'RMSD of alignment to OPM');
52670
52965
 
52671
52966
  let dxymaxsq = 0;
@@ -52871,6 +53166,16 @@ class ParserUtils {
52871
53166
 
52872
53167
  // set defined sets before loadScript
52873
53168
  if(ic.bInitial) {
53169
+ if(me.cfg.mobilemenu) {
53170
+ me.htmlCls.shownMenus = me.hashUtilsCls.cloneHash(me.htmlCls.simpleMenus);
53171
+ let bNoSave = true;
53172
+ me.htmlCls.clickMenuCls.applyShownMenus(bNoSave);
53173
+ }
53174
+ // else {
53175
+ // me.htmlCls.shownMenus = me.hashUtilsCls.cloneHash(me.htmlCls.allMenus);
53176
+ // me.htmlCls.clickMenuCls.applyShownMenus();
53177
+ // }
53178
+
52874
53179
  if(me.cfg.showsets) {
52875
53180
  ic.definedSetsCls.showSets();
52876
53181
  }
@@ -55211,6 +55516,7 @@ class LoadPDB {
55211
55516
  //let chainMissingResidueArray = {}
55212
55517
 
55213
55518
  let id = (pdbid) ? pdbid : ic.defaultPdbId;
55519
+
55214
55520
  let structure = id;
55215
55521
 
55216
55522
  let prevMissingChain = '';
@@ -56310,7 +56616,7 @@ class Vastplus {
56310
56616
  bAligned = true;
56311
56617
 
56312
56618
  me.htmlCls.clickMenuCls.setLogCmd("realignment RMSD: " + rmsd.toPrecision(4), false);
56313
- $("#" + ic.pre + "dl_rmsd").html("<br><b>Realignment RMSD</b>: " + rmsd.toPrecision(4) + " &#8491;<br><br>");
56619
+ $("#" + ic.pre + "dl_rmsd_html").html("<br><b>Realignment RMSD</b>: " + rmsd.toPrecision(4) + " &#8491;<br><br>");
56314
56620
  if(!me.cfg.bSidebyside) me.htmlCls.dialogCls.openDlg('dl_rmsd', 'Realignment RMSD');
56315
56621
 
56316
56622
  // apply matrix for each atom
@@ -58256,7 +58562,7 @@ class ApplyCommand {
58256
58562
 
58257
58563
  let legendHtml = me.htmlCls.clickMenuCls.setLegendHtml();
58258
58564
  //$("#" + me.pre + "legend").html(legendHtml).show();
58259
- $("#" + me.pre + "dl_legend").html(legendHtml);
58565
+ $("#" + me.pre + "dl_legend_html").html(legendHtml);
58260
58566
  me.htmlCls.dialogCls.openDlg('dl_legend', 'Color Range');
58261
58567
  }
58262
58568
  }
@@ -61772,7 +62078,7 @@ class Delphi {
61772
62078
  let phidata = await this.CalcPhiPrms(gsize, salt, contour, bSurface, data);
61773
62079
 
61774
62080
  this.loadPhiData(phidata, contour, bSurface);
61775
-
62081
+
61776
62082
  ic.bAjaxPhi = true;
61777
62083
 
61778
62084
  if(bSurface) {
@@ -62536,8 +62842,8 @@ class Dssp {
62536
62842
 
62537
62843
  // align each 3D domain with reference structure
62538
62844
  let result = ic.domain3dCls.c2b_NewSplitChain(ic.chains[chainid]);
62539
- let subdomains = result.subdomains;
62540
-
62845
+ let subdomains = result.subdomains;
62846
+
62541
62847
  let domainAtomsArray = [];
62542
62848
  if(subdomains.length <= 1) {
62543
62849
  domainAtomsArray.push(ic.chains[chainid]);
@@ -62567,9 +62873,9 @@ class Dssp {
62567
62873
  }
62568
62874
 
62569
62875
  for(let k = 0, kl = domainAtomsArray.length; k < kl; ++k) {
62570
-
62571
62876
  let pdb_target = ic.saveFileCls.getAtomPDB(domainAtomsArray[k], undefined, undefined, undefined, undefined, struct);
62572
62877
  let domainid = chainid + '-' + k;
62878
+
62573
62879
  for(let index = 0, indexl = dataArray.length; index < indexl; ++index) {
62574
62880
  let struct2 = ic.defaultPdbId + index;
62575
62881
  let pdb_query = dataArray[index].value; //[0];
@@ -62790,7 +63096,7 @@ if(!me.bNode) {
62790
63096
  else if(refnum >= 1200 && refnum < 1300) return "A'" + oriRefnum;
62791
63097
  else if(refnum >= 1300 && refnum < 1400) return "A*" + oriRefnum;
62792
63098
  else if(refnum >= 1400 && refnum < 2000) {
62793
- if(prevStrand.substr(0, 1) == 'A') {
63099
+ if(prevStrand && prevStrand.substr(0, 1) == 'A') {
62794
63100
  return prevStrand + oriRefnum;
62795
63101
  }
62796
63102
  else {
@@ -64159,7 +64465,7 @@ class Analysis {
64159
64465
  //html += '<b>Buried Surface for both Sets</b>: ' + buriedArea + ' &#8491;<sup>2</sup><br>';
64160
64466
  html += '<b>Buried Surface for Set 1</b>: ' + buriedArea2 + ' &#8491;<sup>2</sup><br>';
64161
64467
  html += '<b>Buried Surface for Set 2</b>: ' + buriedArea1 + ' &#8491;<sup>2</sup><br><br>';
64162
- $("#" + ic.pre + "dl_buriedarea").html(html);
64468
+ $("#" + ic.pre + "dl_buriedarea_html").html(html);
64163
64469
  me.htmlCls.dialogCls.openDlg('dl_buriedarea', 'Buried solvent accessible surface area in the interface');
64164
64470
  me.htmlCls.clickMenuCls.setLogCmd('buried surface ' + buriedArea, false);
64165
64471
  }
@@ -64265,7 +64571,7 @@ class Analysis {
64265
64571
 
64266
64572
  tableHtml += '</table><br><br>';
64267
64573
 
64268
- $("#" + me.pre + "dl_disttable").html(tableHtml);
64574
+ $("#" + me.pre + "dl_disttable_html").html(tableHtml);
64269
64575
  }
64270
64576
  }
64271
64577
 
@@ -64822,7 +65128,7 @@ class Diagram2d {
64822
65128
 
64823
65129
  ic.html2ddgm += html;
64824
65130
 
64825
- $("#" + ic.pre + "dl_2ddgm").html(ic.html2ddgm);
65131
+ $("#" + ic.pre + "dl_2ddgm_html").html(ic.html2ddgm);
64826
65132
 
64827
65133
  return html;
64828
65134
  }
@@ -70707,7 +71013,7 @@ class iCn3DUI {
70707
71013
  //even when multiple iCn3D viewers are shown together.
70708
71014
  this.pre = this.cfg.divid + "_";
70709
71015
 
70710
- this.REVISION = '3.23.2';
71016
+ this.REVISION = '3.24.0';
70711
71017
 
70712
71018
  // In nodejs, iCn3D defines "window = {navigator: {}}"
70713
71019
  this.bNode = (Object.keys(window).length < 2) ? true : false;