icn3d 3.37.0 → 3.37.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.js +54 -42
- package/icn3d.min.js +3 -3
- package/icn3d.module.js +54 -42
- package/package.json +1 -1
package/icn3d.js
CHANGED
|
@@ -11102,9 +11102,9 @@ class ClickMenu {
|
|
|
11102
11102
|
|
|
11103
11103
|
$("#" + me.pre + "newvs2").on('submit', function() {
|
|
11104
11104
|
// fill the pdbstr
|
|
11105
|
-
let
|
|
11105
|
+
let bVastSearch = true;
|
|
11106
|
+
let pdbstr = ic.saveFileCls.getAtomPDB(ic.hAtoms, undefined, undefined, undefined, undefined, undefined, undefined, bVastSearch);
|
|
11106
11107
|
$("#" + me.pre + "pdbstr").val(pdbstr);
|
|
11107
|
-
|
|
11108
11108
|
return true;
|
|
11109
11109
|
});
|
|
11110
11110
|
|
|
@@ -19269,8 +19269,8 @@ class SetHtml {
|
|
|
19269
19269
|
});
|
|
19270
19270
|
}
|
|
19271
19271
|
|
|
19272
|
-
|
|
19273
|
-
async loadPng(imageStr) { let me = this.icn3dui, ic = me.icn3d;
|
|
19272
|
+
async loadPng(imageStr, command, bRender) { let me = this.icn3dui, ic = me.icn3d;
|
|
19273
|
+
// async loadPng(imageStr) { let me = this.icn3dui, ic = me.icn3d;
|
|
19274
19274
|
let matchedStr = 'Share Link: ';
|
|
19275
19275
|
let pos = imageStr.indexOf(matchedStr);
|
|
19276
19276
|
let matchedStrState = "Start of state file======\n";
|
|
@@ -19291,8 +19291,8 @@ class SetHtml {
|
|
|
19291
19291
|
let posData = imageStr.indexOf(matchedStrData);
|
|
19292
19292
|
ic.bInputfile =(posData == -1) ? false : true;
|
|
19293
19293
|
ic.bInputPNGWithData = ic.bInputfile;
|
|
19294
|
-
|
|
19295
|
-
|
|
19294
|
+
let commandStr = (command) ? command.replace(/;/g, "\n") : '';
|
|
19295
|
+
// let commandStr = '';
|
|
19296
19296
|
|
|
19297
19297
|
// let statefile;
|
|
19298
19298
|
// if(ic.bInputfile) {
|
|
@@ -19313,31 +19313,37 @@ class SetHtml {
|
|
|
19313
19313
|
//statefile = decodeURIComponent(statefile);
|
|
19314
19314
|
statefile = decodeURIComponent(statefile + "\n" + commandStr);
|
|
19315
19315
|
|
|
19316
|
-
|
|
19317
|
-
|
|
19318
|
-
|
|
19316
|
+
if(bRender) {
|
|
19317
|
+
if(type === 'pdb') {
|
|
19318
|
+
await ic.pdbParserCls.loadPdbData(data);
|
|
19319
19319
|
|
|
19320
|
-
|
|
19321
|
-
|
|
19322
|
-
|
|
19323
|
-
}
|
|
19324
|
-
else {
|
|
19325
|
-
if(type === 'mol2') {
|
|
19326
|
-
await ic.mol2ParserCls.loadMol2Data(data);
|
|
19320
|
+
ic.commands = [];
|
|
19321
|
+
ic.optsHistory = [];
|
|
19322
|
+
//await ic.loadScriptCls.loadScript(statefile, true);
|
|
19327
19323
|
}
|
|
19328
|
-
else
|
|
19329
|
-
|
|
19330
|
-
|
|
19331
|
-
|
|
19332
|
-
|
|
19333
|
-
|
|
19334
|
-
|
|
19335
|
-
|
|
19324
|
+
else {
|
|
19325
|
+
if(type === 'mol2') {
|
|
19326
|
+
await ic.mol2ParserCls.loadMol2Data(data);
|
|
19327
|
+
}
|
|
19328
|
+
else if(type === 'sdf') {
|
|
19329
|
+
await ic.sdfParserCls.loadSdfData(data);
|
|
19330
|
+
}
|
|
19331
|
+
else if(type === 'xyz') {
|
|
19332
|
+
await ic.xyzParserCls.loadXyzData(data);
|
|
19333
|
+
}
|
|
19334
|
+
else if(type === 'mmcif') {
|
|
19335
|
+
await ic.mmcifParserCls.loadMmcifData(data);
|
|
19336
|
+
}
|
|
19337
|
+
ic.commands = [];
|
|
19338
|
+
ic.optsHistory = [];
|
|
19339
|
+
//await ic.loadScriptCls.loadScript(statefile, true);
|
|
19336
19340
|
}
|
|
19337
|
-
|
|
19338
|
-
|
|
19339
|
-
|
|
19340
|
-
|
|
19341
|
+
|
|
19342
|
+
await ic.loadScriptCls.loadScript(statefile, true);
|
|
19343
|
+
|
|
19344
|
+
// me.htmlCls.clickMenuCls.setLogCmd('load iCn3D PNG image ' + $("#" + me.pre + "pngimage").val(), false);
|
|
19345
|
+
}
|
|
19346
|
+
/*
|
|
19341
19347
|
}
|
|
19342
19348
|
else { // url length > 4000
|
|
19343
19349
|
//var matchedStrState = "Start of state file======\n";
|
|
@@ -42102,8 +42108,6 @@ class AnnoDomain {
|
|
|
42102
42108
|
}
|
|
42103
42109
|
}
|
|
42104
42110
|
|
|
42105
|
-
if(bNotShowDomain) continue;
|
|
42106
|
-
|
|
42107
42111
|
// save 3D domain info for node.js script
|
|
42108
42112
|
if(me.bNode) {
|
|
42109
42113
|
let domainName = '3D domain ' +(index+1).toString();
|
|
@@ -42118,13 +42122,15 @@ class AnnoDomain {
|
|
|
42118
42122
|
// 0-based
|
|
42119
42123
|
let obj = {};
|
|
42120
42124
|
// let resi = ic.ParserUtilsCls.getResi(chnid, j);
|
|
42121
|
-
let resid = ic.ncbi2resid
|
|
42125
|
+
let resid = ic.ncbi2resid[chnid + '_' + j];
|
|
42122
42126
|
obj[resid] = domainName;
|
|
42123
42127
|
ic.resid2domain[chnid].push(obj);
|
|
42124
42128
|
}
|
|
42125
42129
|
}
|
|
42126
42130
|
}
|
|
42127
42131
|
|
|
42132
|
+
if(bNotShowDomain) continue;
|
|
42133
|
+
|
|
42128
42134
|
let htmlTmp2 = '<div class="icn3d-seqTitle icn3d-link icn3d-blue" 3ddomain="' +(index+1).toString() + '" from="' + fromArray + '" to="' + toArray + '" shorttitle="' + title + '" index="' + index + '" setname="' + chnid + '_3d_domain_' +(index+1).toString() + '" anno="sequence" chain="' + chnid + '" title="' + fulltitle + '">' + title + ' </div>';
|
|
42129
42135
|
let htmlTmp3 = '<span class="icn3d-residueNum" title="residue count">' + resCnt.toString() + ' Res</span>';
|
|
42130
42136
|
html3 += htmlTmp2 + htmlTmp3 + '<br>';
|
|
@@ -57603,8 +57609,7 @@ class PdbParser {
|
|
|
57603
57609
|
await ic.mmcifParserCls.loadMmcifData(data);
|
|
57604
57610
|
}
|
|
57605
57611
|
else if(type === 'icn3dpng') {
|
|
57606
|
-
|
|
57607
|
-
await me.htmlCls.setHtmlCls.loadPng(data);
|
|
57612
|
+
await me.htmlCls.setHtmlCls.loadPng(data, command, true);
|
|
57608
57613
|
}
|
|
57609
57614
|
else if(type === 'pae') {
|
|
57610
57615
|
me.htmlCls.dialogCls.openDlg('dl_alignerrormap', 'Show Predicted Aligned Error (PAE) map');
|
|
@@ -57734,7 +57739,7 @@ class PdbParser {
|
|
|
57734
57739
|
}
|
|
57735
57740
|
|
|
57736
57741
|
async execStatefile(structure, statefile) {let ic = this.icn3d, me = ic.icn3dui;
|
|
57737
|
-
|
|
57742
|
+
if(!statefile) return;
|
|
57738
57743
|
|
|
57739
57744
|
let commandArray = statefile.trim().split('\n');
|
|
57740
57745
|
commandArray = ['select $' + structure].concat(commandArray);
|
|
@@ -63090,7 +63095,8 @@ class LoadPDB {
|
|
|
63090
63095
|
this.icn3d = icn3d;
|
|
63091
63096
|
}
|
|
63092
63097
|
|
|
63093
|
-
getStructureId(id, moleculeNum, bMutation) { let ic = this.icn3d; ic.icn3dui;
|
|
63098
|
+
getStructureId(id, moleculeNum, bMutation, bNMR) { let ic = this.icn3d; ic.icn3dui;
|
|
63099
|
+
id = (bNMR && ic.idNMR) ? ic.idNMR : id;
|
|
63094
63100
|
let structure = id;
|
|
63095
63101
|
|
|
63096
63102
|
if(id == ic.defaultPdbId || bMutation || ic.structures.hasOwnProperty(id)) { // bMutation: side chain prediction
|
|
@@ -63157,6 +63163,7 @@ class LoadPDB {
|
|
|
63157
63163
|
//let chainMissingResidueArray = {}
|
|
63158
63164
|
|
|
63159
63165
|
let id = (pdbid) ? pdbid : ic.defaultPdbId;
|
|
63166
|
+
let oriId = id;
|
|
63160
63167
|
|
|
63161
63168
|
let structure = id;
|
|
63162
63169
|
|
|
@@ -63176,6 +63183,7 @@ class LoadPDB {
|
|
|
63176
63183
|
|
|
63177
63184
|
///id = line.substr(62, 4).trim();
|
|
63178
63185
|
id = line.substr(62).trim();
|
|
63186
|
+
oriId = id;
|
|
63179
63187
|
|
|
63180
63188
|
if(id == '') {
|
|
63181
63189
|
if(bAppend) {
|
|
@@ -63187,7 +63195,7 @@ class LoadPDB {
|
|
|
63187
63195
|
}
|
|
63188
63196
|
}
|
|
63189
63197
|
|
|
63190
|
-
structure = this.getStructureId(id, moleculeNum, bMutation);
|
|
63198
|
+
structure = this.getStructureId(id, moleculeNum, bMutation, bNMR);
|
|
63191
63199
|
|
|
63192
63200
|
ic.molTitle = '';
|
|
63193
63201
|
ic.molTitleHash = {};
|
|
@@ -63258,6 +63266,7 @@ class LoadPDB {
|
|
|
63258
63266
|
else if (remarkType == 210) {
|
|
63259
63267
|
if((line.substr(11, 32).trim() == 'EXPERIMENT TYPE') && line.substr(45).trim() == 'NMR') {
|
|
63260
63268
|
bNMR = true;
|
|
63269
|
+
ic.idNMR = oriId;
|
|
63261
63270
|
}
|
|
63262
63271
|
}
|
|
63263
63272
|
else if (remarkType == 350 && line.substr(13, 5) == 'BIOMT') {
|
|
@@ -63311,7 +63320,7 @@ class LoadPDB {
|
|
|
63311
63320
|
++moleculeNum;
|
|
63312
63321
|
id = ic.defaultPdbId;
|
|
63313
63322
|
|
|
63314
|
-
structure = this.getStructureId(id, moleculeNum, bMutation);
|
|
63323
|
+
structure = this.getStructureId(id, moleculeNum, bMutation, bNMR);
|
|
63315
63324
|
//helices = [];
|
|
63316
63325
|
//sheets = [];
|
|
63317
63326
|
if(!bNMR) {
|
|
@@ -63334,7 +63343,7 @@ class LoadPDB {
|
|
|
63334
63343
|
segId = line.substr(72, 4).trim();
|
|
63335
63344
|
|
|
63336
63345
|
if(bFirstAtom) {
|
|
63337
|
-
structure = this.getStructureId(id, moleculeNum, bMutation);
|
|
63346
|
+
structure = this.getStructureId(id, moleculeNum, bMutation, bNMR);
|
|
63338
63347
|
|
|
63339
63348
|
bFirstAtom = false;
|
|
63340
63349
|
}
|
|
@@ -63342,7 +63351,7 @@ class LoadPDB {
|
|
|
63342
63351
|
++moleculeNum;
|
|
63343
63352
|
id = ic.defaultPdbId;
|
|
63344
63353
|
|
|
63345
|
-
structure = this.getStructureId(id, moleculeNum, bMutation);
|
|
63354
|
+
structure = this.getStructureId(id, moleculeNum, bMutation, bNMR);
|
|
63346
63355
|
|
|
63347
63356
|
//helices = [];
|
|
63348
63357
|
//sheets = [];
|
|
@@ -78497,7 +78506,7 @@ class SaveFile {
|
|
|
78497
78506
|
}
|
|
78498
78507
|
|
|
78499
78508
|
//getAtomPDB: function(atomHash, bPqr, bPdb, bNoChem) { let ic = this.icn3d, me = ic.icn3dui;
|
|
78500
|
-
getAtomPDB(atomHash, bPqr, bNoChem, bNoHeader, chainResi2pdb, pdbid, bMergeIntoOne) { let ic = this.icn3d, me = ic.icn3dui;
|
|
78509
|
+
getAtomPDB(atomHash, bPqr, bNoChem, bNoHeader, chainResi2pdb, pdbid, bMergeIntoOne, bVastSearch) { let ic = this.icn3d, me = ic.icn3dui;
|
|
78501
78510
|
let pdbStr = '';
|
|
78502
78511
|
|
|
78503
78512
|
// get all phosphate groups in lipids
|
|
@@ -78574,7 +78583,7 @@ class SaveFile {
|
|
|
78574
78583
|
for(let i = 0, il = ssArray.length; i < il; ++i) {
|
|
78575
78584
|
let ssObj = ssArray[i];
|
|
78576
78585
|
|
|
78577
|
-
if(ssObj.ss != prevSs) {
|
|
78586
|
+
if(ssObj.ss != prevSs || ssObj.ssbegin) {
|
|
78578
78587
|
// print prev
|
|
78579
78588
|
stru2header[stru] += this.printPrevSecondary(bHelix, bSheet, prevRealSsObj, ssCnt);
|
|
78580
78589
|
|
|
@@ -78772,6 +78781,7 @@ class SaveFile {
|
|
|
78772
78781
|
//line +=(atom.chain.length <= 1) ? atom.chain.padStart(1, ' ') : atom.chain.substr(0, 1);
|
|
78773
78782
|
if(atom.chain.length >= 2) {
|
|
78774
78783
|
let chainTmp = atom.chain.replace(/_/gi, '').substr(0, 2);
|
|
78784
|
+
if(bVastSearch) chainTmp = ' ' + chainTmp.substr(0,1); // VAST search only support one lettter chain ID
|
|
78775
78785
|
line += chainTmp;
|
|
78776
78786
|
}
|
|
78777
78787
|
else if(atom.chain.length == 1) {
|
|
@@ -78850,7 +78860,9 @@ class SaveFile {
|
|
|
78850
78860
|
}
|
|
78851
78861
|
else {
|
|
78852
78862
|
line += "1.00".padStart(6, ' ');
|
|
78853
|
-
line +=(atom.b) ? parseFloat(atom.b).toFixed(2).toString().padStart(6, ' ') : ' '.padStart(6, ' ');
|
|
78863
|
+
// line +=(atom.b) ? parseFloat(atom.b).toFixed(2).toString().padStart(6, ' ') : ' '.padStart(6, ' ');
|
|
78864
|
+
let defaultBFactor = (bVastSearch) ? "1.0" : " ";
|
|
78865
|
+
line +=(atom.b) ? parseFloat(atom.b).toFixed(2).toString().padStart(6, ' ') : defaultBFactor.padStart(6, ' ');
|
|
78854
78866
|
line += ' '.padStart(10, ' ');
|
|
78855
78867
|
line += atom.elem.padStart(2, ' ');
|
|
78856
78868
|
line += ' '.padStart(2, ' ');
|