icn3d 3.54.4 → 3.54.5

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.js CHANGED
@@ -81818,7 +81818,7 @@ class Axes {
81818
81818
 
81819
81819
  buildUnitcell() { let ic = this.icn3d, me = ic.icn3dui;
81820
81820
  if(!ic.cell) {
81821
- var aaa = 1; //alert("Unit cell information is available for structures from mmCIF files. Please load a structure from mmCIF file.");
81821
+ var aaa = 1; //alert("Unit cell information is available for structures from mmCIF files. Please load a structure with 'mmcifid=', 'bcifid=', or from a mmCIF file.");
81822
81822
  return;
81823
81823
  }
81824
81824
 
@@ -115768,7 +115768,8 @@ class ShowAnno {
115768
115768
  }
115769
115769
 
115770
115770
  let nucleotide_chainid = {}, chemical_chainid = {}, chemical_set = {};
115771
- //ic.protein_chainid = {};
115771
+ // ic.protein_chainid = {};
115772
+
115772
115773
 
115773
115774
  if(ic.bAnnoShown === undefined || !ic.bAnnoShown || ic.bResetAnno) { // ic.bResetAnno when loading another structure
115774
115775
  ic.protein_chainid = {};
@@ -115795,7 +115796,7 @@ class ShowAnno {
115795
115796
  dialogWidth =(me.cfg.notebook) ? me.htmlCls.WIDTH / 2 : $("#" + ic.pre + "dl_selectannotations").dialog( "option", "width" );
115796
115797
  }
115797
115798
  ic.seqAnnWidth = dialogWidth - 120 - 30*2 - 50; // title: 120px, start and end resi: 30px, extra space on the left and right: 50px
115798
-
115799
+
115799
115800
  for(let i = 0, il = chainArray.length; i < il; ++i) {
115800
115801
  if(!ic.chainsSeq[chainArray[i]]) continue; // skip empty chain
115801
115802
 
@@ -115905,8 +115906,8 @@ class ShowAnno {
115905
115906
 
115906
115907
  await ic.mmcifParserCls.downloadMmcifSymmetry(id, 'mmtfid');
115907
115908
  }
115908
-
115909
- await this.showAnnoSeqData(nucleotide_chainid, chemical_chainid, chemical_set);
115909
+
115910
+ await this.showAnnoSeqData(nucleotide_chainid, chemical_chainid, chemical_set);
115910
115911
  }
115911
115912
  }
115912
115913
  else if(me.cfg.blast_rep_id !== undefined && !ic.bSmithwm && !ic.bLocalSmithwm) { // align sequence to structure
@@ -134747,6 +134748,7 @@ class LoadCIF {
134747
134748
  let sChain = {};
134748
134749
  let prevModelNum = '';
134749
134750
  if(!ic.molid2chain) ic.molid2chain = {};
134751
+
134750
134752
  for (let i = 0; i < atomSize; ++i) {
134751
134753
  let modelNum = modelNumArray.getString(i);
134752
134754
  if(i > 0 && modelNum != prevModelNum) {
@@ -134977,7 +134979,7 @@ class LoadCIF {
134977
134979
  // if(oriResidueNum !== prevOriResidueNum) {
134978
134980
  if(oriResidueNum !== prevOriResidueNum || chain + "_" + resn != prevResn || prevAutochain != autochain) {
134979
134981
  let residue = me.utilsCls.residueName2Abbr(resn);
134980
-
134982
+
134981
134983
  ic.residueId2Name[residueNum] = residue;
134982
134984
 
134983
134985
  if(serial !== 1 && prevResidueNum !== '') {
@@ -135102,7 +135104,7 @@ class LoadCIF {
135102
135104
 
135103
135105
  resiArray = oriResiArray = resnArray = chainArray = [];
135104
135106
  }
135105
-
135107
+
135106
135108
  this.setSeq(structure, sChain, mChainSeq, ligSeqHash);
135107
135109
  }
135108
135110
 
@@ -135304,17 +135306,22 @@ class LoadCIF {
135304
135306
  }
135305
135307
 
135306
135308
  setSeq(structure, sChain, mChainSeq, ligSeqHash) { let ic = this.icn3d; ic.icn3dui;
135309
+ // sometimes a chain appears in both ligSeqHash and mChainSeq, e.g., mmcif data for 1TOP
135310
+ /*
135307
135311
  for(let chain in sChain) {
135308
135312
  let chainNum = structure + '_' + chain;
135309
135313
 
135310
- if(ligSeqHash.hasOwnProperty(chain)) {
135314
+ if(mChainSeq.hasOwnProperty(chain)) {
135315
+ ic.chainsSeq[chainNum] = mChainSeq[chain];
135316
+ }
135317
+ else if(ligSeqHash.hasOwnProperty(chain)) {
135311
135318
  ic.chainsSeq[chainNum] = ligSeqHash[chain];
135312
135319
  }
135313
135320
  else {
135314
135321
  ic.chainsSeq[chainNum] = mChainSeq[chain];
135315
135322
  }
135316
135323
  }
135317
-
135324
+ */
135318
135325
  ic.loadPDBCls.setResidMapping();
135319
135326
  }
135320
135327
  }
@@ -136255,9 +136262,11 @@ class ApplyCommand {
136255
136262
  }
136256
136263
  else if(command == 'set unitcell on') {
136257
136264
  ic.opts['unitcell'] = 'yes';
136265
+ ic.drawCls.draw();
136258
136266
  }
136259
136267
  else if(command == 'set unitcell off') {
136260
136268
  ic.opts['unitcell'] = 'no';
136269
+ ic.drawCls.draw();
136261
136270
  }
136262
136271
  else if(command == 'set fog on') {
136263
136272
  ic.opts['fog'] = 'yes';