icn3d 3.45.1 → 3.45.3

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/css/icn3d.css CHANGED
@@ -1,31 +1,64 @@
1
+ .ui-dialog { font-size: 12px;}
2
+ .ui-dialog .ui-dialog-title { font-size: 16px; height: 18px; }
3
+ .ui-dialog .ui-button { width: 12px; height:12px; margin: -5px 0px 0px 0px;}
4
+ .ui-dialog .ui-dialog-titlebar { padding: 0px 1em 2px 1em; }
5
+
6
+ .ui-dialog .ui-resizable-se {
7
+ width: 14px;
8
+ height: 14px;
9
+ right: 3px;
10
+ bottom: 3px;
11
+ background-position: -80px -224px;
12
+ }
13
+
1
14
  /* theme: orange */
2
15
  /*
3
- .ui-widget-header{border:1px solid #e78f08;background:#f6a828 url("https://www.ncbi.nlm.nih.gov/Structure/icn3d/lib/images/ui-bg_gloss-wave_35_f6a828_500x100.png") 50% 50% repeat-x;color:#fff;font-weight:bold}
4
- .ui-button .ui-icon {background-image: url("https://www.ncbi.nlm.nih.gov/Structure/icn3d/lib/images/ui-icons_ef8c08_256x240.png");}
5
- .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited {color: #eb8f00;text-decoration: none;}
16
+ .icn3d-menu .ui-widget-header{border:1px solid #e78f08;background:#f6a828 url("https://www.ncbi.nlm.nih.gov/Structure/icn3d/lib/images/ui-bg_gloss-wave_35_f6a828_500x100.png") 50% 50% repeat-x;color:#fff;font-weight:bold}
17
+ .icn3d-menu .ui-button .ui-icon {background-image: url("https://www.ncbi.nlm.nih.gov/Structure/icn3d/lib/images/ui-icons_ef8c08_256x240.png");}
18
+ .icn3d-menu .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited {color: #eb8f00;text-decoration: none;}
6
19
  */
7
20
 
8
21
  /* theme: black */
9
22
  /*
10
- .ui-widget-header{border:1px solid #333333;background:#333333 url("https://www.ncbi.nlm.nih.gov/Structure/icn3d/lib/images/ui-bg_gloss-wave_25_333333_500x100.png") 50% 50% repeat-x;color:#fff;font-weight:bold}
11
- .ui-button .ui-icon {background-image: url("https://www.ncbi.nlm.nih.gov/Structure/icn3d/lib/images/ui-icons_222222_256x240.png");}
12
- .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited {color: #222222;text-decoration: none;}
23
+ .icn3d-menu .ui-widget-header{border:1px solid #333333;background:#333333 url("https://www.ncbi.nlm.nih.gov/Structure/icn3d/lib/images/ui-bg_gloss-wave_25_333333_500x100.png") 50% 50% repeat-x;color:#fff;font-weight:bold}
24
+ .icn3d-menu .ui-button .ui-icon {background-image: url("https://www.ncbi.nlm.nih.gov/Structure/icn3d/lib/images/ui-icons_222222_256x240.png");}
25
+ .icn3d-menu .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited {color: #222222;text-decoration: none;}
13
26
  */
14
27
 
15
28
  /* theme: blue */
16
- .ui-widget-header {border:1px solid #4297d7;background:#5c9ccc url("https://www.ncbi.nlm.nih.gov/Structure/icn3d/lib/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png") 50% 50% repeat-x;color:#fff;font-weight:bold}
29
+ .icn3d-menu .ui-widget-header {border:1px solid #4297d7;background:#5c9ccc url("https://www.ncbi.nlm.nih.gov/Structure/icn3d/lib/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png") 50% 50% repeat-x;color:#fff;font-weight:bold}
17
30
  /*.ui-button .ui-icon {background-image: url("https://www.ncbi.nlm.nih.gov/Structure/icn3d/lib/images/ui-icons_228ef1_256x240.png");}*/
18
- .ui-icon {background-image: url("https://www.ncbi.nlm.nih.gov/Structure/icn3d/lib/images/ui-icons_228ef1_256x240.png")!important;}
19
- .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited {color: #444;text-decoration: none;}
31
+ .icn3d-menu .ui-icon {background-image: url("https://www.ncbi.nlm.nih.gov/Structure/icn3d/lib/images/ui-icons_228ef1_256x240.png")!important;}
32
+ .icn3d-menu .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited {color: #444;text-decoration: none;}
20
33
 
21
- .icn3d-text {font-family: Verdana, Arial, Helvetica, sans-serif; font-size:12px!important;}
34
+ .icn3d-menu .ui-accordion .ui-accordion-icons { padding-left: 0; text-align: center; }
22
35
 
23
- .ui-dialog { font-size: 12px;}
24
- .ui-dialog .ui-dialog-title { font-size: 16px; height: 18px; }
25
- .ui-dialog .ui-button { width: 12px; height:12px; margin: -5px 0px 0px 0px;}
26
- .ui-dialog .ui-dialog-titlebar { padding: 0px 1em 2px 1em; }
36
+ .icn3d-menu .ui-menu-icon {
37
+ float: right;
38
+ }
39
+
40
+ .icn3d-menu .ui-widget {
41
+ font-family: Arial,Helvetica,sans-serif;
42
+ font-size: 12px!important; /* 0.9em is a little too large */
43
+ }
44
+ .icn3d-menu .ui-menu-item {
45
+ position: relative;
46
+ padding: 3px 1em 3px .4em;
47
+ }
48
+
49
+ /* remove the extra bar in the menu */
50
+ /* background: #eee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; */
51
+ .icn3d-menu .ui-widget-content {
52
+ border: 1px solid #ddd;
53
+ background: #eee;
54
+ color: #333;
55
+ }
27
56
 
28
- .ui-accordion .ui-accordion-icons { padding-left: 0; text-align: center; }
57
+ .icn3d-menu .ui-menu-icons .ui-menu-item-wrapper, .ui-menu-icons .ui-menu-item {
58
+ padding-left: 0.4em!important;
59
+ }
60
+
61
+ .icn3d-text {font-family: Verdana, Arial, Helvetica, sans-serif; font-size:12px!important;}
29
62
 
30
63
  .icn3d-menu {float:left; width:110px;}
31
64
  .icn3d-menu-color {color:#369; font-weight:bold; font-size: 14px!important;}
@@ -70,6 +103,7 @@ button, select, input { font-size: 10px; }
70
103
 
71
104
  .icn3d-dialog {font-family: Verdana, Arial, Helvetica, sans-serif; color: #666666;}
72
105
  .icn3d-commandTitle {font-size: 12px; font-weight:bold; font-family: Verdana, Arial, Helvetica, sans-serif; color: #666666;}
106
+ .icn3d-title {font-size:1.2em; font-weight:normal; position:absolute; z-index:1; float:left; }
73
107
  .icn3d-modeselection {color: #f8b84e!important;}
74
108
  /*.icn3d-viewselection {color: #800000!important;}*/
75
109
  .icn3d-viewselection {color: #f8b84e!important;}
@@ -98,18 +132,6 @@ button, select, input { font-size: 10px; }
98
132
  .icn3d-node-text24 {font-size: 24px; font-weight: bold}
99
133
  .icn3d-node-text32 {font-size: 32px; font-weight: bold}
100
134
 
101
- .ui-dialog .ui-resizable-se {
102
- width: 14px;
103
- height: 14px;
104
- right: 3px;
105
- bottom: 3px;
106
- background-position: -80px -224px;
107
- }
108
-
109
- .ui-menu-icon {
110
- float: right;
111
- }
112
-
113
135
  /* toggle button: http://www.w3schools.com/howto/howto_css_switch.asp */
114
136
  .icn3d-switch {
115
137
  position: relative;
@@ -178,15 +200,6 @@ input:checked + .icn3d-slider:before {
178
200
  overflow:auto;
179
201
  }
180
202
 
181
- .ui-widget {
182
- font-family: Arial,Helvetica,sans-serif;
183
- font-size: 12px!important; /* 0.9em is a little too large */
184
- }
185
- .ui-menu-item {
186
- position: relative;
187
- padding: 3px 1em 3px .4em;
188
- }
189
-
190
203
  .icn3d-clinvar {color:green; font-size:12px; font-weight:bold;}
191
204
  .icn3d-clinvar-path {color:red; font-size:12px; font-weight:bold;}
192
205
 
@@ -213,14 +226,6 @@ input:checked + .icn3d-slider:before {
213
226
 
214
227
  .icn3d-bkgd {background-color:#eee;}
215
228
 
216
- /* remove the extra bar in the menu */
217
- /* background: #eee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; */
218
- .ui-widget-content {
219
- border: 1px solid #ddd;
220
- background: #eee;
221
- color: #333;
222
- }
223
-
224
229
  .icn3d-rad > input{ /* HIDE RADIO */
225
230
  visibility: hidden; /* Makes input not-clickable */
226
231
  position: absolute; /* Remove input from document flow */
@@ -240,10 +245,6 @@ input:checked + .icn3d-slider:before {
240
245
  background-position: -160px 0px; /*empty */
241
246
  }
242
247
 
243
- .ui-menu-icons .ui-menu-item-wrapper, .ui-menu-icons .ui-menu-item {
244
- padding-left: 0.4em!important;
245
- }
246
-
247
248
  .icn3d-rad-text, .icn3d-color-rad-text {
248
249
  padding-left: 1.2em;
249
250
  }
@@ -288,7 +289,6 @@ input:checked + .icn3d-slider:before {
288
289
 
289
290
  .ncbi-page-header {
290
291
  background-color: #369;
291
- color: #fff;
292
292
  overflow: auto;
293
293
  }
294
294
 
package/icn3d.js CHANGED
@@ -58909,7 +58909,7 @@ class SetMenu {
58909
58909
  html += this.setTools();
58910
58910
 
58911
58911
  // show title at the top left corner
58912
- html += me.htmlCls.divStr + "title' class='icn3d-commandTitle' style='font-size:1.2em; font-weight:normal; position:absolute; z-index:1; float:left; display:table-row; margin: 85px 0px 0px 5px; color:" + titleColor + "; width:" + me.htmlCls.WIDTH + "px'></div>";
58912
+ html += me.htmlCls.divStr + "title' class='icn3d-commandTitle icn3d-title' style='display:table-row; margin: 85px 0px 0px 5px; color:" + titleColor + "; width:" + me.htmlCls.WIDTH + "px'></div>";
58913
58913
 
58914
58914
  html += me.htmlCls.divStr + "viewer' style='position:relative; width:100%; height:100%; background-color: " + me.htmlCls.GREYD + ";'>";
58915
58915
 
@@ -59043,7 +59043,7 @@ class SetMenu {
59043
59043
  //html += me.htmlCls.setMenuCls.setTools();
59044
59044
 
59045
59045
  // show title at the top left corner
59046
- html += me.htmlCls.divStr + "title' class='icn3d-commandTitle' style='font-size:1.2em; font-weight:normal; position:absolute; z-index:1; float:left; display:block; margin: 12px 0px 0px 40px; color:" + titleColor + "; width:" +(me.htmlCls.WIDTH - 40).toString() + "px'></div>";
59046
+ html += me.htmlCls.divStr + "title' class='icn3d-commandTitle icn3d-title' style='display:block; margin: 12px 0px 0px 40px; color:" + titleColor + "; width:" +(me.htmlCls.WIDTH - 40).toString() + "px'></div>";
59047
59047
  html += me.htmlCls.divStr + "viewer' style='position:relative; width:100%; height:100%; background-color: " + me.htmlCls.GREYD + ";'>";
59048
59048
  // don't show legend in mobile
59049
59049
  //html += me.htmlCls.divStr + "legend' class='icn3d-text icn3d-legend'></div>";
@@ -74243,7 +74243,7 @@ class Scene {
74243
74243
  ic.shininess = shininess;
74244
74244
  }
74245
74245
 
74246
- if(!me.bNode && me.htmlCls.setHtmlCls.getCookie('light1') != '') {
74246
+ if(!me.bNode && me.htmlCls.setHtmlCls.getCookie('light1') != '' && !me.bNode && me.htmlCls.setHtmlCls.getCookie('light2') != '' && !me.bNode && me.htmlCls.setHtmlCls.getCookie('light3') != '') {
74247
74247
  let light1 = parseFloat(me.htmlCls.setHtmlCls.getCookie('light1'));
74248
74248
  let light2 = parseFloat(me.htmlCls.setHtmlCls.getCookie('light2'));
74249
74249
  let light3 = parseFloat(me.htmlCls.setHtmlCls.getCookie('light3'));
@@ -78993,19 +78993,25 @@ class Tube {
78993
78993
  //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 }));
78994
78994
  mesh = new Mesh$1(geo, new MeshPhongMaterial({ transparent: true, opacity: 0.5, specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, vertexColors: true, side: DoubleSide$1 }));
78995
78995
 
78996
- if(ic.mdl) ic.mdl.add(mesh);
78996
+ if(ic.mdl) {
78997
+ ic.mdl.add(mesh);
78998
+ }
78997
78999
  }
78998
79000
  else if(bHighlight === 1) {
78999
79001
  mesh = new Mesh$1(geo, ic.matShader);
79000
79002
  mesh.renderOrder = ic.renderOrderPicking;
79001
79003
  //ic.mdlPicking.add(mesh);
79002
- if(ic.mdl) ic.mdl.add(mesh);
79004
+ if(ic.mdl) {
79005
+ ic.mdl.add(mesh);
79006
+ }
79003
79007
  }
79004
79008
  else {
79005
79009
  //mesh = new THREE.Mesh(geo, new THREE.MeshPhongMaterial({ specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, vertexColors: THREE.FaceColors, side: THREE.DoubleSide }));
79006
79010
  mesh = new Mesh$1(geo, new MeshPhongMaterial({ specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, vertexColors: true, side: DoubleSide$1 }));
79007
79011
 
79008
- if(ic.mdl) ic.mdl.add(mesh);
79012
+ if(ic.mdl) {
79013
+ ic.mdl.add(mesh);
79014
+ }
79009
79015
  }
79010
79016
 
79011
79017
  if(bHighlight === 1 || bHighlight === 2) {
@@ -83403,7 +83409,11 @@ class ApplyClbonds {
83403
83409
  applyClbondsOptions(options) { let ic = this.icn3d, me = ic.icn3dui;
83404
83410
  if(options === undefined) options = ic.opts;
83405
83411
 
83406
- if(!ic.bCalcCrossLink) {
83412
+ ic.lines['clbond'] = [];
83413
+
83414
+ if(options.chemicals == 'nothing') return {};
83415
+
83416
+ // if(!ic.bCalcCrossLink) {
83407
83417
  // find all bonds to chemicals
83408
83418
  ic.clbondpnts = {};
83409
83419
  ic.clbondResid2serial = {};
@@ -83414,10 +83424,11 @@ class ApplyClbonds {
83414
83424
  // chemical to protein/nucleotide
83415
83425
  this.applyClbondsOptions_base('all');
83416
83426
 
83417
- ic.bCalcCrossLink = true;
83418
- }
83427
+ // ic.bCalcCrossLink = true;
83428
+ // }
83419
83429
 
83420
- if (options.clbonds.toLowerCase() === 'yes' && options.chemicals !== 'nothing') {
83430
+ // if (options.clbonds.toLowerCase() === 'yes' && options.chemicals !== 'nothing') {
83431
+ if (options.clbonds.toLowerCase() === 'yes') {
83421
83432
  let color = '#006400';
83422
83433
  me.parasCls.thr(0x006400);
83423
83434
 
@@ -83443,7 +83454,8 @@ class ApplyClbonds {
83443
83454
  line.serial1 = ic.clbondResid2serial[resid0 + ',' + resid1];
83444
83455
  line.serial2 = ic.clbondResid2serial[resid1 + ',' + resid0];
83445
83456
 
83446
- if(!ic.dAtoms.hasOwnProperty(line.serial1) || !ic.dAtoms.hasOwnProperty(line.serial2)) continue;
83457
+ // only apply to displayed atoms
83458
+ // if(!ic.dAtoms.hasOwnProperty(line.serial1) || !ic.dAtoms.hasOwnProperty(line.serial2)) continue;
83447
83459
 
83448
83460
  line.position1 = ic.atoms[line.serial1].coord;
83449
83461
  line.position2 = ic.atoms[line.serial2].coord;
@@ -83475,9 +83487,14 @@ class ApplyClbonds {
83475
83487
  return ic.residuesHashClbonds;
83476
83488
  }
83477
83489
 
83478
- applyClbondsOptions_base(type) { let ic = this.icn3d; ic.icn3dui;
83490
+ applyClbondsOptions_base(type) { let ic = this.icn3d, me = ic.icn3dui;
83491
+ // only apply to displayed atoms
83492
+ let atomHash = me.hashUtilsCls.cloneHash(ic.chemicals);
83493
+ atomHash = me.hashUtilsCls.intHash(atomHash, ic.dAtoms);
83494
+
83479
83495
  // chemical to chemical first
83480
- for (let i in ic.chemicals) {
83496
+ // for (let i in ic.chemicals) {
83497
+ for (let i in atomHash) {
83481
83498
  let atom0 = ic.atoms[i];
83482
83499
 
83483
83500
  let chain0 = atom0.structure + '_' + atom0.chain;
@@ -86072,24 +86089,27 @@ class Instancing {
86072
86089
  let normalArray2 = (baseGeometry.attributes.normal) ? me.hashUtilsCls.hashvalue2array(baseGeometry.attributes.normal.array) : [];
86073
86090
  let colorArray2 = (baseGeometry.attributes.color) ? me.hashUtilsCls.hashvalue2array(baseGeometry.attributes.color.array) : [];
86074
86091
  let indexArray2 = (baseGeometry.index) ? me.hashUtilsCls.hashvalue2array(baseGeometry.index.array) : [];
86092
+
86093
+ if(colorArray2.length > 0) { // avoid an black object in the center of of assembly, e.g., https://www.ncbi.nlm.nih.gov/Structure/icn3d/?pdbid=1qqp
86094
+ positionArray = positionArray.concat(positionArray2);
86095
+ normalArray = normalArray.concat(normalArray2);
86096
+ colorArray = colorArray.concat(colorArray2);
86097
+ indexArray = indexArray.concat(indexArray2);
86075
86098
 
86076
- positionArray = positionArray.concat(positionArray2);
86077
- normalArray = normalArray.concat(normalArray2);
86078
- colorArray = colorArray.concat(colorArray2);
86079
- indexArray = indexArray.concat(indexArray2);
86080
-
86081
- let bCylinderArray = [];
86082
- let bCylinder = (baseGeometry.type == 'CylinderGeometry') ? 1.0 : 0.0;
86083
- for(let i = 0, il = positionArray.length / 3; i < il; ++i) {
86084
- bCylinderArray.push(bCylinder);
86085
- }
86099
+ let bCylinderArray = [];
86100
+ let bCylinder = (baseGeometry.type == 'CylinderGeometry') ? 1.0 : 0.0;
86101
+ // let bCylinder = (baseGeometry.geometry.type == 'CylinderGeometry') ? 1.0 : 0.0;
86102
+ for(let i = 0, il = positionArray.length / 3; i < il; ++i) {
86103
+ bCylinderArray.push(bCylinder);
86104
+ }
86086
86105
 
86087
- geometry.setAttribute('position', new BufferAttribute$1(new Float32Array(positionArray), 3));
86088
- geometry.setAttribute('normal', new BufferAttribute$1(new Float32Array(normalArray), 3) );
86089
- geometry.setAttribute('color', new BufferAttribute$1(new Float32Array(colorArray), 3) );
86106
+ geometry.setAttribute('position', new BufferAttribute$1(new Float32Array(positionArray), 3));
86107
+ geometry.setAttribute('normal', new BufferAttribute$1(new Float32Array(normalArray), 3) );
86108
+ geometry.setAttribute('color', new BufferAttribute$1(new Float32Array(colorArray), 3) );
86090
86109
 
86091
- geometry.setAttribute('cylinder', new BufferAttribute$1(new Float32Array(bCylinderArray), 1) );
86092
- geometry.setIndex(new BufferAttribute$1(new Uint32Array(indexArray), 1));
86110
+ geometry.setAttribute('cylinder', new BufferAttribute$1(new Float32Array(bCylinderArray), 1) );
86111
+ geometry.setIndex(new BufferAttribute$1(new Uint32Array(indexArray), 1));
86112
+ }
86093
86113
 
86094
86114
  positionArray2 = null;
86095
86115
  normalArray2 = null;
@@ -86151,7 +86171,7 @@ class Instancing {
86151
86171
 
86152
86172
  let mesh2 = new Mesh$1(geometry, ic.instancedMaterial);
86153
86173
 
86154
- mesh2.onBeforeRender = ic.impostorCls.onBeforeRender;
86174
+ if(ic.bImpo) mesh2.onBeforeRender = ic.impostorCls.onBeforeRender;
86155
86175
  //mesh2.onBeforeRender = this.onBeforeRender;
86156
86176
 
86157
86177
  // important: https://stackoverflow.com/questions/21184061/mesh-suddenly-disappears-in-three-js-clipping
@@ -86377,7 +86397,7 @@ class Alternate {
86377
86397
 
86378
86398
  //ic.glycanCls.showGlycans();
86379
86399
 
86380
- ic.opts['rotationcenter'] = 'highlight center';
86400
+ // ic.opts['rotationcenter'] = 'highlight center';
86381
86401
 
86382
86402
  ic.drawCls.draw();
86383
86403
 
@@ -91510,6 +91530,7 @@ class AnnoIg {
91510
91530
  html2 += htmlCnt + '<span class="icn3d-seqLine">';
91511
91531
 
91512
91532
  if(ic.seqStartLen && ic.seqStartLen[chnid]) html2 += ic.showSeqCls.insertMulGapOverview(chnid, ic.seqStartLen[chnid]);
91533
+ // if(ic.seqStartLen && ic.seqStartLen[chnid]) html += ic.showSeqCls.insertMulGap(ic.seqStartLen[chnid], '-');
91513
91534
 
91514
91535
  let prevDomainindex, color;
91515
91536
  for(let i = 0, il = fromArray.length; i < il; ++i) {
@@ -96049,7 +96070,7 @@ class AddTrack {
96049
96070
 
96050
96071
  // adjust the total length
96051
96072
  if(ic.maxAnnoLength < ic.maxAnnoLengthOri + ic.seqStartLen[chainid] + ic.seqEndLen[chainid]) {
96052
- ic.maxAnnoLength = ic.maxAnnoLengthOri + ic.seqStartLen[chainid] + ic.seqEndLen[chainid];
96073
+ ic.maxAnnoLength = ic.maxAnnoLengthOri + ic.seqStartLen[chainid] + ic.seqEndLen[chainid];
96053
96074
  }
96054
96075
 
96055
96076
  // do not remove other tracks
@@ -96350,6 +96371,9 @@ class AddTrack {
96350
96371
 
96351
96372
  me.htmlCls.clickMenuCls.setLogCmd("add exon track | chainid " + chainid + " | geneid " + geneid + " | startpos " + startpos + " | type " + type, true);
96352
96373
  me.htmlCls.clickMenuCls.setLogCmd("set annotation custom", true);
96374
+
96375
+ // reset annotation tracks since exons may add extra space to the N-terminal
96376
+ ic.annotationCls.resetAnnoTabAll();
96353
96377
  }
96354
96378
 
96355
96379
  async addMsaTracks(chainid, startpos, type, fastaList) { let ic = this.icn3d, me = ic.icn3dui;
@@ -96628,9 +96652,14 @@ class Annotation {
96628
96652
  $("[id^=" + ic.pre + "transmem]").hide();
96629
96653
  if($("#" + ic.pre + "anno_transmem").length) $("#" + ic.pre + "anno_transmem")[0].checked = false;
96630
96654
  }
96631
- async setAnnoTabIg(bSelection, template) { let ic = this.icn3d; ic.icn3dui;
96655
+ async setAnnoTabIg(bSelection, template) { let ic = this.icn3d, me = ic.icn3dui;
96656
+ let selAtoms = me.hashUtilsCls.cloneHash(ic.hAtoms);
96657
+
96632
96658
  await this.updateIg(bSelection, template);
96633
96659
 
96660
+ // preserve previous selection
96661
+ ic.hAtoms = me.hashUtilsCls.cloneHash(selAtoms);
96662
+
96634
96663
  $("[id^=" + ic.pre + "ig]").show();
96635
96664
  if($("#" + ic.pre + "anno_ig").length) $("#" + ic.pre + "anno_ig")[0].checked = true;
96636
96665
  }
@@ -105629,7 +105658,7 @@ class MmcifParser {
105629
105658
  ///// if(ic.deferredSymmetry !== undefined) ic.deferredSymmetry.resolve();
105630
105659
  }
105631
105660
  catch (err) {
105632
- if(!me.bNode) console.log("mmcifparser.cgi issues: " + err);
105661
+ if(!me.bNode) console.log("downloadMmcifSymmetry issues: " + err);
105633
105662
  return;
105634
105663
  }
105635
105664
  }
@@ -105704,7 +105733,7 @@ class MmdbParser {
105704
105733
  this.getNoData(mmdbid, bGi);
105705
105734
  return;
105706
105735
  }
105707
-
105736
+
105708
105737
  if(Object.keys(data.atoms).length == 0) { // for large structures such as 3J3Q
105709
105738
  // use mmtfid
105710
105739
  let pdbid = data.pdbId;
@@ -110996,7 +111025,7 @@ class ParserUtils {
110996
111025
  getResiNCBI(chainid, resi) { let ic = this.icn3d; ic.icn3dui;
110997
111026
  let residNCBI = ic.resid2ncbi[chainid + '_' + resi];
110998
111027
  let resiNCBI = (residNCBI) ? parseInt(residNCBI.substr(residNCBI.lastIndexOf('_') + 1)) : 0;
110999
-
111028
+
111000
111029
  return resiNCBI;
111001
111030
  }
111002
111031
  }
@@ -112417,7 +112446,7 @@ class SetSeqAlign {
112417
112446
  // start and end of MSA
112418
112447
  let start_t = 9999, end_t = -1;
112419
112448
 
112420
- let baseResi = ic.chainsSeq[chainid1][0].resi - 1;
112449
+ ic.chainsSeq[chainid1][0].resi - 1;
112421
112450
 
112422
112451
  for(let index = 1, indexl = chainidArray.length; index < indexl; ++index) {
112423
112452
  let chainIndex = index - 1;
@@ -112427,34 +112456,25 @@ class SetSeqAlign {
112427
112456
  for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
112428
112457
  let start1, end1;
112429
112458
 
112430
- // if(bRealign) { // real residue numbers are stored
112431
- // start1 = ic.qt_start_end[chainIndex][i].t_start;
112432
- // end1 = ic.qt_start_end[chainIndex][i].t_end;
112433
- // }
112434
- // else {
112435
- //ic.qt_start_end is zero-based
112436
- start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start) - 1;
112437
- end1 = parseInt(ic.qt_start_end[chainIndex][i].t_end) - 1;
112438
- // }
112459
+ // start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start) - 1;
112460
+ // end1 = parseInt(ic.qt_start_end[chainIndex][i].t_end) - 1;
112461
+
112462
+ start1 = ic.ParserUtilsCls.getResiNCBI(chainid1, ic.qt_start_end[chainIndex][i].t_start) - 1;
112463
+ end1 = ic.ParserUtilsCls.getResiNCBI(chainid1, ic.qt_start_end[chainIndex][i].t_end) - 1;
112464
+
112439
112465
  for(let j = start1; j <= end1; ++j) {
112440
112466
  let resi, resid;
112441
112467
 
112442
- // if(me.cfg.aligntool == 'tmalign') { // tmalign: just one residue in this for loop
112443
- // resi = ic.qt_start_end[chainIndex][i].t_start;
112468
+ // let resiPos;
112469
+ // if(me.cfg.aligntool == 'tmalign') {
112470
+ // resiPos = j - baseResi;
112444
112471
  // }
112445
112472
  // else {
112446
- // let resiPos = (bRealign || me.cfg.aligntool != 'tmalign') ? j : j - baseResi;
112447
- let resiPos;
112448
- if(me.cfg.aligntool == 'tmalign') {
112449
- resiPos = j - baseResi;
112450
- }
112451
- else {
112452
- // resiPos = (bRealign) ? j : j - baseResi;
112453
- resiPos = j;
112454
- }
112455
- resi = ic.ParserUtilsCls.getResi(chainidArray[0], resiPos);
112456
- resid = chainidArray[0] + '_' + resi;
112473
+ // resiPos = j;
112457
112474
  // }
112475
+ let resiPos = j;
112476
+ resi = ic.ParserUtilsCls.getResi(chainidArray[0], resiPos);
112477
+ resid = chainidArray[0] + '_' + resi;
112458
112478
 
112459
112479
  resid2range_t[resid] = 1;
112460
112480
  if(j < start_t) start_t = j;
@@ -112514,7 +112534,8 @@ class SetSeqAlign {
112514
112534
  let resi = ic.chainsSeq[chainid1][j].resi;
112515
112535
  let resid = chainid1 + '_' + resi;
112516
112536
 
112517
- let jAdjusted = (me.cfg.aligntool != 'tmalign') ? j : j + baseResi;
112537
+ // let jAdjusted = (me.cfg.aligntool != 'tmalign') ? j : j + baseResi;
112538
+ let jAdjusted = ic.ParserUtilsCls.getResiNCBI(chainid1, resi) - 1;
112518
112539
 
112519
112540
  //if(j + baseResi < start_t || j + baseResi > end_t) {
112520
112541
  if(jAdjusted < start_t || jAdjusted > end_t) {
@@ -112703,8 +112724,10 @@ class SetSeqAlign {
112703
112724
  insertNotAlignRes(chainid, start, len, bRealign) { let ic = this.icn3d; ic.icn3dui;
112704
112725
  // insert non-aligned residues in query seq
112705
112726
  for(let j = 0, jl = len; j < jl; ++j) {
112706
- let resi2 = ic.ParserUtilsCls.getResi(chainid, start + j);
112707
- let resn2 = this.getResn(chainid, start + j);
112727
+ // let resi2 = ic.ParserUtilsCls.getResi(chainid, start + j);
112728
+ // let resn2 = this.getResn(chainid, start + j);
112729
+ let resi2 = start + j;
112730
+ let resn2 = this.getResnFromResi(chainid, resi2);
112708
112731
  let resn1 = '-';
112709
112732
  let bAlign = false;
112710
112733
  let resObject = this.getResObject(chainid, false, bAlign, resi2, resn2, resn1);
@@ -112712,13 +112735,15 @@ class SetSeqAlign {
112712
112735
  }
112713
112736
  }
112714
112737
 
112715
- getTemplatePosFromOriPos(chainid1, start, end, bRealign) { let ic = this.icn3d; ic.icn3dui;
112716
- let startResi = ic.ParserUtilsCls.getResi(chainid1, start);
112717
- let endResi = ic.ParserUtilsCls.getResi(chainid1, end);
112718
-
112738
+ getTemplatePosFromOriResi(chainid1, start, end, bRealign) { let ic = this.icn3d; ic.icn3dui;
112739
+ // let startResi = ic.ParserUtilsCls.getResi(chainid1, start);
112740
+ // let endResi = ic.ParserUtilsCls.getResi(chainid1, end);
112741
+ let startResi = start;
112742
+ let endResi = end;
112743
+
112719
112744
  let result1 = this.getResiPosInTemplate(chainid1, startResi);
112720
112745
  let result2 = this.getResiPosInTemplate(chainid1, endResi);
112721
-
112746
+
112722
112747
  return {"pos1": result1.pos, "pos2": result2.pos};
112723
112748
  }
112724
112749
 
@@ -112783,7 +112808,8 @@ class SetSeqAlign {
112783
112808
  let result;
112784
112809
 
112785
112810
  for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
112786
- let start1, start2, end1, end2, resiStart1, start1Pos, end1Pos;
112811
+ let start1, start2, end1, end2, resiStart1, start1Pos;
112812
+
112787
112813
  if(bRealign && me.cfg.aligntool == 'tmalign') { // real residue numbers are stored
112788
112814
  start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start);
112789
112815
  start2 = parseInt(ic.qt_start_end[chainIndex][i].q_start);
@@ -112798,7 +112824,7 @@ class SetSeqAlign {
112798
112824
  // 1. before the mapped residues
112799
112825
  resiStart1 = start1;
112800
112826
  start1Pos = this.getPosFromResi(chainid1, ic.qt_start_end[chainIndex][i].t_start);
112801
- end1Pos = this.getPosFromResi(chainid1, ic.qt_start_end[chainIndex][i].t_end);
112827
+ this.getPosFromResi(chainid1, ic.qt_start_end[chainIndex][i].t_end);
112802
112828
  }
112803
112829
  else {
112804
112830
  start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start - 1);
@@ -112809,17 +112835,16 @@ class SetSeqAlign {
112809
112835
  // 1. before the mapped residues
112810
112836
  resiStart1 = ic.ParserUtilsCls.getResi(chainid1, start1);
112811
112837
  start1Pos = start1;
112812
- end1Pos = end1;
112813
112838
  }
112814
112839
  //let range = resid2range_t[chainid1 + '_' + resiStart1];
112815
-
112840
+
112816
112841
  // if the mapping does not start from start_t, add gaps to the query seq
112817
112842
  if(i == 0) {
112818
- //result = this.getTemplatePosFromOriPos(chainid1, start_t, start1, bRealign);
112819
- result = this.getTemplatePosFromOriPos(chainid1, start_t, start1Pos, bRealign);
112843
+ //result = this.getTemplatePosFromOriResi(chainid1, start_t, start1, bRealign);
112844
+ result = this.getTemplatePosFromOriResi(chainid1, start_t, start1Pos, bRealign);
112820
112845
  pos1 = result.pos1;
112821
112846
  pos2 = result.pos2;
112822
-
112847
+
112823
112848
  //if(start1 > start_t) {
112824
112849
  if(start1Pos > start_t) {
112825
112850
  for(let j = 0, jl = pos2 - pos1; j < jl; ++j) {
@@ -112829,7 +112854,7 @@ class SetSeqAlign {
112829
112854
  }
112830
112855
  else {
112831
112856
  //let notAlnLen1 = start1 - (prevIndex1 + 1);
112832
- result = this.getTemplatePosFromOriPos(chainid1, prevIndex1, start1, bRealign);
112857
+ result = this.getTemplatePosFromOriResi(chainid1, prevIndex1, start1, bRealign);
112833
112858
  pos1 = result.pos1;
112834
112859
  pos2 = result.pos2;
112835
112860
  let notAlnLen1 = pos2 - (pos1 + 1);
@@ -112842,7 +112867,7 @@ class SetSeqAlign {
112842
112867
  // add gaps before the query sequence
112843
112868
  for(let j = 0, jl = notAlnLen1 - notAlnLen2; j < jl; ++j) {
112844
112869
  ic.alnChainsSeq[chainid2].push(gapResObject2);
112845
- }
112870
+ }
112846
112871
  }
112847
112872
  else {
112848
112873
  // check the number of gaps before resiStart1 (n), and insert 'notAlnLen2 - notAlnLen1 - n' gaps
@@ -112851,8 +112876,8 @@ class SetSeqAlign {
112851
112876
  }
112852
112877
 
112853
112878
  // 2. In the mapped residues
112854
- //result = this.getTemplatePosFromOriPos(chainid1, start1, end1, bRealign);
112855
- result = this.getTemplatePosFromOriPos(chainid1, start1Pos, end1Pos, bRealign);
112879
+ result = this.getTemplatePosFromOriResi(chainid1, start1, end1, bRealign);
112880
+ //result = this.getTemplatePosFromOriResi(chainid1, start1Pos, end1Pos, bRealign);
112856
112881
  pos1 = result.pos1;
112857
112882
  pos2 = result.pos2;
112858
112883
 
@@ -112869,7 +112894,7 @@ class SetSeqAlign {
112869
112894
  let resi2 = (bRealign) ? start2 + k : ic.ParserUtilsCls.getResi(chainid2, start2 + k);
112870
112895
  let resn1 = this.getResnFromResi(chainid1, resi1); //this.getResn(chainid1, start1 + k);
112871
112896
  let resn2 = this.getResnFromResi(chainid2, resi2); //this.getResn(chainid2, start2 + k);
112872
-
112897
+
112873
112898
  let bAlign = true;
112874
112899
  let resObject = this.getResObject(chainid2, false, bAlign, resi2, resn2, resn1);
112875
112900
  ic.alnChainsSeq[chainid2].push(resObject);
@@ -112892,7 +112917,7 @@ class SetSeqAlign {
112892
112917
  }
112893
112918
 
112894
112919
  // add gaps at the end
112895
- result = this.getTemplatePosFromOriPos(chainid1, prevIndex1, end_t, bRealign);
112920
+ result = this.getTemplatePosFromOriResi(chainid1, prevIndex1, end_t, bRealign);
112896
112921
  pos1 = result.pos1;
112897
112922
  pos2 = result.pos2;
112898
112923
  for(let i = pos1; i < pos2; ++i) {
@@ -115204,7 +115229,7 @@ class Vastplus {
115204
115229
  }
115205
115230
 
115206
115231
  let allPromise = Promise.allSettled(ajaxArray);
115207
- try {
115232
+ // try {
115208
115233
  let dataArray = await allPromise;
115209
115234
 
115210
115235
  // 2. cluster pairs
@@ -115216,10 +115241,10 @@ class Vastplus {
115216
115241
  await ic.pdbParserCls.loadPdbDataRender(true);
115217
115242
 
115218
115243
  /// if(ic.deferredRealignByVastplus !== undefined) ic.deferredRealignByVastplus.resolve();
115219
- }
115220
- catch(err) {
115221
- var aaa = 1; //alert("There are some problems in aligning the chains...");
115222
- }
115244
+ // }
115245
+ // catch(err) {
115246
+ // var aaa = 1; //alert("There are some problems in aligning the chains...");
115247
+ // }
115223
115248
  }
115224
115249
 
115225
115250
  setAlignment(struct1, struct2, chainid1, chainid2, bRealign) { let ic = this.icn3d, me = ic.icn3dui;
@@ -122270,15 +122295,16 @@ class Dssp {
122270
122295
  let pdbAjaxArray = this.getPdbAjaxArray();
122271
122296
 
122272
122297
  // try {
122298
+ let numRound = 0;
122299
+
122273
122300
  if(!template) {
122274
122301
  //let allPromise = Promise.allSettled(pdbAjaxArray);
122275
122302
  //ic.pdbDataArray = await allPromise;
122276
122303
 
122277
122304
  ic.pdbDataArray = await this.promiseWithFixedJobs(pdbAjaxArray);
122278
122305
 
122279
- let numRound = 0;
122280
122306
  let bNoMoreIg = await thisClass.parseRefPdbData(ic.pdbDataArray, template, undefined, numRound);
122281
- ++numRound;
122307
+ ++numRound;
122282
122308
 
122283
122309
  //while(!bNoMoreIg) {
122284
122310
  while(!bNoMoreIg && numRound < 15) {
@@ -132767,7 +132793,7 @@ class iCn3DUI {
132767
132793
  //even when multiple iCn3D viewers are shown together.
132768
132794
  this.pre = this.cfg.divid + "_";
132769
132795
 
132770
- this.REVISION = '3.45.0';
132796
+ this.REVISION = '3.45.1';
132771
132797
 
132772
132798
  // In nodejs, iCn3D defines "window = {navigator: {}}", and added window = {navigator: {}, "__THREE__":"177"}
132773
132799
  this.bNode = (Object.keys(window).length < 3) ? true : false;
@@ -133347,7 +133373,7 @@ iCn3DUI.prototype.getXMLHttpRqstPromise = function(url, dataType, responseType,
133347
133373
  var aaa = 1; //alert("RCSB server has no corresponding electron density map for this structure.");
133348
133374
  }
133349
133375
  else {
133350
- var aaa = 1; //alert("The " + mapType + " file is unavailable...");
133376
+ console.log("The " + mapType + " file is unavailable...");
133351
133377
  }
133352
133378
 
133353
133379
  reject('error');