icn3d 3.28.6 → 3.28.8

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
@@ -8456,8 +8456,8 @@ class SetMenu {
8456
8456
 
8457
8457
  html += this.getMenuText('mn1_searchgrooup', 'Search Structure ' + me.htmlCls.wifiStr, undefined, 1, 1);
8458
8458
  html += "<ul>";
8459
- html += this.getMenuUrl('mn1_searchstru', 'https://www.ncbi.nlm.nih.gov/structure', 'PDB Structures ' + me.htmlCls.wifiStr, undefined, 2);
8460
- html += this.getLink('mn1_proteinname', 'AlphaFold Structures ' + me.htmlCls.wifiStr, undefined, 2);
8459
+ html += this.getMenuUrl('mn1_searchstru', 'https://www.ncbi.nlm.nih.gov/structure', 'PDB Structures ' + me.htmlCls.wifiStr, 1, 2);
8460
+ html += this.getLink('mn1_proteinname', 'AlphaFold Structures ' + me.htmlCls.wifiStr, 1, 2);
8461
8461
  html += this.getMenuUrl('mn1_afdatabase', 'https://alphafold.ebi.ac.uk', 'AlphaFold UniProt Database ' + me.htmlCls.wifiStr, undefined, 2);
8462
8462
  html += "</ul>";
8463
8463
  html += "</li>";
@@ -8527,8 +8527,8 @@ class SetMenu {
8527
8527
  //html += this.getMenuText('mn1_fold', 'AlphaFold/ESM', undefined, undefined, 1);
8528
8528
  html += this.getMenuText('mn1_fold', 'Predict by Seq.', undefined, undefined, 1);
8529
8529
  html += "<ul>";
8530
- //html += this.getLink('mn1_esmfold', 'ESMFold', undefined, 2);
8531
- html += this.getMenuUrl('mn1_esmfold_link', "https://colab.research.google.com/github/sokrypton/ColabFold/blob/main/ESMFold.ipynb", "ESMFold via ColabFold" + me.htmlCls.wifiStr, undefined, 2);
8530
+ html += this.getLink('mn1_esmfold', 'ESMFold', undefined, 2);
8531
+ //html += this.getMenuUrl('mn1_esmfold_link', "https://colab.research.google.com/github/sokrypton/ColabFold/blob/main/ESMFold.ipynb", "ESMFold via ColabFold" + me.htmlCls.wifiStr, undefined, 2);
8532
8532
  html += this.getLink('mn1_alphafold', 'AlphaFold2 via ColabFold' + me.htmlCls.wifiStr, undefined, 2);
8533
8533
  html += "</ul>";
8534
8534
 
@@ -8869,7 +8869,7 @@ class SetMenu {
8869
8869
  html += this.getRadio('mn6_showslab', 'mn6_showslabNo', 'Off', true, undefined, 2);
8870
8870
  html += "</ul>";
8871
8871
  html += "</li>";
8872
- html += this.getMenuText('mn2_axes', 'XYZ-axes', undefined, 1);
8872
+ html += this.getMenuText('mn2_axes', 'XYZ-axes', undefined, undefined, 1);
8873
8873
  html += "<ul>";
8874
8874
  html += this.getRadio('mn6_showaxis', 'mn6_showaxisYes', 'Original', undefined, undefined, 2);
8875
8875
  html += this.getRadio('mn6_showaxis', 'mn6_showaxisSel', 'Prin. Axes on Sel.', undefined, undefined, 2);
@@ -14959,7 +14959,7 @@ class SetHtml {
14959
14959
  let nucleotideribbonwidth =(type == '3dprint') ? '1.4' : '0.8';
14960
14960
 
14961
14961
  let shininess = 40;
14962
- let light1 = 0.6;
14962
+ let light1 = 0.8;
14963
14963
  let light2 = 0.4;
14964
14964
  let light3 = 0.2;
14965
14965
  let bGlycansCartoon = 0;
@@ -15007,7 +15007,7 @@ class SetHtml {
15007
15007
 
15008
15008
  html += "<b>1. Shininess</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "shininess' value='" + shininess + "' size=4>" + me.htmlCls.space3 + "(for the shininess of the 3D objects, default 40)<br/><br/>";
15009
15009
  html += "<b>2. Three directional lights</b>: <br>";
15010
- html += "<b>Key Light</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "light1' value='" + light1 + "' size=4>" + me.htmlCls.space3 + "(for the light strength of the key light, default 0.6)<br/>";
15010
+ html += "<b>Key Light</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "light1' value='" + light1 + "' size=4>" + me.htmlCls.space3 + "(for the light strength of the key light, default 0.8)<br/>";
15011
15011
  html += "<b>Fill Light</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "light2' value='" + light2 + "' size=4>" + me.htmlCls.space3 + "(for the light strength of the fill light, default 0.4)<br/>";
15012
15012
  html += "<b>Back Light</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "light3' value='" + light3 + "' size=4>" + me.htmlCls.space3 + "(for the light strength of the back light, default 0.2)<br/><br/>";
15013
15013
  html += "<b>3. Thickness</b>: <br>";
@@ -15221,7 +15221,7 @@ class SetHtml {
15221
15221
  html += "</ul>";
15222
15222
 
15223
15223
  html += me.htmlCls.divStr + name1 + "tab1'>";
15224
- if(type == 'delphi') html += this.addGsizeSalt(name1) + "<br>";
15224
+ if(type == 'delphi') html += this.addGsizeSalt(name1 + "1") + "<br>";
15225
15225
 
15226
15226
  html += "<span style='white-space:nowrap;font-weight:bold;'>Potential contour at: <select id='" + me.pre + name1 + "contour'>";
15227
15227
 
@@ -15286,7 +15286,7 @@ class SetHtml {
15286
15286
  html += "</div>";
15287
15287
 
15288
15288
  html += me.htmlCls.divStr + name1 + "tab2'>";
15289
- if(type == 'delphi') html += this.addGsizeSalt(name1) + "<br>";
15289
+ if(type == 'delphi') html += this.addGsizeSalt(name1 + "2") + "<br>";
15290
15290
 
15291
15291
  html += "<span style='white-space:nowrap;font-weight:bold;'>Surface with max potential at: <select id='" + me.pre + name1 + "contour2'>";
15292
15292
 
@@ -22160,6 +22160,9 @@ class Scene {
22160
22160
  // show cross-linkages, set side chains
22161
22161
  ic.applyClbondsCls.applyClbondsOptions();
22162
22162
 
22163
+ // add dashed lines for missing residues
22164
+ ic.applyMissingResCls.applyMissingResOptions();
22165
+
22163
22166
  ic.applyDisplayCls.applyDisplayOptions(ic.opts, ic.dAtoms);
22164
22167
 
22165
22168
  ic.applyOtherCls.applyOtherOptions();
@@ -22253,7 +22256,7 @@ class Scene {
22253
22256
  ic.lightPos3 = new THREE.Vector3(1, 1, 1); //(0, 1, 1);
22254
22257
  }
22255
22258
 
22256
- let ambientLight = new THREE.AmbientLight(0x888888); //(0x404040);
22259
+ let ambientLight = new THREE.AmbientLight(0x404040); //(0x888888); //(0x404040);
22257
22260
 
22258
22261
  ic.scene.add(ic.directionalLight);
22259
22262
  ic.scene.add(ambientLight);
@@ -25447,15 +25450,16 @@ class Strip {
25447
25450
  let mesh;
25448
25451
 
25449
25452
  if(bHighlight === 2) {
25453
+ //mesh = new THREE.Mesh(geo, new THREE.MeshPhongMaterial({ transparent: true, opacity: 0.5, specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, vertexColors: THREE.FaceColors, side: THREE.DoubleSide }));
25450
25454
  mesh = new THREE.Mesh(geo, new THREE.MeshPhongMaterial({ transparent: true, opacity: 0.5, specular: ic.frac,
25451
- shininess: ic.shininess, emissive: ic.emissive, vertexColors: THREE.FaceColors, side: THREE.DoubleSide }));
25455
+ shininess: ic.shininess, emissive: ic.emissive, vertexColors: true, side: THREE.DoubleSide }));
25452
25456
 
25453
25457
  ic.mdl.add(mesh);
25454
25458
  ic.prevHighlightObjects.push(mesh);
25455
25459
  }
25456
25460
  else {
25457
- mesh = new THREE.Mesh(geo, new THREE.MeshPhongMaterial({ specular: ic.frac,
25458
- shininess: ic.shininess, emissive: ic.emissive, vertexColors: THREE.FaceColors, side: THREE.DoubleSide }));
25461
+ //mesh = new THREE.Mesh(geo, new THREE.MeshPhongMaterial({ specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, vertexColors: THREE.FaceColors, side: THREE.DoubleSide }));
25462
+ mesh = new THREE.Mesh(geo, new THREE.MeshPhongMaterial({ specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, vertexColors: true, side: THREE.DoubleSide }));
25459
25463
 
25460
25464
  ic.mdl.add(mesh);
25461
25465
  ic.objects.push(mesh);
@@ -25860,7 +25864,8 @@ class Tube {
25860
25864
  */
25861
25865
  let mesh;
25862
25866
  if(bHighlight === 2) {
25863
- mesh = new THREE.Mesh(geo, new THREE.MeshPhongMaterial({ transparent: true, opacity: 0.5, specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, vertexColors: THREE.FaceColors, side: THREE.DoubleSide }));
25867
+ //mesh = new THREE.Mesh(geo, new THREE.MeshPhongMaterial({ transparent: true, opacity: 0.5, specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, vertexColors: THREE.FaceColors, side: THREE.DoubleSide }));
25868
+ mesh = new THREE.Mesh(geo, new THREE.MeshPhongMaterial({ transparent: true, opacity: 0.5, specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, vertexColors: true, side: THREE.DoubleSide }));
25864
25869
 
25865
25870
  if(ic.mdl) ic.mdl.add(mesh);
25866
25871
  }
@@ -25871,8 +25876,8 @@ class Tube {
25871
25876
  if(ic.mdl) ic.mdl.add(mesh);
25872
25877
  }
25873
25878
  else {
25874
- mesh = new THREE.Mesh(geo, new THREE.MeshPhongMaterial({ specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, vertexColors: THREE.FaceColors, side: THREE.DoubleSide }));
25875
- //mesh = new THREE.Mesh(geo, new THREE.MeshPhongMaterial({ specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, color: 0xFFFFFF, side: THREE.DoubleSide }));
25879
+ //mesh = new THREE.Mesh(geo, new THREE.MeshPhongMaterial({ specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, vertexColors: THREE.FaceColors, side: THREE.DoubleSide }));
25880
+ mesh = new THREE.Mesh(geo, new THREE.MeshPhongMaterial({ specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, vertexColors: true, side: THREE.DoubleSide }));
25876
25881
 
25877
25882
  if(ic.mdl) ic.mdl.add(mesh);
25878
25883
  }
@@ -29283,7 +29288,8 @@ class Surface {
29283
29288
  specular: ic.frac,
29284
29289
  shininess: 0, //10, //30,
29285
29290
  emissive: ic.emissive,
29286
- vertexColors: THREE.VertexColors,
29291
+ //vertexColors: THREE.VertexColors,
29292
+ vertexColors: true,
29287
29293
  wireframe: wireframe,
29288
29294
  opacity: opacity,
29289
29295
  transparent: true,
@@ -29350,7 +29356,8 @@ class Surface {
29350
29356
  specular: ic.frac,
29351
29357
  shininess: 20, //10, //30,
29352
29358
  emissive: ic.emissive,
29353
- vertexColors: THREE.VertexColors,
29359
+ //vertexColors: THREE.VertexColors,
29360
+ vertexColors: true,
29354
29361
  wireframe: wireframe,
29355
29362
  opacity: opacity,
29356
29363
  transparent: true,
@@ -29628,7 +29635,7 @@ class ApplyClbonds {
29628
29635
 
29629
29636
  if (options.clbonds.toLowerCase() === 'yes' && options.chemicals !== 'nothing') {
29630
29637
  let color = '#006400';
29631
- let colorObj = me.parasCls.thr(0x006400);
29638
+ me.parasCls.thr(0x006400);
29632
29639
 
29633
29640
  ic.lines['clbond'] = [];
29634
29641
  ic.residuesHashClbonds = {};
@@ -29647,6 +29654,8 @@ class ApplyClbonds {
29647
29654
  line.color = color;
29648
29655
  line.dashed = false;
29649
29656
 
29657
+ line.radius = ic.crosslinkRadius;
29658
+
29650
29659
  line.serial1 = ic.clbondResid2serial[resid0 + ',' + resid1];
29651
29660
  line.serial2 = ic.clbondResid2serial[resid1 + ',' + resid0];
29652
29661
 
@@ -29656,7 +29665,7 @@ class ApplyClbonds {
29656
29665
  line.position2 = ic.atoms[line.serial2].coord;
29657
29666
 
29658
29667
  ic.lines['clbond'].push(line);
29659
- ic.cylinderCls.createCylinder(line.position1, line.position2, ic.crosslinkRadius, colorObj);
29668
+ //ic.cylinderCls.createCylinder(line.position1, line.position2, ic.crosslinkRadius, colorObj);
29660
29669
 
29661
29670
  // show stick for these two residues
29662
29671
  let residueAtoms = {};
@@ -29717,6 +29726,117 @@ class ApplyClbonds {
29717
29726
  }
29718
29727
  }
29719
29728
 
29729
+ /**
29730
+ * @author Jiyao Wang <wangjiy@ncbi.nlm.nih.gov> / https://github.com/ncbi/icn3d
29731
+ */
29732
+
29733
+ class ApplyMissingRes {
29734
+ constructor(icn3d) {
29735
+ this.icn3d = icn3d;
29736
+ }
29737
+
29738
+ applyMissingResOptions(options) { let ic = this.icn3d; ic.icn3dui;
29739
+
29740
+ if(!ic.bCalcMissingRes) {
29741
+ // find all bonds to chemicals
29742
+ ic.missingResPnts = {};
29743
+ ic.missingResResid2serial = {};
29744
+
29745
+ this.applyMissingResOptions_base();
29746
+
29747
+ ic.bCalcMissingRes = true;
29748
+ }
29749
+
29750
+ ic.lines['missingres'] = [];
29751
+
29752
+ if(ic.structures) {
29753
+ let strucArray = Object.keys(ic.structures);
29754
+ for(let i = 0, il = strucArray.length; i < il; ++i) {
29755
+ let struc = strucArray[i];
29756
+ if(!ic.missingResPnts[struc]) continue;
29757
+
29758
+ for(let j = 0, jl = ic.missingResPnts[struc].length; j < jl; j += 2) {
29759
+ let resid0 = ic.missingResPnts[struc][j];
29760
+ let resid1 = ic.missingResPnts[struc][j+1];
29761
+
29762
+ let line = {};
29763
+
29764
+ line.dashed = true;
29765
+
29766
+ line.serial1 = ic.missingResResid2serial[resid0 + ',' + resid1];
29767
+ line.serial2 = ic.missingResResid2serial[resid1 + ',' + resid0];
29768
+
29769
+ line.color = "#" + ic.atoms[line.serial1].color.getHexString();
29770
+
29771
+ line.radius = ic.coilWidth;
29772
+
29773
+ if(!ic.dAtoms.hasOwnProperty(line.serial1) || !ic.dAtoms.hasOwnProperty(line.serial2)) continue;
29774
+
29775
+ line.position1 = ic.atoms[line.serial1].coord;
29776
+ line.position2 = ic.atoms[line.serial2].coord;
29777
+
29778
+ ic.lines['missingres'].push(line);
29779
+ } // for j
29780
+ } // for i
29781
+ } // if
29782
+ }
29783
+
29784
+ applyMissingResOptions_base(type) { let ic = this.icn3d; ic.icn3dui;
29785
+ let misingResArray = [];
29786
+ for(let chainid in ic.chainsSeq) {
29787
+ let bStart = false;
29788
+ let startResid, currResid, prevResid;
29789
+ let bCurrCoord, bPrevCoord = false;
29790
+ for(let i = 0, il = ic.chainsSeq[chainid].length; i < il; ++i) {
29791
+ currResid = chainid + '_' + ic.chainsSeq[chainid][i].resi;
29792
+
29793
+ if(ic.residues.hasOwnProperty(currResid)) {
29794
+ bStart = true;
29795
+
29796
+ bCurrCoord = true;
29797
+ }
29798
+ else {
29799
+ bCurrCoord = false;
29800
+ }
29801
+
29802
+ if(!bCurrCoord && bPrevCoord) {
29803
+ startResid = prevResid;
29804
+ }
29805
+ else if(bStart && startResid && bCurrCoord && !bPrevCoord) {
29806
+ misingResArray.push(startResid);
29807
+ misingResArray.push(currResid);
29808
+
29809
+ startResid = undefined;
29810
+ }
29811
+
29812
+ bPrevCoord = bCurrCoord;
29813
+ prevResid = currResid;
29814
+ }
29815
+ }
29816
+
29817
+ for(let i = 0, il = misingResArray.length; i < il; i += 2) {
29818
+ let resid0 = misingResArray[i];
29819
+ let resid1 = misingResArray[i + 1];
29820
+
29821
+ let structure = resid0.substr(0, resid0.indexOf('_'));
29822
+ resid0.substr(0, resid1.indexOf('_'));
29823
+
29824
+ let atom0 = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[resid0]);
29825
+ let atom1 = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[resid1]);
29826
+
29827
+ // one residue may have different atom for different clbond
29828
+ if(atom0 && atom1) {
29829
+ if(ic.missingResPnts[structure] === undefined) ic.missingResPnts[structure] = [];
29830
+ ic.missingResPnts[structure].push(resid0);
29831
+ ic.missingResPnts[structure].push(resid1);
29832
+
29833
+ ic.missingResResid2serial[resid0 + ',' + resid1] = atom0.serial;
29834
+ ic.missingResResid2serial[resid1 + ',' + resid0] = atom1.serial;
29835
+ }
29836
+ } // for i
29837
+ }
29838
+ }
29839
+
29720
29840
  /**
29721
29841
  * @author Jiyao Wang <wangjiy@ncbi.nlm.nih.gov> / https://github.com/ncbi/icn3d
29722
29842
  */
@@ -30356,7 +30476,7 @@ class ApplySsbonds {
30356
30476
 
30357
30477
  let line = {};
30358
30478
  line.color = color;
30359
- line.dashed = true;
30479
+ line.dashed = false;
30360
30480
 
30361
30481
  // each Cys has two S atoms
30362
30482
  let serial1Array = [], serial2Array = [];
@@ -30457,14 +30577,17 @@ class ApplySsbonds {
30457
30577
  //if(ic.lines['ssbond'] === undefined) ic.lines['ssbond'] = [];
30458
30578
  ic.lines['ssbond'].push(line);
30459
30579
 
30460
- // create bonds for disulfide bonds
30461
- ic.cylinderCls.createCylinder(line.position1, line.position2, ic.cylinderRadius, colorObj);
30462
-
30463
30580
  // show ball and stick for these two residues
30464
30581
  let residueAtoms;
30465
30582
  residueAtoms = me.hashUtilsCls.unionHash(residueAtoms, ic.residues[res1]);
30466
30583
  residueAtoms = me.hashUtilsCls.unionHash(residueAtoms, ic.residues[res2]);
30467
30584
 
30585
+ let atom = ic.firstAtomObjCls.getFirstAtomObj(residueAtoms);
30586
+ let style = (atom.style == 'lines') ? 'lines' : 'stick';
30587
+
30588
+ // create bonds for disulfide bonds
30589
+ if(atom.style != 'lines') ic.cylinderCls.createCylinder(line.position1, line.position2, ic.cylinderRadius, colorObj);
30590
+
30468
30591
  // show side chains for the selected atoms
30469
30592
  let atoms = me.hashUtilsCls.intHash(residueAtoms, ic.sidec);
30470
30593
  // let calpha_atoms = me.hashUtilsCls.intHash(residueAtoms, ic.calphas);
@@ -30473,7 +30596,7 @@ class ApplySsbonds {
30473
30596
 
30474
30597
  // draw sidec separatedly
30475
30598
  for(let j in atoms) {
30476
- ic.atoms[j].style2 = 'stick';
30599
+ ic.atoms[j].style2 = style;
30477
30600
  }
30478
30601
  } // for(let i = 0,
30479
30602
  } // for(let s = 0,
@@ -32694,6 +32817,9 @@ class Alternate {
32694
32817
  }
32695
32818
 
32696
32819
  if(ic.scene) {
32820
+ // https://github.com/gkjohnson/three-gpu-pathtracer/blob/main/example/basic.js
32821
+ ic.renderer.outputEncoding = THREE.sRGBEncoding;
32822
+
32697
32823
  ic.renderer.render(ic.scene, cam);
32698
32824
  }
32699
32825
  }
@@ -39946,26 +40072,26 @@ class AddTrack {
39946
40072
  endColorStr = this.getExonColor(startExon.rangeStart, startExon.rangeEnd, to);
39947
40073
 
39948
40074
  colorGradient = startColorStr + ' 0%, #FFF 50%, ' + endColorStr + ' 100%';
39949
- htmlTmp2 += this.getExonHtml(startExon.exonIndex, colorGradient, startExon.from, endExon.to, startExon.genomeRange);
40075
+ htmlTmp2 += this.getExonHtml(startExon.exonIndex, colorGradient, startExon.from, endExon.to, startExon.genomeRange, chnid, simpTitle);
39950
40076
  }
39951
40077
  else {
39952
40078
  if(startExon) {
39953
40079
  startColorStr = this.getExonColor(startExon.rangeStart, startExon.rangeEnd, from);
39954
40080
 
39955
40081
  colorGradient = startColorStr + ' 0%, #FFF 50%, #00F 100%';
39956
- htmlTmp2 += this.getExonHtml(startExon.exonIndex, colorGradient, startExon.from, startExon.rangeEnd, startExon.genomeRange);
40082
+ htmlTmp2 += this.getExonHtml(startExon.exonIndex, colorGradient, startExon.from, startExon.rangeEnd, startExon.genomeRange, chnid, simpTitle);
39957
40083
  }
39958
40084
 
39959
40085
  if(startExon && endExon) {
39960
40086
  for(let j = startExon.exonIndex + 1; j < endExon.exonIndex; ++j) {
39961
40087
  colorGradient = '#F00 0%, #FFF 50%, #00F 100%';
39962
- htmlTmp2 += this.getExonHtml(j, colorGradient, exonArray[j].resStart, exonArray[j].resEnd, exonArray[j].genomeRange);
40088
+ htmlTmp2 += this.getExonHtml(j, colorGradient, exonArray[j].resStart, exonArray[j].resEnd, exonArray[j].genomeRange, chnid, simpTitle);
39963
40089
  }
39964
40090
 
39965
40091
  endColorStr = this.getExonColor(endExon.rangeStart, endExon.rangeEnd, to);
39966
40092
 
39967
40093
  colorGradient = '#F00 0%, #FFF 50%, ' + endColorStr + ' 100%';
39968
- htmlTmp2 += this.getExonHtml(endExon.exonIndex, colorGradient, endExon.rangeStart, endExon.to, endExon.genomeRange);
40094
+ htmlTmp2 += this.getExonHtml(endExon.exonIndex, colorGradient, endExon.rangeStart, endExon.to, endExon.genomeRange, chnid, simpTitle);
39969
40095
  }
39970
40096
  }
39971
40097
 
@@ -39999,8 +40125,8 @@ class AddTrack {
39999
40125
  }
40000
40126
  }
40001
40127
 
40002
- getExonHtml(exonIndex, colorGradient, from, to, genomeRange) { let ic = this.icn3d; ic.icn3dui;
40003
- return '<div style="display:inline-block; color:white!important; width:' + Math.round(ic.seqAnnWidth *(to - from + 1) /(ic.maxAnnoLength + ic.nTotalGap)) + 'px;" class="icn3d-seqTitle icn3d-link icn3d-blue" title="Exon ' + (exonIndex + 1) + ': ' + genomeRange + ' genomic interval" anno="sequence" title="' + (exonIndex + 1) + '"><div style="height: 12px; border: 1px solid #000; background: linear-gradient(to right, ' + colorGradient + ');"></div></div>';
40128
+ getExonHtml(exonIndex, colorGradient, from, to, genomeRange, chainid, simpTitle) { let ic = this.icn3d; ic.icn3dui;
40129
+ return '<div style="display:inline-block; color:white!important; width:' + Math.round(ic.seqAnnWidth *(to - from + 1) /(ic.maxAnnoLength + ic.nTotalGap)) + 'px;" class="icn3d-seqTitle icn3d-link icn3d-blue" domain="' + (exonIndex + 1) + '" from="' + from + '" to="' + to + '" setname="' + simpTitle + ', Exon ' + (exonIndex + 1) + '" title="Exon ' + (exonIndex + 1) + ': ' + genomeRange + ' genomic interval" anno="sequence" chain="' + chainid + '"><div style="height: 12px; border: 1px solid #000; background: linear-gradient(to right, ' + colorGradient + ');"></div></div>';
40004
40130
  }
40005
40131
 
40006
40132
  getExonColor(start, end, pos) { let ic = this.icn3d; ic.icn3dui;
@@ -45303,7 +45429,7 @@ class LineGraph {
45303
45429
  let thisClass = this;
45304
45430
 
45305
45431
  // round 1, 16 templates
45306
- 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'];
45432
+ 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'];
45307
45433
 
45308
45434
  // round 2
45309
45435
  ic.refpdbHash = {};
@@ -45322,52 +45448,55 @@ class LineGraph {
45322
45448
  ic.refpdbHash['1LaminAC_1ifrA_human'] = ['LaminAC_1ifrA_human'];
45323
45449
  ic.refpdbHash['1IsdA_2iteA_bacteria'] = ['IsdA_2iteA_bacteria'];
45324
45450
  ic.refpdbHash['1TCRa_6jxrm_human_C1-n2'] = ['TCRa_6jxrm_human_C1-n2'];
45325
- ic.refpdbHash['1CD19_6al5A_human_C2orV-n1'] = ['CD19_6al5A_human_C2orV-n1'];
45451
+ ic.refpdbHash['1CD19_6al5A_human_C2orV-n1'] = ['CD19_6al5A_human_C2orV-n1'];
45452
+ ic.refpdbHash['1CD28_1yjdC_human_V'] = ['CD28_1yjdC_human_V'];
45326
45453
 
45327
45454
  // use known ref structure
45328
- ic.refpdbHash['5ESV'] = ['FAB-HEAVY_5esv_V-n1', 'FAB-LIGHT_5esv_V-n1', 'FAB-HEAVY_5esv_C1-n2', 'FAB-LIGHT_5esv_C1-n2'];
45329
- ic.refpdbHash['8GUY'] = ['InsulinR_8guyE_human_FN3-n1', 'InsulinR_8guyE_human_FN3-n2'];
45330
- ic.refpdbHash['6JXR'] = ['TCRa_6jxrm_human_V-n1', 'TCRa_6jxrm_human_C1-n2'];
45331
- ic.refpdbHash['1HNF'] = ['CD2_1hnfA_human_V-n1', 'CD2_1hnfA_human_C2-n2'];
45332
- ic.refpdbHash['7TZG'] = ['LAG3_7tzgD_human_V-n1', 'LAG3_7tzgD_human_C2-n2'];
45333
- ic.refpdbHash['6PY8'] = ['RBPJ_6py8C_human_Unk-n1', 'RBPJ_6py8C_human_Unk-n2'];
45334
- ic.refpdbHash['1BQU'] = ['IL6Rb_1bquB_human_FN3-n2', 'IL6Rb_1bquB_human_FN3-n3'];
45335
-
45336
- ic.refpdbHash['1R4X'] = ['CoAtomerGamma1_1r4xA_human'];
45337
- ic.refpdbHash['6OIL'] = ['VISTA_6oilA_human_V'];
45338
- ic.refpdbHash['2ZXE'] = ['NaKATPaseTransporterBeta_2zxeB_spurdogshark'];
45339
- ic.refpdbHash['1I8A'] = ['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'];
45340
- ic.refpdbHash['2FWU'] = ['NaCaExchanger_2fwuA_dog_n2'];
45341
- ic.refpdbHash['4JQI'] = ['BArrestin1_4jqiA_rat_n1'];
45342
- ic.refpdbHash['1NBQ'] = ['JAM1_1nbqA_human_VorIset-n2'];
45343
- ic.refpdbHash['1O75'] = ['TP47_1o75A_bacteria'];
45344
- ic.refpdbHash['7PHR'] = ['MHCIa_7phrH_human_C1'];
45345
- ic.refpdbHash['2IIJ'] = ['ASF1A_2iijA_human'];
45346
- ic.refpdbHash['4Z18'] = ['PDL1_4z18B_human_V-n1'];
45347
- ic.refpdbHash['1T6V'] = ['VNAR_1t6vN_shark_V'];
45348
- ic.refpdbHash['2O6C'] = ['TP34_2o6cA_bacteria'];
45349
- ic.refpdbHash['3KYS'] = ['TEAD1_3kysC_human'];
45350
- ic.refpdbHash['7PHR'] = ['B2Microglobulin_7phrL_human_C1'];
45351
- ic.refpdbHash['2AW2'] = ['BTLA_2aw2A_human_Iset'];
45352
- ic.refpdbHash['1HL5'] = ['CuZnSuperoxideDismutase_1hl5C_human'];
45353
- ic.refpdbHash['1WF5'] = ['Sidekick2_1wf5A_human_FN3-n7'];
45354
- ic.refpdbHash['5J0B'] = ['Siglec3_5j0bB_human_C2-n2'];
45355
- ic.refpdbHash['1IFR'] = ['LaminAC_1ifrA_human'];
45356
- ic.refpdbHash['Q7Z7D3'] = ['VTCN1_Q7Z7D3_human_V-n2'];
45357
- ic.refpdbHash['4ZQK'] = ['PD1_4zqkB_human_V'];
45358
- ic.refpdbHash['2DM3'] = ['Palladin_2dm3A_human_Iset-n1'];
45359
- ic.refpdbHash['2ITE'] = ['IsdA_2iteA_bacteria'];
45360
- ic.refpdbHash['1XAK'] = ['ORF7a_1xakA_virus'];
45361
- ic.refpdbHash['4ZT1'] = ['ECadherin_4zt1A_human_n2'];
45362
- ic.refpdbHash['1LMI'] = ['MPT63_1lmiA_bacteria'];
45363
- ic.refpdbHash['1CD8'] = ['CD8a_1cd8A_human_V'];
45364
- ic.refpdbHash['3S97'] = ['Contactin1_3s97C_human_C2-n2'];
45365
- ic.refpdbHash['1AXI'] = ['GHR_1axiB_human_FN3-n1'];
45366
- ic.refpdbHash['6X4G'] = ['ICOS_6x4gA_human_V'];
45367
- ic.refpdbHash['2EE2'] = ['Contactin1_2ee2A_human_FN3-n9'];
45368
- ic.refpdbHash['4UOW'] = ['Titin_4uowM_human_Unk-n152'];
45369
- ic.refpdbHash['6A15'] = ['CD19_6al5A_human_C2orV-n1'];
45370
- ic.refpdbHash['2QKI'] = ['C3_2qkiD_human_n1'];
45455
+ ic.refpdbHash['5ESV_C'] = ['FAB-HEAVY_5esv_V-n1', 'FAB-HEAVY_5esv_C1-n2'];
45456
+ ic.refpdbHash['5ESV_D'] = ['FAB-LIGHT_5esv_V-n1', 'FAB-LIGHT_5esv_C1-n2'];
45457
+ ic.refpdbHash['8GUY_E'] = ['InsulinR_8guyE_human_FN3-n1', 'InsulinR_8guyE_human_FN3-n2'];
45458
+ ic.refpdbHash['6JXR_m'] = ['TCRa_6jxrm_human_V-n1', 'TCRa_6jxrm_human_C1-n2'];
45459
+ ic.refpdbHash['1HNF_A'] = ['CD2_1hnfA_human_V-n1', 'CD2_1hnfA_human_C2-n2'];
45460
+ ic.refpdbHash['7TZG_D'] = ['LAG3_7tzgD_human_V-n1', 'LAG3_7tzgD_human_C2-n2'];
45461
+ ic.refpdbHash['6PY8_C'] = ['RBPJ_6py8C_human_Unk-n1', 'RBPJ_6py8C_human_Unk-n2'];
45462
+ ic.refpdbHash['1BQU_B'] = ['IL6Rb_1bquB_human_FN3-n2', 'IL6Rb_1bquB_human_FN3-n3'];
45463
+
45464
+ ic.refpdbHash['1R4X_A'] = ['CoAtomerGamma1_1r4xA_human'];
45465
+ ic.refpdbHash['6OIL_A'] = ['VISTA_6oilA_human_V'];
45466
+ ic.refpdbHash['2ZXE_B'] = ['NaKATPaseTransporterBeta_2zxeB_spurdogshark'];
45467
+ ic.refpdbHash['1I8A_A'] = ['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'];
45468
+ ic.refpdbHash['2FWU_A'] = ['NaCaExchanger_2fwuA_dog_n2'];
45469
+ ic.refpdbHash['4JQI_A'] = ['BArrestin1_4jqiA_rat_n1'];
45470
+ ic.refpdbHash['1NBQ_A'] = ['JAM1_1nbqA_human_VorIset-n2'];
45471
+ ic.refpdbHash['1O75_A'] = ['TP47_1o75A_bacteria'];
45472
+ ic.refpdbHash['7PHR_H'] = ['MHCIa_7phrH_human_C1'];
45473
+ ic.refpdbHash['2IIJ_A'] = ['ASF1A_2iijA_human'];
45474
+ ic.refpdbHash['4Z18_B'] = ['PDL1_4z18B_human_V-n1'];
45475
+ ic.refpdbHash['1T6V_N'] = ['VNAR_1t6vN_shark_V'];
45476
+ ic.refpdbHash['2O6C_A'] = ['TP34_2o6cA_bacteria'];
45477
+ ic.refpdbHash['3KYS_C'] = ['TEAD1_3kysC_human'];
45478
+ ic.refpdbHash['7PHR_L'] = ['B2Microglobulin_7phrL_human_C1'];
45479
+ ic.refpdbHash['2AW2_A'] = ['BTLA_2aw2A_human_Iset'];
45480
+ ic.refpdbHash['1HL5_C'] = ['CuZnSuperoxideDismutase_1hl5C_human'];
45481
+ ic.refpdbHash['1WF5_A'] = ['Sidekick2_1wf5A_human_FN3-n7'];
45482
+ ic.refpdbHash['5J0B_B'] = ['Siglec3_5j0bB_human_C2-n2'];
45483
+ ic.refpdbHash['1IFR_A'] = ['LaminAC_1ifrA_human'];
45484
+ ic.refpdbHash['Q7Z7D3_A'] = ['VTCN1_Q7Z7D3_human_V-n2'];
45485
+ ic.refpdbHash['4ZQK_B'] = ['PD1_4zqkB_human_V'];
45486
+ ic.refpdbHash['2DM3_A'] = ['Palladin_2dm3A_human_Iset-n1'];
45487
+ ic.refpdbHash['2ITE_A'] = ['IsdA_2iteA_bacteria'];
45488
+ ic.refpdbHash['1XAK_A'] = ['ORF7a_1xakA_virus'];
45489
+ ic.refpdbHash['4ZT1_A'] = ['ECadherin_4zt1A_human_n2'];
45490
+ ic.refpdbHash['1LMI_A'] = ['MPT63_1lmiA_bacteria'];
45491
+ ic.refpdbHash['1CD8_A'] = ['CD8a_1cd8A_human_V'];
45492
+ ic.refpdbHash['3S97_C'] = ['Contactin1_3s97C_human_C2-n2'];
45493
+ ic.refpdbHash['1AXI_B'] = ['GHR_1axiB_human_FN3-n1'];
45494
+ ic.refpdbHash['6X4G_A'] = ['ICOS_6x4gA_human_V'];
45495
+ ic.refpdbHash['2EE2_A'] = ['Contactin1_2ee2A_human_FN3-n9'];
45496
+ ic.refpdbHash['4UOW_M'] = ['Titin_4uowM_human_Unk-n152'];
45497
+ ic.refpdbHash['6A15_A'] = ['CD19_6al5A_human_C2orV-n1'];
45498
+ ic.refpdbHash['2QKI_D'] = ['C3_2qkiD_human_n1'];
45499
+ ic.refpdbHash['1YJD_C'] = ['CD28_1yjdC_human_V'];
45371
45500
 
45372
45501
  let pdbAjaxArray = [];
45373
45502
  for(let k = 0, kl = ic.refpdbArray.length; k < kl; ++k) {
@@ -45626,12 +45755,12 @@ class LineGraph {
45626
45755
  let domainid = domainidpairArray[i].substr(0, domainidpairArray[i].indexOf('|'));
45627
45756
  let refpdbname = domainidpairArray[i].substr(domainidpairArray[i].indexOf('|') + 1);
45628
45757
  //let chainid = domainid.split('-')[0];
45629
-
45758
+
45630
45759
  if(!bRound1) {
45631
45760
  if(!me.bNode) console.log("refpdbname " + refpdbname + " TM-score: " + queryData[0].score);
45632
45761
  }
45633
45762
  else {
45634
- if(!me.bNode) console.log("refpdbname " + refpdbname + " RMSD: " + queryData[0].super_rmsd);
45763
+ 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));
45635
45764
  }
45636
45765
 
45637
45766
  // Ig-like domains: B (2150, 2150a, 2150b), C (3150, 3250), E (7150, 7250), F (8150, 8250) strands
@@ -45661,11 +45790,14 @@ class LineGraph {
45661
45790
  //if(!(bBstrand && bCstrand && bEstrand && bFstrand && bGstrand)) continue;
45662
45791
  if(!(bBstrand && bCstrand && bEstrand && bFstrand)) {
45663
45792
  if(!me.bNode) console.log("Some of the Ig strands B, C, E, F are missing in the domain " + domainid + "...");
45793
+ if(ic.domainid2refpdbname[domainid]) delete ic.domainid2refpdbname[domainid];
45664
45794
  continue;
45665
45795
  }
45666
45796
  }
45667
45797
 
45668
45798
  if(!bRound1) {
45799
+ console.log("domainid: " + domainid);
45800
+
45669
45801
  if(!domainid2score.hasOwnProperty(domainid) || queryData[0].score > domainid2score[domainid]) {
45670
45802
  domainid2score[domainid] = queryData[0].score;
45671
45803
 
@@ -45676,8 +45808,10 @@ class LineGraph {
45676
45808
  }
45677
45809
  }
45678
45810
  else {
45679
- if(!domainid2score.hasOwnProperty(domainid) || queryData[0].super_rmsd < domainid2score[domainid]) {
45680
- domainid2score[domainid] = queryData[0].super_rmsd;
45811
+ let mixScore = 10 / queryData[0].super_rmsd + queryData[0].num_seg / 5;
45812
+
45813
+ if(!domainid2score.hasOwnProperty(domainid) || mixScore > domainid2score[domainid]) {
45814
+ domainid2score[domainid] = mixScore;
45681
45815
 
45682
45816
  ic.domainid2refpdbname[domainid] = refpdbname;
45683
45817
  domainid2segs[domainid] = queryData[0].segs;
@@ -45697,11 +45831,14 @@ class LineGraph {
45697
45831
  for(let domainid in ic.domainid2refpdbname) {
45698
45832
  let pdbAjaxArray = [];
45699
45833
  let refpdbname = ic.domainid2refpdbname[domainid];
45700
- let pdbid = domainid.substr(0, domainid.indexOf('_'));
45834
+ //let pdbid = domainid.substr(0, domainid.indexOf('_'));
45835
+ let chainid = domainid.substr(0, domainid.indexOf('-'));
45701
45836
 
45702
- if(ic.refpdbHash.hasOwnProperty(pdbid)) {
45837
+ //if(ic.refpdbHash.hasOwnProperty(pdbid)) {
45838
+ if(ic.refpdbHash.hasOwnProperty(chainid)) {
45703
45839
  // use itself as the ref structure
45704
- refpdbname = pdbid;
45840
+ //refpdbname = pdbid;
45841
+ refpdbname = chainid;
45705
45842
 
45706
45843
  if(!me.bNode) console.log("Adjusted refpdbname for domainid " + domainid + ": " + refpdbname);
45707
45844
  }
@@ -45743,11 +45880,11 @@ class LineGraph {
45743
45880
  dataArray3 = await allPromise;
45744
45881
 
45745
45882
  await thisClass.parseAlignData(dataArray3, domainidpairArray3);
45746
-
45883
+
45747
45884
  // end of round 2
45748
45885
  return;
45749
45886
  }
45750
-
45887
+
45751
45888
  // combine domainid into chainid
45752
45889
  let processedChainid = {};
45753
45890
  for(let domainid in ic.domainid2refpdbname) {
@@ -45854,17 +45991,18 @@ class LineGraph {
45854
45991
 
45855
45992
  // A-: 10xx
45856
45993
  // A: 11xx
45994
+ // A+ continue A
45857
45995
  // A': 12xx
45858
- // A+: 13xx
45859
45996
  // B: 21xx
45860
45997
  // C: 32xx
45861
45998
  // C': 42xx
45862
45999
  // C'': 51xx, 52xx
45863
46000
  // D: 61xx
45864
46001
  // E: 71xx
46002
+ // E+: continue E
45865
46003
  // F: 82xx
45866
46004
  // G: 91xx, 92xx
45867
- // G+: 94xx
46005
+ // G+: continue G
45868
46006
 
45869
46007
  // if(refnum < 100) return " " + oriRefnum;
45870
46008
  // else if(refnum >= 100 && refnum < 1000) {
@@ -45874,11 +46012,10 @@ class LineGraph {
45874
46012
  if(refnum < 900) return undefined;
45875
46013
  else if(refnum >= 900 && refnum < 1000) return " " + oriRefnum;
45876
46014
  else if(refnum >= 1000 && refnum < 1100) return "A-" + oriRefnum;
45877
- else if(refnum >= 1100 && refnum < 1200) return "A" + oriRefnum;
46015
+ else if(refnum >= 1100 && refnum < 1200) return "A" + oriRefnum; // could be A+
45878
46016
  else if(refnum >= 1200 && refnum < 1300) return "A'" + oriRefnum;
45879
- //else if(refnum >= 1300 && refnum < 1400) return "A*" + oriRefnum;
45880
- else if(refnum >= 1300 && refnum < 1400) return "A+" + oriRefnum;
45881
- else if(refnum >= 1400 && refnum < 2000) {
46017
+ //else if(refnum >= 1300 && refnum < 1400) return "A+" + oriRefnum;
46018
+ else if(refnum >= 1300 && refnum < 2000) {
45882
46019
  if(prevStrand && prevStrand.substr(0, 1) == 'A') {
45883
46020
  return prevStrand + oriRefnum;
45884
46021
  }
@@ -45891,12 +46028,11 @@ class LineGraph {
45891
46028
  else if(refnum >= 4000 && refnum < 5000) return "C'" + oriRefnum;
45892
46029
  else if(refnum >= 5000 && refnum < 6000) return "C''" + oriRefnum;
45893
46030
  else if(refnum >= 6000 && refnum < 7000) return "D" + oriRefnum;
45894
- else if(refnum >= 7000 && refnum < 8000) return "E" + oriRefnum;
46031
+ else if(refnum >= 7000 && refnum < 8000) return "E" + oriRefnum; // could be E+
45895
46032
  else if(refnum >= 8000 && refnum < 9000) return "F" + oriRefnum;
45896
- else if(refnum >= 9000 && refnum < 9400) return "G" + oriRefnum;
45897
- //else if(refnum >= 9400 && refnum < 9500) return "G*" + oriRefnum;
45898
- else if(refnum >= 9400 && refnum < 9500) return "G+" + oriRefnum;
45899
- else if(refnum >= 9500) return "G" + oriRefnum;
46033
+ else if(refnum >= 9000 && refnum < 9300) return "G" + oriRefnum; // could be G+
46034
+ //else if(refnum >= 9400 && refnum < 9500) return "G+" + oriRefnum;
46035
+ else if(refnum >= 9300) return "G" + oriRefnum;
45900
46036
  }
45901
46037
 
45902
46038
  async parseCustomRefFile(data) { let ic = this.icn3d; ic.icn3dui;
@@ -46020,9 +46156,8 @@ class LineGraph {
46020
46156
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.chains[chnid]);
46021
46157
  if(ic.proteins.hasOwnProperty(atom.serial)) {
46022
46158
  for(let i = 0; i < ic.chainsSeq[chnid].length; ++i) {
46023
- const resid = chnid + '_' + ic.chainsSeq[chnid][i].resi + '_' + ic.chainsSeq[chnid][i].name;
46024
-
46025
- refData += "'" + resid + "': '" + resid2refnum[resid] + "',\n";
46159
+ const resid = chnid + '_' + ic.chainsSeq[chnid][i].resi + '_' + ic.chainsSeq[chnid][i].name;
46160
+ refData += '"' + resid + '": "' + resid2refnum[resid] + '",\n';
46026
46161
  }
46027
46162
  }
46028
46163
  }
@@ -47387,22 +47522,16 @@ class ViewInterPairs {
47387
47522
  }
47388
47523
 
47389
47524
  if(ic.bD3 === undefined) {
47390
- //var url = "https://d3js.org/d3.v4.min.js";
47391
- var url = "https://www.ncbi.nlm.nih.gov/Structure/icn3d/script/d3v4-force-all.min.js";
47525
+ //let url = "https://d3js.org/d3.v4.min.js";
47526
+ let url = "https://www.ncbi.nlm.nih.gov/Structure/icn3d/script/d3v4-force-all.min.js";
47392
47527
  await me.getAjaxPromise(url, 'script');
47393
47528
 
47394
47529
  ic.bD3 = true;
47395
-
47396
- $("#" + me.svgid).empty();
47397
- me.htmlCls.dialogCls.openDlg('dl_graph', 'Force-directed graph');
47398
- ic.drawGraphCls.drawGraph(ic.graphStr, ic.pre + 'dl_graph');
47399
- /// if(ic.deferredGraphinteraction !== undefined) ic.deferredGraphinteraction.resolve();
47400
- }
47401
- else {
47402
- $("#" + me.svgid).empty();
47403
- me.htmlCls.dialogCls.openDlg('dl_graph', 'Force-directed graph');
47404
- ic.drawGraphCls.drawGraph(ic.graphStr, ic.pre + 'dl_graph');
47405
47530
  }
47531
+
47532
+ $("#" + me.svgid).empty();
47533
+ me.htmlCls.dialogCls.openDlg('dl_graph', 'Force-directed graph');
47534
+ ic.drawGraphCls.drawGraph(ic.graphStr, ic.pre + 'dl_graph');
47406
47535
  }
47407
47536
 
47408
47537
  return {interactionTypes: interactionTypes.toString(), bondCnt: bondCnt};
@@ -49021,7 +49150,6 @@ class ChainalignParser {
49021
49150
  let ajaxArray = [], indexArray = [], struArray = [];
49022
49151
  let urlalign = me.htmlCls.baseUrl + "vastdyn/vastdyn.cgi";
49023
49152
  let urltmalign = me.htmlCls.baseUrl + "tmalign/tmalign.cgi";
49024
- //let urltmalign = "https://test.ncbi.nlm.nih.gov/Structure/tmalign/tmalign.cgi";
49025
49153
 
49026
49154
  for(let index in ic.afChainIndexHash) {
49027
49155
  let idArray = ic.afChainIndexHash[index].split('_');
@@ -49810,7 +49938,12 @@ class ChainalignParser {
49810
49938
  targetAjax = me.getAjaxPromise(url_t, 'text');
49811
49939
  }
49812
49940
  else {
49813
- url_t = me.htmlCls.baseUrl + "mmdb/mmdb_strview.cgi?v=2&program=icn3d&b=1&s=1&ft=1&bu=" + me.cfg.bu + "&uid=" + structure;
49941
+ let structureTmp = structure;
49942
+ if(structure.length == 5) {
49943
+ structureTmp = structure.substr(0,4);
49944
+ }
49945
+
49946
+ url_t = me.htmlCls.baseUrl + "mmdb/mmdb_strview.cgi?v=2&program=icn3d&b=1&s=1&ft=1&bu=" + me.cfg.bu + "&uid=" + structureTmp;
49814
49947
  if(me.cfg.inpara !== undefined) url_t += me.cfg.inpara;
49815
49948
 
49816
49949
  targetAjax = me.getAjaxPromise(url_t, 'jsonp');
@@ -49887,7 +50020,8 @@ class ChainalignParser {
49887
50020
  }
49888
50021
  else {
49889
50022
  let bNoSeqalign = true;
49890
- hAtomsTmp = await ic.mmdbParserCls.parseMmdbData(queryDataArray[i], targetOrQuery, undefined, undefined, bLastQuery, bNoSeqalign);
50023
+ let pdbid = structArray[i];
50024
+ hAtomsTmp = await ic.mmdbParserCls.parseMmdbData(queryDataArray[i], targetOrQuery, undefined, undefined, bLastQuery, bNoSeqalign, pdbid);
49891
50025
  }
49892
50026
 
49893
50027
  hAtoms = me.hashUtilsCls.unionHash(hAtoms, hAtomsTmp);
@@ -50549,9 +50683,10 @@ class MmdbParser {
50549
50683
  }
50550
50684
  }
50551
50685
 
50552
- async parseMmdbData(data, type, chainid, chainIndex, bLastQuery, bNoTransformNoSeqalign) { let ic = this.icn3d, me = ic.icn3dui;
50686
+ async parseMmdbData(data, type, chainid, chainIndex, bLastQuery, bNoTransformNoSeqalign, pdbidIn) { let ic = this.icn3d, me = ic.icn3dui;
50553
50687
  let hAtoms;
50554
- let pdbid =(data.pdbId !== undefined) ? data.pdbId : data.mmdbId;
50688
+ let pdbid = (data.pdbId !== undefined) ? data.pdbId : data.mmdbId;
50689
+ if(pdbidIn) pdbid = pdbidIn;
50555
50690
 
50556
50691
  this.parseMmdbDataPart1(data, type);
50557
50692
 
@@ -61898,7 +62033,7 @@ class LoadScript {
61898
62033
  }
61899
62034
 
61900
62035
  //When reading a list of commands, apply transformation at the last step.
61901
- renderFinalStep(steps) { let ic = this.icn3d, me = ic.icn3dui;
62036
+ async renderFinalStep(steps) { let ic = this.icn3d, me = ic.icn3dui;
61902
62037
  // enable ic.ParserUtilsCls.hideLoading
61903
62038
  ic.bCommandLoad = false;
61904
62039
 
@@ -63616,6 +63751,15 @@ class FirstAtomObj {
63616
63751
  }
63617
63752
  }
63618
63753
 
63754
+ if(!firstIndex) {
63755
+ for(let i in atomsHash) {
63756
+ if(ic.atoms[i].name == "O3'" || ic.atoms[i].name == "O3*") {
63757
+ firstIndex = i;
63758
+ break;
63759
+ }
63760
+ }
63761
+ }
63762
+
63619
63763
  return (firstIndex !== undefined) ? ic.atoms[firstIndex] : this.getFirstAtomObj(atomsHash);
63620
63764
  }
63621
63765
 
@@ -64121,8 +64265,11 @@ class Delphi {
64121
64265
  let salt = saltArray[1]; //parseFloat(saltArray[1]);
64122
64266
 
64123
64267
  // The values should be string
64124
- $("#" + ic.pre + "delphigsize").val(gsize);
64125
- $("#" + ic.pre + "delphisalt").val(salt);
64268
+ $("#" + ic.pre + "delphi1gsize").val(gsize);
64269
+ $("#" + ic.pre + "delphi1salt").val(salt);
64270
+
64271
+ $("#" + ic.pre + "delphi2gsize").val(gsize);
64272
+ $("#" + ic.pre + "delphi2salt").val(salt);
64126
64273
 
64127
64274
  if(paraArray.length == 7) {
64128
64275
  let surfaceArray = paraArray[4].split(" ");
@@ -64147,11 +64294,11 @@ class Delphi {
64147
64294
  }
64148
64295
 
64149
64296
  async loadDelphiFile(type) { let ic = this.icn3d, me = ic.icn3dui;
64150
- let gsize = $("#" + ic.pre + "delphigsize").val();
64151
- let salt = $("#" + ic.pre + "delphisalt").val();
64152
- let contour =(type == 'delphi2') ? $("#" + ic.pre + "delphicontour2").val() : $("#" + ic.pre + "delphicontour").val();
64297
+ let gsize = (type == 'delphi2') ? $("#" + ic.pre + "delphi2gsize").val() : $("#" + ic.pre + "delphi1gsize").val();
64298
+ let salt = (type == 'delphi2') ? $("#" + ic.pre + "delphi2salt").val() : $("#" + ic.pre + "delphi1gsize").val();
64299
+ let contour = (type == 'delphi2') ? $("#" + ic.pre + "delphicontour2").val() : $("#" + ic.pre + "delphicontour").val();
64153
64300
 
64154
- let bSurface =(type == 'delphi2') ? true: false;
64301
+ let bSurface = (type == 'delphi2') ? true: false;
64155
64302
 
64156
64303
  await this.CalcPhi(gsize, salt, contour, bSurface);
64157
64304
 
@@ -67879,7 +68026,7 @@ class ResizeCanvas {
67879
68026
 
67880
68027
  ic.applyCenterCls.setWidthHeight(width, heightTmp);
67881
68028
 
67882
- if(bDraw === undefined || bDraw) {
68029
+ if(ic.structures && Object.keys(ic.structures).length > 0 && (bDraw === undefined || bDraw)) {
67883
68030
  ic.drawCls.draw();
67884
68031
  }
67885
68032
  }
@@ -71915,7 +72062,7 @@ class iCn3D {
71915
72062
  this.shininess = 40; //30
71916
72063
  this.emissive = 0x111111; //0x000000
71917
72064
 
71918
- this.light1 = 0.6; //1
72065
+ this.light1 = 0.8; //0.6; //1
71919
72066
  this.light2 = 0.4;
71920
72067
  this.light3 = 0.2;
71921
72068
 
@@ -72229,6 +72376,8 @@ class iCn3D {
72229
72376
 
72230
72377
  this.applyCenterCls = new ApplyCenter(this);
72231
72378
  this.applyClbondsCls = new ApplyClbonds(this);
72379
+ this.applyMissingResCls = new ApplyMissingRes(this);
72380
+
72232
72381
  this.applyDisplayCls = new ApplyDisplay(this);
72233
72382
  this.applyMapCls = new ApplyMap(this);
72234
72383
  this.applyOtherCls = new ApplyOther(this);
@@ -72551,7 +72700,7 @@ class iCn3DUI {
72551
72700
  //even when multiple iCn3D viewers are shown together.
72552
72701
  this.pre = this.cfg.divid + "_";
72553
72702
 
72554
- this.REVISION = '3.28.1';
72703
+ this.REVISION = '3.28.2';
72555
72704
 
72556
72705
  // In nodejs, iCn3D defines "window = {navigator: {}}"
72557
72706
  this.bNode = (Object.keys(window).length < 2) ? true : false;
@@ -72757,17 +72906,17 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
72757
72906
  chainidArray.push(domainidArray[i]);
72758
72907
  }
72759
72908
  }
72760
-
72761
- let mmdbafid = '';
72762
- for(let i = 0, il = chainidArray.length; i < il; ++i) {
72763
- if(i > 0) mmdbafid += ',';
72764
- mmdbafid += chainidArray[i].substr(0, chainidArray[i].indexOf('_'));
72765
- }
72766
72909
 
72767
72910
  // realign
72768
72911
  ic.chainidArray = [chain_t].concat(chainidArray);
72769
72912
  ic.chainidArray = ic.chainalignParserCls.addPostfixForChainids(ic.chainidArray);
72770
72913
 
72914
+ let mmdbafid = '';
72915
+ for(let i = 0, il = ic.chainidArray.length; i < il; ++i) {
72916
+ if(i > 0) mmdbafid += ',';
72917
+ mmdbafid += ic.chainidArray[i].substr(0, ic.chainidArray[i].indexOf('_'));
72918
+ }
72919
+
72771
72920
  me.htmlCls.clickMenuCls.setLogCmd('resdef ' + me.cfg.resdef, true);
72772
72921
 
72773
72922
  ic.loadCmd = 'vast_search_chainid ' + ic.chainidArray;