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/icn3d.module.js CHANGED
@@ -57178,7 +57178,8 @@ class ClickMenu {
57178
57178
  else if(id == 'mn6_selectannotations') {
57179
57179
  html += "</td><td valign='top'>";
57180
57180
  }
57181
- else if(id == 'abouticn3d') {
57181
+ //!!!else if(id == 'abouticn3d') {
57182
+ else if(id == 'ai_help') {
57182
57183
  html += "</td><td valign='top'>";
57183
57184
  }
57184
57185
 
@@ -59801,6 +59802,8 @@ class SetMenu {
59801
59802
  html += tdStr + "<div style='position:relative; margin-left:6px;'>" + str1;
59802
59803
  html += "<div class='icn3d-commandTitle' style='min-width:40px; margin-top: 3px; white-space: nowrap;'>" + str2;
59803
59804
 
59805
+ //!!!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>';
59806
+
59804
59807
  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>';
59805
59808
 
59806
59809
  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>';
@@ -59931,6 +59934,8 @@ class SetMenu {
59931
59934
  html += "<li><div style='position:relative; margin-top:-6px;'>" + str1;
59932
59935
  html += "<div class='icn3d-commandTitle' style='margin-top: 3px; white-space: nowrap;'>" + str2;
59933
59936
 
59937
+ //!!!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>";
59938
+
59934
59939
  //if(me.cfg.align !== undefined) {
59935
59940
  html += "<li><span id='" + me.pre + "alternate2' class='icn3d-menu-color' title='Alternate the structures'>Alternate</span>";
59936
59941
  //}
@@ -60812,7 +60817,7 @@ class SetMenu {
60812
60817
  }
60813
60818
  else {
60814
60819
  html += this.getRadio('mn3_lig', 'mn3_ligStick', 'Stick', undefined, 1, 2);
60815
- html += this.getRadio('mn3_lig', 'mn3_ligBallstick', 'BalHydrogensl and Stick', true, 1, 2);
60820
+ html += this.getRadio('mn3_lig', 'mn3_ligBallstick', 'Ball and Stick', true, 1, 2);
60816
60821
  }
60817
60822
  html += this.getRadio('mn3_lig', 'mn3_ligSchematic', 'Schematic', undefined, 1, 2);
60818
60823
  html += this.getRadio('mn3_lig', 'mn3_ligSphere', 'Sphere', undefined, 1, 2);
@@ -61603,6 +61608,9 @@ class SetMenu {
61603
61608
 
61604
61609
  html += "<ul class='icn3d-mn-item'>";
61605
61610
 
61611
+ //!!!
61612
+ html += this.getMenuUrl('ai_help', "https://vizomics.org/icn3d-platform.html#ai_help", "AI Tutor" + me.htmlCls.wifiStr, 1, 1);
61613
+
61606
61614
  html += this.getMenuUrl('abouticn3d', me.htmlCls.baseUrl + "icn3d/icn3d.html#about", "About iCn3D<span style='font-size:0.9em'> " + me.REVISION + "</span>", 1, 1);
61607
61615
 
61608
61616
  html += this.getMenuUrl('gallery', me.htmlCls.baseUrl + "icn3d/icn3d.html#gallery", "Live Gallery " + me.htmlCls.wifiStr, 1, 1);
@@ -61658,7 +61666,7 @@ class SetMenu {
61658
61666
  html += "</ul>";
61659
61667
  html += "</li>";
61660
61668
 
61661
- html += this.getMenuUrl('helpdoc', me.htmlCls.baseUrl + "icn3d/docs/icn3d_help.html", "Help Doc " + me.htmlCls.wifiStr, 1, 1);
61669
+ // html += this.getMenuUrl('helpdoc', me.htmlCls.baseUrl + "icn3d/docs/icn3d_help.html", "Help Doc " + me.htmlCls.wifiStr, 1, 1);
61662
61670
 
61663
61671
  html += this.getMenuSep();
61664
61672
 
@@ -67722,6 +67730,8 @@ class SetHtml {
67722
67730
  if(selType) me.htmlCls.allMenusSel[id] = selType;
67723
67731
  if(bSimpleMenu) me.htmlCls.simpleMenus[id] = 1;
67724
67732
 
67733
+ if(id == 'ai_help') text = "<span style='color:#f8b84e'>" + text + "</span>";
67734
+
67725
67735
  return "<li><a id='" + me.pre + id + "' href='" + url + "' target='_blank'>" + text + "</a></li>";
67726
67736
  }
67727
67737
 
@@ -68633,6 +68643,9 @@ class SetHtml {
68633
68643
  let file_pref = Object.keys(me.utilsCls.getHlStructures()).join(',');
68634
68644
  ic.saveFileCls.saveFile(file_pref + '_icn3d.pdb', 'text', [pdbStr]);
68635
68645
  }
68646
+ else {
68647
+ console.log(pdbStr);
68648
+ }
68636
68649
 
68637
68650
  return pdbStr;
68638
68651
  }
@@ -68646,6 +68659,9 @@ class SetHtml {
68646
68659
  let file_pref = Object.keys(me.utilsCls.getHlStructures()).join(',');
68647
68660
  ic.saveFileCls.saveFile(file_pref + '_icn3d_ss.txt', 'text', [secondaryStr]);
68648
68661
  }
68662
+ else {
68663
+ console.log(secondaryStr);
68664
+ }
68649
68665
 
68650
68666
  return secondaryStr;
68651
68667
  }
@@ -75050,20 +75066,20 @@ class Scene {
75050
75066
  if(options === undefined) options = ic.opts;
75051
75067
 
75052
75068
  // whether camera was set
75053
- me.bCamera = (ic.cam) ? true : false;
75069
+ // me.bCamera = (ic.cam) ? true : false;
75054
75070
 
75055
75071
  this.rebuildSceneBase(options);
75056
75072
 
75057
75073
  ic.fogCls.setFog();
75058
75074
 
75059
- if(!ic.cam || ic.bChangeCamera) {
75060
- ic.cameraCls.setCamera();
75075
+ // if(!ic.cam || ic.bChangeCamera) {
75076
+ if(!ic.bNotSetCamera) ic.cameraCls.setCamera();
75061
75077
  // set the ratio for view point, which was set in ic.transformCls.resetOrientation_base
75062
75078
  if(!ic.container.whratio) {
75063
75079
  ic.container.whratio = me.htmlCls.WIDTH / me.htmlCls.HEIGHT;
75064
75080
  ic.cam.aspect = ic.container.whratio;
75065
75081
  }
75066
- }
75082
+ // }
75067
75083
 
75068
75084
  if(ic.opts['slab'] === 'yes') ic.cameraCls.setSlab();
75069
75085
 
@@ -75246,13 +75262,17 @@ class Scene {
75246
75262
  }
75247
75263
  }
75248
75264
 
75249
- ic.perspectiveCamera = new PerspectiveCamera$1(20, ic.container.whratio, 0.1, 10000);
75250
- ic.perspectiveCamera.position.set(0, 0, ic.cam_z);
75251
- ic.perspectiveCamera.lookAt(new Vector3$1(0, 0, 0));
75265
+ // if(!ic.perspectiveCamera) {
75266
+ ic.perspectiveCamera = new PerspectiveCamera$1(20, ic.container.whratio, 0.1, 10000);
75267
+ ic.perspectiveCamera.position.set(0, 0, ic.cam_z);
75268
+ ic.perspectiveCamera.lookAt(new Vector3$1(0, 0, 0));
75269
+ // }
75252
75270
 
75253
- ic.orthographicCamera = new OrthographicCamera$1();
75254
- ic.orthographicCamera.position.set(0, 0, ic.cam_z);
75255
- ic.orthographicCamera.lookAt(new Vector3$1(0, 0, 0));
75271
+ // if(!ic.orthographicCamera) {
75272
+ ic.orthographicCamera = new OrthographicCamera$1();
75273
+ ic.orthographicCamera.position.set(0, 0, ic.cam_z);
75274
+ ic.orthographicCamera.lookAt(new Vector3$1(0, 0, 0));
75275
+ // }
75256
75276
 
75257
75277
  ic.cams = {
75258
75278
  perspective: ic.perspectiveCamera,
@@ -75435,10 +75455,10 @@ class Scene {
75435
75455
 
75436
75456
  if(!me.bNode) {
75437
75457
  $("#" + me.pre + "VRButton").remove();
75438
- $("#" + me.pre + "viewer").get(0).appendChild( ic.VRButtonCls.createButton( ic.renderer ) );
75458
+ if($("#" + me.pre + "viewer").get(0)) $("#" + me.pre + "viewer").get(0).appendChild( ic.VRButtonCls.createButton( ic.renderer ) );
75439
75459
 
75440
75460
  $("#" + me.pre + "ARButton").remove();
75441
- $("#" + me.pre + "viewer").get(0).appendChild( ic.ARButtonCls.createButton( ic.renderer ) );
75461
+ if($("#" + me.pre + "viewer").get(0)) $("#" + me.pre + "viewer").get(0).appendChild( ic.ARButtonCls.createButton( ic.renderer ) );
75442
75462
  }
75443
75463
  }
75444
75464
 
@@ -87266,7 +87286,7 @@ class Alternate {
87266
87286
  }
87267
87287
 
87268
87288
  ic.bShowHighlight = false;
87269
- ic.opts['rotationcenter'] = 'highlight center';
87289
+ // ic.opts['rotationcenter'] = 'highlight center';
87270
87290
  }
87271
87291
 
87272
87292
  // also alternating the surfaces
@@ -87306,9 +87326,20 @@ class Alternate {
87306
87326
 
87307
87327
  //ic.glycanCls.showGlycans();
87308
87328
 
87309
- // ic.opts['rotationcenter'] = 'highlight center';
87310
-
87329
+ // ic.opts['rotationcenter'] = 'highlight center';
87330
+
87331
+ // zoomin at the beginning
87332
+
87333
+ if(ic.ALTERNATE_STRUCTURE == 0) { // default -1, so when it is 0, it is the first time
87334
+ ic.transformCls.zoominSelection();
87335
+ }
87336
+
87337
+ //ic.transformCls.resetOrientation(); // reset camera view point
87338
+ // ic.drawCls.applyTransformation(ic._zoomFactor, ic.mouseChange, ic.quaternion);
87339
+
87340
+ // ic.bNotSetCamera = true;
87311
87341
  ic.drawCls.draw();
87342
+ // ic.bNotSetCamera = false;
87312
87343
 
87313
87344
  ic.bShowHighlight = true; //reset
87314
87345
  }
@@ -91720,17 +91751,17 @@ class AnnoPTM {
91720
91751
  else if( structure.length > 5 ) {
91721
91752
  let url = "https://www.ebi.ac.uk/proteins/api/features/" + structure;
91722
91753
  let data;
91723
- try {
91754
+ // try {
91724
91755
  data = await me.getAjaxPromise(url, 'json');
91725
91756
 
91726
91757
  thisClass.parsePTM(data, chnid, type);
91727
91758
  /// if(ic.deferredPTM !== undefined) ic.deferredPTM.resolve();
91728
- }
91729
- catch {
91730
- thisClass.getNoPTM(chnid, type);
91759
+ // }
91760
+ // catch {
91761
+ // thisClass.getNoPTM(chnid, type);
91731
91762
 
91732
- return;
91733
- }
91763
+ // return;
91764
+ // }
91734
91765
  }
91735
91766
  else { // PDB
91736
91767
  // get PDB to UniProt mapping
@@ -91740,15 +91771,13 @@ class AnnoPTM {
91740
91771
  let urlMap = "https://www.ebi.ac.uk/pdbe/api/mappings/uniprot/" + structLower;
91741
91772
 
91742
91773
  let dataMap;
91743
- try {
91774
+ // try {
91744
91775
  dataMap = await me.getAjaxPromise(urlMap, 'json');
91745
91776
 
91746
91777
  let UniProtID = '';
91747
91778
  if(!ic.UPResi2ResiPosPerChain) ic.UPResi2ResiPosPerChain = {};
91748
91779
  ic.UPResi2ResiPosPerChain[chnid] = {};
91749
91780
  let mapping = dataMap[structLower].UniProt;
91750
-
91751
- let bFound = false;
91752
91781
  for(let up in mapping) {
91753
91782
  let chainArray = mapping[up].mappings;
91754
91783
  //if(bFound) break;
@@ -91771,7 +91800,6 @@ class AnnoPTM {
91771
91800
  }
91772
91801
 
91773
91802
  if(UniProtID == '' || UniProtID.length != 6) UniProtID = up;
91774
- bFound = true;
91775
91803
  //break;
91776
91804
  }
91777
91805
  }
@@ -91791,24 +91819,24 @@ class AnnoPTM {
91791
91819
 
91792
91820
  let url = "https://www.ebi.ac.uk/proteins/api/features/" + UniProtID;
91793
91821
  let data;
91794
- try {
91822
+ // try {
91795
91823
  data = await me.getAjaxPromise(url, 'json');
91796
91824
  ic.annoPtmData[UniProtID] = data;
91797
91825
 
91798
91826
  thisClass.parsePTM(data, chnid, type);
91799
91827
  /// if(ic.deferredPTM !== undefined) ic.deferredPTM.resolve();
91800
- }
91801
- catch(err) {
91802
- thisClass.getNoPTM(chnid, type);
91803
- return;
91804
- }
91828
+ // }
91829
+ // catch(err) {
91830
+ // thisClass.getNoPTM(chnid, type);
91831
+ // return;
91832
+ // }
91805
91833
  }
91806
91834
  }
91807
- }
91808
- catch(err) {
91809
- thisClass.getNoPTM(chnid, type);
91810
- return;
91811
- }
91835
+ // }
91836
+ // catch(err) {
91837
+ // thisClass.getNoPTM(chnid, type);
91838
+ // return;
91839
+ // }
91812
91840
  }
91813
91841
  }
91814
91842
 
@@ -91875,7 +91903,7 @@ class AnnoPTM {
91875
91903
  html += '<div id="' + ic.pre + chnid + '_' + type + 'seq_sequence" class="icn3d-cdd icn3d-dl_sequence">';
91876
91904
  html2 += html;
91877
91905
  html3 += html;
91878
- chnid.substr(0, chnid.indexOf('_'));
91906
+ let structure = chnid.substr(0, chnid.indexOf('_'));
91879
91907
 
91880
91908
  for(let ptm in ptmHash) {
91881
91909
  let ptmArray = ptmHash[ptm];
@@ -91887,7 +91915,7 @@ class AnnoPTM {
91887
91915
  let end = parseInt(ptmArray[i].end);
91888
91916
 
91889
91917
  for(let j = begin; j <= end; ++j) {
91890
- if(stucture.length > 5) { // UniProt
91918
+ if(structure.length > 5) { // UniProt
91891
91919
  resPosArray.push(j - 1); // 0-based
91892
91920
  }
91893
91921
  else { // PDB
@@ -97001,6 +97029,7 @@ class AddTrack {
97001
97029
  for(let j = 0, jl = trackSeqArray.length; j < jl; ++j) {
97002
97030
  let resi = startpos;
97003
97031
  let text = '';
97032
+
97004
97033
  for(let k = 0; k < ic.startposGiSeq; ++k) {
97005
97034
  if(ic.targetGapHash.hasOwnProperty(k)) {
97006
97035
  for(let m = 0; m < ic.targetGapHash[k].to - ic.targetGapHash[k].from + 1; ++m) {
@@ -98096,6 +98125,8 @@ class ShowAnno {
98096
98125
  let chemical_chainid = result.chemical_chainid;
98097
98126
  let chemical_set = result.chemical_set;
98098
98127
 
98128
+ let bAnnoShownPrev = ic.bAnnoShown;
98129
+
98099
98130
  if(!ic.bAnnoShown || ic.bResetAnno) { // ic.bResetAnno when loading another structure
98100
98131
  // assign early to avoid load annotations twice
98101
98132
  ic.bAnnoShown = true;
@@ -98192,7 +98223,7 @@ class ShowAnno {
98192
98223
  }
98193
98224
  //ic.bAnnoShown = true;
98194
98225
 
98195
- if($("#" + ic.pre + "anno_ig").length && $("#" + ic.pre + "anno_ig")[0].checked) {
98226
+ if($("#" + ic.pre + "anno_ig").length && $("#" + ic.pre + "anno_ig")[0].checked && !bAnnoShownPrev) {
98196
98227
  ic.bRunRefnumAgain = true;
98197
98228
  await ic.annotationCls.setAnnoTabIg();
98198
98229
 
@@ -102317,10 +102348,18 @@ class ViewInterPairs {
102317
102348
 
102318
102349
  $("#" + ic.pre + "dl_interactionsorted_html").html(html);
102319
102350
  me.htmlCls.dialogCls.openDlg('dl_interactionsorted', 'Show sorted interactions');
102351
+
102352
+ if(me.bNode) {
102353
+ console.log(html);
102354
+ }
102320
102355
  }
102321
102356
  else if(type == 'view') {
102322
102357
  $("#" + ic.pre + "dl_allinteraction_html").html(html);
102323
102358
  me.htmlCls.dialogCls.openDlg('dl_allinteraction', 'Show interactions');
102359
+
102360
+ if(me.bNode) {
102361
+ console.log(html);
102362
+ }
102324
102363
  }
102325
102364
  else if(type == 'linegraph') {
102326
102365
  me.htmlCls.dialogCls.openDlg('dl_linegraph', 'Show interactions between two lines of residue nodes');
@@ -102329,6 +102368,12 @@ class ViewInterPairs {
102329
102368
  // draw SVG
102330
102369
  let svgHtml = ic.lineGraphCls.drawLineGraph(ic.graphStr);
102331
102370
  $("#" + ic.pre + "linegraphDiv").html(svgHtml);
102371
+
102372
+ if(me.bNode) {
102373
+ let graphStr2 = ic.lineGraphStr.substr(0, ic.lineGraphStr.lastIndexOf('}'));
102374
+ graphStr2 += me.htmlCls.setHtmlCls.getLinkColor();
102375
+ console.log(graphStr2);
102376
+ }
102332
102377
  }
102333
102378
  else if(type == 'scatterplot') {
102334
102379
  me.htmlCls.dialogCls.openDlg('dl_scatterplot', 'Show interactions as scatterplot');
@@ -102337,6 +102382,12 @@ class ViewInterPairs {
102337
102382
  // draw SVG
102338
102383
  let svgHtml = ic.lineGraphCls.drawLineGraph(ic.graphStr, true);
102339
102384
  $("#" + ic.pre + "scatterplotDiv").html(svgHtml);
102385
+
102386
+ if(me.bNode) {
102387
+ let graphStr2 = ic.scatterplotStr.substr(0, ic.scatterplotStr.lastIndexOf('}'));
102388
+ graphStr2 += me.htmlCls.setHtmlCls.getLinkColor();
102389
+ console.log(graphStr2);
102390
+ }
102340
102391
  }
102341
102392
  else if(type == 'ligplot') {
102342
102393
  await ic.ligplotCls.drawLigplot(atomSet1);
@@ -105068,7 +105119,7 @@ class ChainalignParser {
105068
105119
  targetOrQuery = 'query';
105069
105120
  bAppend = true;
105070
105121
  }
105071
- console.log("### i " + i + " structArray[i] " + structArray[i]);
105122
+
105072
105123
  //if(structArray[i].length > 4) {
105073
105124
  if(isNaN(structArray[i]) && structArray[i].length > 5) { // PDB ID plus postfix could be 5
105074
105125
  //let bNoDssp = true;
@@ -105086,8 +105137,8 @@ console.log("### i " + i + " structArray[i] " + structArray[i]);
105086
105137
  // hAtoms = me.hashUtilsCls.unionHash(hAtoms, hAtomsTmp);
105087
105138
  }
105088
105139
 
105089
- let structArrayAll = structArray; //Object.keys(ic.structures);
105090
- console.log("### ic.chains: " + JSON.stringify(ic.chains) + " ic.structures " + JSON.stringify(ic.structures));
105140
+ let structArrayAll = Object.keys(ic.structures);
105141
+
105091
105142
  ic.opts['color'] = (structArrayAll.length > 1) ? 'structure' : ((structArrayAll[0].length > 5) ? 'confidence' : 'chain');
105092
105143
 
105093
105144
  // add color for all structures
@@ -113873,7 +113924,7 @@ class SetSeqAlign {
113873
113924
 
113874
113925
  for(let i = 0, il = ic.qt_start_end[index].length; i < il; ++i) {
113875
113926
  let start1, start2, end1, end2, resiStart1, start1Pos, end1Pos;
113876
-
113927
+
113877
113928
  start1 = ic.qt_start_end[index][i].t_start;
113878
113929
  start2 = ic.qt_start_end[index][i].q_start;
113879
113930
  end1 = ic.qt_start_end[index][i].t_end;
@@ -120086,16 +120137,16 @@ class LoadScript {
120086
120137
  if(lastCommand.indexOf('load') !== -1) {
120087
120138
  await thisClass.applyCommandLoad(lastCommand);
120088
120139
  }
120089
- else if(lastCommand.indexOf('set map') !== -1 && lastCommand.indexOf('set map wireframe') === -1) {
120140
+ else if(lastCommand.indexOf('set map') == 0 && lastCommand.indexOf('set map wireframe') == 0) {
120090
120141
  await thisClass.applyCommandMap(lastCommand);
120091
120142
  }
120092
- else if(lastCommand.indexOf('set emmap') !== -1 && lastCommand.indexOf('set emmap wireframe') === -1) {
120143
+ else if(lastCommand.indexOf('set emmap') == 0 && lastCommand.indexOf('set emmap wireframe') == 0) {
120093
120144
  await thisClass.applyCommandEmmap(lastCommand);
120094
120145
  }
120095
- else if(lastCommand.indexOf('set phi') !== -1) {
120146
+ else if(lastCommand.indexOf('set phi') == 0) {
120096
120147
  await ic.delphiCls.applyCommandPhi(lastCommand);
120097
120148
  }
120098
- else if(lastCommand.indexOf('set delphi') !== -1) {
120149
+ else if(lastCommand.indexOf('set delphi') == 0) {
120099
120150
  await ic.delphiCls.applyCommandDelphi(lastCommand);
120100
120151
  }
120101
120152
  else if(lastCommand.indexOf('view annotations') == 0
@@ -120800,6 +120851,14 @@ class SelectByCommand {
120800
120851
  // wild card * can be used to select all
120801
120852
  //var currHighlightAtoms = {}
120802
120853
 
120854
+ // convert 1TOP_A:20 to $1TOP.A:20
120855
+ if(commandArray[i].indexOf('_') !== -1) {
120856
+ let itemArray = commandArray[i].split('_');
120857
+ if(itemArray.length ==2 ) {
120858
+ commandArray[i] = '$' + itemArray[0] + '.' + itemArray[1];
120859
+ }
120860
+ }
120861
+
120803
120862
  let dollarPos = commandArray[i].indexOf('$');
120804
120863
  let periodPos = commandArray[i].indexOf('.');
120805
120864
  let colonPos = commandArray[i].indexOf(':');
@@ -125274,6 +125333,7 @@ console.log("free energy: " + energy + " kcal/mol");
125274
125333
  ic.saveFileCls.saveFile(file_pref + '_icn3d_' + postfix + '.pdb', 'text', [data]);
125275
125334
  }
125276
125335
  else {
125336
+ console.log(data);
125277
125337
  return data;
125278
125338
  }
125279
125339
  }
@@ -128836,6 +128896,7 @@ class ResizeCanvas {
128836
128896
 
128837
128897
  if(ic.structures && Object.keys(ic.structures).length > 0 && (bDraw === undefined || bDraw)) {
128838
128898
  ic.drawCls.draw();
128899
+ // ic.drawCls.render();
128839
128900
  }
128840
128901
  }
128841
128902
  }
@@ -129065,7 +129126,8 @@ class Transform {
129065
129126
  //Set the orientation to the original one, but leave the style, color, etc alone.
129066
129127
  resetOrientation() { let ic = this.icn3d; ic.icn3dui;
129067
129128
  if(ic.commands.length > 0) {
129068
- let commandTransformation = ic.commands[0].split('|||');
129129
+ // let commandTransformation = ic.commands[0].split('|||');
129130
+ let commandTransformation = ic.commands[ic.commands.length-1].split('|||');
129069
129131
 
129070
129132
  this.resetOrientation_base(commandTransformation);
129071
129133
  }
@@ -133751,7 +133813,7 @@ class iCn3DUI {
133751
133813
  //even when multiple iCn3D viewers are shown together.
133752
133814
  this.pre = this.cfg.divid + "_";
133753
133815
 
133754
- this.REVISION = '3.45.4';
133816
+ this.REVISION = '3.46.0';
133755
133817
 
133756
133818
  // In nodejs, iCn3D defines "window = {navigator: {}}", and added window = {navigator: {}, "__THREE__":"177"}
133757
133819
  this.bNode = (Object.keys(window).length < 3) ? true : false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icn3d",
3
- "version": "3.45.6",
3
+ "version": "3.46.0",
4
4
  "main": "./icn3d.js",
5
5
  "exports": {
6
6
  ".": {