icn3d 3.45.6 → 3.46.0

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/LICENSE CHANGED
File without changes
package/README.md CHANGED
File without changes
package/icn3d.js CHANGED
@@ -56277,7 +56277,8 @@ class ClickMenu {
56277
56277
  else if(id == 'mn6_selectannotations') {
56278
56278
  html += "</td><td valign='top'>";
56279
56279
  }
56280
- else if(id == 'abouticn3d') {
56280
+ //!!!else if(id == 'abouticn3d') {
56281
+ else if(id == 'ai_help') {
56281
56282
  html += "</td><td valign='top'>";
56282
56283
  }
56283
56284
 
@@ -58900,6 +58901,8 @@ class SetMenu {
58900
58901
  html += tdStr + "<div style='position:relative; margin-left:6px;'>" + str1;
58901
58902
  html += "<div class='icn3d-commandTitle' style='min-width:40px; margin-top: 3px; white-space: nowrap;'>" + str2;
58902
58903
 
58904
+ //!!!html += tdStr + '<div class="icn3d-commandTitle" style="white-space:nowrap; margin-top:10px; border-left:solid 1px #888888">' + me.htmlCls.space2 + '<a href="https://vizomics.org/icn3d-platform.html#ai_help" target="_blank" style="color:#f8b84e" title="AI-powered step-by-step instructions">AI Tutor</a>' + me.htmlCls.space2 + '</div></td>';
58905
+
58903
58906
  html += tdStr + '<div class="icn3d-commandTitle" style="white-space:nowrap; margin-top:10px; border-left:solid 1px #888888"><span id="' + me.pre + 'selection_expand" class="icn3d-expand icn3d-link" style="display:block;" title="Expand">' + me.htmlCls.space2 + 'Toolbar <span class="ui-icon ui-icon-plus" style="width:15px"></span>' + me.htmlCls.space2 + '</span><span id="' + me.pre + 'selection_shrink" class="icn3d-shrink icn3d-link" style="display:none;" title="Shrink">' + me.htmlCls.space2 + 'Toolbar <span class="ui-icon ui-icon-minus" style="width:15px"></span>' + me.htmlCls.space2 + '</span></div></td>';
58904
58907
 
58905
58908
  html += tdStr + '<div class="icn3d-commandTitle" style="white-space:nowrap; margin-top:8px; border-left:solid 1px #888888">' + me.htmlCls.space2 + '<input type="text" id="' + me.pre + 'search_seq" size="10" placeholder="one-letter seq."> <button style="white-space:nowrap;" id="' + me.pre + 'search_seq_button">Search</button> <a style="text-decoration: none;" href="' + me.htmlCls.baseUrl + 'icn3d/icn3d.html#selectb" target="_blank" title="Specification tips">?</a></div></td>';
@@ -59030,6 +59033,8 @@ class SetMenu {
59030
59033
  html += "<li><div style='position:relative; margin-top:-6px;'>" + str1;
59031
59034
  html += "<div class='icn3d-commandTitle' style='margin-top: 3px; white-space: nowrap;'>" + str2;
59032
59035
 
59036
+ //!!!html += "<li><a href='https://vizomics.org/icn3d-platform.html#ai_help' target='_blank' id='" + me.pre + "ai_help' class='icn3d-menu-color' style='color:#f8b84e' title='AI-powered step-by-step instructions'>AI Tutor</a>";
59037
+
59033
59038
  //if(me.cfg.align !== undefined) {
59034
59039
  html += "<li><span id='" + me.pre + "alternate2' class='icn3d-menu-color' title='Alternate the structures'>Alternate</span>";
59035
59040
  //}
@@ -59911,7 +59916,7 @@ class SetMenu {
59911
59916
  }
59912
59917
  else {
59913
59918
  html += this.getRadio('mn3_lig', 'mn3_ligStick', 'Stick', undefined, 1, 2);
59914
- html += this.getRadio('mn3_lig', 'mn3_ligBallstick', 'BalHydrogensl and Stick', true, 1, 2);
59919
+ html += this.getRadio('mn3_lig', 'mn3_ligBallstick', 'Ball and Stick', true, 1, 2);
59915
59920
  }
59916
59921
  html += this.getRadio('mn3_lig', 'mn3_ligSchematic', 'Schematic', undefined, 1, 2);
59917
59922
  html += this.getRadio('mn3_lig', 'mn3_ligSphere', 'Sphere', undefined, 1, 2);
@@ -60702,6 +60707,9 @@ class SetMenu {
60702
60707
 
60703
60708
  html += "<ul class='icn3d-mn-item'>";
60704
60709
 
60710
+ //!!!
60711
+ html += this.getMenuUrl('ai_help', "https://vizomics.org/icn3d-platform.html#ai_help", "AI Tutor" + me.htmlCls.wifiStr, 1, 1);
60712
+
60705
60713
  html += this.getMenuUrl('abouticn3d', me.htmlCls.baseUrl + "icn3d/icn3d.html#about", "About iCn3D<span style='font-size:0.9em'> " + me.REVISION + "</span>", 1, 1);
60706
60714
 
60707
60715
  html += this.getMenuUrl('gallery', me.htmlCls.baseUrl + "icn3d/icn3d.html#gallery", "Live Gallery " + me.htmlCls.wifiStr, 1, 1);
@@ -60757,7 +60765,7 @@ class SetMenu {
60757
60765
  html += "</ul>";
60758
60766
  html += "</li>";
60759
60767
 
60760
- html += this.getMenuUrl('helpdoc', me.htmlCls.baseUrl + "icn3d/docs/icn3d_help.html", "Help Doc " + me.htmlCls.wifiStr, 1, 1);
60768
+ // html += this.getMenuUrl('helpdoc', me.htmlCls.baseUrl + "icn3d/docs/icn3d_help.html", "Help Doc " + me.htmlCls.wifiStr, 1, 1);
60761
60769
 
60762
60770
  html += this.getMenuSep();
60763
60771
 
@@ -66821,6 +66829,8 @@ class SetHtml {
66821
66829
  if(selType) me.htmlCls.allMenusSel[id] = selType;
66822
66830
  if(bSimpleMenu) me.htmlCls.simpleMenus[id] = 1;
66823
66831
 
66832
+ if(id == 'ai_help') text = "<span style='color:#f8b84e'>" + text + "</span>";
66833
+
66824
66834
  return "<li><a id='" + me.pre + id + "' href='" + url + "' target='_blank'>" + text + "</a></li>";
66825
66835
  }
66826
66836
 
@@ -67732,6 +67742,9 @@ class SetHtml {
67732
67742
  let file_pref = Object.keys(me.utilsCls.getHlStructures()).join(',');
67733
67743
  ic.saveFileCls.saveFile(file_pref + '_icn3d.pdb', 'text', [pdbStr]);
67734
67744
  }
67745
+ else {
67746
+ console.log(pdbStr);
67747
+ }
67735
67748
 
67736
67749
  return pdbStr;
67737
67750
  }
@@ -67745,6 +67758,9 @@ class SetHtml {
67745
67758
  let file_pref = Object.keys(me.utilsCls.getHlStructures()).join(',');
67746
67759
  ic.saveFileCls.saveFile(file_pref + '_icn3d_ss.txt', 'text', [secondaryStr]);
67747
67760
  }
67761
+ else {
67762
+ console.log(secondaryStr);
67763
+ }
67748
67764
 
67749
67765
  return secondaryStr;
67750
67766
  }
@@ -74149,20 +74165,20 @@ class Scene {
74149
74165
  if(options === undefined) options = ic.opts;
74150
74166
 
74151
74167
  // whether camera was set
74152
- me.bCamera = (ic.cam) ? true : false;
74168
+ // me.bCamera = (ic.cam) ? true : false;
74153
74169
 
74154
74170
  this.rebuildSceneBase(options);
74155
74171
 
74156
74172
  ic.fogCls.setFog();
74157
74173
 
74158
- if(!ic.cam || ic.bChangeCamera) {
74159
- ic.cameraCls.setCamera();
74174
+ // if(!ic.cam || ic.bChangeCamera) {
74175
+ if(!ic.bNotSetCamera) ic.cameraCls.setCamera();
74160
74176
  // set the ratio for view point, which was set in ic.transformCls.resetOrientation_base
74161
74177
  if(!ic.container.whratio) {
74162
74178
  ic.container.whratio = me.htmlCls.WIDTH / me.htmlCls.HEIGHT;
74163
74179
  ic.cam.aspect = ic.container.whratio;
74164
74180
  }
74165
- }
74181
+ // }
74166
74182
 
74167
74183
  if(ic.opts['slab'] === 'yes') ic.cameraCls.setSlab();
74168
74184
 
@@ -74345,13 +74361,17 @@ class Scene {
74345
74361
  }
74346
74362
  }
74347
74363
 
74348
- ic.perspectiveCamera = new PerspectiveCamera$1(20, ic.container.whratio, 0.1, 10000);
74349
- ic.perspectiveCamera.position.set(0, 0, ic.cam_z);
74350
- ic.perspectiveCamera.lookAt(new Vector3$1(0, 0, 0));
74364
+ // if(!ic.perspectiveCamera) {
74365
+ ic.perspectiveCamera = new PerspectiveCamera$1(20, ic.container.whratio, 0.1, 10000);
74366
+ ic.perspectiveCamera.position.set(0, 0, ic.cam_z);
74367
+ ic.perspectiveCamera.lookAt(new Vector3$1(0, 0, 0));
74368
+ // }
74351
74369
 
74352
- ic.orthographicCamera = new OrthographicCamera$1();
74353
- ic.orthographicCamera.position.set(0, 0, ic.cam_z);
74354
- ic.orthographicCamera.lookAt(new Vector3$1(0, 0, 0));
74370
+ // if(!ic.orthographicCamera) {
74371
+ ic.orthographicCamera = new OrthographicCamera$1();
74372
+ ic.orthographicCamera.position.set(0, 0, ic.cam_z);
74373
+ ic.orthographicCamera.lookAt(new Vector3$1(0, 0, 0));
74374
+ // }
74355
74375
 
74356
74376
  ic.cams = {
74357
74377
  perspective: ic.perspectiveCamera,
@@ -74534,10 +74554,10 @@ class Scene {
74534
74554
 
74535
74555
  if(!me.bNode) {
74536
74556
  $("#" + me.pre + "VRButton").remove();
74537
- $("#" + me.pre + "viewer").get(0).appendChild( ic.VRButtonCls.createButton( ic.renderer ) );
74557
+ if($("#" + me.pre + "viewer").get(0)) $("#" + me.pre + "viewer").get(0).appendChild( ic.VRButtonCls.createButton( ic.renderer ) );
74538
74558
 
74539
74559
  $("#" + me.pre + "ARButton").remove();
74540
- $("#" + me.pre + "viewer").get(0).appendChild( ic.ARButtonCls.createButton( ic.renderer ) );
74560
+ if($("#" + me.pre + "viewer").get(0)) $("#" + me.pre + "viewer").get(0).appendChild( ic.ARButtonCls.createButton( ic.renderer ) );
74541
74561
  }
74542
74562
  }
74543
74563
 
@@ -86365,7 +86385,7 @@ class Alternate {
86365
86385
  }
86366
86386
 
86367
86387
  ic.bShowHighlight = false;
86368
- ic.opts['rotationcenter'] = 'highlight center';
86388
+ // ic.opts['rotationcenter'] = 'highlight center';
86369
86389
  }
86370
86390
 
86371
86391
  // also alternating the surfaces
@@ -86405,9 +86425,20 @@ class Alternate {
86405
86425
 
86406
86426
  //ic.glycanCls.showGlycans();
86407
86427
 
86408
- // ic.opts['rotationcenter'] = 'highlight center';
86409
-
86428
+ // ic.opts['rotationcenter'] = 'highlight center';
86429
+
86430
+ // zoomin at the beginning
86431
+
86432
+ if(ic.ALTERNATE_STRUCTURE == 0) { // default -1, so when it is 0, it is the first time
86433
+ ic.transformCls.zoominSelection();
86434
+ }
86435
+
86436
+ //ic.transformCls.resetOrientation(); // reset camera view point
86437
+ // ic.drawCls.applyTransformation(ic._zoomFactor, ic.mouseChange, ic.quaternion);
86438
+
86439
+ // ic.bNotSetCamera = true;
86410
86440
  ic.drawCls.draw();
86441
+ // ic.bNotSetCamera = false;
86411
86442
 
86412
86443
  ic.bShowHighlight = true; //reset
86413
86444
  }
@@ -90819,17 +90850,17 @@ class AnnoPTM {
90819
90850
  else if( structure.length > 5 ) {
90820
90851
  let url = "https://www.ebi.ac.uk/proteins/api/features/" + structure;
90821
90852
  let data;
90822
- try {
90853
+ // try {
90823
90854
  data = await me.getAjaxPromise(url, 'json');
90824
90855
 
90825
90856
  thisClass.parsePTM(data, chnid, type);
90826
90857
  /// if(ic.deferredPTM !== undefined) ic.deferredPTM.resolve();
90827
- }
90828
- catch {
90829
- thisClass.getNoPTM(chnid, type);
90858
+ // }
90859
+ // catch {
90860
+ // thisClass.getNoPTM(chnid, type);
90830
90861
 
90831
- return;
90832
- }
90862
+ // return;
90863
+ // }
90833
90864
  }
90834
90865
  else { // PDB
90835
90866
  // get PDB to UniProt mapping
@@ -90839,15 +90870,13 @@ class AnnoPTM {
90839
90870
  let urlMap = "https://www.ebi.ac.uk/pdbe/api/mappings/uniprot/" + structLower;
90840
90871
 
90841
90872
  let dataMap;
90842
- try {
90873
+ // try {
90843
90874
  dataMap = await me.getAjaxPromise(urlMap, 'json');
90844
90875
 
90845
90876
  let UniProtID = '';
90846
90877
  if(!ic.UPResi2ResiPosPerChain) ic.UPResi2ResiPosPerChain = {};
90847
90878
  ic.UPResi2ResiPosPerChain[chnid] = {};
90848
90879
  let mapping = dataMap[structLower].UniProt;
90849
-
90850
- let bFound = false;
90851
90880
  for(let up in mapping) {
90852
90881
  let chainArray = mapping[up].mappings;
90853
90882
  //if(bFound) break;
@@ -90870,7 +90899,6 @@ class AnnoPTM {
90870
90899
  }
90871
90900
 
90872
90901
  if(UniProtID == '' || UniProtID.length != 6) UniProtID = up;
90873
- bFound = true;
90874
90902
  //break;
90875
90903
  }
90876
90904
  }
@@ -90890,24 +90918,24 @@ class AnnoPTM {
90890
90918
 
90891
90919
  let url = "https://www.ebi.ac.uk/proteins/api/features/" + UniProtID;
90892
90920
  let data;
90893
- try {
90921
+ // try {
90894
90922
  data = await me.getAjaxPromise(url, 'json');
90895
90923
  ic.annoPtmData[UniProtID] = data;
90896
90924
 
90897
90925
  thisClass.parsePTM(data, chnid, type);
90898
90926
  /// if(ic.deferredPTM !== undefined) ic.deferredPTM.resolve();
90899
- }
90900
- catch(err) {
90901
- thisClass.getNoPTM(chnid, type);
90902
- return;
90903
- }
90927
+ // }
90928
+ // catch(err) {
90929
+ // thisClass.getNoPTM(chnid, type);
90930
+ // return;
90931
+ // }
90904
90932
  }
90905
90933
  }
90906
- }
90907
- catch(err) {
90908
- thisClass.getNoPTM(chnid, type);
90909
- return;
90910
- }
90934
+ // }
90935
+ // catch(err) {
90936
+ // thisClass.getNoPTM(chnid, type);
90937
+ // return;
90938
+ // }
90911
90939
  }
90912
90940
  }
90913
90941
 
@@ -90974,7 +91002,7 @@ class AnnoPTM {
90974
91002
  html += '<div id="' + ic.pre + chnid + '_' + type + 'seq_sequence" class="icn3d-cdd icn3d-dl_sequence">';
90975
91003
  html2 += html;
90976
91004
  html3 += html;
90977
- chnid.substr(0, chnid.indexOf('_'));
91005
+ let structure = chnid.substr(0, chnid.indexOf('_'));
90978
91006
 
90979
91007
  for(let ptm in ptmHash) {
90980
91008
  let ptmArray = ptmHash[ptm];
@@ -90986,7 +91014,7 @@ class AnnoPTM {
90986
91014
  let end = parseInt(ptmArray[i].end);
90987
91015
 
90988
91016
  for(let j = begin; j <= end; ++j) {
90989
- if(stucture.length > 5) { // UniProt
91017
+ if(structure.length > 5) { // UniProt
90990
91018
  resPosArray.push(j - 1); // 0-based
90991
91019
  }
90992
91020
  else { // PDB
@@ -96100,6 +96128,7 @@ class AddTrack {
96100
96128
  for(let j = 0, jl = trackSeqArray.length; j < jl; ++j) {
96101
96129
  let resi = startpos;
96102
96130
  let text = '';
96131
+
96103
96132
  for(let k = 0; k < ic.startposGiSeq; ++k) {
96104
96133
  if(ic.targetGapHash.hasOwnProperty(k)) {
96105
96134
  for(let m = 0; m < ic.targetGapHash[k].to - ic.targetGapHash[k].from + 1; ++m) {
@@ -97195,6 +97224,8 @@ class ShowAnno {
97195
97224
  let chemical_chainid = result.chemical_chainid;
97196
97225
  let chemical_set = result.chemical_set;
97197
97226
 
97227
+ let bAnnoShownPrev = ic.bAnnoShown;
97228
+
97198
97229
  if(!ic.bAnnoShown || ic.bResetAnno) { // ic.bResetAnno when loading another structure
97199
97230
  // assign early to avoid load annotations twice
97200
97231
  ic.bAnnoShown = true;
@@ -97291,7 +97322,7 @@ class ShowAnno {
97291
97322
  }
97292
97323
  //ic.bAnnoShown = true;
97293
97324
 
97294
- if($("#" + ic.pre + "anno_ig").length && $("#" + ic.pre + "anno_ig")[0].checked) {
97325
+ if($("#" + ic.pre + "anno_ig").length && $("#" + ic.pre + "anno_ig")[0].checked && !bAnnoShownPrev) {
97295
97326
  ic.bRunRefnumAgain = true;
97296
97327
  await ic.annotationCls.setAnnoTabIg();
97297
97328
 
@@ -101416,10 +101447,18 @@ class ViewInterPairs {
101416
101447
 
101417
101448
  $("#" + ic.pre + "dl_interactionsorted_html").html(html);
101418
101449
  me.htmlCls.dialogCls.openDlg('dl_interactionsorted', 'Show sorted interactions');
101450
+
101451
+ if(me.bNode) {
101452
+ console.log(html);
101453
+ }
101419
101454
  }
101420
101455
  else if(type == 'view') {
101421
101456
  $("#" + ic.pre + "dl_allinteraction_html").html(html);
101422
101457
  me.htmlCls.dialogCls.openDlg('dl_allinteraction', 'Show interactions');
101458
+
101459
+ if(me.bNode) {
101460
+ console.log(html);
101461
+ }
101423
101462
  }
101424
101463
  else if(type == 'linegraph') {
101425
101464
  me.htmlCls.dialogCls.openDlg('dl_linegraph', 'Show interactions between two lines of residue nodes');
@@ -101428,6 +101467,12 @@ class ViewInterPairs {
101428
101467
  // draw SVG
101429
101468
  let svgHtml = ic.lineGraphCls.drawLineGraph(ic.graphStr);
101430
101469
  $("#" + ic.pre + "linegraphDiv").html(svgHtml);
101470
+
101471
+ if(me.bNode) {
101472
+ let graphStr2 = ic.lineGraphStr.substr(0, ic.lineGraphStr.lastIndexOf('}'));
101473
+ graphStr2 += me.htmlCls.setHtmlCls.getLinkColor();
101474
+ console.log(graphStr2);
101475
+ }
101431
101476
  }
101432
101477
  else if(type == 'scatterplot') {
101433
101478
  me.htmlCls.dialogCls.openDlg('dl_scatterplot', 'Show interactions as scatterplot');
@@ -101436,6 +101481,12 @@ class ViewInterPairs {
101436
101481
  // draw SVG
101437
101482
  let svgHtml = ic.lineGraphCls.drawLineGraph(ic.graphStr, true);
101438
101483
  $("#" + ic.pre + "scatterplotDiv").html(svgHtml);
101484
+
101485
+ if(me.bNode) {
101486
+ let graphStr2 = ic.scatterplotStr.substr(0, ic.scatterplotStr.lastIndexOf('}'));
101487
+ graphStr2 += me.htmlCls.setHtmlCls.getLinkColor();
101488
+ console.log(graphStr2);
101489
+ }
101439
101490
  }
101440
101491
  else if(type == 'ligplot') {
101441
101492
  await ic.ligplotCls.drawLigplot(atomSet1);
@@ -104167,7 +104218,7 @@ class ChainalignParser {
104167
104218
  targetOrQuery = 'query';
104168
104219
  bAppend = true;
104169
104220
  }
104170
- console.log("### i " + i + " structArray[i] " + structArray[i]);
104221
+
104171
104222
  //if(structArray[i].length > 4) {
104172
104223
  if(isNaN(structArray[i]) && structArray[i].length > 5) { // PDB ID plus postfix could be 5
104173
104224
  //let bNoDssp = true;
@@ -104185,8 +104236,8 @@ console.log("### i " + i + " structArray[i] " + structArray[i]);
104185
104236
  // hAtoms = me.hashUtilsCls.unionHash(hAtoms, hAtomsTmp);
104186
104237
  }
104187
104238
 
104188
- let structArrayAll = structArray; //Object.keys(ic.structures);
104189
- console.log("### ic.chains: " + JSON.stringify(ic.chains) + " ic.structures " + JSON.stringify(ic.structures));
104239
+ let structArrayAll = Object.keys(ic.structures);
104240
+
104190
104241
  ic.opts['color'] = (structArrayAll.length > 1) ? 'structure' : ((structArrayAll[0].length > 5) ? 'confidence' : 'chain');
104191
104242
 
104192
104243
  // add color for all structures
@@ -112972,7 +113023,7 @@ class SetSeqAlign {
112972
113023
 
112973
113024
  for(let i = 0, il = ic.qt_start_end[index].length; i < il; ++i) {
112974
113025
  let start1, start2, end1, end2, resiStart1, start1Pos, end1Pos;
112975
-
113026
+
112976
113027
  start1 = ic.qt_start_end[index][i].t_start;
112977
113028
  start2 = ic.qt_start_end[index][i].q_start;
112978
113029
  end1 = ic.qt_start_end[index][i].t_end;
@@ -119185,16 +119236,16 @@ class LoadScript {
119185
119236
  if(lastCommand.indexOf('load') !== -1) {
119186
119237
  await thisClass.applyCommandLoad(lastCommand);
119187
119238
  }
119188
- else if(lastCommand.indexOf('set map') !== -1 && lastCommand.indexOf('set map wireframe') === -1) {
119239
+ else if(lastCommand.indexOf('set map') == 0 && lastCommand.indexOf('set map wireframe') == 0) {
119189
119240
  await thisClass.applyCommandMap(lastCommand);
119190
119241
  }
119191
- else if(lastCommand.indexOf('set emmap') !== -1 && lastCommand.indexOf('set emmap wireframe') === -1) {
119242
+ else if(lastCommand.indexOf('set emmap') == 0 && lastCommand.indexOf('set emmap wireframe') == 0) {
119192
119243
  await thisClass.applyCommandEmmap(lastCommand);
119193
119244
  }
119194
- else if(lastCommand.indexOf('set phi') !== -1) {
119245
+ else if(lastCommand.indexOf('set phi') == 0) {
119195
119246
  await ic.delphiCls.applyCommandPhi(lastCommand);
119196
119247
  }
119197
- else if(lastCommand.indexOf('set delphi') !== -1) {
119248
+ else if(lastCommand.indexOf('set delphi') == 0) {
119198
119249
  await ic.delphiCls.applyCommandDelphi(lastCommand);
119199
119250
  }
119200
119251
  else if(lastCommand.indexOf('view annotations') == 0
@@ -119899,6 +119950,14 @@ class SelectByCommand {
119899
119950
  // wild card * can be used to select all
119900
119951
  //var currHighlightAtoms = {}
119901
119952
 
119953
+ // convert 1TOP_A:20 to $1TOP.A:20
119954
+ if(commandArray[i].indexOf('_') !== -1) {
119955
+ let itemArray = commandArray[i].split('_');
119956
+ if(itemArray.length ==2 ) {
119957
+ commandArray[i] = '$' + itemArray[0] + '.' + itemArray[1];
119958
+ }
119959
+ }
119960
+
119902
119961
  let dollarPos = commandArray[i].indexOf('$');
119903
119962
  let periodPos = commandArray[i].indexOf('.');
119904
119963
  let colonPos = commandArray[i].indexOf(':');
@@ -124373,6 +124432,7 @@ console.log("free energy: " + energy + " kcal/mol");
124373
124432
  ic.saveFileCls.saveFile(file_pref + '_icn3d_' + postfix + '.pdb', 'text', [data]);
124374
124433
  }
124375
124434
  else {
124435
+ console.log(data);
124376
124436
  return data;
124377
124437
  }
124378
124438
  }
@@ -127935,6 +127995,7 @@ class ResizeCanvas {
127935
127995
 
127936
127996
  if(ic.structures && Object.keys(ic.structures).length > 0 && (bDraw === undefined || bDraw)) {
127937
127997
  ic.drawCls.draw();
127998
+ // ic.drawCls.render();
127938
127999
  }
127939
128000
  }
127940
128001
  }
@@ -128164,7 +128225,8 @@ class Transform {
128164
128225
  //Set the orientation to the original one, but leave the style, color, etc alone.
128165
128226
  resetOrientation() { let ic = this.icn3d; ic.icn3dui;
128166
128227
  if(ic.commands.length > 0) {
128167
- let commandTransformation = ic.commands[0].split('|||');
128228
+ // let commandTransformation = ic.commands[0].split('|||');
128229
+ let commandTransformation = ic.commands[ic.commands.length-1].split('|||');
128168
128230
 
128169
128231
  this.resetOrientation_base(commandTransformation);
128170
128232
  }
@@ -132850,7 +132912,7 @@ class iCn3DUI {
132850
132912
  //even when multiple iCn3D viewers are shown together.
132851
132913
  this.pre = this.cfg.divid + "_";
132852
132914
 
132853
- this.REVISION = '3.45.4';
132915
+ this.REVISION = '3.46.0';
132854
132916
 
132855
132917
  // In nodejs, iCn3D defines "window = {navigator: {}}", and added window = {navigator: {}, "__THREE__":"177"}
132856
132918
  this.bNode = (Object.keys(window).length < 3) ? true : false;