icn3d 3.47.2 → 3.48.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.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) {
@@ -63072,20 +63093,20 @@ class SetDialog {
63072
63093
  group2tpl['IgC1'] = ['B2Microglobulin_7phrL_human_C1', 'CD3d_6jxrd_human_C1', 'CD3e_6jxrf_human_C1', 'FAB-LIGHT_5esv_C1-n2', 'FAB-HEAVY_5esv_C1-n2', 'GHR_1axiB_human_C1-n1', 'LAG3_7tzgD_human_C1-n2', 'MHCIa_7phrH_human_C1', 'Siglec3_5j0bB_human_C1-n2', 'TCRa_6jxrm_human_C1-n2', 'VTCN1_Q7Z7D3_human_C1-n2'];
63073
63094
  group2tpl['IgC2'] = ['CD2_1hnfA_human_C2-n2', 'CD3g_6jxrg_human_C2'];
63074
63095
  group2tpl['IgI'] = ['BTLA_2aw2A_human_Iset', 'Contactin1_3s97C_human_Iset-n2', 'JAM1_1nbqA_human_Iset-n2', 'Palladin_2dm3A_human_Iset-n1', 'Titin_4uowM_human_Iset-n152'];
63075
- group2tpl['IgE'] = ['CoAtomerGamma1_1r4xA_human', 'Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4', 'IsdA_2iteA_bacteria', 'NaKATPaseTransporterBeta_2zxeB_spurdogshark', 'TP34_2o6cA_bacteria', 'TP47_1o75A_bacteria'];
63096
+ //group2tpl['IgE'] = ['CoAtomerGamma1_1r4xA_human', 'Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4', 'IsdA_2iteA_bacteria', 'NaKATPaseTransporterBeta_2zxeB_spurdogshark', 'TP34_2o6cA_bacteria', 'TP47_1o75A_bacteria'];
63076
63097
 
63077
63098
  group2tpl['IgFN3'] = ['Contactin1_2ee2A_human_FN3-n9', 'IL6Rb_1bquB_human_FN3-n2', 'IL6Rb_1bquB_human_FN3-n3', 'InsulinR_8guyE_human_FN3-n1', 'InsulinR_8guyE_human_FN3-n2', 'Sidekick2_1wf5A_human_FN3-n7'];
63078
63099
 
63079
- group2tpl['IgFN3-like'] = ['ASF1A_2iijA_human', 'BArrestin1_4jqiA_rat_n1', 'C3_2qkiD_human_n1', 'MPT63_1lmiA_bacteria', 'NaCaExchanger_2fwuA_dog_n2', 'RBPJ_6py8C_human_Unk-n1', 'TEAD1_3kysC_human'];
63100
+ //group2tpl['IgFN3-like'] = ['ASF1A_2iijA_human', 'BArrestin1_4jqiA_rat_n1', 'C3_2qkiD_human_n1', 'MPT63_1lmiA_bacteria', 'NaCaExchanger_2fwuA_dog_n2', 'RBPJ_6py8C_human_Unk-n1', 'TEAD1_3kysC_human'];
63080
63101
 
63081
- group2tpl['Other Ig'] = ['CD19_6al5A_human-n1', 'CuZnSuperoxideDismutase_1hl5C_human', 'ECadherin_4zt1A_human_n2', 'LaminAC_1ifrA_human', 'ORF7a_1xakA_virus', 'RBPJ_6py8C_human_Unk-n2'];
63102
+ group2tpl['Other Ig'] = ['CD19_6al5A_human-n1', 'ECadherin_4zt1A_human_n2', 'LaminAC_1ifrA_human'];
63082
63103
 
63083
63104
  let tpl2strandsig = {};
63084
- tpl2strandsig['ASF1A_2iijA_human'] = "A A' B C C' E F G G+";
63105
+ //tpl2strandsig['ASF1A_2iijA_human'] = "A A' B C C' E F G G+";
63085
63106
  tpl2strandsig['B2Microglobulin_7phrL_human_C1'] = "A B C C' D E F G";
63086
- tpl2strandsig['BArrestin1_4jqiA_rat_n1'] = "A- A A' B C C' E F G";
63107
+ //tpl2strandsig['BArrestin1_4jqiA_rat_n1'] = "A- A A' B C C' E F G";
63087
63108
  tpl2strandsig['BTLA_2aw2A_human_Iset'] = "A A' B C C' D E F G";
63088
- tpl2strandsig['C3_2qkiD_human_n1'] = "A A' B C C' E F G";
63109
+ //tpl2strandsig['C3_2qkiD_human_n1'] = "A A' B C C' E F G";
63089
63110
  tpl2strandsig['CD19_6al5A_human-n1'] = "A' B C C' D E F G";
63090
63111
  tpl2strandsig['CD28_1yjdC_human_V'] = "A A' B C C' C'' D E F G";
63091
63112
  tpl2strandsig['CD2_1hnfA_human_C2-n2'] = "A B C C' E F G";
@@ -63094,12 +63115,12 @@ class SetDialog {
63094
63115
  tpl2strandsig['CD3e_6jxrf_human_C1'] = "A B C C' D E F G";
63095
63116
  tpl2strandsig['CD3g_6jxrg_human_C2'] = "A B C C' E F G G+";
63096
63117
  tpl2strandsig['CD8a_1cd8A_human_V'] = "A A' B C C' C'' D E F G";
63097
- tpl2strandsig['CoAtomerGamma1_1r4xA_human'] = "A- A B C D E F G";
63118
+ //tpl2strandsig['CoAtomerGamma1_1r4xA_human'] = "A- A B C D E F G";
63098
63119
  tpl2strandsig['Contactin1_2ee2A_human_FN3-n9'] = "A A' B C C' E F G";
63099
63120
  tpl2strandsig['Contactin1_3s97C_human_Iset-n2'] = "A A' B C D E F G";
63100
- tpl2strandsig['CuZnSuperoxideDismutase_1hl5C_human'] = "A- A B C C' E F G";
63121
+ //tpl2strandsig['CuZnSuperoxideDismutase_1hl5C_human'] = "A- A B C C' E F G";
63101
63122
  tpl2strandsig['ECadherin_4zt1A_human_n2'] = "A' B C D E F G";
63102
- tpl2strandsig['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'] = "A--- A-- A- A B C C' C'' D E F G";
63123
+ //tpl2strandsig['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'] = "A--- A-- A- A B C C' C'' D E F G";
63103
63124
  tpl2strandsig['FAB-HEAVY_5esv_C1-n2'] = "A B C D E F G";
63104
63125
  tpl2strandsig['FAB-HEAVY_5esv_V-n1'] = "A B C C' C'' D E F G";
63105
63126
  tpl2strandsig['FAB-LIGHT_5esv_C1-n2'] = "A B C C' D E F G";
@@ -63110,28 +63131,28 @@ class SetDialog {
63110
63131
  tpl2strandsig['IL6Rb_1bquB_human_FN3-n3'] = "A B C C' E F G";
63111
63132
  tpl2strandsig['InsulinR_8guyE_human_FN3-n1'] = "A B C C' E F G";
63112
63133
  tpl2strandsig['InsulinR_8guyE_human_FN3-n2'] = "A B C C' E F G";
63113
- tpl2strandsig['IsdA_2iteA_bacteria'] = "A- A B C C' D E F G";
63134
+ //tpl2strandsig['IsdA_2iteA_bacteria'] = "A- A B C C' D E F G";
63114
63135
  tpl2strandsig['JAM1_1nbqA_human_Iset-n2'] = "A A' B C C' D E F G";
63115
63136
  tpl2strandsig['LAG3_7tzgD_human_C1-n2'] = "A A' B C C' D E F G";
63116
63137
  tpl2strandsig['LAG3_7tzgD_human_V-n1'] = "A' B C C' D E F G";
63117
63138
  tpl2strandsig['LaminAC_1ifrA_human'] = "A- A B C C' E E+ F G";
63118
63139
  tpl2strandsig['MHCIa_7phrH_human_C1'] = "A B C C' D E F G";
63119
- tpl2strandsig['MPT63_1lmiA_bacteria'] = "A-- A- A BC C' E F G";
63120
- tpl2strandsig['NaCaExchanger_2fwuA_dog_n2'] = "A A' B C C' E F G";
63121
- tpl2strandsig['NaKATPaseTransporterBeta_2zxeB_spurdogshark']= "A A' B C D E F G";
63122
- tpl2strandsig['ORF7a_1xakA_virus'] = "A' B C D E F G";
63140
+ //tpl2strandsig['MPT63_1lmiA_bacteria'] = "A-- A- A BC C' E F G";
63141
+ //tpl2strandsig['NaCaExchanger_2fwuA_dog_n2'] = "A A' B C C' E F G";
63142
+ //tpl2strandsig['NaKATPaseTransporterBeta_2zxeB_spurdogshark']= "A A' B C D E F G";
63143
+ //tpl2strandsig['ORF7a_1xakA_virus'] = "A' B C D E F G";
63123
63144
  tpl2strandsig['PD1_4zqkB_human_V'] = "A A' B C C' D E F G";
63124
63145
  tpl2strandsig['PDL1_4z18B_human_V-n1'] = "A A' B C C' C'' D E F G";
63125
63146
  tpl2strandsig['Palladin_2dm3A_human_Iset-n1'] = "A A' B C C' D E F G";
63126
- tpl2strandsig['RBPJ_6py8C_human_Unk-n1'] = "A A' B C C' E F G";
63127
- tpl2strandsig['RBPJ_6py8C_human_Unk-n2'] = "A B C D E F G";
63147
+ //tpl2strandsig['RBPJ_6py8C_human_Unk-n1'] = "A A' B C C' E F G";
63148
+ //tpl2strandsig['RBPJ_6py8C_human_Unk-n2'] = "A B C D E F G";
63128
63149
  tpl2strandsig['Sidekick2_1wf5A_human_FN3-n7'] = "A B C C' E F G";
63129
63150
  tpl2strandsig['Siglec3_5j0bB_human_C1-n2'] = "A A' B C D E F G";
63130
63151
  tpl2strandsig['TCRa_6jxrm_human_C1-n2'] = "A B C D E F G";
63131
63152
  tpl2strandsig['TCRa_6jxrm_human_V-n1'] = "A A' B C C' C'' D E F G";
63132
- tpl2strandsig['TEAD1_3kysC_human'] = "A A+ A' B C C' E F G G+";
63133
- tpl2strandsig['TP34_2o6cA_bacteria'] = "A- A B C C' D E F G";
63134
- tpl2strandsig['TP47_1o75A_bacteria'] = "A B C C' D E F G";
63153
+ //tpl2strandsig['TEAD1_3kysC_human'] = "A A+ A' B C C' E F G G+";
63154
+ //tpl2strandsig['TP34_2o6cA_bacteria'] = "A- A B C C' D E F G";
63155
+ //tpl2strandsig['TP47_1o75A_bacteria'] = "A B C C' D E F G";
63135
63156
  tpl2strandsig['Titin_4uowM_human_Iset-n152'] = "A A' B C C' D E F G";
63136
63157
  tpl2strandsig['VISTA_6oilA_human_V'] = "A A' B C C' C'' D E F G G+";
63137
63158
  tpl2strandsig['VNAR_1t6vN_shark_V'] = "A A' B C C' D E F G";
@@ -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);
@@ -74468,7 +74518,7 @@ class Scene {
74468
74518
  if(ic.opts['slab'] === 'yes') ic.cameraCls.setSlab();
74469
74519
 
74470
74520
  // if(!ic.bSetVrArButtons) { // call once
74471
- if(!me.cfg.imageonly) this.setVrArButtons();
74521
+ if(!me.cfg.imageonly && ( 'xr' in navigator )) this.setVrArButtons();
74472
74522
  // }
74473
74523
 
74474
74524
  // if((ic.bVr || ic.bAr) && !ic.bSetVrAr) { // call once
@@ -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
 
@@ -83912,7 +83973,7 @@ class ApplyMissingRes {
83912
83973
  line.serial1 = ic.missingResResid2serial[resid0 + ',' + resid1];
83913
83974
  line.serial2 = ic.missingResResid2serial[resid1 + ',' + resid0];
83914
83975
 
83915
- line.color = "#" + ic.atoms[line.serial1].color.getHexString();
83976
+ line.color = (ic.atoms[line.serial1]) ? "#" + ic.atoms[line.serial1].color.getHexString() : undefined;
83916
83977
 
83917
83978
  line.radius = ic.coilWidth;
83918
83979
 
@@ -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
 
@@ -99350,7 +99430,7 @@ class HlUpdate {
99350
99430
  if(ic.mmdbid_q !== undefined && ic.mmdbid_q === ic.mmdbid_t) {
99351
99431
  html2ddgm += ic.diagram2dCls.draw2Ddgm(ic.interactionData2, ic.mmdbidArray[0].toUpperCase(), 1, true);
99352
99432
  }
99353
- else {
99433
+ else if(ic.mmdbidArray.length > 1) {
99354
99434
  html2ddgm += ic.diagram2dCls.draw2Ddgm(ic.interactionData2, ic.mmdbidArray[1].toUpperCase(), 1, true);
99355
99435
  }
99356
99436
  html2ddgm += ic.diagram2dCls.set2DdgmNote(true);
@@ -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];
@@ -103619,16 +103712,31 @@ class ChainalignParser {
103619
103712
 
103620
103713
  // dynamically align pairs in all chainids
103621
103714
  // the resrange from VASTSrv or VAST search uses NCBI residue numbers!!!
103622
- let atomSet_t = (me.cfg.resrange) ? ic.realignParserCls.getSeqCoorResid([resRangeArray[0]], chainidArray[0], true).hAtoms : ic.chains[chainidArray[0]];
103715
+ let atomSet_t;
103716
+ if(me.cfg.resrange) {
103717
+ let result = ic.realignParserCls.getSeqCoorResid([resRangeArray[0]], chainidArray[0], true);
103718
+ atomSet_t = result.hAtoms;
103719
+ }
103720
+ else {
103721
+ atomSet_t = ic.chains[chainidArray[0]];
103722
+ }
103723
+
103623
103724
  for(let index = 1, indexl = chainidArray.length; index < indexl; ++index) {
103624
- let atomSet_q = (me.cfg.resrange) ? ic.realignParserCls.getSeqCoorResid([resRangeArray[index]], chainidArray[index], true).hAtoms : ic.chains[chainidArray[index]];
103725
+ let atomSet_q;
103726
+ if(me.cfg.resrange) {
103727
+ let result = ic.realignParserCls.getSeqCoorResid([resRangeArray[index]], chainidArray[index], true);
103728
+ atomSet_q = result.hAtoms;
103729
+ }
103730
+ else {
103731
+ atomSet_q = ic.chains[chainidArray[index]];
103732
+ }
103625
103733
  // end of new version to be done for VASTsrv ==============
103626
103734
 
103627
103735
  let alignAjax;
103628
103736
  if(me.cfg.aligntool != 'tmalign') {
103629
103737
  let jsonStr_q = ic.domain3dCls.getDomainJsonForAlign(atomSet_q);
103630
103738
  let jsonStr_t = ic.domain3dCls.getDomainJsonForAlign(atomSet_t);
103631
-
103739
+
103632
103740
  let dataObj = {'domains1': jsonStr_q, 'domains2': jsonStr_t};
103633
103741
  alignAjax = me.getAjaxPostPromise(urlalign, dataObj);
103634
103742
  }
@@ -103664,6 +103772,7 @@ class ChainalignParser {
103664
103772
  //let bTargetTransformed = (ic.qt_start_end[0]) ? true : false;
103665
103773
 
103666
103774
  // modify the previous trans and rotation matrix
103775
+ let bAligned = false;
103667
103776
  for(let i = 0, il = dataArray.length; i < il; ++i) {
103668
103777
  // let align = (me.bNode) ? dataArray[i] : dataArray[i].value;//[0];
103669
103778
  let align = dataArray[i].value;//[0];
@@ -103679,7 +103788,7 @@ class ChainalignParser {
103679
103788
 
103680
103789
  me.htmlCls.clickMenuCls.setLogCmd("Align " + mmdbid_t + " with " + mmdbid_q, false);
103681
103790
 
103682
- this.processAlign(align, index, queryData, bEqualMmdbid, bEqualChain);
103791
+ bAligned =await this.processAlign(align, index, queryData, bEqualMmdbid, bEqualChain, undefined);
103683
103792
  }
103684
103793
 
103685
103794
  // do not transform the target
@@ -103687,28 +103796,34 @@ class ChainalignParser {
103687
103796
  // this.transformStructure(mmdbid_t, indexArray[0], 'target');
103688
103797
  //}
103689
103798
 
103690
- // transform the rest
103691
- for(let i = 0, il = dataArray.length; i < il; ++i) {
103692
- let mmdbid_q = struArray[i];
103693
- let index = indexArray[i];
103694
- this.transformStructure(mmdbid_q, index, 'query');
103695
- }
103799
+ if(bAligned) {
103800
+ // transform the rest
103801
+ for(let i = 0, il = dataArray.length; i < il; ++i) {
103802
+ let mmdbid_q = struArray[i];
103803
+ let index = indexArray[i];
103804
+ this.transformStructure(mmdbid_q, index, 'query');
103805
+ }
103696
103806
 
103697
- let hAtomsAll = {};
103807
+ let hAtomsAll = {};
103698
103808
 
103699
- if(ic.bFullUi && ic.q_rotation !== undefined && !me.cfg.resnum && !me.cfg.resdef) {
103700
- // set multiple sequence alignment from ic.qt_start_end
103701
- hAtomsAll = this.setMsa(chainidArray);
103702
- }
103809
+ if(ic.bFullUi && ic.q_rotation !== undefined && !me.cfg.resnum && !me.cfg.resdef) {
103810
+ // set multiple sequence alignment from ic.qt_start_end
103811
+ hAtomsAll = this.setMsa(chainidArray);
103812
+ }
103703
103813
 
103704
- // highlight all aligned atoms
103705
- //ic.hAtoms = me.hashUtilsCls.cloneHash(hAtomsTmp);
103706
- ic.hAtoms = me.hashUtilsCls.cloneHash(hAtomsAll);
103814
+ // highlight all aligned atoms
103815
+ //ic.hAtoms = me.hashUtilsCls.cloneHash(hAtomsTmp);
103816
+ ic.hAtoms = me.hashUtilsCls.cloneHash(hAtomsAll);
103707
103817
 
103708
- ic.transformCls.zoominSelection();
103818
+ ic.transformCls.zoominSelection();
103709
103819
 
103710
- // do the rest
103711
- await this.downloadChainalignmentPart3(chainresiCalphaHash2, chainidArray, ic.hAtoms);
103820
+ // do the rest
103821
+ await this.downloadChainalignmentPart3(chainresiCalphaHash2, chainidArray, ic.hAtoms);
103822
+ }
103823
+ else {
103824
+ me.cfg.aligntool = 'tmalign';
103825
+ await ic.chainalignParserCls.downloadChainalignment(me.cfg.chainalign);
103826
+ }
103712
103827
  }
103713
103828
 
103714
103829
  setMsa(chainidArray, bVastplus, bRealign) { let ic = this.icn3d, me = ic.icn3dui;
@@ -103779,7 +103894,7 @@ class ChainalignParser {
103779
103894
 
103780
103895
  let bNoAlert = true;
103781
103896
 
103782
- let bAligned = this.processAlign(align, i, queryData, bEqualMmdbid, bEqualChain, bNoAlert);
103897
+ let bAligned = await this.processAlign(align, i, queryData, bEqualMmdbid, bEqualChain, bNoAlert);
103783
103898
 
103784
103899
  if(bAligned) {
103785
103900
  bFoundAlignment = true;
@@ -104271,7 +104386,7 @@ class ChainalignParser {
104271
104386
 
104272
104387
  me.htmlCls.clickMenuCls.setLogCmd("Align " + mmdbid_t + " with " + mmdbid_q, false);
104273
104388
 
104274
- this.processAlign(align, index-1, queryData, bEqualMmdbid, bEqualChain);
104389
+ await this.processAlign(align, index-1, queryData, bEqualMmdbid, bEqualChain, undefined);
104275
104390
  }
104276
104391
  }
104277
104392
  }
@@ -104281,13 +104396,13 @@ class ChainalignParser {
104281
104396
  await this.loadOpmDataForChainalign(targetData, queryDataArray, chainidArray, ic.mmdbidArray);
104282
104397
  }
104283
104398
 
104284
- processAlign(align, index, queryData, bEqualMmdbid, bEqualChain, bNoAlert) { let ic = this.icn3d, me = ic.icn3dui;
104399
+ async processAlign(align, index, queryData, bEqualMmdbid, bEqualChain, bNoAlert) { let ic = this.icn3d, me = ic.icn3dui;
104285
104400
  let bAligned = false;
104286
104401
 
104287
- if((!align || align.length == 0) && !bNoAlert) {
104288
- let serverName = (me.cfg.aligntool == 'tmalign') ? 'TM-align' : 'VAST';
104289
-
104290
- if(ic.bRender) var aaa = 1; //alert("These chains can not be aligned by " + serverName + ".");
104402
+ if((align === "error" || align === undefined || align.length == 0) && !bNoAlert) {
104403
+ // let serverName = (me.cfg.aligntool == 'tmalign') ? 'TM-align' : 'VAST';
104404
+
104405
+ // if(ic.bRender) var aaa = 1; //alert("These chains can not be aligned by " + serverName + ".");
104291
104406
  return bAligned;
104292
104407
  }
104293
104408
 
@@ -104436,7 +104551,6 @@ class ChainalignParser {
104436
104551
  let structArrayTmp = idlist.split(',');
104437
104552
 
104438
104553
  let structArray = [];
104439
-
104440
104554
  // only when bNoDuplicate is undefined/false, it's allowed to load multiple copies of the same structure
104441
104555
  if(!bNoDuplicate) {
104442
104556
  structArray = this.addPostfixForStructureids(structArrayTmp);
@@ -104449,7 +104563,7 @@ class ChainalignParser {
104449
104563
  if(!ic.structures.hasOwnProperty(id)) structArray.push(structArrayTmp[i]);
104450
104564
  }
104451
104565
  }
104452
-
104566
+
104453
104567
  if(structArray.length == 0) return;
104454
104568
 
104455
104569
  ic.structArray = ic.structArray.concat(structArray);
@@ -104549,6 +104663,8 @@ class ChainalignParser {
104549
104663
  let bNoSeqalign = true;
104550
104664
  let pdbid = structArray[i];
104551
104665
 
104666
+ if(queryDataArray[i].pdbId) queryDataArray[i].pdbId = pdbid;
104667
+
104552
104668
  //hAtomsTmp contains all atoms
104553
104669
  await ic.mmdbParserCls.parseMmdbData(queryDataArray[i], targetOrQuery, undefined, undefined, bLastQuery, bNoSeqalign, pdbid);
104554
104670
  }
@@ -106125,7 +106241,7 @@ class MmdbParser {
106125
106241
  return;
106126
106242
  }
106127
106243
 
106128
- if(Object.keys(data.atoms).length == 0) { // for large structures such as 3J3Q
106244
+ if(!data.atoms || Object.keys(data.atoms).length == 0) { // for large structures such as 3J3Q
106129
106245
  // use mmtfid
106130
106246
  let pdbid = data.pdbId;
106131
106247
  await ic.bcifParserCls.downloadBcif(pdbid);
@@ -106135,6 +106251,7 @@ class MmdbParser {
106135
106251
 
106136
106252
  let bCalphaOnly = me.utilsCls.isCalphaPhosOnly(data.atoms); //, 'CA');
106137
106253
 
106254
+ //if(!data.pdbId) data.pdbId = mmdbid;
106138
106255
  if(bCalphaOnly || data.atomCount <= ic.maxatomcnt) {
106139
106256
  await this.parseMmdbData(data);
106140
106257
  }
@@ -106296,8 +106413,18 @@ class MmdbParser {
106296
106413
  async parseMmdbData(data, type, chainid, chainIndex, bLastQuery, bNoTransformNoSeqalign, pdbidIn) { let ic = this.icn3d, me = ic.icn3dui;
106297
106414
  let hAtoms;
106298
106415
  let pdbid = (data.pdbId !== undefined) ? data.pdbId : data.mmdbId;
106416
+ if(!pdbid && chainid) {
106417
+ pdbid = chainid.substr(0, chainid.lastIndexOf('_'));
106418
+ }
106419
+
106299
106420
  if(pdbidIn) pdbid = pdbidIn;
106300
106421
 
106422
+ // if(!data.atoms || Object.keys(data.atoms).length == 0) { // for large structures such as 3J3Q
106423
+ // ic.bRender = false;
106424
+ // await ic.bcifParserCls.downloadBcif(pdbid);
106425
+ // return;
106426
+ // }
106427
+
106301
106428
  this.parseMmdbDataPart1(data, type);
106302
106429
 
106303
106430
  if(type === undefined) { // default mmdbid input
@@ -106714,7 +106841,7 @@ class BcifParser {
106714
106841
 
106715
106842
  if(block.getCategory("_struct")) {
106716
106843
  title = block.getCategory("_struct").getColumn("title").getString(0);
106717
- title = title.replace(/"/, "'");
106844
+ title = title.replace(/"/g, "'");
106718
106845
  }
106719
106846
 
106720
106847
  if(block.getCategory("_struct_keywords")) {
@@ -107964,7 +108091,7 @@ class PdbParser {
107964
108091
  }
107965
108092
 
107966
108093
  // if(!ic.bSecondaryStructure && Object.keys(ic.proteins).length > 0) {
107967
- if((!ic.bSecondaryStructure || bCalcSecondary) && Object.keys(ic.proteins).length > 0 && !bNoDssp) {
108094
+ if((!ic.bSecondaryStructure || bCalcSecondary) && Object.keys(ic.proteins).length > 0 && !bNoDssp) {
107968
108095
  await this.applyCommandDssp(bAppend);
107969
108096
  }
107970
108097
  else {
@@ -108795,7 +108922,7 @@ class DcdParser {
108795
108922
  return true;
108796
108923
  }
108797
108924
 
108798
- async showRmsdPlot() { let ic = this.icn3d, me = ic.icn3dui;
108925
+ async showRmsdHbondPlot(bHbondPlot) { let ic = this.icn3d, me = ic.icn3dui;
108799
108926
  if(ic.bChartjs === undefined) {
108800
108927
  let url = "https://cdn.jsdelivr.net/npm/chart.js";
108801
108928
  await me.getAjaxPromise(url, 'script');
@@ -108803,42 +108930,87 @@ class DcdParser {
108803
108930
  ic.bChartjs = true;
108804
108931
  }
108805
108932
 
108806
- $("#" + me.rmsdplotid).empty();
108807
- me.htmlCls.dialogCls.openDlg('dl_rmsdplot', 'RMSD Plot');
108933
+ if(bHbondPlot) {
108934
+ $("#" + me.hbondplotid).empty();
108935
+ me.htmlCls.dialogCls.openDlg('dl_hbondplot', 'H-bond Plot');
108936
+ }
108937
+ else {
108938
+ $("#" + me.rmsdplotid).empty();
108939
+ me.htmlCls.dialogCls.openDlg('dl_rmsdplot', 'RMSD Plot');
108940
+ }
108808
108941
 
108809
108942
  let dataSet = [];
108810
108943
  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]];
108944
+ if(bHbondPlot) {
108945
+ for(let i = 0, il = structureArray.length; i < il; ++i) {
108946
+ if(i > 0) {
108947
+ let type = 'save1';
108948
+ let stru = structureArray[i];
108949
+ let atomSet = {};
108950
+ for(let j = 0, jl = ic.structures[stru].length; j < jl; ++j) {
108951
+ let chainid = ic.structures[stru][j];
108952
+ for(let k in ic.chains[chainid]) {
108953
+ let atom = ic.atoms[k];
108954
+ if(!ic.water.hasOwnProperty(atom.serial) && !ic.ions.hasOwnProperty(atom.serial)) atomSet[k] = 1;
108955
+ }
108956
+ }
108814
108957
 
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;
108958
+ let residueHash = ic.firstAtomObjCls.getResiduesFromAtoms(atomSet);
108959
+ let command = structureArray[i] + '_nonSol'; // exclude solvent and ions
108960
+ let residArray = Object.keys(residueHash);
108961
+ ic.selectionCls.addCustomSelection(residArray, command, command, 'select ' + command, true);
108962
+ let nameArray = [command];
108963
+ let nameArray2 = [command];
108964
+
108965
+ let result = await ic.viewInterPairsCls.viewInteractionPairs(nameArray2, nameArray, false, type,
108966
+ true, false, false, false, false, false, undefined, bHbondPlot);
108967
+ let bondCnt = result.bondCnt;
108968
+
108969
+ let hBondCnt = 0;
108970
+ for(let j = 0, jl = bondCnt.length; j < jl; ++j) {
108971
+ hBondCnt += bondCnt[j].cntHbond; // + bondCnt[j].cntIonic + bondCnt[j].cntHalegen + bondCnt[j].cntPication + bondCnt[j].cntPistacking;
108825
108972
  }
108973
+
108974
+ let time = ic.TIMEOFFSET + (i * ic.DELTA).toPrecision(4);
108975
+ dataSet.push({x: time, y: hBondCnt});
108826
108976
  }
108827
108977
  }
108828
108978
 
108829
- if(i == 0) {
108830
- coord1 = [].concat(coord);
108831
- }
108832
- else {
108833
- coord2 = coord;
108834
- }
108979
+ ic.viewInterPairsCls.resetInteractionPairs();
108980
+ }
108981
+ else {
108982
+ let coord1 = [], coord2 = [];
108983
+ for(let i = 0, il = structureArray.length; i < il; ++i) {
108984
+ let chainArray = ic.structures[structureArray[i]];
108985
+
108986
+ let coord = [];
108987
+ let nAtoms = 0;
108988
+ for(let j = 0, jl = chainArray.length; j < jl; ++j) {
108989
+ let chainid = chainArray[j];
108990
+ for(let k in ic.chains[chainid]) {
108991
+ let atom = ic.atoms[k];
108992
+ // only align proteins, nucleotides, or chemicals
108993
+ if(ic.proteins.hasOwnProperty(atom.serial) || ic.nucleotides.hasOwnProperty(atom.serial) || ic.chemicals.hasOwnProperty(atom.serial)) {
108994
+ coord.push(atom.coord);
108995
+ ++nAtoms;
108996
+ }
108997
+ }
108998
+ }
108835
108999
 
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
109000
+ if(i == 0) {
109001
+ coord1 = [].concat(coord);
109002
+ }
109003
+ else {
109004
+ coord2 = coord;
109005
+ }
109006
+
109007
+ if(i > 0) {
109008
+ let result = me.rmsdSuprCls.getRmsdSuprCls(coord1, coord2, nAtoms);
109009
+ let rmsd = (result.rmsd * 0.1).toPrecision(4); // convert from Å to nm
108839
109010
 
108840
- let time = ic.TIMEOFFSET + (i * ic.DELTA).toPrecision(4);
108841
- dataSet.push({x: time, y: rmsd});
109011
+ let time = ic.TIMEOFFSET + (i * ic.DELTA).toPrecision(4);
109012
+ dataSet.push({x: time, y: rmsd});
109013
+ }
108842
109014
  }
108843
109015
  }
108844
109016
 
@@ -108849,13 +109021,13 @@ class DcdParser {
108849
109021
 
108850
109022
  // https://www.chartjs.org/docs/latest/samples/line/line.html
108851
109023
  // const ctx = $("#" + me.rmsdplotid)[0].getContext('2d');
108852
- const ctx = $("#" + me.rmsdplotid)[0];
109024
+ const ctx = (bHbondPlot) ? $("#" + me.hbondplotid)[0] : $("#" + me.rmsdplotid)[0];
108853
109025
 
108854
109026
  new Chart(ctx, {
108855
109027
  type: 'line',
108856
109028
  data: {
108857
109029
  datasets: [{
108858
- label: 'RMSD',
109030
+ label: (bHbondPlot) ? 'H-bonds' : 'RMSD',
108859
109031
  data: dataSet
108860
109032
  }]
108861
109033
  },
@@ -108876,7 +109048,7 @@ class DcdParser {
108876
109048
  y: { // Y-axis configuration (defaults to numeric scale)
108877
109049
  title: {
108878
109050
  display: true, // Show the Y-axis label
108879
- text: 'RMSD (nm)' // Text for the Y-axis label
109051
+ text: (bHbondPlot) ? 'Number of H-bonds' : 'RMSD (nm)' // Text for the Y-axis label
108880
109052
  }
108881
109053
  }
108882
109054
  }
@@ -109894,8 +110066,7 @@ class RealignParser {
109894
110066
  // If rmsd from vastsrv is too large, realign the chains
109895
110067
  //if(me.cfg.chainalign && !me.cfg.usepdbnum && me.cfg.resdef && rmsd > 5) {
109896
110068
  // redo algnment only for VAST serv page
109897
- if(!me.cfg.usepdbnum && me.cfg.resdef && rmsd > 5 && me.cfg.chainalign) {
109898
- console.log("RMSD from VAST is larger than 5. Realign the chains with TM-align.");
110069
+ if(!me.cfg.usepdbnum && (me.cfg.resdef || me.cfg.resrange) && rmsd > 5 && me.cfg.chainalign) {
109899
110070
  //let nameArray = me.cfg.chainalign.split(',');
109900
110071
  let nameArray = Object.keys(chainidHash);
109901
110072
  if(nameArray.length > 0) {
@@ -110147,15 +110318,30 @@ let resRangeArray = (me.cfg.resrange) ? decodeURIComponent(me.cfg.resrange).spli
110147
110318
  if(bVastsearch && me.cfg.resrange) {
110148
110319
  let resRangeArray = decodeURIComponent(me.cfg.resrange).split(' | ');
110149
110320
 
110150
- let atomSet_t = ic.realignParserCls.getSeqCoorResid([resRangeArray[0]], ic.chainidArray[0], true).hAtoms;
110321
+ let atomSet_t;
110322
+ if(me.cfg.resrange) {
110323
+ let result = ic.realignParserCls.getSeqCoorResid([resRangeArray[0]], ic.chainidArray[0], true);
110324
+ atomSet_t = result.hAtoms;
110325
+ }
110326
+ else {
110327
+ atomSet_t = ic.chains[ic.chainidArray[0]];
110328
+ }
110329
+
110151
110330
  for(let index = 1, indexl = ic.chainidArray.length; index < indexl; ++index) {
110152
- let atomSet_q = ic.realignParserCls.getSeqCoorResid([resRangeArray[index]], ic.chainidArray[index], true).hAtoms;
110331
+ let atomSet_q;
110332
+ if(me.cfg.resrange) {
110333
+ let result = ic.realignParserCls.getSeqCoorResid([resRangeArray[index]], ic.chainidArray[index], true);
110334
+ atomSet_q = result.hAtoms;
110335
+ }
110336
+ else {
110337
+ atomSet_q = ic.chains[ic.chainidArray[index]];
110338
+ }
110153
110339
 
110154
110340
  let alignAjax;
110155
110341
  if(me.cfg.aligntool != 'tmalign') {
110156
110342
  let jsonStr_q = ic.domain3dCls.getDomainJsonForAlign(atomSet_q);
110157
110343
  let jsonStr_t = ic.domain3dCls.getDomainJsonForAlign(atomSet_t);
110158
-
110344
+
110159
110345
  let dataObj = {'domains1': jsonStr_q, 'domains2': jsonStr_t};
110160
110346
  alignAjax = me.getAjaxPostPromise(urlalign, dataObj);
110161
110347
  }
@@ -110216,9 +110402,7 @@ let resRangeArray = (me.cfg.resrange) ? decodeURIComponent(me.cfg.resrange).spli
110216
110402
  let alignAjax;
110217
110403
  if(me.cfg.aligntool != 'tmalign') {
110218
110404
  let jsonStr_q = ic.domain3dCls.getDomainJsonForAlign(struct2domain[struct2][chainid2]);
110219
- console.log("@@@ realign " + struct1 + " " + chainid1 + " and " + struct2 + " " + chainid2);
110220
- console.log("@@@ jsonStr_q " + jsonStr_q);
110221
- console.log("@@@ jsonStr_t " + jsonStr_t);
110405
+
110222
110406
  let dataObj = {'domains1': jsonStr_q, 'domains2': jsonStr_t};
110223
110407
  alignAjax = me.getAjaxPostPromise(urlalign, dataObj);
110224
110408
  }
@@ -110288,7 +110472,7 @@ console.log("@@@ jsonStr_t " + jsonStr_t);
110288
110472
 
110289
110473
  if(me.cfg.aligntool != 'tmalign') {
110290
110474
  let jsonStr_q = ic.domain3dCls.getDomainJsonForAlign(chainid2domain[chainid2]);
110291
-
110475
+
110292
110476
  let dataObj = {'domains1': jsonStr_q, 'domains2': jsonStr_t};
110293
110477
  alignAjax = me.getAjaxPostPromise(urlalign, dataObj);
110294
110478
  }
@@ -110548,6 +110732,8 @@ console.log("@@@ jsonStr_t " + jsonStr_t);
110548
110732
  let hAtoms = {};
110549
110733
 
110550
110734
  for(let j = 0, jl = resiArray.length; j < jl; ++j) {
110735
+ if(!resiArray[j]) continue;
110736
+
110551
110737
  if(resiArray[j].indexOf('-') != -1) {
110552
110738
  let startEnd = resiArray[j].split('-');
110553
110739
  for(let k = parseInt(startEnd[0]); k <= parseInt(startEnd[1]); ++k) {
@@ -112352,7 +112538,7 @@ class ParserUtils {
112352
112538
  let data = await me.getAjaxPromise(url, 'jsonp');
112353
112539
 
112354
112540
  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.";
112541
+ 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
112542
 
112357
112543
  if (me.bNode) return;
112358
112544
 
@@ -113013,6 +113199,16 @@ class LoadAtomData {
113013
113199
  }
113014
113200
  }
113015
113201
  }
113202
+
113203
+ // no bonds between metals, e.g., in PDB 4HEA
113204
+ if($.inArray(atom.elem, me.parasCls.ionsArray) !== -1) {
113205
+ for(let j = atom.bonds.length - 1; j >= 0; --j) {
113206
+ let atom2 = ic.atoms[atom.bonds[j]];
113207
+ if(atom2 && $.inArray(atom2.elem, me.parasCls.ionsArray) !== -1) {
113208
+ atom.bonds.splice(j, 1);
113209
+ }
113210
+ }
113211
+ }
113016
113212
  }
113017
113213
 
113018
113214
  // adjust biopolymer type
@@ -115482,6 +115678,7 @@ class LoadPDB {
115482
115678
  // refresh for atoms in each residue
115483
115679
  refreshBonds(curResAtoms, prevCarbon) { let ic = this.icn3d, me = ic.icn3dui;
115484
115680
  let n = curResAtoms.length;
115681
+
115485
115682
  for (let j = 0; j < n; ++j) {
115486
115683
  let atom0 = curResAtoms[j];
115487
115684
  for (let k = j + 1; k < n; ++k) {
@@ -115707,7 +115904,8 @@ class LoadPDB {
115707
115904
  }
115708
115905
 
115709
115906
  isSecondary(resid, residArray, bNMR, bNonFull) { let ic = this.icn3d; ic.icn3dui;
115710
- if(bNonFull) return false;
115907
+ // still need to get the secondary info
115908
+ //if(bNonFull) return false;
115711
115909
 
115712
115910
  if(!bNMR) {
115713
115911
  return $.inArray(resid, residArray) != -1;
@@ -115825,7 +116023,7 @@ class LoadCIF {
115825
116023
 
115826
116024
  if(block.getCategory("_struct")) {
115827
116025
  let title = block.getCategory("_struct").getColumn("title").getString(0);
115828
- title = title.replace(/"/, "'");
116026
+ title = title.replace(/"/g, "'");
115829
116027
  let name = title.replace(/ALPHAFOLD MONOMER V2.0 PREDICTION FOR /gi, '');
115830
116028
  ic.molTitle += name.trim() + " ";
115831
116029
  // if(bEsmfold && ic.esmTitle) ic.molTitle = ic.esmTitle;
@@ -123613,29 +123811,29 @@ class Dssp {
123613
123811
 
123614
123812
  setRefPdbs() { let ic = this.icn3d; ic.icn3dui;
123615
123813
  // round 1, 16 templates
123616
- ic.refpdbArray = ['1InsulinR_8guyE_human_FN3-n1', '1Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4', '1CoAtomerGamma1_1r4xA_human', '1C3_2qkiD_human_n1', '1CuZnSuperoxideDismutase_1hl5C_human', '1ASF1A_2iijA_human', '1FAB-LIGHT_5esv_C1-n2', '1CD2_1hnfA_human_C2-n2', '1NaCaExchanger_2fwuA_dog_n2', '1NaKATPaseTransporterBeta_2zxeB_spurdogshark', '1FAB-HEAVY_5esv_V-n1', '1PDL1_4z18B_human_V-n1', '1BTLA_2aw2A_human_Iset', '1LaminAC_1ifrA_human', '1CD3g_6jxrg_human_C2', '1CD28_1yjdC_human_V', '1CD19_6al5A_human-n1'];
123814
+ ic.refpdbArray = ['1InsulinR_8guyE_human_FN3-n1', '1ICOS_6x4gA_human_V', '1FAB-LIGHT_5esv_C1-n2', '1CD2_1hnfA_human_C2-n2', '1ECadherin_4zt1A_human_n2', '1FAB-HEAVY_5esv_V-n1', '1PDL1_4z18B_human_V-n1', '1BTLA_2aw2A_human_Iset', '1LaminAC_1ifrA_human', '1CD3g_6jxrg_human_C2', '1CD28_1yjdC_human_V', '1CD19_6al5A_human-n1'];
123617
123815
 
123618
123816
  // round 2
123619
123817
  ic.refpdbHash = {};
123620
123818
  ic.refpdbHash['1InsulinR_8guyE_human_FN3-n1'] = ['InsulinR_8guyE_human_FN3-n1', 'IL6Rb_1bquB_human_FN3-n3', 'Sidekick2_1wf5A_human_FN3-n7', 'InsulinR_8guyE_human_FN3-n2', 'Contactin1_2ee2A_human_FN3-n9', 'IL6Rb_1bquB_human_FN3-n2'];
123621
- ic.refpdbHash['1Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'] = ['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4', 'ICOS_6x4gA_human_V'];
123622
- ic.refpdbHash['1CoAtomerGamma1_1r4xA_human'] = ['CoAtomerGamma1_1r4xA_human', 'TP34_2o6cA_bacteria'];
123623
- ic.refpdbHash['1C3_2qkiD_human_n1'] = ['C3_2qkiD_human_n1', 'BArrestin1_4jqiA_rat_n1', 'RBPJ_6py8C_human_Unk-n1'];
123624
- ic.refpdbHash['1CuZnSuperoxideDismutase_1hl5C_human'] = ['CuZnSuperoxideDismutase_1hl5C_human', 'TEAD1_3kysC_human'];
123625
- ic.refpdbHash['1ASF1A_2iijA_human'] = ['ASF1A_2iijA_human', 'RBPJ_6py8C_human_Unk-n2', 'TP47_1o75A_bacteria'];
123819
+ ic.refpdbHash['1ICOS_6x4gA_human_V'] = ['ICOS_6x4gA_human_V'];
123820
+ //ic.refpdbHash['1CoAtomerGamma1_1r4xA_human'] = ['CoAtomerGamma1_1r4xA_human', 'TP34_2o6cA_bacteria'];
123821
+ //ic.refpdbHash['1C3_2qkiD_human_n1'] = ['C3_2qkiD_human_n1', 'RBPJ_6py8C_human_Unk-n1'];
123822
+ //ic.refpdbHash['1CuZnSuperoxideDismutase_1hl5C_human'] = ['TEAD1_3kysC_human'];
123823
+ //ic.refpdbHash['1ASF1A_2iijA_human'] = ['ASF1A_2iijA_human', 'TP47_1o75A_bacteria'];
123626
123824
  ic.refpdbHash['1FAB-LIGHT_5esv_C1-n2'] = ['FAB-LIGHT_5esv_C1-n2', 'GHR_1axiB_human_C1-n1', 'VTCN1_Q7Z7D3_human_C1-n2', 'B2Microglobulin_7phrL_human_C1', 'FAB-HEAVY_5esv_C1-n2', 'MHCIa_7phrH_human_C1'];
123627
123825
  ic.refpdbHash['1CD2_1hnfA_human_C2-n2'] = ['CD2_1hnfA_human_C2-n2', 'Siglec3_5j0bB_human_C1-n2'];
123628
- ic.refpdbHash['1NaCaExchanger_2fwuA_dog_n2'] = ['NaCaExchanger_2fwuA_dog_n2', 'ORF7a_1xakA_virus', 'ECadherin_4zt1A_human_n2'];
123629
- ic.refpdbHash['1NaKATPaseTransporterBeta_2zxeB_spurdogshark'] = ['NaKATPaseTransporterBeta_2zxeB_spurdogshark'];
123826
+ ic.refpdbHash['1ECadherin_4zt1A_human_n2'] = ['ECadherin_4zt1A_human_n2'];
123827
+ //ic.refpdbHash['1NaKATPaseTransporterBeta_2zxeB_spurdogshark'] = ['NaKATPaseTransporterBeta_2zxeB_spurdogshark'];
123630
123828
  ic.refpdbHash['1FAB-HEAVY_5esv_V-n1'] = ['FAB-HEAVY_5esv_V-n1', 'FAB-LIGHT_5esv_V-n1', 'VNAR_1t6vN_shark_V', 'TCRa_6jxrm_human_V-n1', 'VISTA_6oilA_human_V', 'CD8a_1cd8A_human_V', 'PD1_4zqkB_human_V'];
123631
123829
  ic.refpdbHash['1PDL1_4z18B_human_V-n1'] = ['PDL1_4z18B_human_V-n1', 'CD2_1hnfA_human_V-n1', 'LAG3_7tzgD_human_V-n1'];
123632
123830
  ic.refpdbHash['1BTLA_2aw2A_human_Iset'] = ['BTLA_2aw2A_human_Iset', 'Palladin_2dm3A_human_Iset-n1', 'Titin_4uowM_human_Iset-n152', 'LAG3_7tzgD_human_C1-n2', 'JAM1_1nbqA_human_Iset-n2', 'Contactin1_3s97C_human_Iset-n2'];
123633
123831
  ic.refpdbHash['1LaminAC_1ifrA_human'] = ['LaminAC_1ifrA_human', 'CD3d_6jxrd_human_C1'];
123634
- ic.refpdbHash['1CD3g_6jxrg_human_C2'] = ['CD3g_6jxrg_human_C2', 'TCRa_6jxrm_human_C1-n2', 'IsdA_2iteA_bacteria'];
123635
- ic.refpdbHash['1CD28_1yjdC_human_V'] = ['CD28_1yjdC_human_V', 'MPT63_1lmiA_bacteria', 'CD3e_6jxrf_human_C1'];
123832
+ ic.refpdbHash['1CD3g_6jxrg_human_C2'] = ['CD3g_6jxrg_human_C2', 'TCRa_6jxrm_human_C1-n2'];
123833
+ ic.refpdbHash['1CD28_1yjdC_human_V'] = ['CD28_1yjdC_human_V', 'CD3e_6jxrf_human_C1'];
123636
123834
  ic.refpdbHash['1CD19_6al5A_human-n1'] = ['CD19_6al5A_human-n1'];
123637
123835
 
123638
- ic.refpdbHash['all_templates'] = ['ASF1A_2iijA_human', 'B2Microglobulin_7phrL_human_C1', 'BArrestin1_4jqiA_rat_n1', 'BTLA_2aw2A_human_Iset', 'C3_2qkiD_human_n1', 'CD19_6al5A_human-n1', 'CD28_1yjdC_human_V', 'CD2_1hnfA_human_C2-n2', 'CD2_1hnfA_human_V-n1', 'CD3d_6jxrd_human_C1', 'CD3e_6jxrf_human_C1', 'CD3g_6jxrg_human_C2', 'CD8a_1cd8A_human_V', 'CoAtomerGamma1_1r4xA_human', 'Contactin1_2ee2A_human_FN3-n9', 'Contactin1_3s97C_human_Iset-n2', 'CuZnSuperoxideDismutase_1hl5C_human', 'ECadherin_4zt1A_human_n2', 'Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4', 'FAB-HEAVY_5esv_C1-n2', 'FAB-HEAVY_5esv_V-n1', 'FAB-LIGHT_5esv_C1-n2', 'FAB-LIGHT_5esv_V-n1', 'GHR_1axiB_human_C1-n1', 'ICOS_6x4gA_human_V', 'IL6Rb_1bquB_human_FN3-n2', 'IL6Rb_1bquB_human_FN3-n3', 'InsulinR_8guyE_human_FN3-n1', 'InsulinR_8guyE_human_FN3-n2', 'IsdA_2iteA_bacteria', 'JAM1_1nbqA_human_Iset-n2', 'LAG3_7tzgD_human_C1-n2', 'LAG3_7tzgD_human_V-n1', 'LaminAC_1ifrA_human', 'MHCIa_7phrH_human_C1', 'MPT63_1lmiA_bacteria', 'NaCaExchanger_2fwuA_dog_n2', 'NaKATPaseTransporterBeta_2zxeB_spurdogshark', 'ORF7a_1xakA_virus', 'PD1_4zqkB_human_V', 'PDL1_4z18B_human_V-n1', 'Palladin_2dm3A_human_Iset-n1', 'RBPJ_6py8C_human_Unk-n1', 'RBPJ_6py8C_human_Unk-n2', 'Sidekick2_1wf5A_human_FN3-n7', 'Siglec3_5j0bB_human_C1-n2', 'TCRa_6jxrm_human_C1-n2', 'TCRa_6jxrm_human_V-n1', 'TEAD1_3kysC_human', 'TP34_2o6cA_bacteria', 'TP47_1o75A_bacteria', 'Titin_4uowM_human_Iset-n152', 'VISTA_6oilA_human_V', 'VNAR_1t6vN_shark_V', 'VTCN1_Q7Z7D3_human_C1-n2'];
123836
+ ic.refpdbHash['all_templates'] = ['B2Microglobulin_7phrL_human_C1', 'BTLA_2aw2A_human_Iset', 'CD19_6al5A_human-n1', 'CD28_1yjdC_human_V', 'CD2_1hnfA_human_C2-n2', 'CD2_1hnfA_human_V-n1', 'CD3d_6jxrd_human_C1', 'CD3e_6jxrf_human_C1', 'CD3g_6jxrg_human_C2', 'CD8a_1cd8A_human_V', 'Contactin1_2ee2A_human_FN3-n9', 'Contactin1_3s97C_human_Iset-n2', 'ECadherin_4zt1A_human_n2', 'FAB-HEAVY_5esv_C1-n2', 'FAB-HEAVY_5esv_V-n1', 'FAB-LIGHT_5esv_C1-n2', 'FAB-LIGHT_5esv_V-n1', 'GHR_1axiB_human_C1-n1', 'ICOS_6x4gA_human_V', 'IL6Rb_1bquB_human_FN3-n2', 'IL6Rb_1bquB_human_FN3-n3', 'InsulinR_8guyE_human_FN3-n1', 'InsulinR_8guyE_human_FN3-n2', 'JAM1_1nbqA_human_Iset-n2', 'LAG3_7tzgD_human_C1-n2', 'LAG3_7tzgD_human_V-n1', 'LaminAC_1ifrA_human', 'MHCIa_7phrH_human_C1', 'PD1_4zqkB_human_V', 'PDL1_4z18B_human_V-n1', 'Palladin_2dm3A_human_Iset-n1', 'Sidekick2_1wf5A_human_FN3-n7', 'Siglec3_5j0bB_human_C1-n2', 'TCRa_6jxrm_human_C1-n2', 'TCRa_6jxrm_human_V-n1', 'Titin_4uowM_human_Iset-n152', 'VISTA_6oilA_human_V', 'VNAR_1t6vN_shark_V', 'VTCN1_Q7Z7D3_human_C1-n2'];
123639
123837
 
123640
123838
  // use known ref structure
123641
123839
  ic.refpdbHash['5ESV_C'] = ['FAB-HEAVY_5esv_V-n1', 'FAB-HEAVY_5esv_C1-n2'];
@@ -123644,36 +123842,36 @@ class Dssp {
123644
123842
  ic.refpdbHash['6JXR_m'] = ['TCRa_6jxrm_human_V-n1', 'TCRa_6jxrm_human_C1-n2'];
123645
123843
  ic.refpdbHash['1HNF_A'] = ['CD2_1hnfA_human_V-n1', 'CD2_1hnfA_human_C2-n2'];
123646
123844
  ic.refpdbHash['7TZG_D'] = ['LAG3_7tzgD_human_V-n1', 'LAG3_7tzgD_human_C1-n2'];
123647
- ic.refpdbHash['6PY8_C'] = ['RBPJ_6py8C_human_Unk-n1', 'RBPJ_6py8C_human_Unk-n2'];
123845
+ //ic.refpdbHash['6PY8_C'] = ['RBPJ_6py8C_human_Unk-n1'];
123648
123846
  ic.refpdbHash['1BQU_B'] = ['IL6Rb_1bquB_human_FN3-n2', 'IL6Rb_1bquB_human_FN3-n3'];
123649
123847
 
123650
- ic.refpdbHash['1R4X_A'] = ['CoAtomerGamma1_1r4xA_human'];
123848
+ //ic.refpdbHash['1R4X_A'] = ['CoAtomerGamma1_1r4xA_human'];
123651
123849
  ic.refpdbHash['6OIL_A'] = ['VISTA_6oilA_human_V'];
123652
- ic.refpdbHash['2ZXE_B'] = ['NaKATPaseTransporterBeta_2zxeB_spurdogshark'];
123653
- ic.refpdbHash['1I8A_A'] = ['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'];
123654
- ic.refpdbHash['2FWU_A'] = ['NaCaExchanger_2fwuA_dog_n2'];
123655
- ic.refpdbHash['4JQI_A'] = ['BArrestin1_4jqiA_rat_n1'];
123850
+ //ic.refpdbHash['2ZXE_B'] = ['NaKATPaseTransporterBeta_2zxeB_spurdogshark'];
123851
+ //ic.refpdbHash['1I8A_A'] = ['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'];
123852
+ //ic.refpdbHash['2FWU_A'] = ['NaCaExchanger_2fwuA_dog_n2'];
123853
+ //ic.refpdbHash['4JQI_A'] = ['BArrestin1_4jqiA_rat_n1'];
123656
123854
  ic.refpdbHash['1NBQ_A'] = ['JAM1_1nbqA_human_Iset-n2'];
123657
- ic.refpdbHash['1O75_A'] = ['TP47_1o75A_bacteria'];
123855
+ //ic.refpdbHash['1O75_A'] = ['TP47_1o75A_bacteria'];
123658
123856
  ic.refpdbHash['7PHR_H'] = ['MHCIa_7phrH_human_C1'];
123659
- ic.refpdbHash['2IIJ_A'] = ['ASF1A_2iijA_human'];
123857
+ //ic.refpdbHash['2IIJ_A'] = ['ASF1A_2iijA_human'];
123660
123858
  ic.refpdbHash['4Z18_B'] = ['PDL1_4z18B_human_V-n1'];
123661
123859
  ic.refpdbHash['1T6V_N'] = ['VNAR_1t6vN_shark_V'];
123662
- ic.refpdbHash['2O6C_A'] = ['TP34_2o6cA_bacteria'];
123663
- ic.refpdbHash['3KYS_C'] = ['TEAD1_3kysC_human'];
123860
+ //ic.refpdbHash['2O6C_A'] = ['TP34_2o6cA_bacteria'];
123861
+ //ic.refpdbHash['3KYS_C'] = ['TEAD1_3kysC_human'];
123664
123862
  ic.refpdbHash['7PHR_L'] = ['B2Microglobulin_7phrL_human_C1'];
123665
123863
  ic.refpdbHash['2AW2_A'] = ['BTLA_2aw2A_human_Iset'];
123666
- ic.refpdbHash['1HL5_C'] = ['CuZnSuperoxideDismutase_1hl5C_human'];
123864
+ //ic.refpdbHash['1HL5_C'] = ['CuZnSuperoxideDismutase_1hl5C_human'];
123667
123865
  ic.refpdbHash['1WF5_A'] = ['Sidekick2_1wf5A_human_FN3-n7'];
123668
123866
  ic.refpdbHash['5J0B_B'] = ['Siglec3_5j0bB_human_C1-n2'];
123669
123867
  ic.refpdbHash['1IFR_A'] = ['LaminAC_1ifrA_human'];
123670
123868
  ic.refpdbHash['Q7Z7D3_A'] = ['VTCN1_Q7Z7D3_human_C1-n2'];
123671
123869
  ic.refpdbHash['4ZQK_B'] = ['PD1_4zqkB_human_V'];
123672
123870
  ic.refpdbHash['2DM3_A'] = ['Palladin_2dm3A_human_Iset-n1'];
123673
- ic.refpdbHash['2ITE_A'] = ['IsdA_2iteA_bacteria'];
123674
- ic.refpdbHash['1XAK_A'] = ['ORF7a_1xakA_virus'];
123871
+ //ic.refpdbHash['2ITE_A'] = ['IsdA_2iteA_bacteria'];
123872
+ //ic.refpdbHash['1XAK_A'] = ['ORF7a_1xakA_virus'];
123675
123873
  ic.refpdbHash['4ZT1_A'] = ['ECadherin_4zt1A_human_n2'];
123676
- ic.refpdbHash['1LMI_A'] = ['MPT63_1lmiA_bacteria'];
123874
+ //ic.refpdbHash['1LMI_A'] = ['MPT63_1lmiA_bacteria'];
123677
123875
  ic.refpdbHash['1CD8_A'] = ['CD8a_1cd8A_human_V'];
123678
123876
  ic.refpdbHash['3S97_C'] = ['Contactin1_3s97C_human_Iset-n2'];
123679
123877
  ic.refpdbHash['1AXI_B'] = ['GHR_1axiB_human_C1-n1'];
@@ -123681,7 +123879,7 @@ class Dssp {
123681
123879
  ic.refpdbHash['2EE2_A'] = ['Contactin1_2ee2A_human_FN3-n9'];
123682
123880
  ic.refpdbHash['4UOW_M'] = ['Titin_4uowM_human_Iset-n152'];
123683
123881
  ic.refpdbHash['6A15_A'] = ['CD19_6al5A_human-n1'];
123684
- ic.refpdbHash['2QKI_D'] = ['C3_2qkiD_human_n1'];
123882
+ //ic.refpdbHash['2QKI_D'] = ['C3_2qkiD_human_n1'];
123685
123883
  ic.refpdbHash['1YJD_C'] = ['CD28_1yjdC_human_V'];
123686
123884
  ic.refpdbHash['6JXR_d'] = ['CD3d_6jxrd_human_C1'];
123687
123885
  ic.refpdbHash['6JXR_f'] = ['CD3e_6jxrf_human_C1'];
@@ -123690,11 +123888,11 @@ class Dssp {
123690
123888
  // assign Ig types
123691
123889
  ic.ref2igtype = {};
123692
123890
 
123693
- ic.ref2igtype['ASF1A_2iijA_human'] = 'IgFN3-like';
123891
+ //ic.ref2igtype['ASF1A_2iijA_human'] = 'IgFN3-like';
123694
123892
  ic.ref2igtype['B2Microglobulin_7phrL_human_C1'] = 'IgC1';
123695
- ic.ref2igtype['BArrestin1_4jqiA_rat_n1'] = 'IgFN3-like';
123893
+ //ic.ref2igtype['BArrestin1_4jqiA_rat_n1'] = 'IgFN3-like';
123696
123894
  ic.ref2igtype['BTLA_2aw2A_human_Iset'] = 'IgI';
123697
- ic.ref2igtype['C3_2qkiD_human_n1'] = 'IgFN3-like';
123895
+ //ic.ref2igtype['C3_2qkiD_human_n1'] = 'IgFN3-like';
123698
123896
  ic.ref2igtype['CD19_6al5A_human-n1'] = 'CD19';
123699
123897
  ic.ref2igtype['CD28_1yjdC_human_V'] = 'IgV';
123700
123898
  ic.ref2igtype['CD2_1hnfA_human_C2-n2'] = 'IgC2';
@@ -123703,12 +123901,12 @@ class Dssp {
123703
123901
  ic.ref2igtype['CD3e_6jxrf_human_C1'] = 'IgC1';
123704
123902
  ic.ref2igtype['CD3g_6jxrg_human_C2'] = 'IgC2';
123705
123903
  ic.ref2igtype['CD8a_1cd8A_human_V'] = 'IgV';
123706
- ic.ref2igtype['CoAtomerGamma1_1r4xA_human'] = 'IgE';
123904
+ //ic.ref2igtype['CoAtomerGamma1_1r4xA_human'] = 'IgE';
123707
123905
  ic.ref2igtype['Contactin1_2ee2A_human_FN3-n9'] = 'IgFN3';
123708
123906
  ic.ref2igtype['Contactin1_3s97C_human_Iset-n2'] = 'IgI';
123709
- ic.ref2igtype['CuZnSuperoxideDismutase_1hl5C_human'] = 'SOD';
123907
+ //ic.ref2igtype['CuZnSuperoxideDismutase_1hl5C_human'] = 'SOD';
123710
123908
  ic.ref2igtype['ECadherin_4zt1A_human_n2'] = 'Cadherin';
123711
- ic.ref2igtype['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'] = 'IgE';
123909
+ //ic.ref2igtype['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'] = 'IgE';
123712
123910
  ic.ref2igtype['FAB-HEAVY_5esv_C1-n2'] = 'IgC1';
123713
123911
  ic.ref2igtype['FAB-HEAVY_5esv_V-n1'] = 'IgV';
123714
123912
  ic.ref2igtype['FAB-LIGHT_5esv_C1-n2'] = 'IgC1';
@@ -123719,28 +123917,28 @@ class Dssp {
123719
123917
  ic.ref2igtype['IL6Rb_1bquB_human_FN3-n3'] = 'IgFN3';
123720
123918
  ic.ref2igtype['InsulinR_8guyE_human_FN3-n1'] = 'IgFN3';
123721
123919
  ic.ref2igtype['InsulinR_8guyE_human_FN3-n2'] = 'IgFN3';
123722
- ic.ref2igtype['IsdA_2iteA_bacteria'] = 'IgE';
123920
+ //ic.ref2igtype['IsdA_2iteA_bacteria'] = 'IgE';
123723
123921
  ic.ref2igtype['JAM1_1nbqA_human_Iset-n2'] = 'IgI';
123724
123922
  ic.ref2igtype['LAG3_7tzgD_human_C1-n2'] = 'IgC1';
123725
123923
  ic.ref2igtype['LAG3_7tzgD_human_V-n1'] = 'IgV';
123726
123924
  ic.ref2igtype['LaminAC_1ifrA_human'] = 'Lamin';
123727
123925
  ic.ref2igtype['MHCIa_7phrH_human_C1'] = 'IgC1';
123728
- ic.ref2igtype['MPT63_1lmiA_bacteria'] = 'IgFN3-like';
123729
- ic.ref2igtype['NaCaExchanger_2fwuA_dog_n2'] = 'IgFN3-like';
123730
- ic.ref2igtype['NaKATPaseTransporterBeta_2zxeB_spurdogshark'] = 'IgE';
123731
- ic.ref2igtype['ORF7a_1xakA_virus'] = 'ORF';
123926
+ //ic.ref2igtype['MPT63_1lmiA_bacteria'] = 'IgFN3-like';
123927
+ //ic.ref2igtype['NaCaExchanger_2fwuA_dog_n2'] = 'IgFN3-like';
123928
+ //ic.ref2igtype['NaKATPaseTransporterBeta_2zxeB_spurdogshark'] = 'IgE';
123929
+ //ic.ref2igtype['ORF7a_1xakA_virus'] = 'ORF';
123732
123930
  ic.ref2igtype['PD1_4zqkB_human_V'] = 'IgV';
123733
123931
  ic.ref2igtype['PDL1_4z18B_human_V-n1'] = 'IgV';
123734
123932
  ic.ref2igtype['Palladin_2dm3A_human_Iset-n1'] = 'IgI';
123735
- ic.ref2igtype['RBPJ_6py8C_human_Unk-n1'] = 'IgFN3-like';
123933
+ //ic.ref2igtype['RBPJ_6py8C_human_Unk-n1'] = 'IgFN3-like';
123736
123934
  //ic.ref2igtype['RBPJ_6py8C_human_Unk-n2'] = 'IgFN3-like';
123737
123935
  ic.ref2igtype['Sidekick2_1wf5A_human_FN3-n7'] = 'IgFN3';
123738
123936
  ic.ref2igtype['Siglec3_5j0bB_human_C1-n2'] = 'IgC1';
123739
123937
  ic.ref2igtype['TCRa_6jxrm_human_C1-n2'] = 'IgC1';
123740
123938
  ic.ref2igtype['TCRa_6jxrm_human_V-n1'] = 'IgV';
123741
- ic.ref2igtype['TEAD1_3kysC_human'] = 'IgFN3-like';
123742
- ic.ref2igtype['TP34_2o6cA_bacteria'] = 'IgE';
123743
- ic.ref2igtype['TP47_1o75A_bacteria'] = 'IgE';
123939
+ //ic.ref2igtype['TEAD1_3kysC_human'] = 'IgFN3-like';
123940
+ //ic.ref2igtype['TP34_2o6cA_bacteria'] = 'IgE';
123941
+ //ic.ref2igtype['TP47_1o75A_bacteria'] = 'IgE';
123744
123942
  ic.ref2igtype['Titin_4uowM_human_Iset-n152'] = 'IgI';
123745
123943
  ic.ref2igtype['VISTA_6oilA_human_V'] = 'IgV';
123746
123944
  ic.ref2igtype['VNAR_1t6vN_shark_V'] = 'IgV';
@@ -123821,6 +124019,7 @@ class Dssp {
123821
124019
  if(!ic.resid2domainid) ic.resid2domainid = {};
123822
124020
  //ic.resid2domainid = {};
123823
124021
  ic.domainid2pdb = {};
124022
+ if(!ic.domainid2sheetEnds) ic.domainid2sheetEnds = {}; // record the end of sheets to check for jellyRoll
123824
124023
 
123825
124024
  let bNoMoreIg = true;
123826
124025
  let bFoundDomain = false;
@@ -123860,6 +124059,15 @@ class Dssp {
123860
124059
 
123861
124060
  ic.domainid2pdb[domainid] = pdb_target;
123862
124061
 
124062
+ ic.domainid2sheetEnds[domainid] = {};
124063
+ for(let m in domainAtomsArray[k]) {
124064
+ let atom = ic.atoms[m];
124065
+ if(atom.ss == 'sheet' && atom.ssend) {
124066
+ let resid = atom.structure + '_' + atom.chain + '_' + atom.resi;
124067
+ ic.domainid2sheetEnds[domainid][resid] = 1;
124068
+ }
124069
+ }
124070
+
123863
124071
  if(!template) {
123864
124072
  for(let index = 0, indexl = dataArray.length; index < indexl; ++index) {
123865
124073
  let struct2 = ic.defaultPdbId + index;
@@ -124047,7 +124255,7 @@ class Dssp {
124047
124255
  }
124048
124256
 
124049
124257
  getTemplateList(domainid) { let ic = this.icn3d; ic.icn3dui;
124050
- let refpdbname = '', score = '', seqid = '', nresAlign = '';
124258
+ let refpdbname = '', score = '', score2 = '', seqid = '', nresAlign = '';
124051
124259
 
124052
124260
  refpdbname = ic.domainid2refpdbname[domainid][0]; // one template in round 2
124053
124261
 
@@ -124057,9 +124265,10 @@ class Dssp {
124057
124265
  score = itemArray[0];
124058
124266
  seqid = itemArray[1];
124059
124267
  nresAlign = itemArray[2];
124268
+ score2 = itemArray[3];
124060
124269
  }
124061
124270
 
124062
- return {'refpdbname': refpdbname, 'score': score, 'seqid': seqid, 'nresAlign': nresAlign};
124271
+ return {'refpdbname': refpdbname, 'score': score, 'score2': score2, 'seqid': seqid, 'nresAlign': nresAlign};
124063
124272
  }
124064
124273
 
124065
124274
  parseAlignData_part1(dataArray, domainidpairArray, bRound1) { let ic = this.icn3d, me = ic.icn3dui;
@@ -124204,7 +124413,7 @@ class Dssp {
124204
124413
 
124205
124414
  // use TM-score alone
124206
124415
  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 ;
124416
+ ic.domainid2score[domainid] = queryData[0].score + '_' + queryData[0].frac_identical + '_' + queryData[0].num_res + '_' + queryData[0].score2;
124208
124417
 
124209
124418
  if(bRound1) {
124210
124419
  ic.domainid2refpdbname[domainid] = score >= this.TMThresholdIgType ? [refpdbname] : ['all_templates'];
@@ -124384,6 +124593,7 @@ class Dssp {
124384
124593
  let result = this.getTemplateList(domainid);
124385
124594
  let refpdbname = result.refpdbname;
124386
124595
  let score = result.score;
124596
+ let score2 = result.score2;
124387
124597
  let seqid = result.seqid;
124388
124598
  let nresAlign = result.nresAlign;
124389
124599
 
@@ -124396,7 +124606,7 @@ class Dssp {
124396
124606
  }
124397
124607
 
124398
124608
  // ic.refPdbList.push(message);
124399
- ic.domainid2info[domainid] = {'refpdbname': refpdbname, 'score': score, 'seqid': seqid, 'nresAlign': nresAlign};
124609
+ ic.domainid2info[domainid] = {'refpdbname': refpdbname, 'score': score, 'score2': score2, 'seqid': seqid, 'nresAlign': nresAlign};
124400
124610
  }
124401
124611
 
124402
124612
  // adjust C' and D strands ======start
@@ -125279,6 +125489,7 @@ class Dssp {
125279
125489
  }
125280
125490
  else {
125281
125491
  let bBefore = false, bInRange= false, bAfter = false;
125492
+ /*
125282
125493
  // 100, 100A
125283
125494
  if(parseInt(currResi) == parseInt(strandArray[strandCnt].startResi) && currResi != strandArray[strandCnt].startResi) {
125284
125495
  bBefore = currResi < strandArray[strandCnt].startResi;
@@ -125294,6 +125505,14 @@ class Dssp {
125294
125505
  else {
125295
125506
  bAfter = parseInt(currResi) > parseInt(strandArray[strandCnt].endResi);
125296
125507
  }
125508
+ */
125509
+
125510
+ let currResiNcbi = ic.ParserUtilsCls.getResiNCBI(chnid, currResi);
125511
+ let startResiNcbi = ic.ParserUtilsCls.getResiNCBI(chnid, strandArray[strandCnt].startResi);
125512
+ let endResiNcbi = ic.ParserUtilsCls.getResiNCBI(chnid, strandArray[strandCnt].endResi);
125513
+
125514
+ bBefore = parseInt(currResiNcbi) < parseInt(startResiNcbi);
125515
+ bAfter = parseInt(currResiNcbi) > parseInt(endResiNcbi);
125297
125516
 
125298
125517
  bInRange = (!bBefore && !bAfter) ? true : false;
125299
125518
 
@@ -125746,7 +125965,7 @@ console.log("free energy: " + energy + " kcal/mol");
125746
125965
  me.alertAlt = true;
125747
125966
 
125748
125967
  //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.');
125968
+ var aaa = 1; //alert('Please press the letter "a" or SHIFT + "a" to alternate between wild type and mutant.');
125750
125969
  }
125751
125970
  }
125752
125971
 
@@ -131112,8 +131331,9 @@ class ShareLink {
131112
131331
  }
131113
131332
 
131114
131333
  let paraHash = {};
131115
- for(let key in ic.cfg) {
131116
- let value = ic.cfg[key];
131334
+ /*
131335
+ for(let key in me.cfg) {
131336
+ let value = me.cfg[key];
131117
131337
  //if(key === 'inpara' || ic.key === 'command' || value === undefined) continue;
131118
131338
  if(key === 'inpara' || key === 'command' || key === 'usepdbnum'
131119
131339
  || key === 'date' || key === 'v' || value === undefined) continue;
@@ -131163,7 +131383,7 @@ class ShareLink {
131163
131383
  paraHash[key] = value;
131164
131384
  }
131165
131385
  }
131166
-
131386
+ */
131167
131387
  if(ic.bAfMem) {
131168
131388
  paraHash['afmem'] = 'on';
131169
131389
  }
@@ -131185,6 +131405,12 @@ class ShareLink {
131185
131405
  if(key_value.length == 2) paraHash[key_value[0]] = key_value[1];
131186
131406
  }
131187
131407
 
131408
+ // BLAST RID is usually added at the end of the URL. It should be included.
131409
+ if(me.cfg.rid && !paraHash['RID']) {
131410
+ url += 'RID=' + me.cfg.rid + '&';
131411
+ }
131412
+
131413
+ // sometimes idname is not part of the URL
131188
131414
  if(me.cfg.idname && !paraHash[me.cfg.idname]) { // somehow it is not included
131189
131415
  url += me.cfg.idname + '=' + me.cfg.idvalue + '&';
131190
131416
  }
@@ -134298,7 +134524,7 @@ class iCn3DUI {
134298
134524
  //even when multiple iCn3D viewers are shown together.
134299
134525
  this.pre = this.cfg.divid + "_";
134300
134526
 
134301
- this.REVISION = '3.47.0';
134527
+ this.REVISION = '3.48.0';
134302
134528
 
134303
134529
  // In nodejs, iCn3D defines "window = {navigator: {}}", and added window = {navigator: {}, "__THREE__":"177"}
134304
134530
  this.bNode = (Object.keys(window).length < 3) ? true : false;
@@ -134500,14 +134726,8 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
134500
134726
  let domainidArray = me.cfg.matchedchains.split(',');
134501
134727
  let chainidArray = [];
134502
134728
  for(let i = 0, il = domainidArray.length; i < il; ++i) {
134503
- let pos = domainidArray[i].lastIndexOf('_');
134504
- let lastId = domainidArray[i].substr(pos + 1);
134505
- if(!isNaN(lastId)) { // lastId is domain id
134506
- chainidArray.push(domainidArray[i].substr(0, pos));
134507
- }
134508
- else {
134509
- chainidArray.push(domainidArray[i]);
134510
- }
134729
+ let idArray = domainidArray[i].split('_');
134730
+ chainidArray.push(idArray[0] + '_' + idArray[1]);
134511
134731
  }
134512
134732
 
134513
134733
  // get the matched structures, do not include the template
@@ -134736,6 +134956,9 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
134736
134956
  if(me.cfg.align.indexOf('185055,') != -1) {
134737
134957
  me.cfg.align = me.cfg.align.replace('185055,', '199731,'); //the mmdbid of PDB 6M17 was changed from 185055 to 199731
134738
134958
  }
134959
+ else if(me.cfg.align == '54567,1,12161,1,2,1') {
134960
+ me.cfg.align = '3HHR,1BQU'; // somehow the VAST+ data for this published alignment were not there anymore
134961
+ }
134739
134962
 
134740
134963
  let alignArray = me.cfg.align.split(','); // e.g., 6 IDs: 103701,1,4,68563,1,167 [mmdbid1,biounit,molecule,mmdbid2,biounit,molecule], or 2IDs: 103701,68563 [mmdbid1,mmdbid2]
134741
134964