icn3d 3.45.7 → 3.46.1

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
@@ -53,10 +53,15 @@
53
53
  background: #eee;
54
54
  color: #333;
55
55
  }
56
-
56
+ /*
57
57
  .icn3d-menu .ui-menu-icons .ui-menu-item-wrapper, .ui-menu-icons .ui-menu-item {
58
58
  padding-left: 0.4em!important;
59
59
  }
60
+ */
61
+
62
+ .ui-menu-icons .ui-menu-item-wrapper, .ui-menu-icons .ui-menu-item {
63
+ padding-left: 3px!important;
64
+ }
60
65
 
61
66
  .icn3d-text {font-family: Verdana, Arial, Helvetica, sans-serif; font-size:12px!important;}
62
67
 
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/ai-tutor" target="_blank" style="color:#f8b84e" title="AI Tutor shows step-by-step instructions about how to build a custom view">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/ai-tutor' target='_blank' id='" + me.pre + "ai_help' class='icn3d-menu-color' style='color:#f8b84e' title='shows step-by-step instructions about how to build a custom view'>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/ai-tutor", "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,17 +74361,17 @@ class Scene {
74345
74361
  }
74346
74362
  }
74347
74363
 
74348
- if(!ic.perspectiveCamera) {
74364
+ // if(!ic.perspectiveCamera) {
74349
74365
  ic.perspectiveCamera = new PerspectiveCamera$1(20, ic.container.whratio, 0.1, 10000);
74350
74366
  ic.perspectiveCamera.position.set(0, 0, ic.cam_z);
74351
74367
  ic.perspectiveCamera.lookAt(new Vector3$1(0, 0, 0));
74352
- }
74368
+ // }
74353
74369
 
74354
- if(!ic.orthographicCamera) {
74370
+ // if(!ic.orthographicCamera) {
74355
74371
  ic.orthographicCamera = new OrthographicCamera$1();
74356
74372
  ic.orthographicCamera.position.set(0, 0, ic.cam_z);
74357
74373
  ic.orthographicCamera.lookAt(new Vector3$1(0, 0, 0));
74358
- }
74374
+ // }
74359
74375
 
74360
74376
  ic.cams = {
74361
74377
  perspective: ic.perspectiveCamera,
@@ -74538,10 +74554,10 @@ class Scene {
74538
74554
 
74539
74555
  if(!me.bNode) {
74540
74556
  $("#" + me.pre + "VRButton").remove();
74541
- $("#" + 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 ) );
74542
74558
 
74543
74559
  $("#" + me.pre + "ARButton").remove();
74544
- $("#" + 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 ) );
74545
74561
  }
74546
74562
  }
74547
74563
 
@@ -86369,7 +86385,7 @@ class Alternate {
86369
86385
  }
86370
86386
 
86371
86387
  ic.bShowHighlight = false;
86372
- ic.opts['rotationcenter'] = 'highlight center';
86388
+ // ic.opts['rotationcenter'] = 'highlight center';
86373
86389
  }
86374
86390
 
86375
86391
  // also alternating the surfaces
@@ -86409,9 +86425,20 @@ class Alternate {
86409
86425
 
86410
86426
  //ic.glycanCls.showGlycans();
86411
86427
 
86412
- // ic.opts['rotationcenter'] = 'highlight center';
86413
-
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;
86414
86440
  ic.drawCls.draw();
86441
+ // ic.bNotSetCamera = false;
86415
86442
 
86416
86443
  ic.bShowHighlight = true; //reset
86417
86444
  }
@@ -90823,17 +90850,17 @@ class AnnoPTM {
90823
90850
  else if( structure.length > 5 ) {
90824
90851
  let url = "https://www.ebi.ac.uk/proteins/api/features/" + structure;
90825
90852
  let data;
90826
- try {
90853
+ // try {
90827
90854
  data = await me.getAjaxPromise(url, 'json');
90828
90855
 
90829
90856
  thisClass.parsePTM(data, chnid, type);
90830
90857
  /// if(ic.deferredPTM !== undefined) ic.deferredPTM.resolve();
90831
- }
90832
- catch {
90833
- thisClass.getNoPTM(chnid, type);
90858
+ // }
90859
+ // catch {
90860
+ // thisClass.getNoPTM(chnid, type);
90834
90861
 
90835
- return;
90836
- }
90862
+ // return;
90863
+ // }
90837
90864
  }
90838
90865
  else { // PDB
90839
90866
  // get PDB to UniProt mapping
@@ -90843,15 +90870,13 @@ class AnnoPTM {
90843
90870
  let urlMap = "https://www.ebi.ac.uk/pdbe/api/mappings/uniprot/" + structLower;
90844
90871
 
90845
90872
  let dataMap;
90846
- try {
90873
+ // try {
90847
90874
  dataMap = await me.getAjaxPromise(urlMap, 'json');
90848
90875
 
90849
90876
  let UniProtID = '';
90850
90877
  if(!ic.UPResi2ResiPosPerChain) ic.UPResi2ResiPosPerChain = {};
90851
90878
  ic.UPResi2ResiPosPerChain[chnid] = {};
90852
90879
  let mapping = dataMap[structLower].UniProt;
90853
-
90854
- let bFound = false;
90855
90880
  for(let up in mapping) {
90856
90881
  let chainArray = mapping[up].mappings;
90857
90882
  //if(bFound) break;
@@ -90874,7 +90899,6 @@ class AnnoPTM {
90874
90899
  }
90875
90900
 
90876
90901
  if(UniProtID == '' || UniProtID.length != 6) UniProtID = up;
90877
- bFound = true;
90878
90902
  //break;
90879
90903
  }
90880
90904
  }
@@ -90894,24 +90918,24 @@ class AnnoPTM {
90894
90918
 
90895
90919
  let url = "https://www.ebi.ac.uk/proteins/api/features/" + UniProtID;
90896
90920
  let data;
90897
- try {
90921
+ // try {
90898
90922
  data = await me.getAjaxPromise(url, 'json');
90899
90923
  ic.annoPtmData[UniProtID] = data;
90900
90924
 
90901
90925
  thisClass.parsePTM(data, chnid, type);
90902
90926
  /// if(ic.deferredPTM !== undefined) ic.deferredPTM.resolve();
90903
- }
90904
- catch(err) {
90905
- thisClass.getNoPTM(chnid, type);
90906
- return;
90907
- }
90927
+ // }
90928
+ // catch(err) {
90929
+ // thisClass.getNoPTM(chnid, type);
90930
+ // return;
90931
+ // }
90908
90932
  }
90909
90933
  }
90910
- }
90911
- catch(err) {
90912
- thisClass.getNoPTM(chnid, type);
90913
- return;
90914
- }
90934
+ // }
90935
+ // catch(err) {
90936
+ // thisClass.getNoPTM(chnid, type);
90937
+ // return;
90938
+ // }
90915
90939
  }
90916
90940
  }
90917
90941
 
@@ -90978,7 +91002,7 @@ class AnnoPTM {
90978
91002
  html += '<div id="' + ic.pre + chnid + '_' + type + 'seq_sequence" class="icn3d-cdd icn3d-dl_sequence">';
90979
91003
  html2 += html;
90980
91004
  html3 += html;
90981
- chnid.substr(0, chnid.indexOf('_'));
91005
+ let structure = chnid.substr(0, chnid.indexOf('_'));
90982
91006
 
90983
91007
  for(let ptm in ptmHash) {
90984
91008
  let ptmArray = ptmHash[ptm];
@@ -90990,7 +91014,7 @@ class AnnoPTM {
90990
91014
  let end = parseInt(ptmArray[i].end);
90991
91015
 
90992
91016
  for(let j = begin; j <= end; ++j) {
90993
- if(stucture.length > 5) { // UniProt
91017
+ if(structure.length > 5) { // UniProt
90994
91018
  resPosArray.push(j - 1); // 0-based
90995
91019
  }
90996
91020
  else { // PDB
@@ -96104,6 +96128,7 @@ class AddTrack {
96104
96128
  for(let j = 0, jl = trackSeqArray.length; j < jl; ++j) {
96105
96129
  let resi = startpos;
96106
96130
  let text = '';
96131
+
96107
96132
  for(let k = 0; k < ic.startposGiSeq; ++k) {
96108
96133
  if(ic.targetGapHash.hasOwnProperty(k)) {
96109
96134
  for(let m = 0; m < ic.targetGapHash[k].to - ic.targetGapHash[k].from + 1; ++m) {
@@ -97199,6 +97224,8 @@ class ShowAnno {
97199
97224
  let chemical_chainid = result.chemical_chainid;
97200
97225
  let chemical_set = result.chemical_set;
97201
97226
 
97227
+ let bAnnoShownPrev = ic.bAnnoShown;
97228
+
97202
97229
  if(!ic.bAnnoShown || ic.bResetAnno) { // ic.bResetAnno when loading another structure
97203
97230
  // assign early to avoid load annotations twice
97204
97231
  ic.bAnnoShown = true;
@@ -97295,7 +97322,7 @@ class ShowAnno {
97295
97322
  }
97296
97323
  //ic.bAnnoShown = true;
97297
97324
 
97298
- 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) {
97299
97326
  ic.bRunRefnumAgain = true;
97300
97327
  await ic.annotationCls.setAnnoTabIg();
97301
97328
 
@@ -101420,10 +101447,18 @@ class ViewInterPairs {
101420
101447
 
101421
101448
  $("#" + ic.pre + "dl_interactionsorted_html").html(html);
101422
101449
  me.htmlCls.dialogCls.openDlg('dl_interactionsorted', 'Show sorted interactions');
101450
+
101451
+ if(me.bNode) {
101452
+ console.log(html);
101453
+ }
101423
101454
  }
101424
101455
  else if(type == 'view') {
101425
101456
  $("#" + ic.pre + "dl_allinteraction_html").html(html);
101426
101457
  me.htmlCls.dialogCls.openDlg('dl_allinteraction', 'Show interactions');
101458
+
101459
+ if(me.bNode) {
101460
+ console.log(html);
101461
+ }
101427
101462
  }
101428
101463
  else if(type == 'linegraph') {
101429
101464
  me.htmlCls.dialogCls.openDlg('dl_linegraph', 'Show interactions between two lines of residue nodes');
@@ -101432,6 +101467,12 @@ class ViewInterPairs {
101432
101467
  // draw SVG
101433
101468
  let svgHtml = ic.lineGraphCls.drawLineGraph(ic.graphStr);
101434
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
+ }
101435
101476
  }
101436
101477
  else if(type == 'scatterplot') {
101437
101478
  me.htmlCls.dialogCls.openDlg('dl_scatterplot', 'Show interactions as scatterplot');
@@ -101440,6 +101481,12 @@ class ViewInterPairs {
101440
101481
  // draw SVG
101441
101482
  let svgHtml = ic.lineGraphCls.drawLineGraph(ic.graphStr, true);
101442
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
+ }
101443
101490
  }
101444
101491
  else if(type == 'ligplot') {
101445
101492
  await ic.ligplotCls.drawLigplot(atomSet1);
@@ -104171,7 +104218,7 @@ class ChainalignParser {
104171
104218
  targetOrQuery = 'query';
104172
104219
  bAppend = true;
104173
104220
  }
104174
- console.log("### i " + i + " structArray[i] " + structArray[i]);
104221
+
104175
104222
  //if(structArray[i].length > 4) {
104176
104223
  if(isNaN(structArray[i]) && structArray[i].length > 5) { // PDB ID plus postfix could be 5
104177
104224
  //let bNoDssp = true;
@@ -104189,8 +104236,8 @@ console.log("### i " + i + " structArray[i] " + structArray[i]);
104189
104236
  // hAtoms = me.hashUtilsCls.unionHash(hAtoms, hAtomsTmp);
104190
104237
  }
104191
104238
 
104192
- let structArrayAll = structArray; //Object.keys(ic.structures);
104193
- console.log("### ic.chains: " + JSON.stringify(ic.chains) + " ic.structures " + JSON.stringify(ic.structures));
104239
+ let structArrayAll = Object.keys(ic.structures);
104240
+
104194
104241
  ic.opts['color'] = (structArrayAll.length > 1) ? 'structure' : ((structArrayAll[0].length > 5) ? 'confidence' : 'chain');
104195
104242
 
104196
104243
  // add color for all structures
@@ -112976,7 +113023,7 @@ class SetSeqAlign {
112976
113023
 
112977
113024
  for(let i = 0, il = ic.qt_start_end[index].length; i < il; ++i) {
112978
113025
  let start1, start2, end1, end2, resiStart1, start1Pos, end1Pos;
112979
-
113026
+
112980
113027
  start1 = ic.qt_start_end[index][i].t_start;
112981
113028
  start2 = ic.qt_start_end[index][i].q_start;
112982
113029
  end1 = ic.qt_start_end[index][i].t_end;
@@ -119189,16 +119236,16 @@ class LoadScript {
119189
119236
  if(lastCommand.indexOf('load') !== -1) {
119190
119237
  await thisClass.applyCommandLoad(lastCommand);
119191
119238
  }
119192
- 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) {
119193
119240
  await thisClass.applyCommandMap(lastCommand);
119194
119241
  }
119195
- 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) {
119196
119243
  await thisClass.applyCommandEmmap(lastCommand);
119197
119244
  }
119198
- else if(lastCommand.indexOf('set phi') !== -1) {
119245
+ else if(lastCommand.indexOf('set phi') == 0) {
119199
119246
  await ic.delphiCls.applyCommandPhi(lastCommand);
119200
119247
  }
119201
- else if(lastCommand.indexOf('set delphi') !== -1) {
119248
+ else if(lastCommand.indexOf('set delphi') == 0) {
119202
119249
  await ic.delphiCls.applyCommandDelphi(lastCommand);
119203
119250
  }
119204
119251
  else if(lastCommand.indexOf('view annotations') == 0
@@ -119903,6 +119950,14 @@ class SelectByCommand {
119903
119950
  // wild card * can be used to select all
119904
119951
  //var currHighlightAtoms = {}
119905
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
+
119906
119961
  let dollarPos = commandArray[i].indexOf('$');
119907
119962
  let periodPos = commandArray[i].indexOf('.');
119908
119963
  let colonPos = commandArray[i].indexOf(':');
@@ -124377,6 +124432,7 @@ console.log("free energy: " + energy + " kcal/mol");
124377
124432
  ic.saveFileCls.saveFile(file_pref + '_icn3d_' + postfix + '.pdb', 'text', [data]);
124378
124433
  }
124379
124434
  else {
124435
+ console.log(data);
124380
124436
  return data;
124381
124437
  }
124382
124438
  }
@@ -127939,6 +127995,7 @@ class ResizeCanvas {
127939
127995
 
127940
127996
  if(ic.structures && Object.keys(ic.structures).length > 0 && (bDraw === undefined || bDraw)) {
127941
127997
  ic.drawCls.draw();
127998
+ // ic.drawCls.render();
127942
127999
  }
127943
128000
  }
127944
128001
  }
@@ -128168,7 +128225,8 @@ class Transform {
128168
128225
  //Set the orientation to the original one, but leave the style, color, etc alone.
128169
128226
  resetOrientation() { let ic = this.icn3d; ic.icn3dui;
128170
128227
  if(ic.commands.length > 0) {
128171
- let commandTransformation = ic.commands[0].split('|||');
128228
+ // let commandTransformation = ic.commands[0].split('|||');
128229
+ let commandTransformation = ic.commands[ic.commands.length-1].split('|||');
128172
128230
 
128173
128231
  this.resetOrientation_base(commandTransformation);
128174
128232
  }
@@ -132854,7 +132912,7 @@ class iCn3DUI {
132854
132912
  //even when multiple iCn3D viewers are shown together.
132855
132913
  this.pre = this.cfg.divid + "_";
132856
132914
 
132857
- this.REVISION = '3.45.4';
132915
+ this.REVISION = '3.46.0';
132858
132916
 
132859
132917
  // In nodejs, iCn3D defines "window = {navigator: {}}", and added window = {navigator: {}, "__THREE__":"177"}
132860
132918
  this.bNode = (Object.keys(window).length < 3) ? true : false;