icn3d 3.28.10 → 3.28.11

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
@@ -6469,7 +6469,7 @@ class ClickMenu {
6469
6469
  ic.resid2specCls.selectProperty('polar');
6470
6470
  });
6471
6471
  me.myEventCls.onIds("#" + me.pre + "mn2_propBfactor", "click", function(e) { me.icn3d; //e.preventDefault();
6472
- me.htmlCls.dialogCls.openDlg('dl_propbybfactor', 'Select residue based on B-factor');
6472
+ me.htmlCls.dialogCls.openDlg('dl_propbybfactor', 'Select residue based on B-factor/pLDDT');
6473
6473
  });
6474
6474
  me.myEventCls.onIds("#" + me.pre + "mn2_propSolAcc", "click", function(e) { me.icn3d; //e.preventDefault();
6475
6475
  me.htmlCls.dialogCls.openDlg('dl_propbypercentout', 'Select residue based on the percentage of solvent accessilbe surface area');
@@ -7596,7 +7596,8 @@ class ClickMenu {
7596
7596
  // var aaa = 1; //alert("The url is more than 4000 characters and may not work.");
7597
7597
  //}
7598
7598
  //else {
7599
- url = url.replace("full.html", "full2.html");
7599
+ url = url.replace("icn3d/full.html?", "icn3d/full2.html?");
7600
+ url = url.replace("icn3d/?", "icn3d/full2.html?");
7600
7601
  url += '&closepopup=1';
7601
7602
  let urlTarget = (ic.structures && Object.keys(ic.structures).length > 0) ? '_blank' : '_self';
7602
7603
  window.open(url, urlTarget);
@@ -7925,6 +7926,14 @@ class ClickMenu {
7925
7926
  let pos = str.indexOf('|||');
7926
7927
  if(pos !== -1) str = str.substr(0, pos);
7927
7928
  let transformation = {};
7929
+
7930
+ if(!ic.quaternion) {
7931
+ // reset parameters
7932
+ ic._zoomFactor = 1.0;
7933
+ ic.mouseChange = new THREE.Vector2(0,0);
7934
+ ic.quaternion = new THREE.Quaternion(0,0,0,1);
7935
+ }
7936
+
7928
7937
  transformation.factor = ic._zoomFactor;
7929
7938
  transformation.mouseChange = ic.mouseChange;
7930
7939
  transformation.quaternion = {};
@@ -8640,7 +8649,9 @@ class SetMenu {
8640
8649
 
8641
8650
  html += this.getLink('mn1_exportPdbRes', 'PDB', 1, 2);
8642
8651
  html += this.getLink('profixpdb', 'PDB with Missing Atoms', undefined, 2);
8643
- html += this.getLink('profixpdbh', 'PDB with Hydrogens', undefined, 2);
8652
+
8653
+ // the quality is not good to add hydrogen
8654
+ //html += this.getLink('profixpdbh', 'PDB with Hydrogens', undefined, 2);
8644
8655
 
8645
8656
  if(me.cfg.cid === undefined) {
8646
8657
  html += this.getLink('mn1_exportSecondary', 'Secondary Structure', undefined, 2);
@@ -9491,7 +9502,7 @@ class SetMenu {
9491
9502
 
9492
9503
  //if(me.cfg.afid) html += this.getRadio('mn4_clr', 'mn4_clrConfidence', 'AF Confidence');
9493
9504
  //if(!me.cfg.mmtfid && !me.cfg.pdbid && !me.cfg.opmid && !me.cfg.mmdbid && !me.cfg.gi && !me.cfg.uniprotid && !me.cfg.blast_rep_id && !me.cfg.cid && !me.cfg.mmcifid && !me.cfg.align && !me.cfg.chainalign) {
9494
- html += this.getRadio('mn4_clr', 'mn4_clrConfidence', 'AlphaFold<br><span style="padding-left:1.5em;">Confidence</span>', undefined, 1, 1);
9505
+ html += this.getRadio('mn4_clr', 'mn4_clrConfidence', 'pLDDT', undefined, 1, 1);
9495
9506
  //}
9496
9507
 
9497
9508
  //!!!
@@ -11812,10 +11823,10 @@ class SetDialog {
11812
11823
  html += "</div>";
11813
11824
 
11814
11825
  html += me.htmlCls.divStr + "dl_propbybfactor' class='" + dialogClass + "'>";
11815
- html += this.addNotebookTitle('dl_propbybfactor', 'Select residues basen on B-factor');
11816
- html += "<div style='width:400px'>Select residue based on B-factor. The values are in the range of 0-100.</div><br>";
11817
- html += "<b>Min B-factor</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "minbfactor' value='0' size='10'>% <br>";
11818
- html += "<b>Max B-factor</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "maxbfactor' value='100' size='10'>% <br>";
11826
+ html += this.addNotebookTitle('dl_propbybfactor', 'Select residues basen on B-factor/pLDDT');
11827
+ html += "<div style='width:400px'>Select residue based on B-factor/pLDDT. The values are in the range of 0-100.</div><br>";
11828
+ html += "<b>Min B-factor/pLDDT</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "minbfactor' value='0' size='10'>% <br>";
11829
+ html += "<b>Max B-factor/pLDDT</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "maxbfactor' value='100' size='10'>% <br>";
11819
11830
  html += "<button style='white-space:nowrap;' id='" + me.pre + "applypropbybfactor'>Apply</button><br/><br/>";
11820
11831
  html += "</div>";
11821
11832
 
@@ -15456,10 +15467,11 @@ class SetHtml {
15456
15467
 
15457
15468
  let pdbstr = '';
15458
15469
 
15459
- pdbstr += ic.saveFileCls.getAtomPDB(atomHash);
15470
+ let bMergeIntoOne = true;
15471
+ pdbstr += ic.saveFileCls.getAtomPDB(atomHash, undefined, undefined, undefined, undefined, undefined, bMergeIntoOne);
15460
15472
  pdbstr += ic.saveFileCls.getAtomPDB(ionHash, true, undefined, true);
15461
15473
 
15462
- let url = "https://www.ncbi.nlm.nih.gov/Structure/delphi/delphi.fcgi";
15474
+ let url = me.htmlCls.baseUrl + "delphi/delphi.cgi";
15463
15475
 
15464
15476
  let pdbid =(me.cfg.cid) ? me.cfg.cid : Object.keys(ic.structures).toString();
15465
15477
 
@@ -32500,7 +32512,7 @@ class Alternate {
32500
32512
  // change the display atom when alternating
32501
32513
  //Show structures one by one.
32502
32514
  alternateStructures() { let ic = this.icn3d, me = ic.icn3dui;
32503
- ic.bAlernate = true;
32515
+ ic.bAlternate = true;
32504
32516
 
32505
32517
  //ic.transformCls.zoominSelection();
32506
32518
 
@@ -32597,14 +32609,14 @@ class Alternate {
32597
32609
  ic.applyMapCls.removeEmmaps();
32598
32610
  ic.applyMapCls.applyEmmapOptions();
32599
32611
 
32600
- // disallow the alternation of DelPhi map
32612
+ // allow the alternation of DelPhi map
32601
32613
  ic.applyMapCls.removePhimaps();
32602
- // ic.applyMapCls.applyPhimapOptions();
32614
+ ic.applyMapCls.applyPhimapOptions();
32603
32615
  // should recalculate the potential
32604
32616
  //ic.loadDelphiFileBase('delphi');
32605
32617
 
32606
- // ic.applyMapCls.removeSurfaces();
32607
- // ic.applyMapCls.applyphisurfaceOptions();
32618
+ ic.applyMapCls.removeSurfaces();
32619
+ ic.applyMapCls.applyphisurfaceOptions();
32608
32620
  // should recalculate the potential
32609
32621
  //ic.loadDelphiFileBase('delphi2');
32610
32622
 
@@ -35734,7 +35746,7 @@ class SetOption {
35734
35746
 
35735
35747
  let colorLabel = colorType.substr(0, 1).toUpperCase() + colorType.substr(1);
35736
35748
  if(colorType == 'confidence') {
35737
- colorLabel = 'AlphaFold Confidence (pLDDT)';
35749
+ colorLabel = 'pLDDT';
35738
35750
  }
35739
35751
  else if(colorType == 'normalized hydrophobic') {
35740
35752
  colorLabel = 'Normalized Hydrophobicity';
@@ -36029,7 +36041,7 @@ class SetOption {
36029
36041
  "C' Strand": "6495ED",
36030
36042
  "C'' Strand": "006400",
36031
36043
  "D Strand": "00FF00",
36032
- "E Strand": "FFFF00", //"F0E68C",
36044
+ "E Strand": "F7DC6F", //"FFFF00", //"F0E68C",
36033
36045
  "F Strand": "FFA500",
36034
36046
  "G Strand": "FF0000",
36035
36047
  //"G+ Strand": "8B0000",
@@ -36057,14 +36069,14 @@ class SetOption {
36057
36069
  "<b>Protodomain 1</b>": "",
36058
36070
  "A Strand": "0000FF",
36059
36071
  "B Strand": "006400",
36060
- "C Strand": "FFFF00", //"F0E68C",
36072
+ "C Strand": "F7DC6F", //"FFFF00", //"F0E68C",
36061
36073
  "C' Strand": "FFA500",
36062
36074
  "<br><b>Linker</b>": "",
36063
36075
  "C'' Strand": "FF0000",
36064
36076
  "<br><b>Protodomain 2</b>": "",
36065
36077
  "D Strand": "0000FF",
36066
36078
  "E Strand": "006400",
36067
- "F Strand": "FFFF00", //"F0E68C",
36079
+ "F Strand": "F7DC6F", //"FFFF00", //"F0E68C",
36068
36080
  "G Strand": "FFA500",
36069
36081
  "": "",
36070
36082
  "Loop": "CCCCCC"
@@ -42224,7 +42236,7 @@ class ShowAnno {
42224
42236
  let proteinName = fullProteinName;
42225
42237
  //if(proteinName.length > 40) proteinName = proteinName.substr(0, 40) + "...";
42226
42238
  let categoryStr =(index == 0) ? "<span class='icn3d-annoLargeTitle'><b>Proteins</b>: </span><br><br>" : "";
42227
- let geneLink =(ic.chainsGene[chnid] && ic.chainsGene[chnid].geneId) ? "(Gene: <a href='https://www.ncbi.nlm.nih.gov/gene/" + ic.chainsGene[chnid].geneId + "?report=gene_table' target='_blank' title='" + ic.chainsGene[chnid].geneDesc + "'>" + ic.chainsGene[chnid].geneSymbol + "</a>)" : '';
42239
+ let geneLink =(ic.chainsGene[chnid] && ic.chainsGene[chnid].geneId && ic.chainsGene[chnid].geneDesc) ? "(Gene: <a href='https://www.ncbi.nlm.nih.gov/gene/" + ic.chainsGene[chnid].geneId + "?report=gene_table' target='_blank' title='" + ic.chainsGene[chnid].geneDesc + "'>" + ic.chainsGene[chnid].geneSymbol + "</a>)" : '';
42228
42240
  let structure = chnid.substr(0, chnid.indexOf('_'));
42229
42241
  let chainLink = (structure.length > 5) ? '<a href="https://alphafold.ebi.ac.uk/entry/' + structure + '" target="_blank">' + chnid + '</a>' : chnid;
42230
42242
  let chainHtml = "<div id='" + ic.pre + "anno_" + chnid + "' class='icn3d-annotation'>" + categoryStr
@@ -42901,7 +42913,7 @@ class ShowSeq {
42901
42913
  html += '<span>-</span>'; //'<span>-</span>';
42902
42914
  }
42903
42915
  }
42904
-
42916
+
42905
42917
  if(ic.seqStartLen && ic.seqStartLen[chnid]) html += this.insertMulGap(ic.seqEndLen[chnid], '-');
42906
42918
 
42907
42919
  html += '<span class="icn3d-residueNum"></span>';
@@ -43120,7 +43132,7 @@ class ShowSeq {
43120
43132
  html += '</div>';
43121
43133
  html2 += '</div>';
43122
43134
  html3 += '</div>';
43123
-
43135
+
43124
43136
  //if(Object.keys(ic.chains[chnid]).length > 10) {
43125
43137
  if(ic.giSeq[chnid].length > 10) {
43126
43138
  let atom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.chains[chnid]);
@@ -43169,8 +43181,9 @@ class ShowSeq {
43169
43181
  html3 += '</div></div>';
43170
43182
  }
43171
43183
 
43172
- if(ic.bShowRefnum && ic.chainid2refpdbname.hasOwnProperty(chnid) && ic.chainid2refpdbname[chnid].length > 0) {
43184
+ if(ic.bShowRefnum && ic.chainid2refpdbname.hasOwnProperty(chnid) && ic.chainid2refpdbname[chnid].length > 0) {
43173
43185
  let result = this.showAllRefNum(giSeq, chnid);
43186
+
43174
43187
  html += result.html;
43175
43188
  html3 += result.html3;
43176
43189
  }
@@ -43182,7 +43195,7 @@ class ShowSeq {
43182
43195
  html3 += result.html3;
43183
43196
  }
43184
43197
  }
43185
-
43198
+
43186
43199
  // highlight reference numbers
43187
43200
  if(ic.bShowRefnum) {
43188
43201
  // comment out so that this process didn't change the selection
@@ -43191,7 +43204,7 @@ class ShowSeq {
43191
43204
  // commented out because it produced too many commands
43192
43205
  // let name = 'refnum_anchors';
43193
43206
  // ic.selectionCls.saveSelection(name, name);
43194
-
43207
+
43195
43208
  ic.hlUpdateCls.updateHlAll();
43196
43209
  }
43197
43210
 
@@ -43222,7 +43235,7 @@ class ShowSeq {
43222
43235
  //ic.setColorCls.setColorByOptions(ic.opts, ic.atoms);
43223
43236
  ic.setColorCls.setColorByOptions(ic.opts, ic.dAtoms);
43224
43237
 
43225
- ic.selectionCls.selectAll_base();
43238
+ //ic.selectionCls.selectAll_base();
43226
43239
  ic.hlUpdateCls.updateHlAll();
43227
43240
  //ic.drawCls.draw();
43228
43241
  ic.drawCls.draw();
@@ -43342,8 +43355,10 @@ class ShowSeq {
43342
43355
 
43343
43356
  postfix = strandPostfix + '_' + index;
43344
43357
 
43358
+ let firstTwo = parseInt(refnum.toString().substr(0, 2)); // A- strand
43359
+
43345
43360
  if(currStrand && currStrand != ' ') {
43346
- if(refnum3c.substr(0,1) != '9') {
43361
+ if(refnum3c.substr(0,1) != '9' || firstTwo == 10) {
43347
43362
  let lastTwo = parseInt(refnum.toString().substr(refnum.toString().length - 2, 2));
43348
43363
 
43349
43364
  if(currStrand != prevStrand) { // reset currCnt
@@ -43370,6 +43385,10 @@ class ShowSeq {
43370
43385
  resCntAtAnchor = 0;
43371
43386
  }
43372
43387
 
43388
+ if(firstTwo == 10) {
43389
+ strandArray[strandCnt].anchorRefnum = 0;
43390
+ }
43391
+
43373
43392
  strandArray[strandCnt].strandPostfix = strandPostfix; // a in A1250a
43374
43393
  strandArray[strandCnt].strand = currStrand; // A in A1250a
43375
43394
 
@@ -43392,6 +43411,10 @@ class ShowSeq {
43392
43411
  resCntAtAnchor = 0;
43393
43412
  }
43394
43413
 
43414
+ if(firstTwo == 10) {
43415
+ strandArray[strandCnt - 1].anchorRefnum = 0;
43416
+ }
43417
+
43395
43418
  strandArray[strandCnt - 1].endResi = currResi;
43396
43419
  strandArray[strandCnt - 1].endRefnum = refnum; // 1250a
43397
43420
  strandArray[strandCnt - 1].resCntAtAnchor = resCntAtAnchor;
@@ -43726,13 +43749,13 @@ class ShowSeq {
43726
43749
 
43727
43750
  let html = '';
43728
43751
 
43729
- if(refnumLabel && lastTwo == 50 && !bLoop) {
43752
+ if(refnumLabel && (lastTwo == 50 || refnum == 1094) && !bLoop) {
43730
43753
  // highlight the anchor residues
43731
43754
  ic.hAtomsRefnum = me.hashUtilsCls.unionHash(ic.hAtomsRefnum, ic.residues[residueid]);
43732
43755
 
43733
43756
  html += '<span ' + colorStr + ' title="' + refnumLabel + '"><b>' + refnumLabel.substr(0, 1) + '</b>' + refnumLabel.substr(1) + '</span>';
43734
43757
  }
43735
- else if(refnumLabel && lastTwo % 2 == 0 && lastTwo != 52 && !bHidelabel) { // don't show label for the first, middle, and last loop residues
43758
+ else if(refnumLabel && lastTwo % 2 == 0 && lastTwo != 52 && refnum != 1096 && !bHidelabel) { // don't show label for the first, middle, and last loop residues
43736
43759
  // e.g., 2152a
43737
43760
  lastTwoStr = isNaN(refnumStr) ? lastTwoStr + refnumStr.substr(refnumStr.length - 1, 1) : lastTwoStr;
43738
43761
  html += '<span ' + colorStr + ' title="' + refnumLabel + '">' + lastTwoStr + '</span>';
@@ -43774,7 +43797,8 @@ class ShowSeq {
43774
43797
  return '#00FF00';
43775
43798
  }
43776
43799
  else if(currStrand == "E") {
43777
- return (bText) ? "#F7DC6F" : "#FFFF00";
43800
+ //return (bText) ? "#F7DC6F" : "#FFFF00";
43801
+ return "#F7DC6F";
43778
43802
  }
43779
43803
  else if(currStrand == "F") {
43780
43804
  return '#FFA500';
@@ -43798,7 +43822,7 @@ class ShowSeq {
43798
43822
  return '#006400';
43799
43823
  }
43800
43824
  else if(currStrand == "C" || currStrand == "F") {
43801
- return "#FFFF00"; //'#F0E68C';
43825
+ return "#F7DC6F"; //"#FFFF00"; //'#F0E68C';
43802
43826
  }
43803
43827
  else if(currStrand == "C'" || (currStrand && currStrand.substr(0, 1) == "G")) {
43804
43828
  return '#FFA500';
@@ -45501,27 +45525,27 @@ class LineGraph {
45501
45525
  let thisClass = this;
45502
45526
 
45503
45527
  // round 1, 16 templates
45504
- ic.refpdbArray = ['1InsulinR_8guyE_human_FN3-n1', '1Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4', '1CoAtomerGamma1_1r4xA_human', '1C3_2qkiD_human_n1', '1CuZnSuperoxideDismutase_1hl5C_human', '1ASF1A_2iijA_human', '1FAB-LIGHT_5esv_C1-n2', '1CD2_1hnfA_human_C2-n2', '1NaCaExchanger_2fwuA_dog_n2', '1FAB-HEAVY_5esv_V-n1', '1PDL1_4z18B_human_V-n1', '1BTLA_2aw2A_human_Iset', '1LaminAC_1ifrA_human', '1IsdA_2iteA_bacteria', '1TCRa_6jxrm_human_C1-n2', '1CD19_6al5A_human_C2orV-n1', '1CD28_1yjdC_human_V'];
45528
+ ic.refpdbArray = ['1InsulinR_8guyE_human_FN3-n1', '1Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4', '1CoAtomerGamma1_1r4xA_human', '1C3_2qkiD_human_n1', '1CuZnSuperoxideDismutase_1hl5C_human', '1ASF1A_2iijA_human', '1FAB-LIGHT_5esv_C1-n2', '1CD2_1hnfA_human_C2-n2', '1NaCaExchanger_2fwuA_dog_n2', '1NaKATPaseTransporterBeta_2zxeB_spurdogshark', '1FAB-HEAVY_5esv_V-n1', '1PDL1_4z18B_human_V-n1', '1BTLA_2aw2A_human_Iset', '1LaminAC_1ifrA_human', '1CD3g_6jxrg_human_Iset', '1CD28_1yjdC_human_V', '1CD19_6al5A_human_C2orV-n1'];
45505
45529
 
45506
45530
  // round 2
45507
45531
  ic.refpdbHash = {};
45508
45532
  ic.refpdbHash['1InsulinR_8guyE_human_FN3-n1'] = ['InsulinR_8guyE_human_FN3-n1', 'IL6Rb_1bquB_human_FN3-n3', 'Sidekick2_1wf5A_human_FN3-n7', 'InsulinR_8guyE_human_FN3-n2', 'Contactin1_2ee2A_human_FN3-n9', 'IL6Rb_1bquB_human_FN3-n2'];
45509
45533
  ic.refpdbHash['1Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'] = ['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4', 'ICOS_6x4gA_human_V'];
45510
- ic.refpdbHash['1CoAtomerGamma1_1r4xA_human'] = ['CoAtomerGamma1_1r4xA_human', 'TP34_2o6cA_bacteria', 'RBPJ_6py8C_human_Unk-n2', 'TP47_1o75A_bacteria'];
45534
+ ic.refpdbHash['1CoAtomerGamma1_1r4xA_human'] = ['CoAtomerGamma1_1r4xA_human', 'TP34_2o6cA_bacteria'];
45511
45535
  ic.refpdbHash['1C3_2qkiD_human_n1'] = ['C3_2qkiD_human_n1', 'BArrestin1_4jqiA_rat_n1', 'RBPJ_6py8C_human_Unk-n1'];
45512
45536
  ic.refpdbHash['1CuZnSuperoxideDismutase_1hl5C_human'] = ['CuZnSuperoxideDismutase_1hl5C_human', 'TEAD1_3kysC_human'];
45513
- ic.refpdbHash['1ASF1A_2iijA_human'] = ['ASF1A_2iijA_human', 'MPT63_1lmiA_bacteria'];
45537
+ ic.refpdbHash['1ASF1A_2iijA_human'] = ['ASF1A_2iijA_human', 'RBPJ_6py8C_human_Unk-n2', 'TP47_1o75A_bacteria'];
45514
45538
  ic.refpdbHash['1FAB-LIGHT_5esv_C1-n2'] = ['FAB-LIGHT_5esv_C1-n2', 'GHR_1axiB_human_FN3-n1', 'VTCN1_Q7Z7D3_human_V-n2', 'B2Microglobulin_7phrL_human_C1', 'FAB-HEAVY_5esv_C1-n2', 'MHCIa_7phrH_human_C1'];
45515
45539
  ic.refpdbHash['1CD2_1hnfA_human_C2-n2'] = ['CD2_1hnfA_human_C2-n2', 'Siglec3_5j0bB_human_C2-n2'];
45516
- ic.refpdbHash['1NaCaExchanger_2fwuA_dog_n2'] = ['NaCaExchanger_2fwuA_dog_n2', 'ORF7a_1xakA_virus', 'ECadherin_4zt1A_human_n2', 'NaKATPaseTransporterBeta_2zxeB_spurdogshark'];
45540
+ ic.refpdbHash['1NaCaExchanger_2fwuA_dog_n2'] = ['NaCaExchanger_2fwuA_dog_n2', 'ORF7a_1xakA_virus', 'ECadherin_4zt1A_human_n2'];
45541
+ ic.refpdbHash['1NaKATPaseTransporterBeta_2zxeB_spurdogshark'] = ['NaKATPaseTransporterBeta_2zxeB_spurdogshark'];
45517
45542
  ic.refpdbHash['1FAB-HEAVY_5esv_V-n1'] = ['FAB-HEAVY_5esv_V-n1', 'FAB-LIGHT_5esv_V-n1', 'VNAR_1t6vN_shark_V', 'TCRa_6jxrm_human_V-n1', 'VISTA_6oilA_human_V', 'CD8a_1cd8A_human_V', 'PD1_4zqkB_human_V'];
45518
45543
  ic.refpdbHash['1PDL1_4z18B_human_V-n1'] = ['PDL1_4z18B_human_V-n1', 'CD2_1hnfA_human_V-n1', 'LAG3_7tzgD_human_V-n1'];
45519
45544
  ic.refpdbHash['1BTLA_2aw2A_human_Iset'] = ['BTLA_2aw2A_human_Iset', 'Palladin_2dm3A_human_Iset-n1', 'Titin_4uowM_human_Unk-n152', 'LAG3_7tzgD_human_C2-n2', 'JAM1_1nbqA_human_VorIset-n2', 'Contactin1_3s97C_human_C2-n2'];
45520
- ic.refpdbHash['1LaminAC_1ifrA_human'] = ['LaminAC_1ifrA_human'];
45521
- ic.refpdbHash['1IsdA_2iteA_bacteria'] = ['IsdA_2iteA_bacteria'];
45522
- ic.refpdbHash['1TCRa_6jxrm_human_C1-n2'] = ['TCRa_6jxrm_human_C1-n2'];
45523
- ic.refpdbHash['1CD19_6al5A_human_C2orV-n1'] = ['CD19_6al5A_human_C2orV-n1'];
45524
- ic.refpdbHash['1CD28_1yjdC_human_V'] = ['CD28_1yjdC_human_V'];
45545
+ ic.refpdbHash['1LaminAC_1ifrA_human'] = ['LaminAC_1ifrA_human', 'CD3d_6jxrd_human_Iset'];
45546
+ ic.refpdbHash['1CD3g_6jxrg_human_Iset'] = ['CD3g_6jxrg_human_Iset', 'TCRa_6jxrm_human_C1-n2', 'IsdA_2iteA_bacteria'];
45547
+ ic.refpdbHash['1CD28_1yjdC_human_V'] = ['CD28_1yjdC_human_V', 'MPT63_1lmiA_bacteria', 'CD3e_6jxrf_human_Iset'];
45548
+ ic.refpdbHash['1CD19_6al5A_human_C2orV-n1'] = ['CD19_6al5A_human_C2orV-n1'];
45525
45549
 
45526
45550
  // use known ref structure
45527
45551
  ic.refpdbHash['5ESV_C'] = ['FAB-HEAVY_5esv_V-n1', 'FAB-HEAVY_5esv_C1-n2'];
@@ -45569,11 +45593,14 @@ class LineGraph {
45569
45593
  ic.refpdbHash['6A15_A'] = ['CD19_6al5A_human_C2orV-n1'];
45570
45594
  ic.refpdbHash['2QKI_D'] = ['C3_2qkiD_human_n1'];
45571
45595
  ic.refpdbHash['1YJD_C'] = ['CD28_1yjdC_human_V'];
45596
+ ic.refpdbHash['6JXR_d'] = ['CD3d_6jxrd_human_Iset'];
45597
+ ic.refpdbHash['6JXR_f'] = ['CD3e_6jxrf_human_Iset'];
45598
+ ic.refpdbHash['6JXR_g'] = ['CD3g_6jxrg_human_Iset'];
45572
45599
 
45573
45600
  let pdbAjaxArray = [];
45574
45601
  for(let k = 0, kl = ic.refpdbArray.length; k < kl; ++k) {
45575
- //let urlpdb = me.htmlCls.baseUrl + "mmcifparser/mmcifparser.cgi?refpdbid=" + ic.refpdbArray[k];
45576
- let urlpdb = me.htmlCls.baseUrl + "mmcifparser/mmcifparser.cgi?refjsonid=" + ic.refpdbArray[k];
45602
+ let urlpdb = me.htmlCls.baseUrl + "mmcifparser/mmcifparser.cgi?refpdbid=" + ic.refpdbArray[k];
45603
+ //let urlpdb = me.htmlCls.baseUrl + "mmcifparser/mmcifparser.cgi?refjsonid=" + ic.refpdbArray[k];
45577
45604
 
45578
45605
  let pdbAjax = me.getAjaxPromise(urlpdb, 'text');
45579
45606
 
@@ -45604,8 +45631,8 @@ class LineGraph {
45604
45631
  let ajaxArray = [];
45605
45632
  let domainidpairArray = [];
45606
45633
 
45607
- me.htmlCls.baseUrl + "tmalign/tmalign.cgi";
45608
- let urlalign = me.htmlCls.baseUrl + "vastdyn/vastdyn.cgi";
45634
+ let urltmalign = me.htmlCls.baseUrl + "tmalign/tmalign.cgi";
45635
+ me.htmlCls.baseUrl + "vastdyn/vastdyn.cgi";
45609
45636
 
45610
45637
  if(!ic.resid2domainid) ic.resid2domainid = {};
45611
45638
  //ic.resid2domainid = {};
@@ -45643,7 +45670,7 @@ class LineGraph {
45643
45670
 
45644
45671
  let atomFirst = ic.firstAtomObjCls.getFirstAtomObj(currAtoms);
45645
45672
  let atomLast = ic.firstAtomObjCls.getLastAtomObj(currAtoms);
45646
- let resiSum = parseInt(atomFirst.resi) + parseInt(atomLast.resi);
45673
+ let resiSum = atomFirst.resi + ':' + atomLast.resi;
45647
45674
 
45648
45675
  for(let n = 0, nl = residueArray.length; n < nl; ++n) {
45649
45676
  let resid = residueArray[n];
@@ -45679,7 +45706,7 @@ class LineGraph {
45679
45706
 
45680
45707
  let atomFirst = ic.firstAtomObjCls.getFirstAtomObj(domainAtoms);
45681
45708
  let atomLast = ic.firstAtomObjCls.getLastAtomObj(domainAtoms);
45682
- let resiSum = parseInt(atomFirst.resi) + parseInt(atomLast.resi);
45709
+ let resiSum = atomFirst.resi + ':' + atomLast.resi;
45683
45710
 
45684
45711
  for(let m = 0, ml = segArray.length; m < ml; m += 2) {
45685
45712
  let startResi = segArray[m];
@@ -45697,31 +45724,30 @@ class LineGraph {
45697
45724
 
45698
45725
  for(let k = 0, kl = domainAtomsArray.length; k < kl; ++k) {
45699
45726
  let pdb_target = ic.saveFileCls.getAtomPDB(domainAtomsArray[k], undefined, undefined, undefined, undefined, struct);
45700
- let bForceOneDomain = true;
45701
- let jsonStr_t = ic.domain3dCls.getDomainJsonForAlign(domainAtomsArray[k], bForceOneDomain);
45727
+ //let bForceOneDomain = true;
45728
+ //let jsonStr_t = ic.domain3dCls.getDomainJsonForAlign(domainAtomsArray[k], bForceOneDomain);
45702
45729
 
45703
45730
  // ig strand for any subset will have the same k, use the number of residue to separate them
45704
45731
  let atomFirst = ic.firstAtomObjCls.getFirstAtomObj(domainAtomsArray[k]);
45705
45732
  let atomLast = ic.firstAtomObjCls.getLastAtomObj(domainAtomsArray[k]);
45706
- let resiSum = parseInt(atomFirst.resi) + parseInt(atomLast.resi);
45733
+ let resiSum = atomFirst.resi + ':' + atomLast.resi;
45707
45734
  //let domainid = chainid + '-' + k + '_' + Object.keys(domainAtomsArray[k]).length;
45708
45735
  let domainid = chainid + '-' + k + '_' + resiSum;
45709
45736
  ic.domainid2pdb[domainid] = pdb_target;
45710
45737
 
45711
45738
  if(!template) {
45712
45739
  for(let index = 0, indexl = dataArray.length; index < indexl; ++index) {
45713
- // let struct2 = ic.defaultPdbId + index;
45714
- // let pdb_query = dataArray[index].value; //[0];
45715
- // let header = 'HEADER ' + struct2 + '\n';
45716
- // pdb_query = header + pdb_query;
45717
- let jsonStr_q = dataArray[index].value; //[0];
45740
+ let struct2 = ic.defaultPdbId + index;
45741
+ let pdb_query = dataArray[index].value; //[0];
45742
+ let header = 'HEADER ' + struct2 + '\n';
45743
+ pdb_query = header + pdb_query;
45744
+ //let jsonStr_q = dataArray[index].value; //[0];
45718
45745
 
45719
- // TM-align is not good when you align a full structure with the strand-only structure. VAST is better in this case.
45720
- // let dataObj = {'pdb_query': pdb_query, 'pdb_target': pdb_target, "queryid": ic.refpdbArray[index]};
45721
- // let alignAjax = me.getAjaxPostPromise(urltmalign, dataObj);
45746
+ let dataObj = {'pdb_query': pdb_query, 'pdb_target': pdb_target, "queryid": ic.refpdbArray[index]};
45747
+ let alignAjax = me.getAjaxPostPromise(urltmalign, dataObj);
45722
45748
 
45723
- let dataObj = {'domains1': jsonStr_q, 'domains2': jsonStr_t};
45724
- let alignAjax = me.getAjaxPostPromise(urlalign, dataObj);
45749
+ // let dataObj = {'domains1': jsonStr_q, 'domains2': jsonStr_t};
45750
+ // let alignAjax = me.getAjaxPostPromise(urlalign, dataObj);
45725
45751
 
45726
45752
  ajaxArray.push(alignAjax);
45727
45753
 
@@ -45743,8 +45769,8 @@ class LineGraph {
45743
45769
  // let allPromise = Promise.allSettled(ajaxArray);
45744
45770
  // dataArray2 = await allPromise;
45745
45771
 
45746
- //split arrays into chunks of 96 jobs or me.cfg.maxajax jobs
45747
- let n = (me.cfg.maxajax) ? me.cfg.maxajax : 96;
45772
+ //split arrays into chunks of 48 jobs or me.cfg.maxajax jobs
45773
+ let n = (me.cfg.maxajax) ? me.cfg.maxajax : ic.refpdbArray.length * 6;
45748
45774
 
45749
45775
  for(let i = 0, il = parseInt((ajaxArray.length - 1) / n + 1); i < il; ++i) {
45750
45776
  let currAjaxArray = [];
@@ -45851,7 +45877,6 @@ class LineGraph {
45851
45877
  let thisClass = this;
45852
45878
 
45853
45879
  let tmscoreThreshold = 0.4; // 0.4; //0.5;
45854
- let rmsdThreshold = 10;
45855
45880
 
45856
45881
  // find the best alignment for each chain
45857
45882
  let domainid2score = {}, domainid2segs = {}, chainid2segs = {};
@@ -45885,7 +45910,10 @@ class LineGraph {
45885
45910
  }
45886
45911
  }
45887
45912
  else {
45888
- if(queryData[0].super_rmsd > rmsdThreshold || queryData[0].num_res < minResidues) {
45913
+ // if(queryData[0].super_rmsd > rmsdThreshold || queryData[0].num_res < minResidues) {
45914
+ // continue;
45915
+ // }
45916
+ if(queryData[0].score < tmscoreThreshold || queryData[0].num_res < minResidues) {
45889
45917
  continue;
45890
45918
  }
45891
45919
  }
@@ -45900,7 +45928,8 @@ class LineGraph {
45900
45928
  if(!me.bNode) console.log("refpdbname " + refpdbname + " TM-score: " + queryData[0].score);
45901
45929
  }
45902
45930
  else {
45903
- if(!me.bNode) console.log("domainid: " + domainid + " refpdbname " + refpdbname + " RMSD: " + queryData[0].super_rmsd + ", num_res: " + queryData[0].num_res + ", 10/RMSD + num_res/5: " + (10 / queryData[0].super_rmsd + queryData[0].num_seg / 5).toFixed(1));
45931
+ // if(!me.bNode) console.log("domainid: " + domainid + " refpdbname " + refpdbname + " RMSD: " + queryData[0].super_rmsd + ", num_seg: " + queryData[0].num_seg + ", 10/RMSD + num_seg/5: " + (10 / queryData[0].super_rmsd + queryData[0].num_seg / 5).toFixed(1));
45932
+ if(!me.bNode) console.log("domainid: " + domainid + " refpdbname " + refpdbname + " TM-score: " + queryData[0].score);
45904
45933
  }
45905
45934
 
45906
45935
  // Ig-like domains: B (2150, 2150a, 2150b), C (3150, 3250), E (7150, 7250), F (8150, 8250) strands
@@ -45948,7 +45977,8 @@ class LineGraph {
45948
45977
  }
45949
45978
  }
45950
45979
  else {
45951
- let mixScore = 10 / queryData[0].super_rmsd + queryData[0].num_seg / 5;
45980
+ //let mixScore = 10 / queryData[0].super_rmsd + queryData[0].num_seg / 5;
45981
+ let mixScore = queryData[0].score;
45952
45982
 
45953
45983
  if(!domainid2score.hasOwnProperty(domainid) || mixScore > domainid2score[domainid]) {
45954
45984
  domainid2score[domainid] = mixScore;
@@ -46019,8 +46049,8 @@ class LineGraph {
46019
46049
  //let allPromise = Promise.allSettled(ajaxArray);
46020
46050
  //dataArray3 = await allPromise;
46021
46051
 
46022
- //split arrays into chunks of 96 jobs or me.cfg.maxajax jobs
46023
- let n = (me.cfg.maxajax) ? me.cfg.maxajax : 96;
46052
+ //split arrays into chunks of 48 jobs or me.cfg.maxajax jobs
46053
+ let n = (me.cfg.maxajax) ? me.cfg.maxajax : ic.refpdbArray.length * 6;
46024
46054
 
46025
46055
  for(let i = 0, il = parseInt((ajaxArray.length - 1) / n + 1); i < il; ++i) {
46026
46056
  let currAjaxArray = [];
@@ -46137,7 +46167,7 @@ class LineGraph {
46137
46167
  else {
46138
46168
  await ic.showAnnoCls.showAnnotations();
46139
46169
  }
46140
-
46170
+
46141
46171
  ic.annotationCls.setAnnoViewAndDisplay('detailed view');
46142
46172
  }
46143
46173
  else {
@@ -49549,7 +49579,7 @@ class ChainalignParser {
49549
49579
  //hAtoms = me.hashUtilsCls.unionHash(hAtoms, ic.chains[chainidArray[0]]);
49550
49580
  //hAtoms = me.hashUtilsCls.unionHash(hAtoms, ic.chains[chainidArray[1]]);
49551
49581
  }
49552
-
49582
+
49553
49583
  // set up the view of sequence alignment for each pair
49554
49584
  for(let mmdbidpair in mmdbidpairFinalHash) {
49555
49585
  if(ic.q_rotation !== undefined) {
@@ -49980,7 +50010,11 @@ class ChainalignParser {
49980
50010
  if(me.cfg.aligntool == 'tmalign') logStr += "; TM-score: " + align[0].score.toPrecision(4);
49981
50011
  me.htmlCls.clickMenuCls.setLogCmd(logStr, false);
49982
50012
  let html = "<br><b>Alignment RMSD</b>: " + rmsd.toPrecision(4) + " &#8491;<br>";
49983
- if(me.cfg.aligntool == 'tmalign') html += "<b>TM-score</b>: " + align[0].score.toPrecision(4) + "<br><br>";
50013
+ if(me.cfg.aligntool == 'tmalign') {
50014
+ html += "<b>TM-score</b>: " + align[0].score.toPrecision(4) + "<br><br>";
50015
+ ic.tmscore = align[0].score.toPrecision(4);
50016
+ }
50017
+
49984
50018
  $("#" + ic.pre + "dl_rmsd_html").html(html);
49985
50019
  if(!me.cfg.bSidebyside) me.htmlCls.dialogCls.openDlg('dl_rmsd', 'RMSD of alignment');
49986
50020
 
@@ -52043,7 +52077,7 @@ class PdbParser {
52043
52077
 
52044
52078
  if(me.cfg.rotate !== undefined) ic.resizeCanvasCls.rotStruc(me.cfg.rotate, true);
52045
52079
 
52046
- if(bAppend) {
52080
+ if(bAppend && !me.bNode) {
52047
52081
  // show all
52048
52082
  ic.definedSetsCls.setModeAndDisplay('all');
52049
52083
  }
@@ -54361,16 +54395,20 @@ class ParserUtils {
54361
54395
 
54362
54396
  getMissingResidues(seqArray, type, chainid) { let ic = this.icn3d, me = ic.icn3dui;
54363
54397
  ic.chainsSeq[chainid] = [];
54398
+
54399
+ // find the offset of MMDB sequence
54400
+ let offset = 0;
54364
54401
  if(type === 'mmdbid' || type === 'align') {
54365
54402
  for(let i = 0, il = seqArray.length; i < il; ++i) {
54366
54403
  if(seqArray[i][0] != 0) {
54367
- seqArray[i][0] - (i + 1);
54404
+ offset = seqArray[i][0] - (i + 1);
54368
54405
  break;
54369
54406
  }
54370
54407
  }
54371
54408
  }
54372
54409
 
54373
- let prevResi = 0;
54410
+ //let prevResi = 0;
54411
+ let prevResi = offset;
54374
54412
  for(let i = 0, il = seqArray.length; i < il; ++i) {
54375
54413
  let seqName, resiPos;
54376
54414
  // mmdbid: ["0","R","ARG"],["502","V","VAL"]; mmcifid: [1, "ARG"]; align: ["0","R","ARG"] //align: [1, "0","R","ARG"]
@@ -55259,6 +55297,7 @@ class LoadAtomData {
55259
55297
  let CSerial, prevCSerial, OSerial, prevOSerial;
55260
55298
 
55261
55299
  let biopolymerChainsHash = {};
55300
+
55262
55301
  for(let i in atoms) {
55263
55302
  ++serial;
55264
55303
 
@@ -55288,21 +55327,21 @@ class LoadAtomData {
55288
55327
  atm.chain = ic.molid2chain[molid].substr(pos + 1);
55289
55328
  }
55290
55329
  else {
55291
- let miscName = 'Misc';
55330
+ let miscName = 'Misc';
55292
55331
 
55293
- //if(atm.resn != prevResn || chainid2kind[chainNum] === 'solvent' || atm.resn === 'HOH' || atm.name == atm.elem) {
55294
- if((chainid2kind[chainNum] === 'protein' && chainid2kind[chainNum] === 'nucleotide' && atm.resi != prevResiOri)
55295
- ||(chainid2kind[chainNum] !== 'protein' && chainid2kind[chainNum] !== 'nucleotide'
55296
- &&(atm.resn.substr(0,3) != prevResn.substr(0,3) || atm.resi != prevResiOri || chainid2kind[chainNum] === 'solvent' || atm.resn === 'HOH')) ) {
55297
- ++miscCnt;
55298
- }
55332
+ //if(atm.resn != prevResn || chainid2kind[chainNum] === 'solvent' || atm.resn === 'HOH' || atm.name == atm.elem) {
55333
+ if((chainid2kind[chainNum] === 'protein' && chainid2kind[chainNum] === 'nucleotide' && atm.resi != prevResiOri)
55334
+ ||(chainid2kind[chainNum] !== 'protein' && chainid2kind[chainNum] !== 'nucleotide'
55335
+ &&(atm.resn.substr(0,3) != prevResn.substr(0,3) || atm.resi != prevResiOri || chainid2kind[chainNum] === 'solvent' || atm.resn === 'HOH')) ) {
55336
+ ++miscCnt;
55337
+ }
55299
55338
 
55300
- atm.resi_ori = atm.resi;
55301
- atm.resi = miscCnt;
55302
- bSetResi = true;
55339
+ atm.resi_ori = atm.resi;
55340
+ atm.resi = miscCnt;
55341
+ bSetResi = true;
55303
55342
 
55304
- //if all are defined in the chain section, no "Misc" should appear
55305
- atm.chain = miscName;
55343
+ //if all are defined in the chain section, no "Misc" should appear
55344
+ atm.chain = miscName;
55306
55345
  }
55307
55346
 
55308
55347
  //if(ic.mmdbid_q !== undefined && ic.mmdbid_q === ic.mmdbid_t && alignType === 'query') {
@@ -57753,10 +57792,7 @@ class LoadPDB {
57753
57792
 
57754
57793
  if(ic.atoms[oriSerial2NewSerial[from]] !== undefined) ic.atoms[oriSerial2NewSerial[from]].bonds.push(oriSerial2NewSerial[to]);
57755
57794
  }
57756
- } else if (record.substr(0,3) === 'TER') {
57757
- // Concatenation of two pdbs will have several atoms for the same serial
57758
- ++serial;
57759
- }
57795
+ } else if (record.substr(0,3) === 'TER') ;
57760
57796
  }
57761
57797
 
57762
57798
  // add the last residue set
@@ -59330,24 +59366,28 @@ class ApplyCommand {
59330
59366
  else if(command == 'rotate left') {
59331
59367
  ic.bStopRotate = false;
59332
59368
  ic.ROT_DIR = 'left';
59369
+ ic.transformCls.rotateCountMax = 6000;
59333
59370
 
59334
59371
  ic.resizeCanvasCls.rotStruc('left');
59335
59372
  }
59336
59373
  else if(command == 'rotate right') {
59337
59374
  ic.bStopRotate = false;
59338
59375
  ic.ROT_DIR = 'right';
59376
+ ic.transformCls.rotateCountMax = 6000;
59339
59377
 
59340
59378
  ic.resizeCanvasCls.rotStruc('right');
59341
59379
  }
59342
59380
  else if(command == 'rotate up') {
59343
59381
  ic.bStopRotate = false;
59344
59382
  ic.ROT_DIR = 'up';
59383
+ ic.transformCls.rotateCountMax = 6000;
59345
59384
 
59346
59385
  ic.resizeCanvasCls.rotStruc('up');
59347
59386
  }
59348
59387
  else if(command == 'rotate down') {
59349
59388
  ic.bStopRotate = false;
59350
59389
  ic.ROT_DIR = 'down';
59390
+ ic.transformCls.rotateCountMax = 6000;
59351
59391
 
59352
59392
  ic.resizeCanvasCls.rotStruc('down');
59353
59393
  }
@@ -64046,7 +64086,8 @@ class Delphi {
64046
64086
  let pdbstr = '';
64047
64087
  /// pdbstr += ic.saveFileCls.getPDBHeader();
64048
64088
 
64049
- pdbstr +=(me.cfg.cid) ? ic.saveFileCls.getAtomPDB(atomHash, true) : ic.saveFileCls.getAtomPDB(atomHash);
64089
+ let bMergeIntoOne = true;
64090
+ pdbstr +=(me.cfg.cid) ? ic.saveFileCls.getAtomPDB(atomHash, true, undefined, undefined, undefined, undefined, bMergeIntoOne) : ic.saveFileCls.getAtomPDB(atomHash, undefined, undefined, undefined, undefined, undefined, bMergeIntoOne);
64050
64091
  pdbstr += ic.saveFileCls.getAtomPDB(ionHash, true, undefined, true);
64051
64092
 
64052
64093
  return pdbstr;
@@ -65019,7 +65060,8 @@ console.log("free energy: " + energy + " kcal/mol");
65019
65060
  }
65020
65061
  else {
65021
65062
  let atoms = me.hashUtilsCls.intHash(ic.dAtoms, ic.hAtoms);
65022
- pdbStr = ic.saveFileCls.getAtomPDB(atoms);
65063
+ let bMergeIntoOne = true;
65064
+ pdbStr = ic.saveFileCls.getAtomPDB(atoms, undefined, undefined, undefined, undefined, undefined, bMergeIntoOne);
65023
65065
  }
65024
65066
 
65025
65067
  let url = me.htmlCls.baseUrl + "scap/scap.cgi";
@@ -68940,7 +68982,7 @@ class SaveFile {
68940
68982
  }
68941
68983
 
68942
68984
  //getAtomPDB: function(atomHash, bPqr, bPdb, bNoChem) { let ic = this.icn3d, me = ic.icn3dui;
68943
- getAtomPDB(atomHash, bPqr, bNoChem, bNoHeader, chainResi2pdb, pdbid) { let ic = this.icn3d, me = ic.icn3dui;
68985
+ getAtomPDB(atomHash, bPqr, bNoChem, bNoHeader, chainResi2pdb, pdbid, bMergeIntoOne) { let ic = this.icn3d, me = ic.icn3dui;
68944
68986
  let pdbStr = '';
68945
68987
 
68946
68988
  // get all phosphate groups in lipids
@@ -69093,6 +69135,7 @@ class SaveFile {
69093
69135
  let bMulStruc =(struArray.length > 1) ? true : false;
69094
69136
 
69095
69137
  let molNum = 1, prevStru = '', prevChain = '';
69138
+ let chainIndex = 0, fakeChain = '', chainNameArray = 'abcdefghijklmnopqrstuvwxyz0123456789';
69096
69139
 
69097
69140
  let addedChainResiHash = {};
69098
69141
  for(let i in atomHash) {
@@ -69103,20 +69146,22 @@ class SaveFile {
69103
69146
 
69104
69147
  //if(bMulStruc && atom.structure != prevStru) {
69105
69148
  if(atom.structure != prevStru) {
69106
- pdbStr += connStr;
69107
- connStr = '';
69149
+ if(!bMergeIntoOne || !bMulStruc) {
69150
+ pdbStr += connStr;
69151
+ connStr = '';
69108
69152
 
69109
- if(molNum > 1) pdbStr += '\nENDMDL\n';
69153
+ if(molNum > 1) pdbStr += '\nENDMDL\n';
69110
69154
 
69111
- if(bMulStruc) pdbStr += 'MODEL ' + molNum + '\n';
69155
+ if(bMulStruc) pdbStr += 'MODEL ' + molNum + '\n';
69156
+ }
69112
69157
 
69113
69158
  // add header
69114
69159
  let mutantInfo = (chainResi2pdb) ? "Mutated chain_residue " + Object.keys(chainResi2pdb) + '; ' : '';
69115
69160
  if(!bNoHeader) {
69116
69161
  //pdbStr += this.getPDBHeader(molNum - 1, stru2header, mutantInfo, pdbid);
69117
69162
 
69118
- // make sur ethe PDB ID is correct
69119
- pdbStr += this.getPDBHeader(molNum - 1, stru2header, mutantInfo, atom.structure);
69163
+ // make sure the PDB ID is correct
69164
+ if(!bMergeIntoOne || !bMulStruc) pdbStr += this.getPDBHeader(molNum - 1, stru2header, mutantInfo, atom.structure);
69120
69165
 
69121
69166
  //pdbStr += '\n'; // separate from incomplete secondary structures
69122
69167
  }
@@ -69124,6 +69169,7 @@ class SaveFile {
69124
69169
  //prevStru = atom.structure;
69125
69170
  ++molNum;
69126
69171
  }
69172
+
69127
69173
  //else {
69128
69174
  //if(atom.chain != prevChain) {
69129
69175
  if(atom.chain != prevChain && atom.structure == prevStru) {
@@ -69197,17 +69243,28 @@ class SaveFile {
69197
69243
  */
69198
69244
 
69199
69245
  line +=(resn.length <= 3) ? resn.padStart(3, ' ') : resn.substr(0, 3);
69200
- //line += ' ';
69201
- //line +=(atom.chain.length <= 1) ? atom.chain.padStart(1, ' ') : atom.chain.substr(0, 1);
69202
- if(atom.chain.length >= 2) {
69203
- let chainTmp = atom.chain.replace(/_/gi, '').substr(0, 2);
69204
- line += chainTmp;
69205
- }
69206
- else if(atom.chain.length == 1) {
69207
- line += ' ' + atom.chain.substr(0, 1);
69246
+
69247
+ if(bMergeIntoOne && molNum > 2 && (ic.proteins.hasOwnProperty(atom.serial) || ic.nucleotides.hasOwnProperty(atom.serial))) {
69248
+ if(atom.structure != prevStru || atom.chain != prevChain) {
69249
+ fakeChain = (chainIndex < 36) ? chainNameArray[chainIndex] : '?';
69250
+ ++chainIndex;
69251
+ }
69252
+
69253
+ line += ' ' + fakeChain;
69208
69254
  }
69209
- else if(atom.chain.length == 0) {
69210
- line += ' A';
69255
+ else {
69256
+ //line += ' ';
69257
+ //line +=(atom.chain.length <= 1) ? atom.chain.padStart(1, ' ') : atom.chain.substr(0, 1);
69258
+ if(atom.chain.length >= 2) {
69259
+ let chainTmp = atom.chain.replace(/_/gi, '').substr(0, 2);
69260
+ line += chainTmp;
69261
+ }
69262
+ else if(atom.chain.length == 1) {
69263
+ line += ' ' + atom.chain.substr(0, 1);
69264
+ }
69265
+ else if(atom.chain.length == 0) {
69266
+ line += ' A';
69267
+ }
69211
69268
  }
69212
69269
 
69213
69270
  let resi = atom.resi;
@@ -69303,9 +69360,11 @@ class SaveFile {
69303
69360
  prevChain = atom.chain;
69304
69361
  }
69305
69362
 
69306
- pdbStr += connStr;
69307
-
69308
- if(bMulStruc) pdbStr += '\nENDMDL\n';
69363
+ if(!bMergeIntoOne || !bMulStruc) {
69364
+ pdbStr += connStr;
69365
+
69366
+ if(bMulStruc) pdbStr += '\nENDMDL\n';
69367
+ }
69309
69368
 
69310
69369
  return pdbStr;
69311
69370
  }
@@ -72790,7 +72849,7 @@ class iCn3DUI {
72790
72849
  //even when multiple iCn3D viewers are shown together.
72791
72850
  this.pre = this.cfg.divid + "_";
72792
72851
 
72793
- this.REVISION = '3.28.3';
72852
+ this.REVISION = '3.28.4';
72794
72853
 
72795
72854
  // In nodejs, iCn3D defines "window = {navigator: {}}"
72796
72855
  this.bNode = (Object.keys(window).length < 2) ? true : false;
@@ -72997,16 +73056,17 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
72997
73056
  }
72998
73057
  }
72999
73058
 
73000
- // realign
73001
- ic.chainidArray = [chain_t].concat(chainidArray);
73002
- ic.chainidArray = ic.chainalignParserCls.addPostfixForChainids(ic.chainidArray);
73003
-
73059
+ // get the matched structures, do not include the template
73004
73060
  let mmdbafid = '';
73005
- for(let i = 0, il = ic.chainidArray.length; i < il; ++i) {
73061
+ for(let i = 0, il = chainidArray.length; i < il; ++i) {
73006
73062
  if(i > 0) mmdbafid += ',';
73007
- mmdbafid += ic.chainidArray[i].substr(0, ic.chainidArray[i].indexOf('_'));
73063
+ mmdbafid += chainidArray[i].substr(0, chainidArray[i].indexOf('_'));
73008
73064
  }
73009
73065
 
73066
+ // realign, include the template
73067
+ ic.chainidArray = [chain_t].concat(chainidArray);
73068
+ ic.chainidArray = ic.chainalignParserCls.addPostfixForChainids(ic.chainidArray);
73069
+
73010
73070
  me.htmlCls.clickMenuCls.setLogCmd('resdef ' + me.cfg.resdef, true);
73011
73071
 
73012
73072
  ic.loadCmd = 'vast_search_chainid ' + ic.chainidArray;
@@ -73222,7 +73282,7 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
73222
73282
  // ic.bNCBI = true;
73223
73283
 
73224
73284
  // remove space
73225
- me.cfg.mmdbafid = me.cfg.mmdbafid.replace(/\s+/g, '');
73285
+ me.cfg.mmdbafid = me.cfg.mmdbafid.replace(/\s+/g, '').toUpperCase();
73226
73286
 
73227
73287
  ic.bMmdbafid = true;
73228
73288
  ic.inputid = me.cfg.mmdbafid;