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.module.js
CHANGED
|
@@ -12003,9 +12003,9 @@ class ClickMenu {
|
|
|
12003
12003
|
|
|
12004
12004
|
$("#" + me.pre + "newvs2").on('submit', function() {
|
|
12005
12005
|
// fill the pdbstr
|
|
12006
|
-
let
|
|
12006
|
+
let bVastSearch = true;
|
|
12007
|
+
let pdbstr = ic.saveFileCls.getAtomPDB(ic.hAtoms, undefined, undefined, undefined, undefined, undefined, undefined, bVastSearch);
|
|
12007
12008
|
$("#" + me.pre + "pdbstr").val(pdbstr);
|
|
12008
|
-
|
|
12009
12009
|
return true;
|
|
12010
12010
|
});
|
|
12011
12011
|
|
|
@@ -20170,8 +20170,8 @@ class SetHtml {
|
|
|
20170
20170
|
});
|
|
20171
20171
|
}
|
|
20172
20172
|
|
|
20173
|
-
|
|
20174
|
-
async loadPng(imageStr) { let me = this.icn3dui, ic = me.icn3d;
|
|
20173
|
+
async loadPng(imageStr, command, bRender) { let me = this.icn3dui, ic = me.icn3d;
|
|
20174
|
+
// async loadPng(imageStr) { let me = this.icn3dui, ic = me.icn3d;
|
|
20175
20175
|
let matchedStr = 'Share Link: ';
|
|
20176
20176
|
let pos = imageStr.indexOf(matchedStr);
|
|
20177
20177
|
let matchedStrState = "Start of state file======\n";
|
|
@@ -20192,8 +20192,8 @@ class SetHtml {
|
|
|
20192
20192
|
let posData = imageStr.indexOf(matchedStrData);
|
|
20193
20193
|
ic.bInputfile =(posData == -1) ? false : true;
|
|
20194
20194
|
ic.bInputPNGWithData = ic.bInputfile;
|
|
20195
|
-
|
|
20196
|
-
|
|
20195
|
+
let commandStr = (command) ? command.replace(/;/g, "\n") : '';
|
|
20196
|
+
// let commandStr = '';
|
|
20197
20197
|
|
|
20198
20198
|
// let statefile;
|
|
20199
20199
|
// if(ic.bInputfile) {
|
|
@@ -20214,31 +20214,37 @@ class SetHtml {
|
|
|
20214
20214
|
//statefile = decodeURIComponent(statefile);
|
|
20215
20215
|
statefile = decodeURIComponent(statefile + "\n" + commandStr);
|
|
20216
20216
|
|
|
20217
|
-
|
|
20218
|
-
|
|
20219
|
-
|
|
20217
|
+
if(bRender) {
|
|
20218
|
+
if(type === 'pdb') {
|
|
20219
|
+
await ic.pdbParserCls.loadPdbData(data);
|
|
20220
20220
|
|
|
20221
|
-
|
|
20222
|
-
|
|
20223
|
-
|
|
20224
|
-
}
|
|
20225
|
-
else {
|
|
20226
|
-
if(type === 'mol2') {
|
|
20227
|
-
await ic.mol2ParserCls.loadMol2Data(data);
|
|
20221
|
+
ic.commands = [];
|
|
20222
|
+
ic.optsHistory = [];
|
|
20223
|
+
//await ic.loadScriptCls.loadScript(statefile, true);
|
|
20228
20224
|
}
|
|
20229
|
-
else
|
|
20230
|
-
|
|
20231
|
-
|
|
20232
|
-
|
|
20233
|
-
|
|
20234
|
-
|
|
20235
|
-
|
|
20236
|
-
|
|
20225
|
+
else {
|
|
20226
|
+
if(type === 'mol2') {
|
|
20227
|
+
await ic.mol2ParserCls.loadMol2Data(data);
|
|
20228
|
+
}
|
|
20229
|
+
else if(type === 'sdf') {
|
|
20230
|
+
await ic.sdfParserCls.loadSdfData(data);
|
|
20231
|
+
}
|
|
20232
|
+
else if(type === 'xyz') {
|
|
20233
|
+
await ic.xyzParserCls.loadXyzData(data);
|
|
20234
|
+
}
|
|
20235
|
+
else if(type === 'mmcif') {
|
|
20236
|
+
await ic.mmcifParserCls.loadMmcifData(data);
|
|
20237
|
+
}
|
|
20238
|
+
ic.commands = [];
|
|
20239
|
+
ic.optsHistory = [];
|
|
20240
|
+
//await ic.loadScriptCls.loadScript(statefile, true);
|
|
20237
20241
|
}
|
|
20238
|
-
|
|
20239
|
-
|
|
20240
|
-
|
|
20241
|
-
|
|
20242
|
+
|
|
20243
|
+
await ic.loadScriptCls.loadScript(statefile, true);
|
|
20244
|
+
|
|
20245
|
+
// me.htmlCls.clickMenuCls.setLogCmd('load iCn3D PNG image ' + $("#" + me.pre + "pngimage").val(), false);
|
|
20246
|
+
}
|
|
20247
|
+
/*
|
|
20242
20248
|
}
|
|
20243
20249
|
else { // url length > 4000
|
|
20244
20250
|
//var matchedStrState = "Start of state file======\n";
|
|
@@ -43003,8 +43009,6 @@ class AnnoDomain {
|
|
|
43003
43009
|
}
|
|
43004
43010
|
}
|
|
43005
43011
|
|
|
43006
|
-
if(bNotShowDomain) continue;
|
|
43007
|
-
|
|
43008
43012
|
// save 3D domain info for node.js script
|
|
43009
43013
|
if(me.bNode) {
|
|
43010
43014
|
let domainName = '3D domain ' +(index+1).toString();
|
|
@@ -43019,13 +43023,15 @@ class AnnoDomain {
|
|
|
43019
43023
|
// 0-based
|
|
43020
43024
|
let obj = {};
|
|
43021
43025
|
// let resi = ic.ParserUtilsCls.getResi(chnid, j);
|
|
43022
|
-
let resid = ic.ncbi2resid
|
|
43026
|
+
let resid = ic.ncbi2resid[chnid + '_' + j];
|
|
43023
43027
|
obj[resid] = domainName;
|
|
43024
43028
|
ic.resid2domain[chnid].push(obj);
|
|
43025
43029
|
}
|
|
43026
43030
|
}
|
|
43027
43031
|
}
|
|
43028
43032
|
|
|
43033
|
+
if(bNotShowDomain) continue;
|
|
43034
|
+
|
|
43029
43035
|
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>';
|
|
43030
43036
|
let htmlTmp3 = '<span class="icn3d-residueNum" title="residue count">' + resCnt.toString() + ' Res</span>';
|
|
43031
43037
|
html3 += htmlTmp2 + htmlTmp3 + '<br>';
|
|
@@ -58504,8 +58510,7 @@ class PdbParser {
|
|
|
58504
58510
|
await ic.mmcifParserCls.loadMmcifData(data);
|
|
58505
58511
|
}
|
|
58506
58512
|
else if(type === 'icn3dpng') {
|
|
58507
|
-
|
|
58508
|
-
await me.htmlCls.setHtmlCls.loadPng(data);
|
|
58513
|
+
await me.htmlCls.setHtmlCls.loadPng(data, command, true);
|
|
58509
58514
|
}
|
|
58510
58515
|
else if(type === 'pae') {
|
|
58511
58516
|
me.htmlCls.dialogCls.openDlg('dl_alignerrormap', 'Show Predicted Aligned Error (PAE) map');
|
|
@@ -58635,7 +58640,7 @@ class PdbParser {
|
|
|
58635
58640
|
}
|
|
58636
58641
|
|
|
58637
58642
|
async execStatefile(structure, statefile) {let ic = this.icn3d, me = ic.icn3dui;
|
|
58638
|
-
|
|
58643
|
+
if(!statefile) return;
|
|
58639
58644
|
|
|
58640
58645
|
let commandArray = statefile.trim().split('\n');
|
|
58641
58646
|
commandArray = ['select $' + structure].concat(commandArray);
|
|
@@ -63991,7 +63996,8 @@ class LoadPDB {
|
|
|
63991
63996
|
this.icn3d = icn3d;
|
|
63992
63997
|
}
|
|
63993
63998
|
|
|
63994
|
-
getStructureId(id, moleculeNum, bMutation) { let ic = this.icn3d; ic.icn3dui;
|
|
63999
|
+
getStructureId(id, moleculeNum, bMutation, bNMR) { let ic = this.icn3d; ic.icn3dui;
|
|
64000
|
+
id = (bNMR && ic.idNMR) ? ic.idNMR : id;
|
|
63995
64001
|
let structure = id;
|
|
63996
64002
|
|
|
63997
64003
|
if(id == ic.defaultPdbId || bMutation || ic.structures.hasOwnProperty(id)) { // bMutation: side chain prediction
|
|
@@ -64058,6 +64064,7 @@ class LoadPDB {
|
|
|
64058
64064
|
//let chainMissingResidueArray = {}
|
|
64059
64065
|
|
|
64060
64066
|
let id = (pdbid) ? pdbid : ic.defaultPdbId;
|
|
64067
|
+
let oriId = id;
|
|
64061
64068
|
|
|
64062
64069
|
let structure = id;
|
|
64063
64070
|
|
|
@@ -64077,6 +64084,7 @@ class LoadPDB {
|
|
|
64077
64084
|
|
|
64078
64085
|
///id = line.substr(62, 4).trim();
|
|
64079
64086
|
id = line.substr(62).trim();
|
|
64087
|
+
oriId = id;
|
|
64080
64088
|
|
|
64081
64089
|
if(id == '') {
|
|
64082
64090
|
if(bAppend) {
|
|
@@ -64088,7 +64096,7 @@ class LoadPDB {
|
|
|
64088
64096
|
}
|
|
64089
64097
|
}
|
|
64090
64098
|
|
|
64091
|
-
structure = this.getStructureId(id, moleculeNum, bMutation);
|
|
64099
|
+
structure = this.getStructureId(id, moleculeNum, bMutation, bNMR);
|
|
64092
64100
|
|
|
64093
64101
|
ic.molTitle = '';
|
|
64094
64102
|
ic.molTitleHash = {};
|
|
@@ -64159,6 +64167,7 @@ class LoadPDB {
|
|
|
64159
64167
|
else if (remarkType == 210) {
|
|
64160
64168
|
if((line.substr(11, 32).trim() == 'EXPERIMENT TYPE') && line.substr(45).trim() == 'NMR') {
|
|
64161
64169
|
bNMR = true;
|
|
64170
|
+
ic.idNMR = oriId;
|
|
64162
64171
|
}
|
|
64163
64172
|
}
|
|
64164
64173
|
else if (remarkType == 350 && line.substr(13, 5) == 'BIOMT') {
|
|
@@ -64212,7 +64221,7 @@ class LoadPDB {
|
|
|
64212
64221
|
++moleculeNum;
|
|
64213
64222
|
id = ic.defaultPdbId;
|
|
64214
64223
|
|
|
64215
|
-
structure = this.getStructureId(id, moleculeNum, bMutation);
|
|
64224
|
+
structure = this.getStructureId(id, moleculeNum, bMutation, bNMR);
|
|
64216
64225
|
//helices = [];
|
|
64217
64226
|
//sheets = [];
|
|
64218
64227
|
if(!bNMR) {
|
|
@@ -64235,7 +64244,7 @@ class LoadPDB {
|
|
|
64235
64244
|
segId = line.substr(72, 4).trim();
|
|
64236
64245
|
|
|
64237
64246
|
if(bFirstAtom) {
|
|
64238
|
-
structure = this.getStructureId(id, moleculeNum, bMutation);
|
|
64247
|
+
structure = this.getStructureId(id, moleculeNum, bMutation, bNMR);
|
|
64239
64248
|
|
|
64240
64249
|
bFirstAtom = false;
|
|
64241
64250
|
}
|
|
@@ -64243,7 +64252,7 @@ class LoadPDB {
|
|
|
64243
64252
|
++moleculeNum;
|
|
64244
64253
|
id = ic.defaultPdbId;
|
|
64245
64254
|
|
|
64246
|
-
structure = this.getStructureId(id, moleculeNum, bMutation);
|
|
64255
|
+
structure = this.getStructureId(id, moleculeNum, bMutation, bNMR);
|
|
64247
64256
|
|
|
64248
64257
|
//helices = [];
|
|
64249
64258
|
//sheets = [];
|
|
@@ -79398,7 +79407,7 @@ class SaveFile {
|
|
|
79398
79407
|
}
|
|
79399
79408
|
|
|
79400
79409
|
//getAtomPDB: function(atomHash, bPqr, bPdb, bNoChem) { let ic = this.icn3d, me = ic.icn3dui;
|
|
79401
|
-
getAtomPDB(atomHash, bPqr, bNoChem, bNoHeader, chainResi2pdb, pdbid, bMergeIntoOne) { let ic = this.icn3d, me = ic.icn3dui;
|
|
79410
|
+
getAtomPDB(atomHash, bPqr, bNoChem, bNoHeader, chainResi2pdb, pdbid, bMergeIntoOne, bVastSearch) { let ic = this.icn3d, me = ic.icn3dui;
|
|
79402
79411
|
let pdbStr = '';
|
|
79403
79412
|
|
|
79404
79413
|
// get all phosphate groups in lipids
|
|
@@ -79475,7 +79484,7 @@ class SaveFile {
|
|
|
79475
79484
|
for(let i = 0, il = ssArray.length; i < il; ++i) {
|
|
79476
79485
|
let ssObj = ssArray[i];
|
|
79477
79486
|
|
|
79478
|
-
if(ssObj.ss != prevSs) {
|
|
79487
|
+
if(ssObj.ss != prevSs || ssObj.ssbegin) {
|
|
79479
79488
|
// print prev
|
|
79480
79489
|
stru2header[stru] += this.printPrevSecondary(bHelix, bSheet, prevRealSsObj, ssCnt);
|
|
79481
79490
|
|
|
@@ -79673,6 +79682,7 @@ class SaveFile {
|
|
|
79673
79682
|
//line +=(atom.chain.length <= 1) ? atom.chain.padStart(1, ' ') : atom.chain.substr(0, 1);
|
|
79674
79683
|
if(atom.chain.length >= 2) {
|
|
79675
79684
|
let chainTmp = atom.chain.replace(/_/gi, '').substr(0, 2);
|
|
79685
|
+
if(bVastSearch) chainTmp = ' ' + chainTmp.substr(0,1); // VAST search only support one lettter chain ID
|
|
79676
79686
|
line += chainTmp;
|
|
79677
79687
|
}
|
|
79678
79688
|
else if(atom.chain.length == 1) {
|
|
@@ -79751,7 +79761,9 @@ class SaveFile {
|
|
|
79751
79761
|
}
|
|
79752
79762
|
else {
|
|
79753
79763
|
line += "1.00".padStart(6, ' ');
|
|
79754
|
-
line +=(atom.b) ? parseFloat(atom.b).toFixed(2).toString().padStart(6, ' ') : ' '.padStart(6, ' ');
|
|
79764
|
+
// line +=(atom.b) ? parseFloat(atom.b).toFixed(2).toString().padStart(6, ' ') : ' '.padStart(6, ' ');
|
|
79765
|
+
let defaultBFactor = (bVastSearch) ? "1.0" : " ";
|
|
79766
|
+
line +=(atom.b) ? parseFloat(atom.b).toFixed(2).toString().padStart(6, ' ') : defaultBFactor.padStart(6, ' ');
|
|
79755
79767
|
line += ' '.padStart(10, ' ');
|
|
79756
79768
|
line += atom.elem.padStart(2, ' ');
|
|
79757
79769
|
line += ' '.padStart(2, ' ');
|