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.module.js CHANGED
@@ -9357,8 +9357,8 @@ class SetMenu {
9357
9357
 
9358
9358
  html += this.getMenuText('mn1_searchgrooup', 'Search Structure ' + me.htmlCls.wifiStr, undefined, 1, 1);
9359
9359
  html += "<ul>";
9360
- html += this.getMenuUrl('mn1_searchstru', 'https://www.ncbi.nlm.nih.gov/structure', 'PDB Structures ' + me.htmlCls.wifiStr, undefined, 2);
9361
- html += this.getLink('mn1_proteinname', 'AlphaFold Structures ' + me.htmlCls.wifiStr, undefined, 2);
9360
+ html += this.getMenuUrl('mn1_searchstru', 'https://www.ncbi.nlm.nih.gov/structure', 'PDB Structures ' + me.htmlCls.wifiStr, 1, 2);
9361
+ html += this.getLink('mn1_proteinname', 'AlphaFold Structures ' + me.htmlCls.wifiStr, 1, 2);
9362
9362
  html += this.getMenuUrl('mn1_afdatabase', 'https://alphafold.ebi.ac.uk', 'AlphaFold UniProt Database ' + me.htmlCls.wifiStr, undefined, 2);
9363
9363
  html += "</ul>";
9364
9364
  html += "</li>";
@@ -9770,7 +9770,7 @@ class SetMenu {
9770
9770
  html += this.getRadio('mn6_showslab', 'mn6_showslabNo', 'Off', true, undefined, 2);
9771
9771
  html += "</ul>";
9772
9772
  html += "</li>";
9773
- html += this.getMenuText('mn2_axes', 'XYZ-axes', undefined, 1);
9773
+ html += this.getMenuText('mn2_axes', 'XYZ-axes', undefined, undefined, 1);
9774
9774
  html += "<ul>";
9775
9775
  html += this.getRadio('mn6_showaxis', 'mn6_showaxisYes', 'Original', undefined, undefined, 2);
9776
9776
  html += this.getRadio('mn6_showaxis', 'mn6_showaxisSel', 'Prin. Axes on Sel.', undefined, undefined, 2);
@@ -15860,7 +15860,7 @@ class SetHtml {
15860
15860
  let nucleotideribbonwidth =(type == '3dprint') ? '1.4' : '0.8';
15861
15861
 
15862
15862
  let shininess = 40;
15863
- let light1 = 0.6;
15863
+ let light1 = 0.8;
15864
15864
  let light2 = 0.4;
15865
15865
  let light3 = 0.2;
15866
15866
  let bGlycansCartoon = 0;
@@ -15908,7 +15908,7 @@ class SetHtml {
15908
15908
 
15909
15909
  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/>";
15910
15910
  html += "<b>2. Three directional lights</b>: <br>";
15911
- 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/>";
15911
+ 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/>";
15912
15912
  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/>";
15913
15913
  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/>";
15914
15914
  html += "<b>3. Thickness</b>: <br>";
@@ -23061,6 +23061,9 @@ class Scene {
23061
23061
  // show cross-linkages, set side chains
23062
23062
  ic.applyClbondsCls.applyClbondsOptions();
23063
23063
 
23064
+ // add dashed lines for missing residues
23065
+ ic.applyMissingResCls.applyMissingResOptions();
23066
+
23064
23067
  ic.applyDisplayCls.applyDisplayOptions(ic.opts, ic.dAtoms);
23065
23068
 
23066
23069
  ic.applyOtherCls.applyOtherOptions();
@@ -23154,7 +23157,7 @@ class Scene {
23154
23157
  ic.lightPos3 = new THREE.Vector3(1, 1, 1); //(0, 1, 1);
23155
23158
  }
23156
23159
 
23157
- let ambientLight = new THREE.AmbientLight(0x888888); //(0x404040);
23160
+ let ambientLight = new THREE.AmbientLight(0x404040); //(0x888888); //(0x404040);
23158
23161
 
23159
23162
  ic.scene.add(ic.directionalLight);
23160
23163
  ic.scene.add(ambientLight);
@@ -26348,15 +26351,16 @@ class Strip {
26348
26351
  let mesh;
26349
26352
 
26350
26353
  if(bHighlight === 2) {
26354
+ //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 }));
26351
26355
  mesh = new THREE.Mesh(geo, new THREE.MeshPhongMaterial({ transparent: true, opacity: 0.5, specular: ic.frac,
26352
- shininess: ic.shininess, emissive: ic.emissive, vertexColors: THREE.FaceColors, side: THREE.DoubleSide }));
26356
+ shininess: ic.shininess, emissive: ic.emissive, vertexColors: true, side: THREE.DoubleSide }));
26353
26357
 
26354
26358
  ic.mdl.add(mesh);
26355
26359
  ic.prevHighlightObjects.push(mesh);
26356
26360
  }
26357
26361
  else {
26358
- mesh = new THREE.Mesh(geo, new THREE.MeshPhongMaterial({ specular: ic.frac,
26359
- shininess: ic.shininess, emissive: ic.emissive, vertexColors: THREE.FaceColors, side: THREE.DoubleSide }));
26362
+ //mesh = new THREE.Mesh(geo, new THREE.MeshPhongMaterial({ specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, vertexColors: THREE.FaceColors, side: THREE.DoubleSide }));
26363
+ mesh = new THREE.Mesh(geo, new THREE.MeshPhongMaterial({ specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, vertexColors: true, side: THREE.DoubleSide }));
26360
26364
 
26361
26365
  ic.mdl.add(mesh);
26362
26366
  ic.objects.push(mesh);
@@ -26761,7 +26765,8 @@ class Tube {
26761
26765
  */
26762
26766
  let mesh;
26763
26767
  if(bHighlight === 2) {
26764
- 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 }));
26768
+ //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 }));
26769
+ 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 }));
26765
26770
 
26766
26771
  if(ic.mdl) ic.mdl.add(mesh);
26767
26772
  }
@@ -26772,8 +26777,8 @@ class Tube {
26772
26777
  if(ic.mdl) ic.mdl.add(mesh);
26773
26778
  }
26774
26779
  else {
26775
- mesh = new THREE.Mesh(geo, new THREE.MeshPhongMaterial({ specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, vertexColors: THREE.FaceColors, side: THREE.DoubleSide }));
26776
- //mesh = new THREE.Mesh(geo, new THREE.MeshPhongMaterial({ specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, color: 0xFFFFFF, side: THREE.DoubleSide }));
26780
+ //mesh = new THREE.Mesh(geo, new THREE.MeshPhongMaterial({ specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, vertexColors: THREE.FaceColors, side: THREE.DoubleSide }));
26781
+ mesh = new THREE.Mesh(geo, new THREE.MeshPhongMaterial({ specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, vertexColors: true, side: THREE.DoubleSide }));
26777
26782
 
26778
26783
  if(ic.mdl) ic.mdl.add(mesh);
26779
26784
  }
@@ -30184,7 +30189,8 @@ class Surface {
30184
30189
  specular: ic.frac,
30185
30190
  shininess: 0, //10, //30,
30186
30191
  emissive: ic.emissive,
30187
- vertexColors: THREE.VertexColors,
30192
+ //vertexColors: THREE.VertexColors,
30193
+ vertexColors: true,
30188
30194
  wireframe: wireframe,
30189
30195
  opacity: opacity,
30190
30196
  transparent: true,
@@ -30251,7 +30257,8 @@ class Surface {
30251
30257
  specular: ic.frac,
30252
30258
  shininess: 20, //10, //30,
30253
30259
  emissive: ic.emissive,
30254
- vertexColors: THREE.VertexColors,
30260
+ //vertexColors: THREE.VertexColors,
30261
+ vertexColors: true,
30255
30262
  wireframe: wireframe,
30256
30263
  opacity: opacity,
30257
30264
  transparent: true,
@@ -30529,7 +30536,7 @@ class ApplyClbonds {
30529
30536
 
30530
30537
  if (options.clbonds.toLowerCase() === 'yes' && options.chemicals !== 'nothing') {
30531
30538
  let color = '#006400';
30532
- let colorObj = me.parasCls.thr(0x006400);
30539
+ me.parasCls.thr(0x006400);
30533
30540
 
30534
30541
  ic.lines['clbond'] = [];
30535
30542
  ic.residuesHashClbonds = {};
@@ -30548,6 +30555,8 @@ class ApplyClbonds {
30548
30555
  line.color = color;
30549
30556
  line.dashed = false;
30550
30557
 
30558
+ line.radius = ic.crosslinkRadius;
30559
+
30551
30560
  line.serial1 = ic.clbondResid2serial[resid0 + ',' + resid1];
30552
30561
  line.serial2 = ic.clbondResid2serial[resid1 + ',' + resid0];
30553
30562
 
@@ -30557,7 +30566,7 @@ class ApplyClbonds {
30557
30566
  line.position2 = ic.atoms[line.serial2].coord;
30558
30567
 
30559
30568
  ic.lines['clbond'].push(line);
30560
- ic.cylinderCls.createCylinder(line.position1, line.position2, ic.crosslinkRadius, colorObj);
30569
+ //ic.cylinderCls.createCylinder(line.position1, line.position2, ic.crosslinkRadius, colorObj);
30561
30570
 
30562
30571
  // show stick for these two residues
30563
30572
  let residueAtoms = {};
@@ -30618,6 +30627,117 @@ class ApplyClbonds {
30618
30627
  }
30619
30628
  }
30620
30629
 
30630
+ /**
30631
+ * @author Jiyao Wang <wangjiy@ncbi.nlm.nih.gov> / https://github.com/ncbi/icn3d
30632
+ */
30633
+
30634
+ class ApplyMissingRes {
30635
+ constructor(icn3d) {
30636
+ this.icn3d = icn3d;
30637
+ }
30638
+
30639
+ applyMissingResOptions(options) { let ic = this.icn3d; ic.icn3dui;
30640
+
30641
+ if(!ic.bCalcMissingRes) {
30642
+ // find all bonds to chemicals
30643
+ ic.missingResPnts = {};
30644
+ ic.missingResResid2serial = {};
30645
+
30646
+ this.applyMissingResOptions_base();
30647
+
30648
+ ic.bCalcMissingRes = true;
30649
+ }
30650
+
30651
+ ic.lines['missingres'] = [];
30652
+
30653
+ if(ic.structures) {
30654
+ let strucArray = Object.keys(ic.structures);
30655
+ for(let i = 0, il = strucArray.length; i < il; ++i) {
30656
+ let struc = strucArray[i];
30657
+ if(!ic.missingResPnts[struc]) continue;
30658
+
30659
+ for(let j = 0, jl = ic.missingResPnts[struc].length; j < jl; j += 2) {
30660
+ let resid0 = ic.missingResPnts[struc][j];
30661
+ let resid1 = ic.missingResPnts[struc][j+1];
30662
+
30663
+ let line = {};
30664
+
30665
+ line.dashed = true;
30666
+
30667
+ line.serial1 = ic.missingResResid2serial[resid0 + ',' + resid1];
30668
+ line.serial2 = ic.missingResResid2serial[resid1 + ',' + resid0];
30669
+
30670
+ line.color = "#" + ic.atoms[line.serial1].color.getHexString();
30671
+
30672
+ line.radius = ic.coilWidth;
30673
+
30674
+ if(!ic.dAtoms.hasOwnProperty(line.serial1) || !ic.dAtoms.hasOwnProperty(line.serial2)) continue;
30675
+
30676
+ line.position1 = ic.atoms[line.serial1].coord;
30677
+ line.position2 = ic.atoms[line.serial2].coord;
30678
+
30679
+ ic.lines['missingres'].push(line);
30680
+ } // for j
30681
+ } // for i
30682
+ } // if
30683
+ }
30684
+
30685
+ applyMissingResOptions_base(type) { let ic = this.icn3d; ic.icn3dui;
30686
+ let misingResArray = [];
30687
+ for(let chainid in ic.chainsSeq) {
30688
+ let bStart = false;
30689
+ let startResid, currResid, prevResid;
30690
+ let bCurrCoord, bPrevCoord = false;
30691
+ for(let i = 0, il = ic.chainsSeq[chainid].length; i < il; ++i) {
30692
+ currResid = chainid + '_' + ic.chainsSeq[chainid][i].resi;
30693
+
30694
+ if(ic.residues.hasOwnProperty(currResid)) {
30695
+ bStart = true;
30696
+
30697
+ bCurrCoord = true;
30698
+ }
30699
+ else {
30700
+ bCurrCoord = false;
30701
+ }
30702
+
30703
+ if(!bCurrCoord && bPrevCoord) {
30704
+ startResid = prevResid;
30705
+ }
30706
+ else if(bStart && startResid && bCurrCoord && !bPrevCoord) {
30707
+ misingResArray.push(startResid);
30708
+ misingResArray.push(currResid);
30709
+
30710
+ startResid = undefined;
30711
+ }
30712
+
30713
+ bPrevCoord = bCurrCoord;
30714
+ prevResid = currResid;
30715
+ }
30716
+ }
30717
+
30718
+ for(let i = 0, il = misingResArray.length; i < il; i += 2) {
30719
+ let resid0 = misingResArray[i];
30720
+ let resid1 = misingResArray[i + 1];
30721
+
30722
+ let structure = resid0.substr(0, resid0.indexOf('_'));
30723
+ resid0.substr(0, resid1.indexOf('_'));
30724
+
30725
+ let atom0 = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[resid0]);
30726
+ let atom1 = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[resid1]);
30727
+
30728
+ // one residue may have different atom for different clbond
30729
+ if(atom0 && atom1) {
30730
+ if(ic.missingResPnts[structure] === undefined) ic.missingResPnts[structure] = [];
30731
+ ic.missingResPnts[structure].push(resid0);
30732
+ ic.missingResPnts[structure].push(resid1);
30733
+
30734
+ ic.missingResResid2serial[resid0 + ',' + resid1] = atom0.serial;
30735
+ ic.missingResResid2serial[resid1 + ',' + resid0] = atom1.serial;
30736
+ }
30737
+ } // for i
30738
+ }
30739
+ }
30740
+
30621
30741
  /**
30622
30742
  * @author Jiyao Wang <wangjiy@ncbi.nlm.nih.gov> / https://github.com/ncbi/icn3d
30623
30743
  */
@@ -31257,7 +31377,7 @@ class ApplySsbonds {
31257
31377
 
31258
31378
  let line = {};
31259
31379
  line.color = color;
31260
- line.dashed = true;
31380
+ line.dashed = false;
31261
31381
 
31262
31382
  // each Cys has two S atoms
31263
31383
  let serial1Array = [], serial2Array = [];
@@ -31358,14 +31478,17 @@ class ApplySsbonds {
31358
31478
  //if(ic.lines['ssbond'] === undefined) ic.lines['ssbond'] = [];
31359
31479
  ic.lines['ssbond'].push(line);
31360
31480
 
31361
- // create bonds for disulfide bonds
31362
- ic.cylinderCls.createCylinder(line.position1, line.position2, ic.cylinderRadius, colorObj);
31363
-
31364
31481
  // show ball and stick for these two residues
31365
31482
  let residueAtoms;
31366
31483
  residueAtoms = me.hashUtilsCls.unionHash(residueAtoms, ic.residues[res1]);
31367
31484
  residueAtoms = me.hashUtilsCls.unionHash(residueAtoms, ic.residues[res2]);
31368
31485
 
31486
+ let atom = ic.firstAtomObjCls.getFirstAtomObj(residueAtoms);
31487
+ let style = (atom.style == 'lines') ? 'lines' : 'stick';
31488
+
31489
+ // create bonds for disulfide bonds
31490
+ if(atom.style != 'lines') ic.cylinderCls.createCylinder(line.position1, line.position2, ic.cylinderRadius, colorObj);
31491
+
31369
31492
  // show side chains for the selected atoms
31370
31493
  let atoms = me.hashUtilsCls.intHash(residueAtoms, ic.sidec);
31371
31494
  // let calpha_atoms = me.hashUtilsCls.intHash(residueAtoms, ic.calphas);
@@ -31374,7 +31497,7 @@ class ApplySsbonds {
31374
31497
 
31375
31498
  // draw sidec separatedly
31376
31499
  for(let j in atoms) {
31377
- ic.atoms[j].style2 = 'stick';
31500
+ ic.atoms[j].style2 = style;
31378
31501
  }
31379
31502
  } // for(let i = 0,
31380
31503
  } // for(let s = 0,
@@ -33595,6 +33718,9 @@ class Alternate {
33595
33718
  }
33596
33719
 
33597
33720
  if(ic.scene) {
33721
+ // https://github.com/gkjohnson/three-gpu-pathtracer/blob/main/example/basic.js
33722
+ ic.renderer.outputEncoding = THREE.sRGBEncoding;
33723
+
33598
33724
  ic.renderer.render(ic.scene, cam);
33599
33725
  }
33600
33726
  }
@@ -40847,26 +40973,26 @@ class AddTrack {
40847
40973
  endColorStr = this.getExonColor(startExon.rangeStart, startExon.rangeEnd, to);
40848
40974
 
40849
40975
  colorGradient = startColorStr + ' 0%, #FFF 50%, ' + endColorStr + ' 100%';
40850
- htmlTmp2 += this.getExonHtml(startExon.exonIndex, colorGradient, startExon.from, endExon.to, startExon.genomeRange);
40976
+ htmlTmp2 += this.getExonHtml(startExon.exonIndex, colorGradient, startExon.from, endExon.to, startExon.genomeRange, chnid, simpTitle);
40851
40977
  }
40852
40978
  else {
40853
40979
  if(startExon) {
40854
40980
  startColorStr = this.getExonColor(startExon.rangeStart, startExon.rangeEnd, from);
40855
40981
 
40856
40982
  colorGradient = startColorStr + ' 0%, #FFF 50%, #00F 100%';
40857
- htmlTmp2 += this.getExonHtml(startExon.exonIndex, colorGradient, startExon.from, startExon.rangeEnd, startExon.genomeRange);
40983
+ htmlTmp2 += this.getExonHtml(startExon.exonIndex, colorGradient, startExon.from, startExon.rangeEnd, startExon.genomeRange, chnid, simpTitle);
40858
40984
  }
40859
40985
 
40860
40986
  if(startExon && endExon) {
40861
40987
  for(let j = startExon.exonIndex + 1; j < endExon.exonIndex; ++j) {
40862
40988
  colorGradient = '#F00 0%, #FFF 50%, #00F 100%';
40863
- htmlTmp2 += this.getExonHtml(j, colorGradient, exonArray[j].resStart, exonArray[j].resEnd, exonArray[j].genomeRange);
40989
+ htmlTmp2 += this.getExonHtml(j, colorGradient, exonArray[j].resStart, exonArray[j].resEnd, exonArray[j].genomeRange, chnid, simpTitle);
40864
40990
  }
40865
40991
 
40866
40992
  endColorStr = this.getExonColor(endExon.rangeStart, endExon.rangeEnd, to);
40867
40993
 
40868
40994
  colorGradient = '#F00 0%, #FFF 50%, ' + endColorStr + ' 100%';
40869
- htmlTmp2 += this.getExonHtml(endExon.exonIndex, colorGradient, endExon.rangeStart, endExon.to, endExon.genomeRange);
40995
+ htmlTmp2 += this.getExonHtml(endExon.exonIndex, colorGradient, endExon.rangeStart, endExon.to, endExon.genomeRange, chnid, simpTitle);
40870
40996
  }
40871
40997
  }
40872
40998
 
@@ -40900,8 +41026,8 @@ class AddTrack {
40900
41026
  }
40901
41027
  }
40902
41028
 
40903
- getExonHtml(exonIndex, colorGradient, from, to, genomeRange) { let ic = this.icn3d; ic.icn3dui;
40904
- 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>';
41029
+ getExonHtml(exonIndex, colorGradient, from, to, genomeRange, chainid, simpTitle) { let ic = this.icn3d; ic.icn3dui;
41030
+ 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>';
40905
41031
  }
40906
41032
 
40907
41033
  getExonColor(start, end, pos) { let ic = this.icn3d; ic.icn3dui;
@@ -46530,12 +46656,12 @@ class LineGraph {
46530
46656
  let domainid = domainidpairArray[i].substr(0, domainidpairArray[i].indexOf('|'));
46531
46657
  let refpdbname = domainidpairArray[i].substr(domainidpairArray[i].indexOf('|') + 1);
46532
46658
  //let chainid = domainid.split('-')[0];
46533
-
46659
+
46534
46660
  if(!bRound1) {
46535
46661
  if(!me.bNode) console.log("refpdbname " + refpdbname + " TM-score: " + queryData[0].score);
46536
46662
  }
46537
46663
  else {
46538
- if(!me.bNode) console.log("refpdbname " + refpdbname + " RMSD: " + queryData[0].super_rmsd);
46664
+ 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));
46539
46665
  }
46540
46666
 
46541
46667
  // Ig-like domains: B (2150, 2150a, 2150b), C (3150, 3250), E (7150, 7250), F (8150, 8250) strands
@@ -46583,8 +46709,10 @@ class LineGraph {
46583
46709
  }
46584
46710
  }
46585
46711
  else {
46586
- if(!domainid2score.hasOwnProperty(domainid) || queryData[0].super_rmsd < domainid2score[domainid]) {
46587
- domainid2score[domainid] = queryData[0].super_rmsd;
46712
+ let mixScore = 10 / queryData[0].super_rmsd + queryData[0].num_seg / 5;
46713
+
46714
+ if(!domainid2score.hasOwnProperty(domainid) || mixScore > domainid2score[domainid]) {
46715
+ domainid2score[domainid] = mixScore;
46588
46716
 
46589
46717
  ic.domainid2refpdbname[domainid] = refpdbname;
46590
46718
  domainid2segs[domainid] = queryData[0].segs;
@@ -46929,9 +47057,8 @@ class LineGraph {
46929
47057
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.chains[chnid]);
46930
47058
  if(ic.proteins.hasOwnProperty(atom.serial)) {
46931
47059
  for(let i = 0; i < ic.chainsSeq[chnid].length; ++i) {
46932
- const resid = chnid + '_' + ic.chainsSeq[chnid][i].resi + '_' + ic.chainsSeq[chnid][i].name;
46933
-
46934
- refData += "'" + resid + "': '" + resid2refnum[resid] + "',\n";
47060
+ const resid = chnid + '_' + ic.chainsSeq[chnid][i].resi + '_' + ic.chainsSeq[chnid][i].name;
47061
+ refData += '"' + resid + '": "' + resid2refnum[resid] + '",\n';
46935
47062
  }
46936
47063
  }
46937
47064
  }
@@ -48296,22 +48423,16 @@ class ViewInterPairs {
48296
48423
  }
48297
48424
 
48298
48425
  if(ic.bD3 === undefined) {
48299
- //var url = "https://d3js.org/d3.v4.min.js";
48300
- var url = "https://www.ncbi.nlm.nih.gov/Structure/icn3d/script/d3v4-force-all.min.js";
48426
+ //let url = "https://d3js.org/d3.v4.min.js";
48427
+ let url = "https://www.ncbi.nlm.nih.gov/Structure/icn3d/script/d3v4-force-all.min.js";
48301
48428
  await me.getAjaxPromise(url, 'script');
48302
48429
 
48303
48430
  ic.bD3 = true;
48304
-
48305
- $("#" + me.svgid).empty();
48306
- me.htmlCls.dialogCls.openDlg('dl_graph', 'Force-directed graph');
48307
- ic.drawGraphCls.drawGraph(ic.graphStr, ic.pre + 'dl_graph');
48308
- /// if(ic.deferredGraphinteraction !== undefined) ic.deferredGraphinteraction.resolve();
48309
- }
48310
- else {
48311
- $("#" + me.svgid).empty();
48312
- me.htmlCls.dialogCls.openDlg('dl_graph', 'Force-directed graph');
48313
- ic.drawGraphCls.drawGraph(ic.graphStr, ic.pre + 'dl_graph');
48314
48431
  }
48432
+
48433
+ $("#" + me.svgid).empty();
48434
+ me.htmlCls.dialogCls.openDlg('dl_graph', 'Force-directed graph');
48435
+ ic.drawGraphCls.drawGraph(ic.graphStr, ic.pre + 'dl_graph');
48315
48436
  }
48316
48437
 
48317
48438
  return {interactionTypes: interactionTypes.toString(), bondCnt: bondCnt};
@@ -49930,7 +50051,6 @@ class ChainalignParser {
49930
50051
  let ajaxArray = [], indexArray = [], struArray = [];
49931
50052
  let urlalign = me.htmlCls.baseUrl + "vastdyn/vastdyn.cgi";
49932
50053
  let urltmalign = me.htmlCls.baseUrl + "tmalign/tmalign.cgi";
49933
- //let urltmalign = "https://test.ncbi.nlm.nih.gov/Structure/tmalign/tmalign.cgi";
49934
50054
 
49935
50055
  for(let index in ic.afChainIndexHash) {
49936
50056
  let idArray = ic.afChainIndexHash[index].split('_');
@@ -62814,7 +62934,7 @@ class LoadScript {
62814
62934
  }
62815
62935
 
62816
62936
  //When reading a list of commands, apply transformation at the last step.
62817
- renderFinalStep(steps) { let ic = this.icn3d, me = ic.icn3dui;
62937
+ async renderFinalStep(steps) { let ic = this.icn3d, me = ic.icn3dui;
62818
62938
  // enable ic.ParserUtilsCls.hideLoading
62819
62939
  ic.bCommandLoad = false;
62820
62940
 
@@ -64532,6 +64652,15 @@ class FirstAtomObj {
64532
64652
  }
64533
64653
  }
64534
64654
 
64655
+ if(!firstIndex) {
64656
+ for(let i in atomsHash) {
64657
+ if(ic.atoms[i].name == "O3'" || ic.atoms[i].name == "O3*") {
64658
+ firstIndex = i;
64659
+ break;
64660
+ }
64661
+ }
64662
+ }
64663
+
64535
64664
  return (firstIndex !== undefined) ? ic.atoms[firstIndex] : this.getFirstAtomObj(atomsHash);
64536
64665
  }
64537
64666
 
@@ -72834,7 +72963,7 @@ class iCn3D {
72834
72963
  this.shininess = 40; //30
72835
72964
  this.emissive = 0x111111; //0x000000
72836
72965
 
72837
- this.light1 = 0.6; //1
72966
+ this.light1 = 0.8; //0.6; //1
72838
72967
  this.light2 = 0.4;
72839
72968
  this.light3 = 0.2;
72840
72969
 
@@ -73148,6 +73277,8 @@ class iCn3D {
73148
73277
 
73149
73278
  this.applyCenterCls = new ApplyCenter(this);
73150
73279
  this.applyClbondsCls = new ApplyClbonds(this);
73280
+ this.applyMissingResCls = new ApplyMissingRes(this);
73281
+
73151
73282
  this.applyDisplayCls = new ApplyDisplay(this);
73152
73283
  this.applyMapCls = new ApplyMap(this);
73153
73284
  this.applyOtherCls = new ApplyOther(this);
@@ -73470,7 +73601,7 @@ class iCn3DUI {
73470
73601
  //even when multiple iCn3D viewers are shown together.
73471
73602
  this.pre = this.cfg.divid + "_";
73472
73603
 
73473
- this.REVISION = '3.28.1';
73604
+ this.REVISION = '3.28.2';
73474
73605
 
73475
73606
  // In nodejs, iCn3D defines "window = {navigator: {}}"
73476
73607
  this.bNode = (Object.keys(window).length < 2) ? true : false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icn3d",
3
- "version": "3.28.7",
3
+ "version": "3.28.8",
4
4
  "main": "./icn3d.js",
5
5
  "exports": {
6
6
  ".": {