icn3d 3.28.7 → 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>";
@@ -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>";
@@ -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;
@@ -45629,12 +45755,12 @@ class LineGraph {
45629
45755
  let domainid = domainidpairArray[i].substr(0, domainidpairArray[i].indexOf('|'));
45630
45756
  let refpdbname = domainidpairArray[i].substr(domainidpairArray[i].indexOf('|') + 1);
45631
45757
  //let chainid = domainid.split('-')[0];
45632
-
45758
+
45633
45759
  if(!bRound1) {
45634
45760
  if(!me.bNode) console.log("refpdbname " + refpdbname + " TM-score: " + queryData[0].score);
45635
45761
  }
45636
45762
  else {
45637
- 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));
45638
45764
  }
45639
45765
 
45640
45766
  // Ig-like domains: B (2150, 2150a, 2150b), C (3150, 3250), E (7150, 7250), F (8150, 8250) strands
@@ -45682,8 +45808,10 @@ class LineGraph {
45682
45808
  }
45683
45809
  }
45684
45810
  else {
45685
- if(!domainid2score.hasOwnProperty(domainid) || queryData[0].super_rmsd < domainid2score[domainid]) {
45686
- 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;
45687
45815
 
45688
45816
  ic.domainid2refpdbname[domainid] = refpdbname;
45689
45817
  domainid2segs[domainid] = queryData[0].segs;
@@ -46028,9 +46156,8 @@ class LineGraph {
46028
46156
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.chains[chnid]);
46029
46157
  if(ic.proteins.hasOwnProperty(atom.serial)) {
46030
46158
  for(let i = 0; i < ic.chainsSeq[chnid].length; ++i) {
46031
- const resid = chnid + '_' + ic.chainsSeq[chnid][i].resi + '_' + ic.chainsSeq[chnid][i].name;
46032
-
46033
- 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';
46034
46161
  }
46035
46162
  }
46036
46163
  }
@@ -47395,22 +47522,16 @@ class ViewInterPairs {
47395
47522
  }
47396
47523
 
47397
47524
  if(ic.bD3 === undefined) {
47398
- //var url = "https://d3js.org/d3.v4.min.js";
47399
- 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";
47400
47527
  await me.getAjaxPromise(url, 'script');
47401
47528
 
47402
47529
  ic.bD3 = true;
47403
-
47404
- $("#" + me.svgid).empty();
47405
- me.htmlCls.dialogCls.openDlg('dl_graph', 'Force-directed graph');
47406
- ic.drawGraphCls.drawGraph(ic.graphStr, ic.pre + 'dl_graph');
47407
- /// if(ic.deferredGraphinteraction !== undefined) ic.deferredGraphinteraction.resolve();
47408
- }
47409
- else {
47410
- $("#" + me.svgid).empty();
47411
- me.htmlCls.dialogCls.openDlg('dl_graph', 'Force-directed graph');
47412
- ic.drawGraphCls.drawGraph(ic.graphStr, ic.pre + 'dl_graph');
47413
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');
47414
47535
  }
47415
47536
 
47416
47537
  return {interactionTypes: interactionTypes.toString(), bondCnt: bondCnt};
@@ -49029,7 +49150,6 @@ class ChainalignParser {
49029
49150
  let ajaxArray = [], indexArray = [], struArray = [];
49030
49151
  let urlalign = me.htmlCls.baseUrl + "vastdyn/vastdyn.cgi";
49031
49152
  let urltmalign = me.htmlCls.baseUrl + "tmalign/tmalign.cgi";
49032
- //let urltmalign = "https://test.ncbi.nlm.nih.gov/Structure/tmalign/tmalign.cgi";
49033
49153
 
49034
49154
  for(let index in ic.afChainIndexHash) {
49035
49155
  let idArray = ic.afChainIndexHash[index].split('_');
@@ -61913,7 +62033,7 @@ class LoadScript {
61913
62033
  }
61914
62034
 
61915
62035
  //When reading a list of commands, apply transformation at the last step.
61916
- renderFinalStep(steps) { let ic = this.icn3d, me = ic.icn3dui;
62036
+ async renderFinalStep(steps) { let ic = this.icn3d, me = ic.icn3dui;
61917
62037
  // enable ic.ParserUtilsCls.hideLoading
61918
62038
  ic.bCommandLoad = false;
61919
62039
 
@@ -63631,6 +63751,15 @@ class FirstAtomObj {
63631
63751
  }
63632
63752
  }
63633
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
+
63634
63763
  return (firstIndex !== undefined) ? ic.atoms[firstIndex] : this.getFirstAtomObj(atomsHash);
63635
63764
  }
63636
63765
 
@@ -71933,7 +72062,7 @@ class iCn3D {
71933
72062
  this.shininess = 40; //30
71934
72063
  this.emissive = 0x111111; //0x000000
71935
72064
 
71936
- this.light1 = 0.6; //1
72065
+ this.light1 = 0.8; //0.6; //1
71937
72066
  this.light2 = 0.4;
71938
72067
  this.light3 = 0.2;
71939
72068
 
@@ -72247,6 +72376,8 @@ class iCn3D {
72247
72376
 
72248
72377
  this.applyCenterCls = new ApplyCenter(this);
72249
72378
  this.applyClbondsCls = new ApplyClbonds(this);
72379
+ this.applyMissingResCls = new ApplyMissingRes(this);
72380
+
72250
72381
  this.applyDisplayCls = new ApplyDisplay(this);
72251
72382
  this.applyMapCls = new ApplyMap(this);
72252
72383
  this.applyOtherCls = new ApplyOther(this);
@@ -72569,7 +72700,7 @@ class iCn3DUI {
72569
72700
  //even when multiple iCn3D viewers are shown together.
72570
72701
  this.pre = this.cfg.divid + "_";
72571
72702
 
72572
- this.REVISION = '3.28.1';
72703
+ this.REVISION = '3.28.2';
72573
72704
 
72574
72705
  // In nodejs, iCn3D defines "window = {navigator: {}}"
72575
72706
  this.bNode = (Object.keys(window).length < 2) ? true : false;