icn3d 3.30.0 → 3.30.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/icn3d.module.js CHANGED
@@ -39097,6 +39097,7 @@ class AnnoDomain {
39097
39097
 
39098
39098
  let result = ic.domain3dCls.c2b_NewSplitChain(atoms);
39099
39099
  let subdomains = result.subdomains;
39100
+ let pos2resi = result.pos2resi;
39100
39101
  //let substruct = result.substruct;
39101
39102
  //let jsonStr = ic.domain3dCls.getDomainJsonForAlign(atoms);
39102
39103
 
@@ -39111,6 +39112,8 @@ class AnnoDomain {
39111
39112
 
39112
39113
  data.domains[chainid].domains.push(domain);
39113
39114
  }
39115
+
39116
+ data.domains[chainid].pos2resi = pos2resi;
39114
39117
  }
39115
39118
  }
39116
39119
 
@@ -39147,7 +39150,7 @@ class AnnoDomain {
39147
39150
  let html = '<div id="' + ic.pre + chnid + '_domainseq_sequence" class="icn3d-dl_sequence">';
39148
39151
  let html2 = html;
39149
39152
  let html3 = html;
39150
- let domainArray, proteinname;
39153
+ let domainArray, pos2resi, proteinname;
39151
39154
  let pos = chnid.indexOf('_');
39152
39155
  let chain = chnid.substr(pos + 1);
39153
39156
  // MMDB symmetry chain has the form of 'A1'
@@ -39155,9 +39158,11 @@ class AnnoDomain {
39155
39158
  chain = chain.substr(0, chain.length - 1);
39156
39159
  }
39157
39160
 
39158
- if(bCalcDirect) {
39161
+ // if(bCalcDirect) {
39159
39162
  proteinname = chnid;
39160
39163
  domainArray = (data.domains[chnid]) ? data.domains[chnid].domains : [];
39164
+ pos2resi = data.domains[chnid].pos2resi;
39165
+ /*
39161
39166
  }
39162
39167
  else {
39163
39168
  let molinfo = data.moleculeInfor;
@@ -39176,6 +39181,7 @@ class AnnoDomain {
39176
39181
  domainArray = [];
39177
39182
  }
39178
39183
  }
39184
+ */
39179
39185
 
39180
39186
  for(let index = 0, indexl = domainArray.length; index < indexl; ++index) {
39181
39187
  //var fulltitle = '3D domain ' +(index+1).toString() + ' of ' + proteinname + '(PDB ID: ' + data.pdbId + ')';
@@ -39189,8 +39195,11 @@ class AnnoDomain {
39189
39195
  let resCnt = 0;
39190
39196
 
39191
39197
  for(let i = 0, il = subdomainArray.length; i < il; ++i) {
39192
- let domainFrom = Math.round(subdomainArray[i][0]) - 1; // convert 1-based to 0-based
39193
- let domainTo = Math.round(subdomainArray[i][1]) - 1;
39198
+ // let domainFrom = Math.round(subdomainArray[i][0]) - 1; // convert 1-based to 0-based
39199
+ // let domainTo = Math.round(subdomainArray[i][1]) - 1;
39200
+ let domainFrom = Math.round(subdomainArray[i][0]); // convert 1-based to 0-based
39201
+ let domainTo = Math.round(subdomainArray[i][1]);
39202
+
39194
39203
  if(domainFromHash.hasOwnProperty(domainFrom) || domainToHash.hasOwnProperty(domainTo)) {
39195
39204
  continue; // do nothing for duplicated "from" or "to", e.g, PDBID 1ITW, 5FWI
39196
39205
  }
@@ -39201,8 +39210,8 @@ class AnnoDomain {
39201
39210
 
39202
39211
  // use the NCBI residue number, and convert to PDB residue number during selection
39203
39212
  // if(ic.bNCBI || bCalcDirect) {
39204
- fromArray.push(domainFrom);
39205
- toArray.push(domainTo);
39213
+ fromArray.push(pos2resi[domainFrom]);
39214
+ toArray.push(pos2resi[domainTo]);
39206
39215
  // }
39207
39216
  // else {
39208
39217
  // fromArray.push(domainFrom + ic.baseResi[chnid]);
@@ -39211,7 +39220,9 @@ class AnnoDomain {
39211
39220
 
39212
39221
  resCnt += domainTo - domainFrom + 1;
39213
39222
  for(let j = domainFrom; j <= domainTo; ++j) {
39214
- resiHash[j+1] = 1;
39223
+ // resiHash[j+1] = 1;
39224
+ let resi = pos2resi[j];
39225
+ resiHash[resi] = 1;
39215
39226
  }
39216
39227
  }
39217
39228
 
@@ -39227,7 +39238,8 @@ class AnnoDomain {
39227
39238
  for(let j = from; j <= to; ++j) {
39228
39239
  // 0-based
39229
39240
  let obj = {};
39230
- let resi = ic.ParserUtilsCls.getResi(chnid, j);
39241
+ // let resi = ic.ParserUtilsCls.getResi(chnid, j);
39242
+ let resi = pos2resi[j];
39231
39243
  obj[chnid + '_' + resi] = domainName;
39232
39244
  ic.resid2domain[chnid].push(obj);
39233
39245
  }
@@ -39248,7 +39260,8 @@ class AnnoDomain {
39248
39260
  html += ic.showSeqCls.insertGap(chnid, i, '-');
39249
39261
  //if(i >= domainFrom && i <= domainTo) {
39250
39262
  let resi = ic.ParserUtilsCls.getResi(chnid, i);
39251
- if(resiHash.hasOwnProperty(i+1)) {
39263
+ // if(resiHash.hasOwnProperty(i+1)) {
39264
+ if(resiHash.hasOwnProperty(resi)) {
39252
39265
  let cFull = ic.giSeq[chnid][i];
39253
39266
  let c = cFull;
39254
39267
  if(cFull.length > 1) {
@@ -40893,7 +40906,7 @@ class Domain3d {
40893
40906
  // get a list of Calpha-Calpha contacts
40894
40907
  ///list< pair< pair< int, let >, let > >
40895
40908
  let cts = this.c2b_AlphaContacts(seqLen, x0, y0, z0, dcut, resiArray);
40896
-
40909
+
40897
40910
  //
40898
40911
  // Produce a "map" of the SSEs, i.e. vec_sse[i] = 0 means residue i + 1
40899
40912
  // is in a loop, and vec_sse[i] = k means residue i + 1 belongs to SSE
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icn3d",
3
- "version": "3.30.0",
3
+ "version": "3.30.1",
4
4
  "main": "./icn3d.js",
5
5
  "exports": {
6
6
  ".": {