icn3d 3.28.9 → 3.28.11
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 +535 -342
- package/icn3d.min.js +4 -4
- package/icn3d.module.js +535 -342
- package/package.json +1 -1
package/icn3d.module.js
CHANGED
|
@@ -5062,6 +5062,17 @@ class UtilsCls {
|
|
|
5062
5062
|
|
|
5063
5063
|
return this.getStructures(atoms);
|
|
5064
5064
|
}
|
|
5065
|
+
|
|
5066
|
+
getDateDigitStr() { this.icn3dui;
|
|
5067
|
+
let date = new Date();
|
|
5068
|
+
let monthStr =(date.getMonth() + 1).toString();
|
|
5069
|
+
if(date.getMonth() + 1 < 10) monthStr = '0' + monthStr;
|
|
5070
|
+
|
|
5071
|
+
let dateStr = date.getDate().toString();
|
|
5072
|
+
if(date.getDate() < 10) dateStr = '0' + dateStr;
|
|
5073
|
+
|
|
5074
|
+
return date.getFullYear().toString() + monthStr + dateStr;
|
|
5075
|
+
}
|
|
5065
5076
|
}
|
|
5066
5077
|
|
|
5067
5078
|
/**
|
|
@@ -7359,7 +7370,7 @@ class ClickMenu {
|
|
|
7359
7370
|
ic.resid2specCls.selectProperty('polar');
|
|
7360
7371
|
});
|
|
7361
7372
|
me.myEventCls.onIds("#" + me.pre + "mn2_propBfactor", "click", function(e) { me.icn3d; //e.preventDefault();
|
|
7362
|
-
me.htmlCls.dialogCls.openDlg('dl_propbybfactor', 'Select residue based on B-factor');
|
|
7373
|
+
me.htmlCls.dialogCls.openDlg('dl_propbybfactor', 'Select residue based on B-factor/pLDDT');
|
|
7363
7374
|
});
|
|
7364
7375
|
me.myEventCls.onIds("#" + me.pre + "mn2_propSolAcc", "click", function(e) { me.icn3d; //e.preventDefault();
|
|
7365
7376
|
me.htmlCls.dialogCls.openDlg('dl_propbypercentout', 'Select residue based on the percentage of solvent accessilbe surface area');
|
|
@@ -8174,24 +8185,24 @@ class ClickMenu {
|
|
|
8174
8185
|
thisClass.setLogCmd('setoption phisurface nothing', true);
|
|
8175
8186
|
});
|
|
8176
8187
|
|
|
8177
|
-
me.myEventCls.onIds("#" + me.pre + "applymap2fofc", "click", function(e) { let ic = me.icn3d;
|
|
8188
|
+
me.myEventCls.onIds("#" + me.pre + "applymap2fofc", "click", async function(e) { let ic = me.icn3d;
|
|
8178
8189
|
e.preventDefault();
|
|
8179
8190
|
|
|
8180
8191
|
//if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
8181
8192
|
let sigma2fofc = parseFloat($("#" + me.pre + "sigma2fofc" ).val());
|
|
8182
8193
|
let type = '2fofc';
|
|
8183
|
-
ic.dsn6ParserCls.dsn6Parser(ic.inputid, type, sigma2fofc);
|
|
8194
|
+
await ic.dsn6ParserCls.dsn6Parser(ic.inputid, type, sigma2fofc);
|
|
8184
8195
|
//ic.setOptionCls.setOption('map', '2fofc');
|
|
8185
8196
|
thisClass.setLogCmd('set map 2fofc sigma ' + sigma2fofc, true);
|
|
8186
8197
|
});
|
|
8187
8198
|
|
|
8188
|
-
me.myEventCls.onIds("#" + me.pre + "applymapfofc", "click", function(e) { let ic = me.icn3d;
|
|
8199
|
+
me.myEventCls.onIds("#" + me.pre + "applymapfofc", "click", async function(e) { let ic = me.icn3d;
|
|
8189
8200
|
e.preventDefault();
|
|
8190
8201
|
|
|
8191
8202
|
//if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
8192
8203
|
let sigmafofc = parseFloat($("#" + me.pre + "sigmafofc" ).val());
|
|
8193
8204
|
let type = 'fofc';
|
|
8194
|
-
ic.dsn6ParserCls.dsn6Parser(ic.inputid, type, sigmafofc);
|
|
8205
|
+
await ic.dsn6ParserCls.dsn6Parser(ic.inputid, type, sigmafofc);
|
|
8195
8206
|
//ic.setOptionCls.setOption('map', 'fofc');
|
|
8196
8207
|
thisClass.setLogCmd('set map fofc sigma ' + sigmafofc, true);
|
|
8197
8208
|
});
|
|
@@ -8216,7 +8227,7 @@ class ClickMenu {
|
|
|
8216
8227
|
thisClass.setLogCmd('setoption emmap nothing', true);
|
|
8217
8228
|
});
|
|
8218
8229
|
|
|
8219
|
-
me.myEventCls.onIds("#" + me.pre + "applyemmap", "click", function(e) { let ic = me.icn3d;
|
|
8230
|
+
me.myEventCls.onIds("#" + me.pre + "applyemmap", "click", async function(e) { let ic = me.icn3d;
|
|
8220
8231
|
e.preventDefault();
|
|
8221
8232
|
|
|
8222
8233
|
//if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
@@ -8224,7 +8235,7 @@ class ClickMenu {
|
|
|
8224
8235
|
let type = 'em';
|
|
8225
8236
|
//ic.emd = 'emd-3906';
|
|
8226
8237
|
|
|
8227
|
-
ic.densityCifParserCls.densityCifParser(ic.inputid, type, empercentage, ic.emd);
|
|
8238
|
+
await ic.densityCifParserCls.densityCifParser(ic.inputid, type, empercentage, ic.emd);
|
|
8228
8239
|
thisClass.setLogCmd('set emmap percentage ' + empercentage, true);
|
|
8229
8240
|
});
|
|
8230
8241
|
|
|
@@ -8272,6 +8283,18 @@ class ClickMenu {
|
|
|
8272
8283
|
// }
|
|
8273
8284
|
});
|
|
8274
8285
|
|
|
8286
|
+
me.myEventCls.onIds("#" + me.pre + "mn6_igrefTpl", "click", async function(e) { me.icn3d; //e.preventDefault();
|
|
8287
|
+
me.htmlCls.dialogCls.openDlg('dl_igrefTpl', 'Choose an Ig template');
|
|
8288
|
+
});
|
|
8289
|
+
|
|
8290
|
+
me.myEventCls.onIds("#" + me.pre + "mn6_igrefTpl_apply", "click", async function(e) { let ic = me.icn3d; //e.preventDefault();
|
|
8291
|
+
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
8292
|
+
|
|
8293
|
+
let template = $("#" + me.pre + "igrefTpl").val();
|
|
8294
|
+
thisClass.setLogCmd('ig template ' + template, true);
|
|
8295
|
+
await ic.refnumCls.showIgRefNum(template);
|
|
8296
|
+
});
|
|
8297
|
+
|
|
8275
8298
|
me.myEventCls.onIds("#" + me.pre + "mn6_igrefNo", "click", async function(e) { let ic = me.icn3d; //e.preventDefault();
|
|
8276
8299
|
thisClass.setLogCmd('ig refnum off', true);
|
|
8277
8300
|
await ic.refnumCls.hideIgRefNum();
|
|
@@ -8474,7 +8497,8 @@ class ClickMenu {
|
|
|
8474
8497
|
// alert("The url is more than 4000 characters and may not work.");
|
|
8475
8498
|
//}
|
|
8476
8499
|
//else {
|
|
8477
|
-
url = url.replace("full.html", "full2.html");
|
|
8500
|
+
url = url.replace("icn3d/full.html?", "icn3d/full2.html?");
|
|
8501
|
+
url = url.replace("icn3d/?", "icn3d/full2.html?");
|
|
8478
8502
|
url += '&closepopup=1';
|
|
8479
8503
|
let urlTarget = (ic.structures && Object.keys(ic.structures).length > 0) ? '_blank' : '_self';
|
|
8480
8504
|
window.open(url, urlTarget);
|
|
@@ -8803,6 +8827,14 @@ class ClickMenu {
|
|
|
8803
8827
|
let pos = str.indexOf('|||');
|
|
8804
8828
|
if(pos !== -1) str = str.substr(0, pos);
|
|
8805
8829
|
let transformation = {};
|
|
8830
|
+
|
|
8831
|
+
if(!ic.quaternion) {
|
|
8832
|
+
// reset parameters
|
|
8833
|
+
ic._zoomFactor = 1.0;
|
|
8834
|
+
ic.mouseChange = new THREE.Vector2(0,0);
|
|
8835
|
+
ic.quaternion = new THREE.Quaternion(0,0,0,1);
|
|
8836
|
+
}
|
|
8837
|
+
|
|
8806
8838
|
transformation.factor = ic._zoomFactor;
|
|
8807
8839
|
transformation.mouseChange = ic.mouseChange;
|
|
8808
8840
|
transformation.quaternion = {};
|
|
@@ -9518,21 +9550,23 @@ class SetMenu {
|
|
|
9518
9550
|
|
|
9519
9551
|
html += this.getLink('mn1_exportPdbRes', 'PDB', 1, 2);
|
|
9520
9552
|
html += this.getLink('profixpdb', 'PDB with Missing Atoms', undefined, 2);
|
|
9521
|
-
|
|
9553
|
+
|
|
9554
|
+
// the quality is not good to add hydrogen
|
|
9555
|
+
//html += this.getLink('profixpdbh', 'PDB with Hydrogens', undefined, 2);
|
|
9522
9556
|
|
|
9523
9557
|
if(me.cfg.cid === undefined) {
|
|
9524
9558
|
html += this.getLink('mn1_exportSecondary', 'Secondary Structure', undefined, 2);
|
|
9525
9559
|
}
|
|
9526
9560
|
|
|
9527
9561
|
//!!!
|
|
9528
|
-
|
|
9562
|
+
/*
|
|
9529
9563
|
html += this.getMenuText('m1_exportrefnum', 'Reference Numbers', undefined, undefined, 2);
|
|
9530
9564
|
html += "<ul>";
|
|
9531
9565
|
html += this.getLink('mn1_exportIgstrand', 'Ig Strand', undefined, 3);
|
|
9532
9566
|
html += this.getLink('mn1_exportKabat', 'Kabat', undefined, 3);
|
|
9533
9567
|
html += this.getLink('mn1_exportImgt', 'IMGT', undefined, 3);
|
|
9534
9568
|
html += "</ul>";
|
|
9535
|
-
|
|
9569
|
+
*/
|
|
9536
9570
|
|
|
9537
9571
|
html += "<li><br/></li>";
|
|
9538
9572
|
|
|
@@ -10369,7 +10403,7 @@ class SetMenu {
|
|
|
10369
10403
|
|
|
10370
10404
|
//if(me.cfg.afid) html += this.getRadio('mn4_clr', 'mn4_clrConfidence', 'AF Confidence');
|
|
10371
10405
|
//if(!me.cfg.mmtfid && !me.cfg.pdbid && !me.cfg.opmid && !me.cfg.mmdbid && !me.cfg.gi && !me.cfg.uniprotid && !me.cfg.blast_rep_id && !me.cfg.cid && !me.cfg.mmcifid && !me.cfg.align && !me.cfg.chainalign) {
|
|
10372
|
-
html += this.getRadio('mn4_clr', 'mn4_clrConfidence', '
|
|
10406
|
+
html += this.getRadio('mn4_clr', 'mn4_clrConfidence', 'pLDDT', undefined, 1, 1);
|
|
10373
10407
|
//}
|
|
10374
10408
|
|
|
10375
10409
|
//!!!
|
|
@@ -10599,10 +10633,11 @@ class SetMenu {
|
|
|
10599
10633
|
//!!!
|
|
10600
10634
|
/*
|
|
10601
10635
|
html += this.getLink('mn6_igrefYes', 'Show Ig Ref. Number', undefined, 2);
|
|
10636
|
+
html += this.getLink('mn6_igrefTpl', 'Ig w/ Specified Template', undefined, 2);
|
|
10602
10637
|
html += this.getLink('mn6_igrefNo', 'Hide Ig Ref. Number', undefined, 2);
|
|
10603
|
-
|
|
10604
|
-
html += this.getMenuSep();
|
|
10605
10638
|
*/
|
|
10639
|
+
html += this.getMenuSep();
|
|
10640
|
+
|
|
10606
10641
|
html += this.getLink('mn6_customref', 'Custom Ref. Number', undefined, 2);
|
|
10607
10642
|
html += "</ul>";
|
|
10608
10643
|
html += "</li>";
|
|
@@ -12689,10 +12724,10 @@ class SetDialog {
|
|
|
12689
12724
|
html += "</div>";
|
|
12690
12725
|
|
|
12691
12726
|
html += me.htmlCls.divStr + "dl_propbybfactor' class='" + dialogClass + "'>";
|
|
12692
|
-
html += this.addNotebookTitle('dl_propbybfactor', 'Select residues basen on B-factor');
|
|
12693
|
-
html += "<div style='width:400px'>Select residue based on B-factor. The values are in the range of 0-100.</div><br>";
|
|
12694
|
-
html += "<b>Min B-factor</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "minbfactor' value='0' size='10'>% <br>";
|
|
12695
|
-
html += "<b>Max B-factor</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "maxbfactor' value='100' size='10'>% <br>";
|
|
12727
|
+
html += this.addNotebookTitle('dl_propbybfactor', 'Select residues basen on B-factor/pLDDT');
|
|
12728
|
+
html += "<div style='width:400px'>Select residue based on B-factor/pLDDT. The values are in the range of 0-100.</div><br>";
|
|
12729
|
+
html += "<b>Min B-factor/pLDDT</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "minbfactor' value='0' size='10'>% <br>";
|
|
12730
|
+
html += "<b>Max B-factor/pLDDT</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "maxbfactor' value='100' size='10'>% <br>";
|
|
12696
12731
|
html += "<button style='white-space:nowrap;' id='" + me.pre + "applypropbybfactor'>Apply</button><br/><br/>";
|
|
12697
12732
|
html += "</div>";
|
|
12698
12733
|
|
|
@@ -12704,6 +12739,31 @@ class SetDialog {
|
|
|
12704
12739
|
html += this.addNotebookTitle('dl_disttable', 'Distance Table', true);
|
|
12705
12740
|
html += "</div>";
|
|
12706
12741
|
|
|
12742
|
+
html += me.htmlCls.divStr + "dl_igrefTpl' class='" + dialogClass + "'>";
|
|
12743
|
+
html += this.addNotebookTitle('dl_igrefTpl', 'Choose an Ig template');
|
|
12744
|
+
html += "<span style='white-space:nowrap;font-weight:bold;'>Choose an Ig template for selected residues:</span> <br><br><select id='" + me.pre + "igrefTpl'>";
|
|
12745
|
+
|
|
12746
|
+
//html += me.htmlCls.setHtmlCls.getOptionHtml(['0', '10', '20', '30', '40', '50', '60', '70', '80', '90', '100'], 3);
|
|
12747
|
+
let group2tpl = {};
|
|
12748
|
+
group2tpl['V'] = ['FAB-HEAVY_5esv_V-n1', 'FAB-LIGHT_5esv_V-n1', 'VNAR_1t6vN_shark_V', 'TCRa_6jxrm_human_V-n1', 'VISTA_6oilA_human_V', 'CD8a_1cd8A_human_V', 'PD1_4zqkB_human_V', 'ICOS_6x4gA_human_V', 'CD28_1yjdC_human_V', 'PDL1_4z18B_human_V-n1', 'CD2_1hnfA_human_V-n1', 'LAG3_7tzgD_human_V-n1'];
|
|
12749
|
+
group2tpl['C1'] = ['FAB-LIGHT_5esv_C1-n2', 'GHR_1axiB_human_FN3-n1', 'VTCN1_Q7Z7D3_human_V-n2', 'B2Microglobulin_7phrL_human_C1', 'FAB-HEAVY_5esv_C1-n2', 'MHCIa_7phrH_human_C1', 'TCRa_6jxrm_human_C1-n2'];
|
|
12750
|
+
group2tpl['C2'] = ['CD2_1hnfA_human_C2-n2', 'Siglec3_5j0bB_human_C2-n2', 'LAG3_7tzgD_human_C2-n2', 'Contactin1_3s97C_human_C2-n2'];
|
|
12751
|
+
group2tpl['Iset'] = ['BTLA_2aw2A_human_Iset', 'Palladin_2dm3A_human_Iset-n1', 'Titin_4uowM_human_Unk-n152', 'JAM1_1nbqA_human_VorIset-n2', 'CD19_6al5A_human_C2orV-n1'];
|
|
12752
|
+
group2tpl['FN3'] = ['InsulinR_8guyE_human_FN3-n1', 'IL6Rb_1bquB_human_FN3-n3', 'Sidekick2_1wf5A_human_FN3-n7', 'InsulinR_8guyE_human_FN3-n2', 'Contactin1_2ee2A_human_FN3-n9', 'IL6Rb_1bquB_human_FN3-n2'];
|
|
12753
|
+
group2tpl['Other'] = ['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4', 'CoAtomerGamma1_1r4xA_human', 'TP34_2o6cA_bacteria', 'RBPJ_6py8C_human_Unk-n2', 'TP47_1o75A_bacteria', 'C3_2qkiD_human_n1', 'BArrestin1_4jqiA_rat_n1', 'RBPJ_6py8C_human_Unk-n1', 'CuZnSuperoxideDismutase_1hl5C_human', 'TEAD1_3kysC_human', 'ASF1A_2iijA_human', 'MPT63_1lmiA_bacteria', 'NaCaExchanger_2fwuA_dog_n2', 'ORF7a_1xakA_virus', 'ECadherin_4zt1A_human_n2', 'NaKATPaseTransporterBeta_2zxeB_spurdogshark', 'LaminAC_1ifrA_human', 'IsdA_2iteA_bacteria'];
|
|
12754
|
+
|
|
12755
|
+
for(let group in group2tpl) {
|
|
12756
|
+
html += "<optgroup label='" + group + "'>";
|
|
12757
|
+
for(let i = 0, il = group2tpl[group].length; i < il; ++i) {
|
|
12758
|
+
let template = group2tpl[group][i];
|
|
12759
|
+
html += me.htmlCls.optionStr + "'" + template + "'>" + template + "</option>";
|
|
12760
|
+
}
|
|
12761
|
+
html += "</optgroup>";
|
|
12762
|
+
}
|
|
12763
|
+
|
|
12764
|
+
html += "</select><br><br><span style='white-space:nowrap;'>" + me.htmlCls.buttonStr + "mn6_igrefTpl_apply'>Show Ig Ref. Number</button></span>";
|
|
12765
|
+
html += "</div>";
|
|
12766
|
+
|
|
12707
12767
|
html += "</div>";
|
|
12708
12768
|
html += "<!--/form-->";
|
|
12709
12769
|
|
|
@@ -16308,10 +16368,11 @@ class SetHtml {
|
|
|
16308
16368
|
|
|
16309
16369
|
let pdbstr = '';
|
|
16310
16370
|
|
|
16311
|
-
|
|
16371
|
+
let bMergeIntoOne = true;
|
|
16372
|
+
pdbstr += ic.saveFileCls.getAtomPDB(atomHash, undefined, undefined, undefined, undefined, undefined, bMergeIntoOne);
|
|
16312
16373
|
pdbstr += ic.saveFileCls.getAtomPDB(ionHash, true, undefined, true);
|
|
16313
16374
|
|
|
16314
|
-
let url =
|
|
16375
|
+
let url = me.htmlCls.baseUrl + "delphi/delphi.cgi";
|
|
16315
16376
|
|
|
16316
16377
|
let pdbid =(me.cfg.cid) ? me.cfg.cid : Object.keys(ic.structures).toString();
|
|
16317
16378
|
|
|
@@ -18750,7 +18811,8 @@ function createDefaultMaterial( cache ) {
|
|
|
18750
18811
|
roughness: 1,
|
|
18751
18812
|
transparent: false,
|
|
18752
18813
|
depthTest: true,
|
|
18753
|
-
side: FrontSide
|
|
18814
|
+
side: FrontSide,
|
|
18815
|
+
//needsUpdate: true
|
|
18754
18816
|
} );
|
|
18755
18817
|
|
|
18756
18818
|
}
|
|
@@ -21677,7 +21739,7 @@ function findNodes( motionController, scene ) {
|
|
|
21677
21739
|
|
|
21678
21740
|
// Attach a touch dot to the touchpad.
|
|
21679
21741
|
const sphereGeometry = new SphereGeometry( 0.001 );
|
|
21680
|
-
const material = new MeshBasicMaterial( {
|
|
21742
|
+
const material = new MeshBasicMaterial( {color: 0x0000FF } );
|
|
21681
21743
|
const sphere = new Mesh( sphereGeometry, material );
|
|
21682
21744
|
component.touchPointNode.add( sphere );
|
|
21683
21745
|
|
|
@@ -22299,7 +22361,7 @@ class CanvasUI{
|
|
|
22299
22361
|
if ( this.scene ){
|
|
22300
22362
|
const radius = 0.015;
|
|
22301
22363
|
const geometry = new THREE.IcosahedronBufferGeometry( radius );
|
|
22302
|
-
const material = new THREE.MeshBasicMaterial( {
|
|
22364
|
+
const material = new THREE.MeshBasicMaterial( {color: 0x0000aa } );
|
|
22303
22365
|
|
|
22304
22366
|
const mesh1 = new THREE.Mesh( geometry, material );
|
|
22305
22367
|
mesh1.visible = false;
|
|
@@ -24106,7 +24168,7 @@ class Box {
|
|
|
24106
24168
|
specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, color: color }));
|
|
24107
24169
|
// }
|
|
24108
24170
|
// else {
|
|
24109
|
-
// mesh = new THREE.Mesh(ic.boxGeometry, new THREE.MeshPhongMaterial({
|
|
24171
|
+
// mesh = new THREE.Mesh(ic.boxGeometry, new THREE.MeshPhongMaterial({needsUpdate: true,
|
|
24110
24172
|
// specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, color: color }));
|
|
24111
24173
|
// }
|
|
24112
24174
|
|
|
@@ -24567,18 +24629,18 @@ class Cylinder {
|
|
|
24567
24629
|
else {
|
|
24568
24630
|
if(bHighlight === 2) {
|
|
24569
24631
|
mesh = new THREE.Mesh(ic.cylinderGeometry, new THREE.MeshPhongMaterial(
|
|
24570
|
-
{
|
|
24632
|
+
{transparent: true, opacity: opacity, specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, color: color }));
|
|
24571
24633
|
|
|
24572
24634
|
radius *= 1.5;
|
|
24573
24635
|
}
|
|
24574
24636
|
//else if(bGlycan) {
|
|
24575
24637
|
else {
|
|
24576
24638
|
mesh = new THREE.Mesh(ic.cylinderGeometry, new THREE.MeshPhongMaterial(
|
|
24577
|
-
{
|
|
24639
|
+
{transparent: true, opacity: opacity, specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, color: color }));
|
|
24578
24640
|
}
|
|
24579
24641
|
// else {
|
|
24580
24642
|
// mesh = new THREE.Mesh(ic.cylinderGeometry, new THREE.MeshPhongMaterial(
|
|
24581
|
-
// {
|
|
24643
|
+
// {specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, color: color }));
|
|
24582
24644
|
// }
|
|
24583
24645
|
|
|
24584
24646
|
mesh.position.copy(p0).add(p1).multiplyScalar(0.5);
|
|
@@ -24645,7 +24707,7 @@ class Cylinder {
|
|
|
24645
24707
|
if(me.bNode) return;
|
|
24646
24708
|
|
|
24647
24709
|
let mesh = new THREE.Mesh(ic.cylinderGeometry, new THREE.MeshPhongMaterial(
|
|
24648
|
-
{
|
|
24710
|
+
{specular: ic.frac, shininess: ic.shininess, emissive: ic.emissive, color: color }));
|
|
24649
24711
|
|
|
24650
24712
|
mesh.position.copy(p0).add(p1).multiplyScalar(0.5);
|
|
24651
24713
|
mesh.matrixAutoUpdate = false;
|
|
@@ -24876,7 +24938,7 @@ class Line$1 {
|
|
|
24876
24938
|
if(bHighlight === 1) ;
|
|
24877
24939
|
else {
|
|
24878
24940
|
line = new THREE.LineSegments(geo, new THREE.LineBasicMaterial(
|
|
24879
|
-
{
|
|
24941
|
+
{linewidth: ic.linewidth, vertexColors: true }));
|
|
24880
24942
|
ic.mdl.add(line);
|
|
24881
24943
|
}
|
|
24882
24944
|
|
|
@@ -25009,7 +25071,7 @@ class Line$1 {
|
|
|
25009
25071
|
let p2 = line.position2;
|
|
25010
25072
|
|
|
25011
25073
|
let dashed = (line.dashed) ? line.dashed : false;
|
|
25012
|
-
let dashSize = 0.3;
|
|
25074
|
+
let dashSize = (name == 'missingres') ? 0.8 : 0.3;
|
|
25013
25075
|
|
|
25014
25076
|
let radius = (line.radius) ? line.radius : ic.lineRadius;
|
|
25015
25077
|
let opacity = (line.opacity) ? line.opacity : 1.0;
|
|
@@ -27080,7 +27142,8 @@ class TextSprite {
|
|
|
27080
27142
|
map: texture,
|
|
27081
27143
|
//useScreenCoordinates: false,
|
|
27082
27144
|
depthTest: !frontOfTarget,
|
|
27083
|
-
depthWrite: !frontOfTarget
|
|
27145
|
+
depthWrite: !frontOfTarget,
|
|
27146
|
+
//needsUpdate: true
|
|
27084
27147
|
} );
|
|
27085
27148
|
|
|
27086
27149
|
//https://stackoverflow.com/questions/29421702/threejs-texture
|
|
@@ -28379,19 +28442,25 @@ ProteinSurface.prototype.initparm = function(extent, btype, in_bCalcArea, atomli
|
|
|
28379
28442
|
|
|
28380
28443
|
// 2. If size > 90, change scale
|
|
28381
28444
|
//var threshbox = 180; // maximum possible boxsize
|
|
28382
|
-
if(this.bCalcArea || this.defaultScaleFactor * maxLen > this.threshbox) {
|
|
28445
|
+
//if(this.bCalcArea || this.defaultScaleFactor * maxLen > this.threshbox) {
|
|
28446
|
+
if(this.defaultScaleFactor * maxLen > this.threshbox) {
|
|
28383
28447
|
boxLength = Math.floor(this.threshbox);
|
|
28384
28448
|
this.scaleFactor =(this.threshbox - 1.0) / maxLen;
|
|
28385
28449
|
}
|
|
28450
|
+
|
|
28451
|
+
// 3. use a fixed scaleFactor for surface area calculation
|
|
28452
|
+
if(this.bCalcArea) {
|
|
28453
|
+
this.scaleFactor = this.defaultScaleFactor;
|
|
28454
|
+
}
|
|
28386
28455
|
// end of surface.js part
|
|
28387
28456
|
|
|
28388
28457
|
this.pLength = Math.ceil(this.scaleFactor *(this.pmaxx - this.pminx)) + 1;
|
|
28389
28458
|
this.pWidth = Math.ceil(this.scaleFactor *(this.pmaxy - this.pminy)) + 1;
|
|
28390
28459
|
this.pHeight = Math.ceil(this.scaleFactor *(this.pmaxz - this.pminz)) + 1;
|
|
28391
28460
|
|
|
28392
|
-
this.finalScaleFactor.x =(this.pLength - 1.0) /(this.pmaxx - this.pminx);
|
|
28393
|
-
this.finalScaleFactor.y =(this.pWidth - 1.0) /(this.pmaxy - this.pminy);
|
|
28394
|
-
this.finalScaleFactor.z =(this.pHeight - 1.0) /(this.pmaxz - this.pminz);
|
|
28461
|
+
// this.finalScaleFactor.x =(this.pLength - 1.0) /(this.pmaxx - this.pminx);
|
|
28462
|
+
// this.finalScaleFactor.y =(this.pWidth - 1.0) /(this.pmaxy - this.pminy);
|
|
28463
|
+
// this.finalScaleFactor.z =(this.pHeight - 1.0) /(this.pmaxz - this.pminz);
|
|
28395
28464
|
|
|
28396
28465
|
this.boundingatom(btype);
|
|
28397
28466
|
this.cutRadius = this.probeRadius * this.scaleFactor;
|
|
@@ -28505,9 +28574,13 @@ ProteinSurface.prototype.fillvoxels = function(atoms, atomlist) { //(int seqinit
|
|
|
28505
28574
|
for(i = 0; i < this.pLength; ++i) {
|
|
28506
28575
|
for(j = 0; j < this.pWidth; ++j) {
|
|
28507
28576
|
for(k = 0; k < this.pHeight; ++k) {
|
|
28508
|
-
let x = i / this.finalScaleFactor.x - this.ptranx;
|
|
28509
|
-
let y = j / this.finalScaleFactor.y - this.ptrany;
|
|
28510
|
-
let z = k / this.finalScaleFactor.z - this.ptranz;
|
|
28577
|
+
// let x = i / this.finalScaleFactor.x - this.ptranx;
|
|
28578
|
+
// let y = j / this.finalScaleFactor.y - this.ptrany;
|
|
28579
|
+
// let z = k / this.finalScaleFactor.z - this.ptranz;
|
|
28580
|
+
|
|
28581
|
+
let x = i / this.scaleFactor - this.ptranx;
|
|
28582
|
+
let y = j / this.scaleFactor - this.ptrany;
|
|
28583
|
+
let z = k / this.scaleFactor - this.ptranz;
|
|
28511
28584
|
|
|
28512
28585
|
let r = new THREE.Vector3(x, y, z);
|
|
28513
28586
|
|
|
@@ -29137,7 +29210,7 @@ ProteinSurface.prototype.marchingcube = function(stype) {
|
|
|
29137
29210
|
}
|
|
29138
29211
|
|
|
29139
29212
|
// calculate surface area
|
|
29140
|
-
let serial2area,
|
|
29213
|
+
let serial2area, area = 0;
|
|
29141
29214
|
if(this.bCalcArea) {
|
|
29142
29215
|
let faceHash = {};
|
|
29143
29216
|
serial2area = {};
|
|
@@ -29207,14 +29280,15 @@ ProteinSurface.prototype.marchingcube = function(stype) {
|
|
|
29207
29280
|
//}
|
|
29208
29281
|
} // for loop
|
|
29209
29282
|
|
|
29210
|
-
maxScaleFactor = Math.max(this.finalScaleFactor.x, this.finalScaleFactor.y, this.finalScaleFactor.z);
|
|
29211
|
-
area = area / maxScaleFactor / maxScaleFactor;
|
|
29212
|
-
|
|
29283
|
+
//maxScaleFactor = Math.max(this.finalScaleFactor.x, this.finalScaleFactor.y, this.finalScaleFactor.z);
|
|
29284
|
+
//area = area / maxScaleFactor / maxScaleFactor;
|
|
29285
|
+
area = area / this.scaleFactor / this.scaleFactor;
|
|
29213
29286
|
}
|
|
29214
29287
|
|
|
29215
29288
|
if(!this.bCalcArea) this.marchingCube.laplacianSmooth(1, this.verts, this.faces);
|
|
29216
29289
|
|
|
29217
|
-
return {"area": area, "serial2area": serial2area, "scaleFactor": maxScaleFactor};
|
|
29290
|
+
//return {"area": area, "serial2area": serial2area, "scaleFactor": maxScaleFactor};
|
|
29291
|
+
return {"area": area, "serial2area": serial2area, "scaleFactor": this.scaleFactor};
|
|
29218
29292
|
};
|
|
29219
29293
|
|
|
29220
29294
|
/* ProteinSurface4.js
|
|
@@ -30194,7 +30268,8 @@ class Surface {
|
|
|
30194
30268
|
wireframe: wireframe,
|
|
30195
30269
|
opacity: opacity,
|
|
30196
30270
|
transparent: true,
|
|
30197
|
-
side: THREE.DoubleSide
|
|
30271
|
+
side: THREE.DoubleSide,
|
|
30272
|
+
//needsUpdate: true
|
|
30198
30273
|
}));
|
|
30199
30274
|
|
|
30200
30275
|
//http://www.html5gamedevs.com/topic/7288-threejs-transparency-bug-or-limitation-or-what/
|
|
@@ -30263,7 +30338,8 @@ class Surface {
|
|
|
30263
30338
|
opacity: opacity,
|
|
30264
30339
|
transparent: true,
|
|
30265
30340
|
depthWrite: (parseInt(10*opacity) != 10) ? false : true, // important to make the transparency work
|
|
30266
|
-
side: THREE.DoubleSide
|
|
30341
|
+
side: THREE.DoubleSide,
|
|
30342
|
+
//needsUpdate: true
|
|
30267
30343
|
//depthTest: (ic.ic.transparentRenderOrder) ? false : true
|
|
30268
30344
|
}));
|
|
30269
30345
|
|
|
@@ -32447,7 +32523,7 @@ class Impostor {
|
|
|
32447
32523
|
fragmentShader: this.getShader(shaderName + ".frag"),
|
|
32448
32524
|
depthTest: true,
|
|
32449
32525
|
depthWrite: true,
|
|
32450
|
-
//needsUpdate: true,
|
|
32526
|
+
//needsUpdate: true,
|
|
32451
32527
|
lights: true
|
|
32452
32528
|
});
|
|
32453
32529
|
|
|
@@ -33214,7 +33290,7 @@ class Instancing {
|
|
|
33214
33290
|
fragmentShader: ic.impostorCls.getShader(name + ".frag"),
|
|
33215
33291
|
depthTest: true,
|
|
33216
33292
|
depthWrite: true,
|
|
33217
|
-
//needsUpdate: true,
|
|
33293
|
+
//needsUpdate: true,
|
|
33218
33294
|
lights: true
|
|
33219
33295
|
});
|
|
33220
33296
|
|
|
@@ -33337,7 +33413,7 @@ class Alternate {
|
|
|
33337
33413
|
// change the display atom when alternating
|
|
33338
33414
|
//Show structures one by one.
|
|
33339
33415
|
alternateStructures() { let ic = this.icn3d, me = ic.icn3dui;
|
|
33340
|
-
ic.
|
|
33416
|
+
ic.bAlternate = true;
|
|
33341
33417
|
|
|
33342
33418
|
//ic.transformCls.zoominSelection();
|
|
33343
33419
|
|
|
@@ -33434,14 +33510,14 @@ class Alternate {
|
|
|
33434
33510
|
ic.applyMapCls.removeEmmaps();
|
|
33435
33511
|
ic.applyMapCls.applyEmmapOptions();
|
|
33436
33512
|
|
|
33437
|
-
//
|
|
33513
|
+
// allow the alternation of DelPhi map
|
|
33438
33514
|
ic.applyMapCls.removePhimaps();
|
|
33439
|
-
|
|
33515
|
+
ic.applyMapCls.applyPhimapOptions();
|
|
33440
33516
|
// should recalculate the potential
|
|
33441
33517
|
//ic.loadDelphiFileBase('delphi');
|
|
33442
33518
|
|
|
33443
|
-
|
|
33444
|
-
|
|
33519
|
+
ic.applyMapCls.removeSurfaces();
|
|
33520
|
+
ic.applyMapCls.applyphisurfaceOptions();
|
|
33445
33521
|
// should recalculate the potential
|
|
33446
33522
|
//ic.loadDelphiFileBase('delphi2');
|
|
33447
33523
|
|
|
@@ -33720,6 +33796,7 @@ class Alternate {
|
|
|
33720
33796
|
if(ic.scene) {
|
|
33721
33797
|
// https://github.com/gkjohnson/three-gpu-pathtracer/blob/main/example/basic.js
|
|
33722
33798
|
ic.renderer.outputEncoding = THREE.sRGBEncoding;
|
|
33799
|
+
//ic.renderer.outputEncoding = THREE.LinearEncoding
|
|
33723
33800
|
|
|
33724
33801
|
ic.renderer.render(ic.scene, cam);
|
|
33725
33802
|
}
|
|
@@ -36570,7 +36647,7 @@ class SetOption {
|
|
|
36570
36647
|
|
|
36571
36648
|
let colorLabel = colorType.substr(0, 1).toUpperCase() + colorType.substr(1);
|
|
36572
36649
|
if(colorType == 'confidence') {
|
|
36573
|
-
colorLabel = '
|
|
36650
|
+
colorLabel = 'pLDDT';
|
|
36574
36651
|
}
|
|
36575
36652
|
else if(colorType == 'normalized hydrophobic') {
|
|
36576
36653
|
colorLabel = 'Normalized Hydrophobicity';
|
|
@@ -36857,15 +36934,15 @@ class SetOption {
|
|
|
36857
36934
|
|
|
36858
36935
|
const name2color = {
|
|
36859
36936
|
//"A- Strand": "FF00FF",
|
|
36860
|
-
"A Strand": "663399",
|
|
36861
|
-
//"A+ Strand": "
|
|
36862
|
-
"A' Strand": "
|
|
36937
|
+
"A Strand": "9400D3", //"663399",
|
|
36938
|
+
//"A+ Strand": "9400D3", //"663399",
|
|
36939
|
+
"A' Strand": "9400D3", //"663399",
|
|
36863
36940
|
"B Strand": "ba55d3",
|
|
36864
36941
|
"C Strand": "0000FF",
|
|
36865
36942
|
"C' Strand": "6495ED",
|
|
36866
36943
|
"C'' Strand": "006400",
|
|
36867
36944
|
"D Strand": "00FF00",
|
|
36868
|
-
"E Strand": "FFFF00", //"F0E68C",
|
|
36945
|
+
"E Strand": "F7DC6F", //"FFFF00", //"F0E68C",
|
|
36869
36946
|
"F Strand": "FFA500",
|
|
36870
36947
|
"G Strand": "FF0000",
|
|
36871
36948
|
//"G+ Strand": "8B0000",
|
|
@@ -36893,14 +36970,14 @@ class SetOption {
|
|
|
36893
36970
|
"<b>Protodomain 1</b>": "",
|
|
36894
36971
|
"A Strand": "0000FF",
|
|
36895
36972
|
"B Strand": "006400",
|
|
36896
|
-
"C Strand": "FFFF00", //"F0E68C",
|
|
36973
|
+
"C Strand": "F7DC6F", //"FFFF00", //"F0E68C",
|
|
36897
36974
|
"C' Strand": "FFA500",
|
|
36898
36975
|
"<br><b>Linker</b>": "",
|
|
36899
36976
|
"C'' Strand": "FF0000",
|
|
36900
36977
|
"<br><b>Protodomain 2</b>": "",
|
|
36901
36978
|
"D Strand": "0000FF",
|
|
36902
36979
|
"E Strand": "006400",
|
|
36903
|
-
"F Strand": "FFFF00", //"F0E68C",
|
|
36980
|
+
"F Strand": "F7DC6F", //"FFFF00", //"F0E68C",
|
|
36904
36981
|
"G Strand": "FFA500",
|
|
36905
36982
|
"": "",
|
|
36906
36983
|
"Loop": "CCCCCC"
|
|
@@ -43060,7 +43137,7 @@ class ShowAnno {
|
|
|
43060
43137
|
let proteinName = fullProteinName;
|
|
43061
43138
|
//if(proteinName.length > 40) proteinName = proteinName.substr(0, 40) + "...";
|
|
43062
43139
|
let categoryStr =(index == 0) ? "<span class='icn3d-annoLargeTitle'><b>Proteins</b>: </span><br><br>" : "";
|
|
43063
|
-
let geneLink =(ic.chainsGene[chnid] && ic.chainsGene[chnid].geneId) ? "(Gene: <a href='https://www.ncbi.nlm.nih.gov/gene/" + ic.chainsGene[chnid].geneId + "?report=gene_table' target='_blank' title='" + ic.chainsGene[chnid].geneDesc + "'>" + ic.chainsGene[chnid].geneSymbol + "</a>)" : '';
|
|
43140
|
+
let geneLink =(ic.chainsGene[chnid] && ic.chainsGene[chnid].geneId && ic.chainsGene[chnid].geneDesc) ? "(Gene: <a href='https://www.ncbi.nlm.nih.gov/gene/" + ic.chainsGene[chnid].geneId + "?report=gene_table' target='_blank' title='" + ic.chainsGene[chnid].geneDesc + "'>" + ic.chainsGene[chnid].geneSymbol + "</a>)" : '';
|
|
43064
43141
|
let structure = chnid.substr(0, chnid.indexOf('_'));
|
|
43065
43142
|
let chainLink = (structure.length > 5) ? '<a href="https://alphafold.ebi.ac.uk/entry/' + structure + '" target="_blank">' + chnid + '</a>' : chnid;
|
|
43066
43143
|
let chainHtml = "<div id='" + ic.pre + "anno_" + chnid + "' class='icn3d-annotation'>" + categoryStr
|
|
@@ -43737,7 +43814,7 @@ class ShowSeq {
|
|
|
43737
43814
|
html += '<span>-</span>'; //'<span>-</span>';
|
|
43738
43815
|
}
|
|
43739
43816
|
}
|
|
43740
|
-
|
|
43817
|
+
|
|
43741
43818
|
if(ic.seqStartLen && ic.seqStartLen[chnid]) html += this.insertMulGap(ic.seqEndLen[chnid], '-');
|
|
43742
43819
|
|
|
43743
43820
|
html += '<span class="icn3d-residueNum"></span>';
|
|
@@ -43956,7 +44033,7 @@ class ShowSeq {
|
|
|
43956
44033
|
html += '</div>';
|
|
43957
44034
|
html2 += '</div>';
|
|
43958
44035
|
html3 += '</div>';
|
|
43959
|
-
|
|
44036
|
+
|
|
43960
44037
|
//if(Object.keys(ic.chains[chnid]).length > 10) {
|
|
43961
44038
|
if(ic.giSeq[chnid].length > 10) {
|
|
43962
44039
|
let atom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.chains[chnid]);
|
|
@@ -44004,27 +44081,31 @@ class ShowSeq {
|
|
|
44004
44081
|
html += '</div>';
|
|
44005
44082
|
html3 += '</div></div>';
|
|
44006
44083
|
}
|
|
44007
|
-
|
|
44084
|
+
|
|
44085
|
+
if(ic.bShowRefnum && ic.chainid2refpdbname.hasOwnProperty(chnid) && ic.chainid2refpdbname[chnid].length > 0) {
|
|
44008
44086
|
let result = this.showAllRefNum(giSeq, chnid);
|
|
44087
|
+
|
|
44009
44088
|
html += result.html;
|
|
44010
44089
|
html3 += result.html3;
|
|
44011
44090
|
}
|
|
44012
|
-
|
|
44091
|
+
|
|
44092
|
+
if(ic.bShowCustomRefnum && ic.chainsMapping.hasOwnProperty(chnid)) {
|
|
44013
44093
|
let bCustom = true;
|
|
44014
44094
|
let result = this.showRefNum(giSeq, chnid, undefined, bCustom);
|
|
44015
44095
|
html += result.html;
|
|
44016
44096
|
html3 += result.html3;
|
|
44017
44097
|
}
|
|
44018
44098
|
}
|
|
44019
|
-
|
|
44099
|
+
|
|
44020
44100
|
// highlight reference numbers
|
|
44021
44101
|
if(ic.bShowRefnum) {
|
|
44022
|
-
|
|
44102
|
+
// comment out so that this process didn't change the selection
|
|
44103
|
+
//ic.hAtoms = ic.hAtomsRefnum;
|
|
44023
44104
|
|
|
44024
44105
|
// commented out because it produced too many commands
|
|
44025
44106
|
// let name = 'refnum_anchors';
|
|
44026
44107
|
// ic.selectionCls.saveSelection(name, name);
|
|
44027
|
-
|
|
44108
|
+
|
|
44028
44109
|
ic.hlUpdateCls.updateHlAll();
|
|
44029
44110
|
}
|
|
44030
44111
|
|
|
@@ -44055,9 +44136,10 @@ class ShowSeq {
|
|
|
44055
44136
|
//ic.setColorCls.setColorByOptions(ic.opts, ic.atoms);
|
|
44056
44137
|
ic.setColorCls.setColorByOptions(ic.opts, ic.dAtoms);
|
|
44057
44138
|
|
|
44058
|
-
ic.selectionCls.selectAll_base();
|
|
44139
|
+
//ic.selectionCls.selectAll_base();
|
|
44059
44140
|
ic.hlUpdateCls.updateHlAll();
|
|
44060
44141
|
//ic.drawCls.draw();
|
|
44142
|
+
ic.drawCls.draw();
|
|
44061
44143
|
}
|
|
44062
44144
|
|
|
44063
44145
|
return {'html': html, 'html3': html3};
|
|
@@ -44133,7 +44215,10 @@ class ShowSeq {
|
|
|
44133
44215
|
|
|
44134
44216
|
if(!bCustom && !kabat_or_imgt && !me.bNode) { // do not overwrite loops in node
|
|
44135
44217
|
// reset ic.residIgLoop for the current selection, which could be the second round of ref num assignment
|
|
44136
|
-
|
|
44218
|
+
// just current chain
|
|
44219
|
+
let atomHash = me.hashUtilsCls.intHash(ic.chains[chnid], ic.hAtoms);
|
|
44220
|
+
let residHash = ic.firstAtomObjCls.getResiduesFromAtoms(atomHash);
|
|
44221
|
+
|
|
44137
44222
|
for(let resid in residHash) {
|
|
44138
44223
|
// not in loop any more if you assign ref numbers multiple times
|
|
44139
44224
|
delete ic.residIgLoop[resid];
|
|
@@ -44171,8 +44256,10 @@ class ShowSeq {
|
|
|
44171
44256
|
|
|
44172
44257
|
postfix = strandPostfix + '_' + index;
|
|
44173
44258
|
|
|
44259
|
+
let firstTwo = parseInt(refnum.toString().substr(0, 2)); // A- strand
|
|
44260
|
+
|
|
44174
44261
|
if(currStrand && currStrand != ' ') {
|
|
44175
|
-
if(refnum3c.substr(0,1) != '9') {
|
|
44262
|
+
if(refnum3c.substr(0,1) != '9' || firstTwo == 10) {
|
|
44176
44263
|
let lastTwo = parseInt(refnum.toString().substr(refnum.toString().length - 2, 2));
|
|
44177
44264
|
|
|
44178
44265
|
if(currStrand != prevStrand) { // reset currCnt
|
|
@@ -44199,6 +44286,10 @@ class ShowSeq {
|
|
|
44199
44286
|
resCntAtAnchor = 0;
|
|
44200
44287
|
}
|
|
44201
44288
|
|
|
44289
|
+
if(firstTwo == 10) {
|
|
44290
|
+
strandArray[strandCnt].anchorRefnum = 0;
|
|
44291
|
+
}
|
|
44292
|
+
|
|
44202
44293
|
strandArray[strandCnt].strandPostfix = strandPostfix; // a in A1250a
|
|
44203
44294
|
strandArray[strandCnt].strand = currStrand; // A in A1250a
|
|
44204
44295
|
|
|
@@ -44221,6 +44312,10 @@ class ShowSeq {
|
|
|
44221
44312
|
resCntAtAnchor = 0;
|
|
44222
44313
|
}
|
|
44223
44314
|
|
|
44315
|
+
if(firstTwo == 10) {
|
|
44316
|
+
strandArray[strandCnt - 1].anchorRefnum = 0;
|
|
44317
|
+
}
|
|
44318
|
+
|
|
44224
44319
|
strandArray[strandCnt - 1].endResi = currResi;
|
|
44225
44320
|
strandArray[strandCnt - 1].endRefnum = refnum; // 1250a
|
|
44226
44321
|
strandArray[strandCnt - 1].resCntAtAnchor = resCntAtAnchor;
|
|
@@ -44555,13 +44650,13 @@ class ShowSeq {
|
|
|
44555
44650
|
|
|
44556
44651
|
let html = '';
|
|
44557
44652
|
|
|
44558
|
-
if(refnumLabel && lastTwo == 50 && !bLoop) {
|
|
44653
|
+
if(refnumLabel && (lastTwo == 50 || refnum == 1094) && !bLoop) {
|
|
44559
44654
|
// highlight the anchor residues
|
|
44560
44655
|
ic.hAtomsRefnum = me.hashUtilsCls.unionHash(ic.hAtomsRefnum, ic.residues[residueid]);
|
|
44561
44656
|
|
|
44562
44657
|
html += '<span ' + colorStr + ' title="' + refnumLabel + '"><b>' + refnumLabel.substr(0, 1) + '</b>' + refnumLabel.substr(1) + '</span>';
|
|
44563
44658
|
}
|
|
44564
|
-
else if(refnumLabel && lastTwo % 2 == 0 && lastTwo != 52 && !bHidelabel) { // don't show label for the first, middle, and last loop residues
|
|
44659
|
+
else if(refnumLabel && lastTwo % 2 == 0 && lastTwo != 52 && refnum != 1096 && !bHidelabel) { // don't show label for the first, middle, and last loop residues
|
|
44565
44660
|
// e.g., 2152a
|
|
44566
44661
|
lastTwoStr = isNaN(refnumStr) ? lastTwoStr + refnumStr.substr(refnumStr.length - 1, 1) : lastTwoStr;
|
|
44567
44662
|
html += '<span ' + colorStr + ' title="' + refnumLabel + '">' + lastTwoStr + '</span>';
|
|
@@ -44575,17 +44670,17 @@ class ShowSeq {
|
|
|
44575
44670
|
|
|
44576
44671
|
getRefnumColor(currStrand, bText) { let ic = this.icn3d, me = ic.icn3dui;
|
|
44577
44672
|
if(currStrand == "A-") {
|
|
44578
|
-
return '#663399';
|
|
44673
|
+
return '#9400D3'; //'#663399';
|
|
44579
44674
|
}
|
|
44580
44675
|
else if(currStrand == "A") {
|
|
44581
|
-
return '#663399';
|
|
44676
|
+
return '#9400D3'; //'#663399';
|
|
44582
44677
|
}
|
|
44583
44678
|
//else if(currStrand == "A*") {
|
|
44584
44679
|
else if(currStrand == "A+") {
|
|
44585
|
-
return '#
|
|
44680
|
+
return '#9400D3'; //'#663399';
|
|
44586
44681
|
}
|
|
44587
44682
|
else if(currStrand == "A'") {
|
|
44588
|
-
return '#663399';
|
|
44683
|
+
return '#9400D3'; //'#663399';
|
|
44589
44684
|
}
|
|
44590
44685
|
else if(currStrand == "B") {
|
|
44591
44686
|
return '#ba55d3';
|
|
@@ -44603,7 +44698,8 @@ class ShowSeq {
|
|
|
44603
44698
|
return '#00FF00';
|
|
44604
44699
|
}
|
|
44605
44700
|
else if(currStrand == "E") {
|
|
44606
|
-
return (bText) ? "#F7DC6F" : "#FFFF00";
|
|
44701
|
+
//return (bText) ? "#F7DC6F" : "#FFFF00";
|
|
44702
|
+
return "#F7DC6F";
|
|
44607
44703
|
}
|
|
44608
44704
|
else if(currStrand == "F") {
|
|
44609
44705
|
return '#FFA500';
|
|
@@ -44627,7 +44723,7 @@ class ShowSeq {
|
|
|
44627
44723
|
return '#006400';
|
|
44628
44724
|
}
|
|
44629
44725
|
else if(currStrand == "C" || currStrand == "F") {
|
|
44630
|
-
return "#FFFF00"; //'#F0E68C';
|
|
44726
|
+
return "#F7DC6F"; //"#FFFF00"; //'#F0E68C';
|
|
44631
44727
|
}
|
|
44632
44728
|
else if(currStrand == "C'" || (currStrand && currStrand.substr(0, 1) == "G")) {
|
|
44633
44729
|
return '#FFA500';
|
|
@@ -46326,31 +46422,31 @@ class LineGraph {
|
|
|
46326
46422
|
ic.hlUpdateCls.updateHlAll();
|
|
46327
46423
|
}
|
|
46328
46424
|
|
|
46329
|
-
async showIgRefNum() { let ic = this.icn3d, me = ic.icn3dui;
|
|
46425
|
+
async showIgRefNum(template) { let ic = this.icn3d, me = ic.icn3dui;
|
|
46330
46426
|
let thisClass = this;
|
|
46331
46427
|
|
|
46332
46428
|
// round 1, 16 templates
|
|
46333
|
-
ic.refpdbArray = ['1InsulinR_8guyE_human_FN3-n1', '1Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4', '1CoAtomerGamma1_1r4xA_human', '1C3_2qkiD_human_n1', '1CuZnSuperoxideDismutase_1hl5C_human', '1ASF1A_2iijA_human', '1FAB-LIGHT_5esv_C1-n2', '1CD2_1hnfA_human_C2-n2', '1NaCaExchanger_2fwuA_dog_n2', '1FAB-HEAVY_5esv_V-n1', '1PDL1_4z18B_human_V-n1', '1BTLA_2aw2A_human_Iset', '1LaminAC_1ifrA_human', '
|
|
46429
|
+
ic.refpdbArray = ['1InsulinR_8guyE_human_FN3-n1', '1Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4', '1CoAtomerGamma1_1r4xA_human', '1C3_2qkiD_human_n1', '1CuZnSuperoxideDismutase_1hl5C_human', '1ASF1A_2iijA_human', '1FAB-LIGHT_5esv_C1-n2', '1CD2_1hnfA_human_C2-n2', '1NaCaExchanger_2fwuA_dog_n2', '1NaKATPaseTransporterBeta_2zxeB_spurdogshark', '1FAB-HEAVY_5esv_V-n1', '1PDL1_4z18B_human_V-n1', '1BTLA_2aw2A_human_Iset', '1LaminAC_1ifrA_human', '1CD3g_6jxrg_human_Iset', '1CD28_1yjdC_human_V', '1CD19_6al5A_human_C2orV-n1'];
|
|
46334
46430
|
|
|
46335
46431
|
// round 2
|
|
46336
46432
|
ic.refpdbHash = {};
|
|
46337
46433
|
ic.refpdbHash['1InsulinR_8guyE_human_FN3-n1'] = ['InsulinR_8guyE_human_FN3-n1', 'IL6Rb_1bquB_human_FN3-n3', 'Sidekick2_1wf5A_human_FN3-n7', 'InsulinR_8guyE_human_FN3-n2', 'Contactin1_2ee2A_human_FN3-n9', 'IL6Rb_1bquB_human_FN3-n2'];
|
|
46338
46434
|
ic.refpdbHash['1Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'] = ['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4', 'ICOS_6x4gA_human_V'];
|
|
46339
|
-
ic.refpdbHash['1CoAtomerGamma1_1r4xA_human'] = ['CoAtomerGamma1_1r4xA_human', 'TP34_2o6cA_bacteria'
|
|
46435
|
+
ic.refpdbHash['1CoAtomerGamma1_1r4xA_human'] = ['CoAtomerGamma1_1r4xA_human', 'TP34_2o6cA_bacteria'];
|
|
46340
46436
|
ic.refpdbHash['1C3_2qkiD_human_n1'] = ['C3_2qkiD_human_n1', 'BArrestin1_4jqiA_rat_n1', 'RBPJ_6py8C_human_Unk-n1'];
|
|
46341
46437
|
ic.refpdbHash['1CuZnSuperoxideDismutase_1hl5C_human'] = ['CuZnSuperoxideDismutase_1hl5C_human', 'TEAD1_3kysC_human'];
|
|
46342
|
-
ic.refpdbHash['1ASF1A_2iijA_human'] = ['ASF1A_2iijA_human', '
|
|
46438
|
+
ic.refpdbHash['1ASF1A_2iijA_human'] = ['ASF1A_2iijA_human', 'RBPJ_6py8C_human_Unk-n2', 'TP47_1o75A_bacteria'];
|
|
46343
46439
|
ic.refpdbHash['1FAB-LIGHT_5esv_C1-n2'] = ['FAB-LIGHT_5esv_C1-n2', 'GHR_1axiB_human_FN3-n1', 'VTCN1_Q7Z7D3_human_V-n2', 'B2Microglobulin_7phrL_human_C1', 'FAB-HEAVY_5esv_C1-n2', 'MHCIa_7phrH_human_C1'];
|
|
46344
46440
|
ic.refpdbHash['1CD2_1hnfA_human_C2-n2'] = ['CD2_1hnfA_human_C2-n2', 'Siglec3_5j0bB_human_C2-n2'];
|
|
46345
|
-
ic.refpdbHash['1NaCaExchanger_2fwuA_dog_n2'] = ['NaCaExchanger_2fwuA_dog_n2', 'ORF7a_1xakA_virus', 'ECadherin_4zt1A_human_n2'
|
|
46441
|
+
ic.refpdbHash['1NaCaExchanger_2fwuA_dog_n2'] = ['NaCaExchanger_2fwuA_dog_n2', 'ORF7a_1xakA_virus', 'ECadherin_4zt1A_human_n2'];
|
|
46442
|
+
ic.refpdbHash['1NaKATPaseTransporterBeta_2zxeB_spurdogshark'] = ['NaKATPaseTransporterBeta_2zxeB_spurdogshark'];
|
|
46346
46443
|
ic.refpdbHash['1FAB-HEAVY_5esv_V-n1'] = ['FAB-HEAVY_5esv_V-n1', 'FAB-LIGHT_5esv_V-n1', 'VNAR_1t6vN_shark_V', 'TCRa_6jxrm_human_V-n1', 'VISTA_6oilA_human_V', 'CD8a_1cd8A_human_V', 'PD1_4zqkB_human_V'];
|
|
46347
46444
|
ic.refpdbHash['1PDL1_4z18B_human_V-n1'] = ['PDL1_4z18B_human_V-n1', 'CD2_1hnfA_human_V-n1', 'LAG3_7tzgD_human_V-n1'];
|
|
46348
46445
|
ic.refpdbHash['1BTLA_2aw2A_human_Iset'] = ['BTLA_2aw2A_human_Iset', 'Palladin_2dm3A_human_Iset-n1', 'Titin_4uowM_human_Unk-n152', 'LAG3_7tzgD_human_C2-n2', 'JAM1_1nbqA_human_VorIset-n2', 'Contactin1_3s97C_human_C2-n2'];
|
|
46349
|
-
ic.refpdbHash['1LaminAC_1ifrA_human'] = ['LaminAC_1ifrA_human'];
|
|
46350
|
-
ic.refpdbHash['
|
|
46351
|
-
ic.refpdbHash['
|
|
46352
|
-
ic.refpdbHash['1CD19_6al5A_human_C2orV-n1'] = ['CD19_6al5A_human_C2orV-n1'];
|
|
46353
|
-
ic.refpdbHash['1CD28_1yjdC_human_V'] = ['CD28_1yjdC_human_V'];
|
|
46446
|
+
ic.refpdbHash['1LaminAC_1ifrA_human'] = ['LaminAC_1ifrA_human', 'CD3d_6jxrd_human_Iset'];
|
|
46447
|
+
ic.refpdbHash['1CD3g_6jxrg_human_Iset'] = ['CD3g_6jxrg_human_Iset', 'TCRa_6jxrm_human_C1-n2', 'IsdA_2iteA_bacteria'];
|
|
46448
|
+
ic.refpdbHash['1CD28_1yjdC_human_V'] = ['CD28_1yjdC_human_V', 'MPT63_1lmiA_bacteria', 'CD3e_6jxrf_human_Iset'];
|
|
46449
|
+
ic.refpdbHash['1CD19_6al5A_human_C2orV-n1'] = ['CD19_6al5A_human_C2orV-n1'];
|
|
46354
46450
|
|
|
46355
46451
|
// use known ref structure
|
|
46356
46452
|
ic.refpdbHash['5ESV_C'] = ['FAB-HEAVY_5esv_V-n1', 'FAB-HEAVY_5esv_C1-n2'];
|
|
@@ -46398,11 +46494,14 @@ class LineGraph {
|
|
|
46398
46494
|
ic.refpdbHash['6A15_A'] = ['CD19_6al5A_human_C2orV-n1'];
|
|
46399
46495
|
ic.refpdbHash['2QKI_D'] = ['C3_2qkiD_human_n1'];
|
|
46400
46496
|
ic.refpdbHash['1YJD_C'] = ['CD28_1yjdC_human_V'];
|
|
46497
|
+
ic.refpdbHash['6JXR_d'] = ['CD3d_6jxrd_human_Iset'];
|
|
46498
|
+
ic.refpdbHash['6JXR_f'] = ['CD3e_6jxrf_human_Iset'];
|
|
46499
|
+
ic.refpdbHash['6JXR_g'] = ['CD3g_6jxrg_human_Iset'];
|
|
46401
46500
|
|
|
46402
46501
|
let pdbAjaxArray = [];
|
|
46403
46502
|
for(let k = 0, kl = ic.refpdbArray.length; k < kl; ++k) {
|
|
46404
|
-
|
|
46405
|
-
let urlpdb = me.htmlCls.baseUrl + "mmcifparser/mmcifparser.cgi?refjsonid=" + ic.refpdbArray[k];
|
|
46503
|
+
let urlpdb = me.htmlCls.baseUrl + "mmcifparser/mmcifparser.cgi?refpdbid=" + ic.refpdbArray[k];
|
|
46504
|
+
//let urlpdb = me.htmlCls.baseUrl + "mmcifparser/mmcifparser.cgi?refjsonid=" + ic.refpdbArray[k];
|
|
46406
46505
|
|
|
46407
46506
|
let pdbAjax = me.getAjaxPromise(urlpdb, 'text');
|
|
46408
46507
|
|
|
@@ -46410,9 +46509,14 @@ class LineGraph {
|
|
|
46410
46509
|
}
|
|
46411
46510
|
|
|
46412
46511
|
// try {
|
|
46413
|
-
|
|
46414
|
-
|
|
46415
|
-
|
|
46512
|
+
if(!template) {
|
|
46513
|
+
let allPromise = Promise.allSettled(pdbAjaxArray);
|
|
46514
|
+
ic.pdbDataArray = await allPromise;
|
|
46515
|
+
await thisClass.parseRefPdbData(ic.pdbDataArray, template);
|
|
46516
|
+
}
|
|
46517
|
+
else {
|
|
46518
|
+
await thisClass.parseRefPdbData(undefined, template);
|
|
46519
|
+
}
|
|
46416
46520
|
// }
|
|
46417
46521
|
// catch(err) {
|
|
46418
46522
|
// if(!me.bNode) alert("Error in retrieveing reference PDB data...");
|
|
@@ -46420,7 +46524,7 @@ class LineGraph {
|
|
|
46420
46524
|
// }
|
|
46421
46525
|
}
|
|
46422
46526
|
|
|
46423
|
-
async parseRefPdbData(dataArray) { let ic = this.icn3d, me = ic.icn3dui;
|
|
46527
|
+
async parseRefPdbData(dataArray, template) { let ic = this.icn3d, me = ic.icn3dui;
|
|
46424
46528
|
let thisClass = this;
|
|
46425
46529
|
|
|
46426
46530
|
let struArray = Object.keys(ic.structures);
|
|
@@ -46428,8 +46532,8 @@ class LineGraph {
|
|
|
46428
46532
|
let ajaxArray = [];
|
|
46429
46533
|
let domainidpairArray = [];
|
|
46430
46534
|
|
|
46431
|
-
me.htmlCls.baseUrl + "tmalign/tmalign.cgi";
|
|
46432
|
-
|
|
46535
|
+
let urltmalign = me.htmlCls.baseUrl + "tmalign/tmalign.cgi";
|
|
46536
|
+
me.htmlCls.baseUrl + "vastdyn/vastdyn.cgi";
|
|
46433
46537
|
|
|
46434
46538
|
if(!ic.resid2domainid) ic.resid2domainid = {};
|
|
46435
46539
|
//ic.resid2domainid = {};
|
|
@@ -46467,11 +46571,16 @@ class LineGraph {
|
|
|
46467
46571
|
|
|
46468
46572
|
let atomFirst = ic.firstAtomObjCls.getFirstAtomObj(currAtoms);
|
|
46469
46573
|
let atomLast = ic.firstAtomObjCls.getLastAtomObj(currAtoms);
|
|
46470
|
-
let resiSum =
|
|
46574
|
+
let resiSum = atomFirst.resi + ':' + atomLast.resi;
|
|
46471
46575
|
|
|
46472
46576
|
for(let n = 0, nl = residueArray.length; n < nl; ++n) {
|
|
46473
46577
|
let resid = residueArray[n];
|
|
46474
46578
|
ic.resid2domainid[resid] = chainid + '-0' + '_' + resiSum;
|
|
46579
|
+
|
|
46580
|
+
// clear previous refnum assignment if any
|
|
46581
|
+
if(ic.resid2refnum && ic.resid2refnum[resid]) {
|
|
46582
|
+
delete ic.resid2refnum[resid];
|
|
46583
|
+
}
|
|
46475
46584
|
}
|
|
46476
46585
|
}
|
|
46477
46586
|
else {
|
|
@@ -46486,6 +46595,11 @@ class LineGraph {
|
|
|
46486
46595
|
let resid = chainid + '_' + pos2resi[n];
|
|
46487
46596
|
domainAtoms = me.hashUtilsCls.unionHash(domainAtoms, ic.residues[resid]);
|
|
46488
46597
|
//ic.resid2domainid[resid] = chainid + '-' + k;
|
|
46598
|
+
|
|
46599
|
+
// clear previous refnum assignment if any
|
|
46600
|
+
if(ic.resid2refnum && ic.resid2refnum[resid]) {
|
|
46601
|
+
delete ic.resid2refnum[resid];
|
|
46602
|
+
}
|
|
46489
46603
|
}
|
|
46490
46604
|
}
|
|
46491
46605
|
|
|
@@ -46493,7 +46607,7 @@ class LineGraph {
|
|
|
46493
46607
|
|
|
46494
46608
|
let atomFirst = ic.firstAtomObjCls.getFirstAtomObj(domainAtoms);
|
|
46495
46609
|
let atomLast = ic.firstAtomObjCls.getLastAtomObj(domainAtoms);
|
|
46496
|
-
let resiSum =
|
|
46610
|
+
let resiSum = atomFirst.resi + ':' + atomLast.resi;
|
|
46497
46611
|
|
|
46498
46612
|
for(let m = 0, ml = segArray.length; m < ml; m += 2) {
|
|
46499
46613
|
let startResi = segArray[m];
|
|
@@ -46507,69 +46621,121 @@ class LineGraph {
|
|
|
46507
46621
|
}
|
|
46508
46622
|
}
|
|
46509
46623
|
|
|
46624
|
+
if(!ic.domainid2refpdbname) ic.domainid2refpdbname = {};
|
|
46625
|
+
|
|
46510
46626
|
for(let k = 0, kl = domainAtomsArray.length; k < kl; ++k) {
|
|
46511
46627
|
let pdb_target = ic.saveFileCls.getAtomPDB(domainAtomsArray[k], undefined, undefined, undefined, undefined, struct);
|
|
46512
|
-
let bForceOneDomain = true;
|
|
46513
|
-
let jsonStr_t = ic.domain3dCls.getDomainJsonForAlign(domainAtomsArray[k], bForceOneDomain);
|
|
46628
|
+
//let bForceOneDomain = true;
|
|
46629
|
+
//let jsonStr_t = ic.domain3dCls.getDomainJsonForAlign(domainAtomsArray[k], bForceOneDomain);
|
|
46514
46630
|
|
|
46515
46631
|
// ig strand for any subset will have the same k, use the number of residue to separate them
|
|
46516
46632
|
let atomFirst = ic.firstAtomObjCls.getFirstAtomObj(domainAtomsArray[k]);
|
|
46517
46633
|
let atomLast = ic.firstAtomObjCls.getLastAtomObj(domainAtomsArray[k]);
|
|
46518
|
-
let resiSum =
|
|
46634
|
+
let resiSum = atomFirst.resi + ':' + atomLast.resi;
|
|
46519
46635
|
//let domainid = chainid + '-' + k + '_' + Object.keys(domainAtomsArray[k]).length;
|
|
46520
46636
|
let domainid = chainid + '-' + k + '_' + resiSum;
|
|
46521
46637
|
ic.domainid2pdb[domainid] = pdb_target;
|
|
46522
46638
|
|
|
46523
|
-
|
|
46524
|
-
|
|
46525
|
-
|
|
46526
|
-
|
|
46527
|
-
|
|
46528
|
-
|
|
46639
|
+
if(!template) {
|
|
46640
|
+
for(let index = 0, indexl = dataArray.length; index < indexl; ++index) {
|
|
46641
|
+
let struct2 = ic.defaultPdbId + index;
|
|
46642
|
+
let pdb_query = dataArray[index].value; //[0];
|
|
46643
|
+
let header = 'HEADER ' + struct2 + '\n';
|
|
46644
|
+
pdb_query = header + pdb_query;
|
|
46645
|
+
//let jsonStr_q = dataArray[index].value; //[0];
|
|
46529
46646
|
|
|
46530
|
-
|
|
46531
|
-
|
|
46532
|
-
// let alignAjax = me.getAjaxPostPromise(urltmalign, dataObj);
|
|
46647
|
+
let dataObj = {'pdb_query': pdb_query, 'pdb_target': pdb_target, "queryid": ic.refpdbArray[index]};
|
|
46648
|
+
let alignAjax = me.getAjaxPostPromise(urltmalign, dataObj);
|
|
46533
46649
|
|
|
46534
|
-
|
|
46535
|
-
|
|
46650
|
+
// let dataObj = {'domains1': jsonStr_q, 'domains2': jsonStr_t};
|
|
46651
|
+
// let alignAjax = me.getAjaxPostPromise(urlalign, dataObj);
|
|
46536
46652
|
|
|
46537
|
-
|
|
46538
|
-
|
|
46539
|
-
|
|
46653
|
+
ajaxArray.push(alignAjax);
|
|
46654
|
+
|
|
46655
|
+
domainidpairArray.push(domainid + "|" + ic.refpdbArray[index]);
|
|
46656
|
+
}
|
|
46657
|
+
}
|
|
46658
|
+
else {
|
|
46659
|
+
ic.domainid2refpdbname[domainid] = template;
|
|
46660
|
+
domainidpairArray.push(domainid + "|1" + template); // "1" was added for the first round strand-only template
|
|
46540
46661
|
}
|
|
46541
46662
|
}
|
|
46542
46663
|
}
|
|
46543
46664
|
}
|
|
46544
46665
|
|
|
46545
46666
|
try {
|
|
46546
|
-
|
|
46667
|
+
if(!template) {
|
|
46668
|
+
let dataArray2 = [];
|
|
46547
46669
|
|
|
46548
|
-
|
|
46549
|
-
|
|
46670
|
+
// let allPromise = Promise.allSettled(ajaxArray);
|
|
46671
|
+
// dataArray2 = await allPromise;
|
|
46550
46672
|
|
|
46551
|
-
|
|
46552
|
-
|
|
46673
|
+
//split arrays into chunks of 48 jobs or me.cfg.maxajax jobs
|
|
46674
|
+
let n = (me.cfg.maxajax) ? me.cfg.maxajax : ic.refpdbArray.length * 6;
|
|
46553
46675
|
|
|
46554
|
-
|
|
46555
|
-
|
|
46556
|
-
|
|
46557
|
-
|
|
46558
|
-
|
|
46559
|
-
|
|
46560
|
-
|
|
46561
|
-
|
|
46676
|
+
for(let i = 0, il = parseInt((ajaxArray.length - 1) / n + 1); i < il; ++i) {
|
|
46677
|
+
let currAjaxArray = [];
|
|
46678
|
+
if(i == il - 1) { // last one
|
|
46679
|
+
currAjaxArray = ajaxArray.slice(i * n, ajaxArray.length);
|
|
46680
|
+
}
|
|
46681
|
+
else {
|
|
46682
|
+
currAjaxArray = ajaxArray.slice(i * n, (i + 1) * n);
|
|
46683
|
+
}
|
|
46562
46684
|
|
|
46563
|
-
|
|
46564
|
-
|
|
46685
|
+
let currPromise = Promise.allSettled(currAjaxArray);
|
|
46686
|
+
let currDataArray = await currPromise;
|
|
46565
46687
|
|
|
46566
|
-
|
|
46688
|
+
dataArray2 = dataArray2.concat(currDataArray);
|
|
46689
|
+
}
|
|
46690
|
+
|
|
46691
|
+
let bRound1 = true;
|
|
46692
|
+
await thisClass.parseAlignData(dataArray2, domainidpairArray, bRound1);
|
|
46693
|
+
|
|
46694
|
+
/// if(ic.deferredRefnum !== undefined) ic.deferredRefnum.resolve();
|
|
46567
46695
|
}
|
|
46568
|
-
|
|
46569
|
-
|
|
46570
|
-
|
|
46696
|
+
else {
|
|
46697
|
+
if(!me.bNode) console.log("Start alignment with the reference culsters " + JSON.stringify(ic.domainid2refpdbname));
|
|
46698
|
+
|
|
46699
|
+
// start round2
|
|
46700
|
+
let ajaxArray = [];
|
|
46701
|
+
let domainidpairArray3 = [];
|
|
46702
|
+
let urltmalign = me.htmlCls.baseUrl + "tmalign/tmalign.cgi";
|
|
46703
|
+
|
|
46704
|
+
let urlpdb = me.htmlCls.baseUrl + "mmcifparser/mmcifparser.cgi?refpdbid=" + template;
|
|
46705
|
+
let pdbAjax = me.getAjaxPromise(urlpdb, 'text');
|
|
46706
|
+
let pdbAjaxArray = [];
|
|
46707
|
+
pdbAjaxArray.push(pdbAjax);
|
|
46571
46708
|
|
|
46572
|
-
|
|
46709
|
+
let allPromise2 = Promise.allSettled(pdbAjaxArray);
|
|
46710
|
+
ic.pdbDataArray = await allPromise2;
|
|
46711
|
+
|
|
46712
|
+
for(let domainid in ic.domainid2refpdbname) {
|
|
46713
|
+
let refpdbname = ic.domainid2refpdbname[domainid];
|
|
46714
|
+
let chainid = domainid.substr(0, domainid.indexOf('-'));
|
|
46715
|
+
|
|
46716
|
+
let pdb_target = ic.domainid2pdb[domainid];
|
|
46717
|
+
for(let index = 0, indexl = ic.pdbDataArray.length; index < indexl; ++index) {
|
|
46718
|
+
let struct2 = ic.defaultPdbId + index;
|
|
46719
|
+
let pdb_query = ic.pdbDataArray[index].value; //[0];
|
|
46720
|
+
|
|
46721
|
+
let header = 'HEADER ' + struct2 + '\n';
|
|
46722
|
+
pdb_query = header + pdb_query;
|
|
46723
|
+
|
|
46724
|
+
let dataObj = {'pdb_query': pdb_query, 'pdb_target': pdb_target, "queryid": template};
|
|
46725
|
+
let alignAjax = me.getAjaxPostPromise(urltmalign, dataObj);
|
|
46726
|
+
ajaxArray.push(alignAjax);
|
|
46727
|
+
|
|
46728
|
+
//domainidpairArray3.push(domainid + "," + refpdbname);
|
|
46729
|
+
domainidpairArray3.push(domainid + "|" + template);
|
|
46730
|
+
}
|
|
46731
|
+
}
|
|
46732
|
+
|
|
46733
|
+
let dataArray3 = [];
|
|
46734
|
+
let allPromise = Promise.allSettled(ajaxArray);
|
|
46735
|
+
dataArray3 = await allPromise;
|
|
46736
|
+
|
|
46737
|
+
await thisClass.parseAlignData(dataArray3, domainidpairArray3);
|
|
46738
|
+
}
|
|
46573
46739
|
}
|
|
46574
46740
|
catch(err) {
|
|
46575
46741
|
let mess = "Some of " + ajaxArray.length + " TM-align alignments failed. Please select a chain or a subset to assing reference numbers to avoid overloading the server...";
|
|
@@ -46581,7 +46747,7 @@ class LineGraph {
|
|
|
46581
46747
|
}
|
|
46582
46748
|
//console.log("Error in aligning with TM-align...");
|
|
46583
46749
|
return;
|
|
46584
|
-
}
|
|
46750
|
+
}
|
|
46585
46751
|
}
|
|
46586
46752
|
|
|
46587
46753
|
getTemplateList(chainid) { let ic = this.icn3d; ic.icn3dui;
|
|
@@ -46612,7 +46778,6 @@ class LineGraph {
|
|
|
46612
46778
|
let thisClass = this;
|
|
46613
46779
|
|
|
46614
46780
|
let tmscoreThreshold = 0.4; // 0.4; //0.5;
|
|
46615
|
-
let rmsdThreshold = 10;
|
|
46616
46781
|
|
|
46617
46782
|
// find the best alignment for each chain
|
|
46618
46783
|
let domainid2score = {}, domainid2segs = {}, chainid2segs = {};
|
|
@@ -46646,7 +46811,10 @@ class LineGraph {
|
|
|
46646
46811
|
}
|
|
46647
46812
|
}
|
|
46648
46813
|
else {
|
|
46649
|
-
if(queryData[0].super_rmsd > rmsdThreshold || queryData[0].num_res < minResidues) {
|
|
46814
|
+
// if(queryData[0].super_rmsd > rmsdThreshold || queryData[0].num_res < minResidues) {
|
|
46815
|
+
// continue;
|
|
46816
|
+
// }
|
|
46817
|
+
if(queryData[0].score < tmscoreThreshold || queryData[0].num_res < minResidues) {
|
|
46650
46818
|
continue;
|
|
46651
46819
|
}
|
|
46652
46820
|
}
|
|
@@ -46661,7 +46829,8 @@ class LineGraph {
|
|
|
46661
46829
|
if(!me.bNode) console.log("refpdbname " + refpdbname + " TM-score: " + queryData[0].score);
|
|
46662
46830
|
}
|
|
46663
46831
|
else {
|
|
46664
|
-
if(!me.bNode) console.log("domainid: " + domainid + " refpdbname " + refpdbname + " RMSD: " + queryData[0].super_rmsd + ",
|
|
46832
|
+
// if(!me.bNode) console.log("domainid: " + domainid + " refpdbname " + refpdbname + " RMSD: " + queryData[0].super_rmsd + ", num_seg: " + queryData[0].num_seg + ", 10/RMSD + num_seg/5: " + (10 / queryData[0].super_rmsd + queryData[0].num_seg / 5).toFixed(1));
|
|
46833
|
+
if(!me.bNode) console.log("domainid: " + domainid + " refpdbname " + refpdbname + " TM-score: " + queryData[0].score);
|
|
46665
46834
|
}
|
|
46666
46835
|
|
|
46667
46836
|
// Ig-like domains: B (2150, 2150a, 2150b), C (3150, 3250), E (7150, 7250), F (8150, 8250) strands
|
|
@@ -46691,7 +46860,7 @@ class LineGraph {
|
|
|
46691
46860
|
//if(!(bBstrand && bCstrand && bEstrand && bFstrand && bGstrand)) continue;
|
|
46692
46861
|
if(!(bBstrand && bCstrand && bEstrand && bFstrand)) {
|
|
46693
46862
|
if(!me.bNode) console.log("Some of the Ig strands B, C, E, F are missing in the domain " + domainid + "...");
|
|
46694
|
-
if(ic.domainid2refpdbname[domainid]) delete ic.domainid2refpdbname[domainid];
|
|
46863
|
+
if(ic.domainid2refpdbname[domainid] == refpdbname) delete ic.domainid2refpdbname[domainid];
|
|
46695
46864
|
continue;
|
|
46696
46865
|
}
|
|
46697
46866
|
}
|
|
@@ -46709,7 +46878,8 @@ class LineGraph {
|
|
|
46709
46878
|
}
|
|
46710
46879
|
}
|
|
46711
46880
|
else {
|
|
46712
|
-
let mixScore = 10 / queryData[0].super_rmsd + queryData[0].num_seg / 5;
|
|
46881
|
+
//let mixScore = 10 / queryData[0].super_rmsd + queryData[0].num_seg / 5;
|
|
46882
|
+
let mixScore = queryData[0].score;
|
|
46713
46883
|
|
|
46714
46884
|
if(!domainid2score.hasOwnProperty(domainid) || mixScore > domainid2score[domainid]) {
|
|
46715
46885
|
domainid2score[domainid] = mixScore;
|
|
@@ -46777,10 +46947,28 @@ class LineGraph {
|
|
|
46777
46947
|
}
|
|
46778
46948
|
|
|
46779
46949
|
let dataArray3 = [];
|
|
46780
|
-
let allPromise = Promise.allSettled(ajaxArray);
|
|
46781
|
-
dataArray3 = await allPromise;
|
|
46950
|
+
//let allPromise = Promise.allSettled(ajaxArray);
|
|
46951
|
+
//dataArray3 = await allPromise;
|
|
46952
|
+
|
|
46953
|
+
//split arrays into chunks of 48 jobs or me.cfg.maxajax jobs
|
|
46954
|
+
let n = (me.cfg.maxajax) ? me.cfg.maxajax : ic.refpdbArray.length * 6;
|
|
46955
|
+
|
|
46956
|
+
for(let i = 0, il = parseInt((ajaxArray.length - 1) / n + 1); i < il; ++i) {
|
|
46957
|
+
let currAjaxArray = [];
|
|
46958
|
+
if(i == il - 1) { // last one
|
|
46959
|
+
currAjaxArray = ajaxArray.slice(i * n, ajaxArray.length);
|
|
46960
|
+
}
|
|
46961
|
+
else {
|
|
46962
|
+
currAjaxArray = ajaxArray.slice(i * n, (i + 1) * n);
|
|
46963
|
+
}
|
|
46964
|
+
|
|
46965
|
+
let currPromise = Promise.allSettled(currAjaxArray);
|
|
46966
|
+
let currDataArray = await currPromise;
|
|
46782
46967
|
|
|
46783
|
-
|
|
46968
|
+
dataArray3 = dataArray3.concat(currDataArray);
|
|
46969
|
+
}
|
|
46970
|
+
|
|
46971
|
+
await thisClass.parseAlignData(dataArray3, domainidpairArray3, false);
|
|
46784
46972
|
|
|
46785
46973
|
// end of round 2
|
|
46786
46974
|
return;
|
|
@@ -46811,6 +46999,7 @@ class LineGraph {
|
|
|
46811
46999
|
if(!ic.chainsMapping) ic.chainsMapping = {};
|
|
46812
47000
|
|
|
46813
47001
|
if(!ic.refPdbList) ic.refPdbList = [];
|
|
47002
|
+
|
|
46814
47003
|
for(let chainid in chainid2segs) {
|
|
46815
47004
|
let segArray = chainid2segs[chainid];
|
|
46816
47005
|
|
|
@@ -46879,7 +47068,7 @@ class LineGraph {
|
|
|
46879
47068
|
else {
|
|
46880
47069
|
await ic.showAnnoCls.showAnnotations();
|
|
46881
47070
|
}
|
|
46882
|
-
|
|
47071
|
+
|
|
46883
47072
|
ic.annotationCls.setAnnoViewAndDisplay('detailed view');
|
|
46884
47073
|
}
|
|
46885
47074
|
else {
|
|
@@ -50291,7 +50480,7 @@ class ChainalignParser {
|
|
|
50291
50480
|
//hAtoms = me.hashUtilsCls.unionHash(hAtoms, ic.chains[chainidArray[0]]);
|
|
50292
50481
|
//hAtoms = me.hashUtilsCls.unionHash(hAtoms, ic.chains[chainidArray[1]]);
|
|
50293
50482
|
}
|
|
50294
|
-
|
|
50483
|
+
|
|
50295
50484
|
// set up the view of sequence alignment for each pair
|
|
50296
50485
|
for(let mmdbidpair in mmdbidpairFinalHash) {
|
|
50297
50486
|
if(ic.q_rotation !== undefined) {
|
|
@@ -50722,7 +50911,11 @@ class ChainalignParser {
|
|
|
50722
50911
|
if(me.cfg.aligntool == 'tmalign') logStr += "; TM-score: " + align[0].score.toPrecision(4);
|
|
50723
50912
|
me.htmlCls.clickMenuCls.setLogCmd(logStr, false);
|
|
50724
50913
|
let html = "<br><b>Alignment RMSD</b>: " + rmsd.toPrecision(4) + " Å<br>";
|
|
50725
|
-
if(me.cfg.aligntool == 'tmalign')
|
|
50914
|
+
if(me.cfg.aligntool == 'tmalign') {
|
|
50915
|
+
html += "<b>TM-score</b>: " + align[0].score.toPrecision(4) + "<br><br>";
|
|
50916
|
+
ic.tmscore = align[0].score.toPrecision(4);
|
|
50917
|
+
}
|
|
50918
|
+
|
|
50726
50919
|
$("#" + ic.pre + "dl_rmsd_html").html(html);
|
|
50727
50920
|
if(!me.cfg.bSidebyside) me.htmlCls.dialogCls.openDlg('dl_rmsd', 'RMSD of alignment');
|
|
50728
50921
|
|
|
@@ -50977,15 +51170,15 @@ class Dsn6Parser {
|
|
|
50977
51170
|
this.icn3d = icn3d;
|
|
50978
51171
|
}
|
|
50979
51172
|
|
|
50980
|
-
dsn6Parser(pdbid, type, sigma) { let ic = this.icn3d; ic.icn3dui;
|
|
51173
|
+
async dsn6Parser(pdbid, type, sigma) { let ic = this.icn3d; ic.icn3dui;
|
|
50981
51174
|
// https://edmaps.rcsb.org/maps/1kq2_2fofc.dsn6
|
|
50982
51175
|
// https://edmaps.rcsb.org/maps/1kq2_fofc.dsn6
|
|
50983
51176
|
|
|
50984
51177
|
let url = "https://edmaps.rcsb.org/maps/" + pdbid.toLowerCase() + "_" + type + ".dsn6";
|
|
50985
|
-
this.dsn6ParserBase(url, type, sigma);
|
|
51178
|
+
await this.dsn6ParserBase(url, type, sigma);
|
|
50986
51179
|
}
|
|
50987
51180
|
|
|
50988
|
-
dsn6ParserBase(url, type, sigma) { let ic = this.icn3d
|
|
51181
|
+
async dsn6ParserBase(url, type, sigma) { let ic = this.icn3d, me = ic.icn3dui;
|
|
50989
51182
|
let thisClass = this;
|
|
50990
51183
|
|
|
50991
51184
|
//https://stackoverflow.com/questions/33902299/using-jquery-ajax-to-download-a-binary-file
|
|
@@ -50998,37 +51191,17 @@ class Dsn6Parser {
|
|
|
50998
51191
|
ic.setOptionCls.setOption('map', type);
|
|
50999
51192
|
}
|
|
51000
51193
|
else {
|
|
51001
|
-
let
|
|
51002
|
-
|
|
51003
|
-
oReq.responseType = "arraybuffer";
|
|
51004
|
-
|
|
51005
|
-
oReq.onreadystatechange = function() {
|
|
51006
|
-
if(this.readyState == 4) {
|
|
51007
|
-
if(this.status == 200) {
|
|
51008
|
-
let arrayBuffer = oReq.response;
|
|
51009
|
-
thisClass.loadDsn6Data(arrayBuffer, type, sigma);
|
|
51010
|
-
|
|
51011
|
-
if(type == '2fofc') {
|
|
51012
|
-
ic.bAjax2fofc = true;
|
|
51013
|
-
}
|
|
51014
|
-
else if(type == 'fofc') {
|
|
51015
|
-
ic.bAjaxfofc = true;
|
|
51016
|
-
}
|
|
51194
|
+
let arrayBuffer = await me.getXMLHttpRqstPromise(url, 'GET', 'arraybuffer', 'rcsbEdmaps');
|
|
51195
|
+
thisClass.loadDsn6Data(arrayBuffer, type, sigma);
|
|
51017
51196
|
|
|
51018
|
-
|
|
51019
|
-
|
|
51020
|
-
|
|
51021
|
-
|
|
51022
|
-
|
|
51023
|
-
|
|
51024
|
-
/// if(ic.deferredMap !== undefined) ic.deferredMap.resolve();
|
|
51025
|
-
}
|
|
51026
|
-
else {
|
|
51027
|
-
ic.ParserUtilsCls.showLoading();
|
|
51028
|
-
}
|
|
51029
|
-
};
|
|
51197
|
+
if(type == '2fofc') {
|
|
51198
|
+
ic.bAjax2fofc = true;
|
|
51199
|
+
}
|
|
51200
|
+
else if(type == 'fofc') {
|
|
51201
|
+
ic.bAjaxfofc = true;
|
|
51202
|
+
}
|
|
51030
51203
|
|
|
51031
|
-
|
|
51204
|
+
ic.setOptionCls.setOption('map', type);
|
|
51032
51205
|
}
|
|
51033
51206
|
}
|
|
51034
51207
|
|
|
@@ -51766,6 +51939,11 @@ class MmdbParser {
|
|
|
51766
51939
|
|
|
51767
51940
|
let color =(molid2rescount[i].color === undefined) ? '#CCCCCC' : '#' +( '000000' + molid2rescount[i].color.toString( 16 ) ).slice( - 6 );
|
|
51768
51941
|
let chainName =(molid2rescount[i].chain === undefined) ? '' : molid2rescount[i].chain.trim();
|
|
51942
|
+
// remove "_" in chain name
|
|
51943
|
+
if(parseInt(me.cfg.date) >= 20231001 || (!me.cfg.date && parseInt(me.utilsCls.getDateDigitStr()) >= 20231001)) {
|
|
51944
|
+
chainName = chainName.replace(/_/g, '');
|
|
51945
|
+
}
|
|
51946
|
+
|
|
51769
51947
|
if(chainNameHash[chainName] === undefined) {
|
|
51770
51948
|
chainNameHash[chainName] = 1;
|
|
51771
51949
|
}
|
|
@@ -52800,7 +52978,7 @@ class PdbParser {
|
|
|
52800
52978
|
|
|
52801
52979
|
if(me.cfg.rotate !== undefined) ic.resizeCanvasCls.rotStruc(me.cfg.rotate, true);
|
|
52802
52980
|
|
|
52803
|
-
if(bAppend) {
|
|
52981
|
+
if(bAppend && !me.bNode) {
|
|
52804
52982
|
// show all
|
|
52805
52983
|
ic.definedSetsCls.setModeAndDisplay('all');
|
|
52806
52984
|
}
|
|
@@ -54022,7 +54200,7 @@ class DensityCifParser {
|
|
|
54022
54200
|
this.icn3d = icn3d;
|
|
54023
54201
|
}
|
|
54024
54202
|
|
|
54025
|
-
densityCifParser(pdbid, type, sigma, emd) { let ic = this.icn3d, me = ic.icn3dui;
|
|
54203
|
+
async densityCifParser(pdbid, type, sigma, emd) { let ic = this.icn3d, me = ic.icn3dui;
|
|
54026
54204
|
let thisClass = this;
|
|
54027
54205
|
|
|
54028
54206
|
let url;
|
|
@@ -54052,46 +54230,21 @@ class DensityCifParser {
|
|
|
54052
54230
|
ic.setOptionCls.setOption('emmap', type);
|
|
54053
54231
|
}
|
|
54054
54232
|
else {
|
|
54055
|
-
let
|
|
54056
|
-
oReq.open("GET", url, true);
|
|
54057
|
-
oReq.responseType = "arraybuffer";
|
|
54058
|
-
|
|
54059
|
-
oReq.onreadystatechange = function() {
|
|
54060
|
-
if (this.readyState == 4) {
|
|
54061
|
-
if(this.status == 200) {
|
|
54062
|
-
let arrayBuffer = oReq.response;
|
|
54063
|
-
|
|
54064
|
-
thisClass.parseChannels(arrayBuffer, type, sigma);
|
|
54065
|
-
|
|
54066
|
-
if(type == '2fofc' || type == 'fofc') {
|
|
54067
|
-
ic.bAjax2fofc = true;
|
|
54068
|
-
ic.bAjaxfofc = true;
|
|
54233
|
+
let arrayBuffer = await me.getXMLHttpRqstPromise(url, 'GET', 'arraybuffer', type);
|
|
54069
54234
|
|
|
54070
|
-
|
|
54071
|
-
}
|
|
54072
|
-
else if(type == 'em') {
|
|
54073
|
-
ic.bAjaxEm = true;
|
|
54235
|
+
thisClass.parseChannels(arrayBuffer, type, sigma);
|
|
54074
54236
|
|
|
54075
|
-
|
|
54076
|
-
|
|
54077
|
-
|
|
54078
|
-
else {
|
|
54079
|
-
if(type == '2fofc' || type == 'fofc') {
|
|
54080
|
-
alert("Density server at EBI has no corresponding electron density map for this structure.");
|
|
54081
|
-
}
|
|
54082
|
-
else if(type == 'em') {
|
|
54083
|
-
alert("Density server at EBI has no corresponding EM density map for this structure.");
|
|
54084
|
-
}
|
|
54085
|
-
}
|
|
54237
|
+
if(type == '2fofc' || type == 'fofc') {
|
|
54238
|
+
ic.bAjax2fofc = true;
|
|
54239
|
+
ic.bAjaxfofc = true;
|
|
54086
54240
|
|
|
54087
|
-
|
|
54088
|
-
|
|
54089
|
-
|
|
54090
|
-
|
|
54091
|
-
}
|
|
54092
|
-
};
|
|
54241
|
+
ic.setOptionCls.setOption('map', type);
|
|
54242
|
+
}
|
|
54243
|
+
else if(type == 'em') {
|
|
54244
|
+
ic.bAjaxEm = true;
|
|
54093
54245
|
|
|
54094
|
-
|
|
54246
|
+
ic.setOptionCls.setOption('emmap', type);
|
|
54247
|
+
}
|
|
54095
54248
|
}
|
|
54096
54249
|
}
|
|
54097
54250
|
|
|
@@ -55143,16 +55296,20 @@ class ParserUtils {
|
|
|
55143
55296
|
|
|
55144
55297
|
getMissingResidues(seqArray, type, chainid) { let ic = this.icn3d, me = ic.icn3dui;
|
|
55145
55298
|
ic.chainsSeq[chainid] = [];
|
|
55299
|
+
|
|
55300
|
+
// find the offset of MMDB sequence
|
|
55301
|
+
let offset = 0;
|
|
55146
55302
|
if(type === 'mmdbid' || type === 'align') {
|
|
55147
55303
|
for(let i = 0, il = seqArray.length; i < il; ++i) {
|
|
55148
55304
|
if(seqArray[i][0] != 0) {
|
|
55149
|
-
seqArray[i][0] - (i + 1);
|
|
55305
|
+
offset = seqArray[i][0] - (i + 1);
|
|
55150
55306
|
break;
|
|
55151
55307
|
}
|
|
55152
55308
|
}
|
|
55153
55309
|
}
|
|
55154
55310
|
|
|
55155
|
-
let prevResi = 0;
|
|
55311
|
+
//let prevResi = 0;
|
|
55312
|
+
let prevResi = offset;
|
|
55156
55313
|
for(let i = 0, il = seqArray.length; i < il; ++i) {
|
|
55157
55314
|
let seqName, resiPos;
|
|
55158
55315
|
// mmdbid: ["0","R","ARG"],["502","V","VAL"]; mmcifid: [1, "ARG"]; align: ["0","R","ARG"] //align: [1, "0","R","ARG"]
|
|
@@ -55971,6 +56128,12 @@ class LoadAtomData {
|
|
|
55971
56128
|
if(Object.keys(data.moleculeInfor[molid]).length === 0) continue;
|
|
55972
56129
|
|
|
55973
56130
|
let chain = data.moleculeInfor[molid].chain.trim();
|
|
56131
|
+
|
|
56132
|
+
// remove "_" in chain name
|
|
56133
|
+
if(parseInt(me.cfg.date) >= 20231001 || (!me.cfg.date && parseInt(me.utilsCls.getDateDigitStr()) >= 20231001)) {
|
|
56134
|
+
chain = chain.replace(/_/g, '');
|
|
56135
|
+
}
|
|
56136
|
+
|
|
55974
56137
|
let chainid = pdbidTmp + '_' + chain;
|
|
55975
56138
|
|
|
55976
56139
|
if(chainHash.hasOwnProperty(chain)) {
|
|
@@ -56035,6 +56198,7 @@ class LoadAtomData {
|
|
|
56035
56198
|
let CSerial, prevCSerial, OSerial, prevOSerial;
|
|
56036
56199
|
|
|
56037
56200
|
let biopolymerChainsHash = {};
|
|
56201
|
+
|
|
56038
56202
|
for(let i in atoms) {
|
|
56039
56203
|
++serial;
|
|
56040
56204
|
|
|
@@ -56064,21 +56228,21 @@ class LoadAtomData {
|
|
|
56064
56228
|
atm.chain = ic.molid2chain[molid].substr(pos + 1);
|
|
56065
56229
|
}
|
|
56066
56230
|
else {
|
|
56067
|
-
|
|
56231
|
+
let miscName = 'Misc';
|
|
56068
56232
|
|
|
56069
|
-
|
|
56070
|
-
|
|
56071
|
-
|
|
56072
|
-
|
|
56073
|
-
|
|
56074
|
-
|
|
56233
|
+
//if(atm.resn != prevResn || chainid2kind[chainNum] === 'solvent' || atm.resn === 'HOH' || atm.name == atm.elem) {
|
|
56234
|
+
if((chainid2kind[chainNum] === 'protein' && chainid2kind[chainNum] === 'nucleotide' && atm.resi != prevResiOri)
|
|
56235
|
+
||(chainid2kind[chainNum] !== 'protein' && chainid2kind[chainNum] !== 'nucleotide'
|
|
56236
|
+
&&(atm.resn.substr(0,3) != prevResn.substr(0,3) || atm.resi != prevResiOri || chainid2kind[chainNum] === 'solvent' || atm.resn === 'HOH')) ) {
|
|
56237
|
+
++miscCnt;
|
|
56238
|
+
}
|
|
56075
56239
|
|
|
56076
|
-
|
|
56077
|
-
|
|
56078
|
-
|
|
56240
|
+
atm.resi_ori = atm.resi;
|
|
56241
|
+
atm.resi = miscCnt;
|
|
56242
|
+
bSetResi = true;
|
|
56079
56243
|
|
|
56080
|
-
|
|
56081
|
-
|
|
56244
|
+
//if all are defined in the chain section, no "Misc" should appear
|
|
56245
|
+
atm.chain = miscName;
|
|
56082
56246
|
}
|
|
56083
56247
|
|
|
56084
56248
|
//if(ic.mmdbid_q !== undefined && ic.mmdbid_q === ic.mmdbid_t && alignType === 'query') {
|
|
@@ -56116,6 +56280,11 @@ class LoadAtomData {
|
|
|
56116
56280
|
|
|
56117
56281
|
atm.chain = atm.chain.trim(); //.replace(/_/g, '');
|
|
56118
56282
|
|
|
56283
|
+
// remove "_" in chain name
|
|
56284
|
+
if(parseInt(me.cfg.date) >= 20231001 || (!me.cfg.date && parseInt(me.utilsCls.getDateDigitStr()) >= 20231001)) {
|
|
56285
|
+
atm.chain = atm.chain.replace(/_/g, '');
|
|
56286
|
+
}
|
|
56287
|
+
|
|
56119
56288
|
// mmcif has pre-assigned structure in mmcifparser.cgi output
|
|
56120
56289
|
if(type === 'mmdbid' || type === 'align') {
|
|
56121
56290
|
atm.structure = mmdbId;
|
|
@@ -58524,10 +58693,7 @@ class LoadPDB {
|
|
|
58524
58693
|
|
|
58525
58694
|
if(ic.atoms[oriSerial2NewSerial[from]] !== undefined) ic.atoms[oriSerial2NewSerial[from]].bonds.push(oriSerial2NewSerial[to]);
|
|
58526
58695
|
}
|
|
58527
|
-
} else if (record.substr(0,3) === 'TER')
|
|
58528
|
-
// Concatenation of two pdbs will have several atoms for the same serial
|
|
58529
|
-
++serial;
|
|
58530
|
-
}
|
|
58696
|
+
} else if (record.substr(0,3) === 'TER') ;
|
|
58531
58697
|
}
|
|
58532
58698
|
|
|
58533
58699
|
// add the last residue set
|
|
@@ -60101,24 +60267,28 @@ class ApplyCommand {
|
|
|
60101
60267
|
else if(command == 'rotate left') {
|
|
60102
60268
|
ic.bStopRotate = false;
|
|
60103
60269
|
ic.ROT_DIR = 'left';
|
|
60270
|
+
ic.transformCls.rotateCountMax = 6000;
|
|
60104
60271
|
|
|
60105
60272
|
ic.resizeCanvasCls.rotStruc('left');
|
|
60106
60273
|
}
|
|
60107
60274
|
else if(command == 'rotate right') {
|
|
60108
60275
|
ic.bStopRotate = false;
|
|
60109
60276
|
ic.ROT_DIR = 'right';
|
|
60277
|
+
ic.transformCls.rotateCountMax = 6000;
|
|
60110
60278
|
|
|
60111
60279
|
ic.resizeCanvasCls.rotStruc('right');
|
|
60112
60280
|
}
|
|
60113
60281
|
else if(command == 'rotate up') {
|
|
60114
60282
|
ic.bStopRotate = false;
|
|
60115
60283
|
ic.ROT_DIR = 'up';
|
|
60284
|
+
ic.transformCls.rotateCountMax = 6000;
|
|
60116
60285
|
|
|
60117
60286
|
ic.resizeCanvasCls.rotStruc('up');
|
|
60118
60287
|
}
|
|
60119
60288
|
else if(command == 'rotate down') {
|
|
60120
60289
|
ic.bStopRotate = false;
|
|
60121
60290
|
ic.ROT_DIR = 'down';
|
|
60291
|
+
ic.transformCls.rotateCountMax = 6000;
|
|
60122
60292
|
|
|
60123
60293
|
ic.resizeCanvasCls.rotStruc('down');
|
|
60124
60294
|
}
|
|
@@ -62244,10 +62414,14 @@ class LoadScript {
|
|
|
62244
62414
|
let bFinalStep =(i === steps - 1) ? true : false;
|
|
62245
62415
|
|
|
62246
62416
|
if(!ic.commands[i].trim()) continue;
|
|
62247
|
-
|
|
62417
|
+
let nAtoms = Object.keys(ic.atoms).length;
|
|
62418
|
+
|
|
62419
|
+
if(nAtoms == 0 && ic.commands[i].indexOf('load') == -1) continue;
|
|
62248
62420
|
|
|
62249
62421
|
let strArray = ic.commands[i].split("|||");
|
|
62250
62422
|
let command = strArray[0].trim();
|
|
62423
|
+
|
|
62424
|
+
if(ic.inputid) ic.bNotLoadStructure = true;
|
|
62251
62425
|
|
|
62252
62426
|
if(command.indexOf('load') !== -1) {
|
|
62253
62427
|
if(end === 0 && start === end) {
|
|
@@ -62336,6 +62510,10 @@ class LoadScript {
|
|
|
62336
62510
|
else if(command.indexOf('ig refnum on') == 0 ) {
|
|
62337
62511
|
await ic.refnumCls.showIgRefNum();
|
|
62338
62512
|
}
|
|
62513
|
+
else if(command.indexOf('ig template') == 0 ) {
|
|
62514
|
+
let template = command.substr(command.lastIndexOf(' ') + 1);
|
|
62515
|
+
await ic.refnumCls.showIgRefNum(template);
|
|
62516
|
+
}
|
|
62339
62517
|
else if(command.indexOf('set annotation 3ddomain') == 0) { // the command may have "|||{"factor"...
|
|
62340
62518
|
if(Object.keys(ic.proteins).length > 0) {
|
|
62341
62519
|
thisClass.applyCommand3ddomain(strArray[0].trim());
|
|
@@ -62509,10 +62687,10 @@ class LoadScript {
|
|
|
62509
62687
|
await thisClass.applyCommandLoad(lastCommand);
|
|
62510
62688
|
}
|
|
62511
62689
|
else if(lastCommand.indexOf('set map') !== -1 && lastCommand.indexOf('set map wireframe') === -1) {
|
|
62512
|
-
thisClass.applyCommandMap(lastCommand);
|
|
62690
|
+
await thisClass.applyCommandMap(lastCommand);
|
|
62513
62691
|
}
|
|
62514
62692
|
else if(lastCommand.indexOf('set emmap') !== -1 && lastCommand.indexOf('set emmap wireframe') === -1) {
|
|
62515
|
-
thisClass.applyCommandEmmap(lastCommand);
|
|
62693
|
+
await thisClass.applyCommandEmmap(lastCommand);
|
|
62516
62694
|
}
|
|
62517
62695
|
else if(lastCommand.indexOf('set phi') !== -1) {
|
|
62518
62696
|
await ic.delphiCls.applyCommandPhi(lastCommand);
|
|
@@ -62782,7 +62960,7 @@ class LoadScript {
|
|
|
62782
62960
|
}
|
|
62783
62961
|
|
|
62784
62962
|
//Apply the command to show electron density map.
|
|
62785
|
-
applyCommandMap(command) { let ic = this.icn3d; ic.icn3dui;
|
|
62963
|
+
async applyCommandMap(command) { let ic = this.icn3d; ic.icn3dui;
|
|
62786
62964
|
|
|
62787
62965
|
// chain functions together
|
|
62788
62966
|
// ic.deferredMap = $.Deferred(function() { let ic = thisClass.icn3d;
|
|
@@ -62798,10 +62976,10 @@ class LoadScript {
|
|
|
62798
62976
|
let type = paraArray[0];
|
|
62799
62977
|
|
|
62800
62978
|
if(urlArray.length == 2) {
|
|
62801
|
-
|
|
62979
|
+
await ic.dsn6ParserCls.dsn6ParserBase(urlArray[1], type, sigma);
|
|
62802
62980
|
}
|
|
62803
62981
|
else {
|
|
62804
|
-
|
|
62982
|
+
await ic.dsn6ParserCls.dsn6Parser(ic.inputid, type, sigma);
|
|
62805
62983
|
}
|
|
62806
62984
|
}
|
|
62807
62985
|
// }); // end of me.deferred = $.Deferred(function() {
|
|
@@ -62810,7 +62988,7 @@ class LoadScript {
|
|
|
62810
62988
|
}
|
|
62811
62989
|
|
|
62812
62990
|
//Apply the command to show EM density map.
|
|
62813
|
-
applyCommandEmmap(command) { let ic = this.icn3d; ic.icn3dui;
|
|
62991
|
+
async applyCommandEmmap(command) { let ic = this.icn3d; ic.icn3dui;
|
|
62814
62992
|
|
|
62815
62993
|
// chain functions together
|
|
62816
62994
|
// ic.deferredEmmap = $.Deferred(function() { let ic = thisClass.icn3d;
|
|
@@ -62821,7 +62999,7 @@ class LoadScript {
|
|
|
62821
62999
|
let percentage = paraArray[1];
|
|
62822
63000
|
let type = 'em';
|
|
62823
63001
|
|
|
62824
|
-
ic.densityCifParserCls.densityCifParser(ic.inputid, type, percentage, ic.emd);
|
|
63002
|
+
await ic.densityCifParserCls.densityCifParser(ic.inputid, type, percentage, ic.emd);
|
|
62825
63003
|
}
|
|
62826
63004
|
// }); // end of me.deferred = $.Deferred(function() {
|
|
62827
63005
|
|
|
@@ -63153,7 +63331,7 @@ class SelectByCommand {
|
|
|
63153
63331
|
// $1,2,3: Structure
|
|
63154
63332
|
// .A,B,C: chain
|
|
63155
63333
|
// :5-10,K,chemicals: residues, could be 'proteins', 'nucleotides', 'chemicals', 'ions', and 'water'
|
|
63156
|
-
// :ref_1250,
|
|
63334
|
+
// :ref_1250,ref_anchors,ref_strands,ref_loops: reference numbers 1250, anchor residues (e.g., 2250), residues in strands, residues in loops
|
|
63157
63335
|
// @CA,C,C*: atoms
|
|
63158
63336
|
// wild card * can be used to select all
|
|
63159
63337
|
//var currHighlightAtoms = {}
|
|
@@ -64758,31 +64936,12 @@ class Delphi {
|
|
|
64758
64936
|
this.icn3d = icn3d;
|
|
64759
64937
|
}
|
|
64760
64938
|
|
|
64761
|
-
CalcPhiUrl(gsize, salt, contour, bSurface, url) { let ic = this.icn3d
|
|
64939
|
+
async CalcPhiUrl(gsize, salt, contour, bSurface, url) { let ic = this.icn3d, me = ic.icn3dui;
|
|
64762
64940
|
let thisClass = this;
|
|
64763
64941
|
|
|
64764
|
-
let
|
|
64765
|
-
oReq.open("GET", url, true);
|
|
64766
|
-
|
|
64767
|
-
oReq.responseType = "text";
|
|
64942
|
+
let data = await me.getXMLHttpRqstPromise(url, 'GET', 'text', 'PQR');
|
|
64768
64943
|
|
|
64769
|
-
|
|
64770
|
-
if(this.readyState == 4) {
|
|
64771
|
-
if(this.status == 200) {
|
|
64772
|
-
let data = oReq.response;
|
|
64773
|
-
|
|
64774
|
-
await thisClass.CalcPhi(gsize, salt, contour, bSurface, data);
|
|
64775
|
-
}
|
|
64776
|
-
else {
|
|
64777
|
-
alert("The PQR file is unavailable...");
|
|
64778
|
-
}
|
|
64779
|
-
}
|
|
64780
|
-
else {
|
|
64781
|
-
ic.ParserUtilsCls.showLoading();
|
|
64782
|
-
}
|
|
64783
|
-
};
|
|
64784
|
-
|
|
64785
|
-
oReq.send();
|
|
64944
|
+
await thisClass.CalcPhi(gsize, salt, contour, bSurface, data);
|
|
64786
64945
|
}
|
|
64787
64946
|
|
|
64788
64947
|
getPdbStr(bNode) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -64828,7 +64987,8 @@ class Delphi {
|
|
|
64828
64987
|
let pdbstr = '';
|
|
64829
64988
|
/// pdbstr += ic.saveFileCls.getPDBHeader();
|
|
64830
64989
|
|
|
64831
|
-
|
|
64990
|
+
let bMergeIntoOne = true;
|
|
64991
|
+
pdbstr +=(me.cfg.cid) ? ic.saveFileCls.getAtomPDB(atomHash, true, undefined, undefined, undefined, undefined, bMergeIntoOne) : ic.saveFileCls.getAtomPDB(atomHash, undefined, undefined, undefined, undefined, undefined, bMergeIntoOne);
|
|
64832
64992
|
pdbstr += ic.saveFileCls.getAtomPDB(ionHash, true, undefined, true);
|
|
64833
64993
|
|
|
64834
64994
|
return pdbstr;
|
|
@@ -64869,7 +65029,7 @@ class Delphi {
|
|
|
64869
65029
|
}
|
|
64870
65030
|
|
|
64871
65031
|
return new Promise(function(resolve, reject) {
|
|
64872
|
-
// see
|
|
65032
|
+
// see icn3dui.js for ajaxTransport
|
|
64873
65033
|
$.ajax({
|
|
64874
65034
|
url: url,
|
|
64875
65035
|
type: 'POST',
|
|
@@ -64893,7 +65053,7 @@ class Delphi {
|
|
|
64893
65053
|
});
|
|
64894
65054
|
}
|
|
64895
65055
|
|
|
64896
|
-
PhiParser(url, type, contour, bSurface) { let ic = this.icn3d
|
|
65056
|
+
async PhiParser(url, type, contour, bSurface) { let ic = this.icn3d, me = ic.icn3dui;
|
|
64897
65057
|
let thisClass = this;
|
|
64898
65058
|
//var dataType;
|
|
64899
65059
|
|
|
@@ -64911,49 +65071,32 @@ class Delphi {
|
|
|
64911
65071
|
}
|
|
64912
65072
|
else {
|
|
64913
65073
|
*/
|
|
64914
|
-
let oReq = new XMLHttpRequest();
|
|
64915
|
-
oReq.open("GET", url, true);
|
|
64916
65074
|
|
|
65075
|
+
let responseType;
|
|
64917
65076
|
if(type == 'phiurl' || type == 'phiurl2') {
|
|
64918
|
-
|
|
65077
|
+
responseType = "arraybuffer";
|
|
64919
65078
|
}
|
|
64920
65079
|
else {
|
|
64921
|
-
|
|
65080
|
+
responseType = "text";
|
|
64922
65081
|
}
|
|
64923
65082
|
|
|
64924
|
-
|
|
64925
|
-
if(this.readyState == 4) {
|
|
64926
|
-
if(this.status == 200) {
|
|
64927
|
-
let data = oReq.response;
|
|
65083
|
+
let data = await me.getXMLHttpRqstPromise(url, 'GET', responseType, 'potential');
|
|
64928
65084
|
|
|
64929
|
-
|
|
64930
|
-
|
|
64931
|
-
|
|
64932
|
-
|
|
64933
|
-
|
|
64934
|
-
|
|
64935
|
-
|
|
64936
|
-
ic.bAjaxPhi = true;
|
|
64937
|
-
|
|
64938
|
-
if(bSurface) {
|
|
64939
|
-
ic.setOptionCls.setOption('phisurface', 'phi');
|
|
64940
|
-
}
|
|
64941
|
-
else {
|
|
64942
|
-
ic.setOptionCls.setOption('phimap', 'phi');
|
|
64943
|
-
}
|
|
64944
|
-
}
|
|
64945
|
-
else {
|
|
64946
|
-
alert("The potential file is unavailable...");
|
|
64947
|
-
}
|
|
65085
|
+
if(type == 'phiurl' || type == 'phiurl2') {
|
|
65086
|
+
thisClass.loadPhiData(data, contour, bSurface);
|
|
65087
|
+
}
|
|
65088
|
+
else {
|
|
65089
|
+
thisClass.loadCubeData(data, contour, bSurface);
|
|
65090
|
+
}
|
|
64948
65091
|
|
|
64949
|
-
|
|
64950
|
-
}
|
|
64951
|
-
else {
|
|
64952
|
-
ic.ParserUtilsCls.showLoading();
|
|
64953
|
-
}
|
|
64954
|
-
};
|
|
65092
|
+
ic.bAjaxPhi = true;
|
|
64955
65093
|
|
|
64956
|
-
|
|
65094
|
+
if(bSurface) {
|
|
65095
|
+
ic.setOptionCls.setOption('phisurface', 'phi');
|
|
65096
|
+
}
|
|
65097
|
+
else {
|
|
65098
|
+
ic.setOptionCls.setOption('phimap', 'phi');
|
|
65099
|
+
}
|
|
64957
65100
|
// }
|
|
64958
65101
|
}
|
|
64959
65102
|
|
|
@@ -65131,7 +65274,7 @@ class Delphi {
|
|
|
65131
65274
|
await thisClass.CalcPhiUrl(gsize, salt, contour, bSurface, url);
|
|
65132
65275
|
}
|
|
65133
65276
|
else {
|
|
65134
|
-
thisClass.PhiParser(url, type, contour, bSurface);
|
|
65277
|
+
await thisClass.PhiParser(url, type, contour, bSurface);
|
|
65135
65278
|
}
|
|
65136
65279
|
// }); // end of me.deferred = $.Deferred(function() {
|
|
65137
65280
|
|
|
@@ -65310,7 +65453,7 @@ class Delphi {
|
|
|
65310
65453
|
await this.CalcPhiUrl(gsize, salt, contour, bSurface, url);
|
|
65311
65454
|
}
|
|
65312
65455
|
else {
|
|
65313
|
-
this.PhiParser(url, type, contour, bSurface);
|
|
65456
|
+
await this.PhiParser(url, type, contour, bSurface);
|
|
65314
65457
|
}
|
|
65315
65458
|
|
|
65316
65459
|
if(bSurface) {
|
|
@@ -65818,7 +65961,8 @@ console.log("free energy: " + energy + " kcal/mol");
|
|
|
65818
65961
|
}
|
|
65819
65962
|
else {
|
|
65820
65963
|
let atoms = me.hashUtilsCls.intHash(ic.dAtoms, ic.hAtoms);
|
|
65821
|
-
|
|
65964
|
+
let bMergeIntoOne = true;
|
|
65965
|
+
pdbStr = ic.saveFileCls.getAtomPDB(atoms, undefined, undefined, undefined, undefined, undefined, bMergeIntoOne);
|
|
65822
65966
|
}
|
|
65823
65967
|
|
|
65824
65968
|
let url = me.htmlCls.baseUrl + "scap/scap.cgi";
|
|
@@ -69739,7 +69883,7 @@ class SaveFile {
|
|
|
69739
69883
|
}
|
|
69740
69884
|
|
|
69741
69885
|
//getAtomPDB: function(atomHash, bPqr, bPdb, bNoChem) { let ic = this.icn3d, me = ic.icn3dui;
|
|
69742
|
-
getAtomPDB(atomHash, bPqr, bNoChem, bNoHeader, chainResi2pdb, pdbid) { let ic = this.icn3d, me = ic.icn3dui;
|
|
69886
|
+
getAtomPDB(atomHash, bPqr, bNoChem, bNoHeader, chainResi2pdb, pdbid, bMergeIntoOne) { let ic = this.icn3d, me = ic.icn3dui;
|
|
69743
69887
|
let pdbStr = '';
|
|
69744
69888
|
|
|
69745
69889
|
// get all phosphate groups in lipids
|
|
@@ -69892,6 +70036,7 @@ class SaveFile {
|
|
|
69892
70036
|
let bMulStruc =(struArray.length > 1) ? true : false;
|
|
69893
70037
|
|
|
69894
70038
|
let molNum = 1, prevStru = '', prevChain = '';
|
|
70039
|
+
let chainIndex = 0, fakeChain = '', chainNameArray = 'abcdefghijklmnopqrstuvwxyz0123456789';
|
|
69895
70040
|
|
|
69896
70041
|
let addedChainResiHash = {};
|
|
69897
70042
|
for(let i in atomHash) {
|
|
@@ -69902,20 +70047,22 @@ class SaveFile {
|
|
|
69902
70047
|
|
|
69903
70048
|
//if(bMulStruc && atom.structure != prevStru) {
|
|
69904
70049
|
if(atom.structure != prevStru) {
|
|
69905
|
-
|
|
69906
|
-
|
|
70050
|
+
if(!bMergeIntoOne || !bMulStruc) {
|
|
70051
|
+
pdbStr += connStr;
|
|
70052
|
+
connStr = '';
|
|
69907
70053
|
|
|
69908
|
-
|
|
70054
|
+
if(molNum > 1) pdbStr += '\nENDMDL\n';
|
|
69909
70055
|
|
|
69910
|
-
|
|
70056
|
+
if(bMulStruc) pdbStr += 'MODEL ' + molNum + '\n';
|
|
70057
|
+
}
|
|
69911
70058
|
|
|
69912
70059
|
// add header
|
|
69913
70060
|
let mutantInfo = (chainResi2pdb) ? "Mutated chain_residue " + Object.keys(chainResi2pdb) + '; ' : '';
|
|
69914
70061
|
if(!bNoHeader) {
|
|
69915
70062
|
//pdbStr += this.getPDBHeader(molNum - 1, stru2header, mutantInfo, pdbid);
|
|
69916
70063
|
|
|
69917
|
-
// make
|
|
69918
|
-
pdbStr += this.getPDBHeader(molNum - 1, stru2header, mutantInfo, atom.structure);
|
|
70064
|
+
// make sure the PDB ID is correct
|
|
70065
|
+
if(!bMergeIntoOne || !bMulStruc) pdbStr += this.getPDBHeader(molNum - 1, stru2header, mutantInfo, atom.structure);
|
|
69919
70066
|
|
|
69920
70067
|
//pdbStr += '\n'; // separate from incomplete secondary structures
|
|
69921
70068
|
}
|
|
@@ -69923,6 +70070,7 @@ class SaveFile {
|
|
|
69923
70070
|
//prevStru = atom.structure;
|
|
69924
70071
|
++molNum;
|
|
69925
70072
|
}
|
|
70073
|
+
|
|
69926
70074
|
//else {
|
|
69927
70075
|
//if(atom.chain != prevChain) {
|
|
69928
70076
|
if(atom.chain != prevChain && atom.structure == prevStru) {
|
|
@@ -69996,17 +70144,28 @@ class SaveFile {
|
|
|
69996
70144
|
*/
|
|
69997
70145
|
|
|
69998
70146
|
line +=(resn.length <= 3) ? resn.padStart(3, ' ') : resn.substr(0, 3);
|
|
69999
|
-
|
|
70000
|
-
|
|
70001
|
-
|
|
70002
|
-
|
|
70003
|
-
|
|
70004
|
-
|
|
70005
|
-
|
|
70006
|
-
line += ' ' +
|
|
70147
|
+
|
|
70148
|
+
if(bMergeIntoOne && molNum > 2 && (ic.proteins.hasOwnProperty(atom.serial) || ic.nucleotides.hasOwnProperty(atom.serial))) {
|
|
70149
|
+
if(atom.structure != prevStru || atom.chain != prevChain) {
|
|
70150
|
+
fakeChain = (chainIndex < 36) ? chainNameArray[chainIndex] : '?';
|
|
70151
|
+
++chainIndex;
|
|
70152
|
+
}
|
|
70153
|
+
|
|
70154
|
+
line += ' ' + fakeChain;
|
|
70007
70155
|
}
|
|
70008
|
-
else
|
|
70009
|
-
line += '
|
|
70156
|
+
else {
|
|
70157
|
+
//line += ' ';
|
|
70158
|
+
//line +=(atom.chain.length <= 1) ? atom.chain.padStart(1, ' ') : atom.chain.substr(0, 1);
|
|
70159
|
+
if(atom.chain.length >= 2) {
|
|
70160
|
+
let chainTmp = atom.chain.replace(/_/gi, '').substr(0, 2);
|
|
70161
|
+
line += chainTmp;
|
|
70162
|
+
}
|
|
70163
|
+
else if(atom.chain.length == 1) {
|
|
70164
|
+
line += ' ' + atom.chain.substr(0, 1);
|
|
70165
|
+
}
|
|
70166
|
+
else if(atom.chain.length == 0) {
|
|
70167
|
+
line += ' A';
|
|
70168
|
+
}
|
|
70010
70169
|
}
|
|
70011
70170
|
|
|
70012
70171
|
let resi = atom.resi;
|
|
@@ -70102,9 +70261,11 @@ class SaveFile {
|
|
|
70102
70261
|
prevChain = atom.chain;
|
|
70103
70262
|
}
|
|
70104
70263
|
|
|
70105
|
-
|
|
70106
|
-
|
|
70107
|
-
|
|
70264
|
+
if(!bMergeIntoOne || !bMulStruc) {
|
|
70265
|
+
pdbStr += connStr;
|
|
70266
|
+
|
|
70267
|
+
if(bMulStruc) pdbStr += '\nENDMDL\n';
|
|
70268
|
+
}
|
|
70108
70269
|
|
|
70109
70270
|
return pdbStr;
|
|
70110
70271
|
}
|
|
@@ -70624,14 +70785,7 @@ class ShareLink {
|
|
|
70624
70785
|
}
|
|
70625
70786
|
|
|
70626
70787
|
// add time stamp
|
|
70627
|
-
let
|
|
70628
|
-
let monthStr =(date.getMonth() + 1).toString();
|
|
70629
|
-
if(date.getMonth() + 1 < 10) monthStr = '0' + monthStr;
|
|
70630
|
-
|
|
70631
|
-
let dateStr = date.getDate().toString();
|
|
70632
|
-
if(date.getDate() < 10) dateStr = '0' + dateStr;
|
|
70633
|
-
|
|
70634
|
-
let dateAllStr = date.getFullYear().toString() + monthStr + dateStr;
|
|
70788
|
+
let dateAllStr = me.utilsCls.getDateDigitStr();
|
|
70635
70789
|
if(!bPrevDate) url += 'date=' + dateAllStr + '&';
|
|
70636
70790
|
url += 'v=' + me.REVISION + '&';
|
|
70637
70791
|
|
|
@@ -73596,7 +73750,7 @@ class iCn3DUI {
|
|
|
73596
73750
|
//even when multiple iCn3D viewers are shown together.
|
|
73597
73751
|
this.pre = this.cfg.divid + "_";
|
|
73598
73752
|
|
|
73599
|
-
this.REVISION = '3.28.
|
|
73753
|
+
this.REVISION = '3.28.4';
|
|
73600
73754
|
|
|
73601
73755
|
// In nodejs, iCn3D defines "window = {navigator: {}}"
|
|
73602
73756
|
this.bNode = (Object.keys(window).length < 2) ? true : false;
|
|
@@ -73803,16 +73957,17 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
|
|
|
73803
73957
|
}
|
|
73804
73958
|
}
|
|
73805
73959
|
|
|
73806
|
-
//
|
|
73807
|
-
ic.chainidArray = [chain_t].concat(chainidArray);
|
|
73808
|
-
ic.chainidArray = ic.chainalignParserCls.addPostfixForChainids(ic.chainidArray);
|
|
73809
|
-
|
|
73960
|
+
// get the matched structures, do not include the template
|
|
73810
73961
|
let mmdbafid = '';
|
|
73811
|
-
for(let i = 0, il =
|
|
73962
|
+
for(let i = 0, il = chainidArray.length; i < il; ++i) {
|
|
73812
73963
|
if(i > 0) mmdbafid += ',';
|
|
73813
|
-
mmdbafid +=
|
|
73964
|
+
mmdbafid += chainidArray[i].substr(0, chainidArray[i].indexOf('_'));
|
|
73814
73965
|
}
|
|
73815
73966
|
|
|
73967
|
+
// realign, include the template
|
|
73968
|
+
ic.chainidArray = [chain_t].concat(chainidArray);
|
|
73969
|
+
ic.chainidArray = ic.chainalignParserCls.addPostfixForChainids(ic.chainidArray);
|
|
73970
|
+
|
|
73816
73971
|
me.htmlCls.clickMenuCls.setLogCmd('resdef ' + me.cfg.resdef, true);
|
|
73817
73972
|
|
|
73818
73973
|
ic.loadCmd = 'vast_search_chainid ' + ic.chainidArray;
|
|
@@ -74028,7 +74183,7 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
|
|
|
74028
74183
|
// ic.bNCBI = true;
|
|
74029
74184
|
|
|
74030
74185
|
// remove space
|
|
74031
|
-
me.cfg.mmdbafid = me.cfg.mmdbafid.replace(/\s+/g, '');
|
|
74186
|
+
me.cfg.mmdbafid = me.cfg.mmdbafid.replace(/\s+/g, '').toUpperCase();
|
|
74032
74187
|
|
|
74033
74188
|
ic.bMmdbafid = true;
|
|
74034
74189
|
ic.inputid = me.cfg.mmdbafid;
|
|
@@ -74117,6 +74272,44 @@ iCn3DUI.prototype.getMmtfReducedPromise = function(mmtfid) { return new Promi
|
|
|
74117
74272
|
});
|
|
74118
74273
|
};
|
|
74119
74274
|
|
|
74275
|
+
iCn3DUI.prototype.getXMLHttpRqstPromise = function(url, dataType, responseType, mapType) { let me = this;
|
|
74276
|
+
return new Promise(function(resolve, reject) {
|
|
74277
|
+
let oReq = new XMLHttpRequest();
|
|
74278
|
+
oReq.open(dataType, url, true);
|
|
74279
|
+
oReq.responseType = responseType;
|
|
74280
|
+
|
|
74281
|
+
oReq.onreadystatechange = function() {
|
|
74282
|
+
if (this.readyState == 4) {
|
|
74283
|
+
if(this.status == 200) {
|
|
74284
|
+
let arrayBuffer = oReq.response;
|
|
74285
|
+
resolve(arrayBuffer);
|
|
74286
|
+
}
|
|
74287
|
+
else {
|
|
74288
|
+
if(mapType == '2fofc' || mapType == 'fofc') {
|
|
74289
|
+
alert("Density server at EBI has no corresponding electron density map for this structure.");
|
|
74290
|
+
}
|
|
74291
|
+
else if(mapType == 'em') {
|
|
74292
|
+
alert("Density server at EBI has no corresponding EM density map for this structure.");
|
|
74293
|
+
}
|
|
74294
|
+
else if(mapType == 'rcsbEdmaps') {
|
|
74295
|
+
alert("RCSB server has no corresponding eletron density map for this structure.");
|
|
74296
|
+
}
|
|
74297
|
+
else {
|
|
74298
|
+
alert("The " + mapType + " file is unavailable...");
|
|
74299
|
+
}
|
|
74300
|
+
|
|
74301
|
+
reject('error');
|
|
74302
|
+
}
|
|
74303
|
+
}
|
|
74304
|
+
else {
|
|
74305
|
+
me.icn3d.ParserUtilsCls.showLoading();
|
|
74306
|
+
}
|
|
74307
|
+
};
|
|
74308
|
+
|
|
74309
|
+
oReq.send();
|
|
74310
|
+
});
|
|
74311
|
+
};
|
|
74312
|
+
|
|
74120
74313
|
iCn3DUI.prototype.getAjaxPromise = function(url, dataType, beforeSend, alertMess, logMess, complete, bNode) { let me = this;
|
|
74121
74314
|
// if(!bNode || dataType != 'json') {
|
|
74122
74315
|
return new Promise(function(resolve, reject) {
|