icn3d 3.25.16 → 3.25.17

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
@@ -32255,7 +32255,8 @@ class Alternate {
32255
32255
  ic.drawCls.draw();
32256
32256
 
32257
32257
  ic.bShowHighlight = true;
32258
- ic.opts['rotationcenter'] = 'molecule center';
32258
+ //ic.opts['rotationcenter'] = 'molecule center';
32259
+ ic.opts['rotationcenter'] = 'highlight center';
32259
32260
  }
32260
32261
 
32261
32262
  alternateWrapper() { let ic = this.icn3d; ic.icn3dui;
@@ -42212,6 +42213,8 @@ class ShowSeq {
42212
42213
  refnumStr = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
42213
42214
  currRefnum = parseInt(refnumStr);
42214
42215
  refnumLabelNoPostfix = currStrand + currRefnum;
42216
+
42217
+ currStrand = refnumLabel.replace(new RegExp(refnumStr,'g'), '');
42215
42218
 
42216
42219
  let firstChar = refnumLabel.substr(0,1);
42217
42220
  if(!bStart && (firstChar == ' ' || firstChar == 'A' || firstChar == 'B')) { // start of a new IG domain
@@ -42228,7 +42231,26 @@ class ShowSeq {
42228
42231
  refnumLabel = undefined;
42229
42232
  }
42230
42233
  else {
42231
- if(parseInt(currResi) < parseInt(strandArray[strandCnt].startResi)) {
42234
+ let bBefore = false, bInRange= false, bAfter = false;
42235
+ // 100, 100A
42236
+ if(parseInt(currResi) == parseInt(strandArray[strandCnt].startResi) && currResi != strandArray[strandCnt].startResi) {
42237
+ bBefore = currResi < strandArray[strandCnt].startResi;
42238
+ }
42239
+ else {
42240
+ bBefore = parseInt(currResi) < parseInt(strandArray[strandCnt].startResi);
42241
+ }
42242
+
42243
+ // 100, 100A
42244
+ if(parseInt(currResi) == parseInt(strandArray[strandCnt].endResi) && currResi != strandArray[strandCnt].endResi) {
42245
+ bAfter = currResi > strandArray[strandCnt].endResi;
42246
+ }
42247
+ else {
42248
+ bAfter = parseInt(currResi) > parseInt(strandArray[strandCnt].endResi);
42249
+ }
42250
+
42251
+ bInRange = (!bBefore && !bAfter) ? true : false;
42252
+
42253
+ if(bBefore) {
42232
42254
  ic.residIgLoop[residueid] = 1;
42233
42255
 
42234
42256
  if(bBeforeAstrand) { // make it continuous to the 1st strand
@@ -42289,7 +42311,7 @@ class ShowSeq {
42289
42311
  }
42290
42312
  }
42291
42313
  }
42292
- else if(parseInt(currResi) >= parseInt(strandArray[strandCnt].startResi) && parseInt(currResi) <= parseInt(strandArray[strandCnt].endResi)) {
42314
+ else if(bInRange) {
42293
42315
  // not in loop any more if you assign ref numbers multiple times
42294
42316
  //delete ic.residIgLoop[residueid];
42295
42317
 
@@ -42317,7 +42339,7 @@ class ShowSeq {
42317
42339
  }
42318
42340
  }
42319
42341
  }
42320
- else if(parseInt(currResi) > parseInt(strandArray[strandCnt].endResi)) {
42342
+ else if(bAfter) {
42321
42343
  ic.residIgLoop[residueid] = 1;
42322
42344
 
42323
42345
  if(!bAfterGstrand) {
@@ -53923,7 +53945,10 @@ class SetSeqAlign {
53923
53945
  */
53924
53946
 
53925
53947
  let resid = chainid + '_' + resi;
53926
- return ic.residueId2Name[resid];
53948
+ let resn = ic.residueId2Name[resid];
53949
+ if(!resn) resn = '?';
53950
+
53951
+ return resn;
53927
53952
  }
53928
53953
 
53929
53954
  getResiAferAlign(chainid, bRealign, pos) { let ic = this.icn3d, me = ic.icn3dui;