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.module.js CHANGED
@@ -8279,6 +8279,8 @@ class ClickMenu {
8279
8279
  thisClass.setLogCmd('ig refnum on', true);
8280
8280
  // await ic.refnumCls.showIgRefNum();
8281
8281
  // thisClass.setLogCmd('set annotation ig', true);
8282
+ if(!ic.bAnnoShown) await ic.showAnnoCls.showAnnotations();
8283
+
8282
8284
  let bSelection = true;
8283
8285
  await ic.annotationCls.setAnnoTabIg(bSelection);
8284
8286
 
@@ -8303,6 +8305,7 @@ class ClickMenu {
8303
8305
  thisClass.setLogCmd('ig template ' + template, true);
8304
8306
  let bSelection = true;
8305
8307
  // await ic.refnumCls.showIgRefNum(template);
8308
+ if(!ic.bAnnoShown) await ic.showAnnoCls.showAnnotations();
8306
8309
  await ic.annotationCls.setAnnoTabIg(bSelection, template);
8307
8310
  });
8308
8311
 
@@ -10428,8 +10431,8 @@ class SetMenu {
10428
10431
  //}
10429
10432
 
10430
10433
  //!!!
10431
- //html += this.getRadio('mn4_clr', 'mn4_clrIgstrand', 'Ig Strand', undefined, undefined, 2);
10432
- //html += this.getRadio('mn4_clr', 'mn4_clrIgproto', 'Ig Protodomain', undefined, undefined, 2);
10434
+ // html += this.getRadio('mn4_clr', 'mn4_clrIgstrand', 'Ig Strand', undefined, undefined, 2);
10435
+ // html += this.getRadio('mn4_clr', 'mn4_clrIgproto', 'Ig Protodomain', undefined, undefined, 2);
10433
10436
  }
10434
10437
  else {
10435
10438
  //if(!me.cfg.hidelicense) html += this.getRadio('mn4_clr', 'mn1_delphi2', 'DelPhi<br><span style="padding-left:1.5em;">Potential ' + me.htmlCls.licenseStr + '</span>');
@@ -10560,7 +10563,7 @@ class SetMenu {
10560
10563
  html += this.getRadio('mn6_addlabel', 'mn6_addlabelResidues', 'per Residue', undefined, 1, 2);
10561
10564
  html += this.getRadio('mn6_addlabel', 'mn6_addlabelResnum', 'per Residue & Number', undefined, 1, 2);
10562
10565
  //!!!
10563
- //html += this.getRadio('mn6_addlabel', 'mn6_addlabelRefnum', 'per Reference Number', undefined, 1, 2);
10566
+ // html += this.getRadio('mn6_addlabel', 'mn6_addlabelRefnum', 'per Reference Number', undefined, 1, 2);
10564
10567
  html += this.getRadio('mn6_addlabel', 'mn6_addlabelChains', 'per Chain', undefined, undefined, 2);
10565
10568
  html += this.getRadio('mn6_addlabel', 'mn6_addlabelTermini', 'N- & C-Termini', undefined, 1, 2);
10566
10569
  }
@@ -10658,8 +10661,9 @@ class SetMenu {
10658
10661
  html += this.getLink('mn6_igrefYes', 'Show Ig for Selection', undefined, 2);
10659
10662
  html += this.getLink('mn6_igrefTpl', 'Ig w/ Specified Template', undefined, 2);
10660
10663
  html += this.getLink('mn6_igrefNo', 'Reset Ig Ref. Number', undefined, 2);
10661
- */
10664
+
10662
10665
  html += this.getMenuSep();
10666
+ */
10663
10667
 
10664
10668
  html += this.getLink('mn6_customref', 'Custom Ref. Number', undefined, 2);
10665
10669
  html += "</ul>";
@@ -15595,6 +15599,14 @@ class Events {
15595
15599
  thisClass.setLogCmd('define igloop sets | chain ' + chainid, true);
15596
15600
  });
15597
15601
 
15602
+ $(document).on("click", ".icn3d-igdomainsets", function(e) { let ic = me.icn3d;
15603
+ e.stopImmediatePropagation();
15604
+ //e.preventDefault();
15605
+ let chainid = $(this).attr('chainid');
15606
+ ic.addTrackCls.defineIgstrand(chainid, 'igdomain');
15607
+ thisClass.setLogCmd('define igdomain sets | chain ' + chainid, true);
15608
+ });
15609
+
15598
15610
  me.myEventCls.onIds("#" + me.pre + "deletesets", "click", function(e) { let ic = me.icn3d;
15599
15611
  ic.definedSetsCls.deleteSelectedSets();
15600
15612
  thisClass.setLogCmd("delete selected sets", true);
@@ -33374,7 +33386,7 @@ class Instancing {
33374
33386
  }
33375
33387
 
33376
33388
  if(ic.mdlImpostor !== undefined) {
33377
- // after three.js version 128, the cylinder impostor seemed to have a problem in cloning!!!
33389
+ // after three.js version 128, the cylinder impostor seemed to have a problem in cloning
33378
33390
  symmetryMate = ic.mdlImpostor.clone();
33379
33391
  //symmetryMate.applyMatrix(mat);
33380
33392
  this.applyMat(symmetryMate, mat);
@@ -37733,7 +37745,13 @@ class AnnoCddSite {
37733
37745
 
37734
37746
  if(me.cfg.blast_rep_id != chnid) { // regular
37735
37747
  for(let i = 0, il = fromArray.length; i < il; ++i) {
37736
- 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);
37748
+ let emptyWidth;
37749
+ if(titleArray) {
37750
+ emptyWidth =(i == 0) ? Math.round(ic.seqAnnWidth *(fromArray[i]) / ic.maxAnnoLength) : Math.round(ic.seqAnnWidth *(fromArray[i] - toArray[i-1] - 1) / ic.maxAnnoLength);
37751
+ }
37752
+ else {
37753
+ 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);
37754
+ }
37737
37755
 
37738
37756
  html2 += '<div style="display:inline-block; width:' + emptyWidth + 'px;">&nbsp;</div>';
37739
37757
  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>';
@@ -38987,7 +39005,7 @@ class AnnoIg {
38987
39005
  refnumLabel = ic.resid2refnum[residueid];
38988
39006
  let bHidelabel = false;
38989
39007
 
38990
- if(refnumLabel) {
39008
+ if(refnumLabel) {
38991
39009
  refnumStr_ori = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
38992
39010
  currStrand = refnumLabel.replace(new RegExp(refnumStr_ori,'g'), '');
38993
39011
  currStrand_ori = currStrand;
@@ -39019,8 +39037,9 @@ class AnnoIg {
39019
39037
 
39020
39038
  igElem = {};
39021
39039
  igElem.startPos = i;
39022
- igElem.domainid = domainid;
39023
39040
  }
39041
+
39042
+ if(domainid) igElem.domainid = domainid;
39024
39043
 
39025
39044
  if(bCustom) {
39026
39045
  if(!refnumStr) {
@@ -39135,7 +39154,7 @@ class AnnoIg {
39135
39154
  html += '</div>';
39136
39155
  html += '</div>';
39137
39156
 
39138
- let igArray = ic.chain2igArray[chnid];
39157
+ let igArray = ic.chain2igArray[chnid];
39139
39158
  if(igArray.length == 0) return {html: '', html2: '', html3: ''};
39140
39159
  let rangeArray = [], titleArray = [], fullTitleArray = [], domainArray = [];
39141
39160
  for(let i = 0, il = igArray.length; i < il; ++i) {
@@ -39163,10 +39182,10 @@ class AnnoIg {
39163
39182
  let colorStr =(atom.color === undefined || atom.color.getHexString() === 'FFFFFF') ? 'DDDDDD' : atom.color.getHexString();
39164
39183
  let color =(atom.color !== undefined) ? colorStr : "CCCCCC";
39165
39184
 
39166
- let emptyWidth =(i == 0) ? Math.round(ic.seqAnnWidth *(fromArray[i] - ic.baseResi[chnid] - 1) / ic.maxAnnoLength) :
39185
+ let emptyWidth =(i == 0) ? Math.round(ic.seqAnnWidth *(fromArray[i]) / ic.maxAnnoLength) :
39167
39186
  Math.round(ic.seqAnnWidth *(fromArray[i] - toArray[i-1] - 1) / ic.maxAnnoLength);
39168
39187
  html2 += '<div style="display:inline-block; width:' + emptyWidth + 'px;">&nbsp;</div>';
39169
- 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>';
39188
+ 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>';
39170
39189
  }
39171
39190
 
39172
39191
  html2 += htmlCnt;
@@ -42490,91 +42509,115 @@ class AddTrack {
42490
42509
  let selectedResidues = {};
42491
42510
  let bUnion = false, bUpdateHighlight = true;
42492
42511
 
42493
- let strandCnt = 0, loopCnt = 0;
42494
- let setName, currStrand, prevStrand, prevStrandReal = 'NT', currType, prevType;
42495
-
42496
42512
  // clear selection
42497
42513
  ic.hAtoms = {};
42498
42514
 
42499
- let bStart = false;
42515
+ if(type == 'igdomain') {
42516
+ let igArray = ic.chain2igArray[chainid];
42500
42517
 
42501
- for(let i = 0, il = ic.chainsSeq[chainid].length; i < il; ++i) {
42502
- let currResi = ic.chainsSeq[chainid][i].resi;
42503
- let resid = chainid + '_' + currResi;
42504
-
42505
- if(!ic.residues.hasOwnProperty(resid) ) continue;
42506
-
42507
- let refnumLabel, refnumStr, refnum;
42508
- refnumLabel = ic.resid2refnum[resid];
42509
- if(!refnumLabel) continue;
42518
+ if(igArray && igArray.length > 0) {
42519
+
42520
+ for(let i = 0, il = igArray.length; i < il; ++i) {
42521
+ let startPos = igArray[i].startPos;
42522
+ let endPos = igArray[i].endPos;
42523
+ let domainid = igArray[i].domainid;
42510
42524
 
42511
- refnumStr = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
42512
- currStrand = refnumLabel.replace(refnumStr, '');
42513
- refnum = parseInt(refnumStr);
42525
+ selectedResidues = {};
42526
+ for(let j = parseInt(startPos); j <= parseInt(endPos); ++j) {
42527
+ let currResi = ic.chainsSeq[chainid][j].resi;
42528
+ let resid = chainid + '_' + currResi;
42529
+ selectedResidues[resid] = 1;
42530
+ }
42514
42531
 
42515
- if(type == 'iganchor') {
42516
- if(refnum > 1000 && refnumStr.substr(refnumStr.length - 2, 2) == '50') {
42517
- selectedResidues[resid] = 1;
42518
- }
42519
- }
42520
- else {
42521
- if(ic.residIgLoop.hasOwnProperty(resid)) {
42522
- currType = 'igloop';
42532
+ let setName = domainid;
42533
+ ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
42523
42534
  }
42535
+ }
42536
+ }
42537
+ else {
42538
+ let strandCnt = 0, loopCnt = 0;
42539
+ let setName, currStrand, prevStrand, prevStrandReal = 'NT', currType, prevType;
42540
+
42541
+ let bStart = false;
42542
+
42543
+ for(let i = 0, il = ic.chainsSeq[chainid].length; i < il; ++i) {
42544
+ let currResi = ic.chainsSeq[chainid][i].resi;
42545
+ let resid = chainid + '_' + currResi;
42546
+
42547
+ if(!ic.residues.hasOwnProperty(resid) ) continue;
42548
+
42549
+ let refnumLabel, refnumStr, refnum;
42550
+ refnumLabel = ic.resid2refnum[resid];
42551
+ if(!refnumLabel) continue;
42552
+
42553
+ refnumStr = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
42554
+ currStrand = refnumLabel.replace(refnumStr, '');
42555
+ refnum = parseInt(refnumStr);
42556
+
42557
+ if(type == 'iganchor') {
42558
+ if(refnum > 1000 && refnumStr.substr(refnumStr.length - 2, 2) == '50') {
42559
+ selectedResidues[resid] = 1;
42560
+ }
42561
+ }
42524
42562
  else {
42525
- currType = 'igstrand';
42526
- }
42563
+ if(ic.residIgLoop.hasOwnProperty(resid)) {
42564
+ currType = 'igloop';
42565
+ }
42566
+ else {
42567
+ currType = 'igstrand';
42568
+ }
42527
42569
 
42528
- if(bStart && currType != prevType && Object.keys(selectedResidues).length > 0) {
42529
- if(prevType == 'igstrand') {
42530
- ++strandCnt;
42531
- setName = 'Strand-' + prevStrand + '-' + chainid + '-' + strandCnt.toString().padStart(3, '0');
42532
- setName = setName.replace(/'/g, '`');
42533
- if(type == 'igstrand') {
42534
- ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
42535
- if(!bUnion) bUnion = true;
42570
+ if(bStart && currType != prevType && Object.keys(selectedResidues).length > 0) {
42571
+ if(prevType == 'igstrand') {
42572
+ ++strandCnt;
42573
+ setName = 'Strand-' + prevStrand + '-' + chainid + '-' + strandCnt.toString().padStart(3, '0');
42574
+ setName = setName.replace(/'/g, '`');
42575
+ if(type == 'igstrand') {
42576
+ ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
42577
+ if(!bUnion) bUnion = true;
42578
+ }
42579
+ prevStrandReal = prevStrand;
42536
42580
  }
42537
- prevStrandReal = prevStrand;
42538
- }
42539
- else if(prevType == 'igloop') {
42540
- ++loopCnt;
42541
- setName = 'Loop-' + prevStrandReal + '_' + currStrand + '-' + chainid + '-' + loopCnt.toString().padStart(3, '0');
42542
- setName = setName.replace(/'/g, '`');
42543
- if(type == 'igloop') {
42544
- ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
42545
- if(!bUnion) bUnion = true;
42581
+ else if(prevType == 'igloop') {
42582
+ ++loopCnt;
42583
+ setName = 'Loop-' + prevStrandReal + '_' + currStrand + '-' + chainid + '-' + loopCnt.toString().padStart(3, '0');
42584
+ setName = setName.replace(/'/g, '`');
42585
+ if(type == 'igloop') {
42586
+ ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
42587
+ if(!bUnion) bUnion = true;
42588
+ }
42546
42589
  }
42547
- }
42548
42590
 
42549
- selectedResidues = {};
42550
- }
42591
+ selectedResidues = {};
42592
+ }
42551
42593
 
42552
- selectedResidues[resid] = 1;
42594
+ selectedResidues[resid] = 1;
42553
42595
 
42554
- prevStrand = currStrand;
42555
- prevType = currType;
42596
+ prevStrand = currStrand;
42597
+ prevType = currType;
42556
42598
 
42557
- bStart = true;
42558
- }
42559
- } // for loop
42599
+ bStart = true;
42600
+ }
42601
+ } // for loop
42560
42602
 
42561
- if(type == 'iganchor') {
42562
- setName = 'Anchor-' + chainid;
42563
- ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
42564
- }
42565
- else {
42566
- if(prevType == 'igstrand') {
42567
- ++strandCnt;
42568
- setName = 'Strand-' + prevStrand + '-' + chainid + '-' + strandCnt.toString().padStart(3, '0');
42569
- setName = setName.replace(/'/g, '`');
42570
- if(type == 'igstrand') ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
42603
+ if(type == 'iganchor') {
42604
+ setName = 'Anchor-' + chainid;
42605
+ ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
42571
42606
  }
42572
- else if(prevType == 'igloop') {
42573
- ++loopCnt;
42574
- currStrand = 'CT';
42575
- setName = 'Loop-' + prevStrandReal + '_' + currStrand + '-' + chainid + '-' + loopCnt.toString().padStart(3, '0');
42576
- setName = setName.replace(/'/g, '`');
42577
- if(type == 'igloop') ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
42607
+ else {
42608
+ if(prevType == 'igstrand') {
42609
+ ++strandCnt;
42610
+ setName = 'Strand-' + prevStrand + '-' + chainid + '-' + strandCnt.toString().padStart(3, '0');
42611
+ setName = setName.replace(/'/g, '`');
42612
+ if(type == 'igstrand') ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
42613
+ }
42614
+ else if(prevType == 'igloop') {
42615
+ ++loopCnt;
42616
+ currStrand = 'CT';
42617
+ setName = 'Loop-' + prevStrandReal + '_' + currStrand + '-' + chainid + '-' + loopCnt.toString().padStart(3, '0');
42618
+ setName = setName.replace(/'/g, '`');
42619
+ if(type == 'igloop') ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
42620
+ }
42578
42621
  }
42579
42622
  }
42580
42623
  }
@@ -44433,10 +44476,12 @@ class ShowAnno {
44433
44476
  + 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;"
44434
44477
  + 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);
44435
44478
 
44436
- if(ic.bShowRefnum && ic.chainid2refpdbname.hasOwnProperty(chnid) && ic.chainid2refpdbname[chnid].length > 0) {
44437
- 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;"
44438
- + 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);
44439
- }
44479
+ // if(ic.bShowRefnum && ic.chainid2refpdbname.hasOwnProperty(chnid) && ic.chainid2refpdbname[chnid].length > 0) {
44480
+ 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;"
44481
+ + 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;"
44482
+ + 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;"
44483
+ + 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);
44484
+ // }
44440
44485
  $("#" + ic.pre + "dl_annotations").append(chainHtml);
44441
44486
  //let itemArray = ['giseq', 'cdd', 'clinvar', 'snp', 'domain', 'site', 'ptm', 'interaction', 'custom', 'ssbond', 'crosslink', 'transmem'];
44442
44487
  let itemArray = ['giseq', 'cdd', 'clinvar', 'snp', 'site', 'ptm', 'ssbond', 'crosslink', 'transmem', 'domain', 'custom', 'interaction', 'ig'];
@@ -61079,6 +61124,7 @@ class ApplyCommand {
61079
61124
  await ic.annotationCls.setAnnoTabIg();
61080
61125
  }
61081
61126
  else if(command == 'ig refnum on') {
61127
+ if(!ic.bAnnoShown) await ic.showAnnoCls.showAnnotations();
61082
61128
  await ic.annotationCls.setAnnoTabIg(true);
61083
61129
  }
61084
61130
  else if(command == 'highlight level up') {
@@ -63568,6 +63614,7 @@ class LoadScript {
63568
63614
  else if(command.indexOf('ig template') == 0 ) {
63569
63615
  let template = command.substr(command.lastIndexOf(' ') + 1);
63570
63616
  // await ic.refnumCls.showIgRefNum(template);
63617
+ if(!ic.bAnnoShown) await ic.showAnnoCls.showAnnotations();
63571
63618
  await ic.annotationCls.setAnnoTabIg(true, template);
63572
63619
  }
63573
63620
  else if(command.indexOf('set annotation 3ddomain') == 0) { // the command may have "|||{"factor"...
@@ -63771,6 +63818,7 @@ class LoadScript {
63771
63818
  }
63772
63819
  else if(lastCommand.indexOf('ig refnum on') == 0) {
63773
63820
  // await ic.refnumCls.showIgRefNum();
63821
+ if(!ic.bAnnoShown) await ic.showAnnoCls.showAnnotations();
63774
63822
  await ic.annotationCls.setAnnoTabIg(true);
63775
63823
  }
63776
63824
  else if(lastCommand.indexOf('set annotation 3ddomain') == 0) {
@@ -63897,7 +63945,7 @@ class LoadScript {
63897
63945
  let idNew = '';
63898
63946
  for(let i = 0, il = idArray.length; i < il; ++i) {
63899
63947
  if(!(ic.structures && ic.structures.hasOwnProperty(idArray[i]))) {
63900
- if(!idNew) idNew += ',';
63948
+ if(idNew) idNew += ',';
63901
63949
  idNew += idArray[i];
63902
63950
  }
63903
63951
  }
@@ -66818,7 +66866,9 @@ class Dssp {
66818
66866
  ic.refpdbHash['1LaminAC_1ifrA_human'] = ['LaminAC_1ifrA_human', 'CD3d_6jxrd_human_Iset'];
66819
66867
  ic.refpdbHash['1CD3g_6jxrg_human_Iset'] = ['CD3g_6jxrg_human_Iset', 'TCRa_6jxrm_human_C1-n2', 'IsdA_2iteA_bacteria'];
66820
66868
  ic.refpdbHash['1CD28_1yjdC_human_V'] = ['CD28_1yjdC_human_V', 'MPT63_1lmiA_bacteria', 'CD3e_6jxrf_human_Iset'];
66821
- ic.refpdbHash['1CD19_6al5A_human_C2orV-n1'] = ['CD19_6al5A_human_C2orV-n1'];
66869
+ ic.refpdbHash['1CD19_6al5A_human_C2orV-n1'] = ['CD19_6al5A_human_C2orV-n1'];
66870
+
66871
+ 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'];
66822
66872
 
66823
66873
  // use known ref structure
66824
66874
  ic.refpdbHash['5ESV_C'] = ['FAB-HEAVY_5esv_V-n1', 'FAB-HEAVY_5esv_C1-n2'];
@@ -66875,9 +66925,9 @@ class Dssp {
66875
66925
 
66876
66926
  ic.ref2igtype['ASF1A_2iijA_human'] = 'IgE';
66877
66927
  ic.ref2igtype['B2Microglobulin_7phrL_human_C1'] = 'IgC1';
66878
- ic.ref2igtype['BArrestin1_4jqiA_rat_n1'] = 'IgFn3-like';
66928
+ ic.ref2igtype['BArrestin1_4jqiA_rat_n1'] = 'IgFN3-like';
66879
66929
  ic.ref2igtype['BTLA_2aw2A_human_Iset'] = 'IgI';
66880
- ic.ref2igtype['C3_2qkiD_human_n1'] = 'IgFn3-like';
66930
+ ic.ref2igtype['C3_2qkiD_human_n1'] = 'IgFN3-like';
66881
66931
  ic.ref2igtype['CD19_6al5A_human_C2orV-n1'] = 'other Ig'; //'CD19';
66882
66932
  ic.ref2igtype['CD28_1yjdC_human_V'] = 'IgV';
66883
66933
  ic.ref2igtype['CD2_1hnfA_human_C2-n2'] = 'IgC2';
@@ -66887,7 +66937,7 @@ class Dssp {
66887
66937
  ic.ref2igtype['CD3g_6jxrg_human_Iset'] = 'IgI';
66888
66938
  ic.ref2igtype['CD8a_1cd8A_human_V'] = 'IgV';
66889
66939
  ic.ref2igtype['CoAtomerGamma1_1r4xA_human'] = 'IgE';
66890
- ic.ref2igtype['Contactin1_2ee2A_human_FN3-n9'] = 'IgFn3';
66940
+ ic.ref2igtype['Contactin1_2ee2A_human_FN3-n9'] = 'IgFN3';
66891
66941
  ic.ref2igtype['Contactin1_3s97C_human_C2-n2'] = 'IgC2';
66892
66942
  ic.ref2igtype['CuZnSuperoxideDismutase_1hl5C_human'] = 'other Ig'; //'SOD';
66893
66943
  ic.ref2igtype['ECadherin_4zt1A_human_n2'] = 'other Ig'; //'Cadherin';
@@ -66896,12 +66946,12 @@ class Dssp {
66896
66946
  ic.ref2igtype['FAB-HEAVY_5esv_V-n1'] = 'IgV';
66897
66947
  ic.ref2igtype['FAB-LIGHT_5esv_C1-n2'] = 'IgC1';
66898
66948
  ic.ref2igtype['FAB-LIGHT_5esv_V-n1'] = 'IgV';
66899
- ic.ref2igtype['GHR_1axiB_human_FN3-n1'] = 'IgFn3';
66949
+ ic.ref2igtype['GHR_1axiB_human_FN3-n1'] = 'IgFN3';
66900
66950
  ic.ref2igtype['ICOS_6x4gA_human_V'] = 'IgV';
66901
- ic.ref2igtype['IL6Rb_1bquB_human_FN3-n2'] = 'IgFn3';
66902
- ic.ref2igtype['IL6Rb_1bquB_human_FN3-n3'] = 'IgFn3';
66903
- ic.ref2igtype['InsulinR_8guyE_human_FN3-n1'] = 'IgFn3';
66904
- ic.ref2igtype['InsulinR_8guyE_human_FN3-n2'] = 'IgFn3';
66951
+ ic.ref2igtype['IL6Rb_1bquB_human_FN3-n2'] = 'IgFN3';
66952
+ ic.ref2igtype['IL6Rb_1bquB_human_FN3-n3'] = 'IgFN3';
66953
+ ic.ref2igtype['InsulinR_8guyE_human_FN3-n1'] = 'IgFN3';
66954
+ ic.ref2igtype['InsulinR_8guyE_human_FN3-n2'] = 'IgFN3';
66905
66955
  ic.ref2igtype['IsdA_2iteA_bacteria'] = 'IgE';
66906
66956
  ic.ref2igtype['JAM1_1nbqA_human_VorIset-n2'] = 'IgI';
66907
66957
  ic.ref2igtype['LAG3_7tzgD_human_C2-n2'] = 'IgC2';
@@ -66915,9 +66965,9 @@ class Dssp {
66915
66965
  ic.ref2igtype['PD1_4zqkB_human_V'] = 'IgV';
66916
66966
  ic.ref2igtype['PDL1_4z18B_human_V-n1'] = 'IgV';
66917
66967
  ic.ref2igtype['Palladin_2dm3A_human_Iset-n1'] = 'IgI';
66918
- ic.ref2igtype['RBPJ_6py8C_human_Unk-n1'] = 'IgFn3-like';
66919
- ic.ref2igtype['RBPJ_6py8C_human_Unk-n2'] = 'IgFn3-like';
66920
- ic.ref2igtype['Sidekick2_1wf5A_human_FN3-n7'] = 'IgFn3';
66968
+ ic.ref2igtype['RBPJ_6py8C_human_Unk-n1'] = 'IgFN3-like';
66969
+ ic.ref2igtype['RBPJ_6py8C_human_Unk-n2'] = 'IgFN3-like';
66970
+ ic.ref2igtype['Sidekick2_1wf5A_human_FN3-n7'] = 'IgFN3';
66921
66971
  ic.ref2igtype['Siglec3_5j0bB_human_C2-n2'] = 'IgC2';
66922
66972
  ic.ref2igtype['TCRa_6jxrm_human_C1-n2'] = 'IgC1';
66923
66973
  ic.ref2igtype['TCRa_6jxrm_human_V-n1'] = 'IgV';
@@ -66982,7 +67032,7 @@ class Dssp {
66982
67032
  let thisClass = this;
66983
67033
 
66984
67034
  let struArray = Object.keys(ic.structures);
66985
-
67035
+
66986
67036
  let ajaxArray = [];
66987
67037
  let domainidpairArray = [];
66988
67038
 
@@ -67001,7 +67051,7 @@ class Dssp {
67001
67051
  for(let j = 0, jl = chainidArray.length; j < jl; ++j) {
67002
67052
  let chainid = chainidArray[j];
67003
67053
 
67004
- // for selected atoms only
67054
+ // for selected atoms only, assign ic.resid2domainid[resid]
67005
67055
  let domainAtomsArray = this.getDomainAtomsArray(chainid, bRerun);
67006
67056
 
67007
67057
  if(!ic.domainid2refpdbname) ic.domainid2refpdbname = {};
@@ -67018,8 +67068,8 @@ class Dssp {
67018
67068
  let atomFirst = ic.firstAtomObjCls.getFirstAtomObj(domainAtomsArray[k]);
67019
67069
  let atomLast = ic.firstAtomObjCls.getLastAtomObj(domainAtomsArray[k]);
67020
67070
  let resiSum = atomFirst.resi + ':' + atomLast.resi + ':' + Object.keys(domainAtomsArray[k]).length;
67021
- //let domainid = chainid + '-' + k + '_' + Object.keys(domainAtomsArray[k]).length;
67022
- let domainid = chainid + ',' + k + '_' + resiSum;
67071
+ //let domainid = chainid + '-' + k + '_' + Object.keys(domainAtomsArray[k]).length;
67072
+ let domainid = chainid + ',' + k + '_' + resiSum;
67023
67073
  ic.domainid2pdb[domainid] = pdb_target;
67024
67074
 
67025
67075
  if(!template) {
@@ -67037,7 +67087,7 @@ class Dssp {
67037
67087
  // let alignAjax = me.getAjaxPostPromise(urlalign, dataObj);
67038
67088
 
67039
67089
  ajaxArray.push(alignAjax);
67040
-
67090
+
67041
67091
  domainidpairArray.push(domainid + "|" + ic.refpdbArray[index]);
67042
67092
  }
67043
67093
  }
@@ -67057,14 +67107,14 @@ class Dssp {
67057
67107
  // dataArray2 = await allPromise;
67058
67108
 
67059
67109
  dataArray2 = await this.promiseWithFixedJobs(ajaxArray);
67060
-
67110
+
67061
67111
  let bRound1 = true;
67062
- await thisClass.parseAlignData(dataArray2, domainidpairArray, bRound1);
67112
+ bNoMoreIg = await thisClass.parseAlignData(dataArray2, domainidpairArray, bRound1);
67063
67113
 
67064
67114
  /// if(ic.deferredRefnum !== undefined) ic.deferredRefnum.resolve();
67065
67115
  }
67066
67116
  else {
67067
- if(!me.bNode) console.log("Start alignment with the reference culsters " + JSON.stringify(ic.domainid2refpdbname));
67117
+ if(!me.bNode) console.log("Start alignment with the reference culsters " + JSON.stringify(ic.domainid2refpdbname));
67068
67118
 
67069
67119
  // start round2
67070
67120
  let ajaxArray = [];
@@ -67079,36 +67129,36 @@ class Dssp {
67079
67129
  //let allPromise2 = Promise.allSettled(pdbAjaxArray);
67080
67130
  //ic.pdbDataArray = await allPromise2;
67081
67131
 
67082
- ic.pdbDataArray = await this.promiseWithFixedJobs(pdbAjaxArray);
67132
+ let pdbDataArray = await this.promiseWithFixedJobs(pdbAjaxArray);
67083
67133
 
67084
67134
  for(let domainid in ic.domainid2refpdbname) {
67085
67135
  ic.domainid2refpdbname[domainid];
67086
67136
  domainid.substr(0, domainid.indexOf(','));
67087
67137
 
67088
67138
  let pdb_target = ic.domainid2pdb[domainid];
67089
- for(let index = 0, indexl = ic.pdbDataArray.length; index < indexl; ++index) {
67139
+ for(let index = 0, indexl = pdbDataArray.length; index < indexl; ++index) {
67090
67140
  let struct2 = ic.defaultPdbId + index;
67091
- let pdb_query = ic.pdbDataArray[index].value; //[0];
67141
+ let pdb_query = pdbDataArray[index].value; //[0];
67092
67142
 
67093
67143
  let header = 'HEADER ' + struct2 + '\n';
67094
67144
  pdb_query = header + pdb_query;
67095
-
67145
+
67096
67146
  let dataObj = {'pdb_query': pdb_query, 'pdb_target': pdb_target, "queryid": template};
67097
67147
  let alignAjax = me.getAjaxPostPromise(urltmalign, dataObj);
67098
67148
  ajaxArray.push(alignAjax);
67099
-
67149
+
67100
67150
  //domainidpairArray3.push(domainid + "," + refpdbname);
67101
67151
  domainidpairArray3.push(domainid + "|" + template);
67102
67152
  }
67103
67153
  }
67104
-
67154
+
67105
67155
  let dataArray3 = [];
67106
67156
  //let allPromise = Promise.allSettled(ajaxArray);
67107
67157
  //dataArray3 = await allPromise;
67108
67158
 
67109
67159
  dataArray3 = await this.promiseWithFixedJobs(ajaxArray);
67110
-
67111
- await thisClass.parseAlignData(dataArray3, domainidpairArray3);
67160
+
67161
+ bNoMoreIg = await thisClass.parseAlignData(dataArray3, domainidpairArray3);
67112
67162
  }
67113
67163
 
67114
67164
  return bNoMoreIg;
@@ -67124,8 +67174,8 @@ class Dssp {
67124
67174
  }
67125
67175
  //console.log("Error in aligning with TM-align...");
67126
67176
  return;
67127
- }
67128
- */
67177
+ }
67178
+ */
67129
67179
  }
67130
67180
 
67131
67181
  getDomainAtomsArray(chainid, bRerunDomain) { let ic = this.icn3d, me = ic.icn3dui;
@@ -67168,21 +67218,22 @@ class Dssp {
67168
67218
  //let result = ic.domain3dCls.c2b_NewSplitChain(ic.chains[chainid]);
67169
67219
  // assign ref numbers to selected residues
67170
67220
  let result = ic.domain3dCls.c2b_NewSplitChain(currAtoms, undefined);
67171
- let subdomains = result.subdomains;
67221
+ let subdomains = result.subdomains;
67172
67222
  let pos2resi = result.pos2resi;
67173
67223
 
67174
67224
  if(subdomains.length <= 1) {
67175
67225
  let residueArray = ic.resid2specCls.atoms2residues(Object.keys(currAtoms));
67176
67226
  if(residueArray.length < minResidues) return domainAtomsArray;
67177
-
67227
+ /*
67178
67228
  let atomFirst = ic.firstAtomObjCls.getFirstAtomObj(currAtoms);
67179
67229
  let atomLast = ic.firstAtomObjCls.getLastAtomObj(currAtoms);
67180
67230
  let resiSum = atomFirst.resi + ':' + atomLast.resi + ':' + Object.keys(currAtoms).length;
67181
-
67231
+ */
67182
67232
  for(let n = 0, nl = residueArray.length; n < nl; ++n) {
67183
67233
  let resid = residueArray[n];
67184
- ic.resid2domainid[resid] = chainid + ',0' + '_' + resiSum;
67185
-
67234
+ /*
67235
+ ic.resid2domainid[resid] = chainid + ',0' + '_' + resiSum;
67236
+ */
67186
67237
  // clear previous refnum assignment if any
67187
67238
  // if(!bRerunDomain && ic.resid2refnum && ic.resid2refnum[resid]) {
67188
67239
  // if(ic.resid2refnum && ic.resid2refnum[resid]) {
@@ -67193,7 +67244,7 @@ class Dssp {
67193
67244
 
67194
67245
  domainAtomsArray.push(currAtoms);
67195
67246
  }
67196
- else {
67247
+ else {
67197
67248
  for(let k = 0, kl = subdomains.length; k < kl; ++k) {
67198
67249
  let domainAtoms = {};
67199
67250
  let segArray = subdomains[k];
@@ -67220,7 +67271,7 @@ class Dssp {
67220
67271
  if(resCnt < minResidues) continue;
67221
67272
 
67222
67273
  domainAtomsArray.push(domainAtoms);
67223
-
67274
+ /*
67224
67275
  let atomFirst = ic.firstAtomObjCls.getFirstAtomObj(domainAtoms);
67225
67276
  let atomLast = ic.firstAtomObjCls.getLastAtomObj(domainAtoms);
67226
67277
  let resiSum = atomFirst.resi + ':' + atomLast.resi + ':' + Object.keys(domainAtoms).length;
@@ -67231,15 +67282,16 @@ class Dssp {
67231
67282
  for(let n = parseInt(startResi); n <= parseInt(endResi); ++n) {
67232
67283
  let resid = chainid + '_' + pos2resi[n];
67233
67284
  //domainAtoms = me.hashUtilsCls.unionHash(domainAtoms, ic.residues[resid]);
67234
- ic.resid2domainid[resid] = chainid + ',' + k + '_' + resiSum;
67285
+ ic.resid2domainid[resid] = chainid + ',' + k + '_' + resiSum;
67235
67286
  }
67236
67287
  }
67288
+ */
67237
67289
  }
67238
67290
  }
67239
67291
 
67240
67292
  return domainAtomsArray;
67241
67293
  }
67242
-
67294
+
67243
67295
  getTemplateList(domainid) { let ic = this.icn3d; ic.icn3dui;
67244
67296
  let refpdbname = '', score = '', seqid = '', nresAlign = '';
67245
67297
 
@@ -67272,7 +67324,6 @@ class Dssp {
67272
67324
  if(!ic.domainid2ig2imgt) ic.domainid2ig2imgt = {};
67273
67325
 
67274
67326
  let minResidues = 20;
67275
-
67276
67327
  for(let i = 0, il = domainidpairArray.length; i < il; ++i) {
67277
67328
  //let queryData = (me.bNode) ? dataArray[i] : dataArray[i].value; //[0];
67278
67329
  let queryData = (dataArray[i]) ? dataArray[i].value : undefined; //[0];
@@ -67283,7 +67334,7 @@ class Dssp {
67283
67334
  }
67284
67335
 
67285
67336
  if(queryData[0].score === undefined) continue;
67286
-
67337
+
67287
67338
  //let domainid_index = domainidpairArray[i].split(',');
67288
67339
  //let domainid = domainid_index[0];
67289
67340
  let domainid = domainidpairArray[i].substr(0, domainidpairArray[i].indexOf('|'));
@@ -67304,7 +67355,7 @@ class Dssp {
67304
67355
  continue;
67305
67356
  }
67306
67357
  }
67307
-
67358
+
67308
67359
  if(!bRound1) {
67309
67360
  if(!me.bNode) console.log("refpdbname " + refpdbname + " TM-score: " + queryData[0].score);
67310
67361
  }
@@ -67367,8 +67418,13 @@ class Dssp {
67367
67418
  }
67368
67419
 
67369
67420
  if(!domainid2segs.hasOwnProperty(domainid) || queryData[0].score >= ic.domainid2score[domainid].split('_')[0]) {
67370
- ic.domainid2score[domainid] = queryData[0].score + '_' + queryData[0].frac_identical + '_' + queryData[0].num_res ;
67371
- ic.domainid2refpdbname[domainid] = refpdbname;
67421
+ ic.domainid2score[domainid] = queryData[0].score + '_' + queryData[0].frac_identical + '_' + queryData[0].num_res ;
67422
+ if(bRound1) {
67423
+ ic.domainid2refpdbname[domainid] = parseFloat(queryData[0].score) > 0.75 ? refpdbname : 'all_templates';
67424
+ }
67425
+ else {
67426
+ ic.domainid2refpdbname[domainid] = refpdbname;
67427
+ }
67372
67428
  domainid2segs[domainid] = queryData[0].segs;
67373
67429
  ic.domainid2ig2kabat[domainid] = queryData[0].ig2kabat;
67374
67430
  ic.domainid2ig2imgt[domainid] = queryData[0].ig2imgt;
@@ -67379,10 +67435,17 @@ class Dssp {
67379
67435
  }
67380
67436
 
67381
67437
  async parseAlignData(dataArray, domainidpairArray, bRound1) { let ic = this.icn3d, me = ic.icn3dui;
67438
+ let bNoMoreIg = false;
67439
+
67382
67440
  let domainid2segs = this.parseAlignData_part1(dataArray, domainidpairArray, bRound1);
67383
67441
 
67442
+ if(Object.keys(domainid2segs).length == 0) {
67443
+ bNoMoreIg = true;
67444
+ return bNoMoreIg;
67445
+ }
67446
+
67384
67447
  if(bRound1) {
67385
- if(!me.bNode) console.log("Start round 2 alignment with the reference culsters " + JSON.stringify(ic.domainid2refpdbname));
67448
+ if(!me.bNode) console.log("Start round 2 alignment with the reference culsters " + JSON.stringify(ic.domainid2refpdbname));
67386
67449
 
67387
67450
  // start round2
67388
67451
  let ajaxArray = [];
@@ -67400,7 +67463,7 @@ class Dssp {
67400
67463
  //refpdbname = pdbid;
67401
67464
  refpdbname = chainid;
67402
67465
 
67403
- if(!me.bNode) console.log("Adjusted refpdbname for domainid " + domainid + ": " + refpdbname);
67466
+ if(!me.bNode) console.log("Adjusted refpdbname for domainid " + domainid + ": " + refpdbname);
67404
67467
  }
67405
67468
 
67406
67469
  if(!ic.refpdbHash[refpdbname]) {
@@ -67418,20 +67481,20 @@ class Dssp {
67418
67481
  //let allPromise2 = Promise.allSettled(pdbAjaxArray);
67419
67482
  //ic.pdbDataArray = await allPromise2;
67420
67483
 
67421
- ic.pdbDataArray = await this.promiseWithFixedJobs(pdbAjaxArray);
67484
+ let pdbDataArray = await this.promiseWithFixedJobs(pdbAjaxArray);
67422
67485
 
67423
67486
  let pdb_target = ic.domainid2pdb[domainid];
67424
- for(let index = 0, indexl = ic.pdbDataArray.length; index < indexl; ++index) {
67487
+ for(let index = 0, indexl = pdbDataArray.length; index < indexl; ++index) {
67425
67488
  let struct2 = ic.defaultPdbId + index;
67426
- //let pdb_query = (me.bNode) ? ic.pdbDataArray[index] : ic.pdbDataArray[index].value; //[0];
67427
- let pdb_query = ic.pdbDataArray[index].value; //[0];
67489
+ //let pdb_query = (me.bNode) ? pdbDataArray[index] : pdbDataArray[index].value; //[0];
67490
+ let pdb_query = pdbDataArray[index].value; //[0];
67428
67491
  let header = 'HEADER ' + struct2 + '\n';
67429
67492
  pdb_query = header + pdb_query;
67430
67493
 
67431
67494
  let dataObj = {'pdb_query': pdb_query, 'pdb_target': pdb_target, "queryid": ic.refpdbHash[refpdbname][index]};
67432
67495
  let alignAjax = me.getAjaxPostPromise(urltmalign, dataObj);
67433
67496
  ajaxArray.push(alignAjax);
67434
-
67497
+
67435
67498
  //domainidpairArray3.push(domainid + "," + refpdbname);
67436
67499
  domainidpairArray3.push(domainid + "|" + ic.refpdbHash[refpdbname][index]);
67437
67500
  }
@@ -67444,12 +67507,14 @@ class Dssp {
67444
67507
  dataArray3 = await this.promiseWithFixedJobs(ajaxArray);
67445
67508
 
67446
67509
  await this.parseAlignData(dataArray3, domainidpairArray3, false);
67447
-
67510
+
67448
67511
  // end of round 2
67449
- return;
67512
+ return bNoMoreIg;
67450
67513
  }
67451
67514
 
67452
67515
  await this.parseAlignData_part3(domainid2segs);
67516
+
67517
+ return bNoMoreIg;
67453
67518
  }
67454
67519
 
67455
67520
  async parseAlignData_part3(domainid2segs) { let ic = this.icn3d, me = ic.icn3dui;
@@ -67595,7 +67660,7 @@ class Dssp {
67595
67660
  for(let i = 0, il = segArray.length; i < il; ++i) {
67596
67661
  let seg = segArray[i];
67597
67662
  if(!seg) continue;
67598
-
67663
+
67599
67664
  let qStart = seg.q_start;
67600
67665
  parseInt(seg.q_start);
67601
67666
  if(isNaN(seg.q_start)) seg.q_start.substr(seg.q_start.length - 1, 1);
@@ -67636,9 +67701,10 @@ class Dssp {
67636
67701
  if(currStrand != currStrandFinal) {
67637
67702
  refnumLabel = this.getLabelFromRefnum(refnum, currStrandFinal);
67638
67703
  }
67639
-
67640
- ic.resid2refnum[resid] = refnumLabel;
67704
+
67705
+ ic.resid2refnum[resid] = refnumLabel;
67641
67706
  ic.resid2refnum_ori[resid] = refnumLabel;
67707
+ ic.resid2domainid[resid] = domainid;
67642
67708
 
67643
67709
  // final reference numbers will be assign in ic.annoIgCls.showRefNum()
67644
67710
 
@@ -67685,7 +67751,7 @@ class Dssp {
67685
67751
  else {
67686
67752
  await ic.showAnnoCls.showAnnotations();
67687
67753
  }
67688
-
67754
+
67689
67755
  ic.annotationCls.setAnnoViewAndDisplay('detailed view');
67690
67756
  }
67691
67757
  else if(!me.bNode) {
@@ -67726,13 +67792,13 @@ class Dssp {
67726
67792
  // loops may have numbers such as 1310, 1410
67727
67793
 
67728
67794
  let refnumLabel;
67729
-
67795
+
67730
67796
  if(refnum < 1000) refnumLabel = undefined;
67731
67797
  else if(refnum >= 1200 && refnum < 1290) refnumLabel = "A---" + oriRefnum;
67732
67798
  else if(refnum >= 1320 && refnum < 1390) refnumLabel = "A--" + oriRefnum;
67733
67799
  else if(refnum >= 1420 && refnum < 1490) refnumLabel = "A-" + oriRefnum;
67734
- else if(refnum >= 1520 && refnum < 1590) refnumLabel = "A" + oriRefnum;
67735
- else if(refnum >= 1620 && refnum < 1690) refnumLabel = "A+" + oriRefnum;
67800
+ else if(refnum >= 1520 && refnum < 1590) refnumLabel = "A" + oriRefnum;
67801
+ else if(refnum >= 1620 && refnum < 1690) refnumLabel = "A+" + oriRefnum;
67736
67802
  else if(refnum >= 1820 && refnum < 1890) refnumLabel = "A'" + oriRefnum;
67737
67803
  else if(refnum >= 2000 && refnum < 2900) refnumLabel = "B" + oriRefnum;
67738
67804
  else if(refnum >= 3300 && refnum < 3390) refnumLabel = "C--" + oriRefnum;
@@ -67741,8 +67807,8 @@ class Dssp {
67741
67807
  else if(refnum >= 4000 && refnum < 4900) refnumLabel = "C'" + oriRefnum;
67742
67808
  else if(refnum >= 5000 && refnum < 5900) refnumLabel = "C''" + oriRefnum;
67743
67809
  else if(refnum >= 6000 && refnum < 6900) refnumLabel = "D" + oriRefnum;
67744
- else if(refnum >= 7500 && refnum < 7590) refnumLabel = "E" + oriRefnum;
67745
- else if(refnum >= 7620 && refnum < 7900) refnumLabel = "E+" + oriRefnum;
67810
+ else if(refnum >= 7500 && refnum < 7590) refnumLabel = "E" + oriRefnum;
67811
+ else if(refnum >= 7620 && refnum < 7900) refnumLabel = "E+" + oriRefnum;
67746
67812
  else if(refnum >= 8000 && refnum < 8900) refnumLabel = "F" + oriRefnum;
67747
67813
  else if(refnum >= 9500 && refnum < 9590) refnumLabel = "G" + oriRefnum;
67748
67814
  else if(refnum >= 9620 && refnum < 9690) refnumLabel = "G+" + oriRefnum;
@@ -67831,7 +67897,7 @@ class Dssp {
67831
67897
  if(type == 'igstrand' || type == 'IgStrand') {
67832
67898
  // iGStrand reference numbers were adjusted when showing in sequences
67833
67899
  if(me.bNode) {
67834
- for(let chnid in ic.chains) {
67900
+ for(let chnid in ic.chains) {
67835
67901
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.chains[chnid]);
67836
67902
  if(ic.proteins.hasOwnProperty(atom.serial)) {
67837
67903
  let giSeq = [];
@@ -67842,22 +67908,22 @@ class Dssp {
67842
67908
  }
67843
67909
  }
67844
67910
  }
67845
-
67911
+
67846
67912
  let resid2refnum = {};
67847
67913
  for(let resid in ic.resid2refnum) {
67848
67914
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
67849
67915
  if(!atom) continue;
67850
-
67916
+
67851
67917
  let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
67852
-
67918
+
67853
67919
  let domainid = ic.resid2domainid[resid];
67854
67920
  let refnumLabel = ic.resid2refnum[resid];
67855
-
67921
+
67856
67922
  if(refnumLabel) {
67857
67923
  let refnumStr_ori = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
67858
67924
  (ic.domainid2ig2kabat[domainid]) ? ic.domainid2ig2kabat[domainid][refnumStr_ori] : undefined;
67859
67925
  }
67860
-
67926
+
67861
67927
  if(ic.resid2refnum[resid]) {
67862
67928
  if(ic.residIgLoop.hasOwnProperty(resid)) { // loop
67863
67929
  resid2refnum[resid + '_' + resn] = ic.resid2refnum[resid] + '_loop';
@@ -67938,18 +68004,18 @@ class Dssp {
67938
68004
  for(let resid in ic.resid2refnum) {
67939
68005
  let domainid = ic.resid2domainid[resid];
67940
68006
  let refnumStr, refnumLabel = ic.resid2refnum[resid];
67941
-
68007
+
67942
68008
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
67943
68009
  let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
67944
-
68010
+
67945
68011
  if(refnumLabel) {
67946
68012
  let refnumStr_ori = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
67947
68013
  refnumStr = (ic.domainid2ig2kabat[domainid]) ? ic.domainid2ig2kabat[domainid][refnumStr_ori] : undefined;
67948
68014
  }
67949
-
68015
+
67950
68016
  resid2kabat[resid + '_' + resn] = refnumStr;
67951
68017
  }
67952
-
68018
+
67953
68019
  refData += JSON.stringify(resid2kabat);
67954
68020
  }
67955
68021
  // 3. show IMGT ref numbers
@@ -67958,25 +68024,25 @@ class Dssp {
67958
68024
  for(let resid in ic.resid2refnum) {
67959
68025
  let domainid = ic.resid2domainid[resid];
67960
68026
  let refnumStr, refnumLabel = ic.resid2refnum[resid];
67961
-
68027
+
67962
68028
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
67963
68029
  let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
67964
-
68030
+
67965
68031
  if(refnumLabel) {
67966
68032
  let refnumStr_ori = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
67967
68033
  refnumStr = (ic.domainid2ig2imgt[domainid]) ? ic.domainid2ig2imgt[domainid][refnumStr_ori] : undefined;
67968
68034
  }
67969
-
68035
+
67970
68036
  resid2imgt[resid + '_' + resn] = refnumStr;
67971
68037
  }
67972
-
68038
+
67973
68039
  refData += JSON.stringify(resid2imgt);
67974
68040
  }
67975
68041
 
67976
68042
 
67977
68043
  if(!me.bNode) {
67978
68044
  let file_pref = Object.keys(me.utilsCls.getHlStructures()).join(',');
67979
-
68045
+
67980
68046
  ic.saveFileCls.saveFile(file_pref + '_refnum_' + type + '.txt', 'text', [refData]);
67981
68047
  }
67982
68048
  else {
@@ -67994,7 +68060,7 @@ class Dssp {
67994
68060
 
67995
68061
  for(let i = 0, il = parseInt((ajaxArray.length - 1) / n + 1); i < il; ++i) {
67996
68062
  let currAjaxArray = [];
67997
- if(i == il - 1) { // last one
68063
+ if(i == il - 1) { // last one
67998
68064
  currAjaxArray = ajaxArray.slice(i * n, ajaxArray.length);
67999
68065
  }
68000
68066
  else {