icn3d 3.29.6 → 3.29.7

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
@@ -8534,7 +8534,7 @@ class ClickMenu {
8534
8534
 
8535
8535
  $(document).on("click", "." + me.pre + "mn6_rotate90", function(e) { let ic = me.icn3d; //e.preventDefault();
8536
8536
  let value = $(this).attr('v').toLowerCase();
8537
- let direction = value.split('-')[0];
8537
+ let direction = value.split(' ')[1];
8538
8538
 
8539
8539
  thisClass.setLogCmd(value, true);
8540
8540
  let axis;
@@ -9575,14 +9575,14 @@ class SetMenu {
9575
9575
  }
9576
9576
 
9577
9577
  //!!!
9578
-
9578
+ /*
9579
9579
  html += this.getMenuText('m1_exportrefnum', 'Reference Numbers', undefined, undefined, 2);
9580
9580
  html += "<ul>";
9581
9581
  html += this.getLink('mn1_exportIgstrand', 'Ig Strand', undefined, 3);
9582
9582
  html += this.getLink('mn1_exportKabat', 'Kabat', undefined, 3);
9583
9583
  html += this.getLink('mn1_exportImgt', 'IMGT', undefined, 3);
9584
9584
  html += "</ul>";
9585
-
9585
+ */
9586
9586
 
9587
9587
  html += "<li><br/></li>";
9588
9588
 
@@ -9803,7 +9803,7 @@ class SetMenu {
9803
9803
  html += "</li>";
9804
9804
 
9805
9805
  html += this.getLink('mn2_translate', 'Translate XYZ', undefined, 1);
9806
- html += this.getLink('mn2_matrix', 'Apply Matrix', undefined, 1);
9806
+ html += this.getLink('mn2_matrix', 'Rotate with Matrix', undefined, 1);
9807
9807
 
9808
9808
  html += this.getMenuText('mn2_camera', 'Camera', undefined, undefined, 1);
9809
9809
  html += "<ul>";
@@ -10426,8 +10426,8 @@ class SetMenu {
10426
10426
  //}
10427
10427
 
10428
10428
  //!!!
10429
- html += this.getRadio('mn4_clr', 'mn4_clrIgstrand', 'Ig Strand', undefined, undefined, 2);
10430
- html += this.getRadio('mn4_clr', 'mn4_clrIgproto', 'Ig Protodomain', undefined, undefined, 2);
10429
+ //html += this.getRadio('mn4_clr', 'mn4_clrIgstrand', 'Ig Strand', undefined, undefined, 2);
10430
+ //html += this.getRadio('mn4_clr', 'mn4_clrIgproto', 'Ig Protodomain', undefined, undefined, 2);
10431
10431
  }
10432
10432
  else {
10433
10433
  //if(!me.cfg.hidelicense) html += this.getRadio('mn4_clr', 'mn1_delphi2', 'DelPhi<br><span style="padding-left:1.5em;">Potential ' + me.htmlCls.licenseStr + '</span>');
@@ -10558,7 +10558,7 @@ class SetMenu {
10558
10558
  html += this.getRadio('mn6_addlabel', 'mn6_addlabelResidues', 'per Residue', undefined, 1, 2);
10559
10559
  html += this.getRadio('mn6_addlabel', 'mn6_addlabelResnum', 'per Residue & Number', undefined, 1, 2);
10560
10560
  //!!!
10561
- html += this.getRadio('mn6_addlabel', 'mn6_addlabelRefnum', 'per Reference Number', undefined, 1, 2);
10561
+ //html += this.getRadio('mn6_addlabel', 'mn6_addlabelRefnum', 'per Reference Number', undefined, 1, 2);
10562
10562
  html += this.getRadio('mn6_addlabel', 'mn6_addlabelChains', 'per Chain', undefined, undefined, 2);
10563
10563
  html += this.getRadio('mn6_addlabel', 'mn6_addlabelTermini', 'N- & C-Termini', undefined, 1, 2);
10564
10564
  }
@@ -10650,13 +10650,13 @@ class SetMenu {
10650
10650
 
10651
10651
  html += "<ul>";
10652
10652
  //!!!
10653
-
10653
+ /*
10654
10654
  html += this.getLink('mn6_igrefYes', 'Show Ig Ref. Number', undefined, 2);
10655
10655
  html += this.getLink('mn6_igrefTpl', 'Ig w/ Specified Template', undefined, 2);
10656
10656
  html += this.getLink('mn6_igrefNo', 'Hide Ig Ref. Number', undefined, 2);
10657
10657
 
10658
10658
  html += this.getMenuSep();
10659
-
10659
+ */
10660
10660
  html += this.getLink('mn6_customref', 'Custom Ref. Number', undefined, 2);
10661
10661
  html += "</ul>";
10662
10662
  html += "</li>";
@@ -12796,7 +12796,7 @@ class SetDialog {
12796
12796
  html += "11: " + me.htmlCls.inputTextStr + "id='" + me.pre + "matrix11' value='0' size=2> ";
12797
12797
  html += "15: " + me.htmlCls.inputTextStr + "id='" + me.pre + "matrix15' value='1' size=2><br>";
12798
12798
 
12799
- html += me.htmlCls.buttonStr + "matrix_pdb'>Apply Matrix</button>";
12799
+ html += me.htmlCls.buttonStr + "matrix_pdb'>Rotate with Matrix</button>";
12800
12800
  html += "</div>";
12801
12801
 
12802
12802
  html += me.htmlCls.divStr + "dl_igrefTpl' class='" + dialogClass + "'>";
@@ -36113,6 +36113,7 @@ class SetColor {
36113
36113
  break;
36114
36114
 
36115
36115
  case 'secondary structure green':
36116
+ case 'secondary structure':
36116
36117
  ic.sheetcolor = 'green';
36117
36118
  for (let i in atoms) {
36118
36119
  let atom = ic.atoms[i];
@@ -36125,7 +36126,7 @@ class SetColor {
36125
36126
  break;
36126
36127
 
36127
36128
  case 'secondary structure yellow':
36128
- case 'secondary structure':
36129
+ //case 'secondary structure':
36129
36130
  ic.sheetcolor = 'yellow';
36130
36131
  for (let i in atoms) {
36131
36132
  let atom = ic.atoms[i];
@@ -41217,14 +41218,16 @@ class AddTrack {
41217
41218
 
41218
41219
  html += '<span id="' + pre + '_' + ic.pre + chnid + '_' + pos + '" title="' + c + pos + '" class="icn3d-residue" ' + tmpStr + '>' + c + '</span>';
41219
41220
 
41220
- let tmpStrExon = 'style="background-color:' + pos2exonColor[cnt] + '"';
41221
- htmlExon += '<span id="' + pre + '_' + ic.pre + chnid + '_' + pos + '" title="' + c + pos + ', Exon ' + (pos2exonIndex[cnt] + 1) + ': ' + pos2genome[cnt] + '" class="icn3d-residue" ' + tmpStrExon + '>&nbsp;</span>';
41221
+ if(exonArray) {
41222
+ let tmpStrExon = 'style="background-color:' + pos2exonColor[cnt] + '"';
41223
+ htmlExon += '<span id="' + pre + '_' + ic.pre + chnid + '_' + pos + '" title="' + c + pos + ', Exon ' + (pos2exonIndex[cnt] + 1) + ': ' + pos2genome[cnt] + '" class="icn3d-residue" ' + tmpStrExon + '>&nbsp;</span>';
41222
41224
 
41223
- // set atom color
41224
- for(let serial in ic.residues[chnid + '_' + pos]) {
41225
- let atom = ic.atoms[serial];
41226
- atom.color = me.parasCls.thr(pos2exonColor[cnt]);
41227
- ic.atomPrevColors[serial] = atom.color;
41225
+ // set atom color
41226
+ for(let serial in ic.residues[chnid + '_' + pos]) {
41227
+ let atom = ic.atoms[serial];
41228
+ atom.color = me.parasCls.thr(pos2exonColor[cnt]);
41229
+ ic.atomPrevColors[serial] = atom.color;
41230
+ }
41228
41231
  }
41229
41232
 
41230
41233
  htmlTmp2 += ic.showSeqCls.insertGapOverview(chnid, i);
@@ -43948,6 +43951,8 @@ class ShowSeq {
43948
43951
  giSeq = ic.giSeq[chnid];
43949
43952
  }
43950
43953
 
43954
+ if(!giSeq) return;
43955
+
43951
43956
  // remove null giSeq[i]
43952
43957
  let giSeqTmp = [];
43953
43958
  for(let i = 0, il = giSeq.length; i < il; ++i) {
@@ -47099,12 +47104,12 @@ class LineGraph {
47099
47104
 
47100
47105
  if(bRerunDomain) {
47101
47106
  let atomsAssigned = {};
47102
- // for(let resid in ic.resid2refnum_ori) {
47103
- // atomsAssigned = me.hashUtilsCls.unionHash(atomsAssigned, ic.residues[resid]);
47104
- // }
47105
- for(let resid in ic.resid2refnum) {
47106
- if(ic.resid2refnum[resid]) atomsAssigned = me.hashUtilsCls.unionHash(atomsAssigned, ic.residues[resid]);
47107
+ for(let resid in ic.resid2refnum_ori) {
47108
+ atomsAssigned = me.hashUtilsCls.unionHash(atomsAssigned, ic.residues[resid]);
47107
47109
  }
47110
+ // for(let resid in ic.resid2refnum) {
47111
+ // if(ic.resid2refnum[resid]) atomsAssigned = me.hashUtilsCls.unionHash(atomsAssigned, ic.residues[resid]);
47112
+ // }
47108
47113
 
47109
47114
  currAtoms = me.hashUtilsCls.exclHash(currAtoms, atomsAssigned);
47110
47115
 
@@ -47257,12 +47262,14 @@ class LineGraph {
47257
47262
 
47258
47263
  for(let i = 0, il = domainidpairArray.length; i < il; ++i) {
47259
47264
  //let queryData = (me.bNode) ? dataArray[i] : dataArray[i].value; //[0];
47260
- let queryData = dataArray[i].value; //[0];
47265
+ let queryData = (dataArray[i]) ? dataArray[i].value : undefined; //[0];
47261
47266
 
47262
47267
  if(!queryData || queryData.length == 0) {
47263
47268
  if(!me.bNode) console.log("The alignment data for " + domainidpairArray[i] + " is unavailable...");
47264
47269
  continue;
47265
47270
  }
47271
+
47272
+ if(queryData[0].score === undefined) continue;
47266
47273
 
47267
47274
  //let domainid_index = domainidpairArray[i].split(',');
47268
47275
  //let domainid = domainid_index[0];
@@ -47470,7 +47477,7 @@ class LineGraph {
47470
47477
 
47471
47478
  // assign ic.resid2refnum, ic.refnum2residArray, ic.chainsMapping
47472
47479
  if(!ic.resid2refnum) ic.resid2refnum = {};
47473
- // if(!ic.resid2refnum_ori) ic.resid2refnum_ori = {};
47480
+ if(!ic.resid2refnum_ori) ic.resid2refnum_ori = {};
47474
47481
  if(!ic.refnum2residArray) ic.refnum2residArray = {};
47475
47482
  if(!ic.chainsMapping) ic.chainsMapping = {};
47476
47483
 
@@ -47499,7 +47506,8 @@ class LineGraph {
47499
47506
  let CAtom, CpAtom, DAtom, EAtom;
47500
47507
  //let chainid = domainid.split(',')[0];
47501
47508
 
47502
- let cntBtCE = 0;
47509
+ let cntBtwCE;
47510
+ let CpToDResi = [], DToCpResi = [];
47503
47511
  for(let i = 0, il = segArray.length; i < il; ++i) {
47504
47512
  let seg = segArray[i];
47505
47513
  if(!seg) continue;
@@ -47509,47 +47517,59 @@ class LineGraph {
47509
47517
 
47510
47518
  if(seg.q_start.indexOf('3550') != -1) {
47511
47519
  bCstrand = true;
47512
- CAtom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
47520
+ CAtom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[resid]);
47521
+
47522
+ // a chain could have multiple Ig domains
47523
+ cntBtwCE = 0;
47513
47524
  }
47514
47525
  else if(seg.q_start.indexOf('4550') != -1) {
47515
47526
  bCpstrand = true;
47516
- CpAtom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
47517
- ++cntBtCE;
47527
+ CpAtom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[resid]);
47528
+ ++cntBtwCE;
47518
47529
  }
47519
47530
  // else if(seg.q_start.indexOf('5550') != -1) {
47520
47531
  // bCppstrand = true;
47521
- // CppAtom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
47522
- // ++cntBtCE;
47532
+ // CppAtom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[resid]);
47533
+ // ++cntBtwCE;
47523
47534
  // }
47524
47535
  else if(seg.q_start.indexOf('6550') != -1) {
47525
47536
  bDstrand = true;
47526
- DAtom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
47527
- ++cntBtCE;
47537
+ DAtom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[resid]);
47538
+ ++cntBtwCE;
47528
47539
  }
47529
47540
  else if(seg.q_start.indexOf('7550') != -1) {
47530
47541
  bEstrand = true;
47531
- EAtom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
47532
- }
47542
+ EAtom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[resid]);
47533
47543
 
47534
- if(bCstrand && bCpstrand && bCppstrand && bDstrand && bEstrand) break;
47535
- }
47544
+ // check C' and D strands
47545
+ if(cntBtwCE == 1) {
47546
+ let distToC = (bCpstrand) ? CpAtom.coord.distanceTo(CAtom.coord) : DAtom.coord.distanceTo(CAtom.coord);
47547
+ let distToE = (bCpstrand) ? CpAtom.coord.distanceTo(EAtom.coord) : DAtom.coord.distanceTo(EAtom.coord);
47548
+ distToC = parseInt(distToC);
47549
+ distToE = parseInt(distToE);
47536
47550
 
47537
- let CpToDResi, DToCpResi;
47538
- if(cntBtCE == 1) {
47539
- let distToC = (bCpstrand) ? CpAtom.coord.distanceTo(CAtom.coord) : DAtom.coord.distanceTo(CAtom.coord);
47540
- let distToE = (bCpstrand) ? CpAtom.coord.distanceTo(EAtom.coord) : DAtom.coord.distanceTo(EAtom.coord);
47551
+ let resiDistToC = (bCpstrand) ? parseInt(CpAtom.resi) - parseInt(CAtom.resi) : parseInt(DAtom.resi) - parseInt(CAtom.resi);
47552
+ let resiDistToE = (bCpstrand) ? parseInt(EAtom.resi) - parseInt(CpAtom.resi) : parseInt(EAtom.resi) - parseInt(DAtom.resi);
47541
47553
 
47542
- if(bCpstrand && distToC > distToE) { // rename C' to D
47543
- CpToDResi = CAtom.resi;
47544
- }
47545
- else if(bDstrand && distToC < distToE) { // rename D to C'
47546
- DToCpResi = DAtom.resi;
47554
+ if(bCpstrand) {
47555
+ if(distToC > distToE || (distToC == distToE && resiDistToC > resiDistToE)) { // rename C' to D
47556
+ CpToDResi.push(CpAtom.resi);
47557
+ }
47558
+ }
47559
+ else if(bDstrand) {
47560
+ if(distToC < distToE || (distToC == distToE && resiDistToC < resiDistToE)) { // rename D to C'
47561
+ DToCpResi.push(DAtom.resi);
47562
+ }
47563
+ }
47564
+ }
47547
47565
  }
47566
+
47567
+ if(bCstrand && bCpstrand && bCppstrand && bDstrand && bEstrand) break;
47548
47568
  }
47549
- // adjust C' and D strands ======end
47550
47569
 
47551
- let prevStrand;
47552
- let bCd19 = refpdbnameArray.length == 1 && refpdbnameArray[0] == 'CD19_6al5A_human_C2orV-n1';
47570
+
47571
+ let currStrand;
47572
+ refpdbnameArray.length == 1 && refpdbnameArray[0] == 'CD19_6al5A_human_C2orV-n1';
47553
47573
  for(let i = 0, il = segArray.length; i < il; ++i) {
47554
47574
  let seg = segArray[i];
47555
47575
  if(!seg) continue;
@@ -47570,21 +47590,33 @@ class LineGraph {
47570
47590
  //let refnum = qStart + postfix;
47571
47591
  let refnum = qStart;
47572
47592
 
47573
- let prevStrandFinal = prevStrand;
47574
- if(prevStrand == "C'" && CpToDResi && parseInt(seg.t_start) < parseInt(CpToDResi) + 10
47575
- && parseInt(seg.t_start) > parseInt(CpToDResi) - 10 ) {
47576
- prevStrandFinal = "D";
47593
+ let refnumLabel = this.getLabelFromRefnum(refnum);
47594
+ currStrand = (refnumLabel) ? refnumLabel.replace(new RegExp(refnum,'g'), '') : undefined;
47595
+
47596
+ let currStrandFinal = currStrand;
47597
+ if(currStrand == "C'" && CpToDResi.length > 0) {
47598
+ for(let j = 0, jl = CpToDResi.length; j < jl; ++j) {
47599
+ if(parseInt(seg.t_start) < parseInt(CpToDResi[j]) + 10 && parseInt(seg.t_start) > parseInt(CpToDResi[j]) - 10 ) {
47600
+ currStrandFinal = "D";
47601
+ break;
47602
+ }
47603
+ }
47577
47604
  }
47578
- else if(prevStrand == "D" && DToCpResi && parseInt(seg.t_start) < parseInt(DToCpResi) + 10
47579
- && parseInt(seg.t_start) > parseInt(DToCpResi) - 10 ) {
47580
- prevStrandFinal = "C'";
47605
+ else if(currStrand == "D" && DToCpResi.length > 0) {
47606
+ for(let j = 0, jl = DToCpResi.length; j < jl; ++j) {
47607
+ if(parseInt(seg.t_start) < parseInt(DToCpResi[j]) + 10 && parseInt(seg.t_start) > parseInt(DToCpResi[j]) - 10 ) {
47608
+ currStrandFinal = "C'";
47609
+ break;
47610
+ }
47611
+ }
47581
47612
  }
47582
47613
 
47583
- let refnumLabel = this.getLabelFromRefnum(refnum, prevStrandFinal, bCd19);
47584
- prevStrand = (refnumLabel) ? refnumLabel.replace(new RegExp(refnum,'g'), '') : undefined;
47585
-
47586
- ic.resid2refnum[resid] = refnumLabel;
47587
- // ic.resid2refnum_ori[resid] = refnumLabel;
47614
+ if(currStrand != currStrandFinal) {
47615
+ refnumLabel = this.getLabelFromRefnum(refnum, currStrandFinal);
47616
+ }
47617
+
47618
+ ic.resid2refnum[resid] = refnumLabel;
47619
+ ic.resid2refnum_ori[resid] = refnumLabel;
47588
47620
 
47589
47621
  // final reference numbers will be assign in ic.showSeqCls.showRefNum()
47590
47622
 
@@ -47626,7 +47658,7 @@ class LineGraph {
47626
47658
  }
47627
47659
  }
47628
47660
 
47629
- getLabelFromRefnum(oriRefnum, prevStrand, bCd19) { let ic = this.icn3d; ic.icn3dui;
47661
+ getLabelFromRefnum(oriRefnum, prevStrand) { let ic = this.icn3d; ic.icn3dui;
47630
47662
  let refnum = parseInt(oriRefnum);
47631
47663
 
47632
47664
  //N-terminus = 0999-0001
@@ -47653,28 +47685,34 @@ class LineGraph {
47653
47685
 
47654
47686
  // loops may have numbers such as 1310, 1410
47655
47687
 
47656
- if(refnum < 1000) return undefined;
47657
- else if(refnum >= 1200 && refnum < 1290) return "A---" + oriRefnum;
47658
- else if(refnum >= 1320 && refnum < 1390) return "A--" + oriRefnum;
47659
- else if(refnum >= 1420 && refnum < 1490) return "A-" + oriRefnum;
47660
- else if(refnum >= 1520 && refnum < 1590) return "A" + oriRefnum;
47661
- else if(refnum >= 1620 && refnum < 1690) return "A+" + oriRefnum;
47662
- else if(refnum >= 1820 && refnum < 1890) return "A'" + oriRefnum;
47663
- else if(refnum >= 2000 && refnum < 2900) return "B" + oriRefnum;
47664
- else if(refnum >= 3300 && refnum < 3390) return "C--" + oriRefnum;
47665
- else if(refnum >= 3420 && refnum < 3490) return "C-" + oriRefnum;
47666
- else if(refnum >= 3520 && refnum < 3590) return "C" + oriRefnum;
47667
- else if(refnum >= 4000 && refnum < 4900) return "C'" + oriRefnum;
47668
- else if(refnum >= 5000 && refnum < 5900) return "C''" + oriRefnum;
47669
- else if(refnum >= 6000 && refnum < 6900) return "D" + oriRefnum;
47670
- else if(refnum >= 7500 && refnum < 7590) return "E" + oriRefnum;
47671
- else if(refnum >= 7620 && refnum < 7900) return "E+" + oriRefnum;
47672
- else if(refnum >= 8000 && refnum < 8900) return "F" + oriRefnum;
47673
- else if(refnum >= 9500 && refnum < 9590) return "G" + oriRefnum;
47674
- else if(refnum >= 9620 && refnum < 9690) return "G+" + oriRefnum;
47675
- else if(refnum >= 9720 && refnum < 9790) return "G++" + oriRefnum;
47676
- else if(refnum > 9900) return undefined;
47677
- else return " " + oriRefnum; }
47688
+ let refnumLabel;
47689
+
47690
+ if(refnum < 1000) refnumLabel = undefined;
47691
+ else if(refnum >= 1200 && refnum < 1290) refnumLabel = "A---" + oriRefnum;
47692
+ else if(refnum >= 1320 && refnum < 1390) refnumLabel = "A--" + oriRefnum;
47693
+ else if(refnum >= 1420 && refnum < 1490) refnumLabel = "A-" + oriRefnum;
47694
+ else if(refnum >= 1520 && refnum < 1590) refnumLabel = "A" + oriRefnum;
47695
+ else if(refnum >= 1620 && refnum < 1690) refnumLabel = "A+" + oriRefnum;
47696
+ else if(refnum >= 1820 && refnum < 1890) refnumLabel = "A'" + oriRefnum;
47697
+ else if(refnum >= 2000 && refnum < 2900) refnumLabel = "B" + oriRefnum;
47698
+ else if(refnum >= 3300 && refnum < 3390) refnumLabel = "C--" + oriRefnum;
47699
+ else if(refnum >= 3420 && refnum < 3490) refnumLabel = "C-" + oriRefnum;
47700
+ else if(refnum >= 3520 && refnum < 3590) refnumLabel = "C" + oriRefnum;
47701
+ else if(refnum >= 4000 && refnum < 4900) refnumLabel = "C'" + oriRefnum;
47702
+ else if(refnum >= 5000 && refnum < 5900) refnumLabel = "C''" + oriRefnum;
47703
+ else if(refnum >= 6000 && refnum < 6900) refnumLabel = "D" + oriRefnum;
47704
+ else if(refnum >= 7500 && refnum < 7590) refnumLabel = "E" + oriRefnum;
47705
+ else if(refnum >= 7620 && refnum < 7900) refnumLabel = "E+" + oriRefnum;
47706
+ else if(refnum >= 8000 && refnum < 8900) refnumLabel = "F" + oriRefnum;
47707
+ else if(refnum >= 9500 && refnum < 9590) refnumLabel = "G" + oriRefnum;
47708
+ else if(refnum >= 9620 && refnum < 9690) refnumLabel = "G+" + oriRefnum;
47709
+ else if(refnum >= 9720 && refnum < 9790) refnumLabel = "G++" + oriRefnum;
47710
+ else if(refnum > 9900) refnumLabel = undefined;
47711
+ else refnumLabel = " " + oriRefnum;
47712
+ if(prevStrand) refnumLabel = prevStrand + oriRefnum;
47713
+
47714
+ return refnumLabel
47715
+ }
47678
47716
 
47679
47717
  async parseCustomRefFile(data) { let ic = this.icn3d; ic.icn3dui;
47680
47718
  ic.bShowCustomRefnum = true;
@@ -53086,6 +53124,7 @@ class MmcifParser {
53086
53124
  }
53087
53125
 
53088
53126
  async downloadMmcifSymmetry(mmcifid, type) { let ic = this.icn3d, me = ic.icn3dui;
53127
+ try {
53089
53128
  // https://files.rcsb.org/header/ is not accessible in Node.js and Mac
53090
53129
  // Some header files are in the wrong format. So we use the full mmCIF file
53091
53130
  //let url = (me.bNode || me.utilsCls.isMac()) ? "https://files.rcsb.org/view/" + mmcifid + ".cif" : "https://files.rcsb.org/header/" + mmcifid + ".cif";
@@ -53151,6 +53190,11 @@ class MmcifParser {
53151
53190
  }
53152
53191
 
53153
53192
  ///// if(ic.deferredSymmetry !== undefined) ic.deferredSymmetry.resolve();
53193
+ }
53194
+ catch (err) {
53195
+ if(!me.bNode) console.log("mmcifparser.cgi issues: " + err);
53196
+ return;
53197
+ }
53154
53198
  }
53155
53199
 
53156
53200
  //Atom "data" from mmCIF file was parsed to set up parameters for the 3D viewer by calling the function
@@ -65222,6 +65266,9 @@ class SelectByCommand {
65222
65266
  }
65223
65267
  else {
65224
65268
  chainStr = testStr.substr(periodPos + 1);
65269
+ //replace "A_1" with "A"
65270
+ chainStr = chainStr.replace(/_/g, '');
65271
+
65225
65272
  testStr = testStr.substr(0, periodPos);
65226
65273
  }
65227
65274
 
@@ -75660,7 +75707,7 @@ class iCn3DUI {
75660
75707
  //even when multiple iCn3D viewers are shown together.
75661
75708
  this.pre = this.cfg.divid + "_";
75662
75709
 
75663
- this.REVISION = '3.29.3';
75710
+ this.REVISION = '3.29.4';
75664
75711
 
75665
75712
  // In nodejs, iCn3D defines "window = {navigator: {}}"
75666
75713
  this.bNode = (Object.keys(window).length < 2) ? true : false;
@@ -76280,8 +76327,8 @@ iCn3DUI.prototype.getAjaxPostPromise = async function(url, data, beforeSend, ale
76280
76327
  },
76281
76328
  error : function() {
76282
76329
  //if(alertMess) alert(alertMess);
76283
- if(alertMess) console.log(alertMess);
76284
- if(logMess) console.log(logMess);
76330
+ if(!me.bNode && alertMess) console.log(alertMess);
76331
+ if(!me.bNode && logMess) console.log(logMess);
76285
76332
 
76286
76333
  // reject('error');
76287
76334
  // keep running the program
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icn3d",
3
- "version": "3.29.6",
3
+ "version": "3.29.7",
4
4
  "main": "./icn3d.js",
5
5
  "exports": {
6
6
  ".": {