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.module.js CHANGED
@@ -55216,6 +55216,11 @@ class UtilsCls {
55216
55216
  // from iview (http://istar.cse.cuhk.edu.hk/iview/)
55217
55217
  //Determine whether atom1 and atom2 have covalent bond.
55218
55218
  hasCovalentBond(atom0, atom1) { let me = this.icn3dui;
55219
+ // no bonds between metals
55220
+ if($.inArray(atom0.elem, me.parasCls.ionsArray) !== -1 && $.inArray(atom1.elem, me.parasCls.ionsArray) !== -1) {
55221
+ return false;
55222
+ }
55223
+
55219
55224
  let r = me.parasCls.covalentRadii[atom0.elem.toUpperCase()] + me.parasCls.covalentRadii[atom1.elem.toUpperCase()];
55220
55225
 
55221
55226
  //return atom0.coord.distanceToSquared(atom1.coord) < 1.3 * r * r;
@@ -55782,6 +55787,7 @@ class ParasCls {
55782
55787
  this.backgroundColors = {
55783
55788
  'black': this.thr(0x000000),
55784
55789
  'grey': this.thr(0xCCCCCC),
55790
+ 'gray': this.thr(0xCCCCCC),
55785
55791
  'white': this.thr(0xFFFFFF),
55786
55792
  'transparent': this.thr(0xFFFFFF) //this.thr(0x000000)
55787
55793
  };
@@ -61816,6 +61822,7 @@ class Dialog {
61816
61822
  let bLineGraph = $('#' + me.pre + 'dl_linegraph').hasClass('ui-dialog-content'); // initialized
61817
61823
  let bScatterplot = $('#' + me.pre + 'dl_scatterplot').hasClass('ui-dialog-content'); // initialized
61818
61824
  let bRmsdplot = $('#' + me.pre + 'dl_rmsdplot').hasClass('ui-dialog-content'); // initialized
61825
+ let bHbondplot = $('#' + me.pre + 'dl_hbondplot').hasClass('ui-dialog-content'); // initialized
61819
61826
  let bLigplot = $('#' + me.pre + 'dl_ligplot').hasClass('ui-dialog-content'); // initialized
61820
61827
  let bContactmap = $('#' + me.pre + 'dl_contactmap').hasClass('ui-dialog-content'); // initialized
61821
61828
  let bAlignerrormap = $('#' + me.pre + 'dl_alignerrormap').hasClass('ui-dialog-content'); // initialized
@@ -61827,13 +61834,14 @@ class Dialog {
61827
61834
 
61828
61835
  status.bSelectannotationsInit2 = false, status.bGraph2 = false, status.bLineGraph2 = false;
61829
61836
  status.bScatterplot2 = false, status.bLigplot2 = false, status.bTable2 = false, status.bAlignmentInit2 = false;
61830
- status.bTwoddgmInit2 = false, status.bTwodctnInit2 = false, status.bSetsInit2 = false;
61837
+ status.bTwoddgmInit2 = false, status.bTwodctnInit2 = false, status.bSetsInit2 = false, status.bHbondplot2 = false;
61831
61838
 
61832
61839
  id2flag.dl_selectannotations = 'bSelectannotationsInit2';
61833
61840
  id2flag.dl_graph = 'bGraph2';
61834
61841
  id2flag.dl_linegraph = 'bLineGraph2';
61835
61842
  id2flag.dl_scatterplot = 'bScatterplot2';
61836
61843
  id2flag.dl_rmsdplot = 'bRmsdplot2';
61844
+ id2flag.dl_hbondplot = 'bHbondplot2';
61837
61845
  id2flag.dl_ligplot = 'bLigplot2';
61838
61846
  id2flag.dl_contactmap = 'bContactmap2';
61839
61847
  id2flag.dl_alignerrormap = 'bAlignerrormap2';
@@ -61848,6 +61856,7 @@ class Dialog {
61848
61856
  if(bLineGraph) status.bLineGraph2 = $('#' + me.pre + 'dl_linegraph').dialog( 'isOpen' );
61849
61857
  if(bScatterplot) status.bScatterplot2 = $('#' + me.pre + 'dl_scatterplot').dialog( 'isOpen' );
61850
61858
  if(bRmsdplot) status.bRmsdplot2 = $('#' + me.pre + 'dl_rmsdplot').dialog( 'isOpen' );
61859
+ if(bHbondplot) status.bHbondplot2 = $('#' + me.pre + 'dl_hbondplot').dialog( 'isOpen' );
61851
61860
  if(bLigplot) status.bLigplot2 = $('#' + me.pre + 'dl_ligplot').dialog( 'isOpen' );
61852
61861
  if(bContactmap) status.bContactmap2 = $('#' + me.pre + 'dl_contactmap').dialog( 'isOpen' );
61853
61862
  if(bAlignerrormap) status.bAlignerror2 = $('#' + me.pre + 'dl_alignerrormap').dialog( 'isOpen' );
@@ -62008,7 +62017,7 @@ class Dialog {
62008
62017
  close: function(e) {
62009
62018
  let status = thisClass.getDialogStatus().status;
62010
62019
 
62011
- if((!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bTable2) &&(!status.bAlignmentInit2) ) {
62020
+ if((!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bHbondplot2) &&(!status.bLigplot2) &&(!status.bTable2) &&(!status.bAlignmentInit2) ) {
62012
62021
  //ic.resizeCanvasCls.resizeCanvas(me.htmlCls.WIDTH - me.htmlCls.LESSWIDTH, me.htmlCls.HEIGHT - me.htmlCls.LESSHEIGHT - me.htmlCls.EXTRAHEIGHT, true);
62013
62022
  ic.resizeCanvasCls.resizeCanvas(me.htmlCls.WIDTH, me.htmlCls.HEIGHT, true);
62014
62023
  }
@@ -62037,7 +62046,7 @@ class Dialog {
62037
62046
 
62038
62047
  let status = this.getDialogStatus().status;
62039
62048
 
62040
- 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') {
62049
+ 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') {
62041
62050
  //var dialogWidth = 0.5 *(me.htmlCls.WIDTH - me.htmlCls.LESSWIDTH) - twoddgmWidth * 0.5;
62042
62051
  let dialogWidth = 0.5 *(me.htmlCls.WIDTH) - twoddgmWidth * 0.5;
62043
62052
 
@@ -62073,15 +62082,16 @@ class Dialog {
62073
62082
  modal: false,
62074
62083
  position: position,
62075
62084
  close: function(e) {
62076
- if((id === me.pre + 'dl_selectannotations' &&(!status.bAlignmentInit2) &&(!status.bGraph2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2))
62077
- ||(id === me.pre + 'dl_graph' &&(!status.bSelectannotationsInit2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2))
62078
- ||(id === me.pre + 'dl_alignment' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2))
62079
- ||(id === me.pre + 'dl_interactionsorted' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2))
62080
- ||(id === me.pre + 'dl_linegraph' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2))
62081
- ||(id === me.pre + 'dl_scatterplot' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2))
62082
- ||(id === me.pre + 'dl_ligplot' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2))
62083
- ||(id === me.pre + 'dl_contactmap' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bAlignerrormap2))
62084
- ||(id === me.pre + 'dl_alignerrormap' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2))
62085
+ if((id === me.pre + 'dl_selectannotations' &&(!status.bAlignmentInit2) &&(!status.bGraph2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2))
62086
+ ||(id === me.pre + 'dl_graph' &&(!status.bSelectannotationsInit2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2))
62087
+ ||(id === me.pre + 'dl_alignment' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2))
62088
+ ||(id === me.pre + 'dl_interactionsorted' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2))
62089
+ ||(id === me.pre + 'dl_linegraph' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2))
62090
+ ||(id === me.pre + 'dl_scatterplot' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2))
62091
+ ||(id === me.pre + 'dl_ligplot' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2))
62092
+ ||(id === me.pre + 'dl_contactmap' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bAlignerrormap2) &&(!status.bHbondplot2))
62093
+ ||(id === me.pre + 'dl_alignerrormap' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bHbondplot2))
62094
+ ||(id === me.pre + 'dl_hbondplot' &&(!status.bSelectannotationsInit2) &&(!status.bGraph2) &&(!status.bAlignmentInit2) &&(!status.bTable2) &&(!status.bLineGraph2) &&(!status.bScatterplot2) &&(!status.bLigplot2) &&(!status.bContactmap2) &&(!status.bAlignerrormap2))
62085
62095
  ) {
62086
62096
  if(status.bTwoddgmInit2 || status.bTwodctnInit2 || status.bSetsInit2) {
62087
62097
  let canvasWidth = me.utilsCls.isMobile() ? me.htmlCls.WIDTH : me.htmlCls.WIDTH - twoddgmWidth;
@@ -62144,7 +62154,7 @@ class Dialog {
62144
62154
 
62145
62155
  //if(me.htmlCls.WIDTH - me.htmlCls.LESSWIDTH >= me.htmlCls.HEIGHT - me.htmlCls.LESSHEIGHT - me.htmlCls.EXTRAHEIGHT) {
62146
62156
  if(me.htmlCls.WIDTH >= me.htmlCls.HEIGHT) {
62147
- if(status.bSelectannotationsInit2 || status.bGraph2 || status.bLineGraph2 || status.bScatterplot2 || status.bLigplot2 || status.bTable2 || status.bAlignmentInit2) {
62157
+ if(status.bSelectannotationsInit2 || status.bGraph2 || status.bLineGraph2 || status.bScatterplot2 || status.bHbondplot2 || status.bLigplot2 || status.bTable2 || status.bAlignmentInit2) {
62148
62158
  //tmpWidth = 0.5 *(me.htmlCls.WIDTH - me.htmlCls.LESSWIDTH) - twoddgmWidth * 0.5;
62149
62159
  tmpWidth = 0.5 *(me.htmlCls.WIDTH) - twoddgmWidth * 0.5;
62150
62160
  }
@@ -62183,7 +62193,7 @@ class Dialog {
62183
62193
 
62184
62194
  //if(me.htmlCls.WIDTH - me.htmlCls.LESSWIDTH >= me.htmlCls.HEIGHT - me.htmlCls.LESSHEIGHT - me.htmlCls.EXTRAHEIGHT) {
62185
62195
  if(me.htmlCls.WIDTH >= me.htmlCls.HEIGHT) {
62186
- if(status.bSelectannotationsInit2 || status.bGraph2 || status.bLineGraph2 || status.bScatterplot2 || status.bLigplot2 || status.bTable2 || status.bAlignmentInit2) {
62196
+ if(status.bSelectannotationsInit2 || status.bGraph2 || status.bLineGraph2 || status.bScatterplot2 || status.bHbondplot2 || status.bLigplot2 || status.bTable2 || status.bAlignmentInit2) {
62187
62197
  //tmpWidth = 0.5 *(me.htmlCls.WIDTH - me.htmlCls.LESSWIDTH) - twoddgmWidth * 0.5;
62188
62198
  tmpWidth = 0.5 *(me.htmlCls.WIDTH) - twoddgmWidth * 0.5;
62189
62199
  }
@@ -62263,7 +62273,7 @@ class Dialog {
62263
62273
  let width = 400, height = 150;
62264
62274
  let twoddgmWidth = me.htmlCls.width2d + 20;
62265
62275
 
62266
- 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') {
62276
+ 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') {
62267
62277
  $( "#" + id ).show();
62268
62278
  $( "#" + id + "_nb").show();
62269
62279
  $( "#" + id + "_title").html(title);
@@ -62699,7 +62709,7 @@ class SetDialog {
62699
62709
  html += "Step 1. <b>PDB File</b>: " + me.htmlCls.inputFileStr + "id='" + me.pre + "dcdpdbfile' size=8> ";
62700
62710
  html += me.htmlCls.buttonStr + "reload_dcdpdbfile'>Load PDB File</button><br><br>";
62701
62711
 
62702
- 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>";
62712
+ 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>";
62703
62713
 
62704
62714
  html += "Step 3. <b>DCD File</b>: " + me.htmlCls.inputFileStr + "id='" + me.pre + "dcdfile' size=8> ";
62705
62715
  html += me.htmlCls.buttonStr + "reload_dcdfile'>Load DCD File</button><br>";
@@ -62708,9 +62718,9 @@ class SetDialog {
62708
62718
  html += me.htmlCls.buttonStr + "reload_xtcfile' style='margin-left:28px'>Load XTC File</button><br><br>";
62709
62719
 
62710
62720
  html += "<hr><br>";
62711
- html += "<b>Analysis</b>: " + me.htmlCls.buttonStr + "rmsd_plot'>RMSD Plot</button><br><br>";
62721
+ 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>";
62712
62722
 
62713
- 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>";
62723
+ 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>";
62714
62724
 
62715
62725
  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>";
62716
62726
 
@@ -63256,6 +63266,17 @@ class SetDialog {
63256
63266
 
63257
63267
  html += "</div>";
63258
63268
 
63269
+
63270
+ html += me.htmlCls.divStr + "dl_hbondplot' style='background-color:white' class='" + dialogClass + "'>";
63271
+ html += this.addNotebookTitle('dl_hbondplot', 'H-bond Plot');
63272
+
63273
+ me.hbondplotid = me.pre + 'hbondplot';
63274
+ html += me.htmlCls.divNowrapStr + buttonStrTmp + me.hbondplotid + '_json">JSON</button>' + me.htmlCls.space2 + " The image below can be saved via right click.<br></div>";
63275
+ html += '<canvas id="' + me.hbondplotid + '"></canvas>';
63276
+
63277
+ html += "</div>";
63278
+
63279
+
63259
63280
  html += me.htmlCls.divStr + "dl_ligplot' style='background-color:white' class='" + dialogClass + "'>";
63260
63281
 
63261
63282
  if(me.cfg.cid !== undefined || me.cfg.smiles !== undefined) {
@@ -63973,20 +63994,20 @@ class SetDialog {
63973
63994
  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'];
63974
63995
  group2tpl['IgC2'] = ['CD2_1hnfA_human_C2-n2', 'CD3g_6jxrg_human_C2'];
63975
63996
  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'];
63976
- group2tpl['IgE'] = ['CoAtomerGamma1_1r4xA_human', 'Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4', 'IsdA_2iteA_bacteria', 'NaKATPaseTransporterBeta_2zxeB_spurdogshark', 'TP34_2o6cA_bacteria', 'TP47_1o75A_bacteria'];
63997
+ //group2tpl['IgE'] = ['CoAtomerGamma1_1r4xA_human', 'Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4', 'IsdA_2iteA_bacteria', 'NaKATPaseTransporterBeta_2zxeB_spurdogshark', 'TP34_2o6cA_bacteria', 'TP47_1o75A_bacteria'];
63977
63998
 
63978
63999
  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'];
63979
64000
 
63980
- 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'];
64001
+ //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'];
63981
64002
 
63982
- 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'];
64003
+ group2tpl['Other Ig'] = ['CD19_6al5A_human-n1', 'ECadherin_4zt1A_human_n2', 'LaminAC_1ifrA_human'];
63983
64004
 
63984
64005
  let tpl2strandsig = {};
63985
- tpl2strandsig['ASF1A_2iijA_human'] = "A A' B C C' E F G G+";
64006
+ //tpl2strandsig['ASF1A_2iijA_human'] = "A A' B C C' E F G G+";
63986
64007
  tpl2strandsig['B2Microglobulin_7phrL_human_C1'] = "A B C C' D E F G";
63987
- tpl2strandsig['BArrestin1_4jqiA_rat_n1'] = "A- A A' B C C' E F G";
64008
+ //tpl2strandsig['BArrestin1_4jqiA_rat_n1'] = "A- A A' B C C' E F G";
63988
64009
  tpl2strandsig['BTLA_2aw2A_human_Iset'] = "A A' B C C' D E F G";
63989
- tpl2strandsig['C3_2qkiD_human_n1'] = "A A' B C C' E F G";
64010
+ //tpl2strandsig['C3_2qkiD_human_n1'] = "A A' B C C' E F G";
63990
64011
  tpl2strandsig['CD19_6al5A_human-n1'] = "A' B C C' D E F G";
63991
64012
  tpl2strandsig['CD28_1yjdC_human_V'] = "A A' B C C' C'' D E F G";
63992
64013
  tpl2strandsig['CD2_1hnfA_human_C2-n2'] = "A B C C' E F G";
@@ -63995,12 +64016,12 @@ class SetDialog {
63995
64016
  tpl2strandsig['CD3e_6jxrf_human_C1'] = "A B C C' D E F G";
63996
64017
  tpl2strandsig['CD3g_6jxrg_human_C2'] = "A B C C' E F G G+";
63997
64018
  tpl2strandsig['CD8a_1cd8A_human_V'] = "A A' B C C' C'' D E F G";
63998
- tpl2strandsig['CoAtomerGamma1_1r4xA_human'] = "A- A B C D E F G";
64019
+ //tpl2strandsig['CoAtomerGamma1_1r4xA_human'] = "A- A B C D E F G";
63999
64020
  tpl2strandsig['Contactin1_2ee2A_human_FN3-n9'] = "A A' B C C' E F G";
64000
64021
  tpl2strandsig['Contactin1_3s97C_human_Iset-n2'] = "A A' B C D E F G";
64001
- tpl2strandsig['CuZnSuperoxideDismutase_1hl5C_human'] = "A- A B C C' E F G";
64022
+ //tpl2strandsig['CuZnSuperoxideDismutase_1hl5C_human'] = "A- A B C C' E F G";
64002
64023
  tpl2strandsig['ECadherin_4zt1A_human_n2'] = "A' B C D E F G";
64003
- tpl2strandsig['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'] = "A--- A-- A- A B C C' C'' D E F G";
64024
+ //tpl2strandsig['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'] = "A--- A-- A- A B C C' C'' D E F G";
64004
64025
  tpl2strandsig['FAB-HEAVY_5esv_C1-n2'] = "A B C D E F G";
64005
64026
  tpl2strandsig['FAB-HEAVY_5esv_V-n1'] = "A B C C' C'' D E F G";
64006
64027
  tpl2strandsig['FAB-LIGHT_5esv_C1-n2'] = "A B C C' D E F G";
@@ -64011,28 +64032,28 @@ class SetDialog {
64011
64032
  tpl2strandsig['IL6Rb_1bquB_human_FN3-n3'] = "A B C C' E F G";
64012
64033
  tpl2strandsig['InsulinR_8guyE_human_FN3-n1'] = "A B C C' E F G";
64013
64034
  tpl2strandsig['InsulinR_8guyE_human_FN3-n2'] = "A B C C' E F G";
64014
- tpl2strandsig['IsdA_2iteA_bacteria'] = "A- A B C C' D E F G";
64035
+ //tpl2strandsig['IsdA_2iteA_bacteria'] = "A- A B C C' D E F G";
64015
64036
  tpl2strandsig['JAM1_1nbqA_human_Iset-n2'] = "A A' B C C' D E F G";
64016
64037
  tpl2strandsig['LAG3_7tzgD_human_C1-n2'] = "A A' B C C' D E F G";
64017
64038
  tpl2strandsig['LAG3_7tzgD_human_V-n1'] = "A' B C C' D E F G";
64018
64039
  tpl2strandsig['LaminAC_1ifrA_human'] = "A- A B C C' E E+ F G";
64019
64040
  tpl2strandsig['MHCIa_7phrH_human_C1'] = "A B C C' D E F G";
64020
- tpl2strandsig['MPT63_1lmiA_bacteria'] = "A-- A- A BC C' E F G";
64021
- tpl2strandsig['NaCaExchanger_2fwuA_dog_n2'] = "A A' B C C' E F G";
64022
- tpl2strandsig['NaKATPaseTransporterBeta_2zxeB_spurdogshark']= "A A' B C D E F G";
64023
- tpl2strandsig['ORF7a_1xakA_virus'] = "A' B C D E F G";
64041
+ //tpl2strandsig['MPT63_1lmiA_bacteria'] = "A-- A- A BC C' E F G";
64042
+ //tpl2strandsig['NaCaExchanger_2fwuA_dog_n2'] = "A A' B C C' E F G";
64043
+ //tpl2strandsig['NaKATPaseTransporterBeta_2zxeB_spurdogshark']= "A A' B C D E F G";
64044
+ //tpl2strandsig['ORF7a_1xakA_virus'] = "A' B C D E F G";
64024
64045
  tpl2strandsig['PD1_4zqkB_human_V'] = "A A' B C C' D E F G";
64025
64046
  tpl2strandsig['PDL1_4z18B_human_V-n1'] = "A A' B C C' C'' D E F G";
64026
64047
  tpl2strandsig['Palladin_2dm3A_human_Iset-n1'] = "A A' B C C' D E F G";
64027
- tpl2strandsig['RBPJ_6py8C_human_Unk-n1'] = "A A' B C C' E F G";
64028
- tpl2strandsig['RBPJ_6py8C_human_Unk-n2'] = "A B C D E F G";
64048
+ //tpl2strandsig['RBPJ_6py8C_human_Unk-n1'] = "A A' B C C' E F G";
64049
+ //tpl2strandsig['RBPJ_6py8C_human_Unk-n2'] = "A B C D E F G";
64029
64050
  tpl2strandsig['Sidekick2_1wf5A_human_FN3-n7'] = "A B C C' E F G";
64030
64051
  tpl2strandsig['Siglec3_5j0bB_human_C1-n2'] = "A A' B C D E F G";
64031
64052
  tpl2strandsig['TCRa_6jxrm_human_C1-n2'] = "A B C D E F G";
64032
64053
  tpl2strandsig['TCRa_6jxrm_human_V-n1'] = "A A' B C C' C'' D E F G";
64033
- tpl2strandsig['TEAD1_3kysC_human'] = "A A+ A' B C C' E F G G+";
64034
- tpl2strandsig['TP34_2o6cA_bacteria'] = "A- A B C C' D E F G";
64035
- tpl2strandsig['TP47_1o75A_bacteria'] = "A B C C' D E F G";
64054
+ //tpl2strandsig['TEAD1_3kysC_human'] = "A A+ A' B C C' E F G G+";
64055
+ //tpl2strandsig['TP34_2o6cA_bacteria'] = "A- A B C C' D E F G";
64056
+ //tpl2strandsig['TP47_1o75A_bacteria'] = "A B C C' D E F G";
64036
64057
  tpl2strandsig['Titin_4uowM_human_Iset-n152'] = "A A' B C C' D E F G";
64037
64058
  tpl2strandsig['VISTA_6oilA_human_V'] = "A A' B C C' C'' D E F G G+";
64038
64059
  tpl2strandsig['VNAR_1t6vN_shark_V'] = "A A' B C C' D E F G";
@@ -66607,7 +66628,13 @@ class Events {
66607
66628
  me.myEventCls.onIds("#" + me.pre + "rmsd_plot", "click", async function(e) { let ic = me.icn3d;
66608
66629
  e.preventDefault();
66609
66630
 
66610
- await ic.dcdParserCls.showRmsdPlot();
66631
+ await ic.dcdParserCls.showRmsdHbondPlot();
66632
+ });
66633
+ me.myEventCls.onIds("#" + me.pre + "hbond_plot", "click", async function(e) { let ic = me.icn3d;
66634
+ e.preventDefault();
66635
+ let bHbondPlot = true;
66636
+
66637
+ await ic.dcdParserCls.showRmsdHbondPlot(bHbondPlot);
66611
66638
  });
66612
66639
  me.myEventCls.onIds("#" + me.pre + "hbondLineGraph", "click", async function(e) { let ic = me.icn3d;
66613
66640
  e.preventDefault();
@@ -66760,6 +66787,12 @@ class Events {
66760
66787
  ic.saveFileCls.saveFile(ic.inputid + "_rmsdplot.json", "text", [JSON.stringify(ic.mdDataSet)]);
66761
66788
  });
66762
66789
 
66790
+ me.myEventCls.onIds("#" + me.hbondplotid + "_json", "click", function(e) { let ic = me.icn3d;
66791
+ e.preventDefault();
66792
+
66793
+ ic.saveFileCls.saveFile(ic.inputid + "_hbondplot.json", "text", [JSON.stringify(ic.mdDataSet)]);
66794
+ });
66795
+
66763
66796
  me.myEventCls.onIds("#" + me.ligplotid + "_svg", "click", function(e) { let ic = me.icn3d;
66764
66797
  e.preventDefault();
66765
66798
 
@@ -68146,6 +68179,7 @@ class SetHtml {
68146
68179
  let prtribbonwidth =(type == '3dprint') ? '2' : '1.3';
68147
68180
  let nucleotideribbonwidth =(type == '3dprint') ? '1.4' : '0.8';
68148
68181
 
68182
+ let bkgdcolor = 'black';
68149
68183
  let shininess = 40;
68150
68184
  let light1 = 2;
68151
68185
  let light2 = 1;
@@ -68156,6 +68190,13 @@ class SetHtml {
68156
68190
 
68157
68191
  // retrieve from cache
68158
68192
  if(type == 'style') {
68193
+ if(this.getCookie('bkgdcolor') != '') {
68194
+ bkgdcolor = this.getCookie('bkgdcolor').toLowerCase();
68195
+ if(bkgdcolor != 'transparent' && bkgdcolor != 'white' && bkgdcolor != 'black' && bkgdcolor != 'gray' && bkgdcolor != 'grey') {
68196
+ bkgdcolor = 'black';
68197
+ }
68198
+ }
68199
+
68159
68200
  if(this.getCookie('shininess') != '') {
68160
68201
  shininess = parseFloat(this.getCookie('shininess'));
68161
68202
  }
@@ -68193,12 +68234,13 @@ class SetHtml {
68193
68234
 
68194
68235
  html += "<b>Note</b>: The following parameters will be saved in cache. You just need to set them once. <br><br>";
68195
68236
 
68196
- 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/>";
68197
- html += "<b>2. Three directional lights</b>: <br>";
68237
+ 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/>";
68238
+ 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/>";
68239
+ html += "<b>3. Three directional lights</b>: <br>";
68198
68240
  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/>";
68199
68241
  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/>";
68200
68242
  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/>";
68201
- html += "<b>3. Thickness</b>: <br>";
68243
+ html += "<b>4. Thickness</b>: <br>";
68202
68244
  }
68203
68245
 
68204
68246
  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/>";
@@ -68214,11 +68256,11 @@ class SetHtml {
68214
68256
  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/>";
68215
68257
 
68216
68258
  if(type == 'style') {
68217
- 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/>";
68259
+ 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/>";
68218
68260
 
68219
- 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/>";
68261
+ 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/>";
68220
68262
 
68221
- 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/>";
68263
+ 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/>";
68222
68264
  }
68223
68265
 
68224
68266
  html += me.htmlCls.spanNowrapStr + "" + me.htmlCls.buttonStr + "apply_thickness_" + type + "'>Apply</button></span>&nbsp;&nbsp;&nbsp;";
@@ -68834,6 +68876,7 @@ class SetHtml {
68834
68876
 
68835
68877
  if(postfix == 'style') {
68836
68878
  if(bReset) {
68879
+ $("#" + me.pre + "bkgdcolor").val('black');
68837
68880
  $("#" + me.pre + "shininess").val('40');
68838
68881
  $("#" + me.pre + "light1").val('2');
68839
68882
  $("#" + me.pre + "light2").val('1');
@@ -68843,6 +68886,12 @@ class SetHtml {
68843
68886
  $("#" + me.pre + "cmdwindow").val('0');
68844
68887
  }
68845
68888
 
68889
+ ic.bkgdcolor = $("#" + me.pre + "bkgdcolor").val(); //black
68890
+ if(ic.bkgdcolor != 'transparent' && ic.bkgdcolor != 'white' && ic.bkgdcolor != 'black' && ic.bkgdcolor != 'gray' && ic.bkgdcolor != 'grey') {
68891
+ ic.bkgdcolor = 'black';
68892
+ }
68893
+ ic.opts['background'] = ic.bkgdcolor;
68894
+
68846
68895
  ic.shininess = parseFloat($("#" + me.pre + "shininess").val()); //40;
68847
68896
  ic.light1 = parseFloat($("#" + me.pre + "light1").val()); //0.6;
68848
68897
  ic.light2 = parseFloat($("#" + me.pre + "light2").val()); //0.4;
@@ -68877,6 +68926,7 @@ class SetHtml {
68877
68926
  // save to cache
68878
68927
  if(!me.bNode) { // && postfix == 'style') {
68879
68928
  let exdays = 3650; // 10 years
68929
+ this.setCookie('bkgdcolor', ic.bkgdcolor, exdays);
68880
68930
  this.setCookie('shininess', ic.shininess, exdays);
68881
68931
  this.setCookie('light1', ic.light1, exdays);
68882
68932
  this.setCookie('light2', ic.light2, exdays);
@@ -75369,7 +75419,7 @@ class Scene {
75369
75419
  if(ic.opts['slab'] === 'yes') ic.cameraCls.setSlab();
75370
75420
 
75371
75421
  // if(!ic.bSetVrArButtons) { // call once
75372
- if(!me.cfg.imageonly) this.setVrArButtons();
75422
+ if(!me.cfg.imageonly && ( 'xr' in navigator )) this.setVrArButtons();
75373
75423
  // }
75374
75424
 
75375
75425
  // if((ic.bVr || ic.bAr) && !ic.bSetVrAr) { // call once
@@ -75441,6 +75491,17 @@ class Scene {
75441
75491
  }
75442
75492
 
75443
75493
  // get parameters from cookies
75494
+ if(me.htmlCls.setHtmlCls.getCookie('bkgdcolor') != '') {
75495
+ let bkgdcolor = me.htmlCls.setHtmlCls.getCookie('bkgdcolor');
75496
+
75497
+ if(ic.bkgdcolor != bkgdcolor) {
75498
+ me.htmlCls.clickMenuCls.setLogCmd('set background ' + bkgdcolor, true);
75499
+ }
75500
+
75501
+ ic.bkgdcolor = bkgdcolor;
75502
+ ic.opts['background'] = ic.bkgdcolor;
75503
+ }
75504
+
75444
75505
  if(me.htmlCls.setHtmlCls.getCookie('shininess') != '') {
75445
75506
  let shininess = parseFloat(me.htmlCls.setHtmlCls.getCookie('shininess'));
75446
75507
 
@@ -84813,7 +84874,7 @@ class ApplyMissingRes {
84813
84874
  line.serial1 = ic.missingResResid2serial[resid0 + ',' + resid1];
84814
84875
  line.serial2 = ic.missingResResid2serial[resid1 + ',' + resid0];
84815
84876
 
84816
- line.color = "#" + ic.atoms[line.serial1].color.getHexString();
84877
+ line.color = (ic.atoms[line.serial1]) ? "#" + ic.atoms[line.serial1].color.getHexString() : undefined;
84817
84878
 
84818
84879
  line.radius = ic.coilWidth;
84819
84880
 
@@ -86512,7 +86573,7 @@ class Impostor {
86512
86573
 
86513
86574
  setParametersForShader (opacity) { let ic = this.icn3d, me = ic.icn3dui;
86514
86575
  let background = me.parasCls.backgroundColors[ic.opts.background.toLowerCase()];
86515
- //if(!background) background = me.parasCls.thr(0x000000);
86576
+ if(!background) background = me.parasCls.thr(0x000000);
86516
86577
 
86517
86578
  let near = 2.5*ic.maxD;
86518
86579
  let far = 4*ic.maxD;
@@ -92759,10 +92820,29 @@ class AnnoIg {
92759
92820
  if(!info) continue;
92760
92821
 
92761
92822
  let tmscore = info.score;
92823
+ info.score2;
92762
92824
 
92763
92825
  let igType = (parseFloat(tmscore) < ic.refnumCls.TMThresholdIgType ) ? 'Ig' : ic.ref2igtype[info.refpdbname];
92826
+ let deltaTmscoreStr = '';
92827
+ /*
92828
+ // check how many sheets are matched to decide if it is a jelly roll
92829
+ let matchedSheetCnt = 0, totalSheetCnt = 0;
92830
+ for(let resid in ic.domainid2sheetEnds[domainid]) {
92831
+ if(ic.resid2refnum[resid] && !ic.residIgLoop.hasOwnProperty(resid)) { // assigned and not loop
92832
+ ++matchedSheetCnt;
92833
+ }
92834
+ ++totalSheetCnt;
92835
+ }
92836
+ let notMatchedSheetCnt = totalSheetCnt - matchedSheetCnt;
92837
+
92838
+ if(tmscore - tmscore2 > 0.1 && notMatchedSheetCnt >= 4) {
92839
+ igType = 'Jelly roll';
92840
+ deltaTmscoreStr = ', ' + notMatchedSheetCnt + ' sheets not assigned';
92841
+ }
92842
+ */
92843
+
92764
92844
  titleArray.push(igType + ' (TM:' + parseFloat(tmscore).toFixed(2) + ')');
92765
- 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());
92845
+ 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());
92766
92846
 
92767
92847
  domainArray.push(igType);
92768
92848
 
@@ -100251,7 +100331,7 @@ class HlUpdate {
100251
100331
  if(ic.mmdbid_q !== undefined && ic.mmdbid_q === ic.mmdbid_t) {
100252
100332
  html2ddgm += ic.diagram2dCls.draw2Ddgm(ic.interactionData2, ic.mmdbidArray[0].toUpperCase(), 1, true);
100253
100333
  }
100254
- else {
100334
+ else if(ic.mmdbidArray.length > 1) {
100255
100335
  html2ddgm += ic.diagram2dCls.draw2Ddgm(ic.interactionData2, ic.mmdbidArray[1].toUpperCase(), 1, true);
100256
100336
  }
100257
100337
  html2ddgm += ic.diagram2dCls.set2DdgmNote(true);
@@ -100535,6 +100615,8 @@ class HlUpdate {
100535
100615
  }
100536
100616
 
100537
100617
  hlSeqInChain(chainid) { let ic = this.icn3d; ic.icn3dui;
100618
+ if(!ic.chainsSeq[chainid]) return;
100619
+
100538
100620
  // update annotation windows and alignment sequences
100539
100621
  for(let i = 0, il = ic.chainsSeq[chainid].length; i < il; ++i) {
100540
100622
  let resi = ic.chainsSeq[chainid][i].resi;
@@ -102009,7 +102091,7 @@ class ShowInter {
102009
102091
  // between the highlighted and atoms in nameArray
102010
102092
  //Show the hydrogen bonds between chemicals and proteins/nucleotides with dashed-lines.
102011
102093
  //"threshold" defines the distance of hydrogen bonds.
102012
- showHbonds(threshold, nameArray2, nameArray, bHbondCalc, bSaltbridge, type) { let ic = this.icn3d, me = ic.icn3dui;
102094
+ showHbonds(threshold, nameArray2, nameArray, bHbondCalc, bSaltbridge, type, bHbondPlot) { let ic = this.icn3d, me = ic.icn3dui;
102013
102095
  if(bHbondCalc) return;
102014
102096
  let hbonds_saltbridge, select;
102015
102097
  if(bSaltbridge) {
@@ -102020,8 +102102,7 @@ class ShowInter {
102020
102102
  hbonds_saltbridge = 'hbonds';
102021
102103
  select = 'hbonds ' + threshold + ' | sets ' + nameArray2 + " " + nameArray + " | " + bHbondCalc;
102022
102104
  }
102023
- ic.opts[hbonds_saltbridge] = "yes";
102024
- ic.opts["water"] = "dot";
102105
+
102025
102106
  let firstSetAtoms, complement;
102026
102107
  firstSetAtoms = ic.definedSetsCls.getAtomsFromNameArray(nameArray2);
102027
102108
  complement = ic.definedSetsCls.getAtomsFromNameArray(nameArray);
@@ -102031,34 +102112,39 @@ class ShowInter {
102031
102112
  // let selectedAtoms = ic.hBondCls.calculateChemicalHbonds(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge );
102032
102113
  let selectedAtoms = ic.hBondCls.calculateChemicalHbonds(me.hashUtilsCls.hash2Atoms(complement, ic.atoms), me.hashUtilsCls.hash2Atoms(firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge );
102033
102114
 
102034
- let commanddesc;
102035
- if(bSaltbridge) {
102036
- ic.resid2ResidhashSaltbridge = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
102037
- commanddesc = 'all atoms that have salt bridges with the selected atoms';
102038
- }
102039
- else {
102040
- ic.resid2ResidhashHbond = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
102041
- commanddesc = 'all atoms that are hydrogen-bonded with the selected atoms';
102042
- }
102043
- let residues = {};
102044
- for(let i in selectedAtoms) {
102045
- let residueid = ic.atoms[i].structure + '_' + ic.atoms[i].chain + '_' + ic.atoms[i].resi;
102046
- residues[residueid] = 1;
102047
- }
102048
- ic.hAtoms = {};
102049
- for(let resid in residues) {
102050
- for(let i in ic.residues[resid]) {
102051
- ic.hAtoms[i] = 1;
102052
- ic.atoms[i].style2 = 'stick';
102053
- //ic.atoms[i].style2 = 'lines';
102115
+ if(!bHbondPlot) {
102116
+ let commanddesc;
102117
+ if(bSaltbridge) {
102118
+ ic.resid2ResidhashSaltbridge = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
102119
+ commanddesc = 'all atoms that have salt bridges with the selected atoms';
102120
+ }
102121
+ else {
102122
+ ic.resid2ResidhashHbond = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
102123
+ commanddesc = 'all atoms that are hydrogen-bonded with the selected atoms';
102124
+ }
102125
+ let residues = {};
102126
+ for(let i in selectedAtoms) {
102127
+ let residueid = ic.atoms[i].structure + '_' + ic.atoms[i].chain + '_' + ic.atoms[i].resi;
102128
+ residues[residueid] = 1;
102129
+ }
102130
+ ic.hAtoms = {};
102131
+ for(let resid in residues) {
102132
+ for(let i in ic.residues[resid]) {
102133
+ ic.hAtoms[i] = 1;
102134
+ ic.atoms[i].style2 = 'stick';
102135
+ //ic.atoms[i].style2 = 'lines';
102136
+ }
102054
102137
  }
102055
- }
102056
102138
 
102057
- //let commandname = hbonds_saltbridge + '_' + firstAtom.serial;
102058
- let commandname = hbonds_saltbridge + '_auto';
102059
- ic.selectionCls.addCustomSelection(Object.keys(residues), commandname, commanddesc, select, true);
102060
- ic.selectionCls.saveSelectionIfSelected();
102061
- ic.drawCls.draw();
102139
+ ic.opts[hbonds_saltbridge] = "yes";
102140
+ ic.opts["water"] = "dot";
102141
+
102142
+ //let commandname = hbonds_saltbridge + '_' + firstAtom.serial;
102143
+ let commandname = hbonds_saltbridge + '_auto';
102144
+ ic.selectionCls.addCustomSelection(Object.keys(residues), commandname, commanddesc, select, true);
102145
+ ic.selectionCls.saveSelectionIfSelected();
102146
+ ic.drawCls.draw();
102147
+ }
102062
102148
  }
102063
102149
  }
102064
102150
 
@@ -102379,7 +102465,7 @@ class ViewInterPairs {
102379
102465
  }
102380
102466
 
102381
102467
  async viewInteractionPairs(nameArray2, nameArray, bHbondCalc, type,
102382
- bHbond, bSaltbridge, bInteraction, bHalogen, bPication, bPistacking, contactDist) { let ic = this.icn3d, me = ic.icn3dui;
102468
+ bHbond, bSaltbridge, bInteraction, bHalogen, bPication, bPistacking, contactDist, bHbondPlot) { let ic = this.icn3d, me = ic.icn3dui;
102383
102469
  let bondCnt;
102384
102470
 
102385
102471
  // reset
@@ -102479,13 +102565,13 @@ class ViewInterPairs {
102479
102565
  if(!bHbondCalc) {
102480
102566
  ic.hAtoms = me.hashUtilsCls.cloneHash(prevHatoms);
102481
102567
 
102482
- ic.showInterCls.showHbonds(threshold, nameArray2, nameArray, bHbondCalc, undefined, type);
102568
+ ic.showInterCls.showHbonds(threshold, nameArray2, nameArray, bHbondCalc, undefined, type, bHbondPlot);
102483
102569
  }
102484
102570
  hAtoms = me.hashUtilsCls.unionHash(hAtoms, ic.hAtoms);
102485
102571
  }
102486
102572
  // switch display order, show hydrogen first
102487
102573
  let tableHtml = '';
102488
- if(bHbond) {
102574
+ if(bHbond && !bHbondPlot) {
102489
102575
  tableHtml += this.exportHbondPairs(type, labelType);
102490
102576
  }
102491
102577
  if(bSaltbridge) {
@@ -102611,46 +102697,51 @@ class ViewInterPairs {
102611
102697
  ic.hAtoms = me.hashUtilsCls.cloneHash(hAtoms);
102612
102698
  ic.bRender = true;
102613
102699
  //ic.hlUpdateCls.updateHlAll();
102614
- ic.drawCls.draw();
102615
- let residHash, select, commandname, commanddesc;
102616
- residHash = ic.firstAtomObjCls.getResiduesFromAtoms(hAtoms);
102617
- select = "select " + ic.resid2specCls.residueids2spec(Object.keys(residHash));
102618
- commandname = 'interface_all';
102619
- commanddesc = commandname;
102620
- ic.selectionCls.addCustomSelection(Object.keys(residHash), commandname, commanddesc, select, true);
102621
- let interface1 = me.hashUtilsCls.intHash(hAtoms, atomSet1);
102622
- residHash = ic.firstAtomObjCls.getResiduesFromAtoms(interface1);
102623
- select = "select " + ic.resid2specCls.residueids2spec(Object.keys(residHash));
102624
- commandname = 'interface_1';
102625
- commanddesc = commandname;
102626
- ic.selectionCls.addCustomSelection(Object.keys(residHash), commandname, commanddesc, select, true);
102627
- let interface2 = me.hashUtilsCls.intHash(hAtoms, atomSet2);
102628
- residHash = ic.firstAtomObjCls.getResiduesFromAtoms(interface2);
102629
- select = "select " + ic.resid2specCls.residueids2spec(Object.keys(residHash));
102630
- commandname = 'interface_2';
102631
- commanddesc = commandname;
102632
- ic.selectionCls.addCustomSelection(Object.keys(residHash), commandname, commanddesc, select, true);
102633
- //var html = '<div style="text-align:center"><b>Hydrogen Bonds, Salt Bridges, Contacts, Halogen Bonds, &pi;-cation, &pi;-stacking between Two Sets:</b><br>';
102634
- let html = '<div style="text-align:center"><b>' + interactionTypes.join(', ') + ' between Two Sets:</b><br>';
102635
- let residueArray1 = ic.resid2specCls.atoms2residues(Object.keys(atomSet1));
102636
- let residueArray2 = ic.resid2specCls.atoms2residues(Object.keys(atomSet2));
102637
- let cmd1 = 'select ' + ic.resid2specCls.residueids2spec(residueArray1);
102638
- let cmd2 = 'select ' + ic.resid2specCls.residueids2spec(residueArray2);
102639
- html += 'Set 1: ' + nameArray2 + ' <button class="' + ic.pre + 'selset" cmd="' + cmd1 + '">Highlight in 3D</button><br>';
102640
- html += 'Set 2: ' + nameArray + ' <button class="' + ic.pre + 'selset" cmd="' + cmd2 + '">Highlight in 3D</button><br><br></div>';
102641
- html += '<div style="text-align:center"><b>The interfaces are:</b><br>';
102642
- let residueArray3 = ic.resid2specCls.atoms2residues(Object.keys(interface1));
102643
- let residueArray4 = ic.resid2specCls.atoms2residues(Object.keys(interface2));
102644
- let cmd3 = 'select ' + ic.resid2specCls.residueids2spec(residueArray3);
102645
- let cmd4 = 'select ' + ic.resid2specCls.residueids2spec(residueArray4);
102646
- html += 'interface_1 <button class="' + ic.pre + 'selset" cmd="' + cmd3 + '">Highlight in 3D</button><br>';
102647
- html += 'interface_2 <button class="' + ic.pre + 'selset" cmd="' + cmd4 + '">Highlight in 3D</button><br><br></div>';
102648
- html += '<div><b>Note</b>: Each checkbox below selects the corresponding residue. '
102649
- + 'You can click "Save Selection" in the "Select" menu to save the selection '
102650
- + 'and click on "Highlight" button to clear the checkboxes.</div><br>';
102651
- let header = html;
102652
- if(type == 'graph' || type == 'linegraph' || type == 'scatterplot' || bContactMapLocal) html = '';
102653
- html += tableHtml;
102700
+ let html = '';
102701
+ if(!bHbondPlot) {
102702
+ ic.drawCls.draw();
102703
+ let residHash, select, commandname, commanddesc;
102704
+ residHash = ic.firstAtomObjCls.getResiduesFromAtoms(hAtoms);
102705
+ select = "select " + ic.resid2specCls.residueids2spec(Object.keys(residHash));
102706
+ commandname = 'interface_all';
102707
+ commanddesc = commandname;
102708
+ ic.selectionCls.addCustomSelection(Object.keys(residHash), commandname, commanddesc, select, true);
102709
+ let interface1 = me.hashUtilsCls.intHash(hAtoms, atomSet1);
102710
+ residHash = ic.firstAtomObjCls.getResiduesFromAtoms(interface1);
102711
+ select = "select " + ic.resid2specCls.residueids2spec(Object.keys(residHash));
102712
+ commandname = 'interface_1';
102713
+ commanddesc = commandname;
102714
+ ic.selectionCls.addCustomSelection(Object.keys(residHash), commandname, commanddesc, select, true);
102715
+ let interface2 = me.hashUtilsCls.intHash(hAtoms, atomSet2);
102716
+ residHash = ic.firstAtomObjCls.getResiduesFromAtoms(interface2);
102717
+ select = "select " + ic.resid2specCls.residueids2spec(Object.keys(residHash));
102718
+ commandname = 'interface_2';
102719
+ commanddesc = commandname;
102720
+ ic.selectionCls.addCustomSelection(Object.keys(residHash), commandname, commanddesc, select, true);
102721
+
102722
+ //var html = '<div style="text-align:center"><b>Hydrogen Bonds, Salt Bridges, Contacts, Halogen Bonds, &pi;-cation, &pi;-stacking between Two Sets:</b><br>';
102723
+ html = '<div style="text-align:center"><b>' + interactionTypes.join(', ') + ' between Two Sets:</b><br>';
102724
+ let residueArray1 = ic.resid2specCls.atoms2residues(Object.keys(atomSet1));
102725
+ let residueArray2 = ic.resid2specCls.atoms2residues(Object.keys(atomSet2));
102726
+ let cmd1 = 'select ' + ic.resid2specCls.residueids2spec(residueArray1);
102727
+ let cmd2 = 'select ' + ic.resid2specCls.residueids2spec(residueArray2);
102728
+ html += 'Set 1: ' + nameArray2 + ' <button class="' + ic.pre + 'selset" cmd="' + cmd1 + '">Highlight in 3D</button><br>';
102729
+ html += 'Set 2: ' + nameArray + ' <button class="' + ic.pre + 'selset" cmd="' + cmd2 + '">Highlight in 3D</button><br><br></div>';
102730
+ html += '<div style="text-align:center"><b>The interfaces are:</b><br>';
102731
+ let residueArray3 = ic.resid2specCls.atoms2residues(Object.keys(interface1));
102732
+ let residueArray4 = ic.resid2specCls.atoms2residues(Object.keys(interface2));
102733
+ let cmd3 = 'select ' + ic.resid2specCls.residueids2spec(residueArray3);
102734
+ let cmd4 = 'select ' + ic.resid2specCls.residueids2spec(residueArray4);
102735
+ html += 'interface_1 <button class="' + ic.pre + 'selset" cmd="' + cmd3 + '">Highlight in 3D</button><br>';
102736
+ html += 'interface_2 <button class="' + ic.pre + 'selset" cmd="' + cmd4 + '">Highlight in 3D</button><br><br></div>';
102737
+ html += '<div><b>Note</b>: Each checkbox below selects the corresponding residue. '
102738
+ + 'You can click "Save Selection" in the "Select" menu to save the selection '
102739
+ + 'and click on "Highlight" button to clear the checkboxes.</div><br>';
102740
+
102741
+ if(type == 'graph' || type == 'linegraph' || type == 'scatterplot' || bContactMapLocal) html = '';
102742
+ html += tableHtml;
102743
+ }
102744
+ let header = html;
102654
102745
 
102655
102746
  if(type == 'save1' || type == 'save2') {
102656
102747
  html = header;
@@ -102666,8 +102757,10 @@ class ViewInterPairs {
102666
102757
  html += result.html;
102667
102758
  bondCnt = result.bondCnt;
102668
102759
 
102669
- $("#" + ic.pre + "dl_interactionsorted_html").html(html);
102670
- me.htmlCls.dialogCls.openDlg('dl_interactionsorted', 'Show sorted interactions');
102760
+ if(!bHbondPlot) {
102761
+ $("#" + ic.pre + "dl_interactionsorted_html").html(html);
102762
+ me.htmlCls.dialogCls.openDlg('dl_interactionsorted', 'Show sorted interactions');
102763
+ }
102671
102764
 
102672
102765
  if(me.bNode) {
102673
102766
  console.log(html);
@@ -102961,10 +103054,10 @@ class ViewInterPairs {
102961
103054
 
102962
103055
  let resid1Real = ic.getGraphCls.convertLabel2Resid(resid1);
102963
103056
  let atom1 = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid1Real]);
102964
- let color1 = (atom1.color) ? atom1.color.getHexString() : '';
103057
+ let color1 = (atom1 && atom1.color) ? atom1.color.getHexString() : '';
102965
103058
  let resid2Real = ic.getGraphCls.convertLabel2Resid(resid2);
102966
103059
  let atom2 = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid2Real]);
102967
- let color2 = (atom2.color) ? atom2.color.getHexString() : '';
103060
+ let color2 = (atom2 && atom2.color) ? atom2.color.getHexString() : '';
102968
103061
  let dist = Math.sqrt(labels2dist[labels]).toFixed(1);
102969
103062
  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>';
102970
103063
  tmpText += '<td align="center"><button class="' + ic.pre + 'selres" resid="' + resid1 + '|' + resid2 + '">Highlight</button></td>';
@@ -103050,10 +103143,10 @@ class ViewInterPairs {
103050
103143
 
103051
103144
  let resid1Real = ic.getGraphCls.convertLabel2Resid(resid1);
103052
103145
  let atom1 = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid1Real]);
103053
- let color1 = (atom1.color) ? atom1.color.getHexString() : '';
103146
+ let color1 = (atom1 && atom1.color) ? atom1.color.getHexString() : '';
103054
103147
  let resid2Real = ic.getGraphCls.convertLabel2Resid(resid2);
103055
103148
  let atom2 = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid2Real]);
103056
- let color2 = (atom2.color) ? atom2.color.getHexString() : '';
103149
+ let color2 = (atom2 && atom2.color) ? atom2.color.getHexString() : '';
103057
103150
  let dist1_dist2_atom1_atom2 = resids2distCnt[resids].dist1_dist2_atom1_atom2;
103058
103151
  let dist1 = dist1_dist2_atom1_atom2[0];
103059
103152
  let dist2 = dist1_dist2_atom1_atom2[1];
@@ -103166,11 +103259,11 @@ class ViewInterPairs {
103166
103259
  for(let resid1 in ic.resid2ResidhashHbond) {
103167
103260
  let resid1Real = ic.getGraphCls.convertLabel2Resid(resid1);
103168
103261
  let atom1 = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid1Real]);
103169
- let color1 = (atom1.color) ? atom1.color.getHexString() : '';
103262
+ let color1 = (atom1 && atom1.color) ? atom1.color.getHexString() : '';
103170
103263
  for(let resid2 in ic.resid2ResidhashHbond[resid1]) {
103171
103264
  let resid2Real = ic.getGraphCls.convertLabel2Resid(resid2);
103172
103265
  let atom2 = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid2Real]);
103173
- let color2 = (atom2.color) ? atom2.color.getHexString() : '';
103266
+ let color2 = (atom2 && atom2.color) ? atom2.color.getHexString() : '';
103174
103267
  let dist = Math.sqrt(ic.resid2ResidhashHbond[resid1][resid2]).toFixed(1);
103175
103268
  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>';
103176
103269
  if(type == 'view') tmpText += '<td align="center"><button class="' + ic.pre + 'selres" resid="' + resid1 + '|' + resid2 + '">Highlight</button></td>';
@@ -103204,11 +103297,11 @@ class ViewInterPairs {
103204
103297
  for(let resid1 in ic.resid2ResidhashSaltbridge) {
103205
103298
  let resid1Real = ic.getGraphCls.convertLabel2Resid(resid1);
103206
103299
  let atom1 = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid1Real]);
103207
- let color1 = (atom1.color) ? atom1.color.getHexString() : '';
103300
+ let color1 = (atom1 && atom1.color) ? atom1.color.getHexString() : '';
103208
103301
  for(let resid2 in ic.resid2ResidhashSaltbridge[resid1]) {
103209
103302
  let resid2Real = ic.getGraphCls.convertLabel2Resid(resid2);
103210
103303
  let atom2 = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid2Real]);
103211
- let color2 = (atom2.color) ? atom2.color.getHexString() : '';
103304
+ let color2 = (atom2 && atom2.color) ? atom2.color.getHexString() : '';
103212
103305
  let dist = Math.sqrt(ic.resid2ResidhashSaltbridge[resid1][resid2]).toFixed(1);
103213
103306
  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>';
103214
103307
  if(type == 'view') tmpText += '<td align="center"><button class="' + ic.pre + 'selres" resid="' + resid1 + '|' + resid2 + '">Highlight</button></td>';
@@ -103258,11 +103351,11 @@ class ViewInterPairs {
103258
103351
  for(let resid1 in resid2Residhash) {
103259
103352
  let resid1Real = ic.getGraphCls.convertLabel2Resid(resid1);
103260
103353
  let atom1 = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid1Real]);
103261
- let color1 = (atom1.color) ? atom1.color.getHexString() : '';
103354
+ let color1 = (atom1 && atom1.color) ? atom1.color.getHexString() : '';
103262
103355
  for(let resid2 in resid2Residhash[resid1]) {
103263
103356
  let resid2Real = ic.getGraphCls.convertLabel2Resid(resid2);
103264
103357
  let atom2 = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid2Real]);
103265
- let color2 = (atom2.color) ? atom2.color.getHexString() : '';
103358
+ let color2 = (atom2 && atom2.color) ? atom2.color.getHexString() : '';
103266
103359
  let dist = Math.sqrt(resid2Residhash[resid1][resid2]).toFixed(1);
103267
103360
  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>';
103268
103361
  if(type == 'view') tmpText += '<td align="center"><button class="' + ic.pre + 'selres" resid="' + resid1 + '|' + resid2 + '">Highlight</button></td>';
@@ -103297,11 +103390,11 @@ class ViewInterPairs {
103297
103390
  for(let resid1 in residHash) { // e.g., resid1: TYR $1KQ2.A:42
103298
103391
  let resid1Real = ic.getGraphCls.convertLabel2Resid(resid1);
103299
103392
  let atom1 = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid1Real]);
103300
- let color1 = (atom1.color) ? atom1.color.getHexString() : '';
103393
+ let color1 = (atom1 && atom1.color) ? atom1.color.getHexString() : '';
103301
103394
  for(let resid2 in residHash[resid1]) {
103302
103395
  let resid2Real = ic.getGraphCls.convertLabel2Resid(resid2);
103303
103396
  let atom2 = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid2Real]);
103304
- let color2 = (atom2.color) ? atom2.color.getHexString() : '';
103397
+ let color2 = (atom2 && atom2.color) ? atom2.color.getHexString() : '';
103305
103398
  let dist1_dist2_atom1_atom2 = residHash[resid1][resid2].split('_');
103306
103399
  let dist1 = dist1_dist2_atom1_atom2[0];
103307
103400
  let dist2 = dist1_dist2_atom1_atom2[1];
@@ -104520,16 +104613,31 @@ class ChainalignParser {
104520
104613
 
104521
104614
  // dynamically align pairs in all chainids
104522
104615
  // the resrange from VASTSrv or VAST search uses NCBI residue numbers!!!
104523
- let atomSet_t = (me.cfg.resrange) ? ic.realignParserCls.getSeqCoorResid([resRangeArray[0]], chainidArray[0], true).hAtoms : ic.chains[chainidArray[0]];
104616
+ let atomSet_t;
104617
+ if(me.cfg.resrange) {
104618
+ let result = ic.realignParserCls.getSeqCoorResid([resRangeArray[0]], chainidArray[0], true);
104619
+ atomSet_t = result.hAtoms;
104620
+ }
104621
+ else {
104622
+ atomSet_t = ic.chains[chainidArray[0]];
104623
+ }
104624
+
104524
104625
  for(let index = 1, indexl = chainidArray.length; index < indexl; ++index) {
104525
- let atomSet_q = (me.cfg.resrange) ? ic.realignParserCls.getSeqCoorResid([resRangeArray[index]], chainidArray[index], true).hAtoms : ic.chains[chainidArray[index]];
104626
+ let atomSet_q;
104627
+ if(me.cfg.resrange) {
104628
+ let result = ic.realignParserCls.getSeqCoorResid([resRangeArray[index]], chainidArray[index], true);
104629
+ atomSet_q = result.hAtoms;
104630
+ }
104631
+ else {
104632
+ atomSet_q = ic.chains[chainidArray[index]];
104633
+ }
104526
104634
  // end of new version to be done for VASTsrv ==============
104527
104635
 
104528
104636
  let alignAjax;
104529
104637
  if(me.cfg.aligntool != 'tmalign') {
104530
104638
  let jsonStr_q = ic.domain3dCls.getDomainJsonForAlign(atomSet_q);
104531
104639
  let jsonStr_t = ic.domain3dCls.getDomainJsonForAlign(atomSet_t);
104532
-
104640
+
104533
104641
  let dataObj = {'domains1': jsonStr_q, 'domains2': jsonStr_t};
104534
104642
  alignAjax = me.getAjaxPostPromise(urlalign, dataObj);
104535
104643
  }
@@ -104565,6 +104673,7 @@ class ChainalignParser {
104565
104673
  //let bTargetTransformed = (ic.qt_start_end[0]) ? true : false;
104566
104674
 
104567
104675
  // modify the previous trans and rotation matrix
104676
+ let bAligned = false;
104568
104677
  for(let i = 0, il = dataArray.length; i < il; ++i) {
104569
104678
  // let align = (me.bNode) ? dataArray[i] : dataArray[i].value;//[0];
104570
104679
  let align = dataArray[i].value;//[0];
@@ -104580,7 +104689,7 @@ class ChainalignParser {
104580
104689
 
104581
104690
  me.htmlCls.clickMenuCls.setLogCmd("Align " + mmdbid_t + " with " + mmdbid_q, false);
104582
104691
 
104583
- this.processAlign(align, index, queryData, bEqualMmdbid, bEqualChain);
104692
+ bAligned =await this.processAlign(align, index, queryData, bEqualMmdbid, bEqualChain, undefined);
104584
104693
  }
104585
104694
 
104586
104695
  // do not transform the target
@@ -104588,28 +104697,34 @@ class ChainalignParser {
104588
104697
  // this.transformStructure(mmdbid_t, indexArray[0], 'target');
104589
104698
  //}
104590
104699
 
104591
- // transform the rest
104592
- for(let i = 0, il = dataArray.length; i < il; ++i) {
104593
- let mmdbid_q = struArray[i];
104594
- let index = indexArray[i];
104595
- this.transformStructure(mmdbid_q, index, 'query');
104596
- }
104700
+ if(bAligned) {
104701
+ // transform the rest
104702
+ for(let i = 0, il = dataArray.length; i < il; ++i) {
104703
+ let mmdbid_q = struArray[i];
104704
+ let index = indexArray[i];
104705
+ this.transformStructure(mmdbid_q, index, 'query');
104706
+ }
104597
104707
 
104598
- let hAtomsAll = {};
104708
+ let hAtomsAll = {};
104599
104709
 
104600
- if(ic.bFullUi && ic.q_rotation !== undefined && !me.cfg.resnum && !me.cfg.resdef) {
104601
- // set multiple sequence alignment from ic.qt_start_end
104602
- hAtomsAll = this.setMsa(chainidArray);
104603
- }
104710
+ if(ic.bFullUi && ic.q_rotation !== undefined && !me.cfg.resnum && !me.cfg.resdef) {
104711
+ // set multiple sequence alignment from ic.qt_start_end
104712
+ hAtomsAll = this.setMsa(chainidArray);
104713
+ }
104604
104714
 
104605
- // highlight all aligned atoms
104606
- //ic.hAtoms = me.hashUtilsCls.cloneHash(hAtomsTmp);
104607
- ic.hAtoms = me.hashUtilsCls.cloneHash(hAtomsAll);
104715
+ // highlight all aligned atoms
104716
+ //ic.hAtoms = me.hashUtilsCls.cloneHash(hAtomsTmp);
104717
+ ic.hAtoms = me.hashUtilsCls.cloneHash(hAtomsAll);
104608
104718
 
104609
- ic.transformCls.zoominSelection();
104719
+ ic.transformCls.zoominSelection();
104610
104720
 
104611
- // do the rest
104612
- await this.downloadChainalignmentPart3(chainresiCalphaHash2, chainidArray, ic.hAtoms);
104721
+ // do the rest
104722
+ await this.downloadChainalignmentPart3(chainresiCalphaHash2, chainidArray, ic.hAtoms);
104723
+ }
104724
+ else {
104725
+ me.cfg.aligntool = 'tmalign';
104726
+ await ic.chainalignParserCls.downloadChainalignment(me.cfg.chainalign);
104727
+ }
104613
104728
  }
104614
104729
 
104615
104730
  setMsa(chainidArray, bVastplus, bRealign) { let ic = this.icn3d, me = ic.icn3dui;
@@ -104680,7 +104795,7 @@ class ChainalignParser {
104680
104795
 
104681
104796
  let bNoAlert = true;
104682
104797
 
104683
- let bAligned = this.processAlign(align, i, queryData, bEqualMmdbid, bEqualChain, bNoAlert);
104798
+ let bAligned = await this.processAlign(align, i, queryData, bEqualMmdbid, bEqualChain, bNoAlert);
104684
104799
 
104685
104800
  if(bAligned) {
104686
104801
  bFoundAlignment = true;
@@ -105172,7 +105287,7 @@ class ChainalignParser {
105172
105287
 
105173
105288
  me.htmlCls.clickMenuCls.setLogCmd("Align " + mmdbid_t + " with " + mmdbid_q, false);
105174
105289
 
105175
- this.processAlign(align, index-1, queryData, bEqualMmdbid, bEqualChain);
105290
+ await this.processAlign(align, index-1, queryData, bEqualMmdbid, bEqualChain, undefined);
105176
105291
  }
105177
105292
  }
105178
105293
  }
@@ -105182,13 +105297,13 @@ class ChainalignParser {
105182
105297
  await this.loadOpmDataForChainalign(targetData, queryDataArray, chainidArray, ic.mmdbidArray);
105183
105298
  }
105184
105299
 
105185
- processAlign(align, index, queryData, bEqualMmdbid, bEqualChain, bNoAlert) { let ic = this.icn3d, me = ic.icn3dui;
105300
+ async processAlign(align, index, queryData, bEqualMmdbid, bEqualChain, bNoAlert) { let ic = this.icn3d, me = ic.icn3dui;
105186
105301
  let bAligned = false;
105187
105302
 
105188
- if((!align || align.length == 0) && !bNoAlert) {
105189
- let serverName = (me.cfg.aligntool == 'tmalign') ? 'TM-align' : 'VAST';
105190
-
105191
- if(ic.bRender) var aaa = 1; //alert("These chains can not be aligned by " + serverName + ".");
105303
+ if((align === "error" || align === undefined || align.length == 0) && !bNoAlert) {
105304
+ // let serverName = (me.cfg.aligntool == 'tmalign') ? 'TM-align' : 'VAST';
105305
+
105306
+ // if(ic.bRender) var aaa = 1; //alert("These chains can not be aligned by " + serverName + ".");
105192
105307
  return bAligned;
105193
105308
  }
105194
105309
 
@@ -105337,7 +105452,6 @@ class ChainalignParser {
105337
105452
  let structArrayTmp = idlist.split(',');
105338
105453
 
105339
105454
  let structArray = [];
105340
-
105341
105455
  // only when bNoDuplicate is undefined/false, it's allowed to load multiple copies of the same structure
105342
105456
  if(!bNoDuplicate) {
105343
105457
  structArray = this.addPostfixForStructureids(structArrayTmp);
@@ -105350,7 +105464,7 @@ class ChainalignParser {
105350
105464
  if(!ic.structures.hasOwnProperty(id)) structArray.push(structArrayTmp[i]);
105351
105465
  }
105352
105466
  }
105353
-
105467
+
105354
105468
  if(structArray.length == 0) return;
105355
105469
 
105356
105470
  ic.structArray = ic.structArray.concat(structArray);
@@ -105450,6 +105564,8 @@ class ChainalignParser {
105450
105564
  let bNoSeqalign = true;
105451
105565
  let pdbid = structArray[i];
105452
105566
 
105567
+ if(queryDataArray[i].pdbId) queryDataArray[i].pdbId = pdbid;
105568
+
105453
105569
  //hAtomsTmp contains all atoms
105454
105570
  await ic.mmdbParserCls.parseMmdbData(queryDataArray[i], targetOrQuery, undefined, undefined, bLastQuery, bNoSeqalign, pdbid);
105455
105571
  }
@@ -107026,7 +107142,7 @@ class MmdbParser {
107026
107142
  return;
107027
107143
  }
107028
107144
 
107029
- if(Object.keys(data.atoms).length == 0) { // for large structures such as 3J3Q
107145
+ if(!data.atoms || Object.keys(data.atoms).length == 0) { // for large structures such as 3J3Q
107030
107146
  // use mmtfid
107031
107147
  let pdbid = data.pdbId;
107032
107148
  await ic.bcifParserCls.downloadBcif(pdbid);
@@ -107036,6 +107152,7 @@ class MmdbParser {
107036
107152
 
107037
107153
  let bCalphaOnly = me.utilsCls.isCalphaPhosOnly(data.atoms); //, 'CA');
107038
107154
 
107155
+ //if(!data.pdbId) data.pdbId = mmdbid;
107039
107156
  if(bCalphaOnly || data.atomCount <= ic.maxatomcnt) {
107040
107157
  await this.parseMmdbData(data);
107041
107158
  }
@@ -107197,8 +107314,18 @@ class MmdbParser {
107197
107314
  async parseMmdbData(data, type, chainid, chainIndex, bLastQuery, bNoTransformNoSeqalign, pdbidIn) { let ic = this.icn3d, me = ic.icn3dui;
107198
107315
  let hAtoms;
107199
107316
  let pdbid = (data.pdbId !== undefined) ? data.pdbId : data.mmdbId;
107317
+ if(!pdbid && chainid) {
107318
+ pdbid = chainid.substr(0, chainid.lastIndexOf('_'));
107319
+ }
107320
+
107200
107321
  if(pdbidIn) pdbid = pdbidIn;
107201
107322
 
107323
+ // if(!data.atoms || Object.keys(data.atoms).length == 0) { // for large structures such as 3J3Q
107324
+ // ic.bRender = false;
107325
+ // await ic.bcifParserCls.downloadBcif(pdbid);
107326
+ // return;
107327
+ // }
107328
+
107202
107329
  this.parseMmdbDataPart1(data, type);
107203
107330
 
107204
107331
  if(type === undefined) { // default mmdbid input
@@ -107615,7 +107742,7 @@ class BcifParser {
107615
107742
 
107616
107743
  if(block.getCategory("_struct")) {
107617
107744
  title = block.getCategory("_struct").getColumn("title").getString(0);
107618
- title = title.replace(/"/, "'");
107745
+ title = title.replace(/"/g, "'");
107619
107746
  }
107620
107747
 
107621
107748
  if(block.getCategory("_struct_keywords")) {
@@ -108865,7 +108992,7 @@ class PdbParser {
108865
108992
  }
108866
108993
 
108867
108994
  // if(!ic.bSecondaryStructure && Object.keys(ic.proteins).length > 0) {
108868
- if((!ic.bSecondaryStructure || bCalcSecondary) && Object.keys(ic.proteins).length > 0 && !bNoDssp) {
108995
+ if((!ic.bSecondaryStructure || bCalcSecondary) && Object.keys(ic.proteins).length > 0 && !bNoDssp) {
108869
108996
  await this.applyCommandDssp(bAppend);
108870
108997
  }
108871
108998
  else {
@@ -109696,7 +109823,7 @@ class DcdParser {
109696
109823
  return true;
109697
109824
  }
109698
109825
 
109699
- async showRmsdPlot() { let ic = this.icn3d, me = ic.icn3dui;
109826
+ async showRmsdHbondPlot(bHbondPlot) { let ic = this.icn3d, me = ic.icn3dui;
109700
109827
  if(ic.bChartjs === undefined) {
109701
109828
  let url = "https://cdn.jsdelivr.net/npm/chart.js";
109702
109829
  await me.getAjaxPromise(url, 'script');
@@ -109704,42 +109831,87 @@ class DcdParser {
109704
109831
  ic.bChartjs = true;
109705
109832
  }
109706
109833
 
109707
- $("#" + me.rmsdplotid).empty();
109708
- me.htmlCls.dialogCls.openDlg('dl_rmsdplot', 'RMSD Plot');
109834
+ if(bHbondPlot) {
109835
+ $("#" + me.hbondplotid).empty();
109836
+ me.htmlCls.dialogCls.openDlg('dl_hbondplot', 'H-bond Plot');
109837
+ }
109838
+ else {
109839
+ $("#" + me.rmsdplotid).empty();
109840
+ me.htmlCls.dialogCls.openDlg('dl_rmsdplot', 'RMSD Plot');
109841
+ }
109709
109842
 
109710
109843
  let dataSet = [];
109711
109844
  let structureArray = Object.keys(ic.structures);
109712
- let coord1 = [], coord2 = [];
109713
- for(let i = 0, il = structureArray.length; i < il; ++i) {
109714
- let chainArray = ic.structures[structureArray[i]];
109845
+ if(bHbondPlot) {
109846
+ for(let i = 0, il = structureArray.length; i < il; ++i) {
109847
+ if(i > 0) {
109848
+ let type = 'save1';
109849
+ let stru = structureArray[i];
109850
+ let atomSet = {};
109851
+ for(let j = 0, jl = ic.structures[stru].length; j < jl; ++j) {
109852
+ let chainid = ic.structures[stru][j];
109853
+ for(let k in ic.chains[chainid]) {
109854
+ let atom = ic.atoms[k];
109855
+ if(!ic.water.hasOwnProperty(atom.serial) && !ic.ions.hasOwnProperty(atom.serial)) atomSet[k] = 1;
109856
+ }
109857
+ }
109715
109858
 
109716
- let coord = [];
109717
- let nAtoms = 0;
109718
- for(let j = 0, jl = chainArray.length; j < jl; ++j) {
109719
- let chainid = chainArray[j];
109720
- for(let k in ic.chains[chainid]) {
109721
- let atom = ic.atoms[k];
109722
- // only align proteins, nucleotides, or chemicals
109723
- if(ic.proteins.hasOwnProperty(atom.serial) || ic.nucleotides.hasOwnProperty(atom.serial) || ic.chemicals.hasOwnProperty(atom.serial)) {
109724
- coord.push(atom.coord);
109725
- ++nAtoms;
109859
+ let residueHash = ic.firstAtomObjCls.getResiduesFromAtoms(atomSet);
109860
+ let command = structureArray[i] + '_nonSol'; // exclude solvent and ions
109861
+ let residArray = Object.keys(residueHash);
109862
+ ic.selectionCls.addCustomSelection(residArray, command, command, 'select ' + command, true);
109863
+ let nameArray = [command];
109864
+ let nameArray2 = [command];
109865
+
109866
+ let result = await ic.viewInterPairsCls.viewInteractionPairs(nameArray2, nameArray, false, type,
109867
+ true, false, false, false, false, false, undefined, bHbondPlot);
109868
+ let bondCnt = result.bondCnt;
109869
+
109870
+ let hBondCnt = 0;
109871
+ for(let j = 0, jl = bondCnt.length; j < jl; ++j) {
109872
+ hBondCnt += bondCnt[j].cntHbond; // + bondCnt[j].cntIonic + bondCnt[j].cntHalegen + bondCnt[j].cntPication + bondCnt[j].cntPistacking;
109726
109873
  }
109874
+
109875
+ let time = ic.TIMEOFFSET + (i * ic.DELTA).toPrecision(4);
109876
+ dataSet.push({x: time, y: hBondCnt});
109727
109877
  }
109728
109878
  }
109729
109879
 
109730
- if(i == 0) {
109731
- coord1 = [].concat(coord);
109732
- }
109733
- else {
109734
- coord2 = coord;
109735
- }
109880
+ ic.viewInterPairsCls.resetInteractionPairs();
109881
+ }
109882
+ else {
109883
+ let coord1 = [], coord2 = [];
109884
+ for(let i = 0, il = structureArray.length; i < il; ++i) {
109885
+ let chainArray = ic.structures[structureArray[i]];
109886
+
109887
+ let coord = [];
109888
+ let nAtoms = 0;
109889
+ for(let j = 0, jl = chainArray.length; j < jl; ++j) {
109890
+ let chainid = chainArray[j];
109891
+ for(let k in ic.chains[chainid]) {
109892
+ let atom = ic.atoms[k];
109893
+ // only align proteins, nucleotides, or chemicals
109894
+ if(ic.proteins.hasOwnProperty(atom.serial) || ic.nucleotides.hasOwnProperty(atom.serial) || ic.chemicals.hasOwnProperty(atom.serial)) {
109895
+ coord.push(atom.coord);
109896
+ ++nAtoms;
109897
+ }
109898
+ }
109899
+ }
109736
109900
 
109737
- if(i > 0) {
109738
- let result = me.rmsdSuprCls.getRmsdSuprCls(coord1, coord2, nAtoms);
109739
- let rmsd = (result.rmsd * 0.1).toPrecision(4); // convert from Å to nm
109901
+ if(i == 0) {
109902
+ coord1 = [].concat(coord);
109903
+ }
109904
+ else {
109905
+ coord2 = coord;
109906
+ }
109907
+
109908
+ if(i > 0) {
109909
+ let result = me.rmsdSuprCls.getRmsdSuprCls(coord1, coord2, nAtoms);
109910
+ let rmsd = (result.rmsd * 0.1).toPrecision(4); // convert from Å to nm
109740
109911
 
109741
- let time = ic.TIMEOFFSET + (i * ic.DELTA).toPrecision(4);
109742
- dataSet.push({x: time, y: rmsd});
109912
+ let time = ic.TIMEOFFSET + (i * ic.DELTA).toPrecision(4);
109913
+ dataSet.push({x: time, y: rmsd});
109914
+ }
109743
109915
  }
109744
109916
  }
109745
109917
 
@@ -109750,13 +109922,13 @@ class DcdParser {
109750
109922
 
109751
109923
  // https://www.chartjs.org/docs/latest/samples/line/line.html
109752
109924
  // const ctx = $("#" + me.rmsdplotid)[0].getContext('2d');
109753
- const ctx = $("#" + me.rmsdplotid)[0];
109925
+ const ctx = (bHbondPlot) ? $("#" + me.hbondplotid)[0] : $("#" + me.rmsdplotid)[0];
109754
109926
 
109755
109927
  new Chart(ctx, {
109756
109928
  type: 'line',
109757
109929
  data: {
109758
109930
  datasets: [{
109759
- label: 'RMSD',
109931
+ label: (bHbondPlot) ? 'H-bonds' : 'RMSD',
109760
109932
  data: dataSet
109761
109933
  }]
109762
109934
  },
@@ -109777,7 +109949,7 @@ class DcdParser {
109777
109949
  y: { // Y-axis configuration (defaults to numeric scale)
109778
109950
  title: {
109779
109951
  display: true, // Show the Y-axis label
109780
- text: 'RMSD (nm)' // Text for the Y-axis label
109952
+ text: (bHbondPlot) ? 'Number of H-bonds' : 'RMSD (nm)' // Text for the Y-axis label
109781
109953
  }
109782
109954
  }
109783
109955
  }
@@ -110795,8 +110967,7 @@ class RealignParser {
110795
110967
  // If rmsd from vastsrv is too large, realign the chains
110796
110968
  //if(me.cfg.chainalign && !me.cfg.usepdbnum && me.cfg.resdef && rmsd > 5) {
110797
110969
  // redo algnment only for VAST serv page
110798
- if(!me.cfg.usepdbnum && me.cfg.resdef && rmsd > 5 && me.cfg.chainalign) {
110799
- console.log("RMSD from VAST is larger than 5. Realign the chains with TM-align.");
110970
+ if(!me.cfg.usepdbnum && (me.cfg.resdef || me.cfg.resrange) && rmsd > 5 && me.cfg.chainalign) {
110800
110971
  //let nameArray = me.cfg.chainalign.split(',');
110801
110972
  let nameArray = Object.keys(chainidHash);
110802
110973
  if(nameArray.length > 0) {
@@ -111048,15 +111219,30 @@ let resRangeArray = (me.cfg.resrange) ? decodeURIComponent(me.cfg.resrange).spli
111048
111219
  if(bVastsearch && me.cfg.resrange) {
111049
111220
  let resRangeArray = decodeURIComponent(me.cfg.resrange).split(' | ');
111050
111221
 
111051
- let atomSet_t = ic.realignParserCls.getSeqCoorResid([resRangeArray[0]], ic.chainidArray[0], true).hAtoms;
111222
+ let atomSet_t;
111223
+ if(me.cfg.resrange) {
111224
+ let result = ic.realignParserCls.getSeqCoorResid([resRangeArray[0]], ic.chainidArray[0], true);
111225
+ atomSet_t = result.hAtoms;
111226
+ }
111227
+ else {
111228
+ atomSet_t = ic.chains[ic.chainidArray[0]];
111229
+ }
111230
+
111052
111231
  for(let index = 1, indexl = ic.chainidArray.length; index < indexl; ++index) {
111053
- let atomSet_q = ic.realignParserCls.getSeqCoorResid([resRangeArray[index]], ic.chainidArray[index], true).hAtoms;
111232
+ let atomSet_q;
111233
+ if(me.cfg.resrange) {
111234
+ let result = ic.realignParserCls.getSeqCoorResid([resRangeArray[index]], ic.chainidArray[index], true);
111235
+ atomSet_q = result.hAtoms;
111236
+ }
111237
+ else {
111238
+ atomSet_q = ic.chains[ic.chainidArray[index]];
111239
+ }
111054
111240
 
111055
111241
  let alignAjax;
111056
111242
  if(me.cfg.aligntool != 'tmalign') {
111057
111243
  let jsonStr_q = ic.domain3dCls.getDomainJsonForAlign(atomSet_q);
111058
111244
  let jsonStr_t = ic.domain3dCls.getDomainJsonForAlign(atomSet_t);
111059
-
111245
+
111060
111246
  let dataObj = {'domains1': jsonStr_q, 'domains2': jsonStr_t};
111061
111247
  alignAjax = me.getAjaxPostPromise(urlalign, dataObj);
111062
111248
  }
@@ -111117,9 +111303,7 @@ let resRangeArray = (me.cfg.resrange) ? decodeURIComponent(me.cfg.resrange).spli
111117
111303
  let alignAjax;
111118
111304
  if(me.cfg.aligntool != 'tmalign') {
111119
111305
  let jsonStr_q = ic.domain3dCls.getDomainJsonForAlign(struct2domain[struct2][chainid2]);
111120
- console.log("@@@ realign " + struct1 + " " + chainid1 + " and " + struct2 + " " + chainid2);
111121
- console.log("@@@ jsonStr_q " + jsonStr_q);
111122
- console.log("@@@ jsonStr_t " + jsonStr_t);
111306
+
111123
111307
  let dataObj = {'domains1': jsonStr_q, 'domains2': jsonStr_t};
111124
111308
  alignAjax = me.getAjaxPostPromise(urlalign, dataObj);
111125
111309
  }
@@ -111189,7 +111373,7 @@ console.log("@@@ jsonStr_t " + jsonStr_t);
111189
111373
 
111190
111374
  if(me.cfg.aligntool != 'tmalign') {
111191
111375
  let jsonStr_q = ic.domain3dCls.getDomainJsonForAlign(chainid2domain[chainid2]);
111192
-
111376
+
111193
111377
  let dataObj = {'domains1': jsonStr_q, 'domains2': jsonStr_t};
111194
111378
  alignAjax = me.getAjaxPostPromise(urlalign, dataObj);
111195
111379
  }
@@ -111449,6 +111633,8 @@ console.log("@@@ jsonStr_t " + jsonStr_t);
111449
111633
  let hAtoms = {};
111450
111634
 
111451
111635
  for(let j = 0, jl = resiArray.length; j < jl; ++j) {
111636
+ if(!resiArray[j]) continue;
111637
+
111452
111638
  if(resiArray[j].indexOf('-') != -1) {
111453
111639
  let startEnd = resiArray[j].split('-');
111454
111640
  for(let k = parseInt(startEnd[0]); k <= parseInt(startEnd[1]); ++k) {
@@ -113253,7 +113439,7 @@ class ParserUtils {
113253
113439
  let data = await me.getAjaxPromise(url, 'jsonp');
113254
113440
 
113255
113441
  if(data && data.pdbid) {
113256
- 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.";
113442
+ 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.";
113257
113443
 
113258
113444
  if (me.bNode) return;
113259
113445
 
@@ -113914,6 +114100,16 @@ class LoadAtomData {
113914
114100
  }
113915
114101
  }
113916
114102
  }
114103
+
114104
+ // no bonds between metals, e.g., in PDB 4HEA
114105
+ if($.inArray(atom.elem, me.parasCls.ionsArray) !== -1) {
114106
+ for(let j = atom.bonds.length - 1; j >= 0; --j) {
114107
+ let atom2 = ic.atoms[atom.bonds[j]];
114108
+ if(atom2 && $.inArray(atom2.elem, me.parasCls.ionsArray) !== -1) {
114109
+ atom.bonds.splice(j, 1);
114110
+ }
114111
+ }
114112
+ }
113917
114113
  }
113918
114114
 
113919
114115
  // adjust biopolymer type
@@ -116383,6 +116579,7 @@ class LoadPDB {
116383
116579
  // refresh for atoms in each residue
116384
116580
  refreshBonds(curResAtoms, prevCarbon) { let ic = this.icn3d, me = ic.icn3dui;
116385
116581
  let n = curResAtoms.length;
116582
+
116386
116583
  for (let j = 0; j < n; ++j) {
116387
116584
  let atom0 = curResAtoms[j];
116388
116585
  for (let k = j + 1; k < n; ++k) {
@@ -116608,7 +116805,8 @@ class LoadPDB {
116608
116805
  }
116609
116806
 
116610
116807
  isSecondary(resid, residArray, bNMR, bNonFull) { let ic = this.icn3d; ic.icn3dui;
116611
- if(bNonFull) return false;
116808
+ // still need to get the secondary info
116809
+ //if(bNonFull) return false;
116612
116810
 
116613
116811
  if(!bNMR) {
116614
116812
  return $.inArray(resid, residArray) != -1;
@@ -116726,7 +116924,7 @@ class LoadCIF {
116726
116924
 
116727
116925
  if(block.getCategory("_struct")) {
116728
116926
  let title = block.getCategory("_struct").getColumn("title").getString(0);
116729
- title = title.replace(/"/, "'");
116927
+ title = title.replace(/"/g, "'");
116730
116928
  let name = title.replace(/ALPHAFOLD MONOMER V2.0 PREDICTION FOR /gi, '');
116731
116929
  ic.molTitle += name.trim() + " ";
116732
116930
  // if(bEsmfold && ic.esmTitle) ic.molTitle = ic.esmTitle;
@@ -124514,29 +124712,29 @@ class Dssp {
124514
124712
 
124515
124713
  setRefPdbs() { let ic = this.icn3d; ic.icn3dui;
124516
124714
  // round 1, 16 templates
124517
- 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'];
124715
+ 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'];
124518
124716
 
124519
124717
  // round 2
124520
124718
  ic.refpdbHash = {};
124521
124719
  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'];
124522
- ic.refpdbHash['1Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'] = ['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4', 'ICOS_6x4gA_human_V'];
124523
- ic.refpdbHash['1CoAtomerGamma1_1r4xA_human'] = ['CoAtomerGamma1_1r4xA_human', 'TP34_2o6cA_bacteria'];
124524
- ic.refpdbHash['1C3_2qkiD_human_n1'] = ['C3_2qkiD_human_n1', 'BArrestin1_4jqiA_rat_n1', 'RBPJ_6py8C_human_Unk-n1'];
124525
- ic.refpdbHash['1CuZnSuperoxideDismutase_1hl5C_human'] = ['CuZnSuperoxideDismutase_1hl5C_human', 'TEAD1_3kysC_human'];
124526
- ic.refpdbHash['1ASF1A_2iijA_human'] = ['ASF1A_2iijA_human', 'RBPJ_6py8C_human_Unk-n2', 'TP47_1o75A_bacteria'];
124720
+ ic.refpdbHash['1ICOS_6x4gA_human_V'] = ['ICOS_6x4gA_human_V'];
124721
+ //ic.refpdbHash['1CoAtomerGamma1_1r4xA_human'] = ['CoAtomerGamma1_1r4xA_human', 'TP34_2o6cA_bacteria'];
124722
+ //ic.refpdbHash['1C3_2qkiD_human_n1'] = ['C3_2qkiD_human_n1', 'RBPJ_6py8C_human_Unk-n1'];
124723
+ //ic.refpdbHash['1CuZnSuperoxideDismutase_1hl5C_human'] = ['TEAD1_3kysC_human'];
124724
+ //ic.refpdbHash['1ASF1A_2iijA_human'] = ['ASF1A_2iijA_human', 'TP47_1o75A_bacteria'];
124527
124725
  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'];
124528
124726
  ic.refpdbHash['1CD2_1hnfA_human_C2-n2'] = ['CD2_1hnfA_human_C2-n2', 'Siglec3_5j0bB_human_C1-n2'];
124529
- ic.refpdbHash['1NaCaExchanger_2fwuA_dog_n2'] = ['NaCaExchanger_2fwuA_dog_n2', 'ORF7a_1xakA_virus', 'ECadherin_4zt1A_human_n2'];
124530
- ic.refpdbHash['1NaKATPaseTransporterBeta_2zxeB_spurdogshark'] = ['NaKATPaseTransporterBeta_2zxeB_spurdogshark'];
124727
+ ic.refpdbHash['1ECadherin_4zt1A_human_n2'] = ['ECadherin_4zt1A_human_n2'];
124728
+ //ic.refpdbHash['1NaKATPaseTransporterBeta_2zxeB_spurdogshark'] = ['NaKATPaseTransporterBeta_2zxeB_spurdogshark'];
124531
124729
  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'];
124532
124730
  ic.refpdbHash['1PDL1_4z18B_human_V-n1'] = ['PDL1_4z18B_human_V-n1', 'CD2_1hnfA_human_V-n1', 'LAG3_7tzgD_human_V-n1'];
124533
124731
  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'];
124534
124732
  ic.refpdbHash['1LaminAC_1ifrA_human'] = ['LaminAC_1ifrA_human', 'CD3d_6jxrd_human_C1'];
124535
- ic.refpdbHash['1CD3g_6jxrg_human_C2'] = ['CD3g_6jxrg_human_C2', 'TCRa_6jxrm_human_C1-n2', 'IsdA_2iteA_bacteria'];
124536
- ic.refpdbHash['1CD28_1yjdC_human_V'] = ['CD28_1yjdC_human_V', 'MPT63_1lmiA_bacteria', 'CD3e_6jxrf_human_C1'];
124733
+ ic.refpdbHash['1CD3g_6jxrg_human_C2'] = ['CD3g_6jxrg_human_C2', 'TCRa_6jxrm_human_C1-n2'];
124734
+ ic.refpdbHash['1CD28_1yjdC_human_V'] = ['CD28_1yjdC_human_V', 'CD3e_6jxrf_human_C1'];
124537
124735
  ic.refpdbHash['1CD19_6al5A_human-n1'] = ['CD19_6al5A_human-n1'];
124538
124736
 
124539
- 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'];
124737
+ 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'];
124540
124738
 
124541
124739
  // use known ref structure
124542
124740
  ic.refpdbHash['5ESV_C'] = ['FAB-HEAVY_5esv_V-n1', 'FAB-HEAVY_5esv_C1-n2'];
@@ -124545,36 +124743,36 @@ class Dssp {
124545
124743
  ic.refpdbHash['6JXR_m'] = ['TCRa_6jxrm_human_V-n1', 'TCRa_6jxrm_human_C1-n2'];
124546
124744
  ic.refpdbHash['1HNF_A'] = ['CD2_1hnfA_human_V-n1', 'CD2_1hnfA_human_C2-n2'];
124547
124745
  ic.refpdbHash['7TZG_D'] = ['LAG3_7tzgD_human_V-n1', 'LAG3_7tzgD_human_C1-n2'];
124548
- ic.refpdbHash['6PY8_C'] = ['RBPJ_6py8C_human_Unk-n1', 'RBPJ_6py8C_human_Unk-n2'];
124746
+ //ic.refpdbHash['6PY8_C'] = ['RBPJ_6py8C_human_Unk-n1'];
124549
124747
  ic.refpdbHash['1BQU_B'] = ['IL6Rb_1bquB_human_FN3-n2', 'IL6Rb_1bquB_human_FN3-n3'];
124550
124748
 
124551
- ic.refpdbHash['1R4X_A'] = ['CoAtomerGamma1_1r4xA_human'];
124749
+ //ic.refpdbHash['1R4X_A'] = ['CoAtomerGamma1_1r4xA_human'];
124552
124750
  ic.refpdbHash['6OIL_A'] = ['VISTA_6oilA_human_V'];
124553
- ic.refpdbHash['2ZXE_B'] = ['NaKATPaseTransporterBeta_2zxeB_spurdogshark'];
124554
- ic.refpdbHash['1I8A_A'] = ['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'];
124555
- ic.refpdbHash['2FWU_A'] = ['NaCaExchanger_2fwuA_dog_n2'];
124556
- ic.refpdbHash['4JQI_A'] = ['BArrestin1_4jqiA_rat_n1'];
124751
+ //ic.refpdbHash['2ZXE_B'] = ['NaKATPaseTransporterBeta_2zxeB_spurdogshark'];
124752
+ //ic.refpdbHash['1I8A_A'] = ['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'];
124753
+ //ic.refpdbHash['2FWU_A'] = ['NaCaExchanger_2fwuA_dog_n2'];
124754
+ //ic.refpdbHash['4JQI_A'] = ['BArrestin1_4jqiA_rat_n1'];
124557
124755
  ic.refpdbHash['1NBQ_A'] = ['JAM1_1nbqA_human_Iset-n2'];
124558
- ic.refpdbHash['1O75_A'] = ['TP47_1o75A_bacteria'];
124756
+ //ic.refpdbHash['1O75_A'] = ['TP47_1o75A_bacteria'];
124559
124757
  ic.refpdbHash['7PHR_H'] = ['MHCIa_7phrH_human_C1'];
124560
- ic.refpdbHash['2IIJ_A'] = ['ASF1A_2iijA_human'];
124758
+ //ic.refpdbHash['2IIJ_A'] = ['ASF1A_2iijA_human'];
124561
124759
  ic.refpdbHash['4Z18_B'] = ['PDL1_4z18B_human_V-n1'];
124562
124760
  ic.refpdbHash['1T6V_N'] = ['VNAR_1t6vN_shark_V'];
124563
- ic.refpdbHash['2O6C_A'] = ['TP34_2o6cA_bacteria'];
124564
- ic.refpdbHash['3KYS_C'] = ['TEAD1_3kysC_human'];
124761
+ //ic.refpdbHash['2O6C_A'] = ['TP34_2o6cA_bacteria'];
124762
+ //ic.refpdbHash['3KYS_C'] = ['TEAD1_3kysC_human'];
124565
124763
  ic.refpdbHash['7PHR_L'] = ['B2Microglobulin_7phrL_human_C1'];
124566
124764
  ic.refpdbHash['2AW2_A'] = ['BTLA_2aw2A_human_Iset'];
124567
- ic.refpdbHash['1HL5_C'] = ['CuZnSuperoxideDismutase_1hl5C_human'];
124765
+ //ic.refpdbHash['1HL5_C'] = ['CuZnSuperoxideDismutase_1hl5C_human'];
124568
124766
  ic.refpdbHash['1WF5_A'] = ['Sidekick2_1wf5A_human_FN3-n7'];
124569
124767
  ic.refpdbHash['5J0B_B'] = ['Siglec3_5j0bB_human_C1-n2'];
124570
124768
  ic.refpdbHash['1IFR_A'] = ['LaminAC_1ifrA_human'];
124571
124769
  ic.refpdbHash['Q7Z7D3_A'] = ['VTCN1_Q7Z7D3_human_C1-n2'];
124572
124770
  ic.refpdbHash['4ZQK_B'] = ['PD1_4zqkB_human_V'];
124573
124771
  ic.refpdbHash['2DM3_A'] = ['Palladin_2dm3A_human_Iset-n1'];
124574
- ic.refpdbHash['2ITE_A'] = ['IsdA_2iteA_bacteria'];
124575
- ic.refpdbHash['1XAK_A'] = ['ORF7a_1xakA_virus'];
124772
+ //ic.refpdbHash['2ITE_A'] = ['IsdA_2iteA_bacteria'];
124773
+ //ic.refpdbHash['1XAK_A'] = ['ORF7a_1xakA_virus'];
124576
124774
  ic.refpdbHash['4ZT1_A'] = ['ECadherin_4zt1A_human_n2'];
124577
- ic.refpdbHash['1LMI_A'] = ['MPT63_1lmiA_bacteria'];
124775
+ //ic.refpdbHash['1LMI_A'] = ['MPT63_1lmiA_bacteria'];
124578
124776
  ic.refpdbHash['1CD8_A'] = ['CD8a_1cd8A_human_V'];
124579
124777
  ic.refpdbHash['3S97_C'] = ['Contactin1_3s97C_human_Iset-n2'];
124580
124778
  ic.refpdbHash['1AXI_B'] = ['GHR_1axiB_human_C1-n1'];
@@ -124582,7 +124780,7 @@ class Dssp {
124582
124780
  ic.refpdbHash['2EE2_A'] = ['Contactin1_2ee2A_human_FN3-n9'];
124583
124781
  ic.refpdbHash['4UOW_M'] = ['Titin_4uowM_human_Iset-n152'];
124584
124782
  ic.refpdbHash['6A15_A'] = ['CD19_6al5A_human-n1'];
124585
- ic.refpdbHash['2QKI_D'] = ['C3_2qkiD_human_n1'];
124783
+ //ic.refpdbHash['2QKI_D'] = ['C3_2qkiD_human_n1'];
124586
124784
  ic.refpdbHash['1YJD_C'] = ['CD28_1yjdC_human_V'];
124587
124785
  ic.refpdbHash['6JXR_d'] = ['CD3d_6jxrd_human_C1'];
124588
124786
  ic.refpdbHash['6JXR_f'] = ['CD3e_6jxrf_human_C1'];
@@ -124591,11 +124789,11 @@ class Dssp {
124591
124789
  // assign Ig types
124592
124790
  ic.ref2igtype = {};
124593
124791
 
124594
- ic.ref2igtype['ASF1A_2iijA_human'] = 'IgFN3-like';
124792
+ //ic.ref2igtype['ASF1A_2iijA_human'] = 'IgFN3-like';
124595
124793
  ic.ref2igtype['B2Microglobulin_7phrL_human_C1'] = 'IgC1';
124596
- ic.ref2igtype['BArrestin1_4jqiA_rat_n1'] = 'IgFN3-like';
124794
+ //ic.ref2igtype['BArrestin1_4jqiA_rat_n1'] = 'IgFN3-like';
124597
124795
  ic.ref2igtype['BTLA_2aw2A_human_Iset'] = 'IgI';
124598
- ic.ref2igtype['C3_2qkiD_human_n1'] = 'IgFN3-like';
124796
+ //ic.ref2igtype['C3_2qkiD_human_n1'] = 'IgFN3-like';
124599
124797
  ic.ref2igtype['CD19_6al5A_human-n1'] = 'CD19';
124600
124798
  ic.ref2igtype['CD28_1yjdC_human_V'] = 'IgV';
124601
124799
  ic.ref2igtype['CD2_1hnfA_human_C2-n2'] = 'IgC2';
@@ -124604,12 +124802,12 @@ class Dssp {
124604
124802
  ic.ref2igtype['CD3e_6jxrf_human_C1'] = 'IgC1';
124605
124803
  ic.ref2igtype['CD3g_6jxrg_human_C2'] = 'IgC2';
124606
124804
  ic.ref2igtype['CD8a_1cd8A_human_V'] = 'IgV';
124607
- ic.ref2igtype['CoAtomerGamma1_1r4xA_human'] = 'IgE';
124805
+ //ic.ref2igtype['CoAtomerGamma1_1r4xA_human'] = 'IgE';
124608
124806
  ic.ref2igtype['Contactin1_2ee2A_human_FN3-n9'] = 'IgFN3';
124609
124807
  ic.ref2igtype['Contactin1_3s97C_human_Iset-n2'] = 'IgI';
124610
- ic.ref2igtype['CuZnSuperoxideDismutase_1hl5C_human'] = 'SOD';
124808
+ //ic.ref2igtype['CuZnSuperoxideDismutase_1hl5C_human'] = 'SOD';
124611
124809
  ic.ref2igtype['ECadherin_4zt1A_human_n2'] = 'Cadherin';
124612
- ic.ref2igtype['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'] = 'IgE';
124810
+ //ic.ref2igtype['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'] = 'IgE';
124613
124811
  ic.ref2igtype['FAB-HEAVY_5esv_C1-n2'] = 'IgC1';
124614
124812
  ic.ref2igtype['FAB-HEAVY_5esv_V-n1'] = 'IgV';
124615
124813
  ic.ref2igtype['FAB-LIGHT_5esv_C1-n2'] = 'IgC1';
@@ -124620,28 +124818,28 @@ class Dssp {
124620
124818
  ic.ref2igtype['IL6Rb_1bquB_human_FN3-n3'] = 'IgFN3';
124621
124819
  ic.ref2igtype['InsulinR_8guyE_human_FN3-n1'] = 'IgFN3';
124622
124820
  ic.ref2igtype['InsulinR_8guyE_human_FN3-n2'] = 'IgFN3';
124623
- ic.ref2igtype['IsdA_2iteA_bacteria'] = 'IgE';
124821
+ //ic.ref2igtype['IsdA_2iteA_bacteria'] = 'IgE';
124624
124822
  ic.ref2igtype['JAM1_1nbqA_human_Iset-n2'] = 'IgI';
124625
124823
  ic.ref2igtype['LAG3_7tzgD_human_C1-n2'] = 'IgC1';
124626
124824
  ic.ref2igtype['LAG3_7tzgD_human_V-n1'] = 'IgV';
124627
124825
  ic.ref2igtype['LaminAC_1ifrA_human'] = 'Lamin';
124628
124826
  ic.ref2igtype['MHCIa_7phrH_human_C1'] = 'IgC1';
124629
- ic.ref2igtype['MPT63_1lmiA_bacteria'] = 'IgFN3-like';
124630
- ic.ref2igtype['NaCaExchanger_2fwuA_dog_n2'] = 'IgFN3-like';
124631
- ic.ref2igtype['NaKATPaseTransporterBeta_2zxeB_spurdogshark'] = 'IgE';
124632
- ic.ref2igtype['ORF7a_1xakA_virus'] = 'ORF';
124827
+ //ic.ref2igtype['MPT63_1lmiA_bacteria'] = 'IgFN3-like';
124828
+ //ic.ref2igtype['NaCaExchanger_2fwuA_dog_n2'] = 'IgFN3-like';
124829
+ //ic.ref2igtype['NaKATPaseTransporterBeta_2zxeB_spurdogshark'] = 'IgE';
124830
+ //ic.ref2igtype['ORF7a_1xakA_virus'] = 'ORF';
124633
124831
  ic.ref2igtype['PD1_4zqkB_human_V'] = 'IgV';
124634
124832
  ic.ref2igtype['PDL1_4z18B_human_V-n1'] = 'IgV';
124635
124833
  ic.ref2igtype['Palladin_2dm3A_human_Iset-n1'] = 'IgI';
124636
- ic.ref2igtype['RBPJ_6py8C_human_Unk-n1'] = 'IgFN3-like';
124834
+ //ic.ref2igtype['RBPJ_6py8C_human_Unk-n1'] = 'IgFN3-like';
124637
124835
  //ic.ref2igtype['RBPJ_6py8C_human_Unk-n2'] = 'IgFN3-like';
124638
124836
  ic.ref2igtype['Sidekick2_1wf5A_human_FN3-n7'] = 'IgFN3';
124639
124837
  ic.ref2igtype['Siglec3_5j0bB_human_C1-n2'] = 'IgC1';
124640
124838
  ic.ref2igtype['TCRa_6jxrm_human_C1-n2'] = 'IgC1';
124641
124839
  ic.ref2igtype['TCRa_6jxrm_human_V-n1'] = 'IgV';
124642
- ic.ref2igtype['TEAD1_3kysC_human'] = 'IgFN3-like';
124643
- ic.ref2igtype['TP34_2o6cA_bacteria'] = 'IgE';
124644
- ic.ref2igtype['TP47_1o75A_bacteria'] = 'IgE';
124840
+ //ic.ref2igtype['TEAD1_3kysC_human'] = 'IgFN3-like';
124841
+ //ic.ref2igtype['TP34_2o6cA_bacteria'] = 'IgE';
124842
+ //ic.ref2igtype['TP47_1o75A_bacteria'] = 'IgE';
124645
124843
  ic.ref2igtype['Titin_4uowM_human_Iset-n152'] = 'IgI';
124646
124844
  ic.ref2igtype['VISTA_6oilA_human_V'] = 'IgV';
124647
124845
  ic.ref2igtype['VNAR_1t6vN_shark_V'] = 'IgV';
@@ -124722,6 +124920,7 @@ class Dssp {
124722
124920
  if(!ic.resid2domainid) ic.resid2domainid = {};
124723
124921
  //ic.resid2domainid = {};
124724
124922
  ic.domainid2pdb = {};
124923
+ if(!ic.domainid2sheetEnds) ic.domainid2sheetEnds = {}; // record the end of sheets to check for jellyRoll
124725
124924
 
124726
124925
  let bNoMoreIg = true;
124727
124926
  let bFoundDomain = false;
@@ -124761,6 +124960,15 @@ class Dssp {
124761
124960
 
124762
124961
  ic.domainid2pdb[domainid] = pdb_target;
124763
124962
 
124963
+ ic.domainid2sheetEnds[domainid] = {};
124964
+ for(let m in domainAtomsArray[k]) {
124965
+ let atom = ic.atoms[m];
124966
+ if(atom.ss == 'sheet' && atom.ssend) {
124967
+ let resid = atom.structure + '_' + atom.chain + '_' + atom.resi;
124968
+ ic.domainid2sheetEnds[domainid][resid] = 1;
124969
+ }
124970
+ }
124971
+
124764
124972
  if(!template) {
124765
124973
  for(let index = 0, indexl = dataArray.length; index < indexl; ++index) {
124766
124974
  let struct2 = ic.defaultPdbId + index;
@@ -124948,7 +125156,7 @@ class Dssp {
124948
125156
  }
124949
125157
 
124950
125158
  getTemplateList(domainid) { let ic = this.icn3d; ic.icn3dui;
124951
- let refpdbname = '', score = '', seqid = '', nresAlign = '';
125159
+ let refpdbname = '', score = '', score2 = '', seqid = '', nresAlign = '';
124952
125160
 
124953
125161
  refpdbname = ic.domainid2refpdbname[domainid][0]; // one template in round 2
124954
125162
 
@@ -124958,9 +125166,10 @@ class Dssp {
124958
125166
  score = itemArray[0];
124959
125167
  seqid = itemArray[1];
124960
125168
  nresAlign = itemArray[2];
125169
+ score2 = itemArray[3];
124961
125170
  }
124962
125171
 
124963
- return {'refpdbname': refpdbname, 'score': score, 'seqid': seqid, 'nresAlign': nresAlign};
125172
+ return {'refpdbname': refpdbname, 'score': score, 'score2': score2, 'seqid': seqid, 'nresAlign': nresAlign};
124964
125173
  }
124965
125174
 
124966
125175
  parseAlignData_part1(dataArray, domainidpairArray, bRound1) { let ic = this.icn3d, me = ic.icn3dui;
@@ -125105,7 +125314,7 @@ class Dssp {
125105
125314
 
125106
125315
  // use TM-score alone
125107
125316
  if(!domainid2segs.hasOwnProperty(domainid) || score >= parseFloat(ic.domainid2score[domainid].split('_')[0])) {
125108
- ic.domainid2score[domainid] = queryData[0].score + '_' + queryData[0].frac_identical + '_' + queryData[0].num_res ;
125317
+ ic.domainid2score[domainid] = queryData[0].score + '_' + queryData[0].frac_identical + '_' + queryData[0].num_res + '_' + queryData[0].score2;
125109
125318
 
125110
125319
  if(bRound1) {
125111
125320
  ic.domainid2refpdbname[domainid] = score >= this.TMThresholdIgType ? [refpdbname] : ['all_templates'];
@@ -125285,6 +125494,7 @@ class Dssp {
125285
125494
  let result = this.getTemplateList(domainid);
125286
125495
  let refpdbname = result.refpdbname;
125287
125496
  let score = result.score;
125497
+ let score2 = result.score2;
125288
125498
  let seqid = result.seqid;
125289
125499
  let nresAlign = result.nresAlign;
125290
125500
 
@@ -125297,7 +125507,7 @@ class Dssp {
125297
125507
  }
125298
125508
 
125299
125509
  // ic.refPdbList.push(message);
125300
- ic.domainid2info[domainid] = {'refpdbname': refpdbname, 'score': score, 'seqid': seqid, 'nresAlign': nresAlign};
125510
+ ic.domainid2info[domainid] = {'refpdbname': refpdbname, 'score': score, 'score2': score2, 'seqid': seqid, 'nresAlign': nresAlign};
125301
125511
  }
125302
125512
 
125303
125513
  // adjust C' and D strands ======start
@@ -126180,6 +126390,7 @@ class Dssp {
126180
126390
  }
126181
126391
  else {
126182
126392
  let bBefore = false, bInRange= false, bAfter = false;
126393
+ /*
126183
126394
  // 100, 100A
126184
126395
  if(parseInt(currResi) == parseInt(strandArray[strandCnt].startResi) && currResi != strandArray[strandCnt].startResi) {
126185
126396
  bBefore = currResi < strandArray[strandCnt].startResi;
@@ -126195,6 +126406,14 @@ class Dssp {
126195
126406
  else {
126196
126407
  bAfter = parseInt(currResi) > parseInt(strandArray[strandCnt].endResi);
126197
126408
  }
126409
+ */
126410
+
126411
+ let currResiNcbi = ic.ParserUtilsCls.getResiNCBI(chnid, currResi);
126412
+ let startResiNcbi = ic.ParserUtilsCls.getResiNCBI(chnid, strandArray[strandCnt].startResi);
126413
+ let endResiNcbi = ic.ParserUtilsCls.getResiNCBI(chnid, strandArray[strandCnt].endResi);
126414
+
126415
+ bBefore = parseInt(currResiNcbi) < parseInt(startResiNcbi);
126416
+ bAfter = parseInt(currResiNcbi) > parseInt(endResiNcbi);
126198
126417
 
126199
126418
  bInRange = (!bBefore && !bAfter) ? true : false;
126200
126419
 
@@ -126647,7 +126866,7 @@ console.log("free energy: " + energy + " kcal/mol");
126647
126866
  me.alertAlt = true;
126648
126867
 
126649
126868
  //if(ic.bRender) var aaa = 1; //alert('Please press the letter "a" to alternate between wild type and mutant.');
126650
- var aaa = 1; //alert('Please press the letter "a" to alternate between wild type and mutant.');
126869
+ var aaa = 1; //alert('Please press the letter "a" or SHIFT + "a" to alternate between wild type and mutant.');
126651
126870
  }
126652
126871
  }
126653
126872
 
@@ -132013,8 +132232,9 @@ class ShareLink {
132013
132232
  }
132014
132233
 
132015
132234
  let paraHash = {};
132016
- for(let key in ic.cfg) {
132017
- let value = ic.cfg[key];
132235
+ /*
132236
+ for(let key in me.cfg) {
132237
+ let value = me.cfg[key];
132018
132238
  //if(key === 'inpara' || ic.key === 'command' || value === undefined) continue;
132019
132239
  if(key === 'inpara' || key === 'command' || key === 'usepdbnum'
132020
132240
  || key === 'date' || key === 'v' || value === undefined) continue;
@@ -132064,7 +132284,7 @@ class ShareLink {
132064
132284
  paraHash[key] = value;
132065
132285
  }
132066
132286
  }
132067
-
132287
+ */
132068
132288
  if(ic.bAfMem) {
132069
132289
  paraHash['afmem'] = 'on';
132070
132290
  }
@@ -132086,6 +132306,12 @@ class ShareLink {
132086
132306
  if(key_value.length == 2) paraHash[key_value[0]] = key_value[1];
132087
132307
  }
132088
132308
 
132309
+ // BLAST RID is usually added at the end of the URL. It should be included.
132310
+ if(me.cfg.rid && !paraHash['RID']) {
132311
+ url += 'RID=' + me.cfg.rid + '&';
132312
+ }
132313
+
132314
+ // sometimes idname is not part of the URL
132089
132315
  if(me.cfg.idname && !paraHash[me.cfg.idname]) { // somehow it is not included
132090
132316
  url += me.cfg.idname + '=' + me.cfg.idvalue + '&';
132091
132317
  }
@@ -135199,7 +135425,7 @@ class iCn3DUI {
135199
135425
  //even when multiple iCn3D viewers are shown together.
135200
135426
  this.pre = this.cfg.divid + "_";
135201
135427
 
135202
- this.REVISION = '3.47.0';
135428
+ this.REVISION = '3.48.0';
135203
135429
 
135204
135430
  // In nodejs, iCn3D defines "window = {navigator: {}}", and added window = {navigator: {}, "__THREE__":"177"}
135205
135431
  this.bNode = (Object.keys(window).length < 3) ? true : false;
@@ -135401,14 +135627,8 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
135401
135627
  let domainidArray = me.cfg.matchedchains.split(',');
135402
135628
  let chainidArray = [];
135403
135629
  for(let i = 0, il = domainidArray.length; i < il; ++i) {
135404
- let pos = domainidArray[i].lastIndexOf('_');
135405
- let lastId = domainidArray[i].substr(pos + 1);
135406
- if(!isNaN(lastId)) { // lastId is domain id
135407
- chainidArray.push(domainidArray[i].substr(0, pos));
135408
- }
135409
- else {
135410
- chainidArray.push(domainidArray[i]);
135411
- }
135630
+ let idArray = domainidArray[i].split('_');
135631
+ chainidArray.push(idArray[0] + '_' + idArray[1]);
135412
135632
  }
135413
135633
 
135414
135634
  // get the matched structures, do not include the template
@@ -135637,6 +135857,9 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
135637
135857
  if(me.cfg.align.indexOf('185055,') != -1) {
135638
135858
  me.cfg.align = me.cfg.align.replace('185055,', '199731,'); //the mmdbid of PDB 6M17 was changed from 185055 to 199731
135639
135859
  }
135860
+ else if(me.cfg.align == '54567,1,12161,1,2,1') {
135861
+ me.cfg.align = '3HHR,1BQU'; // somehow the VAST+ data for this published alignment were not there anymore
135862
+ }
135640
135863
 
135641
135864
  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]
135642
135865