icn3d 3.47.2 → 3.47.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/icn3d.js CHANGED
@@ -54315,6 +54315,11 @@ class UtilsCls {
54315
54315
  // from iview (http://istar.cse.cuhk.edu.hk/iview/)
54316
54316
  //Determine whether atom1 and atom2 have covalent bond.
54317
54317
  hasCovalentBond(atom0, atom1) { let me = this.icn3dui;
54318
+ // no bonds between metals
54319
+ if($.inArray(atom0.elem, me.parasCls.ionsArray) !== -1 && $.inArray(atom1.elem, me.parasCls.ionsArray) !== -1) {
54320
+ return false;
54321
+ }
54322
+
54318
54323
  let r = me.parasCls.covalentRadii[atom0.elem.toUpperCase()] + me.parasCls.covalentRadii[atom1.elem.toUpperCase()];
54319
54324
 
54320
54325
  //return atom0.coord.distanceToSquared(atom1.coord) < 1.3 * r * r;
@@ -54881,6 +54886,7 @@ class ParasCls {
54881
54886
  this.backgroundColors = {
54882
54887
  'black': this.thr(0x000000),
54883
54888
  'grey': this.thr(0xCCCCCC),
54889
+ 'gray': this.thr(0xCCCCCC),
54884
54890
  'white': this.thr(0xFFFFFF),
54885
54891
  'transparent': this.thr(0xFFFFFF) //this.thr(0x000000)
54886
54892
  };
@@ -60915,6 +60921,7 @@ class Dialog {
60915
60921
  let bLineGraph = $('#' + me.pre + 'dl_linegraph').hasClass('ui-dialog-content'); // initialized
60916
60922
  let bScatterplot = $('#' + me.pre + 'dl_scatterplot').hasClass('ui-dialog-content'); // initialized
60917
60923
  let bRmsdplot = $('#' + me.pre + 'dl_rmsdplot').hasClass('ui-dialog-content'); // initialized
60924
+ let bHbondplot = $('#' + me.pre + 'dl_hbondplot').hasClass('ui-dialog-content'); // initialized
60918
60925
  let bLigplot = $('#' + me.pre + 'dl_ligplot').hasClass('ui-dialog-content'); // initialized
60919
60926
  let bContactmap = $('#' + me.pre + 'dl_contactmap').hasClass('ui-dialog-content'); // initialized
60920
60927
  let bAlignerrormap = $('#' + me.pre + 'dl_alignerrormap').hasClass('ui-dialog-content'); // initialized
@@ -60926,13 +60933,14 @@ class Dialog {
60926
60933
 
60927
60934
  status.bSelectannotationsInit2 = false, status.bGraph2 = false, status.bLineGraph2 = false;
60928
60935
  status.bScatterplot2 = false, status.bLigplot2 = false, status.bTable2 = false, status.bAlignmentInit2 = false;
60929
- status.bTwoddgmInit2 = false, status.bTwodctnInit2 = false, status.bSetsInit2 = false;
60936
+ status.bTwoddgmInit2 = false, status.bTwodctnInit2 = false, status.bSetsInit2 = false, status.bHbondplot2 = false;
60930
60937
 
60931
60938
  id2flag.dl_selectannotations = 'bSelectannotationsInit2';
60932
60939
  id2flag.dl_graph = 'bGraph2';
60933
60940
  id2flag.dl_linegraph = 'bLineGraph2';
60934
60941
  id2flag.dl_scatterplot = 'bScatterplot2';
60935
60942
  id2flag.dl_rmsdplot = 'bRmsdplot2';
60943
+ id2flag.dl_hbondplot = 'bHbondplot2';
60936
60944
  id2flag.dl_ligplot = 'bLigplot2';
60937
60945
  id2flag.dl_contactmap = 'bContactmap2';
60938
60946
  id2flag.dl_alignerrormap = 'bAlignerrormap2';
@@ -60947,6 +60955,7 @@ class Dialog {
60947
60955
  if(bLineGraph) status.bLineGraph2 = $('#' + me.pre + 'dl_linegraph').dialog( 'isOpen' );
60948
60956
  if(bScatterplot) status.bScatterplot2 = $('#' + me.pre + 'dl_scatterplot').dialog( 'isOpen' );
60949
60957
  if(bRmsdplot) status.bRmsdplot2 = $('#' + me.pre + 'dl_rmsdplot').dialog( 'isOpen' );
60958
+ if(bHbondplot) status.bHbondplot2 = $('#' + me.pre + 'dl_hbondplot').dialog( 'isOpen' );
60950
60959
  if(bLigplot) status.bLigplot2 = $('#' + me.pre + 'dl_ligplot').dialog( 'isOpen' );
60951
60960
  if(bContactmap) status.bContactmap2 = $('#' + me.pre + 'dl_contactmap').dialog( 'isOpen' );
60952
60961
  if(bAlignerrormap) status.bAlignerror2 = $('#' + me.pre + 'dl_alignerrormap').dialog( 'isOpen' );
@@ -61107,7 +61116,7 @@ class Dialog {
61107
61116
  close: function(e) {
61108
61117
  let status = thisClass.getDialogStatus().status;
61109
61118
 
61110
- if((!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bTable2) &&(!status.bAlignmentInit2) ) {
61119
+ if((!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bHbondplot2) &&(!status.bLigplot2) &&(!status.bTable2) &&(!status.bAlignmentInit2) ) {
61111
61120
  //ic.resizeCanvasCls.resizeCanvas(me.htmlCls.WIDTH - me.htmlCls.LESSWIDTH, me.htmlCls.HEIGHT - me.htmlCls.LESSHEIGHT - me.htmlCls.EXTRAHEIGHT, true);
61112
61121
  ic.resizeCanvasCls.resizeCanvas(me.htmlCls.WIDTH, me.htmlCls.HEIGHT, true);
61113
61122
  }
@@ -61136,7 +61145,7 @@ class Dialog {
61136
61145
 
61137
61146
  let status = this.getDialogStatus().status;
61138
61147
 
61139
- 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_rmsdplot' || id === me.pre + 'dl_ligplot' || id === me.pre + 'dl_contactmap' || id === me.pre + 'dl_alignerrormap' || id === me.pre + 'dl_interactionsorted' || id === me.pre + 'dl_alignment') {
61148
+ 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_rmsdplot' || id === me.pre + 'dl_hbondplot' || id === me.pre + 'dl_ligplot' || id === me.pre + 'dl_contactmap' || id === me.pre + 'dl_alignerrormap' || id === me.pre + 'dl_interactionsorted' || id === me.pre + 'dl_alignment') {
61140
61149
  //var dialogWidth = 0.5 *(me.htmlCls.WIDTH - me.htmlCls.LESSWIDTH) - twoddgmWidth * 0.5;
61141
61150
  let dialogWidth = 0.5 *(me.htmlCls.WIDTH) - twoddgmWidth * 0.5;
61142
61151
 
@@ -61172,15 +61181,16 @@ class Dialog {
61172
61181
  modal: false,
61173
61182
  position: position,
61174
61183
  close: function(e) {
61175
- if((id === me.pre + 'dl_selectannotations' &&(!status.bAlignmentInit2) &&(!status.bGraph2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2))
61176
- ||(id === me.pre + 'dl_graph' &&(!status.bSelectannotationsInit2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2))
61177
- ||(id === me.pre + 'dl_alignment' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2))
61178
- ||(id === me.pre + 'dl_interactionsorted' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2))
61179
- ||(id === me.pre + 'dl_linegraph' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2))
61180
- ||(id === me.pre + 'dl_scatterplot' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2))
61181
- ||(id === me.pre + 'dl_ligplot' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2))
61182
- ||(id === me.pre + 'dl_contactmap' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bAlignerrormap2))
61183
- ||(id === me.pre + 'dl_alignerrormap' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2))
61184
+ if((id === me.pre + 'dl_selectannotations' &&(!status.bAlignmentInit2) &&(!status.bGraph2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2))
61185
+ ||(id === me.pre + 'dl_graph' &&(!status.bSelectannotationsInit2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2))
61186
+ ||(id === me.pre + 'dl_alignment' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2))
61187
+ ||(id === me.pre + 'dl_interactionsorted' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2))
61188
+ ||(id === me.pre + 'dl_linegraph' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2))
61189
+ ||(id === me.pre + 'dl_scatterplot' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2))
61190
+ ||(id === me.pre + 'dl_ligplot' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2))
61191
+ ||(id === me.pre + 'dl_contactmap' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2))
61192
+ ||(id === me.pre + 'dl_alignerrormap' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bHbondplot2))
61193
+ ||(id === me.pre + 'dl_hbondplot' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2))
61184
61194
  ) {
61185
61195
  if(status.bTwoddgmInit2 || status.bTwodctnInit2 || status.bSetsInit2) {
61186
61196
  let canvasWidth = me.utilsCls.isMobile() ? me.htmlCls.WIDTH : me.htmlCls.WIDTH - twoddgmWidth;
@@ -61243,7 +61253,7 @@ class Dialog {
61243
61253
 
61244
61254
  //if(me.htmlCls.WIDTH - me.htmlCls.LESSWIDTH >= me.htmlCls.HEIGHT - me.htmlCls.LESSHEIGHT - me.htmlCls.EXTRAHEIGHT) {
61245
61255
  if(me.htmlCls.WIDTH >= me.htmlCls.HEIGHT) {
61246
- if(status.bSelectannotationsInit2 || status.bGraph2 || status.bLineGraph2 || status.bScatterplot2 || status.bLigplot2 || status.bTable2 || status.bAlignmentInit2) {
61256
+ if(status.bSelectannotationsInit2 || status.bGraph2 || status.bLineGraph2 || status.bScatterplot2 || status.bHbondplot2 || status.bLigplot2 || status.bTable2 || status.bAlignmentInit2) {
61247
61257
  //tmpWidth = 0.5 *(me.htmlCls.WIDTH - me.htmlCls.LESSWIDTH) - twoddgmWidth * 0.5;
61248
61258
  tmpWidth = 0.5 *(me.htmlCls.WIDTH) - twoddgmWidth * 0.5;
61249
61259
  }
@@ -61282,7 +61292,7 @@ class Dialog {
61282
61292
 
61283
61293
  //if(me.htmlCls.WIDTH - me.htmlCls.LESSWIDTH >= me.htmlCls.HEIGHT - me.htmlCls.LESSHEIGHT - me.htmlCls.EXTRAHEIGHT) {
61284
61294
  if(me.htmlCls.WIDTH >= me.htmlCls.HEIGHT) {
61285
- if(status.bSelectannotationsInit2 || status.bGraph2 || status.bLineGraph2 || status.bScatterplot2 || status.bLigplot2 || status.bTable2 || status.bAlignmentInit2) {
61295
+ if(status.bSelectannotationsInit2 || status.bGraph2 || status.bLineGraph2 || status.bScatterplot2 || status.bHbondplot2 || status.bLigplot2 || status.bTable2 || status.bAlignmentInit2) {
61286
61296
  //tmpWidth = 0.5 *(me.htmlCls.WIDTH - me.htmlCls.LESSWIDTH) - twoddgmWidth * 0.5;
61287
61297
  tmpWidth = 0.5 *(me.htmlCls.WIDTH) - twoddgmWidth * 0.5;
61288
61298
  }
@@ -61362,7 +61372,7 @@ class Dialog {
61362
61372
  let width = 400, height = 150;
61363
61373
  let twoddgmWidth = me.htmlCls.width2d + 20;
61364
61374
 
61365
- 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_rmsdplot' || id === me.pre + 'dl_ligplot' || id === me.pre + 'dl_contactmap' || id === me.pre + 'dl_alignerrormap' || id === me.pre + 'dl_interactionsorted' || id === me.pre + 'dl_alignment') {
61375
+ 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_rmsdplot' || id === me.pre + 'dl_hbondplot' || id === me.pre + 'dl_ligplot' || id === me.pre + 'dl_contactmap' || id === me.pre + 'dl_alignerrormap' || id === me.pre + 'dl_interactionsorted' || id === me.pre + 'dl_alignment') {
61366
61376
  $( "#" + id ).show();
61367
61377
  $( "#" + id + "_nb").show();
61368
61378
  $( "#" + id + "_title").html(title);
@@ -61798,7 +61808,7 @@ class SetDialog {
61798
61808
  html += "Step 1. <b>PDB File</b>: " + me.htmlCls.inputFileStr + "id='" + me.pre + "dcdpdbfile' size=8> ";
61799
61809
  html += me.htmlCls.buttonStr + "reload_dcdpdbfile'>Load PDB File</button><br><br>";
61800
61810
 
61801
- html += "Step 2. <b>Stride</b>: Load one frame per every " + me.htmlCls.inputTextStr + "id='" + me.pre + "md_stride' value='1' size=2>frame(s)<br><br>";
61811
+ html += "Step 2. <b>Stride</b>: Load one frame per every " + me.htmlCls.inputTextStr + "id='" + me.pre + "md_stride' value='1' size=2> frame(s)<br><br>";
61802
61812
 
61803
61813
  html += "Step 3. <b>DCD File</b>: " + me.htmlCls.inputFileStr + "id='" + me.pre + "dcdfile' size=8> ";
61804
61814
  html += me.htmlCls.buttonStr + "reload_dcdfile'>Load DCD File</button><br>";
@@ -61807,9 +61817,9 @@ class SetDialog {
61807
61817
  html += me.htmlCls.buttonStr + "reload_xtcfile' style='margin-left:28px'>Load XTC File</button><br><br>";
61808
61818
 
61809
61819
  html += "<hr><br>";
61810
- html += "<b>Analysis</b>: " + me.htmlCls.buttonStr + "rmsd_plot'>RMSD Plot</button><br><br>";
61820
+ html += "<b>Analysis</b>: " + me.htmlCls.buttonStr + "rmsd_plot'>RMSD Plot</button>" + me.htmlCls.buttonStr + "hbond_plot' style='margin-left:12px'>H-bond Plot</button><br><br>";
61811
61821
 
61812
- html += "<b>Playback</b>: " + me.htmlCls.buttonStr + "md_playback'>Play</button> every " + me.htmlCls.inputTextStr + "id='" + me.pre + "play_step' value='1' size=2> step with " + me.htmlCls.inputTextStr + "id='" + me.pre + "play_fps' value='24' size=2> FPS (Frame per Sec)<br><br>";
61822
+ html += "<b>Playback</b>: " + me.htmlCls.buttonStr + "md_playback'>Play</button> every " + me.htmlCls.inputTextStr + "id='" + me.pre + "play_step' value='1' size=2> step(s) with " + me.htmlCls.inputTextStr + "id='" + me.pre + "play_fps' value='24' size=2> FPS (Frame per Sec)<br><br>";
61813
61823
 
61814
61824
  html += "<b>Video from Frames</b>: " + me.htmlCls.buttonStr + "video_frame'>Make Video</button> with " + me.htmlCls.inputTextStr + "id='" + me.pre + "videofps' value='24' size=2> FPS (Frame per Sec)<br><br>";
61815
61825
 
@@ -62355,6 +62365,17 @@ class SetDialog {
62355
62365
 
62356
62366
  html += "</div>";
62357
62367
 
62368
+
62369
+ html += me.htmlCls.divStr + "dl_hbondplot' style='background-color:white' class='" + dialogClass + "'>";
62370
+ html += this.addNotebookTitle('dl_hbondplot', 'H-bond Plot');
62371
+
62372
+ me.hbondplotid = me.pre + 'hbondplot';
62373
+ html += me.htmlCls.divNowrapStr + buttonStrTmp + me.hbondplotid + '_json">JSON</button>' + me.htmlCls.space2 + " The image below can be saved via right click.<br></div>";
62374
+ html += '<canvas id="' + me.hbondplotid + '"></canvas>';
62375
+
62376
+ html += "</div>";
62377
+
62378
+
62358
62379
  html += me.htmlCls.divStr + "dl_ligplot' style='background-color:white' class='" + dialogClass + "'>";
62359
62380
 
62360
62381
  if(me.cfg.cid !== undefined || me.cfg.smiles !== undefined) {
@@ -65706,7 +65727,13 @@ class Events {
65706
65727
  me.myEventCls.onIds("#" + me.pre + "rmsd_plot", "click", async function(e) { let ic = me.icn3d;
65707
65728
  e.preventDefault();
65708
65729
 
65709
- await ic.dcdParserCls.showRmsdPlot();
65730
+ await ic.dcdParserCls.showRmsdHbondPlot();
65731
+ });
65732
+ me.myEventCls.onIds("#" + me.pre + "hbond_plot", "click", async function(e) { let ic = me.icn3d;
65733
+ e.preventDefault();
65734
+ let bHbondPlot = true;
65735
+
65736
+ await ic.dcdParserCls.showRmsdHbondPlot(bHbondPlot);
65710
65737
  });
65711
65738
  me.myEventCls.onIds("#" + me.pre + "hbondLineGraph", "click", async function(e) { let ic = me.icn3d;
65712
65739
  e.preventDefault();
@@ -65859,6 +65886,12 @@ class Events {
65859
65886
  ic.saveFileCls.saveFile(ic.inputid + "_rmsdplot.json", "text", [JSON.stringify(ic.mdDataSet)]);
65860
65887
  });
65861
65888
 
65889
+ me.myEventCls.onIds("#" + me.hbondplotid + "_json", "click", function(e) { let ic = me.icn3d;
65890
+ e.preventDefault();
65891
+
65892
+ ic.saveFileCls.saveFile(ic.inputid + "_hbondplot.json", "text", [JSON.stringify(ic.mdDataSet)]);
65893
+ });
65894
+
65862
65895
  me.myEventCls.onIds("#" + me.ligplotid + "_svg", "click", function(e) { let ic = me.icn3d;
65863
65896
  e.preventDefault();
65864
65897
 
@@ -67245,6 +67278,7 @@ class SetHtml {
67245
67278
  let prtribbonwidth =(type == '3dprint') ? '2' : '1.3';
67246
67279
  let nucleotideribbonwidth =(type == '3dprint') ? '1.4' : '0.8';
67247
67280
 
67281
+ let bkgdcolor = 'black';
67248
67282
  let shininess = 40;
67249
67283
  let light1 = 2;
67250
67284
  let light2 = 1;
@@ -67255,6 +67289,13 @@ class SetHtml {
67255
67289
 
67256
67290
  // retrieve from cache
67257
67291
  if(type == 'style') {
67292
+ if(this.getCookie('bkgdcolor') != '') {
67293
+ bkgdcolor = this.getCookie('bkgdcolor').toLowerCase();
67294
+ if(bkgdcolor != 'transparent' && bkgdcolor != 'white' && bkgdcolor != 'black' && bkgdcolor != 'gray' && bkgdcolor != 'grey') {
67295
+ bkgdcolor = 'black';
67296
+ }
67297
+ }
67298
+
67258
67299
  if(this.getCookie('shininess') != '') {
67259
67300
  shininess = parseFloat(this.getCookie('shininess'));
67260
67301
  }
@@ -67292,12 +67333,13 @@ class SetHtml {
67292
67333
 
67293
67334
  html += "<b>Note</b>: The following parameters will be saved in cache. You just need to set them once. <br><br>";
67294
67335
 
67295
- html += "<b>1. Shininess</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "shininess' value='" + shininess + "' size=4>" + me.htmlCls.space3 + "(for the shininess of the 3D objects, default 40)<br/><br/>";
67296
- html += "<b>2. Three directional lights</b>: <br>";
67336
+ html += "<b>1. Background Color</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "bkgdcolor' value='" + bkgdcolor + "' size=4>" + me.htmlCls.space3 + "(for canvas background, either transparent/white, black, or gray/grey, default black)<br/><br/>";
67337
+ html += "<b>2. Shininess</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "shininess' value='" + shininess + "' size=4>" + me.htmlCls.space3 + "(for the shininess of the 3D objects, default 40)<br/><br/>";
67338
+ html += "<b>3. Three directional lights</b>: <br>";
67297
67339
  html += "<b>Key Light</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "light1' value='" + light1 + "' size=4>" + me.htmlCls.space3 + "(for the light strength of the key light, default 2)<br/>";
67298
67340
  html += "<b>Fill Light</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "light2' value='" + light2 + "' size=4>" + me.htmlCls.space3 + "(for the light strength of the fill light, default 1)<br/>";
67299
67341
  html += "<b>Back Light</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "light3' value='" + light3 + "' size=4>" + me.htmlCls.space3 + "(for the light strength of the back light, default 1)<br/><br/>";
67300
- html += "<b>3. Thickness</b>: <br>";
67342
+ html += "<b>4. Thickness</b>: <br>";
67301
67343
  }
67302
67344
 
67303
67345
  html += "<b>Line Radius</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "linerad_" + type + "' value='" + linerad + "' size=4>" + me.htmlCls.space3 + "(for stabilizers, hydrogen bonds, distance lines, default 0.1)<br/>";
@@ -67313,11 +67355,11 @@ class SetHtml {
67313
67355
  html += "<b>Ball Scale</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "ballscale_" + type + "' value='" + ballscale + "' size=4>" + me.htmlCls.space3 + "(for styles 'Ball and Stick' and 'Dot', default 0.3)<br/>";
67314
67356
 
67315
67357
  if(type == 'style') {
67316
- html += "<br><b>4. Show Glycan Cartoon</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "glycan' value='" + bGlycansCartoon + "' size=4>" + me.htmlCls.space3 + "(0: hide, 1: show, default 0)<br/>";
67358
+ html += "<br><b>5. Show Glycan Cartoon</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "glycan' value='" + bGlycansCartoon + "' size=4>" + me.htmlCls.space3 + "(0: hide, 1: show, default 0)<br/>";
67317
67359
 
67318
- html += "<br><b>5. Show Membrane</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "membrane' value='" + bMembrane + "' size=4>" + me.htmlCls.space3 + "(0: hide, 1: show, default 1)<br/>";
67360
+ html += "<br><b>7. Show Membrane</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "membrane' value='" + bMembrane + "' size=4>" + me.htmlCls.space3 + "(0: hide, 1: show, default 1)<br/>";
67319
67361
 
67320
- html += "<br><b>6. Enlarge Command Window</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "cmdwindow' value='" + bCmdWindow + "' size=4>" + me.htmlCls.space3 + "(0: Regular, 1: Large, default 0)<br/><br/>";
67362
+ html += "<br><b>7. Enlarge Command Window</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "cmdwindow' value='" + bCmdWindow + "' size=4>" + me.htmlCls.space3 + "(0: Regular, 1: Large, default 0)<br/><br/>";
67321
67363
  }
67322
67364
 
67323
67365
  html += me.htmlCls.spanNowrapStr + "" + me.htmlCls.buttonStr + "apply_thickness_" + type + "'>Apply</button></span>&nbsp;&nbsp;&nbsp;";
@@ -67933,6 +67975,7 @@ class SetHtml {
67933
67975
 
67934
67976
  if(postfix == 'style') {
67935
67977
  if(bReset) {
67978
+ $("#" + me.pre + "bkgdcolor").val('black');
67936
67979
  $("#" + me.pre + "shininess").val('40');
67937
67980
  $("#" + me.pre + "light1").val('2');
67938
67981
  $("#" + me.pre + "light2").val('1');
@@ -67942,6 +67985,12 @@ class SetHtml {
67942
67985
  $("#" + me.pre + "cmdwindow").val('0');
67943
67986
  }
67944
67987
 
67988
+ ic.bkgdcolor = $("#" + me.pre + "bkgdcolor").val(); //black
67989
+ if(ic.bkgdcolor != 'transparent' && ic.bkgdcolor != 'white' && ic.bkgdcolor != 'black' && ic.bkgdcolor != 'gray' && ic.bkgdcolor != 'grey') {
67990
+ ic.bkgdcolor = 'black';
67991
+ }
67992
+ ic.opts['background'] = ic.bkgdcolor;
67993
+
67945
67994
  ic.shininess = parseFloat($("#" + me.pre + "shininess").val()); //40;
67946
67995
  ic.light1 = parseFloat($("#" + me.pre + "light1").val()); //0.6;
67947
67996
  ic.light2 = parseFloat($("#" + me.pre + "light2").val()); //0.4;
@@ -67976,6 +68025,7 @@ class SetHtml {
67976
68025
  // save to cache
67977
68026
  if(!me.bNode) { // && postfix == 'style') {
67978
68027
  let exdays = 3650; // 10 years
68028
+ this.setCookie('bkgdcolor', ic.bkgdcolor, exdays);
67979
68029
  this.setCookie('shininess', ic.shininess, exdays);
67980
68030
  this.setCookie('light1', ic.light1, exdays);
67981
68031
  this.setCookie('light2', ic.light2, exdays);
@@ -74540,6 +74590,17 @@ class Scene {
74540
74590
  }
74541
74591
 
74542
74592
  // get parameters from cookies
74593
+ if(me.htmlCls.setHtmlCls.getCookie('bkgdcolor') != '') {
74594
+ let bkgdcolor = me.htmlCls.setHtmlCls.getCookie('bkgdcolor');
74595
+
74596
+ if(ic.bkgdcolor != bkgdcolor) {
74597
+ me.htmlCls.clickMenuCls.setLogCmd('set background ' + bkgdcolor, true);
74598
+ }
74599
+
74600
+ ic.bkgdcolor = bkgdcolor;
74601
+ ic.opts['background'] = ic.bkgdcolor;
74602
+ }
74603
+
74543
74604
  if(me.htmlCls.setHtmlCls.getCookie('shininess') != '') {
74544
74605
  let shininess = parseFloat(me.htmlCls.setHtmlCls.getCookie('shininess'));
74545
74606
 
@@ -85611,7 +85672,7 @@ class Impostor {
85611
85672
 
85612
85673
  setParametersForShader (opacity) { let ic = this.icn3d, me = ic.icn3dui;
85613
85674
  let background = me.parasCls.backgroundColors[ic.opts.background.toLowerCase()];
85614
- //if(!background) background = me.parasCls.thr(0x000000);
85675
+ if(!background) background = me.parasCls.thr(0x000000);
85615
85676
 
85616
85677
  let near = 2.5*ic.maxD;
85617
85678
  let far = 4*ic.maxD;
@@ -91858,10 +91919,29 @@ class AnnoIg {
91858
91919
  if(!info) continue;
91859
91920
 
91860
91921
  let tmscore = info.score;
91922
+ info.score2;
91861
91923
 
91862
91924
  let igType = (parseFloat(tmscore) < ic.refnumCls.TMThresholdIgType ) ? 'Ig' : ic.ref2igtype[info.refpdbname];
91925
+ let deltaTmscoreStr = '';
91926
+ /*
91927
+ // check how many sheets are matched to decide if it is a jelly roll
91928
+ let matchedSheetCnt = 0, totalSheetCnt = 0;
91929
+ for(let resid in ic.domainid2sheetEnds[domainid]) {
91930
+ if(ic.resid2refnum[resid] && !ic.residIgLoop.hasOwnProperty(resid)) { // assigned and not loop
91931
+ ++matchedSheetCnt;
91932
+ }
91933
+ ++totalSheetCnt;
91934
+ }
91935
+ let notMatchedSheetCnt = totalSheetCnt - matchedSheetCnt;
91936
+
91937
+ if(tmscore - tmscore2 > 0.1 && notMatchedSheetCnt >= 4) {
91938
+ igType = 'Jelly roll';
91939
+ deltaTmscoreStr = ', ' + notMatchedSheetCnt + ' sheets not assigned';
91940
+ }
91941
+ */
91942
+
91863
91943
  titleArray.push(igType + ' (TM:' + parseFloat(tmscore).toFixed(2) + ')');
91864
- fullTitleArray.push(igType + ' (TM:' + parseFloat(tmscore).toFixed(2) + '), template: ' + info.refpdbname + ', type: ' + ic.ref2igtype[info.refpdbname] + ', Seq. identity: ' + parseFloat(info.seqid).toFixed(2) + ', aligned residues: ' + info.nresAlign + ', label in 3D: ' + chain + '-Ig' + (i+1).toString());
91944
+ fullTitleArray.push(igType + ' (TM:' + parseFloat(tmscore).toFixed(2) + deltaTmscoreStr + '), template: ' + info.refpdbname + ', type: ' + ic.ref2igtype[info.refpdbname] + ', Seq. identity: ' + parseFloat(info.seqid).toFixed(2) + ', aligned residues: ' + info.nresAlign + ', label in 3D: ' + chain + '-Ig' + (i+1).toString());
91865
91945
 
91866
91946
  domainArray.push(igType);
91867
91947
 
@@ -99634,6 +99714,8 @@ class HlUpdate {
99634
99714
  }
99635
99715
 
99636
99716
  hlSeqInChain(chainid) { let ic = this.icn3d; ic.icn3dui;
99717
+ if(!ic.chainsSeq[chainid]) return;
99718
+
99637
99719
  // update annotation windows and alignment sequences
99638
99720
  for(let i = 0, il = ic.chainsSeq[chainid].length; i < il; ++i) {
99639
99721
  let resi = ic.chainsSeq[chainid][i].resi;
@@ -101108,7 +101190,7 @@ class ShowInter {
101108
101190
  // between the highlighted and atoms in nameArray
101109
101191
  //Show the hydrogen bonds between chemicals and proteins/nucleotides with dashed-lines.
101110
101192
  //"threshold" defines the distance of hydrogen bonds.
101111
- showHbonds(threshold, nameArray2, nameArray, bHbondCalc, bSaltbridge, type) { let ic = this.icn3d, me = ic.icn3dui;
101193
+ showHbonds(threshold, nameArray2, nameArray, bHbondCalc, bSaltbridge, type, bHbondPlot) { let ic = this.icn3d, me = ic.icn3dui;
101112
101194
  if(bHbondCalc) return;
101113
101195
  let hbonds_saltbridge, select;
101114
101196
  if(bSaltbridge) {
@@ -101119,8 +101201,7 @@ class ShowInter {
101119
101201
  hbonds_saltbridge = 'hbonds';
101120
101202
  select = 'hbonds ' + threshold + ' | sets ' + nameArray2 + " " + nameArray + " | " + bHbondCalc;
101121
101203
  }
101122
- ic.opts[hbonds_saltbridge] = "yes";
101123
- ic.opts["water"] = "dot";
101204
+
101124
101205
  let firstSetAtoms, complement;
101125
101206
  firstSetAtoms = ic.definedSetsCls.getAtomsFromNameArray(nameArray2);
101126
101207
  complement = ic.definedSetsCls.getAtomsFromNameArray(nameArray);
@@ -101130,34 +101211,39 @@ class ShowInter {
101130
101211
  // let selectedAtoms = ic.hBondCls.calculateChemicalHbonds(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge );
101131
101212
  let selectedAtoms = ic.hBondCls.calculateChemicalHbonds(me.hashUtilsCls.hash2Atoms(complement, ic.atoms), me.hashUtilsCls.hash2Atoms(firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge );
101132
101213
 
101133
- let commanddesc;
101134
- if(bSaltbridge) {
101135
- ic.resid2ResidhashSaltbridge = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
101136
- commanddesc = 'all atoms that have salt bridges with the selected atoms';
101137
- }
101138
- else {
101139
- ic.resid2ResidhashHbond = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
101140
- commanddesc = 'all atoms that are hydrogen-bonded with the selected atoms';
101141
- }
101142
- let residues = {};
101143
- for(let i in selectedAtoms) {
101144
- let residueid = ic.atoms[i].structure + '_' + ic.atoms[i].chain + '_' + ic.atoms[i].resi;
101145
- residues[residueid] = 1;
101146
- }
101147
- ic.hAtoms = {};
101148
- for(let resid in residues) {
101149
- for(let i in ic.residues[resid]) {
101150
- ic.hAtoms[i] = 1;
101151
- ic.atoms[i].style2 = 'stick';
101152
- //ic.atoms[i].style2 = 'lines';
101214
+ if(!bHbondPlot) {
101215
+ let commanddesc;
101216
+ if(bSaltbridge) {
101217
+ ic.resid2ResidhashSaltbridge = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
101218
+ commanddesc = 'all atoms that have salt bridges with the selected atoms';
101219
+ }
101220
+ else {
101221
+ ic.resid2ResidhashHbond = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
101222
+ commanddesc = 'all atoms that are hydrogen-bonded with the selected atoms';
101223
+ }
101224
+ let residues = {};
101225
+ for(let i in selectedAtoms) {
101226
+ let residueid = ic.atoms[i].structure + '_' + ic.atoms[i].chain + '_' + ic.atoms[i].resi;
101227
+ residues[residueid] = 1;
101228
+ }
101229
+ ic.hAtoms = {};
101230
+ for(let resid in residues) {
101231
+ for(let i in ic.residues[resid]) {
101232
+ ic.hAtoms[i] = 1;
101233
+ ic.atoms[i].style2 = 'stick';
101234
+ //ic.atoms[i].style2 = 'lines';
101235
+ }
101153
101236
  }
101154
- }
101155
101237
 
101156
- //let commandname = hbonds_saltbridge + '_' + firstAtom.serial;
101157
- let commandname = hbonds_saltbridge + '_auto';
101158
- ic.selectionCls.addCustomSelection(Object.keys(residues), commandname, commanddesc, select, true);
101159
- ic.selectionCls.saveSelectionIfSelected();
101160
- ic.drawCls.draw();
101238
+ ic.opts[hbonds_saltbridge] = "yes";
101239
+ ic.opts["water"] = "dot";
101240
+
101241
+ //let commandname = hbonds_saltbridge + '_' + firstAtom.serial;
101242
+ let commandname = hbonds_saltbridge + '_auto';
101243
+ ic.selectionCls.addCustomSelection(Object.keys(residues), commandname, commanddesc, select, true);
101244
+ ic.selectionCls.saveSelectionIfSelected();
101245
+ ic.drawCls.draw();
101246
+ }
101161
101247
  }
101162
101248
  }
101163
101249
 
@@ -101478,7 +101564,7 @@ class ViewInterPairs {
101478
101564
  }
101479
101565
 
101480
101566
  async viewInteractionPairs(nameArray2, nameArray, bHbondCalc, type,
101481
- bHbond, bSaltbridge, bInteraction, bHalogen, bPication, bPistacking, contactDist) { let ic = this.icn3d, me = ic.icn3dui;
101567
+ bHbond, bSaltbridge, bInteraction, bHalogen, bPication, bPistacking, contactDist, bHbondPlot) { let ic = this.icn3d, me = ic.icn3dui;
101482
101568
  let bondCnt;
101483
101569
 
101484
101570
  // reset
@@ -101578,13 +101664,13 @@ class ViewInterPairs {
101578
101664
  if(!bHbondCalc) {
101579
101665
  ic.hAtoms = me.hashUtilsCls.cloneHash(prevHatoms);
101580
101666
 
101581
- ic.showInterCls.showHbonds(threshold, nameArray2, nameArray, bHbondCalc, undefined, type);
101667
+ ic.showInterCls.showHbonds(threshold, nameArray2, nameArray, bHbondCalc, undefined, type, bHbondPlot);
101582
101668
  }
101583
101669
  hAtoms = me.hashUtilsCls.unionHash(hAtoms, ic.hAtoms);
101584
101670
  }
101585
101671
  // switch display order, show hydrogen first
101586
101672
  let tableHtml = '';
101587
- if(bHbond) {
101673
+ if(bHbond && !bHbondPlot) {
101588
101674
  tableHtml += this.exportHbondPairs(type, labelType);
101589
101675
  }
101590
101676
  if(bSaltbridge) {
@@ -101710,46 +101796,51 @@ class ViewInterPairs {
101710
101796
  ic.hAtoms = me.hashUtilsCls.cloneHash(hAtoms);
101711
101797
  ic.bRender = true;
101712
101798
  //ic.hlUpdateCls.updateHlAll();
101713
- ic.drawCls.draw();
101714
- let residHash, select, commandname, commanddesc;
101715
- residHash = ic.firstAtomObjCls.getResiduesFromAtoms(hAtoms);
101716
- select = "select " + ic.resid2specCls.residueids2spec(Object.keys(residHash));
101717
- commandname = 'interface_all';
101718
- commanddesc = commandname;
101719
- ic.selectionCls.addCustomSelection(Object.keys(residHash), commandname, commanddesc, select, true);
101720
- let interface1 = me.hashUtilsCls.intHash(hAtoms, atomSet1);
101721
- residHash = ic.firstAtomObjCls.getResiduesFromAtoms(interface1);
101722
- select = "select " + ic.resid2specCls.residueids2spec(Object.keys(residHash));
101723
- commandname = 'interface_1';
101724
- commanddesc = commandname;
101725
- ic.selectionCls.addCustomSelection(Object.keys(residHash), commandname, commanddesc, select, true);
101726
- let interface2 = me.hashUtilsCls.intHash(hAtoms, atomSet2);
101727
- residHash = ic.firstAtomObjCls.getResiduesFromAtoms(interface2);
101728
- select = "select " + ic.resid2specCls.residueids2spec(Object.keys(residHash));
101729
- commandname = 'interface_2';
101730
- commanddesc = commandname;
101731
- ic.selectionCls.addCustomSelection(Object.keys(residHash), commandname, commanddesc, select, true);
101732
- //var html = '<div style="text-align:center"><b>Hydrogen Bonds, Salt Bridges, Contacts, Halogen Bonds, &pi;-cation, &pi;-stacking between Two Sets:</b><br>';
101733
- let html = '<div style="text-align:center"><b>' + interactionTypes.join(', ') + ' between Two Sets:</b><br>';
101734
- let residueArray1 = ic.resid2specCls.atoms2residues(Object.keys(atomSet1));
101735
- let residueArray2 = ic.resid2specCls.atoms2residues(Object.keys(atomSet2));
101736
- let cmd1 = 'select ' + ic.resid2specCls.residueids2spec(residueArray1);
101737
- let cmd2 = 'select ' + ic.resid2specCls.residueids2spec(residueArray2);
101738
- html += 'Set 1: ' + nameArray2 + ' <button class="' + ic.pre + 'selset" cmd="' + cmd1 + '">Highlight in 3D</button><br>';
101739
- html += 'Set 2: ' + nameArray + ' <button class="' + ic.pre + 'selset" cmd="' + cmd2 + '">Highlight in 3D</button><br><br></div>';
101740
- html += '<div style="text-align:center"><b>The interfaces are:</b><br>';
101741
- let residueArray3 = ic.resid2specCls.atoms2residues(Object.keys(interface1));
101742
- let residueArray4 = ic.resid2specCls.atoms2residues(Object.keys(interface2));
101743
- let cmd3 = 'select ' + ic.resid2specCls.residueids2spec(residueArray3);
101744
- let cmd4 = 'select ' + ic.resid2specCls.residueids2spec(residueArray4);
101745
- html += 'interface_1 <button class="' + ic.pre + 'selset" cmd="' + cmd3 + '">Highlight in 3D</button><br>';
101746
- html += 'interface_2 <button class="' + ic.pre + 'selset" cmd="' + cmd4 + '">Highlight in 3D</button><br><br></div>';
101747
- html += '<div><b>Note</b>: Each checkbox below selects the corresponding residue. '
101748
- + 'You can click "Save Selection" in the "Select" menu to save the selection '
101749
- + 'and click on "Highlight" button to clear the checkboxes.</div><br>';
101750
- let header = html;
101751
- if(type == 'graph' || type == 'linegraph' || type == 'scatterplot' || bContactMapLocal) html = '';
101752
- html += tableHtml;
101799
+ let html = '';
101800
+ if(!bHbondPlot) {
101801
+ ic.drawCls.draw();
101802
+ let residHash, select, commandname, commanddesc;
101803
+ residHash = ic.firstAtomObjCls.getResiduesFromAtoms(hAtoms);
101804
+ select = "select " + ic.resid2specCls.residueids2spec(Object.keys(residHash));
101805
+ commandname = 'interface_all';
101806
+ commanddesc = commandname;
101807
+ ic.selectionCls.addCustomSelection(Object.keys(residHash), commandname, commanddesc, select, true);
101808
+ let interface1 = me.hashUtilsCls.intHash(hAtoms, atomSet1);
101809
+ residHash = ic.firstAtomObjCls.getResiduesFromAtoms(interface1);
101810
+ select = "select " + ic.resid2specCls.residueids2spec(Object.keys(residHash));
101811
+ commandname = 'interface_1';
101812
+ commanddesc = commandname;
101813
+ ic.selectionCls.addCustomSelection(Object.keys(residHash), commandname, commanddesc, select, true);
101814
+ let interface2 = me.hashUtilsCls.intHash(hAtoms, atomSet2);
101815
+ residHash = ic.firstAtomObjCls.getResiduesFromAtoms(interface2);
101816
+ select = "select " + ic.resid2specCls.residueids2spec(Object.keys(residHash));
101817
+ commandname = 'interface_2';
101818
+ commanddesc = commandname;
101819
+ ic.selectionCls.addCustomSelection(Object.keys(residHash), commandname, commanddesc, select, true);
101820
+
101821
+ //var html = '<div style="text-align:center"><b>Hydrogen Bonds, Salt Bridges, Contacts, Halogen Bonds, &pi;-cation, &pi;-stacking between Two Sets:</b><br>';
101822
+ html = '<div style="text-align:center"><b>' + interactionTypes.join(', ') + ' between Two Sets:</b><br>';
101823
+ let residueArray1 = ic.resid2specCls.atoms2residues(Object.keys(atomSet1));
101824
+ let residueArray2 = ic.resid2specCls.atoms2residues(Object.keys(atomSet2));
101825
+ let cmd1 = 'select ' + ic.resid2specCls.residueids2spec(residueArray1);
101826
+ let cmd2 = 'select ' + ic.resid2specCls.residueids2spec(residueArray2);
101827
+ html += 'Set 1: ' + nameArray2 + ' <button class="' + ic.pre + 'selset" cmd="' + cmd1 + '">Highlight in 3D</button><br>';
101828
+ html += 'Set 2: ' + nameArray + ' <button class="' + ic.pre + 'selset" cmd="' + cmd2 + '">Highlight in 3D</button><br><br></div>';
101829
+ html += '<div style="text-align:center"><b>The interfaces are:</b><br>';
101830
+ let residueArray3 = ic.resid2specCls.atoms2residues(Object.keys(interface1));
101831
+ let residueArray4 = ic.resid2specCls.atoms2residues(Object.keys(interface2));
101832
+ let cmd3 = 'select ' + ic.resid2specCls.residueids2spec(residueArray3);
101833
+ let cmd4 = 'select ' + ic.resid2specCls.residueids2spec(residueArray4);
101834
+ html += 'interface_1 <button class="' + ic.pre + 'selset" cmd="' + cmd3 + '">Highlight in 3D</button><br>';
101835
+ html += 'interface_2 <button class="' + ic.pre + 'selset" cmd="' + cmd4 + '">Highlight in 3D</button><br><br></div>';
101836
+ html += '<div><b>Note</b>: Each checkbox below selects the corresponding residue. '
101837
+ + 'You can click "Save Selection" in the "Select" menu to save the selection '
101838
+ + 'and click on "Highlight" button to clear the checkboxes.</div><br>';
101839
+
101840
+ if(type == 'graph' || type == 'linegraph' || type == 'scatterplot' || bContactMapLocal) html = '';
101841
+ html += tableHtml;
101842
+ }
101843
+ let header = html;
101753
101844
 
101754
101845
  if(type == 'save1' || type == 'save2') {
101755
101846
  html = header;
@@ -101765,8 +101856,10 @@ class ViewInterPairs {
101765
101856
  html += result.html;
101766
101857
  bondCnt = result.bondCnt;
101767
101858
 
101768
- $("#" + ic.pre + "dl_interactionsorted_html").html(html);
101769
- me.htmlCls.dialogCls.openDlg('dl_interactionsorted', 'Show sorted interactions');
101859
+ if(!bHbondPlot) {
101860
+ $("#" + ic.pre + "dl_interactionsorted_html").html(html);
101861
+ me.htmlCls.dialogCls.openDlg('dl_interactionsorted', 'Show sorted interactions');
101862
+ }
101770
101863
 
101771
101864
  if(me.bNode) {
101772
101865
  console.log(html);
@@ -102060,10 +102153,10 @@ class ViewInterPairs {
102060
102153
 
102061
102154
  let resid1Real = ic.getGraphCls.convertLabel2Resid(resid1);
102062
102155
  let atom1 = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid1Real]);
102063
- let color1 = (atom1.color) ? atom1.color.getHexString() : '';
102156
+ let color1 = (atom1 && atom1.color) ? atom1.color.getHexString() : '';
102064
102157
  let resid2Real = ic.getGraphCls.convertLabel2Resid(resid2);
102065
102158
  let atom2 = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid2Real]);
102066
- let color2 = (atom2.color) ? atom2.color.getHexString() : '';
102159
+ let color2 = (atom2 && atom2.color) ? atom2.color.getHexString() : '';
102067
102160
  let dist = Math.sqrt(labels2dist[labels]).toFixed(1);
102068
102161
  tmpText += '<tr><td><span style="white-space:nowrap"><input type="checkbox" class="' + ic.pre + 'seloneres" id="' + ic.pre + interactionType + '2_' + cnt + 'a" resid="' + resid1 + '"/> ' + resid1 + colorText1 + color1 + colorText2 + '</span></td><td><span style="white-space:nowrap"><input type="checkbox" class="' + ic.pre + 'seloneres" id="' + ic.pre + interactionType + '2_' + cnt + 'b" resid="' + resid2 + '"/> ' + resid2 + colorText1 + color2 + colorText2 + '</span></td><td align="center">' + dist + '</td>';
102069
102162
  tmpText += '<td align="center"><button class="' + ic.pre + 'selres" resid="' + resid1 + '|' + resid2 + '">Highlight</button></td>';
@@ -102149,10 +102242,10 @@ class ViewInterPairs {
102149
102242
 
102150
102243
  let resid1Real = ic.getGraphCls.convertLabel2Resid(resid1);
102151
102244
  let atom1 = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid1Real]);
102152
- let color1 = (atom1.color) ? atom1.color.getHexString() : '';
102245
+ let color1 = (atom1 && atom1.color) ? atom1.color.getHexString() : '';
102153
102246
  let resid2Real = ic.getGraphCls.convertLabel2Resid(resid2);
102154
102247
  let atom2 = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid2Real]);
102155
- let color2 = (atom2.color) ? atom2.color.getHexString() : '';
102248
+ let color2 = (atom2 && atom2.color) ? atom2.color.getHexString() : '';
102156
102249
  let dist1_dist2_atom1_atom2 = resids2distCnt[resids].dist1_dist2_atom1_atom2;
102157
102250
  let dist1 = dist1_dist2_atom1_atom2[0];
102158
102251
  let dist2 = dist1_dist2_atom1_atom2[1];
@@ -102265,11 +102358,11 @@ class ViewInterPairs {
102265
102358
  for(let resid1 in ic.resid2ResidhashHbond) {
102266
102359
  let resid1Real = ic.getGraphCls.convertLabel2Resid(resid1);
102267
102360
  let atom1 = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid1Real]);
102268
- let color1 = (atom1.color) ? atom1.color.getHexString() : '';
102361
+ let color1 = (atom1 && atom1.color) ? atom1.color.getHexString() : '';
102269
102362
  for(let resid2 in ic.resid2ResidhashHbond[resid1]) {
102270
102363
  let resid2Real = ic.getGraphCls.convertLabel2Resid(resid2);
102271
102364
  let atom2 = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid2Real]);
102272
- let color2 = (atom2.color) ? atom2.color.getHexString() : '';
102365
+ let color2 = (atom2 && atom2.color) ? atom2.color.getHexString() : '';
102273
102366
  let dist = Math.sqrt(ic.resid2ResidhashHbond[resid1][resid2]).toFixed(1);
102274
102367
  tmpText += '<tr><td><input type="checkbox" class="' + ic.pre + 'seloneres" id="' + ic.pre + 'hbond_' + cnt + 'a" resid="' + resid1 + '"/> ' + resid1 + colorText1 + color1 + colorText2 + '</td><td><input type="checkbox" class="' + ic.pre + 'seloneres" id="' + ic.pre + 'hbond_' + cnt + 'b" resid="' + resid2 + '"/> ' + resid2 + colorText1 + color2 + colorText2 + '</td><td align="center">' + dist + '</td>';
102275
102368
  if(type == 'view') tmpText += '<td align="center"><button class="' + ic.pre + 'selres" resid="' + resid1 + '|' + resid2 + '">Highlight</button></td>';
@@ -102303,11 +102396,11 @@ class ViewInterPairs {
102303
102396
  for(let resid1 in ic.resid2ResidhashSaltbridge) {
102304
102397
  let resid1Real = ic.getGraphCls.convertLabel2Resid(resid1);
102305
102398
  let atom1 = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid1Real]);
102306
- let color1 = (atom1.color) ? atom1.color.getHexString() : '';
102399
+ let color1 = (atom1 && atom1.color) ? atom1.color.getHexString() : '';
102307
102400
  for(let resid2 in ic.resid2ResidhashSaltbridge[resid1]) {
102308
102401
  let resid2Real = ic.getGraphCls.convertLabel2Resid(resid2);
102309
102402
  let atom2 = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid2Real]);
102310
- let color2 = (atom2.color) ? atom2.color.getHexString() : '';
102403
+ let color2 = (atom2 && atom2.color) ? atom2.color.getHexString() : '';
102311
102404
  let dist = Math.sqrt(ic.resid2ResidhashSaltbridge[resid1][resid2]).toFixed(1);
102312
102405
  tmpText += '<tr><td><input type="checkbox" class="' + ic.pre + 'seloneres" id="' + ic.pre + 'saltb_' + cnt + 'a" resid="' + resid1 + '"/> ' + resid1 + colorText1 + color1 + colorText2 + '</td><td><input type="checkbox" class="' + ic.pre + 'seloneres" id="' + ic.pre + 'saltb_' + cnt + 'b" resid="' + resid2 + '"/> ' + resid2 + colorText1 + color2 + colorText2 + '</td><td align="center">' + dist + '</td>';
102313
102406
  if(type == 'view') tmpText += '<td align="center"><button class="' + ic.pre + 'selres" resid="' + resid1 + '|' + resid2 + '">Highlight</button></td>';
@@ -102357,11 +102450,11 @@ class ViewInterPairs {
102357
102450
  for(let resid1 in resid2Residhash) {
102358
102451
  let resid1Real = ic.getGraphCls.convertLabel2Resid(resid1);
102359
102452
  let atom1 = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid1Real]);
102360
- let color1 = (atom1.color) ? atom1.color.getHexString() : '';
102453
+ let color1 = (atom1 && atom1.color) ? atom1.color.getHexString() : '';
102361
102454
  for(let resid2 in resid2Residhash[resid1]) {
102362
102455
  let resid2Real = ic.getGraphCls.convertLabel2Resid(resid2);
102363
102456
  let atom2 = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid2Real]);
102364
- let color2 = (atom2.color) ? atom2.color.getHexString() : '';
102457
+ let color2 = (atom2 && atom2.color) ? atom2.color.getHexString() : '';
102365
102458
  let dist = Math.sqrt(resid2Residhash[resid1][resid2]).toFixed(1);
102366
102459
  tmpText += '<tr><td><input type="checkbox" class="' + ic.pre + 'seloneres" id="' + ic.pre + interactionType + '_' + cnt + 'a" resid="' + resid1 + '"/> ' + resid1 + colorText1 + color1 + colorText2 + '</td><td><input type="checkbox" class="' + ic.pre + 'seloneres" id="' + ic.pre + interactionType + '_' + cnt + 'b" resid="' + resid2 + '"/> ' + resid2 + colorText1 + color2 + colorText2 + '</td><td align="center">' + dist + '</td>';
102367
102460
  if(type == 'view') tmpText += '<td align="center"><button class="' + ic.pre + 'selres" resid="' + resid1 + '|' + resid2 + '">Highlight</button></td>';
@@ -102396,11 +102489,11 @@ class ViewInterPairs {
102396
102489
  for(let resid1 in residHash) { // e.g., resid1: TYR $1KQ2.A:42
102397
102490
  let resid1Real = ic.getGraphCls.convertLabel2Resid(resid1);
102398
102491
  let atom1 = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid1Real]);
102399
- let color1 = (atom1.color) ? atom1.color.getHexString() : '';
102492
+ let color1 = (atom1 && atom1.color) ? atom1.color.getHexString() : '';
102400
102493
  for(let resid2 in residHash[resid1]) {
102401
102494
  let resid2Real = ic.getGraphCls.convertLabel2Resid(resid2);
102402
102495
  let atom2 = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid2Real]);
102403
- let color2 = (atom2.color) ? atom2.color.getHexString() : '';
102496
+ let color2 = (atom2 && atom2.color) ? atom2.color.getHexString() : '';
102404
102497
  let dist1_dist2_atom1_atom2 = residHash[resid1][resid2].split('_');
102405
102498
  let dist1 = dist1_dist2_atom1_atom2[0];
102406
102499
  let dist2 = dist1_dist2_atom1_atom2[1];
@@ -106714,7 +106807,7 @@ class BcifParser {
106714
106807
 
106715
106808
  if(block.getCategory("_struct")) {
106716
106809
  title = block.getCategory("_struct").getColumn("title").getString(0);
106717
- title = title.replace(/"/, "'");
106810
+ title = title.replace(/"/g, "'");
106718
106811
  }
106719
106812
 
106720
106813
  if(block.getCategory("_struct_keywords")) {
@@ -108795,7 +108888,7 @@ class DcdParser {
108795
108888
  return true;
108796
108889
  }
108797
108890
 
108798
- async showRmsdPlot() { let ic = this.icn3d, me = ic.icn3dui;
108891
+ async showRmsdHbondPlot(bHbondPlot) { let ic = this.icn3d, me = ic.icn3dui;
108799
108892
  if(ic.bChartjs === undefined) {
108800
108893
  let url = "https://cdn.jsdelivr.net/npm/chart.js";
108801
108894
  await me.getAjaxPromise(url, 'script');
@@ -108803,42 +108896,87 @@ class DcdParser {
108803
108896
  ic.bChartjs = true;
108804
108897
  }
108805
108898
 
108806
- $("#" + me.rmsdplotid).empty();
108807
- me.htmlCls.dialogCls.openDlg('dl_rmsdplot', 'RMSD Plot');
108899
+ if(bHbondPlot) {
108900
+ $("#" + me.hbondplotid).empty();
108901
+ me.htmlCls.dialogCls.openDlg('dl_hbondplot', 'H-bond Plot');
108902
+ }
108903
+ else {
108904
+ $("#" + me.rmsdplotid).empty();
108905
+ me.htmlCls.dialogCls.openDlg('dl_rmsdplot', 'RMSD Plot');
108906
+ }
108808
108907
 
108809
108908
  let dataSet = [];
108810
108909
  let structureArray = Object.keys(ic.structures);
108811
- let coord1 = [], coord2 = [];
108812
- for(let i = 0, il = structureArray.length; i < il; ++i) {
108813
- let chainArray = ic.structures[structureArray[i]];
108910
+ if(bHbondPlot) {
108911
+ for(let i = 0, il = structureArray.length; i < il; ++i) {
108912
+ if(i > 0) {
108913
+ let type = 'save1';
108914
+ let stru = structureArray[i];
108915
+ let atomSet = {};
108916
+ for(let j = 0, jl = ic.structures[stru].length; j < jl; ++j) {
108917
+ let chainid = ic.structures[stru][j];
108918
+ for(let k in ic.chains[chainid]) {
108919
+ let atom = ic.atoms[k];
108920
+ if(!ic.water.hasOwnProperty(atom.serial) && !ic.ions.hasOwnProperty(atom.serial)) atomSet[k] = 1;
108921
+ }
108922
+ }
108814
108923
 
108815
- let coord = [];
108816
- let nAtoms = 0;
108817
- for(let j = 0, jl = chainArray.length; j < jl; ++j) {
108818
- let chainid = chainArray[j];
108819
- for(let k in ic.chains[chainid]) {
108820
- let atom = ic.atoms[k];
108821
- // only align proteins, nucleotides, or chemicals
108822
- if(ic.proteins.hasOwnProperty(atom.serial) || ic.nucleotides.hasOwnProperty(atom.serial) || ic.chemicals.hasOwnProperty(atom.serial)) {
108823
- coord.push(atom.coord);
108824
- ++nAtoms;
108924
+ let residueHash = ic.firstAtomObjCls.getResiduesFromAtoms(atomSet);
108925
+ let command = structureArray[i] + '_nonSol'; // exclude solvent and ions
108926
+ let residArray = Object.keys(residueHash);
108927
+ ic.selectionCls.addCustomSelection(residArray, command, command, 'select ' + command, true);
108928
+ let nameArray = [command];
108929
+ let nameArray2 = [command];
108930
+
108931
+ let result = await ic.viewInterPairsCls.viewInteractionPairs(nameArray2, nameArray, false, type,
108932
+ true, false, false, false, false, false, undefined, bHbondPlot);
108933
+ let bondCnt = result.bondCnt;
108934
+
108935
+ let hBondCnt = 0;
108936
+ for(let j = 0, jl = bondCnt.length; j < jl; ++j) {
108937
+ hBondCnt += bondCnt[j].cntHbond; // + bondCnt[j].cntIonic + bondCnt[j].cntHalegen + bondCnt[j].cntPication + bondCnt[j].cntPistacking;
108825
108938
  }
108939
+
108940
+ let time = ic.TIMEOFFSET + (i * ic.DELTA).toPrecision(4);
108941
+ dataSet.push({x: time, y: hBondCnt});
108826
108942
  }
108827
108943
  }
108828
108944
 
108829
- if(i == 0) {
108830
- coord1 = [].concat(coord);
108831
- }
108832
- else {
108833
- coord2 = coord;
108834
- }
108945
+ ic.viewInterPairsCls.resetInteractionPairs();
108946
+ }
108947
+ else {
108948
+ let coord1 = [], coord2 = [];
108949
+ for(let i = 0, il = structureArray.length; i < il; ++i) {
108950
+ let chainArray = ic.structures[structureArray[i]];
108951
+
108952
+ let coord = [];
108953
+ let nAtoms = 0;
108954
+ for(let j = 0, jl = chainArray.length; j < jl; ++j) {
108955
+ let chainid = chainArray[j];
108956
+ for(let k in ic.chains[chainid]) {
108957
+ let atom = ic.atoms[k];
108958
+ // only align proteins, nucleotides, or chemicals
108959
+ if(ic.proteins.hasOwnProperty(atom.serial) || ic.nucleotides.hasOwnProperty(atom.serial) || ic.chemicals.hasOwnProperty(atom.serial)) {
108960
+ coord.push(atom.coord);
108961
+ ++nAtoms;
108962
+ }
108963
+ }
108964
+ }
108835
108965
 
108836
- if(i > 0) {
108837
- let result = me.rmsdSuprCls.getRmsdSuprCls(coord1, coord2, nAtoms);
108838
- let rmsd = (result.rmsd * 0.1).toPrecision(4); // convert from Å to nm
108966
+ if(i == 0) {
108967
+ coord1 = [].concat(coord);
108968
+ }
108969
+ else {
108970
+ coord2 = coord;
108971
+ }
108972
+
108973
+ if(i > 0) {
108974
+ let result = me.rmsdSuprCls.getRmsdSuprCls(coord1, coord2, nAtoms);
108975
+ let rmsd = (result.rmsd * 0.1).toPrecision(4); // convert from Å to nm
108839
108976
 
108840
- let time = ic.TIMEOFFSET + (i * ic.DELTA).toPrecision(4);
108841
- dataSet.push({x: time, y: rmsd});
108977
+ let time = ic.TIMEOFFSET + (i * ic.DELTA).toPrecision(4);
108978
+ dataSet.push({x: time, y: rmsd});
108979
+ }
108842
108980
  }
108843
108981
  }
108844
108982
 
@@ -108849,13 +108987,13 @@ class DcdParser {
108849
108987
 
108850
108988
  // https://www.chartjs.org/docs/latest/samples/line/line.html
108851
108989
  // const ctx = $("#" + me.rmsdplotid)[0].getContext('2d');
108852
- const ctx = $("#" + me.rmsdplotid)[0];
108990
+ const ctx = (bHbondPlot) ? $("#" + me.hbondplotid)[0] : $("#" + me.rmsdplotid)[0];
108853
108991
 
108854
108992
  new Chart(ctx, {
108855
108993
  type: 'line',
108856
108994
  data: {
108857
108995
  datasets: [{
108858
- label: 'RMSD',
108996
+ label: (bHbondPlot) ? 'H-bonds' : 'RMSD',
108859
108997
  data: dataSet
108860
108998
  }]
108861
108999
  },
@@ -108876,7 +109014,7 @@ class DcdParser {
108876
109014
  y: { // Y-axis configuration (defaults to numeric scale)
108877
109015
  title: {
108878
109016
  display: true, // Show the Y-axis label
108879
- text: 'RMSD (nm)' // Text for the Y-axis label
109017
+ text: (bHbondPlot) ? 'Number of H-bonds' : 'RMSD (nm)' // Text for the Y-axis label
108880
109018
  }
108881
109019
  }
108882
109020
  }
@@ -112352,7 +112490,7 @@ class ParserUtils {
112352
112490
  let data = await me.getAjaxPromise(url, 'jsonp');
112353
112491
 
112354
112492
  if(data && data.pdbid) {
112355
- let question = "This is a single-spanning (bitopic) transmembrane protein according to the Membranome database. Do you want to align the protein with the model from Membranome? If you click \"OK\", you can press the letter \"a\" to alternate the structures.";
112493
+ let question = "This is a single-spanning (bitopic) transmembrane protein according to the Membranome database. Do you want to align the protein with the model from Membranome? If you click \"OK\", you can press the letter \"a\" or SHIFT + \"a\" to alternate the structures.";
112356
112494
 
112357
112495
  if (me.bNode) return;
112358
112496
 
@@ -113013,6 +113151,16 @@ class LoadAtomData {
113013
113151
  }
113014
113152
  }
113015
113153
  }
113154
+
113155
+ // no bonds between metals, e.g., in PDB 4HEA
113156
+ if($.inArray(atom.elem, me.parasCls.ionsArray) !== -1) {
113157
+ for(let j = atom.bonds.length - 1; j >= 0; --j) {
113158
+ let atom2 = ic.atoms[atom.bonds[j]];
113159
+ if(atom2 && $.inArray(atom2.elem, me.parasCls.ionsArray) !== -1) {
113160
+ atom.bonds.splice(j, 1);
113161
+ }
113162
+ }
113163
+ }
113016
113164
  }
113017
113165
 
113018
113166
  // adjust biopolymer type
@@ -115482,6 +115630,7 @@ class LoadPDB {
115482
115630
  // refresh for atoms in each residue
115483
115631
  refreshBonds(curResAtoms, prevCarbon) { let ic = this.icn3d, me = ic.icn3dui;
115484
115632
  let n = curResAtoms.length;
115633
+
115485
115634
  for (let j = 0; j < n; ++j) {
115486
115635
  let atom0 = curResAtoms[j];
115487
115636
  for (let k = j + 1; k < n; ++k) {
@@ -115825,7 +115974,7 @@ class LoadCIF {
115825
115974
 
115826
115975
  if(block.getCategory("_struct")) {
115827
115976
  let title = block.getCategory("_struct").getColumn("title").getString(0);
115828
- title = title.replace(/"/, "'");
115977
+ title = title.replace(/"/g, "'");
115829
115978
  let name = title.replace(/ALPHAFOLD MONOMER V2.0 PREDICTION FOR /gi, '');
115830
115979
  ic.molTitle += name.trim() + " ";
115831
115980
  // if(bEsmfold && ic.esmTitle) ic.molTitle = ic.esmTitle;
@@ -123821,6 +123970,7 @@ class Dssp {
123821
123970
  if(!ic.resid2domainid) ic.resid2domainid = {};
123822
123971
  //ic.resid2domainid = {};
123823
123972
  ic.domainid2pdb = {};
123973
+ if(!ic.domainid2sheetEnds) ic.domainid2sheetEnds = {}; // record the end of sheets to check for jellyRoll
123824
123974
 
123825
123975
  let bNoMoreIg = true;
123826
123976
  let bFoundDomain = false;
@@ -123860,6 +124010,15 @@ class Dssp {
123860
124010
 
123861
124011
  ic.domainid2pdb[domainid] = pdb_target;
123862
124012
 
124013
+ ic.domainid2sheetEnds[domainid] = {};
124014
+ for(let m in domainAtomsArray[k]) {
124015
+ let atom = ic.atoms[m];
124016
+ if(atom.ss == 'sheet' && atom.ssend) {
124017
+ let resid = atom.structure + '_' + atom.chain + '_' + atom.resi;
124018
+ ic.domainid2sheetEnds[domainid][resid] = 1;
124019
+ }
124020
+ }
124021
+
123863
124022
  if(!template) {
123864
124023
  for(let index = 0, indexl = dataArray.length; index < indexl; ++index) {
123865
124024
  let struct2 = ic.defaultPdbId + index;
@@ -124047,7 +124206,7 @@ class Dssp {
124047
124206
  }
124048
124207
 
124049
124208
  getTemplateList(domainid) { let ic = this.icn3d; ic.icn3dui;
124050
- let refpdbname = '', score = '', seqid = '', nresAlign = '';
124209
+ let refpdbname = '', score = '', score2 = '', seqid = '', nresAlign = '';
124051
124210
 
124052
124211
  refpdbname = ic.domainid2refpdbname[domainid][0]; // one template in round 2
124053
124212
 
@@ -124057,9 +124216,10 @@ class Dssp {
124057
124216
  score = itemArray[0];
124058
124217
  seqid = itemArray[1];
124059
124218
  nresAlign = itemArray[2];
124219
+ score2 = itemArray[3];
124060
124220
  }
124061
124221
 
124062
- return {'refpdbname': refpdbname, 'score': score, 'seqid': seqid, 'nresAlign': nresAlign};
124222
+ return {'refpdbname': refpdbname, 'score': score, 'score2': score2, 'seqid': seqid, 'nresAlign': nresAlign};
124063
124223
  }
124064
124224
 
124065
124225
  parseAlignData_part1(dataArray, domainidpairArray, bRound1) { let ic = this.icn3d, me = ic.icn3dui;
@@ -124204,7 +124364,7 @@ class Dssp {
124204
124364
 
124205
124365
  // use TM-score alone
124206
124366
  if(!domainid2segs.hasOwnProperty(domainid) || score >= parseFloat(ic.domainid2score[domainid].split('_')[0])) {
124207
- ic.domainid2score[domainid] = queryData[0].score + '_' + queryData[0].frac_identical + '_' + queryData[0].num_res ;
124367
+ ic.domainid2score[domainid] = queryData[0].score + '_' + queryData[0].frac_identical + '_' + queryData[0].num_res + '_' + queryData[0].score2;
124208
124368
 
124209
124369
  if(bRound1) {
124210
124370
  ic.domainid2refpdbname[domainid] = score >= this.TMThresholdIgType ? [refpdbname] : ['all_templates'];
@@ -124384,6 +124544,7 @@ class Dssp {
124384
124544
  let result = this.getTemplateList(domainid);
124385
124545
  let refpdbname = result.refpdbname;
124386
124546
  let score = result.score;
124547
+ let score2 = result.score2;
124387
124548
  let seqid = result.seqid;
124388
124549
  let nresAlign = result.nresAlign;
124389
124550
 
@@ -124396,7 +124557,7 @@ class Dssp {
124396
124557
  }
124397
124558
 
124398
124559
  // ic.refPdbList.push(message);
124399
- ic.domainid2info[domainid] = {'refpdbname': refpdbname, 'score': score, 'seqid': seqid, 'nresAlign': nresAlign};
124560
+ ic.domainid2info[domainid] = {'refpdbname': refpdbname, 'score': score, 'score2': score2, 'seqid': seqid, 'nresAlign': nresAlign};
124400
124561
  }
124401
124562
 
124402
124563
  // adjust C' and D strands ======start
@@ -125746,7 +125907,7 @@ console.log("free energy: " + energy + " kcal/mol");
125746
125907
  me.alertAlt = true;
125747
125908
 
125748
125909
  //if(ic.bRender) var aaa = 1; //alert('Please press the letter "a" to alternate between wild type and mutant.');
125749
- var aaa = 1; //alert('Please press the letter "a" to alternate between wild type and mutant.');
125910
+ var aaa = 1; //alert('Please press the letter "a" or SHIFT + "a" to alternate between wild type and mutant.');
125750
125911
  }
125751
125912
  }
125752
125913
 
@@ -134298,7 +134459,7 @@ class iCn3DUI {
134298
134459
  //even when multiple iCn3D viewers are shown together.
134299
134460
  this.pre = this.cfg.divid + "_";
134300
134461
 
134301
- this.REVISION = '3.47.0';
134462
+ this.REVISION = '3.47.1';
134302
134463
 
134303
134464
  // In nodejs, iCn3D defines "window = {navigator: {}}", and added window = {navigator: {}, "__THREE__":"177"}
134304
134465
  this.bNode = (Object.keys(window).length < 3) ? true : false;