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.js CHANGED
@@ -7633,7 +7633,7 @@ class ClickMenu {
7633
7633
 
7634
7634
  $(document).on("click", "." + me.pre + "mn6_rotate90", function(e) { let ic = me.icn3d; //e.preventDefault();
7635
7635
  let value = $(this).attr('v').toLowerCase();
7636
- let direction = value.split('-')[0];
7636
+ let direction = value.split(' ')[1];
7637
7637
 
7638
7638
  thisClass.setLogCmd(value, true);
7639
7639
  let axis;
@@ -8674,14 +8674,14 @@ class SetMenu {
8674
8674
  }
8675
8675
 
8676
8676
  //!!!
8677
-
8677
+ /*
8678
8678
  html += this.getMenuText('m1_exportrefnum', 'Reference Numbers', undefined, undefined, 2);
8679
8679
  html += "<ul>";
8680
8680
  html += this.getLink('mn1_exportIgstrand', 'Ig Strand', undefined, 3);
8681
8681
  html += this.getLink('mn1_exportKabat', 'Kabat', undefined, 3);
8682
8682
  html += this.getLink('mn1_exportImgt', 'IMGT', undefined, 3);
8683
8683
  html += "</ul>";
8684
-
8684
+ */
8685
8685
 
8686
8686
  html += "<li><br/></li>";
8687
8687
 
@@ -8902,7 +8902,7 @@ class SetMenu {
8902
8902
  html += "</li>";
8903
8903
 
8904
8904
  html += this.getLink('mn2_translate', 'Translate XYZ', undefined, 1);
8905
- html += this.getLink('mn2_matrix', 'Apply Matrix', undefined, 1);
8905
+ html += this.getLink('mn2_matrix', 'Rotate with Matrix', undefined, 1);
8906
8906
 
8907
8907
  html += this.getMenuText('mn2_camera', 'Camera', undefined, undefined, 1);
8908
8908
  html += "<ul>";
@@ -9525,8 +9525,8 @@ class SetMenu {
9525
9525
  //}
9526
9526
 
9527
9527
  //!!!
9528
- html += this.getRadio('mn4_clr', 'mn4_clrIgstrand', 'Ig Strand', undefined, undefined, 2);
9529
- html += this.getRadio('mn4_clr', 'mn4_clrIgproto', 'Ig Protodomain', undefined, undefined, 2);
9528
+ //html += this.getRadio('mn4_clr', 'mn4_clrIgstrand', 'Ig Strand', undefined, undefined, 2);
9529
+ //html += this.getRadio('mn4_clr', 'mn4_clrIgproto', 'Ig Protodomain', undefined, undefined, 2);
9530
9530
  }
9531
9531
  else {
9532
9532
  //if(!me.cfg.hidelicense) html += this.getRadio('mn4_clr', 'mn1_delphi2', 'DelPhi<br><span style="padding-left:1.5em;">Potential ' + me.htmlCls.licenseStr + '</span>');
@@ -9657,7 +9657,7 @@ class SetMenu {
9657
9657
  html += this.getRadio('mn6_addlabel', 'mn6_addlabelResidues', 'per Residue', undefined, 1, 2);
9658
9658
  html += this.getRadio('mn6_addlabel', 'mn6_addlabelResnum', 'per Residue & Number', undefined, 1, 2);
9659
9659
  //!!!
9660
- html += this.getRadio('mn6_addlabel', 'mn6_addlabelRefnum', 'per Reference Number', undefined, 1, 2);
9660
+ //html += this.getRadio('mn6_addlabel', 'mn6_addlabelRefnum', 'per Reference Number', undefined, 1, 2);
9661
9661
  html += this.getRadio('mn6_addlabel', 'mn6_addlabelChains', 'per Chain', undefined, undefined, 2);
9662
9662
  html += this.getRadio('mn6_addlabel', 'mn6_addlabelTermini', 'N- & C-Termini', undefined, 1, 2);
9663
9663
  }
@@ -9749,13 +9749,13 @@ class SetMenu {
9749
9749
 
9750
9750
  html += "<ul>";
9751
9751
  //!!!
9752
-
9752
+ /*
9753
9753
  html += this.getLink('mn6_igrefYes', 'Show Ig Ref. Number', undefined, 2);
9754
9754
  html += this.getLink('mn6_igrefTpl', 'Ig w/ Specified Template', undefined, 2);
9755
9755
  html += this.getLink('mn6_igrefNo', 'Hide Ig Ref. Number', undefined, 2);
9756
9756
 
9757
9757
  html += this.getMenuSep();
9758
-
9758
+ */
9759
9759
  html += this.getLink('mn6_customref', 'Custom Ref. Number', undefined, 2);
9760
9760
  html += "</ul>";
9761
9761
  html += "</li>";
@@ -11895,7 +11895,7 @@ class SetDialog {
11895
11895
  html += "11: " + me.htmlCls.inputTextStr + "id='" + me.pre + "matrix11' value='0' size=2> ";
11896
11896
  html += "15: " + me.htmlCls.inputTextStr + "id='" + me.pre + "matrix15' value='1' size=2><br>";
11897
11897
 
11898
- html += me.htmlCls.buttonStr + "matrix_pdb'>Apply Matrix</button>";
11898
+ html += me.htmlCls.buttonStr + "matrix_pdb'>Rotate with Matrix</button>";
11899
11899
  html += "</div>";
11900
11900
 
11901
11901
  html += me.htmlCls.divStr + "dl_igrefTpl' class='" + dialogClass + "'>";
@@ -35212,6 +35212,7 @@ class SetColor {
35212
35212
  break;
35213
35213
 
35214
35214
  case 'secondary structure green':
35215
+ case 'secondary structure':
35215
35216
  ic.sheetcolor = 'green';
35216
35217
  for (let i in atoms) {
35217
35218
  let atom = ic.atoms[i];
@@ -35224,7 +35225,7 @@ class SetColor {
35224
35225
  break;
35225
35226
 
35226
35227
  case 'secondary structure yellow':
35227
- case 'secondary structure':
35228
+ //case 'secondary structure':
35228
35229
  ic.sheetcolor = 'yellow';
35229
35230
  for (let i in atoms) {
35230
35231
  let atom = ic.atoms[i];
@@ -40316,14 +40317,16 @@ class AddTrack {
40316
40317
 
40317
40318
  html += '<span id="' + pre + '_' + ic.pre + chnid + '_' + pos + '" title="' + c + pos + '" class="icn3d-residue" ' + tmpStr + '>' + c + '</span>';
40318
40319
 
40319
- let tmpStrExon = 'style="background-color:' + pos2exonColor[cnt] + '"';
40320
- htmlExon += '<span id="' + pre + '_' + ic.pre + chnid + '_' + pos + '" title="' + c + pos + ', Exon ' + (pos2exonIndex[cnt] + 1) + ': ' + pos2genome[cnt] + '" class="icn3d-residue" ' + tmpStrExon + '>&nbsp;</span>';
40320
+ if(exonArray) {
40321
+ let tmpStrExon = 'style="background-color:' + pos2exonColor[cnt] + '"';
40322
+ htmlExon += '<span id="' + pre + '_' + ic.pre + chnid + '_' + pos + '" title="' + c + pos + ', Exon ' + (pos2exonIndex[cnt] + 1) + ': ' + pos2genome[cnt] + '" class="icn3d-residue" ' + tmpStrExon + '>&nbsp;</span>';
40321
40323
 
40322
- // set atom color
40323
- for(let serial in ic.residues[chnid + '_' + pos]) {
40324
- let atom = ic.atoms[serial];
40325
- atom.color = me.parasCls.thr(pos2exonColor[cnt]);
40326
- ic.atomPrevColors[serial] = atom.color;
40324
+ // set atom color
40325
+ for(let serial in ic.residues[chnid + '_' + pos]) {
40326
+ let atom = ic.atoms[serial];
40327
+ atom.color = me.parasCls.thr(pos2exonColor[cnt]);
40328
+ ic.atomPrevColors[serial] = atom.color;
40329
+ }
40327
40330
  }
40328
40331
 
40329
40332
  htmlTmp2 += ic.showSeqCls.insertGapOverview(chnid, i);
@@ -43047,6 +43050,8 @@ class ShowSeq {
43047
43050
  giSeq = ic.giSeq[chnid];
43048
43051
  }
43049
43052
 
43053
+ if(!giSeq) return;
43054
+
43050
43055
  // remove null giSeq[i]
43051
43056
  let giSeqTmp = [];
43052
43057
  for(let i = 0, il = giSeq.length; i < il; ++i) {
@@ -46198,12 +46203,12 @@ class LineGraph {
46198
46203
 
46199
46204
  if(bRerunDomain) {
46200
46205
  let atomsAssigned = {};
46201
- // for(let resid in ic.resid2refnum_ori) {
46202
- // atomsAssigned = me.hashUtilsCls.unionHash(atomsAssigned, ic.residues[resid]);
46203
- // }
46204
- for(let resid in ic.resid2refnum) {
46205
- if(ic.resid2refnum[resid]) atomsAssigned = me.hashUtilsCls.unionHash(atomsAssigned, ic.residues[resid]);
46206
+ for(let resid in ic.resid2refnum_ori) {
46207
+ atomsAssigned = me.hashUtilsCls.unionHash(atomsAssigned, ic.residues[resid]);
46206
46208
  }
46209
+ // for(let resid in ic.resid2refnum) {
46210
+ // if(ic.resid2refnum[resid]) atomsAssigned = me.hashUtilsCls.unionHash(atomsAssigned, ic.residues[resid]);
46211
+ // }
46207
46212
 
46208
46213
  currAtoms = me.hashUtilsCls.exclHash(currAtoms, atomsAssigned);
46209
46214
 
@@ -46356,12 +46361,14 @@ class LineGraph {
46356
46361
 
46357
46362
  for(let i = 0, il = domainidpairArray.length; i < il; ++i) {
46358
46363
  //let queryData = (me.bNode) ? dataArray[i] : dataArray[i].value; //[0];
46359
- let queryData = dataArray[i].value; //[0];
46364
+ let queryData = (dataArray[i]) ? dataArray[i].value : undefined; //[0];
46360
46365
 
46361
46366
  if(!queryData || queryData.length == 0) {
46362
46367
  if(!me.bNode) console.log("The alignment data for " + domainidpairArray[i] + " is unavailable...");
46363
46368
  continue;
46364
46369
  }
46370
+
46371
+ if(queryData[0].score === undefined) continue;
46365
46372
 
46366
46373
  //let domainid_index = domainidpairArray[i].split(',');
46367
46374
  //let domainid = domainid_index[0];
@@ -46569,7 +46576,7 @@ class LineGraph {
46569
46576
 
46570
46577
  // assign ic.resid2refnum, ic.refnum2residArray, ic.chainsMapping
46571
46578
  if(!ic.resid2refnum) ic.resid2refnum = {};
46572
- // if(!ic.resid2refnum_ori) ic.resid2refnum_ori = {};
46579
+ if(!ic.resid2refnum_ori) ic.resid2refnum_ori = {};
46573
46580
  if(!ic.refnum2residArray) ic.refnum2residArray = {};
46574
46581
  if(!ic.chainsMapping) ic.chainsMapping = {};
46575
46582
 
@@ -46598,7 +46605,8 @@ class LineGraph {
46598
46605
  let CAtom, CpAtom, DAtom, EAtom;
46599
46606
  //let chainid = domainid.split(',')[0];
46600
46607
 
46601
- let cntBtCE = 0;
46608
+ let cntBtwCE;
46609
+ let CpToDResi = [], DToCpResi = [];
46602
46610
  for(let i = 0, il = segArray.length; i < il; ++i) {
46603
46611
  let seg = segArray[i];
46604
46612
  if(!seg) continue;
@@ -46608,47 +46616,59 @@ class LineGraph {
46608
46616
 
46609
46617
  if(seg.q_start.indexOf('3550') != -1) {
46610
46618
  bCstrand = true;
46611
- CAtom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
46619
+ CAtom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[resid]);
46620
+
46621
+ // a chain could have multiple Ig domains
46622
+ cntBtwCE = 0;
46612
46623
  }
46613
46624
  else if(seg.q_start.indexOf('4550') != -1) {
46614
46625
  bCpstrand = true;
46615
- CpAtom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
46616
- ++cntBtCE;
46626
+ CpAtom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[resid]);
46627
+ ++cntBtwCE;
46617
46628
  }
46618
46629
  // else if(seg.q_start.indexOf('5550') != -1) {
46619
46630
  // bCppstrand = true;
46620
- // CppAtom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
46621
- // ++cntBtCE;
46631
+ // CppAtom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[resid]);
46632
+ // ++cntBtwCE;
46622
46633
  // }
46623
46634
  else if(seg.q_start.indexOf('6550') != -1) {
46624
46635
  bDstrand = true;
46625
- DAtom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
46626
- ++cntBtCE;
46636
+ DAtom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[resid]);
46637
+ ++cntBtwCE;
46627
46638
  }
46628
46639
  else if(seg.q_start.indexOf('7550') != -1) {
46629
46640
  bEstrand = true;
46630
- EAtom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
46631
- }
46641
+ EAtom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[resid]);
46632
46642
 
46633
- if(bCstrand && bCpstrand && bCppstrand && bDstrand && bEstrand) break;
46634
- }
46643
+ // check C' and D strands
46644
+ if(cntBtwCE == 1) {
46645
+ let distToC = (bCpstrand) ? CpAtom.coord.distanceTo(CAtom.coord) : DAtom.coord.distanceTo(CAtom.coord);
46646
+ let distToE = (bCpstrand) ? CpAtom.coord.distanceTo(EAtom.coord) : DAtom.coord.distanceTo(EAtom.coord);
46647
+ distToC = parseInt(distToC);
46648
+ distToE = parseInt(distToE);
46635
46649
 
46636
- let CpToDResi, DToCpResi;
46637
- if(cntBtCE == 1) {
46638
- let distToC = (bCpstrand) ? CpAtom.coord.distanceTo(CAtom.coord) : DAtom.coord.distanceTo(CAtom.coord);
46639
- let distToE = (bCpstrand) ? CpAtom.coord.distanceTo(EAtom.coord) : DAtom.coord.distanceTo(EAtom.coord);
46650
+ let resiDistToC = (bCpstrand) ? parseInt(CpAtom.resi) - parseInt(CAtom.resi) : parseInt(DAtom.resi) - parseInt(CAtom.resi);
46651
+ let resiDistToE = (bCpstrand) ? parseInt(EAtom.resi) - parseInt(CpAtom.resi) : parseInt(EAtom.resi) - parseInt(DAtom.resi);
46640
46652
 
46641
- if(bCpstrand && distToC > distToE) { // rename C' to D
46642
- CpToDResi = CAtom.resi;
46643
- }
46644
- else if(bDstrand && distToC < distToE) { // rename D to C'
46645
- DToCpResi = DAtom.resi;
46653
+ if(bCpstrand) {
46654
+ if(distToC > distToE || (distToC == distToE && resiDistToC > resiDistToE)) { // rename C' to D
46655
+ CpToDResi.push(CpAtom.resi);
46656
+ }
46657
+ }
46658
+ else if(bDstrand) {
46659
+ if(distToC < distToE || (distToC == distToE && resiDistToC < resiDistToE)) { // rename D to C'
46660
+ DToCpResi.push(DAtom.resi);
46661
+ }
46662
+ }
46663
+ }
46646
46664
  }
46665
+
46666
+ if(bCstrand && bCpstrand && bCppstrand && bDstrand && bEstrand) break;
46647
46667
  }
46648
- // adjust C' and D strands ======end
46649
46668
 
46650
- let prevStrand;
46651
- let bCd19 = refpdbnameArray.length == 1 && refpdbnameArray[0] == 'CD19_6al5A_human_C2orV-n1';
46669
+
46670
+ let currStrand;
46671
+ refpdbnameArray.length == 1 && refpdbnameArray[0] == 'CD19_6al5A_human_C2orV-n1';
46652
46672
  for(let i = 0, il = segArray.length; i < il; ++i) {
46653
46673
  let seg = segArray[i];
46654
46674
  if(!seg) continue;
@@ -46669,21 +46689,33 @@ class LineGraph {
46669
46689
  //let refnum = qStart + postfix;
46670
46690
  let refnum = qStart;
46671
46691
 
46672
- let prevStrandFinal = prevStrand;
46673
- if(prevStrand == "C'" && CpToDResi && parseInt(seg.t_start) < parseInt(CpToDResi) + 10
46674
- && parseInt(seg.t_start) > parseInt(CpToDResi) - 10 ) {
46675
- prevStrandFinal = "D";
46692
+ let refnumLabel = this.getLabelFromRefnum(refnum);
46693
+ currStrand = (refnumLabel) ? refnumLabel.replace(new RegExp(refnum,'g'), '') : undefined;
46694
+
46695
+ let currStrandFinal = currStrand;
46696
+ if(currStrand == "C'" && CpToDResi.length > 0) {
46697
+ for(let j = 0, jl = CpToDResi.length; j < jl; ++j) {
46698
+ if(parseInt(seg.t_start) < parseInt(CpToDResi[j]) + 10 && parseInt(seg.t_start) > parseInt(CpToDResi[j]) - 10 ) {
46699
+ currStrandFinal = "D";
46700
+ break;
46701
+ }
46702
+ }
46676
46703
  }
46677
- else if(prevStrand == "D" && DToCpResi && parseInt(seg.t_start) < parseInt(DToCpResi) + 10
46678
- && parseInt(seg.t_start) > parseInt(DToCpResi) - 10 ) {
46679
- prevStrandFinal = "C'";
46704
+ else if(currStrand == "D" && DToCpResi.length > 0) {
46705
+ for(let j = 0, jl = DToCpResi.length; j < jl; ++j) {
46706
+ if(parseInt(seg.t_start) < parseInt(DToCpResi[j]) + 10 && parseInt(seg.t_start) > parseInt(DToCpResi[j]) - 10 ) {
46707
+ currStrandFinal = "C'";
46708
+ break;
46709
+ }
46710
+ }
46680
46711
  }
46681
46712
 
46682
- let refnumLabel = this.getLabelFromRefnum(refnum, prevStrandFinal, bCd19);
46683
- prevStrand = (refnumLabel) ? refnumLabel.replace(new RegExp(refnum,'g'), '') : undefined;
46684
-
46685
- ic.resid2refnum[resid] = refnumLabel;
46686
- // ic.resid2refnum_ori[resid] = refnumLabel;
46713
+ if(currStrand != currStrandFinal) {
46714
+ refnumLabel = this.getLabelFromRefnum(refnum, currStrandFinal);
46715
+ }
46716
+
46717
+ ic.resid2refnum[resid] = refnumLabel;
46718
+ ic.resid2refnum_ori[resid] = refnumLabel;
46687
46719
 
46688
46720
  // final reference numbers will be assign in ic.showSeqCls.showRefNum()
46689
46721
 
@@ -46725,7 +46757,7 @@ class LineGraph {
46725
46757
  }
46726
46758
  }
46727
46759
 
46728
- getLabelFromRefnum(oriRefnum, prevStrand, bCd19) { let ic = this.icn3d; ic.icn3dui;
46760
+ getLabelFromRefnum(oriRefnum, prevStrand) { let ic = this.icn3d; ic.icn3dui;
46729
46761
  let refnum = parseInt(oriRefnum);
46730
46762
 
46731
46763
  //N-terminus = 0999-0001
@@ -46752,28 +46784,34 @@ class LineGraph {
46752
46784
 
46753
46785
  // loops may have numbers such as 1310, 1410
46754
46786
 
46755
- if(refnum < 1000) return undefined;
46756
- else if(refnum >= 1200 && refnum < 1290) return "A---" + oriRefnum;
46757
- else if(refnum >= 1320 && refnum < 1390) return "A--" + oriRefnum;
46758
- else if(refnum >= 1420 && refnum < 1490) return "A-" + oriRefnum;
46759
- else if(refnum >= 1520 && refnum < 1590) return "A" + oriRefnum;
46760
- else if(refnum >= 1620 && refnum < 1690) return "A+" + oriRefnum;
46761
- else if(refnum >= 1820 && refnum < 1890) return "A'" + oriRefnum;
46762
- else if(refnum >= 2000 && refnum < 2900) return "B" + oriRefnum;
46763
- else if(refnum >= 3300 && refnum < 3390) return "C--" + oriRefnum;
46764
- else if(refnum >= 3420 && refnum < 3490) return "C-" + oriRefnum;
46765
- else if(refnum >= 3520 && refnum < 3590) return "C" + oriRefnum;
46766
- else if(refnum >= 4000 && refnum < 4900) return "C'" + oriRefnum;
46767
- else if(refnum >= 5000 && refnum < 5900) return "C''" + oriRefnum;
46768
- else if(refnum >= 6000 && refnum < 6900) return "D" + oriRefnum;
46769
- else if(refnum >= 7500 && refnum < 7590) return "E" + oriRefnum;
46770
- else if(refnum >= 7620 && refnum < 7900) return "E+" + oriRefnum;
46771
- else if(refnum >= 8000 && refnum < 8900) return "F" + oriRefnum;
46772
- else if(refnum >= 9500 && refnum < 9590) return "G" + oriRefnum;
46773
- else if(refnum >= 9620 && refnum < 9690) return "G+" + oriRefnum;
46774
- else if(refnum >= 9720 && refnum < 9790) return "G++" + oriRefnum;
46775
- else if(refnum > 9900) return undefined;
46776
- else return " " + oriRefnum; }
46787
+ let refnumLabel;
46788
+
46789
+ if(refnum < 1000) refnumLabel = undefined;
46790
+ else if(refnum >= 1200 && refnum < 1290) refnumLabel = "A---" + oriRefnum;
46791
+ else if(refnum >= 1320 && refnum < 1390) refnumLabel = "A--" + oriRefnum;
46792
+ else if(refnum >= 1420 && refnum < 1490) refnumLabel = "A-" + oriRefnum;
46793
+ else if(refnum >= 1520 && refnum < 1590) refnumLabel = "A" + oriRefnum;
46794
+ else if(refnum >= 1620 && refnum < 1690) refnumLabel = "A+" + oriRefnum;
46795
+ else if(refnum >= 1820 && refnum < 1890) refnumLabel = "A'" + oriRefnum;
46796
+ else if(refnum >= 2000 && refnum < 2900) refnumLabel = "B" + oriRefnum;
46797
+ else if(refnum >= 3300 && refnum < 3390) refnumLabel = "C--" + oriRefnum;
46798
+ else if(refnum >= 3420 && refnum < 3490) refnumLabel = "C-" + oriRefnum;
46799
+ else if(refnum >= 3520 && refnum < 3590) refnumLabel = "C" + oriRefnum;
46800
+ else if(refnum >= 4000 && refnum < 4900) refnumLabel = "C'" + oriRefnum;
46801
+ else if(refnum >= 5000 && refnum < 5900) refnumLabel = "C''" + oriRefnum;
46802
+ else if(refnum >= 6000 && refnum < 6900) refnumLabel = "D" + oriRefnum;
46803
+ else if(refnum >= 7500 && refnum < 7590) refnumLabel = "E" + oriRefnum;
46804
+ else if(refnum >= 7620 && refnum < 7900) refnumLabel = "E+" + oriRefnum;
46805
+ else if(refnum >= 8000 && refnum < 8900) refnumLabel = "F" + oriRefnum;
46806
+ else if(refnum >= 9500 && refnum < 9590) refnumLabel = "G" + oriRefnum;
46807
+ else if(refnum >= 9620 && refnum < 9690) refnumLabel = "G+" + oriRefnum;
46808
+ else if(refnum >= 9720 && refnum < 9790) refnumLabel = "G++" + oriRefnum;
46809
+ else if(refnum > 9900) refnumLabel = undefined;
46810
+ else refnumLabel = " " + oriRefnum;
46811
+ if(prevStrand) refnumLabel = prevStrand + oriRefnum;
46812
+
46813
+ return refnumLabel
46814
+ }
46777
46815
 
46778
46816
  async parseCustomRefFile(data) { let ic = this.icn3d; ic.icn3dui;
46779
46817
  ic.bShowCustomRefnum = true;
@@ -52185,6 +52223,7 @@ class MmcifParser {
52185
52223
  }
52186
52224
 
52187
52225
  async downloadMmcifSymmetry(mmcifid, type) { let ic = this.icn3d, me = ic.icn3dui;
52226
+ try {
52188
52227
  // https://files.rcsb.org/header/ is not accessible in Node.js and Mac
52189
52228
  // Some header files are in the wrong format. So we use the full mmCIF file
52190
52229
  //let url = (me.bNode || me.utilsCls.isMac()) ? "https://files.rcsb.org/view/" + mmcifid + ".cif" : "https://files.rcsb.org/header/" + mmcifid + ".cif";
@@ -52250,6 +52289,11 @@ class MmcifParser {
52250
52289
  }
52251
52290
 
52252
52291
  ///// if(ic.deferredSymmetry !== undefined) ic.deferredSymmetry.resolve();
52292
+ }
52293
+ catch (err) {
52294
+ if(!me.bNode) console.log("mmcifparser.cgi issues: " + err);
52295
+ return;
52296
+ }
52253
52297
  }
52254
52298
 
52255
52299
  //Atom "data" from mmCIF file was parsed to set up parameters for the 3D viewer by calling the function
@@ -64321,6 +64365,9 @@ class SelectByCommand {
64321
64365
  }
64322
64366
  else {
64323
64367
  chainStr = testStr.substr(periodPos + 1);
64368
+ //replace "A_1" with "A"
64369
+ chainStr = chainStr.replace(/_/g, '');
64370
+
64324
64371
  testStr = testStr.substr(0, periodPos);
64325
64372
  }
64326
64373
 
@@ -74759,7 +74806,7 @@ class iCn3DUI {
74759
74806
  //even when multiple iCn3D viewers are shown together.
74760
74807
  this.pre = this.cfg.divid + "_";
74761
74808
 
74762
- this.REVISION = '3.29.3';
74809
+ this.REVISION = '3.29.4';
74763
74810
 
74764
74811
  // In nodejs, iCn3D defines "window = {navigator: {}}"
74765
74812
  this.bNode = (Object.keys(window).length < 2) ? true : false;
@@ -75379,8 +75426,8 @@ iCn3DUI.prototype.getAjaxPostPromise = async function(url, data, beforeSend, ale
75379
75426
  },
75380
75427
  error : function() {
75381
75428
  //if(alertMess) var aaa = 1; //alert(alertMess);
75382
- if(alertMess) console.log(alertMess);
75383
- if(logMess) console.log(logMess);
75429
+ if(!me.bNode && alertMess) console.log(alertMess);
75430
+ if(!me.bNode && logMess) console.log(logMess);
75384
75431
 
75385
75432
  // reject('error');
75386
75433
  // keep running the program