icn3d 3.29.9 → 3.29.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/icn3d.js CHANGED
@@ -7378,6 +7378,8 @@ class ClickMenu {
7378
7378
  thisClass.setLogCmd('ig refnum on', true);
7379
7379
  // await ic.refnumCls.showIgRefNum();
7380
7380
  // thisClass.setLogCmd('set annotation ig', true);
7381
+ if(!ic.bAnnoShown) await ic.showAnnoCls.showAnnotations();
7382
+
7381
7383
  let bSelection = true;
7382
7384
  await ic.annotationCls.setAnnoTabIg(bSelection);
7383
7385
 
@@ -7402,6 +7404,7 @@ class ClickMenu {
7402
7404
  thisClass.setLogCmd('ig template ' + template, true);
7403
7405
  let bSelection = true;
7404
7406
  // await ic.refnumCls.showIgRefNum(template);
7407
+ if(!ic.bAnnoShown) await ic.showAnnoCls.showAnnotations();
7405
7408
  await ic.annotationCls.setAnnoTabIg(bSelection, template);
7406
7409
  });
7407
7410
 
@@ -9527,8 +9530,8 @@ class SetMenu {
9527
9530
  //}
9528
9531
 
9529
9532
  //!!!
9530
- //html += this.getRadio('mn4_clr', 'mn4_clrIgstrand', 'Ig Strand', undefined, undefined, 2);
9531
- //html += this.getRadio('mn4_clr', 'mn4_clrIgproto', 'Ig Protodomain', undefined, undefined, 2);
9533
+ // html += this.getRadio('mn4_clr', 'mn4_clrIgstrand', 'Ig Strand', undefined, undefined, 2);
9534
+ // html += this.getRadio('mn4_clr', 'mn4_clrIgproto', 'Ig Protodomain', undefined, undefined, 2);
9532
9535
  }
9533
9536
  else {
9534
9537
  //if(!me.cfg.hidelicense) html += this.getRadio('mn4_clr', 'mn1_delphi2', 'DelPhi<br><span style="padding-left:1.5em;">Potential ' + me.htmlCls.licenseStr + '</span>');
@@ -9659,7 +9662,7 @@ class SetMenu {
9659
9662
  html += this.getRadio('mn6_addlabel', 'mn6_addlabelResidues', 'per Residue', undefined, 1, 2);
9660
9663
  html += this.getRadio('mn6_addlabel', 'mn6_addlabelResnum', 'per Residue & Number', undefined, 1, 2);
9661
9664
  //!!!
9662
- //html += this.getRadio('mn6_addlabel', 'mn6_addlabelRefnum', 'per Reference Number', undefined, 1, 2);
9665
+ // html += this.getRadio('mn6_addlabel', 'mn6_addlabelRefnum', 'per Reference Number', undefined, 1, 2);
9663
9666
  html += this.getRadio('mn6_addlabel', 'mn6_addlabelChains', 'per Chain', undefined, undefined, 2);
9664
9667
  html += this.getRadio('mn6_addlabel', 'mn6_addlabelTermini', 'N- & C-Termini', undefined, 1, 2);
9665
9668
  }
@@ -9757,8 +9760,9 @@ class SetMenu {
9757
9760
  html += this.getLink('mn6_igrefYes', 'Show Ig for Selection', undefined, 2);
9758
9761
  html += this.getLink('mn6_igrefTpl', 'Ig w/ Specified Template', undefined, 2);
9759
9762
  html += this.getLink('mn6_igrefNo', 'Reset Ig Ref. Number', undefined, 2);
9760
- */
9763
+
9761
9764
  html += this.getMenuSep();
9765
+ */
9762
9766
 
9763
9767
  html += this.getLink('mn6_customref', 'Custom Ref. Number', undefined, 2);
9764
9768
  html += "</ul>";
@@ -14694,6 +14698,14 @@ class Events {
14694
14698
  thisClass.setLogCmd('define igloop sets | chain ' + chainid, true);
14695
14699
  });
14696
14700
 
14701
+ $(document).on("click", ".icn3d-igdomainsets", function(e) { let ic = me.icn3d;
14702
+ e.stopImmediatePropagation();
14703
+ //e.preventDefault();
14704
+ let chainid = $(this).attr('chainid');
14705
+ ic.addTrackCls.defineIgstrand(chainid, 'igdomain');
14706
+ thisClass.setLogCmd('define igdomain sets | chain ' + chainid, true);
14707
+ });
14708
+
14697
14709
  me.myEventCls.onIds("#" + me.pre + "deletesets", "click", function(e) { let ic = me.icn3d;
14698
14710
  ic.definedSetsCls.deleteSelectedSets();
14699
14711
  thisClass.setLogCmd("delete selected sets", true);
@@ -32473,7 +32485,7 @@ class Instancing {
32473
32485
  }
32474
32486
 
32475
32487
  if(ic.mdlImpostor !== undefined) {
32476
- // after three.js version 128, the cylinder impostor seemed to have a problem in cloning!!!
32488
+ // after three.js version 128, the cylinder impostor seemed to have a problem in cloning
32477
32489
  symmetryMate = ic.mdlImpostor.clone();
32478
32490
  //symmetryMate.applyMatrix(mat);
32479
32491
  this.applyMat(symmetryMate, mat);
@@ -36832,7 +36844,13 @@ class AnnoCddSite {
36832
36844
 
36833
36845
  if(me.cfg.blast_rep_id != chnid) { // regular
36834
36846
  for(let i = 0, il = fromArray.length; i < il; ++i) {
36835
- let emptyWidth =(i == 0) ? Math.round(ic.seqAnnWidth *(fromArray[i] - ic.baseResi[chnid] - 1) / ic.maxAnnoLength) : Math.round(ic.seqAnnWidth *(fromArray[i] - toArray[i-1] - 1) / ic.maxAnnoLength);
36847
+ let emptyWidth;
36848
+ if(titleArray) {
36849
+ emptyWidth =(i == 0) ? Math.round(ic.seqAnnWidth *(fromArray[i]) / ic.maxAnnoLength) : Math.round(ic.seqAnnWidth *(fromArray[i] - toArray[i-1] - 1) / ic.maxAnnoLength);
36850
+ }
36851
+ else {
36852
+ emptyWidth =(i == 0) ? Math.round(ic.seqAnnWidth *(fromArray[i] - ic.baseResi[chnid] - 1) / ic.maxAnnoLength) : Math.round(ic.seqAnnWidth *(fromArray[i] - toArray[i-1] - 1) / ic.maxAnnoLength);
36853
+ }
36836
36854
 
36837
36855
  html2 += '<div style="display:inline-block; width:' + emptyWidth + 'px;">&nbsp;</div>';
36838
36856
  html2 += '<div style="display:inline-block; color:white!important; font-weight:bold; background-color:#' + color + '; width:' + Math.round(ic.seqAnnWidth *(toArray[i] - fromArray[i] + 1) / ic.maxAnnoLength) + 'px;" class="icn3d-seqTitle ' + linkStr + '" ' + type + '="' +(index+1).toString() + '" from="' + fromArray + '" to="' + toArray + '" shorttitle="' + title + '" index="' + index + '" setname="' + setname + '" id="' + chnid + '_domain_' + index + '_' + r + '" anno="sequence" chain="' + chnid + '" title="' + fulltitle + '">' + domain + ' </div>';
@@ -38086,7 +38104,7 @@ class AnnoIg {
38086
38104
  refnumLabel = ic.resid2refnum[residueid];
38087
38105
  let bHidelabel = false;
38088
38106
 
38089
- if(refnumLabel) {
38107
+ if(refnumLabel) {
38090
38108
  refnumStr_ori = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
38091
38109
  currStrand = refnumLabel.replace(new RegExp(refnumStr_ori,'g'), '');
38092
38110
  currStrand_ori = currStrand;
@@ -38118,8 +38136,9 @@ class AnnoIg {
38118
38136
 
38119
38137
  igElem = {};
38120
38138
  igElem.startPos = i;
38121
- igElem.domainid = domainid;
38122
38139
  }
38140
+
38141
+ if(domainid) igElem.domainid = domainid;
38123
38142
 
38124
38143
  if(bCustom) {
38125
38144
  if(!refnumStr) {
@@ -38234,7 +38253,7 @@ class AnnoIg {
38234
38253
  html += '</div>';
38235
38254
  html += '</div>';
38236
38255
 
38237
- let igArray = ic.chain2igArray[chnid];
38256
+ let igArray = ic.chain2igArray[chnid];
38238
38257
  if(igArray.length == 0) return {html: '', html2: '', html3: ''};
38239
38258
  let rangeArray = [], titleArray = [], fullTitleArray = [], domainArray = [];
38240
38259
  for(let i = 0, il = igArray.length; i < il; ++i) {
@@ -38262,10 +38281,10 @@ class AnnoIg {
38262
38281
  let colorStr =(atom.color === undefined || atom.color.getHexString() === 'FFFFFF') ? 'DDDDDD' : atom.color.getHexString();
38263
38282
  let color =(atom.color !== undefined) ? colorStr : "CCCCCC";
38264
38283
 
38265
- let emptyWidth =(i == 0) ? Math.round(ic.seqAnnWidth *(fromArray[i] - ic.baseResi[chnid] - 1) / ic.maxAnnoLength) :
38284
+ let emptyWidth =(i == 0) ? Math.round(ic.seqAnnWidth *(fromArray[i]) / ic.maxAnnoLength) :
38266
38285
  Math.round(ic.seqAnnWidth *(fromArray[i] - toArray[i-1] - 1) / ic.maxAnnoLength);
38267
38286
  html2 += '<div style="display:inline-block; width:' + emptyWidth + 'px;">&nbsp;</div>';
38268
- html2 += '<div style="display:inline-block; color:white!important; font-weight:bold; background-color:#' + color + '; width:' + Math.round(ic.seqAnnWidth *(toArray[i] - fromArray[i] + 1) / ic.maxAnnoLength) + 'px;" class="icn3d-seqTitle ' + linkStr + '" ig="0" from="' + fromArray + '" to="' + toArray + '" shorttitle="' + domainArray[i] + '" index="0" setname="' + chnid + '_igs" id="' + chnid + '_igs" anno="sequence" chain="' + chnid + '" title="' + domainArray[i] + '">' + domainArray[i] + ' </div>';
38287
+ html2 += '<div style="display:inline-block; color:white!important; font-weight:bold; background-color:#' + color + '; width:' + Math.round(ic.seqAnnWidth *(toArray[i] - fromArray[i] + 1) / ic.maxAnnoLength) + 'px;" class="icn3d-seqTitle ' + linkStr + '" ig="0" from="' + fromArray + '" to="' + toArray + '" shorttitle="' + domainArray[i] + '" index="0" setname="' + chnid + '_igs" id="' + chnid + '_igs" anno="sequence" chain="' + chnid + '" title="' + domainArray[i] + '">' + domainArray[i] + ' </div>';
38269
38288
  }
38270
38289
 
38271
38290
  html2 += htmlCnt;
@@ -41589,91 +41608,115 @@ class AddTrack {
41589
41608
  let selectedResidues = {};
41590
41609
  let bUnion = false, bUpdateHighlight = true;
41591
41610
 
41592
- let strandCnt = 0, loopCnt = 0;
41593
- let setName, currStrand, prevStrand, prevStrandReal = 'NT', currType, prevType;
41594
-
41595
41611
  // clear selection
41596
41612
  ic.hAtoms = {};
41597
41613
 
41598
- let bStart = false;
41614
+ if(type == 'igdomain') {
41615
+ let igArray = ic.chain2igArray[chainid];
41599
41616
 
41600
- for(let i = 0, il = ic.chainsSeq[chainid].length; i < il; ++i) {
41601
- let currResi = ic.chainsSeq[chainid][i].resi;
41602
- let resid = chainid + '_' + currResi;
41603
-
41604
- if(!ic.residues.hasOwnProperty(resid) ) continue;
41605
-
41606
- let refnumLabel, refnumStr, refnum;
41607
- refnumLabel = ic.resid2refnum[resid];
41608
- if(!refnumLabel) continue;
41617
+ if(igArray && igArray.length > 0) {
41618
+
41619
+ for(let i = 0, il = igArray.length; i < il; ++i) {
41620
+ let startPos = igArray[i].startPos;
41621
+ let endPos = igArray[i].endPos;
41622
+ let domainid = igArray[i].domainid;
41609
41623
 
41610
- refnumStr = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
41611
- currStrand = refnumLabel.replace(refnumStr, '');
41612
- refnum = parseInt(refnumStr);
41624
+ selectedResidues = {};
41625
+ for(let j = parseInt(startPos); j <= parseInt(endPos); ++j) {
41626
+ let currResi = ic.chainsSeq[chainid][j].resi;
41627
+ let resid = chainid + '_' + currResi;
41628
+ selectedResidues[resid] = 1;
41629
+ }
41613
41630
 
41614
- if(type == 'iganchor') {
41615
- if(refnum > 1000 && refnumStr.substr(refnumStr.length - 2, 2) == '50') {
41616
- selectedResidues[resid] = 1;
41617
- }
41618
- }
41619
- else {
41620
- if(ic.residIgLoop.hasOwnProperty(resid)) {
41621
- currType = 'igloop';
41631
+ let setName = domainid;
41632
+ ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
41622
41633
  }
41634
+ }
41635
+ }
41636
+ else {
41637
+ let strandCnt = 0, loopCnt = 0;
41638
+ let setName, currStrand, prevStrand, prevStrandReal = 'NT', currType, prevType;
41639
+
41640
+ let bStart = false;
41641
+
41642
+ for(let i = 0, il = ic.chainsSeq[chainid].length; i < il; ++i) {
41643
+ let currResi = ic.chainsSeq[chainid][i].resi;
41644
+ let resid = chainid + '_' + currResi;
41645
+
41646
+ if(!ic.residues.hasOwnProperty(resid) ) continue;
41647
+
41648
+ let refnumLabel, refnumStr, refnum;
41649
+ refnumLabel = ic.resid2refnum[resid];
41650
+ if(!refnumLabel) continue;
41651
+
41652
+ refnumStr = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
41653
+ currStrand = refnumLabel.replace(refnumStr, '');
41654
+ refnum = parseInt(refnumStr);
41655
+
41656
+ if(type == 'iganchor') {
41657
+ if(refnum > 1000 && refnumStr.substr(refnumStr.length - 2, 2) == '50') {
41658
+ selectedResidues[resid] = 1;
41659
+ }
41660
+ }
41623
41661
  else {
41624
- currType = 'igstrand';
41625
- }
41662
+ if(ic.residIgLoop.hasOwnProperty(resid)) {
41663
+ currType = 'igloop';
41664
+ }
41665
+ else {
41666
+ currType = 'igstrand';
41667
+ }
41626
41668
 
41627
- if(bStart && currType != prevType && Object.keys(selectedResidues).length > 0) {
41628
- if(prevType == 'igstrand') {
41629
- ++strandCnt;
41630
- setName = 'Strand-' + prevStrand + '-' + chainid + '-' + strandCnt.toString().padStart(3, '0');
41631
- setName = setName.replace(/'/g, '`');
41632
- if(type == 'igstrand') {
41633
- ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
41634
- if(!bUnion) bUnion = true;
41669
+ if(bStart && currType != prevType && Object.keys(selectedResidues).length > 0) {
41670
+ if(prevType == 'igstrand') {
41671
+ ++strandCnt;
41672
+ setName = 'Strand-' + prevStrand + '-' + chainid + '-' + strandCnt.toString().padStart(3, '0');
41673
+ setName = setName.replace(/'/g, '`');
41674
+ if(type == 'igstrand') {
41675
+ ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
41676
+ if(!bUnion) bUnion = true;
41677
+ }
41678
+ prevStrandReal = prevStrand;
41635
41679
  }
41636
- prevStrandReal = prevStrand;
41637
- }
41638
- else if(prevType == 'igloop') {
41639
- ++loopCnt;
41640
- setName = 'Loop-' + prevStrandReal + '_' + currStrand + '-' + chainid + '-' + loopCnt.toString().padStart(3, '0');
41641
- setName = setName.replace(/'/g, '`');
41642
- if(type == 'igloop') {
41643
- ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
41644
- if(!bUnion) bUnion = true;
41680
+ else if(prevType == 'igloop') {
41681
+ ++loopCnt;
41682
+ setName = 'Loop-' + prevStrandReal + '_' + currStrand + '-' + chainid + '-' + loopCnt.toString().padStart(3, '0');
41683
+ setName = setName.replace(/'/g, '`');
41684
+ if(type == 'igloop') {
41685
+ ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
41686
+ if(!bUnion) bUnion = true;
41687
+ }
41645
41688
  }
41646
- }
41647
41689
 
41648
- selectedResidues = {};
41649
- }
41690
+ selectedResidues = {};
41691
+ }
41650
41692
 
41651
- selectedResidues[resid] = 1;
41693
+ selectedResidues[resid] = 1;
41652
41694
 
41653
- prevStrand = currStrand;
41654
- prevType = currType;
41695
+ prevStrand = currStrand;
41696
+ prevType = currType;
41655
41697
 
41656
- bStart = true;
41657
- }
41658
- } // for loop
41698
+ bStart = true;
41699
+ }
41700
+ } // for loop
41659
41701
 
41660
- if(type == 'iganchor') {
41661
- setName = 'Anchor-' + chainid;
41662
- ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
41663
- }
41664
- else {
41665
- if(prevType == 'igstrand') {
41666
- ++strandCnt;
41667
- setName = 'Strand-' + prevStrand + '-' + chainid + '-' + strandCnt.toString().padStart(3, '0');
41668
- setName = setName.replace(/'/g, '`');
41669
- if(type == 'igstrand') ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
41702
+ if(type == 'iganchor') {
41703
+ setName = 'Anchor-' + chainid;
41704
+ ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
41670
41705
  }
41671
- else if(prevType == 'igloop') {
41672
- ++loopCnt;
41673
- currStrand = 'CT';
41674
- setName = 'Loop-' + prevStrandReal + '_' + currStrand + '-' + chainid + '-' + loopCnt.toString().padStart(3, '0');
41675
- setName = setName.replace(/'/g, '`');
41676
- if(type == 'igloop') ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
41706
+ else {
41707
+ if(prevType == 'igstrand') {
41708
+ ++strandCnt;
41709
+ setName = 'Strand-' + prevStrand + '-' + chainid + '-' + strandCnt.toString().padStart(3, '0');
41710
+ setName = setName.replace(/'/g, '`');
41711
+ if(type == 'igstrand') ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
41712
+ }
41713
+ else if(prevType == 'igloop') {
41714
+ ++loopCnt;
41715
+ currStrand = 'CT';
41716
+ setName = 'Loop-' + prevStrandReal + '_' + currStrand + '-' + chainid + '-' + loopCnt.toString().padStart(3, '0');
41717
+ setName = setName.replace(/'/g, '`');
41718
+ if(type == 'igloop') ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
41719
+ }
41677
41720
  }
41678
41721
  }
41679
41722
  }
@@ -43532,10 +43575,12 @@ class ShowAnno {
43532
43575
  + this.addButton(chnid, "icn3d-sheetsets", "Sheet Sets", "Define sets for each sheet in this chain and add them to the menu of \"Defined Sets\"", 60, buttonStyle) + "&nbsp;"
43533
43576
  + this.addButton(chnid, "icn3d-coilsets", "Coil Sets", "Define sets for each coil in this chain and add them to the menu of \"Defined Sets\"", 60, buttonStyle);
43534
43577
 
43535
- if(ic.bShowRefnum && ic.chainid2refpdbname.hasOwnProperty(chnid) && ic.chainid2refpdbname[chnid].length > 0) {
43536
- chainHtml += "&nbsp;&nbsp;&nbsp;" + this.addButton(chnid, "icn3d-iganchorsets", "Ig Anchor Set", "Define the set for all Ig anchors in this chain and add them to the menu of \"Defined Sets\"", 80, buttonStyle) + "&nbsp;" + this.addButton(chnid, "icn3d-igstrandsets", "Ig Strand Sets", "Define sets for each Ig strand in this chain and add them to the menu of \"Defined Sets\"", 80, buttonStyle) + "&nbsp;"
43537
- + this.addButton(chnid, "icn3d-igloopsets", "Ig Loop Sets", "Define sets for each Ig loop in this chain and add them to the menu of \"Defined Sets\"", 80, buttonStyle);
43538
- }
43578
+ // if(ic.bShowRefnum && ic.chainid2refpdbname.hasOwnProperty(chnid) && ic.chainid2refpdbname[chnid].length > 0) {
43579
+ chainHtml += "&nbsp;&nbsp;&nbsp;" + this.addButton(chnid, "icn3d-iganchorsets", "Ig Anchor Set", "Define the set for all Ig anchors in this chain and add them to the menu of \"Defined Sets\"", 80, buttonStyle) + "&nbsp;"
43580
+ + this.addButton(chnid, "icn3d-igstrandsets", "Ig Strand Sets", "Define sets for each Ig strand in this chain and add them to the menu of \"Defined Sets\"", 80, buttonStyle) + "&nbsp;"
43581
+ + this.addButton(chnid, "icn3d-igloopsets", "Ig Loop Sets", "Define sets for each Ig loop in this chain and add them to the menu of \"Defined Sets\"", 80, buttonStyle) + "&nbsp;"
43582
+ + this.addButton(chnid, "icn3d-igdomainsets", "Ig Domain Sets", "Define sets for each Ig domain in this chain and add them to the menu of \"Defined Sets\"", 80, buttonStyle);
43583
+ // }
43539
43584
  $("#" + ic.pre + "dl_annotations").append(chainHtml);
43540
43585
  //let itemArray = ['giseq', 'cdd', 'clinvar', 'snp', 'domain', 'site', 'ptm', 'interaction', 'custom', 'ssbond', 'crosslink', 'transmem'];
43541
43586
  let itemArray = ['giseq', 'cdd', 'clinvar', 'snp', 'site', 'ptm', 'ssbond', 'crosslink', 'transmem', 'domain', 'custom', 'interaction', 'ig'];
@@ -60178,6 +60223,7 @@ class ApplyCommand {
60178
60223
  await ic.annotationCls.setAnnoTabIg();
60179
60224
  }
60180
60225
  else if(command == 'ig refnum on') {
60226
+ if(!ic.bAnnoShown) await ic.showAnnoCls.showAnnotations();
60181
60227
  await ic.annotationCls.setAnnoTabIg(true);
60182
60228
  }
60183
60229
  else if(command == 'highlight level up') {
@@ -62667,6 +62713,7 @@ class LoadScript {
62667
62713
  else if(command.indexOf('ig template') == 0 ) {
62668
62714
  let template = command.substr(command.lastIndexOf(' ') + 1);
62669
62715
  // await ic.refnumCls.showIgRefNum(template);
62716
+ if(!ic.bAnnoShown) await ic.showAnnoCls.showAnnotations();
62670
62717
  await ic.annotationCls.setAnnoTabIg(true, template);
62671
62718
  }
62672
62719
  else if(command.indexOf('set annotation 3ddomain') == 0) { // the command may have "|||{"factor"...
@@ -62870,6 +62917,7 @@ class LoadScript {
62870
62917
  }
62871
62918
  else if(lastCommand.indexOf('ig refnum on') == 0) {
62872
62919
  // await ic.refnumCls.showIgRefNum();
62920
+ if(!ic.bAnnoShown) await ic.showAnnoCls.showAnnotations();
62873
62921
  await ic.annotationCls.setAnnoTabIg(true);
62874
62922
  }
62875
62923
  else if(lastCommand.indexOf('set annotation 3ddomain') == 0) {
@@ -62996,7 +63044,7 @@ class LoadScript {
62996
63044
  let idNew = '';
62997
63045
  for(let i = 0, il = idArray.length; i < il; ++i) {
62998
63046
  if(!(ic.structures && ic.structures.hasOwnProperty(idArray[i]))) {
62999
- if(!idNew) idNew += ',';
63047
+ if(idNew) idNew += ',';
63000
63048
  idNew += idArray[i];
63001
63049
  }
63002
63050
  }
@@ -65917,7 +65965,9 @@ class Dssp {
65917
65965
  ic.refpdbHash['1LaminAC_1ifrA_human'] = ['LaminAC_1ifrA_human', 'CD3d_6jxrd_human_Iset'];
65918
65966
  ic.refpdbHash['1CD3g_6jxrg_human_Iset'] = ['CD3g_6jxrg_human_Iset', 'TCRa_6jxrm_human_C1-n2', 'IsdA_2iteA_bacteria'];
65919
65967
  ic.refpdbHash['1CD28_1yjdC_human_V'] = ['CD28_1yjdC_human_V', 'MPT63_1lmiA_bacteria', 'CD3e_6jxrf_human_Iset'];
65920
- ic.refpdbHash['1CD19_6al5A_human_C2orV-n1'] = ['CD19_6al5A_human_C2orV-n1'];
65968
+ ic.refpdbHash['1CD19_6al5A_human_C2orV-n1'] = ['CD19_6al5A_human_C2orV-n1'];
65969
+
65970
+ 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_C2orV-n1', 'CD28_1yjdC_human_V', 'CD2_1hnfA_human_C2-n2', 'CD2_1hnfA_human_V-n1', 'CD3d_6jxrd_human_Iset', 'CD3e_6jxrf_human_Iset', 'CD3g_6jxrg_human_Iset', 'CD8a_1cd8A_human_V', 'CoAtomerGamma1_1r4xA_human', 'Contactin1_2ee2A_human_FN3-n9', 'Contactin1_3s97C_human_C2-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_FN3-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_VorIset-n2', 'LAG3_7tzgD_human_C2-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_C2-n2', 'TCRa_6jxrm_human_C1-n2', 'TCRa_6jxrm_human_V-n1', 'TEAD1_3kysC_human', 'TP34_2o6cA_bacteria', 'TP47_1o75A_bacteria', 'Titin_4uowM_human_Unk-n152', 'VISTA_6oilA_human_V', 'VNAR_1t6vN_shark_V', 'VTCN1_Q7Z7D3_human_V-n2'];
65921
65971
 
65922
65972
  // use known ref structure
65923
65973
  ic.refpdbHash['5ESV_C'] = ['FAB-HEAVY_5esv_V-n1', 'FAB-HEAVY_5esv_C1-n2'];
@@ -65974,9 +66024,9 @@ class Dssp {
65974
66024
 
65975
66025
  ic.ref2igtype['ASF1A_2iijA_human'] = 'IgE';
65976
66026
  ic.ref2igtype['B2Microglobulin_7phrL_human_C1'] = 'IgC1';
65977
- ic.ref2igtype['BArrestin1_4jqiA_rat_n1'] = 'IgFn3-like';
66027
+ ic.ref2igtype['BArrestin1_4jqiA_rat_n1'] = 'IgFN3-like';
65978
66028
  ic.ref2igtype['BTLA_2aw2A_human_Iset'] = 'IgI';
65979
- ic.ref2igtype['C3_2qkiD_human_n1'] = 'IgFn3-like';
66029
+ ic.ref2igtype['C3_2qkiD_human_n1'] = 'IgFN3-like';
65980
66030
  ic.ref2igtype['CD19_6al5A_human_C2orV-n1'] = 'other Ig'; //'CD19';
65981
66031
  ic.ref2igtype['CD28_1yjdC_human_V'] = 'IgV';
65982
66032
  ic.ref2igtype['CD2_1hnfA_human_C2-n2'] = 'IgC2';
@@ -65986,7 +66036,7 @@ class Dssp {
65986
66036
  ic.ref2igtype['CD3g_6jxrg_human_Iset'] = 'IgI';
65987
66037
  ic.ref2igtype['CD8a_1cd8A_human_V'] = 'IgV';
65988
66038
  ic.ref2igtype['CoAtomerGamma1_1r4xA_human'] = 'IgE';
65989
- ic.ref2igtype['Contactin1_2ee2A_human_FN3-n9'] = 'IgFn3';
66039
+ ic.ref2igtype['Contactin1_2ee2A_human_FN3-n9'] = 'IgFN3';
65990
66040
  ic.ref2igtype['Contactin1_3s97C_human_C2-n2'] = 'IgC2';
65991
66041
  ic.ref2igtype['CuZnSuperoxideDismutase_1hl5C_human'] = 'other Ig'; //'SOD';
65992
66042
  ic.ref2igtype['ECadherin_4zt1A_human_n2'] = 'other Ig'; //'Cadherin';
@@ -65995,12 +66045,12 @@ class Dssp {
65995
66045
  ic.ref2igtype['FAB-HEAVY_5esv_V-n1'] = 'IgV';
65996
66046
  ic.ref2igtype['FAB-LIGHT_5esv_C1-n2'] = 'IgC1';
65997
66047
  ic.ref2igtype['FAB-LIGHT_5esv_V-n1'] = 'IgV';
65998
- ic.ref2igtype['GHR_1axiB_human_FN3-n1'] = 'IgFn3';
66048
+ ic.ref2igtype['GHR_1axiB_human_FN3-n1'] = 'IgFN3';
65999
66049
  ic.ref2igtype['ICOS_6x4gA_human_V'] = 'IgV';
66000
- ic.ref2igtype['IL6Rb_1bquB_human_FN3-n2'] = 'IgFn3';
66001
- ic.ref2igtype['IL6Rb_1bquB_human_FN3-n3'] = 'IgFn3';
66002
- ic.ref2igtype['InsulinR_8guyE_human_FN3-n1'] = 'IgFn3';
66003
- ic.ref2igtype['InsulinR_8guyE_human_FN3-n2'] = 'IgFn3';
66050
+ ic.ref2igtype['IL6Rb_1bquB_human_FN3-n2'] = 'IgFN3';
66051
+ ic.ref2igtype['IL6Rb_1bquB_human_FN3-n3'] = 'IgFN3';
66052
+ ic.ref2igtype['InsulinR_8guyE_human_FN3-n1'] = 'IgFN3';
66053
+ ic.ref2igtype['InsulinR_8guyE_human_FN3-n2'] = 'IgFN3';
66004
66054
  ic.ref2igtype['IsdA_2iteA_bacteria'] = 'IgE';
66005
66055
  ic.ref2igtype['JAM1_1nbqA_human_VorIset-n2'] = 'IgI';
66006
66056
  ic.ref2igtype['LAG3_7tzgD_human_C2-n2'] = 'IgC2';
@@ -66014,9 +66064,9 @@ class Dssp {
66014
66064
  ic.ref2igtype['PD1_4zqkB_human_V'] = 'IgV';
66015
66065
  ic.ref2igtype['PDL1_4z18B_human_V-n1'] = 'IgV';
66016
66066
  ic.ref2igtype['Palladin_2dm3A_human_Iset-n1'] = 'IgI';
66017
- ic.ref2igtype['RBPJ_6py8C_human_Unk-n1'] = 'IgFn3-like';
66018
- ic.ref2igtype['RBPJ_6py8C_human_Unk-n2'] = 'IgFn3-like';
66019
- ic.ref2igtype['Sidekick2_1wf5A_human_FN3-n7'] = 'IgFn3';
66067
+ ic.ref2igtype['RBPJ_6py8C_human_Unk-n1'] = 'IgFN3-like';
66068
+ ic.ref2igtype['RBPJ_6py8C_human_Unk-n2'] = 'IgFN3-like';
66069
+ ic.ref2igtype['Sidekick2_1wf5A_human_FN3-n7'] = 'IgFN3';
66020
66070
  ic.ref2igtype['Siglec3_5j0bB_human_C2-n2'] = 'IgC2';
66021
66071
  ic.ref2igtype['TCRa_6jxrm_human_C1-n2'] = 'IgC1';
66022
66072
  ic.ref2igtype['TCRa_6jxrm_human_V-n1'] = 'IgV';
@@ -66081,7 +66131,7 @@ class Dssp {
66081
66131
  let thisClass = this;
66082
66132
 
66083
66133
  let struArray = Object.keys(ic.structures);
66084
-
66134
+
66085
66135
  let ajaxArray = [];
66086
66136
  let domainidpairArray = [];
66087
66137
 
@@ -66100,7 +66150,7 @@ class Dssp {
66100
66150
  for(let j = 0, jl = chainidArray.length; j < jl; ++j) {
66101
66151
  let chainid = chainidArray[j];
66102
66152
 
66103
- // for selected atoms only
66153
+ // for selected atoms only, assign ic.resid2domainid[resid]
66104
66154
  let domainAtomsArray = this.getDomainAtomsArray(chainid, bRerun);
66105
66155
 
66106
66156
  if(!ic.domainid2refpdbname) ic.domainid2refpdbname = {};
@@ -66117,8 +66167,8 @@ class Dssp {
66117
66167
  let atomFirst = ic.firstAtomObjCls.getFirstAtomObj(domainAtomsArray[k]);
66118
66168
  let atomLast = ic.firstAtomObjCls.getLastAtomObj(domainAtomsArray[k]);
66119
66169
  let resiSum = atomFirst.resi + ':' + atomLast.resi + ':' + Object.keys(domainAtomsArray[k]).length;
66120
- //let domainid = chainid + '-' + k + '_' + Object.keys(domainAtomsArray[k]).length;
66121
- let domainid = chainid + ',' + k + '_' + resiSum;
66170
+ //let domainid = chainid + '-' + k + '_' + Object.keys(domainAtomsArray[k]).length;
66171
+ let domainid = chainid + ',' + k + '_' + resiSum;
66122
66172
  ic.domainid2pdb[domainid] = pdb_target;
66123
66173
 
66124
66174
  if(!template) {
@@ -66136,7 +66186,7 @@ class Dssp {
66136
66186
  // let alignAjax = me.getAjaxPostPromise(urlalign, dataObj);
66137
66187
 
66138
66188
  ajaxArray.push(alignAjax);
66139
-
66189
+
66140
66190
  domainidpairArray.push(domainid + "|" + ic.refpdbArray[index]);
66141
66191
  }
66142
66192
  }
@@ -66156,14 +66206,14 @@ class Dssp {
66156
66206
  // dataArray2 = await allPromise;
66157
66207
 
66158
66208
  dataArray2 = await this.promiseWithFixedJobs(ajaxArray);
66159
-
66209
+
66160
66210
  let bRound1 = true;
66161
- await thisClass.parseAlignData(dataArray2, domainidpairArray, bRound1);
66211
+ bNoMoreIg = await thisClass.parseAlignData(dataArray2, domainidpairArray, bRound1);
66162
66212
 
66163
66213
  /// if(ic.deferredRefnum !== undefined) ic.deferredRefnum.resolve();
66164
66214
  }
66165
66215
  else {
66166
- if(!me.bNode) console.log("Start alignment with the reference culsters " + JSON.stringify(ic.domainid2refpdbname));
66216
+ if(!me.bNode) console.log("Start alignment with the reference culsters " + JSON.stringify(ic.domainid2refpdbname));
66167
66217
 
66168
66218
  // start round2
66169
66219
  let ajaxArray = [];
@@ -66178,36 +66228,36 @@ class Dssp {
66178
66228
  //let allPromise2 = Promise.allSettled(pdbAjaxArray);
66179
66229
  //ic.pdbDataArray = await allPromise2;
66180
66230
 
66181
- ic.pdbDataArray = await this.promiseWithFixedJobs(pdbAjaxArray);
66231
+ let pdbDataArray = await this.promiseWithFixedJobs(pdbAjaxArray);
66182
66232
 
66183
66233
  for(let domainid in ic.domainid2refpdbname) {
66184
66234
  ic.domainid2refpdbname[domainid];
66185
66235
  domainid.substr(0, domainid.indexOf(','));
66186
66236
 
66187
66237
  let pdb_target = ic.domainid2pdb[domainid];
66188
- for(let index = 0, indexl = ic.pdbDataArray.length; index < indexl; ++index) {
66238
+ for(let index = 0, indexl = pdbDataArray.length; index < indexl; ++index) {
66189
66239
  let struct2 = ic.defaultPdbId + index;
66190
- let pdb_query = ic.pdbDataArray[index].value; //[0];
66240
+ let pdb_query = pdbDataArray[index].value; //[0];
66191
66241
 
66192
66242
  let header = 'HEADER ' + struct2 + '\n';
66193
66243
  pdb_query = header + pdb_query;
66194
-
66244
+
66195
66245
  let dataObj = {'pdb_query': pdb_query, 'pdb_target': pdb_target, "queryid": template};
66196
66246
  let alignAjax = me.getAjaxPostPromise(urltmalign, dataObj);
66197
66247
  ajaxArray.push(alignAjax);
66198
-
66248
+
66199
66249
  //domainidpairArray3.push(domainid + "," + refpdbname);
66200
66250
  domainidpairArray3.push(domainid + "|" + template);
66201
66251
  }
66202
66252
  }
66203
-
66253
+
66204
66254
  let dataArray3 = [];
66205
66255
  //let allPromise = Promise.allSettled(ajaxArray);
66206
66256
  //dataArray3 = await allPromise;
66207
66257
 
66208
66258
  dataArray3 = await this.promiseWithFixedJobs(ajaxArray);
66209
-
66210
- await thisClass.parseAlignData(dataArray3, domainidpairArray3);
66259
+
66260
+ bNoMoreIg = await thisClass.parseAlignData(dataArray3, domainidpairArray3);
66211
66261
  }
66212
66262
 
66213
66263
  return bNoMoreIg;
@@ -66223,8 +66273,8 @@ class Dssp {
66223
66273
  }
66224
66274
  //console.log("Error in aligning with TM-align...");
66225
66275
  return;
66226
- }
66227
- */
66276
+ }
66277
+ */
66228
66278
  }
66229
66279
 
66230
66280
  getDomainAtomsArray(chainid, bRerunDomain) { let ic = this.icn3d, me = ic.icn3dui;
@@ -66267,21 +66317,22 @@ class Dssp {
66267
66317
  //let result = ic.domain3dCls.c2b_NewSplitChain(ic.chains[chainid]);
66268
66318
  // assign ref numbers to selected residues
66269
66319
  let result = ic.domain3dCls.c2b_NewSplitChain(currAtoms, undefined);
66270
- let subdomains = result.subdomains;
66320
+ let subdomains = result.subdomains;
66271
66321
  let pos2resi = result.pos2resi;
66272
66322
 
66273
66323
  if(subdomains.length <= 1) {
66274
66324
  let residueArray = ic.resid2specCls.atoms2residues(Object.keys(currAtoms));
66275
66325
  if(residueArray.length < minResidues) return domainAtomsArray;
66276
-
66326
+ /*
66277
66327
  let atomFirst = ic.firstAtomObjCls.getFirstAtomObj(currAtoms);
66278
66328
  let atomLast = ic.firstAtomObjCls.getLastAtomObj(currAtoms);
66279
66329
  let resiSum = atomFirst.resi + ':' + atomLast.resi + ':' + Object.keys(currAtoms).length;
66280
-
66330
+ */
66281
66331
  for(let n = 0, nl = residueArray.length; n < nl; ++n) {
66282
66332
  let resid = residueArray[n];
66283
- ic.resid2domainid[resid] = chainid + ',0' + '_' + resiSum;
66284
-
66333
+ /*
66334
+ ic.resid2domainid[resid] = chainid + ',0' + '_' + resiSum;
66335
+ */
66285
66336
  // clear previous refnum assignment if any
66286
66337
  // if(!bRerunDomain && ic.resid2refnum && ic.resid2refnum[resid]) {
66287
66338
  // if(ic.resid2refnum && ic.resid2refnum[resid]) {
@@ -66292,7 +66343,7 @@ class Dssp {
66292
66343
 
66293
66344
  domainAtomsArray.push(currAtoms);
66294
66345
  }
66295
- else {
66346
+ else {
66296
66347
  for(let k = 0, kl = subdomains.length; k < kl; ++k) {
66297
66348
  let domainAtoms = {};
66298
66349
  let segArray = subdomains[k];
@@ -66319,7 +66370,7 @@ class Dssp {
66319
66370
  if(resCnt < minResidues) continue;
66320
66371
 
66321
66372
  domainAtomsArray.push(domainAtoms);
66322
-
66373
+ /*
66323
66374
  let atomFirst = ic.firstAtomObjCls.getFirstAtomObj(domainAtoms);
66324
66375
  let atomLast = ic.firstAtomObjCls.getLastAtomObj(domainAtoms);
66325
66376
  let resiSum = atomFirst.resi + ':' + atomLast.resi + ':' + Object.keys(domainAtoms).length;
@@ -66330,15 +66381,16 @@ class Dssp {
66330
66381
  for(let n = parseInt(startResi); n <= parseInt(endResi); ++n) {
66331
66382
  let resid = chainid + '_' + pos2resi[n];
66332
66383
  //domainAtoms = me.hashUtilsCls.unionHash(domainAtoms, ic.residues[resid]);
66333
- ic.resid2domainid[resid] = chainid + ',' + k + '_' + resiSum;
66384
+ ic.resid2domainid[resid] = chainid + ',' + k + '_' + resiSum;
66334
66385
  }
66335
66386
  }
66387
+ */
66336
66388
  }
66337
66389
  }
66338
66390
 
66339
66391
  return domainAtomsArray;
66340
66392
  }
66341
-
66393
+
66342
66394
  getTemplateList(domainid) { let ic = this.icn3d; ic.icn3dui;
66343
66395
  let refpdbname = '', score = '', seqid = '', nresAlign = '';
66344
66396
 
@@ -66371,7 +66423,6 @@ class Dssp {
66371
66423
  if(!ic.domainid2ig2imgt) ic.domainid2ig2imgt = {};
66372
66424
 
66373
66425
  let minResidues = 20;
66374
-
66375
66426
  for(let i = 0, il = domainidpairArray.length; i < il; ++i) {
66376
66427
  //let queryData = (me.bNode) ? dataArray[i] : dataArray[i].value; //[0];
66377
66428
  let queryData = (dataArray[i]) ? dataArray[i].value : undefined; //[0];
@@ -66382,7 +66433,7 @@ class Dssp {
66382
66433
  }
66383
66434
 
66384
66435
  if(queryData[0].score === undefined) continue;
66385
-
66436
+
66386
66437
  //let domainid_index = domainidpairArray[i].split(',');
66387
66438
  //let domainid = domainid_index[0];
66388
66439
  let domainid = domainidpairArray[i].substr(0, domainidpairArray[i].indexOf('|'));
@@ -66403,7 +66454,7 @@ class Dssp {
66403
66454
  continue;
66404
66455
  }
66405
66456
  }
66406
-
66457
+
66407
66458
  if(!bRound1) {
66408
66459
  if(!me.bNode) console.log("refpdbname " + refpdbname + " TM-score: " + queryData[0].score);
66409
66460
  }
@@ -66466,8 +66517,13 @@ class Dssp {
66466
66517
  }
66467
66518
 
66468
66519
  if(!domainid2segs.hasOwnProperty(domainid) || queryData[0].score >= ic.domainid2score[domainid].split('_')[0]) {
66469
- ic.domainid2score[domainid] = queryData[0].score + '_' + queryData[0].frac_identical + '_' + queryData[0].num_res ;
66470
- ic.domainid2refpdbname[domainid] = refpdbname;
66520
+ ic.domainid2score[domainid] = queryData[0].score + '_' + queryData[0].frac_identical + '_' + queryData[0].num_res ;
66521
+ if(bRound1) {
66522
+ ic.domainid2refpdbname[domainid] = parseFloat(queryData[0].score) > 0.75 ? refpdbname : 'all_templates';
66523
+ }
66524
+ else {
66525
+ ic.domainid2refpdbname[domainid] = refpdbname;
66526
+ }
66471
66527
  domainid2segs[domainid] = queryData[0].segs;
66472
66528
  ic.domainid2ig2kabat[domainid] = queryData[0].ig2kabat;
66473
66529
  ic.domainid2ig2imgt[domainid] = queryData[0].ig2imgt;
@@ -66478,10 +66534,17 @@ class Dssp {
66478
66534
  }
66479
66535
 
66480
66536
  async parseAlignData(dataArray, domainidpairArray, bRound1) { let ic = this.icn3d, me = ic.icn3dui;
66537
+ let bNoMoreIg = false;
66538
+
66481
66539
  let domainid2segs = this.parseAlignData_part1(dataArray, domainidpairArray, bRound1);
66482
66540
 
66541
+ if(Object.keys(domainid2segs).length == 0) {
66542
+ bNoMoreIg = true;
66543
+ return bNoMoreIg;
66544
+ }
66545
+
66483
66546
  if(bRound1) {
66484
- if(!me.bNode) console.log("Start round 2 alignment with the reference culsters " + JSON.stringify(ic.domainid2refpdbname));
66547
+ if(!me.bNode) console.log("Start round 2 alignment with the reference culsters " + JSON.stringify(ic.domainid2refpdbname));
66485
66548
 
66486
66549
  // start round2
66487
66550
  let ajaxArray = [];
@@ -66499,7 +66562,7 @@ class Dssp {
66499
66562
  //refpdbname = pdbid;
66500
66563
  refpdbname = chainid;
66501
66564
 
66502
- if(!me.bNode) console.log("Adjusted refpdbname for domainid " + domainid + ": " + refpdbname);
66565
+ if(!me.bNode) console.log("Adjusted refpdbname for domainid " + domainid + ": " + refpdbname);
66503
66566
  }
66504
66567
 
66505
66568
  if(!ic.refpdbHash[refpdbname]) {
@@ -66517,20 +66580,20 @@ class Dssp {
66517
66580
  //let allPromise2 = Promise.allSettled(pdbAjaxArray);
66518
66581
  //ic.pdbDataArray = await allPromise2;
66519
66582
 
66520
- ic.pdbDataArray = await this.promiseWithFixedJobs(pdbAjaxArray);
66583
+ let pdbDataArray = await this.promiseWithFixedJobs(pdbAjaxArray);
66521
66584
 
66522
66585
  let pdb_target = ic.domainid2pdb[domainid];
66523
- for(let index = 0, indexl = ic.pdbDataArray.length; index < indexl; ++index) {
66586
+ for(let index = 0, indexl = pdbDataArray.length; index < indexl; ++index) {
66524
66587
  let struct2 = ic.defaultPdbId + index;
66525
- //let pdb_query = (me.bNode) ? ic.pdbDataArray[index] : ic.pdbDataArray[index].value; //[0];
66526
- let pdb_query = ic.pdbDataArray[index].value; //[0];
66588
+ //let pdb_query = (me.bNode) ? pdbDataArray[index] : pdbDataArray[index].value; //[0];
66589
+ let pdb_query = pdbDataArray[index].value; //[0];
66527
66590
  let header = 'HEADER ' + struct2 + '\n';
66528
66591
  pdb_query = header + pdb_query;
66529
66592
 
66530
66593
  let dataObj = {'pdb_query': pdb_query, 'pdb_target': pdb_target, "queryid": ic.refpdbHash[refpdbname][index]};
66531
66594
  let alignAjax = me.getAjaxPostPromise(urltmalign, dataObj);
66532
66595
  ajaxArray.push(alignAjax);
66533
-
66596
+
66534
66597
  //domainidpairArray3.push(domainid + "," + refpdbname);
66535
66598
  domainidpairArray3.push(domainid + "|" + ic.refpdbHash[refpdbname][index]);
66536
66599
  }
@@ -66543,12 +66606,14 @@ class Dssp {
66543
66606
  dataArray3 = await this.promiseWithFixedJobs(ajaxArray);
66544
66607
 
66545
66608
  await this.parseAlignData(dataArray3, domainidpairArray3, false);
66546
-
66609
+
66547
66610
  // end of round 2
66548
- return;
66611
+ return bNoMoreIg;
66549
66612
  }
66550
66613
 
66551
66614
  await this.parseAlignData_part3(domainid2segs);
66615
+
66616
+ return bNoMoreIg;
66552
66617
  }
66553
66618
 
66554
66619
  async parseAlignData_part3(domainid2segs) { let ic = this.icn3d, me = ic.icn3dui;
@@ -66694,7 +66759,7 @@ class Dssp {
66694
66759
  for(let i = 0, il = segArray.length; i < il; ++i) {
66695
66760
  let seg = segArray[i];
66696
66761
  if(!seg) continue;
66697
-
66762
+
66698
66763
  let qStart = seg.q_start;
66699
66764
  parseInt(seg.q_start);
66700
66765
  if(isNaN(seg.q_start)) seg.q_start.substr(seg.q_start.length - 1, 1);
@@ -66735,9 +66800,10 @@ class Dssp {
66735
66800
  if(currStrand != currStrandFinal) {
66736
66801
  refnumLabel = this.getLabelFromRefnum(refnum, currStrandFinal);
66737
66802
  }
66738
-
66739
- ic.resid2refnum[resid] = refnumLabel;
66803
+
66804
+ ic.resid2refnum[resid] = refnumLabel;
66740
66805
  ic.resid2refnum_ori[resid] = refnumLabel;
66806
+ ic.resid2domainid[resid] = domainid;
66741
66807
 
66742
66808
  // final reference numbers will be assign in ic.annoIgCls.showRefNum()
66743
66809
 
@@ -66784,7 +66850,7 @@ class Dssp {
66784
66850
  else {
66785
66851
  await ic.showAnnoCls.showAnnotations();
66786
66852
  }
66787
-
66853
+
66788
66854
  ic.annotationCls.setAnnoViewAndDisplay('detailed view');
66789
66855
  }
66790
66856
  else if(!me.bNode) {
@@ -66825,13 +66891,13 @@ class Dssp {
66825
66891
  // loops may have numbers such as 1310, 1410
66826
66892
 
66827
66893
  let refnumLabel;
66828
-
66894
+
66829
66895
  if(refnum < 1000) refnumLabel = undefined;
66830
66896
  else if(refnum >= 1200 && refnum < 1290) refnumLabel = "A---" + oriRefnum;
66831
66897
  else if(refnum >= 1320 && refnum < 1390) refnumLabel = "A--" + oriRefnum;
66832
66898
  else if(refnum >= 1420 && refnum < 1490) refnumLabel = "A-" + oriRefnum;
66833
- else if(refnum >= 1520 && refnum < 1590) refnumLabel = "A" + oriRefnum;
66834
- else if(refnum >= 1620 && refnum < 1690) refnumLabel = "A+" + oriRefnum;
66899
+ else if(refnum >= 1520 && refnum < 1590) refnumLabel = "A" + oriRefnum;
66900
+ else if(refnum >= 1620 && refnum < 1690) refnumLabel = "A+" + oriRefnum;
66835
66901
  else if(refnum >= 1820 && refnum < 1890) refnumLabel = "A'" + oriRefnum;
66836
66902
  else if(refnum >= 2000 && refnum < 2900) refnumLabel = "B" + oriRefnum;
66837
66903
  else if(refnum >= 3300 && refnum < 3390) refnumLabel = "C--" + oriRefnum;
@@ -66840,8 +66906,8 @@ class Dssp {
66840
66906
  else if(refnum >= 4000 && refnum < 4900) refnumLabel = "C'" + oriRefnum;
66841
66907
  else if(refnum >= 5000 && refnum < 5900) refnumLabel = "C''" + oriRefnum;
66842
66908
  else if(refnum >= 6000 && refnum < 6900) refnumLabel = "D" + oriRefnum;
66843
- else if(refnum >= 7500 && refnum < 7590) refnumLabel = "E" + oriRefnum;
66844
- else if(refnum >= 7620 && refnum < 7900) refnumLabel = "E+" + oriRefnum;
66909
+ else if(refnum >= 7500 && refnum < 7590) refnumLabel = "E" + oriRefnum;
66910
+ else if(refnum >= 7620 && refnum < 7900) refnumLabel = "E+" + oriRefnum;
66845
66911
  else if(refnum >= 8000 && refnum < 8900) refnumLabel = "F" + oriRefnum;
66846
66912
  else if(refnum >= 9500 && refnum < 9590) refnumLabel = "G" + oriRefnum;
66847
66913
  else if(refnum >= 9620 && refnum < 9690) refnumLabel = "G+" + oriRefnum;
@@ -66930,7 +66996,7 @@ class Dssp {
66930
66996
  if(type == 'igstrand' || type == 'IgStrand') {
66931
66997
  // iGStrand reference numbers were adjusted when showing in sequences
66932
66998
  if(me.bNode) {
66933
- for(let chnid in ic.chains) {
66999
+ for(let chnid in ic.chains) {
66934
67000
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.chains[chnid]);
66935
67001
  if(ic.proteins.hasOwnProperty(atom.serial)) {
66936
67002
  let giSeq = [];
@@ -66941,22 +67007,22 @@ class Dssp {
66941
67007
  }
66942
67008
  }
66943
67009
  }
66944
-
67010
+
66945
67011
  let resid2refnum = {};
66946
67012
  for(let resid in ic.resid2refnum) {
66947
67013
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
66948
67014
  if(!atom) continue;
66949
-
67015
+
66950
67016
  let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
66951
-
67017
+
66952
67018
  let domainid = ic.resid2domainid[resid];
66953
67019
  let refnumLabel = ic.resid2refnum[resid];
66954
-
67020
+
66955
67021
  if(refnumLabel) {
66956
67022
  let refnumStr_ori = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
66957
67023
  (ic.domainid2ig2kabat[domainid]) ? ic.domainid2ig2kabat[domainid][refnumStr_ori] : undefined;
66958
67024
  }
66959
-
67025
+
66960
67026
  if(ic.resid2refnum[resid]) {
66961
67027
  if(ic.residIgLoop.hasOwnProperty(resid)) { // loop
66962
67028
  resid2refnum[resid + '_' + resn] = ic.resid2refnum[resid] + '_loop';
@@ -67037,18 +67103,18 @@ class Dssp {
67037
67103
  for(let resid in ic.resid2refnum) {
67038
67104
  let domainid = ic.resid2domainid[resid];
67039
67105
  let refnumStr, refnumLabel = ic.resid2refnum[resid];
67040
-
67106
+
67041
67107
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
67042
67108
  let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
67043
-
67109
+
67044
67110
  if(refnumLabel) {
67045
67111
  let refnumStr_ori = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
67046
67112
  refnumStr = (ic.domainid2ig2kabat[domainid]) ? ic.domainid2ig2kabat[domainid][refnumStr_ori] : undefined;
67047
67113
  }
67048
-
67114
+
67049
67115
  resid2kabat[resid + '_' + resn] = refnumStr;
67050
67116
  }
67051
-
67117
+
67052
67118
  refData += JSON.stringify(resid2kabat);
67053
67119
  }
67054
67120
  // 3. show IMGT ref numbers
@@ -67057,25 +67123,25 @@ class Dssp {
67057
67123
  for(let resid in ic.resid2refnum) {
67058
67124
  let domainid = ic.resid2domainid[resid];
67059
67125
  let refnumStr, refnumLabel = ic.resid2refnum[resid];
67060
-
67126
+
67061
67127
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
67062
67128
  let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
67063
-
67129
+
67064
67130
  if(refnumLabel) {
67065
67131
  let refnumStr_ori = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
67066
67132
  refnumStr = (ic.domainid2ig2imgt[domainid]) ? ic.domainid2ig2imgt[domainid][refnumStr_ori] : undefined;
67067
67133
  }
67068
-
67134
+
67069
67135
  resid2imgt[resid + '_' + resn] = refnumStr;
67070
67136
  }
67071
-
67137
+
67072
67138
  refData += JSON.stringify(resid2imgt);
67073
67139
  }
67074
67140
 
67075
67141
 
67076
67142
  if(!me.bNode) {
67077
67143
  let file_pref = Object.keys(me.utilsCls.getHlStructures()).join(',');
67078
-
67144
+
67079
67145
  ic.saveFileCls.saveFile(file_pref + '_refnum_' + type + '.txt', 'text', [refData]);
67080
67146
  }
67081
67147
  else {
@@ -67093,7 +67159,7 @@ class Dssp {
67093
67159
 
67094
67160
  for(let i = 0, il = parseInt((ajaxArray.length - 1) / n + 1); i < il; ++i) {
67095
67161
  let currAjaxArray = [];
67096
- if(i == il - 1) { // last one
67162
+ if(i == il - 1) { // last one
67097
67163
  currAjaxArray = ajaxArray.slice(i * n, ajaxArray.length);
67098
67164
  }
67099
67165
  else {