icn3d 3.13.0 → 3.13.2
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/css/lib/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- package/css/lib/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- package/css/lib/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- package/css/lib/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- package/css/lib/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- package/css/lib/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- package/css/lib/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- package/css/lib/images/ui-icons_222222_256x240.png +0 -0
- package/css/lib/images/ui-icons_228ef1_256x240.png +0 -0
- package/css/lib/images/ui-icons_ef8c08_256x240.png +0 -0
- package/css/lib/images/ui-icons_ffd27a_256x240.png +0 -0
- package/css/lib/images/ui-icons_ffffff_256x240.png +0 -0
- package/icn3d.js +257 -81
- package/icn3d.min.js +1 -1
- package/icn3d.module.js +257 -81
- package/package.json +1 -1
package/icn3d.module.js
CHANGED
|
@@ -5127,7 +5127,11 @@ class UtilsCls {
|
|
|
5127
5127
|
let dz = atom0.coord.z - atom1.coord.z;
|
|
5128
5128
|
let distSq = dx*dx + dy*dy + dz*dz;
|
|
5129
5129
|
|
|
5130
|
-
|
|
5130
|
+
// r(N) = 0.71, r(H) = 0.31, N-H in residues are about 1.5
|
|
5131
|
+
// factor = (1.5 / 1.02) * (1.5 / 1.02) = 2.16
|
|
5132
|
+
let factor = ((atom0.elem == 'N' && atom1.elem.substr(0,1) == 'H') || (atom1.elem == 'N' && atom0.elem.substr(0,1) == 'H')) ? 2.2 : 1.3;
|
|
5133
|
+
|
|
5134
|
+
return distSq < factor * r * r;
|
|
5131
5135
|
}
|
|
5132
5136
|
|
|
5133
5137
|
//Convert a three-letter residue name to a one-letter residue abbreviation, e.g., 'LYS' to 'K', or ' A' to 'A' for nucleotides.
|
|
@@ -18350,7 +18354,7 @@ class ShowInter {
|
|
|
18350
18354
|
for(let j = 0, jl = ic.atoms[atom.serial].bonds.length; j < jl; ++j) {
|
|
18351
18355
|
let serial = ic.atoms[atom.serial].bonds[j];
|
|
18352
18356
|
//if(ic.atoms[serial].name === 'H') {
|
|
18353
|
-
if(
|
|
18357
|
+
if(ic.atoms[serial].elem.substr(0, 1) === 'H') {
|
|
18354
18358
|
ic.dAtoms[serial] = 1;
|
|
18355
18359
|
ic.hAtoms[serial] = 1;
|
|
18356
18360
|
}
|
|
@@ -18359,11 +18363,29 @@ class ShowInter {
|
|
|
18359
18363
|
}
|
|
18360
18364
|
}
|
|
18361
18365
|
else {
|
|
18366
|
+
// for(let serial in ic.atoms) {
|
|
18367
|
+
// ic.dAtoms[serial] = 1;
|
|
18368
|
+
// ic.hAtoms[serial] = 1;
|
|
18369
|
+
// }
|
|
18370
|
+
|
|
18371
|
+
// add bonds in heavy atoms
|
|
18372
|
+
//for(let serial in ic.hAtoms) {
|
|
18362
18373
|
for(let serial in ic.atoms) {
|
|
18363
|
-
ic.
|
|
18364
|
-
|
|
18365
|
-
|
|
18374
|
+
let atom = ic.atoms[serial];
|
|
18375
|
+
//if(atom.name === 'H') {
|
|
18376
|
+
if(atom.elem.substr(0, 1) === 'H') {
|
|
18377
|
+
if(ic.atoms[serial].bonds.length > 0) {
|
|
18378
|
+
let otherSerial = ic.atoms[serial].bonds[0];
|
|
18379
|
+
ic.atoms[otherSerial].bonds.push(atom.serial);
|
|
18380
|
+
if(ic.atoms[otherSerial].bondOrder) ic.atoms[otherSerial].bondOrder.push(1);
|
|
18381
|
+
}
|
|
18382
|
+
|
|
18383
|
+
ic.dAtoms[serial] = 1;
|
|
18384
|
+
}
|
|
18385
|
+
}
|
|
18366
18386
|
}
|
|
18387
|
+
|
|
18388
|
+
ic.bShowHighlight = false;
|
|
18367
18389
|
}
|
|
18368
18390
|
|
|
18369
18391
|
hideHydrogens() { let ic = this.icn3d; ic.icn3dui;
|
|
@@ -19844,7 +19866,7 @@ class Delphi {
|
|
|
19844
19866
|
|
|
19845
19867
|
ic.loadPhiFrom = 'delphi';
|
|
19846
19868
|
|
|
19847
|
-
let url =
|
|
19869
|
+
let url = me.htmlCls.baseUrl + "delphi/delphi.cgi";
|
|
19848
19870
|
let pdbid =(me.cfg.cid) ? me.cfg.cid : Object.keys(ic.structures).toString();
|
|
19849
19871
|
let dataObj = {};
|
|
19850
19872
|
|
|
@@ -20656,7 +20678,7 @@ class Symd {
|
|
|
20656
20678
|
let thisClass = this;
|
|
20657
20679
|
|
|
20658
20680
|
//var url = "https://data.rcsb.org/rest/v1/core/assembly/" + pdbid + "/1";
|
|
20659
|
-
let url =
|
|
20681
|
+
let url = me.htmlCls.baseUrl + "symd/symd.cgi";
|
|
20660
20682
|
|
|
20661
20683
|
let atomHash = me.hashUtilsCls.intHash(ic.dAtoms, ic.hAtoms);
|
|
20662
20684
|
|
|
@@ -21803,7 +21825,7 @@ class LoadPDB {
|
|
|
21803
21825
|
}
|
|
21804
21826
|
|
|
21805
21827
|
if(!(curChain === atom.chain && curResi === atom.resi)) {
|
|
21806
|
-
// a new residue, add the residue-residue bond
|
|
21828
|
+
// a new residue, add the residue-residue bond besides the regular bonds
|
|
21807
21829
|
this.refreshBonds(curResAtoms, prevCarbonArray[0]);
|
|
21808
21830
|
|
|
21809
21831
|
prevCarbonArray.splice(0, 1); // remove the first carbon
|
|
@@ -24818,13 +24840,13 @@ class OpmParser {
|
|
|
24818
24840
|
});
|
|
24819
24841
|
}
|
|
24820
24842
|
|
|
24821
|
-
loadOpmData(data, pdbid, bFull, type, pdbid2) { let
|
|
24843
|
+
loadOpmData(data, pdbid, bFull, type, pdbid2) { let ic = this.icn3d, me = ic.icn3dui;
|
|
24822
24844
|
let thisClass = this;
|
|
24823
24845
|
let url, dataType;
|
|
24824
24846
|
|
|
24825
24847
|
if(!pdbid) pdbid = 'stru';
|
|
24826
24848
|
|
|
24827
|
-
url =
|
|
24849
|
+
url = me.htmlCls.baseUrl + "mmdb/mmdb_strview.cgi?v=2&program=icn3d&opm&uid=" + pdbid.toLowerCase();
|
|
24828
24850
|
dataType = "jsonp";
|
|
24829
24851
|
|
|
24830
24852
|
$.ajax({
|
|
@@ -26101,6 +26123,7 @@ class ChainalignParser {
|
|
|
26101
26123
|
let ajaxArray = [], indexArray = [], struArray = [];
|
|
26102
26124
|
let urlalign = me.htmlCls.baseUrl + "vastdyn/vastdyn.cgi";
|
|
26103
26125
|
let urltmalign = me.htmlCls.baseUrl + "tmalign/tmalign.cgi";
|
|
26126
|
+
//let urltmalign = "https://test.ncbi.nlm.nih.gov/Structure/tmalign/tmalign.cgi";
|
|
26104
26127
|
|
|
26105
26128
|
for(let index in ic.afChainIndexHash) {
|
|
26106
26129
|
let idArray = ic.afChainIndexHash[index].split('_');
|
|
@@ -29640,7 +29663,7 @@ class ResizeCanvas {
|
|
|
29640
29663
|
//let itemArray = ['dl_selectannotations', 'dl_alignment', 'dl_2ddgm', 'dl_definedsets', 'dl_graph',
|
|
29641
29664
|
// 'dl_linegraph', 'dl_scatterplot', 'dl_contactmap', 'dl_allinteraction', 'dl_copyurl',
|
|
29642
29665
|
// 'dl_symmetry', 'dl_symd', 'dl_rmsd', 'dl_legend', 'dl_disttable'];
|
|
29643
|
-
let itemArray = ['dl_2ddgm', 'dl_2dctn', 'dl_alignment', 'dl_sequence2', 'dl_definedsets', 'dl_setsmenu', 'dl_command', 'dl_setoperations', 'dl_vast', 'dl_foldseek', 'dl_mmtfid', 'dl_pdbid', 'dl_afid', 'dl_opmid', 'dl_pdbfile', 'dl_pdbfile_app', 'dl_rescolorfile', 'dl_customcolor', 'dl_align', 'dl_alignaf', 'dl_chainalign', 'dl_mutation', 'dl_mol2file', 'dl_sdffile', 'dl_xyzfile', 'dl_afmapfile', 'dl_urlfile', 'dl_mmciffile', 'dl_mmcifid', 'dl_mmdbid', 'dl_mmdbafid', 'dl_blast_rep_id', 'dl_yournote', 'dl_gi', 'dl_uniprotid', 'dl_cid', 'dl_pngimage', 'dl_state', 'dl_fixedversion', 'dl_selection', 'dl_dsn6', 'dl_dsn6url', 'dl_clr', 'dl_symmetry', 'dl_symd', 'dl_contact', 'dl_hbonds', 'dl_realign', 'dl_realignbystruct', 'dl_allinteraction', 'dl_interactionsorted', 'dl_linegraph', 'dl_linegraphcolor', 'dl_scatterplot', 'dl_scatterplotcolor', 'dl_contactmap', 'dl_alignerrormap', 'dl_elecmap2fofc', 'dl_elecmapfofc', 'dl_emmap', 'dl_aroundsphere', 'dl_adjustmem', 'dl_selectplane', 'dl_addlabel', 'dl_addlabelselection', 'dl_labelColor', 'dl_distance', 'dl_stabilizer', 'dl_disttwosets', 'dl_distmanysets', 'dl_stabilizer_rm', 'dl_thickness', 'dl_thickness2', 'dl_addtrack', 'dl_addtrack_tabs', 'dl_saveselection', 'dl_copyurl', 'dl_selectannotations', 'dl_annotations_tabs', 'dl_anno_view_tabs', 'dl_annotations', 'dl_graph', 'dl_svgcolor', 'dl_area', 'dl_colorbyarea', 'dl_rmsd', 'dl_buriedarea', 'dl_propbypercentout', 'dl_propbybfactor', 'dl_legend', 'dl_disttable'];
|
|
29666
|
+
let itemArray = ['dl_2ddgm', 'dl_2dctn', 'dl_alignment', 'dl_sequence2', 'dl_definedsets', 'dl_setsmenu', 'dl_command', 'dl_setoperations', 'dl_vast', 'dl_foldseek', 'dl_mmtfid', 'dl_pdbid', 'dl_afid', 'dl_opmid', 'dl_pdbfile', 'dl_pdbfile_app', 'dl_rescolorfile', 'dl_customcolor', 'dl_align', 'dl_alignaf', 'dl_chainalign', 'dl_chainalign2', 'dl_chainalign3', 'dl_mutation', 'dl_mol2file', 'dl_sdffile', 'dl_xyzfile', 'dl_afmapfile', 'dl_urlfile', 'dl_mmciffile', 'dl_mmcifid', 'dl_mmdbid', 'dl_mmdbafid', 'dl_blast_rep_id', 'dl_yournote', 'dl_gi', 'dl_uniprotid', 'dl_cid', 'dl_pngimage', 'dl_state', 'dl_fixedversion', 'dl_selection', 'dl_dsn6', 'dl_dsn6url', 'dl_clr', 'dl_symmetry', 'dl_symd', 'dl_contact', 'dl_hbonds', 'dl_realign', 'dl_realignbystruct', 'dl_allinteraction', 'dl_interactionsorted', 'dl_linegraph', 'dl_linegraphcolor', 'dl_scatterplot', 'dl_scatterplotcolor', 'dl_contactmap', 'dl_alignerrormap', 'dl_elecmap2fofc', 'dl_elecmapfofc', 'dl_emmap', 'dl_aroundsphere', 'dl_adjustmem', 'dl_selectplane', 'dl_addlabel', 'dl_addlabelselection', 'dl_labelColor', 'dl_distance', 'dl_stabilizer', 'dl_disttwosets', 'dl_distmanysets', 'dl_stabilizer_rm', 'dl_thickness', 'dl_thickness2', 'dl_addtrack', 'dl_addtrack_tabs', 'dl_saveselection', 'dl_copyurl', 'dl_selectannotations', 'dl_annotations_tabs', 'dl_anno_view_tabs', 'dl_annotations', 'dl_graph', 'dl_svgcolor', 'dl_area', 'dl_colorbyarea', 'dl_rmsd', 'dl_buriedarea', 'dl_propbypercentout', 'dl_propbybfactor', 'dl_legend', 'dl_disttable'];
|
|
29644
29667
|
|
|
29645
29668
|
for(let i in itemArray) {
|
|
29646
29669
|
let item = itemArray[i];
|
|
@@ -32677,7 +32700,7 @@ class AnnoCddSite {
|
|
|
32677
32700
|
let chnidArray = Object.keys(ic.protein_chainid);
|
|
32678
32701
|
// show conserved domains and binding sites
|
|
32679
32702
|
// live search
|
|
32680
|
-
let url = me.htmlCls.baseUrl + "cdannots/cdannots.fcgi?fmt&frclive&live=lcl&queries=" + chnidBaseArray;
|
|
32703
|
+
let url = me.htmlCls.baseUrl + "cdannots/cdannots.fcgi?fmt&frclive&live=lcl&queries=" + chnidBaseArray;
|
|
32681
32704
|
// precalculated
|
|
32682
32705
|
//let url = me.htmlCls.baseUrl + "cdannots/cdannots.fcgi?fmt&live=lcl&queries=" + chnidBaseArray;
|
|
32683
32706
|
// live search for AlphaFold structures
|
|
@@ -32723,7 +32746,7 @@ class AnnoCddSite {
|
|
|
32723
32746
|
|
|
32724
32747
|
//url = me.htmlCls.baseUrl + "cdannots/cdannots.fcgi?fmt&live=lcl&queries=" + ic.giSeq[chnidArray[0]].join('');
|
|
32725
32748
|
// live searchE
|
|
32726
|
-
url = me.htmlCls.baseUrl + "cdannots/cdannots.fcgi?fmt&frclive&live=lcl&queries=" + seq;
|
|
32749
|
+
url = me.htmlCls.baseUrl + "cdannots/cdannots.fcgi?fmt&frclive&live=lcl&queries=" + seq;
|
|
32727
32750
|
// precalculated
|
|
32728
32751
|
//url = me.htmlCls.baseUrl + "cdannots/cdannots.fcgi?fmt&live=lcl&queries=" + seq;
|
|
32729
32752
|
|
|
@@ -36505,11 +36528,15 @@ class SetSeqAlign {
|
|
|
36505
36528
|
// start and end of MSA
|
|
36506
36529
|
let start_t = 9999, end_t = -1;
|
|
36507
36530
|
|
|
36531
|
+
let baseResi = ic.chainsSeq[chainid1][0].resi - 1;
|
|
36532
|
+
|
|
36508
36533
|
for(let index = 1, indexl = chainidArray.length; index < indexl; ++index) {
|
|
36509
36534
|
let chainIndex = index - 1;
|
|
36535
|
+
if(!ic.qt_start_end[chainIndex]) continue;
|
|
36536
|
+
|
|
36510
36537
|
for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
|
|
36511
36538
|
let start1, end1;
|
|
36512
|
-
if(bRealign) { //
|
|
36539
|
+
if(bRealign) { // real residue numbers are stored
|
|
36513
36540
|
start1 = ic.qt_start_end[chainIndex][i].t_start;
|
|
36514
36541
|
end1 = ic.qt_start_end[chainIndex][i].t_end;
|
|
36515
36542
|
}
|
|
@@ -36517,9 +36544,9 @@ class SetSeqAlign {
|
|
|
36517
36544
|
start1 = ic.qt_start_end[chainIndex][i].t_start - 1;
|
|
36518
36545
|
end1 = ic.qt_start_end[chainIndex][i].t_end - 1;
|
|
36519
36546
|
}
|
|
36520
|
-
|
|
36521
36547
|
for(let j = start1; j <= end1; ++j) {
|
|
36522
|
-
let
|
|
36548
|
+
let resiPos = j - baseResi;
|
|
36549
|
+
let resi = this.getResi(chainidArray[0], resiPos, bRealign);
|
|
36523
36550
|
resi2range_t[resi] = 1;
|
|
36524
36551
|
if(j < start_t) start_t = j;
|
|
36525
36552
|
if(j > end_t) end_t = j;
|
|
@@ -36527,6 +36554,9 @@ class SetSeqAlign {
|
|
|
36527
36554
|
}
|
|
36528
36555
|
}
|
|
36529
36556
|
|
|
36557
|
+
// TM-align should use "start1 = ic.qt_start_end[chainIndex][i].t_start - 1", but the rest are the same as ""bRealign"
|
|
36558
|
+
if(me.cfg.aligntool == 'tmalign') bRealign = true; // real residue numbers are stored
|
|
36559
|
+
|
|
36530
36560
|
let resi2rangeArray = Object.keys(resi2range_t);
|
|
36531
36561
|
resi2rangeArray.sort(function(a, b) {
|
|
36532
36562
|
return parseInt(a) - parseInt(b);
|
|
@@ -36573,7 +36603,7 @@ class SetSeqAlign {
|
|
|
36573
36603
|
for(let j = 0, jl = ic.chainsSeq[chainid1].length; j < jl; ++j) {
|
|
36574
36604
|
let resi = ic.chainsSeq[chainid1][j].resi;
|
|
36575
36605
|
|
|
36576
|
-
if((j < start_t || j > end_t) ) {
|
|
36606
|
+
if((j + baseResi < start_t || j + baseResi > end_t) ) {
|
|
36577
36607
|
continue;
|
|
36578
36608
|
}
|
|
36579
36609
|
|
|
@@ -37811,7 +37841,7 @@ class ParserUtils {
|
|
|
37811
37841
|
if(me.cfg.showanno) {
|
|
37812
37842
|
let cmd = "view annotations";
|
|
37813
37843
|
me.htmlCls.clickMenuCls.setLogCmd(cmd, true);
|
|
37814
|
-
ic.showAnnoCls.showAnnotations();
|
|
37844
|
+
ic.showAnnoCls.showAnnotations();
|
|
37815
37845
|
}
|
|
37816
37846
|
if(me.cfg.closepopup) {
|
|
37817
37847
|
ic.resizeCanvasCls.closeDialogs();
|
|
@@ -38817,9 +38847,11 @@ class ShowAnno {
|
|
|
38817
38847
|
}
|
|
38818
38848
|
|
|
38819
38849
|
let nucleotide_chainid = {}, chemical_chainid = {}, chemical_set = {};
|
|
38820
|
-
ic.protein_chainid = {};
|
|
38850
|
+
//ic.protein_chainid = {};
|
|
38821
38851
|
|
|
38822
38852
|
if(ic.bAnnoShown === undefined || !ic.bAnnoShown || ic.bResetAnno) { // ic.bResetAnno when loading another structure
|
|
38853
|
+
ic.protein_chainid = {};
|
|
38854
|
+
|
|
38823
38855
|
let chainArray = Object.keys(ic.chains);
|
|
38824
38856
|
|
|
38825
38857
|
if(ic.giSeq === undefined) ic.giSeq = {};
|
|
@@ -38860,6 +38892,7 @@ class ShowAnno {
|
|
|
38860
38892
|
chainidBase = chainArray[i];
|
|
38861
38893
|
}
|
|
38862
38894
|
//if(me.cfg.mmdbid !== undefined) { // protein and chemicals/ions are in different chains
|
|
38895
|
+
|
|
38863
38896
|
if(ic.proteins.hasOwnProperty(atom.serial) && ic.chainsSeq[chainArray[i]].length > 1) {
|
|
38864
38897
|
ic.protein_chainid[chainArray[i]] = chainidBase;
|
|
38865
38898
|
}
|
|
@@ -40648,11 +40681,11 @@ class AnnoSnpClinVar {
|
|
|
40648
40681
|
if(ic.deferredClinvar !== undefined) ic.deferredClinvar.resolve();
|
|
40649
40682
|
}
|
|
40650
40683
|
}
|
|
40651
|
-
showClinvarPart2(chnid, chnidBase, gi) { let ic = this.icn3d
|
|
40684
|
+
showClinvarPart2(chnid, chnidBase, gi) { let ic = this.icn3d, me = ic.icn3dui;
|
|
40652
40685
|
let thisClass = this;
|
|
40653
40686
|
//var url = "https://www.ncbi.nlm.nih.gov/projects/SNP/beVarSearch_mt.cgi?appname=iCn3D&format=bed&report=pdb2bed&acc=" + chnidBase;
|
|
40654
40687
|
//var url = "https://www.ncbi.nlm.nih.gov/Structure/icn3d/clinvar.txt";
|
|
40655
|
-
let url =
|
|
40688
|
+
let url = me.htmlCls.baseUrl + "vastdyn/vastdyn.cgi?chainid_clinvar=" + chnidBase;
|
|
40656
40689
|
if(ic.chainsGene[chnid] && ic.chainsGene[chnid].geneSymbol) {
|
|
40657
40690
|
url += "&gene=" + ic.chainsGene[chnid].geneSymbol;
|
|
40658
40691
|
}
|
|
@@ -40687,7 +40720,7 @@ class AnnoSnpClinVar {
|
|
|
40687
40720
|
});
|
|
40688
40721
|
}
|
|
40689
40722
|
|
|
40690
|
-
showSnpPart2(chnid, chnidBase, gi) { let ic = this.icn3d
|
|
40723
|
+
showSnpPart2(chnid, chnidBase, gi) { let ic = this.icn3d, me = ic.icn3dui;
|
|
40691
40724
|
let thisClass = this;
|
|
40692
40725
|
if(gi !== undefined) {
|
|
40693
40726
|
/*
|
|
@@ -40706,7 +40739,7 @@ class AnnoSnpClinVar {
|
|
|
40706
40739
|
} //if(data3 != "") {
|
|
40707
40740
|
else {
|
|
40708
40741
|
*/
|
|
40709
|
-
let url4 =
|
|
40742
|
+
let url4 = me.htmlCls.baseUrl + "vastdyn/vastdyn.cgi?chainid_snp=" + chnidBase;
|
|
40710
40743
|
if(ic.chainsGene[chnid] && ic.chainsGene[chnid].geneSymbol) {
|
|
40711
40744
|
url4 += "&gene=" + ic.chainsGene[chnid].geneSymbol;
|
|
40712
40745
|
}
|
|
@@ -45512,7 +45545,8 @@ class VRButton {
|
|
|
45512
45545
|
button.style.display = '';
|
|
45513
45546
|
|
|
45514
45547
|
button.style.cursor = 'pointer';
|
|
45515
|
-
button.style.left = 'calc(50% - 50px)';
|
|
45548
|
+
//button.style.left = 'calc(50% - 50px)';
|
|
45549
|
+
button.style.left = 'calc(33% - 50px)';
|
|
45516
45550
|
button.style.width = '100px';
|
|
45517
45551
|
|
|
45518
45552
|
button.textContent = 'ENTER VR';
|
|
@@ -45566,7 +45600,7 @@ class VRButton {
|
|
|
45566
45600
|
button.style.display = '';
|
|
45567
45601
|
|
|
45568
45602
|
button.style.cursor = 'auto';
|
|
45569
|
-
button.style.left = 'calc(50% - 75px)';
|
|
45603
|
+
button.style.left = 'calc(33% - 75px)'; //'calc(50% - 75px)';
|
|
45570
45604
|
button.style.width = '150px';
|
|
45571
45605
|
|
|
45572
45606
|
button.onmouseenter = null;
|
|
@@ -45759,7 +45793,8 @@ class ARButton {
|
|
|
45759
45793
|
button.style.display = '';
|
|
45760
45794
|
|
|
45761
45795
|
button.style.cursor = 'pointer';
|
|
45762
|
-
button.style.left = 'calc(50% - 50px)';
|
|
45796
|
+
//button.style.left = 'calc(50% - 50px)';
|
|
45797
|
+
button.style.left = 'calc(66% - 50px)';
|
|
45763
45798
|
button.style.width = '100px';
|
|
45764
45799
|
|
|
45765
45800
|
button.textContent = 'START AR';
|
|
@@ -45807,7 +45842,7 @@ class ARButton {
|
|
|
45807
45842
|
button.style.display = '';
|
|
45808
45843
|
|
|
45809
45844
|
button.style.cursor = 'auto';
|
|
45810
|
-
button.style.left = 'calc(50% - 75px)';
|
|
45845
|
+
button.style.left = 'calc(66% - 50px)'; //'calc(50% - 75px)';
|
|
45811
45846
|
button.style.width = '150px';
|
|
45812
45847
|
|
|
45813
45848
|
button.onmouseenter = null;
|
|
@@ -45904,7 +45939,7 @@ class ARButton {
|
|
|
45904
45939
|
|
|
45905
45940
|
}
|
|
45906
45941
|
|
|
45907
|
-
message.style.left = 'calc(50% - 90px)';
|
|
45942
|
+
message.style.left = 'calc(66% - 90px)'; //'calc(50% - 90px)';
|
|
45908
45943
|
message.style.width = '180px';
|
|
45909
45944
|
message.style.textDecoration = 'none';
|
|
45910
45945
|
|
|
@@ -54286,9 +54321,17 @@ class ClickMenu {
|
|
|
54286
54321
|
// },
|
|
54287
54322
|
// clkMn1_chainalign: function() {
|
|
54288
54323
|
me.myEventCls.onIds("#" + me.pre + "mn1_chainalign", "click", function(e) { me.icn3d;
|
|
54289
|
-
me.htmlCls.dialogCls.openDlg('dl_chainalign', 'Align multiple chains
|
|
54324
|
+
me.htmlCls.dialogCls.openDlg('dl_chainalign', 'Align multiple chains by structure alignment');
|
|
54290
54325
|
});
|
|
54291
54326
|
|
|
54327
|
+
me.myEventCls.onIds("#" + me.pre + "mn1_chainalign2", "click", function(e) { me.icn3d;
|
|
54328
|
+
me.htmlCls.dialogCls.openDlg('dl_chainalign2', 'Align multiple chains by sequence alignment');
|
|
54329
|
+
});
|
|
54330
|
+
|
|
54331
|
+
me.myEventCls.onIds("#" + me.pre + "mn1_chainalign3", "click", function(e) { me.icn3d;
|
|
54332
|
+
me.htmlCls.dialogCls.openDlg('dl_chainalign3', 'Align multiple chains residue by residue');
|
|
54333
|
+
});
|
|
54334
|
+
|
|
54292
54335
|
me.myEventCls.onIds("#" + me.pre + "mn1_mutation", "click", function(e) { me.icn3d;
|
|
54293
54336
|
me.htmlCls.dialogCls.openDlg('dl_mutation', 'Show the mutations in 3D');
|
|
54294
54337
|
});
|
|
@@ -54467,6 +54510,12 @@ class ClickMenu {
|
|
|
54467
54510
|
thisClass.setLogCmd("export pqr", true);
|
|
54468
54511
|
});
|
|
54469
54512
|
|
|
54513
|
+
me.myEventCls.onIds(["#" + me.pre + "delphipdbh", "#" + me.pre + "phipqr", "#" + me.pre + "phiurlpqr"], "click", function(e) { me.icn3d;
|
|
54514
|
+
let bPdb = true;
|
|
54515
|
+
me.htmlCls.setHtmlCls.exportPqr(bPdb);
|
|
54516
|
+
thisClass.setLogCmd("export pdbh", false);
|
|
54517
|
+
});
|
|
54518
|
+
|
|
54470
54519
|
// clkMn1_exportStl: function() {
|
|
54471
54520
|
me.myEventCls.onIds("#" + me.pre + "mn1_exportStl", "click", function(e) { let ic = me.icn3d;
|
|
54472
54521
|
thisClass.setLogCmd("export stl file", false);
|
|
@@ -56881,15 +56930,22 @@ class SetMenu {
|
|
|
56881
56930
|
html += "</li>";
|
|
56882
56931
|
html += "<li><span>Align</span>";
|
|
56883
56932
|
html += "<ul>";
|
|
56884
|
-
|
|
56885
|
-
|
|
56933
|
+
|
|
56934
|
+
html += "<li><span>Multiple Chains</span>";
|
|
56935
|
+
html += "<ul>";
|
|
56936
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn1_chainalignRad', 'mn1_chainalign', 'by Structure Alignment ' + me.htmlCls.wifiStr);
|
|
56937
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn1_chainalignRad', 'mn1_chainalign2', 'by Sequence Alignment ' + me.htmlCls.wifiStr);
|
|
56938
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn1_chainalignRad', 'mn1_chainalign3', 'Residue by Residue');
|
|
56939
|
+
html += "</ul>";
|
|
56940
|
+
html += "</li>";
|
|
56941
|
+
|
|
56886
56942
|
html += "<li><span>Structure to Structure</span>";
|
|
56887
56943
|
html += "<ul>";
|
|
56888
56944
|
html += me.htmlCls.setHtmlCls.getLink('mn1_align', 'Two PDB Structures ' + me.htmlCls.wifiStr);
|
|
56889
56945
|
html += me.htmlCls.setHtmlCls.getLink('mn1_alignaf', 'Two AlphaFold Structures ' + me.htmlCls.wifiStr);
|
|
56890
56946
|
html += "</ul>";
|
|
56891
56947
|
|
|
56892
|
-
html += me.htmlCls.setHtmlCls.getLink('
|
|
56948
|
+
html += me.htmlCls.setHtmlCls.getLink('mn1_blast_rep_id', 'Sequence to Structure');
|
|
56893
56949
|
|
|
56894
56950
|
html += "</ul>";
|
|
56895
56951
|
html += "</li>";
|
|
@@ -56965,6 +57021,7 @@ class SetMenu {
|
|
|
56965
57021
|
*/
|
|
56966
57022
|
|
|
56967
57023
|
html += me.htmlCls.setHtmlCls.getLink('mn1_exportPdbRes', 'PDB');
|
|
57024
|
+
html += me.htmlCls.setHtmlCls.getLink('delphipdbh', 'PDB with Hydrogens');
|
|
56968
57025
|
|
|
56969
57026
|
if(me.cfg.cid === undefined) {
|
|
56970
57027
|
html += me.htmlCls.setHtmlCls.getLink('mn1_exportSecondary', 'Secondary Structure');
|
|
@@ -59002,18 +59059,36 @@ class SetDialog {
|
|
|
59002
59059
|
html += "<div style='width:550px'>";
|
|
59003
59060
|
html += "All chains will be aligned to the first chain in the comma-separated chain IDs. Each chain ID has the form of PDBID_chain (e.g., 1HHO_A, case sensitive) or UniprotID (e.g., P69905 for AlphaFold structures).<br/><br/>";
|
|
59004
59061
|
html += "<b>Chain IDs</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "chainalignids' value='P69905,P01942,1HHO_A' size=50><br/><br/>";
|
|
59005
|
-
html += "
|
|
59006
|
-
|
|
59007
|
-
html += "
|
|
59008
|
-
|
|
59009
|
-
|
|
59062
|
+
html += me.htmlCls.buttonStr + "reload_chainalign_tmalign'><b>Align with TM-align</b></button>" + me.htmlCls.buttonStr + "reload_chainalign_asym' style='margin-left:30px'><b>Align with VAST</b></button><br/><br/>";
|
|
59063
|
+
|
|
59064
|
+
html += "(Note: To align chains in custom PDB files, you could load them in \"File > Open File > PDB Files (appendable)\" and click \"Analysis > Defined Sets\". Finally select multiple chains in Defined Sets and click \"File > Realign Selection\".)<br><br>";
|
|
59065
|
+
html += "</div></div>";
|
|
59066
|
+
|
|
59067
|
+
html += me.htmlCls.divStr + "dl_chainalign2' class='" + dialogClass + "'>";
|
|
59068
|
+
html += "<div style='width:550px'>";
|
|
59069
|
+
html += "All chains will be aligned to the first chain in the comma-separated chain IDs. Each chain ID has the form of PDBID_chain (e.g., 1HHO_A, case sensitive) or UniprotID (e.g., P69905 for AlphaFold structures).<br/><br/>";
|
|
59070
|
+
html += "<b>Chain IDs</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "chainalignids2' value='P69905,P01942,1HHO_A' size=50><br/><br/>";
|
|
59071
|
+
|
|
59072
|
+
html += "The sequence alignment (followed by structure alignemnt) is based on residue numbers in the First/Master chain: <br>" + me.htmlCls.inputTextStr + "id='" + me.pre + "resalignids' value='1,5,10-50' size=50><br/>";
|
|
59073
|
+
html += me.htmlCls.buttonStr + "reload_chainalign_asym2' style='margin-top:3px;'><b>Align by Sequence Alignment</b></button><br/><br/>";
|
|
59074
|
+
|
|
59075
|
+
html += "(Note: To align chains in custom PDB files, you could load them in \"File > Open File > PDB Files (appendable)\" and click \"Analysis > Defined Sets\". Finally select multiple chains in Defined Sets and click \"File > Realign Selection\".)<br><br>";
|
|
59076
|
+
html += "</div></div>";
|
|
59077
|
+
|
|
59078
|
+
html += me.htmlCls.divStr + "dl_chainalign3' class='" + dialogClass + "'>";
|
|
59079
|
+
html += "<div style='width:550px'>";
|
|
59080
|
+
html += "All chains will be aligned to the first chain in the comma-separated chain IDs. Each chain ID has the form of PDBID_chain (e.g., 1HHO_A, case sensitive) or UniprotID (e.g., P69905 for AlphaFold structures).<br/><br/>";
|
|
59081
|
+
html += "<b>Chain IDs</b>: " + me.htmlCls.inputTextStr + "id='" + me.pre + "chainalignids3' value='P69905,P01942,1HHO_A' size=50><br/><br/>";
|
|
59082
|
+
|
|
59083
|
+
html += "Each alignment is defined as \" | \"-separated residue lists in one line. \"10-50\" means a range of residues from 10 to 50.<br><textarea id='" + me.pre + "predefinedres' rows='5' style='width: 100%; height: " +(me.htmlCls.LOG_HEIGHT) + "px; padding: 0px; border: 0px;'>1,5,10-50 | 1,5,10-50 \n2,6,11-51 | 1,5,10-50</textarea><br/>";
|
|
59084
|
+
html += me.htmlCls.buttonStr + "reload_chainalign_asym3'><b>Align Residue by Residue</b></button><br/><br/>";
|
|
59010
59085
|
|
|
59011
59086
|
html += "(Note: To align chains in custom PDB files, you could load them in \"File > Open File > PDB Files (appendable)\" and click \"Analysis > Defined Sets\". Finally select multiple chains in Defined Sets and click \"File > Realign Selection\".)<br><br>";
|
|
59012
59087
|
html += "</div></div>";
|
|
59013
59088
|
|
|
59014
59089
|
html += me.htmlCls.divStr + "dl_mutation' class='" + dialogClass + "'>";
|
|
59015
59090
|
html += "<div style='width:500px'>";
|
|
59016
|
-
html += 'Please specify the mutations with a comma separated mutation list. Each mutation can be specified as "[PDB ID]_[Chain ID]_[Residue Number]_[One Letter Mutatnt Residue]". E.g., the mutation of N501Y in the E chain of PDB 6M0J can be specified as "6M0J_E_501_Y".
|
|
59091
|
+
html += 'Please specify the mutations with a comma separated mutation list. Each mutation can be specified as "[PDB ID or AlphaFold UniProt ID]_[Chain ID]_[Residue Number]_[One Letter Mutatnt Residue]". E.g., the mutation of N501Y in the E chain of PDB 6M0J can be specified as "6M0J_E_501_Y". For AlphaFold structures, the "Chain ID" is "A".<br/><br/>';
|
|
59017
59092
|
html += "<div style='display:inline-block; width:110px'>Mutations: </div>" + me.htmlCls.inputTextStr + "id='" + me.pre + "mutationids' value='6M0J_E_484_K,6M0J_E_501_Y,6M0J_E_417_N' size=50><br/><br/>";
|
|
59018
59093
|
|
|
59019
59094
|
html += "<b>Data Source</b>: <select id='" + me.pre + "idsource'>";
|
|
@@ -59997,7 +60072,7 @@ class Events {
|
|
|
59997
60072
|
|
|
59998
60073
|
saveHtml(id) { let me = this.icn3dui, ic = me.icn3d;
|
|
59999
60074
|
let html = '';
|
|
60000
|
-
html += '<link rel="stylesheet" href="https:///structure.ncbi.nlm.nih.gov/icn3d/lib/jquery-ui-1.
|
|
60075
|
+
html += '<link rel="stylesheet" href="https:///structure.ncbi.nlm.nih.gov/icn3d/lib/jquery-ui-1.13.2.min.css">\n';
|
|
60001
60076
|
html += '<link rel="stylesheet" href="https:///structure.ncbi.nlm.nih.gov/icn3d/icn3d_full_ui.css">\n';
|
|
60002
60077
|
html += $("#" + id).html();
|
|
60003
60078
|
let idArray = id.split('_');
|
|
@@ -60007,24 +60082,6 @@ class Events {
|
|
|
60007
60082
|
ic.saveFileCls.saveFile(structureStr + '-' + idStr + '.html', 'html', encodeURIComponent(html));
|
|
60008
60083
|
}
|
|
60009
60084
|
|
|
60010
|
-
getAlignParas() { let me = this.icn3dui; me.icn3d;
|
|
60011
|
-
let alignment = $("#" + me.pre + "chainalignids").val();
|
|
60012
|
-
let idArray = alignment.split(',');
|
|
60013
|
-
let alignment_final = '';
|
|
60014
|
-
for(let i = 0, il = idArray.length; i < il; ++i) {
|
|
60015
|
-
alignment_final += (idArray[i].indexOf('_') != -1) ? idArray[i] : idArray[i] + '_A'; // AlphaFold ID
|
|
60016
|
-
if(i < il - 1) alignment_final += ',';
|
|
60017
|
-
}
|
|
60018
|
-
let resalign = $("#" + me.pre + "resalignids").val();
|
|
60019
|
-
let predefinedres = $("#" + me.pre + "predefinedres").val().trim().replace(/\n/g, '; ');
|
|
60020
|
-
if(predefinedres && alignment_final.split(',').length - 1 != predefinedres.split('; ').length) {
|
|
60021
|
-
alert("Please make sure the number of chains and the lines of predefined residues are the same...");
|
|
60022
|
-
return;
|
|
60023
|
-
}
|
|
60024
|
-
|
|
60025
|
-
return {"alignment": alignment_final, "resalign": resalign, "predefinedres": predefinedres};
|
|
60026
|
-
}
|
|
60027
|
-
|
|
60028
60085
|
//Hold all functions related to click events.
|
|
60029
60086
|
allEventFunctions() { let me = this.icn3dui, ic = me.icn3d;
|
|
60030
60087
|
let thisClass = this;
|
|
@@ -60181,6 +60238,8 @@ class Events {
|
|
|
60181
60238
|
// },
|
|
60182
60239
|
// clickRealignonseqalign: function() {
|
|
60183
60240
|
me.myEventCls.onIds("#" + me.pre + "mn2_realignonseqalign", "click", function(e) { let ic = me.icn3d;
|
|
60241
|
+
if(ic.bRender) me.htmlCls.dialogCls.openDlg('dl_realign', 'Please select two sets to realign');
|
|
60242
|
+
|
|
60184
60243
|
if(Object.keys(ic.structures).length < 2) {
|
|
60185
60244
|
alert("At least two structuresare required for alignment...");
|
|
60186
60245
|
return;
|
|
@@ -60196,15 +60255,14 @@ class Events {
|
|
|
60196
60255
|
if($("#" + me.pre + "atomsCustomRealign").length) {
|
|
60197
60256
|
$("#" + me.pre + "atomsCustomRealign").html(definedAtomsHtml);
|
|
60198
60257
|
}
|
|
60199
|
-
|
|
60200
|
-
// $("#" + me.pre + "atomsCustomRealign2").html(definedAtomsHtml);
|
|
60201
|
-
//}
|
|
60202
|
-
if(ic.bRender) me.htmlCls.dialogCls.openDlg('dl_realign', 'Please select two sets to realign');
|
|
60258
|
+
|
|
60203
60259
|
$("#" + me.pre + "atomsCustomRealign").resizable();
|
|
60204
60260
|
//$("#" + me.pre + "atomsCustomRealign2").resizable();
|
|
60205
60261
|
});
|
|
60206
60262
|
|
|
60207
60263
|
me.myEventCls.onIds("#" + me.pre + "mn2_realignonstruct", "click", function(e) { let ic = me.icn3d;
|
|
60264
|
+
if(ic.bRender) me.htmlCls.dialogCls.openDlg('dl_realignbystruct', 'Please select two sets to realign');
|
|
60265
|
+
|
|
60208
60266
|
if(Object.keys(ic.structures).length < 2) {
|
|
60209
60267
|
alert("At least two structuresare required for alignment...");
|
|
60210
60268
|
return;
|
|
@@ -60219,10 +60277,7 @@ class Events {
|
|
|
60219
60277
|
if($("#" + me.pre + "atomsCustomRealignByStruct").length) {
|
|
60220
60278
|
$("#" + me.pre + "atomsCustomRealignByStruct").html(definedAtomsHtml);
|
|
60221
60279
|
}
|
|
60222
|
-
|
|
60223
|
-
// $("#" + me.pre + "atomsCustomRealign2").html(definedAtomsHtml);
|
|
60224
|
-
//}
|
|
60225
|
-
if(ic.bRender) me.htmlCls.dialogCls.openDlg('dl_realignbystruct', 'Please select two sets to realign');
|
|
60280
|
+
|
|
60226
60281
|
$("#" + me.pre + "atomsCustomRealignByStruct").resizable();
|
|
60227
60282
|
//$("#" + me.pre + "atomsCustomRealign2").resizable();
|
|
60228
60283
|
});
|
|
@@ -60531,34 +60586,99 @@ class Events {
|
|
|
60531
60586
|
});
|
|
60532
60587
|
// },
|
|
60533
60588
|
// clickReload_chainalign: function() {
|
|
60534
|
-
|
|
60589
|
+
/*
|
|
60590
|
+
me.myEventCls.onIds("#" + me.pre + "reload_chainalign", "click", function(e) { let ic = me.icn3d;
|
|
60535
60591
|
e.preventDefault();
|
|
60536
60592
|
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
60537
60593
|
|
|
60538
|
-
let
|
|
60594
|
+
let alignment = $("#" + me.pre + "chainalignids").val();
|
|
60595
|
+
let idArray = alignment.split(',');
|
|
60596
|
+
let alignment_final = '';
|
|
60597
|
+
for(let i = 0, il = idArray.length; i < il; ++i) {
|
|
60598
|
+
alignment_final += (idArray[i].indexOf('_') != -1) ? idArray[i] : idArray[i] + '_A'; // AlphaFold ID
|
|
60599
|
+
if(i < il - 1) alignment_final += ',';
|
|
60600
|
+
}
|
|
60601
|
+
let resalign = $("#" + me.pre + "resalignids").val();
|
|
60602
|
+
let predefinedres = $("#" + me.pre + "predefinedres").val().trim().replace(/\n/g, '; ');
|
|
60603
|
+
if(predefinedres && alignment_final.split(',').length - 1 != predefinedres.split('; ').length) {
|
|
60604
|
+
alert("Please make sure the number of chains and the lines of predefined residues are the same...");
|
|
60605
|
+
return;
|
|
60606
|
+
}
|
|
60539
60607
|
|
|
60540
|
-
me.htmlCls.clickMenuCls.setLogCmd("load chains " +
|
|
60541
|
-
window.open(hostUrl + '?chainalign=' +
|
|
60608
|
+
me.htmlCls.clickMenuCls.setLogCmd("load chains " + alignment_final + " | residues " + resalign + " | resdef " + predefinedres, false);
|
|
60609
|
+
window.open(hostUrl + '?chainalign=' + alignment_final + '&resnum=' + resalign + '&resdef=' + predefinedres + '&showalignseq=1', '_blank');
|
|
60542
60610
|
});
|
|
60611
|
+
*/
|
|
60543
60612
|
|
|
60544
60613
|
me.myEventCls.onIds("#" + me.pre + "reload_chainalign_asym", "click", function(e) { me.icn3d;
|
|
60545
60614
|
e.preventDefault();
|
|
60546
60615
|
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
60547
60616
|
|
|
60548
|
-
let
|
|
60617
|
+
let alignment = $("#" + me.pre + "chainalignids").val();
|
|
60618
|
+
let idArray = alignment.split(',');
|
|
60619
|
+
let alignment_final = '';
|
|
60620
|
+
for(let i = 0, il = idArray.length; i < il; ++i) {
|
|
60621
|
+
alignment_final += (idArray[i].indexOf('_') != -1) ? idArray[i] : idArray[i] + '_A'; // AlphaFold ID
|
|
60622
|
+
if(i < il - 1) alignment_final += ',';
|
|
60623
|
+
}
|
|
60549
60624
|
|
|
60550
|
-
me.htmlCls.clickMenuCls.setLogCmd("load chains " +
|
|
60551
|
-
window.open(hostUrl + '?chainalign=' +
|
|
60625
|
+
me.htmlCls.clickMenuCls.setLogCmd("load chains " + alignment_final + " on asymmetric unit | residues | resdef ", false);
|
|
60626
|
+
window.open(hostUrl + '?chainalign=' + alignment_final + '&resnum=&resdef=&showalignseq=1&bu=0', '_blank');
|
|
60552
60627
|
});
|
|
60553
60628
|
|
|
60629
|
+
me.myEventCls.onIds("#" + me.pre + "reload_chainalign_asym2", "click", function(e) { me.icn3d;
|
|
60630
|
+
e.preventDefault();
|
|
60631
|
+
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
60632
|
+
|
|
60633
|
+
let alignment = $("#" + me.pre + "chainalignids2").val();
|
|
60634
|
+
let idArray = alignment.split(',');
|
|
60635
|
+
let alignment_final = '';
|
|
60636
|
+
for(let i = 0, il = idArray.length; i < il; ++i) {
|
|
60637
|
+
alignment_final += (idArray[i].indexOf('_') != -1) ? idArray[i] : idArray[i] + '_A'; // AlphaFold ID
|
|
60638
|
+
if(i < il - 1) alignment_final += ',';
|
|
60639
|
+
}
|
|
60640
|
+
let resalign = $("#" + me.pre + "resalignids").val();
|
|
60641
|
+
|
|
60642
|
+
me.htmlCls.clickMenuCls.setLogCmd("load chains " + alignment_final + " on asymmetric unit | residues " + resalign + " | resdef ", false);
|
|
60643
|
+
window.open(hostUrl + '?chainalign=' + alignment_final + '&resnum=' + resalign + '&resdef=&showalignseq=1&bu=0', '_blank');
|
|
60644
|
+
});
|
|
60645
|
+
|
|
60646
|
+
me.myEventCls.onIds("#" + me.pre + "reload_chainalign_asym3", "click", function(e) { me.icn3d;
|
|
60647
|
+
e.preventDefault();
|
|
60648
|
+
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
60649
|
+
|
|
60650
|
+
let alignment = $("#" + me.pre + "chainalignids3").val();
|
|
60651
|
+
let idArray = alignment.split(',');
|
|
60652
|
+
let alignment_final = '';
|
|
60653
|
+
for(let i = 0, il = idArray.length; i < il; ++i) {
|
|
60654
|
+
alignment_final += (idArray[i].indexOf('_') != -1) ? idArray[i] : idArray[i] + '_A'; // AlphaFold ID
|
|
60655
|
+
if(i < il - 1) alignment_final += ',';
|
|
60656
|
+
}
|
|
60657
|
+
|
|
60658
|
+
let predefinedres = $("#" + me.pre + "predefinedres").val().trim().replace(/\n/g, '; ');
|
|
60659
|
+
if(predefinedres && alignment_final.split(',').length - 1 != predefinedres.split('; ').length) {
|
|
60660
|
+
alert("Please make sure the number of chains and the lines of predefined residues are the same...");
|
|
60661
|
+
return;
|
|
60662
|
+
}
|
|
60663
|
+
|
|
60664
|
+
me.htmlCls.clickMenuCls.setLogCmd("load chains " + alignment_final + " on asymmetric unit | residues | resdef " + predefinedres, false);
|
|
60665
|
+
window.open(hostUrl + '?chainalign=' + alignment_final + '&resnum=&resdef=' + predefinedres + '&showalignseq=1&bu=0', '_blank');
|
|
60666
|
+
});
|
|
60667
|
+
|
|
60554
60668
|
me.myEventCls.onIds("#" + me.pre + "reload_chainalign_tmalign", "click", function(e) { me.icn3d;
|
|
60555
60669
|
e.preventDefault();
|
|
60556
60670
|
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
60557
60671
|
|
|
60558
|
-
let
|
|
60672
|
+
let alignment = $("#" + me.pre + "chainalignids").val();
|
|
60673
|
+
let idArray = alignment.split(',');
|
|
60674
|
+
let alignment_final = '';
|
|
60675
|
+
for(let i = 0, il = idArray.length; i < il; ++i) {
|
|
60676
|
+
alignment_final += (idArray[i].indexOf('_') != -1) ? idArray[i] : idArray[i] + '_A'; // AlphaFold ID
|
|
60677
|
+
if(i < il - 1) alignment_final += ',';
|
|
60678
|
+
}
|
|
60559
60679
|
|
|
60560
|
-
me.htmlCls.clickMenuCls.setLogCmd("load chains " +
|
|
60561
|
-
window.open(hostUrl + '?chainalign=' +
|
|
60680
|
+
me.htmlCls.clickMenuCls.setLogCmd("load chains " + alignment_final + " on asymmetric unit | residues | resdef | align tmalign", false);
|
|
60681
|
+
window.open(hostUrl + '?chainalign=' + alignment_final + '&aligntool=tmalign&resnum=&resdef=&showalignseq=1&bu=0', '_blank');
|
|
60562
60682
|
});
|
|
60563
60683
|
|
|
60564
60684
|
me.myEventCls.onIds("#" + me.pre + "reload_mutation_3d", "click", function(e) { me.icn3d;
|
|
@@ -61665,6 +61785,27 @@ class Events {
|
|
|
61665
61785
|
let color = $("#" + me.pre + "colorcustom").val();
|
|
61666
61786
|
picker.set('#' + color).enter();
|
|
61667
61787
|
});
|
|
61788
|
+
|
|
61789
|
+
let picker2 = new CP(document.querySelector("#" + me.pre + "labelcolorall"));
|
|
61790
|
+
picker2.on("change", function(color) {
|
|
61791
|
+
this.target.value = color;
|
|
61792
|
+
});
|
|
61793
|
+
me.myEventCls.onIds("#" + me.pre + "labelcolorall", "input", function() {
|
|
61794
|
+
let color = $("#" + me.pre + "labelcolorall").val();
|
|
61795
|
+
picker2.set('#' + color).enter();
|
|
61796
|
+
});
|
|
61797
|
+
me.myEventCls.onIds("#" + me.pre + "labelcolorall", "keyup", function() {
|
|
61798
|
+
let color = $("#" + me.pre + "labelcolorall").val();
|
|
61799
|
+
picker2.set('#' + color).enter();
|
|
61800
|
+
});
|
|
61801
|
+
me.myEventCls.onIds("#" + me.pre + "labelcolorall", "paste", function() {
|
|
61802
|
+
let color = $("#" + me.pre + "labelcolorall").val();
|
|
61803
|
+
picker2.set('#' + color).enter();
|
|
61804
|
+
});
|
|
61805
|
+
me.myEventCls.onIds("#" + me.pre + "labelcolorall", "cut", function() {
|
|
61806
|
+
let color = $("#" + me.pre + "labelcolorall").val();
|
|
61807
|
+
picker2.set('#' + color).enter();
|
|
61808
|
+
});
|
|
61668
61809
|
// },
|
|
61669
61810
|
// clickApplypick_stabilizer_rm: function() {
|
|
61670
61811
|
me.myEventCls.onIds("#" + me.pre + "applypick_stabilizer_rm", "click", function(e) { let ic = me.icn3d;
|
|
@@ -62939,7 +63080,7 @@ class SetHtml {
|
|
|
62939
63080
|
return html;
|
|
62940
63081
|
}
|
|
62941
63082
|
|
|
62942
|
-
exportPqr() { let me = this.icn3dui, ic = me.icn3d;
|
|
63083
|
+
exportPqr(bPdb) { let me = this.icn3dui, ic = me.icn3d;
|
|
62943
63084
|
let ionHash = {};
|
|
62944
63085
|
let atomHash = {};
|
|
62945
63086
|
/*
|
|
@@ -62971,13 +63112,15 @@ class SetHtml {
|
|
|
62971
63112
|
}
|
|
62972
63113
|
}
|
|
62973
63114
|
|
|
63115
|
+
let fileExt = (bPdb) ? 'pdb' : 'pqr';
|
|
62974
63116
|
if(me.cfg.cid) {
|
|
62975
63117
|
let pqrStr = '';
|
|
62976
63118
|
/// pqrStr += ic.saveFileCls.getPDBHeader();
|
|
62977
|
-
|
|
63119
|
+
let bPqr = (bPdb) ? false : true;
|
|
63120
|
+
pqrStr += ic.saveFileCls.getAtomPDB(atomHash, bPqr) + ic.saveFileCls.getAtomPDB(ionHash, bPqr);
|
|
62978
63121
|
|
|
62979
63122
|
let file_pref =(ic.inputid) ? ic.inputid : "custom";
|
|
62980
|
-
ic.saveFileCls.saveFile(file_pref + '_icn3d.
|
|
63123
|
+
ic.saveFileCls.saveFile(file_pref + '_icn3d.' + fileExt, 'text', [pqrStr]);
|
|
62981
63124
|
}
|
|
62982
63125
|
else {
|
|
62983
63126
|
let bCalphaOnly = me.utilsCls.isCalphaPhosOnly(me.hashUtilsCls.hash2Atoms(atomHash, ic.atoms));
|
|
@@ -63013,8 +63156,40 @@ class SetHtml {
|
|
|
63013
63156
|
success: function(data) {
|
|
63014
63157
|
let pqrStr = data;
|
|
63015
63158
|
|
|
63159
|
+
if(bPdb) {
|
|
63160
|
+
let lineArray = pqrStr.split('\n');
|
|
63161
|
+
|
|
63162
|
+
let pdbStr = '';
|
|
63163
|
+
for(let i = 0, il = lineArray.length; i < il; ++i) {
|
|
63164
|
+
let line = lineArray[i];
|
|
63165
|
+
if(line.substr(0, 6) == 'ATOM ' || line.substr(0, 6) == 'HETATM') {
|
|
63166
|
+
let atomName = line.substr(12, 4).trim();
|
|
63167
|
+
let elem;
|
|
63168
|
+
if(line.substr(0, 6) == 'ATOM ') {
|
|
63169
|
+
elem = atomName.substr(0, 1);
|
|
63170
|
+
}
|
|
63171
|
+
else {
|
|
63172
|
+
let twochar = atomName.substr(0, 2);
|
|
63173
|
+
if(me.parasCls.vdwRadii.hasOwnProperty(twochar)) {
|
|
63174
|
+
elem = twochar;
|
|
63175
|
+
}
|
|
63176
|
+
else {
|
|
63177
|
+
elem = atomName.substr(0, 1);
|
|
63178
|
+
}
|
|
63179
|
+
}
|
|
63180
|
+
|
|
63181
|
+
pdbStr += line.substr(0, 54) + ' ' + elem.padStart(2, ' ') + '\n';
|
|
63182
|
+
}
|
|
63183
|
+
else {
|
|
63184
|
+
pdbStr += line + '\n';
|
|
63185
|
+
}
|
|
63186
|
+
}
|
|
63187
|
+
|
|
63188
|
+
pqrStr = pdbStr;
|
|
63189
|
+
}
|
|
63190
|
+
|
|
63016
63191
|
let file_pref =(ic.inputid) ? ic.inputid : "custom";
|
|
63017
|
-
ic.saveFileCls.saveFile(file_pref + '_icn3d_residues.
|
|
63192
|
+
ic.saveFileCls.saveFile(file_pref + '_icn3d_residues.' + fileExt, 'text', [pqrStr]);
|
|
63018
63193
|
},
|
|
63019
63194
|
error : function(xhr, textStatus, errorThrown ) {
|
|
63020
63195
|
this.tryCount++;
|
|
@@ -63379,7 +63554,8 @@ class Html {
|
|
|
63379
63554
|
this.simulation = undefined;
|
|
63380
63555
|
|
|
63381
63556
|
//this.baseUrl = "https://structure.ncbi.nlm.nih.gov/";
|
|
63382
|
-
this.baseUrl =
|
|
63557
|
+
this.baseUrl = (window && window.location && window.location.hostname == 'structure.ncbi.nlm.nih.gov')
|
|
63558
|
+
? "https://structure.ncbi.nlm.nih.gov/Structure/" : "https://www.ncbi.nlm.nih.gov/Structure/";
|
|
63383
63559
|
this.divStr = "<div id='" + this.icn3dui.pre;
|
|
63384
63560
|
this.divNowrapStr = "<div style='white-space:nowrap'>";
|
|
63385
63561
|
this.spanNowrapStr = "<span style='white-space:nowrap'>";
|
|
@@ -66867,7 +67043,7 @@ class iCn3DUI {
|
|
|
66867
67043
|
//even when multiple iCn3D viewers are shown together.
|
|
66868
67044
|
this.pre = this.cfg.divid + "_";
|
|
66869
67045
|
|
|
66870
|
-
this.REVISION = '3.13.
|
|
67046
|
+
this.REVISION = '3.13.2';
|
|
66871
67047
|
|
|
66872
67048
|
// In nodejs, iCn3D defines "window = {navigator: {}}"
|
|
66873
67049
|
this.bNode = (Object.keys(window).length < 2) ? true : false;
|