icn3d 3.25.13 → 3.25.14
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 +229 -121
- package/icn3d.min.js +2 -2
- package/icn3d.module.js +229 -121
- package/package.json +1 -1
package/icn3d.js
CHANGED
|
@@ -32163,7 +32163,7 @@ class Alternate {
|
|
|
32163
32163
|
|
|
32164
32164
|
ic.dAtoms = {};
|
|
32165
32165
|
|
|
32166
|
-
let bMutation = moleculeArray.length == 2 && moleculeArray[1].replace(moleculeArray[0], '') == '2';
|
|
32166
|
+
let bMutation = ic.bScap; //moleculeArray.length == 2 && moleculeArray[1].replace(moleculeArray[0], '') == '2';
|
|
32167
32167
|
|
|
32168
32168
|
for(let i = 0, il = moleculeArray.length; i < il; ++i) {
|
|
32169
32169
|
let structure = moleculeArray[i];
|
|
@@ -35792,7 +35792,12 @@ class AnnoCddSite {
|
|
|
35792
35792
|
|| (Object.keys(ic.structures).length == 2 && me.cfg.align) ) {
|
|
35793
35793
|
let data = {};
|
|
35794
35794
|
try {
|
|
35795
|
-
|
|
35795
|
+
if(me.bNode) {
|
|
35796
|
+
data = await me.getAjaxPromise(url, 'jsonp');
|
|
35797
|
+
}
|
|
35798
|
+
else {
|
|
35799
|
+
data.value = await me.getAjaxPromise(url, 'jsonp');
|
|
35800
|
+
}
|
|
35796
35801
|
|
|
35797
35802
|
thisClass.parseCddData([data], chnidArray);
|
|
35798
35803
|
/// if(ic.deferredAnnoCddSite !== undefined) ic.deferredAnnoCddSite.resolve();
|
|
@@ -35850,7 +35855,9 @@ class AnnoCddSite {
|
|
|
35850
35855
|
|
|
35851
35856
|
for(let i = 0, il = dataArray.length; i < il; ++i) {
|
|
35852
35857
|
//let data = (bSeq) ? dataArray[i][0] : dataArray[i];
|
|
35853
|
-
let data = dataArray[i].value;
|
|
35858
|
+
let data = (me.bNode) ? dataArray[i] : dataArray[i].value;
|
|
35859
|
+
|
|
35860
|
+
if(!data) continue;
|
|
35854
35861
|
|
|
35855
35862
|
for(let chainI = 0, chainLen = data.data.length; chainI < chainLen; ++chainI) {
|
|
35856
35863
|
let cddData = data.data[chainI];
|
|
@@ -38592,49 +38599,48 @@ class Domain3d {
|
|
|
38592
38599
|
let residueArray = Object.keys(residueHash);
|
|
38593
38600
|
let chnid = residueArray[0].substr(0, residueArray[0].lastIndexOf('_'));
|
|
38594
38601
|
|
|
38602
|
+
if(!ic.posid2resid) ic.posid2resid = {};
|
|
38603
|
+
|
|
38595
38604
|
let substructItem = {};
|
|
38596
38605
|
let pos2resi = {};
|
|
38597
38606
|
for(let i = 0; i < residueArray.length; ++i) {
|
|
38598
38607
|
let resid = residueArray[i];
|
|
38599
38608
|
|
|
38600
38609
|
let resi = resid.substr(resid.lastIndexOf('_') + 1);
|
|
38601
|
-
/*
|
|
38602
|
-
if(i == 0) {
|
|
38603
|
-
resiOffset = resi - 1;
|
|
38604
|
-
|
|
38605
|
-
for(let j = 0; j < resiOffset; ++j) {
|
|
38606
|
-
x0.push(undefined);
|
|
38607
|
-
y0.push(undefined);
|
|
38608
|
-
z0.push(undefined);
|
|
38609
|
-
}
|
|
38610
|
-
}
|
|
38611
|
-
*/
|
|
38612
38610
|
|
|
38613
38611
|
//let resid = chnid + "_" + resi;
|
|
38614
38612
|
let atom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[resid]);
|
|
38615
38613
|
|
|
38616
|
-
if(!atom) continue;
|
|
38617
|
-
/*
|
|
38618
38614
|
if(atom) {
|
|
38619
38615
|
x0.push(atom.coord.x);
|
|
38620
38616
|
y0.push(atom.coord.y);
|
|
38621
38617
|
z0.push(atom.coord.z);
|
|
38622
38618
|
}
|
|
38623
38619
|
else {
|
|
38624
|
-
x0.push(
|
|
38625
|
-
y0.push(
|
|
38626
|
-
z0.push(
|
|
38620
|
+
// x0.push(dummyCoord);
|
|
38621
|
+
// y0.push(dummyCoord);
|
|
38622
|
+
// z0.push(dummyCoord);
|
|
38623
|
+
|
|
38624
|
+
continue;
|
|
38627
38625
|
}
|
|
38628
|
-
|
|
38629
|
-
//if(!atom)
|
|
38630
|
-
|
|
38631
|
-
|
|
38632
|
-
|
|
38633
|
-
|
|
38626
|
+
|
|
38627
|
+
// if(!atom) {
|
|
38628
|
+
// // continue;
|
|
38629
|
+
// }
|
|
38630
|
+
|
|
38631
|
+
// x0.push(atom.coord.x);
|
|
38632
|
+
// y0.push(atom.coord.y);
|
|
38633
|
+
// z0.push(atom.coord.z);
|
|
38634
|
+
|
|
38634
38635
|
//resiArray.push(resi);
|
|
38635
38636
|
resiArray.push(i+1);
|
|
38636
38637
|
pos2resi[i+1] = resi;
|
|
38637
38638
|
|
|
38639
|
+
ic.posid2resid[atom.structure + '_' + atom.chain + '_' + (i+1).toString()] = resid;
|
|
38640
|
+
// let residNCBI = ic.resid2ncbi[resid];
|
|
38641
|
+
// let pos = residNCBI.substr(residNCBI.lastIndexOf('_') + 1);
|
|
38642
|
+
// pos2resi[pos] = resi;
|
|
38643
|
+
|
|
38638
38644
|
if(atom.ssend) {
|
|
38639
38645
|
//substructItem.To = parseInt(resi);
|
|
38640
38646
|
substructItem.To = i + 1;
|
|
@@ -39053,8 +39059,8 @@ class Domain3d {
|
|
|
39053
39059
|
ic.tddomains[domainName][resid] = 1;
|
|
39054
39060
|
}
|
|
39055
39061
|
}
|
|
39056
|
-
}
|
|
39057
|
-
|
|
39062
|
+
}
|
|
39063
|
+
|
|
39058
39064
|
return {subdomains: subdomains, substruct: substruct, pos2resi: pos2resi };
|
|
39059
39065
|
} // end c2b_NewSplitChain
|
|
39060
39066
|
|
|
@@ -39072,9 +39078,14 @@ class Domain3d {
|
|
|
39072
39078
|
//the whole structure is also considered as a large domain
|
|
39073
39079
|
//if(subdomains.length == 0) {
|
|
39074
39080
|
//subdomains.push([parseInt(ic.chainsSeq[chnid][0].resi), parseInt(ic.chainsSeq[chnid][ic.chainsSeq[chnid].length - 1].resi)]);
|
|
39075
|
-
|
|
39076
|
-
|
|
39077
|
-
|
|
39081
|
+
|
|
39082
|
+
// subdomains.push([parseInt(residueArray[0].substr(residueArray[0].lastIndexOf('_') + 1)),
|
|
39083
|
+
// parseInt(residueArray[residueArray.length-1].substr(residueArray[residueArray.length-1].lastIndexOf('_') + 1))]);
|
|
39084
|
+
|
|
39085
|
+
// use position based
|
|
39086
|
+
subdomains.push([1, residueArray.length]);
|
|
39087
|
+
|
|
39088
|
+
//}
|
|
39078
39089
|
|
|
39079
39090
|
// m_domains1: {"data": [ {"ss": [[1,20,30,x,y,z,x,y,z], [2,50,60,x,y,z,x,y,z]], "domain": [[1,43,x,y,z],[2,58,x,y,z], ...]}, {"ss": [[1,20,30,x,y,z,x,y,z], [2,50,60,x,y,z,x,y,z]],"domain": [[1,43,x,y,z],[2,58,x,y,z], ...]} ] }
|
|
39080
39091
|
let jsonStr = '{"data": [';
|
|
@@ -39094,6 +39105,10 @@ class Domain3d {
|
|
|
39094
39105
|
let from = pos2resi[substruct[k].From];
|
|
39095
39106
|
let to = pos2resi[substruct[k].To];
|
|
39096
39107
|
|
|
39108
|
+
// 1-based residue numbers
|
|
39109
|
+
let fromPos = substruct[k].From;
|
|
39110
|
+
let toPos = substruct[k].To;
|
|
39111
|
+
|
|
39097
39112
|
let residFrom = chnid + "_" + from;
|
|
39098
39113
|
let atomFrom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[residFrom]);
|
|
39099
39114
|
if(!atomFrom || !ic.hAtoms.hasOwnProperty(atomFrom.serial)) continue;
|
|
@@ -39102,9 +39117,9 @@ class Domain3d {
|
|
|
39102
39117
|
let atomTo = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[residTo]);
|
|
39103
39118
|
if(!atomTo || !ic.hAtoms.hasOwnProperty(atomTo.serial)) continue;
|
|
39104
39119
|
|
|
39105
|
-
if(
|
|
39120
|
+
if(fromPos >= start && toPos <= end) {
|
|
39106
39121
|
if(ssCnt > 0) jsonStr += ', ';
|
|
39107
|
-
jsonStr += '[' + sstype + ',' +
|
|
39122
|
+
jsonStr += '[' + sstype + ',' + fromPos + ',' + toPos + ',' + substruct[k].x1.toFixed(2) + ',' + substruct[k].y1.toFixed(2) + ','
|
|
39108
39123
|
+ substruct[k].z1.toFixed(2) + ',' + substruct[k].x2.toFixed(2) + ',' + substruct[k].y2.toFixed(2) + ',' + substruct[k].z2.toFixed(2) + ']';
|
|
39109
39124
|
++ssCnt;
|
|
39110
39125
|
}
|
|
@@ -39122,7 +39137,10 @@ class Domain3d {
|
|
|
39122
39137
|
for(let k = 0, kl = residueArray.length; k < kl; ++k) {
|
|
39123
39138
|
let resid = residueArray[k];
|
|
39124
39139
|
|
|
39125
|
-
let resi = resid.substr(resid.lastIndexOf('_') + 1);
|
|
39140
|
+
// let resi = resid.substr(resid.lastIndexOf('_') + 1);
|
|
39141
|
+
// let residNCBI = ic.resid2ncbi[resid];
|
|
39142
|
+
// let pos = residNCBI.substr(residNCBI.lastIndexOf('_') + 1);
|
|
39143
|
+
let pos = k + 1;
|
|
39126
39144
|
|
|
39127
39145
|
//let resid = chnid + "_" + resi;
|
|
39128
39146
|
let atom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[resid]);
|
|
@@ -39132,9 +39150,9 @@ class Domain3d {
|
|
|
39132
39150
|
|
|
39133
39151
|
//domain: resi, restype, x, y, z
|
|
39134
39152
|
let restype = me.parasCls.resn2restype[atom.resn];
|
|
39135
|
-
if(restype !== undefined &&
|
|
39153
|
+
if(restype !== undefined && pos >= start && pos <= end) {
|
|
39136
39154
|
if(domainCnt > 0) jsonStr += ', ';
|
|
39137
|
-
jsonStr += '[' +
|
|
39155
|
+
jsonStr += '[' + pos + ',' + restype + ',' + atom.coord.x.toFixed(2) + ','
|
|
39138
39156
|
+ atom.coord.y.toFixed(2) + ',' + atom.coord.z.toFixed(2) + ']';
|
|
39139
39157
|
++domainCnt;
|
|
39140
39158
|
}
|
|
@@ -39964,7 +39982,7 @@ class AddTrack {
|
|
|
39964
39982
|
let bUnion = false, bUpdateHighlight = true;
|
|
39965
39983
|
|
|
39966
39984
|
let strandCnt = 0, loopCnt = 0;
|
|
39967
|
-
let setName, currStrand, prevStrand, prevStrandReal, currType, prevType;
|
|
39985
|
+
let setName, currStrand, prevStrand, prevStrandReal = 'NT', currType, prevType;
|
|
39968
39986
|
|
|
39969
39987
|
// clear selection
|
|
39970
39988
|
ic.hAtoms = {};
|
|
@@ -40031,6 +40049,7 @@ class AddTrack {
|
|
|
40031
40049
|
}
|
|
40032
40050
|
else if(prevType == 'igloop') {
|
|
40033
40051
|
++loopCnt;
|
|
40052
|
+
currStrand = 'CT';
|
|
40034
40053
|
setName = 'Loop-' + prevStrandReal + '_' + currStrand + '-' + chainid + '-' + loopCnt.toString().padStart(3, '0');
|
|
40035
40054
|
setName = setName.replace(/'/g, '`');
|
|
40036
40055
|
if(type == 'igloop') ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
|
|
@@ -42329,6 +42348,8 @@ class ShowSeq {
|
|
|
42329
42348
|
// assign the adjusted reference numbers
|
|
42330
42349
|
ic.resid2refnum[residueid] = refnumLabel;
|
|
42331
42350
|
|
|
42351
|
+
refnumStr = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
|
|
42352
|
+
|
|
42332
42353
|
if(!ic.refnum2residArray.hasOwnProperty(refnumStr)) {
|
|
42333
42354
|
ic.refnum2residArray[refnumStr] = [residueid];
|
|
42334
42355
|
}
|
|
@@ -44510,7 +44531,8 @@ class GetGraph {
|
|
|
44510
44531
|
let complement = firstSetAtoms;
|
|
44511
44532
|
if(Object.keys(complement).length > 0 && Object.keys(firstSetAtoms).length > 0) {
|
|
44512
44533
|
let bSaltbridge = false;
|
|
44513
|
-
ic.hBondCls.calculateChemicalHbonds(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge, 'graph', true );
|
|
44534
|
+
// let selectedAtoms = ic.hBondCls.calculateChemicalHbonds(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge, 'graph', true );
|
|
44535
|
+
ic.hBondCls.calculateChemicalHbonds(me.hashUtilsCls.hash2Atoms(complement, ic.atoms), me.hashUtilsCls.hash2Atoms(firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge, 'graph', true );
|
|
44514
44536
|
resid2ResidhashHbond = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
44515
44537
|
}
|
|
44516
44538
|
|
|
@@ -44527,7 +44549,8 @@ class GetGraph {
|
|
|
44527
44549
|
let complement = firstSetAtoms;
|
|
44528
44550
|
if(Object.keys(complement).length > 0 && Object.keys(firstSetAtoms).length > 0) {
|
|
44529
44551
|
let bSaltbridge = false;
|
|
44530
|
-
ic.saltbridgeCls.calculateIonicInteractions(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge, 'graph', true );
|
|
44552
|
+
// let selectedAtoms = ic.saltbridgeCls.calculateIonicInteractions(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge, 'graph', true );
|
|
44553
|
+
ic.saltbridgeCls.calculateIonicInteractions(me.hashUtilsCls.hash2Atoms(complement, ic.atoms), me.hashUtilsCls.hash2Atoms(firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge, 'graph', true );
|
|
44531
44554
|
resid2Residhash = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
44532
44555
|
}
|
|
44533
44556
|
let ionicStr = this.getGraphLinks(resid2Residhash, resid2Residhash, me.htmlCls.ionicInsideColor, labelType, me.htmlCls.ionicInsideValue);
|
|
@@ -44540,19 +44563,22 @@ class GetGraph {
|
|
|
44540
44563
|
let halogenpiStr = '', threshold;
|
|
44541
44564
|
threshold = parseFloat($("#" + ic.pre + "halogenthreshold" ).val());
|
|
44542
44565
|
if(Object.keys(complement).length > 0 && Object.keys(firstSetAtoms).length > 0) {
|
|
44543
|
-
ic.piHalogenCls.calculateHalogenPiInteractions(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), parseFloat(threshold), 'graph', 'halogen', true );
|
|
44566
|
+
// let selectedAtoms = ic.piHalogenCls.calculateHalogenPiInteractions(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), parseFloat(threshold), 'graph', 'halogen', true );
|
|
44567
|
+
ic.piHalogenCls.calculateHalogenPiInteractions(me.hashUtilsCls.hash2Atoms(firstSetAtoms, ic.atoms), me.hashUtilsCls.hash2Atoms(complement, ic.atoms), parseFloat(threshold), 'graph', 'halogen', true );
|
|
44544
44568
|
resid2Residhash = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
44545
44569
|
}
|
|
44546
44570
|
halogenpiStr += this.getGraphLinks(resid2Residhash, resid2Residhash, me.htmlCls.halogenInsideColor, labelType, me.htmlCls.halogenInsideValue);
|
|
44547
44571
|
threshold = parseFloat($("#" + ic.pre + "picationthreshold" ).val());
|
|
44548
44572
|
if(Object.keys(complement).length > 0 && Object.keys(firstSetAtoms).length > 0) {
|
|
44549
|
-
ic.piHalogenCls.calculateHalogenPiInteractions(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), parseFloat(threshold), 'graph', 'pi-cation', true );
|
|
44573
|
+
// let selectedAtoms = ic.piHalogenCls.calculateHalogenPiInteractions(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), parseFloat(threshold), 'graph', 'pi-cation', true );
|
|
44574
|
+
ic.piHalogenCls.calculateHalogenPiInteractions(me.hashUtilsCls.hash2Atoms(firstSetAtoms, ic.atoms), me.hashUtilsCls.hash2Atoms(complement, ic.atoms), parseFloat(threshold), 'graph', 'pi-cation', true );
|
|
44550
44575
|
resid2Residhash = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
44551
44576
|
}
|
|
44552
44577
|
halogenpiStr += this.getGraphLinks(resid2Residhash, resid2Residhash, me.htmlCls.picationInsideColor, labelType, me.htmlCls.picationInsideValue);
|
|
44553
44578
|
threshold = parseFloat($("#" + ic.pre + "pistackingthreshold" ).val());
|
|
44554
44579
|
if(Object.keys(complement).length > 0 && Object.keys(firstSetAtoms).length > 0) {
|
|
44555
|
-
ic.piHalogenCls.calculateHalogenPiInteractions(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), parseFloat(threshold), 'graph', 'pi-stacking', true );
|
|
44580
|
+
// let selectedAtoms = ic.piHalogenCls.calculateHalogenPiInteractions(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), parseFloat(threshold), 'graph', 'pi-stacking', true );
|
|
44581
|
+
ic.piHalogenCls.calculateHalogenPiInteractions(me.hashUtilsCls.hash2Atoms(firstSetAtoms, ic.atoms), me.hashUtilsCls.hash2Atoms(complement, ic.atoms), parseFloat(threshold), 'graph', 'pi-stacking', true );
|
|
44556
44582
|
resid2Residhash = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
44557
44583
|
}
|
|
44558
44584
|
halogenpiStr += this.getGraphLinks(resid2Residhash, resid2Residhash, me.htmlCls.pistackingInsideColor, labelType, me.htmlCls.pistackingInsideValue);
|
|
@@ -44710,6 +44736,15 @@ class ShowInter {
|
|
|
44710
44736
|
async showInteractions(type) { let ic = this.icn3d, me = ic.icn3dui;
|
|
44711
44737
|
let nameArray = $("#" + ic.pre + "atomsCustomHbond").val();
|
|
44712
44738
|
let nameArray2 = $("#" + ic.pre + "atomsCustomHbond2").val();
|
|
44739
|
+
|
|
44740
|
+
let atoms, atoms2;
|
|
44741
|
+
atoms = ic.definedSetsCls.getAtomsFromNameArray(nameArray);
|
|
44742
|
+
atoms2 = ic.definedSetsCls.getAtomsFromNameArray(nameArray2);
|
|
44743
|
+
|
|
44744
|
+
// add the interacting atoms to display
|
|
44745
|
+
ic.dAtoms = me.hashUtilsCls.unionHash(ic.dAtoms, atoms);
|
|
44746
|
+
ic.dAtoms = me.hashUtilsCls.unionHash(ic.dAtoms, atoms2);
|
|
44747
|
+
|
|
44713
44748
|
if(nameArray2.length == 0) {
|
|
44714
44749
|
var aaa = 1; //alert("Please select the first set");
|
|
44715
44750
|
}
|
|
@@ -44795,7 +44830,8 @@ class ShowInter {
|
|
|
44795
44830
|
ic.firstAtomObjCls.getFirstAtomObj(firstSetAtoms);
|
|
44796
44831
|
|
|
44797
44832
|
if(Object.keys(complement).length > 0 && Object.keys(firstSetAtoms).length > 0) {
|
|
44798
|
-
let selectedAtoms = ic.hBondCls.calculateChemicalHbonds(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge );
|
|
44833
|
+
// let selectedAtoms = ic.hBondCls.calculateChemicalHbonds(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge );
|
|
44834
|
+
let selectedAtoms = ic.hBondCls.calculateChemicalHbonds(me.hashUtilsCls.hash2Atoms(complement, ic.atoms), me.hashUtilsCls.hash2Atoms(firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge );
|
|
44799
44835
|
let commanddesc;
|
|
44800
44836
|
if(bSaltbridge) {
|
|
44801
44837
|
ic.resid2ResidhashSaltbridge = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
@@ -44922,7 +44958,8 @@ class ShowInter {
|
|
|
44922
44958
|
complement = ic.definedSetsCls.getAtomsFromNameArray(nameArray);
|
|
44923
44959
|
ic.firstAtomObjCls.getFirstAtomObj(firstSetAtoms);
|
|
44924
44960
|
if(Object.keys(complement).length > 0 && Object.keys(firstSetAtoms).length > 0) {
|
|
44925
|
-
let selectedAtoms = ic.saltbridgeCls.calculateIonicInteractions(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge );
|
|
44961
|
+
// let selectedAtoms = ic.saltbridgeCls.calculateIonicInteractions(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge );
|
|
44962
|
+
let selectedAtoms = ic.saltbridgeCls.calculateIonicInteractions(me.hashUtilsCls.hash2Atoms(complement, ic.atoms), me.hashUtilsCls.hash2Atoms(firstSetAtoms, ic.atoms), parseFloat(threshold), bSaltbridge );
|
|
44926
44963
|
let commanddesc;
|
|
44927
44964
|
ic.resid2ResidhashSaltbridge = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
44928
44965
|
commanddesc = 'all atoms that have ionic interactions with the selected atoms';
|
|
@@ -44957,7 +44994,8 @@ class ShowInter {
|
|
|
44957
44994
|
complement = ic.definedSetsCls.getAtomsFromNameArray(nameArray);
|
|
44958
44995
|
ic.firstAtomObjCls.getFirstAtomObj(firstSetAtoms);
|
|
44959
44996
|
if(Object.keys(complement).length > 0 && Object.keys(firstSetAtoms).length > 0) {
|
|
44960
|
-
let selectedAtoms = ic.piHalogenCls.calculateHalogenPiInteractions(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), parseFloat(threshold), type, interactionType );
|
|
44997
|
+
// let selectedAtoms = ic.piHalogenCls.calculateHalogenPiInteractions(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, firstSetAtoms, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, complement, ic.atoms), parseFloat(threshold), type, interactionType );
|
|
44998
|
+
let selectedAtoms = ic.piHalogenCls.calculateHalogenPiInteractions(me.hashUtilsCls.hash2Atoms(firstSetAtoms, ic.atoms), me.hashUtilsCls.hash2Atoms(complement, ic.atoms), parseFloat(threshold), type, interactionType );
|
|
44961
44999
|
let commanddesc;
|
|
44962
45000
|
if(interactionType == 'halogen') {
|
|
44963
45001
|
ic.resid2ResidhashHalogen = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
@@ -45082,7 +45120,8 @@ class ShowInter {
|
|
|
45082
45120
|
pickCustomSphere_base(radius, atomlistTarget, otherAtoms, bSphereCalc, bInteraction, type, select, bGetPairs, bIncludeTarget) { let ic = this.icn3d, me = ic.icn3dui; // ic.pAtom is set already
|
|
45083
45121
|
let atoms;
|
|
45084
45122
|
if(bInteraction) {
|
|
45085
|
-
atoms = ic.contactCls.getAtomsWithinAtom(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, otherAtoms, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, atomlistTarget, ic.atoms), parseFloat(radius), bGetPairs, bInteraction, undefined, bIncludeTarget);
|
|
45123
|
+
// atoms = ic.contactCls.getAtomsWithinAtom(me.hashUtilsCls.intHash2Atoms(ic.dAtoms, otherAtoms, ic.atoms), me.hashUtilsCls.intHash2Atoms(ic.dAtoms, atomlistTarget, ic.atoms), parseFloat(radius), bGetPairs, bInteraction, undefined, bIncludeTarget);
|
|
45124
|
+
atoms = ic.contactCls.getAtomsWithinAtom(me.hashUtilsCls.hash2Atoms(otherAtoms, ic.atoms), me.hashUtilsCls.hash2Atoms(atomlistTarget, ic.atoms), parseFloat(radius), bGetPairs, bInteraction, undefined, bIncludeTarget);
|
|
45086
45125
|
ic.resid2ResidhashInteractions = me.hashUtilsCls.cloneHash(ic.resid2Residhash);
|
|
45087
45126
|
}
|
|
45088
45127
|
else {
|
|
@@ -46793,8 +46832,8 @@ class AlignParser {
|
|
|
46793
46832
|
let dataArray = await allPromise;
|
|
46794
46833
|
|
|
46795
46834
|
let data2 = data;
|
|
46796
|
-
let data3 = dataArray[0].value; //v3[0];
|
|
46797
|
-
let data4 = dataArray[1].value; //v4[0];
|
|
46835
|
+
let data3 = (me.bNode) ? dataArray[0] : dataArray[0].value; //v3[0];
|
|
46836
|
+
let data4 = (me.bNode) ? dataArray[1] : dataArray[1].value; //v4[0];
|
|
46798
46837
|
|
|
46799
46838
|
if(data3.atoms !== undefined && data4.atoms !== undefined) {
|
|
46800
46839
|
// ic.deferredOpm = $.Deferred(function() {
|
|
@@ -46956,7 +46995,7 @@ class AlignParser {
|
|
|
46956
46995
|
|
|
46957
46996
|
let bFound = false;
|
|
46958
46997
|
for(let i = 0, il = dataArray.length; i < il; ++i) {
|
|
46959
|
-
let opmdata = dataArray[i].value;
|
|
46998
|
+
let opmdata = (me.bNode) ? dataArray[i] : dataArray[i].value;
|
|
46960
46999
|
|
|
46961
47000
|
if(!opmdata) continue;
|
|
46962
47001
|
|
|
@@ -47116,7 +47155,7 @@ class ChainalignParser {
|
|
|
47116
47155
|
|
|
47117
47156
|
// modify the previous trans and rotation matrix
|
|
47118
47157
|
for(let i = 0, il = dataArray.length; i < il; ++i) {
|
|
47119
|
-
let align = dataArray[i].value;//[0];
|
|
47158
|
+
let align = (me.bNode) ? dataArray[i] : dataArray[i].value;//[0];
|
|
47120
47159
|
|
|
47121
47160
|
let mmdbid_q = struArray[i];
|
|
47122
47161
|
let index = indexArray[i];
|
|
@@ -47194,7 +47233,7 @@ class ChainalignParser {
|
|
|
47194
47233
|
return hAtomsAll;
|
|
47195
47234
|
}
|
|
47196
47235
|
|
|
47197
|
-
downloadChainalignmentPart2bRealign(dataArray, chainidPairArray) { let ic = this.icn3d, me = ic.icn3dui;
|
|
47236
|
+
downloadChainalignmentPart2bRealign(dataArray, chainidPairArray, bReverse) { let ic = this.icn3d, me = ic.icn3dui;
|
|
47198
47237
|
// set trans and rotation matrix
|
|
47199
47238
|
ic.t_trans_add = [];
|
|
47200
47239
|
ic.q_trans_sub = [];
|
|
@@ -47208,7 +47247,7 @@ class ChainalignParser {
|
|
|
47208
47247
|
|
|
47209
47248
|
let bFoundAlignment = false;
|
|
47210
47249
|
for(let i = 0, il = dataArray.length; i < il; ++i) {
|
|
47211
|
-
let align = dataArray[i].value;//[0];
|
|
47250
|
+
let align = (me.bNode) ? dataArray[i] : dataArray[i].value;//[0];
|
|
47212
47251
|
|
|
47213
47252
|
let bEqualMmdbid = false;
|
|
47214
47253
|
let bEqualChain = false;
|
|
@@ -47236,9 +47275,16 @@ class ChainalignParser {
|
|
|
47236
47275
|
}
|
|
47237
47276
|
|
|
47238
47277
|
if(!bFoundAlignment) {
|
|
47239
|
-
|
|
47240
|
-
if(
|
|
47241
|
-
|
|
47278
|
+
// sometimes VAST align works for the reversed pair
|
|
47279
|
+
if(!bReverse) {
|
|
47280
|
+
ic.realignParserCls.realignOnStructAlign(true);
|
|
47281
|
+
return;
|
|
47282
|
+
}
|
|
47283
|
+
else {
|
|
47284
|
+
/// if(ic.deferredRealignByStruct !== undefined) ic.deferredRealignByStruct.resolve();
|
|
47285
|
+
if(ic.bRender) var aaa = 1; //alert("These structures can NOT be aligned...");
|
|
47286
|
+
return;
|
|
47287
|
+
}
|
|
47242
47288
|
}
|
|
47243
47289
|
|
|
47244
47290
|
// find the max aligned mmdbid as mmdbid_t
|
|
@@ -47593,7 +47639,7 @@ class ChainalignParser {
|
|
|
47593
47639
|
// Each argument is an array with the following structure: [ data, statusText, jqXHR ]
|
|
47594
47640
|
//var data2 = v2[0];
|
|
47595
47641
|
// index = 0: the mmdb data of target
|
|
47596
|
-
let targetData = dataArray[0].value; //[0];
|
|
47642
|
+
let targetData = (me.bNode) ? dataArray[0] : dataArray[0].value; //[0];
|
|
47597
47643
|
let header = 'HEADER ' + mmdbid_t + '\n';
|
|
47598
47644
|
if(isNaN(mmdbid_t) && mmdbid_t.length > 5) targetData = header + targetData;
|
|
47599
47645
|
|
|
@@ -47611,7 +47657,7 @@ class ChainalignParser {
|
|
|
47611
47657
|
let queryDataArray = [];
|
|
47612
47658
|
|
|
47613
47659
|
for(let index = 1, indexl = chainidArray.length; index < indexl; ++index) {
|
|
47614
|
-
let queryData = dataArray[index].value;//[0];
|
|
47660
|
+
let queryData = (me.bNode) ? dataArray[index] : dataArray[index].value;//[0];
|
|
47615
47661
|
|
|
47616
47662
|
let pos = chainidArray[index].indexOf('_');
|
|
47617
47663
|
let mmdbid_q = chainidArray[index].substr(0, pos).toUpperCase();
|
|
@@ -47657,7 +47703,7 @@ class ChainalignParser {
|
|
|
47657
47703
|
ic.qt_start_end[index-1] = undefined;
|
|
47658
47704
|
}
|
|
47659
47705
|
else {
|
|
47660
|
-
let align = dataArray[index2 - missedChainCnt].value;//[0];
|
|
47706
|
+
let align = (me.bNode) ? dataArray[index2 - missedChainCnt] : dataArray[index2 - missedChainCnt].value;//[0];
|
|
47661
47707
|
|
|
47662
47708
|
let bEqualMmdbid = (mmdbid_q == mmdbid_t);
|
|
47663
47709
|
let bEqualChain = (chain_q == chain_t);
|
|
@@ -47875,7 +47921,7 @@ class ChainalignParser {
|
|
|
47875
47921
|
|
|
47876
47922
|
let queryDataArray = [];
|
|
47877
47923
|
for(let index = 0, indexl = structArray.length; index < indexl; ++index) {
|
|
47878
|
-
let queryData = dataArray[index].value;//[0];
|
|
47924
|
+
let queryData = (me.bNode) ? dataArray[index] : dataArray[index].value;//[0];
|
|
47879
47925
|
let header = 'HEADER ' + structArray[index] + '\n';
|
|
47880
47926
|
if(isNaN(structArray[index]) && structArray[index].length > 5) queryData = header + queryData;
|
|
47881
47927
|
|
|
@@ -50327,7 +50373,7 @@ class RealignParser {
|
|
|
50327
50373
|
//var data2 = v2[0];
|
|
50328
50374
|
for(let index = 0, indexl = dataArray.length; index < indexl; ++index) {
|
|
50329
50375
|
// for(let index = 1, indexl = dataArray.length; index < indexl; ++index) {
|
|
50330
|
-
let data = dataArray[index].value;//[0];
|
|
50376
|
+
let data = (me.bNode) ? dataArray[index] : dataArray[index].value;//[0];
|
|
50331
50377
|
if(!data) continue;
|
|
50332
50378
|
|
|
50333
50379
|
let fromStruct = chainidArray[index + 1].substr(0, chainidArray[index + 1].indexOf('_')); //.toUpperCase();
|
|
@@ -50510,7 +50556,7 @@ class RealignParser {
|
|
|
50510
50556
|
await this.realignChainOnSeqAlign(undefined, chainidArray, bRealign);
|
|
50511
50557
|
}
|
|
50512
50558
|
|
|
50513
|
-
async realignOnStructAlign() { let ic = this.icn3d, me = ic.icn3dui;
|
|
50559
|
+
async realignOnStructAlign(bReverse) { let ic = this.icn3d, me = ic.icn3dui;
|
|
50514
50560
|
// each 3D domain should have at least 3 secondary structures
|
|
50515
50561
|
let minSseCnt = (me.cfg.aligntool != 'tmalign') ? 3 : 0;
|
|
50516
50562
|
let struct2domain = {};
|
|
@@ -50537,6 +50583,8 @@ class RealignParser {
|
|
|
50537
50583
|
|
|
50538
50584
|
//let cnt = 0;
|
|
50539
50585
|
let structArray = Object.keys(struct2domain);
|
|
50586
|
+
if(bReverse) structArray = structArray.reverse();
|
|
50587
|
+
|
|
50540
50588
|
for(let s = 0, sl = structArray.length; s < sl; ++s) {
|
|
50541
50589
|
let struct1 = structArray[s];
|
|
50542
50590
|
let chainidArray1 = Object.keys(struct2domain[struct1]);
|
|
@@ -50580,14 +50628,14 @@ class RealignParser {
|
|
|
50580
50628
|
}
|
|
50581
50629
|
|
|
50582
50630
|
let allPromise = Promise.allSettled(ajaxArray);
|
|
50583
|
-
try {
|
|
50631
|
+
// try {
|
|
50584
50632
|
let dataArray = await allPromise;
|
|
50585
50633
|
ic.qt_start_end = []; // reset the alignment
|
|
50586
|
-
await ic.chainalignParserCls.downloadChainalignmentPart2bRealign(dataArray, chainidPairArray);
|
|
50587
|
-
}
|
|
50588
|
-
catch(err) {
|
|
50589
|
-
|
|
50590
|
-
}
|
|
50634
|
+
await ic.chainalignParserCls.downloadChainalignmentPart2bRealign(dataArray, chainidPairArray, bReverse);
|
|
50635
|
+
// }
|
|
50636
|
+
// catch(err) {
|
|
50637
|
+
// if(ic.bRender) var aaa = 1; //alert("These structures can NOT be aligned to each other...");
|
|
50638
|
+
// }
|
|
50591
50639
|
}
|
|
50592
50640
|
|
|
50593
50641
|
async realignOnStructAlignMsa(nameArray) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -50649,7 +50697,7 @@ class RealignParser {
|
|
|
50649
50697
|
}
|
|
50650
50698
|
|
|
50651
50699
|
let allPromise = Promise.allSettled(ajaxArray);
|
|
50652
|
-
try {
|
|
50700
|
+
// try {
|
|
50653
50701
|
let dataArray = await allPromise;
|
|
50654
50702
|
|
|
50655
50703
|
// set trans and rotation matrix
|
|
@@ -50663,10 +50711,10 @@ class RealignParser {
|
|
|
50663
50711
|
|
|
50664
50712
|
await ic.chainalignParserCls.downloadChainalignmentPart2b(undefined, nameArray, undefined, dataArray,
|
|
50665
50713
|
indexArray, struct1, struArray);
|
|
50666
|
-
}
|
|
50667
|
-
catch(err) {
|
|
50668
|
-
|
|
50669
|
-
}
|
|
50714
|
+
// }
|
|
50715
|
+
// catch(err) {
|
|
50716
|
+
// if(ic.bRender) var aaa = 1; //alert("These structures can NOT be aligned to each other...");
|
|
50717
|
+
// }
|
|
50670
50718
|
}
|
|
50671
50719
|
|
|
50672
50720
|
async realignChainOnSeqAlign(chainresiCalphaHash2, chainidArray, bRealign, bPredefined) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -52175,13 +52223,13 @@ class ParserUtils {
|
|
|
52175
52223
|
let allPromise = Promise.allSettled([prms1, prms2]);
|
|
52176
52224
|
let dataArray = await allPromise;
|
|
52177
52225
|
|
|
52178
|
-
ic.interactionData1 = dataArray[0].value;
|
|
52226
|
+
ic.interactionData1 = (me.bNode) ? dataArray[0] : dataArray[0].value;
|
|
52179
52227
|
ic.html2ddgm = '';
|
|
52180
52228
|
ic.diagram2dCls.draw2Ddgm(ic.interactionData1, mmdbid1, 0);
|
|
52181
52229
|
if(me.cfg.show2d) me.htmlCls.dialogCls.openDlg('dl_2ddgm', 'Interactions');
|
|
52182
52230
|
|
|
52183
52231
|
|
|
52184
|
-
ic.interactionData2 = dataArray[1].value;
|
|
52232
|
+
ic.interactionData2 = (me.bNode) ? dataArray[1] : dataArray[1].value;
|
|
52185
52233
|
ic.diagram2dCls.draw2Ddgm(ic.interactionData2, mmdbid2, 1);
|
|
52186
52234
|
|
|
52187
52235
|
ic.html2ddgm += "<br>" + ic.diagram2dCls.set2DdgmNote(true);
|
|
@@ -52229,7 +52277,7 @@ class ParserUtils {
|
|
|
52229
52277
|
// Each argument is an array with the following structure: [ data, statusText, jqXHR ]
|
|
52230
52278
|
//var data2 = v2[0];
|
|
52231
52279
|
for(let index = 0, indexl = chainidArray.length; index < indexl; ++index) {
|
|
52232
|
-
let data = dataArray[index].value;//[0];
|
|
52280
|
+
let data = (me.bNode) ? dataArray[index] : dataArray[index].value;//[0];
|
|
52233
52281
|
let mmdbid = chainidArray[index].substr(0, chainidArray[index].indexOf('_'));
|
|
52234
52282
|
|
|
52235
52283
|
ic.diagram2dCls.draw2Ddgm(data, mmdbid, 0);
|
|
@@ -53842,7 +53890,8 @@ class SetSeqAlign {
|
|
|
53842
53890
|
return pos;
|
|
53843
53891
|
}
|
|
53844
53892
|
|
|
53845
|
-
getResnFromResi(chainid, resi) { let ic = this.icn3d
|
|
53893
|
+
getResnFromResi(chainid, resi) { let ic = this.icn3d; ic.icn3dui;
|
|
53894
|
+
/*
|
|
53846
53895
|
let pos = this.getPosFromResi(chainid, resi);
|
|
53847
53896
|
if(!pos) return '?';
|
|
53848
53897
|
|
|
@@ -53857,6 +53906,28 @@ class SetSeqAlign {
|
|
|
53857
53906
|
}
|
|
53858
53907
|
|
|
53859
53908
|
return resn;
|
|
53909
|
+
*/
|
|
53910
|
+
|
|
53911
|
+
let resid = chainid + '_' + resi;
|
|
53912
|
+
return ic.residueId2Name[resid];
|
|
53913
|
+
}
|
|
53914
|
+
|
|
53915
|
+
getResiAferAlign(chainid, bRealign, pos) { let ic = this.icn3d, me = ic.icn3dui;
|
|
53916
|
+
let resi;
|
|
53917
|
+
if(bRealign && me.cfg.aligntool == 'tmalign') {
|
|
53918
|
+
resi = pos;
|
|
53919
|
+
}
|
|
53920
|
+
else {
|
|
53921
|
+
if(ic.posid2resid) {
|
|
53922
|
+
let resid = ic.posid2resid[chainid + '_' + pos];
|
|
53923
|
+
resi = resid.substr(resid.lastIndexOf('_') + 1);
|
|
53924
|
+
}
|
|
53925
|
+
else {
|
|
53926
|
+
resi = ic.chainsSeq[chainid][pos].resi;
|
|
53927
|
+
}
|
|
53928
|
+
}
|
|
53929
|
+
|
|
53930
|
+
return resi;
|
|
53860
53931
|
}
|
|
53861
53932
|
|
|
53862
53933
|
setSeqAlignChain(chainid, chainIndex, chainidArray) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -53964,12 +54035,10 @@ class SetSeqAlign {
|
|
|
53964
54035
|
if(!ic.chainsMapping[chainid2]) ic.chainsMapping[chainid2] = {};
|
|
53965
54036
|
|
|
53966
54037
|
let posChain1 = {}, posChain2 = {};
|
|
53967
|
-
console.log("###bRealign: " + bRealign);
|
|
53968
|
-
console.log(ic.qt_start_end[chainIndex]);
|
|
53969
54038
|
|
|
53970
54039
|
for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
|
|
53971
54040
|
let start1, start2, end1, end2;
|
|
53972
|
-
if(bRealign) { // real residue numbers are stored, could be "100a"
|
|
54041
|
+
if(bRealign && me.cfg.aligntool == 'tmalign') { // real residue numbers are stored, could be "100a"
|
|
53973
54042
|
start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start);
|
|
53974
54043
|
start2 = parseInt(ic.qt_start_end[chainIndex][i].q_start);
|
|
53975
54044
|
end1 = parseInt(ic.qt_start_end[chainIndex][i].t_end);
|
|
@@ -53991,7 +54060,7 @@ console.log("###bRealign: " + bRealign);
|
|
|
53991
54060
|
|
|
53992
54061
|
for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
|
|
53993
54062
|
let start1, start2, end1, end2;
|
|
53994
|
-
if(bRealign) { // real residue numbers are stored
|
|
54063
|
+
if(bRealign && me.cfg.aligntool == 'tmalign') { // real residue numbers are stored
|
|
53995
54064
|
start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start);
|
|
53996
54065
|
start2 = parseInt(ic.qt_start_end[chainIndex][i].q_start);
|
|
53997
54066
|
end1 = parseInt(ic.qt_start_end[chainIndex][i].t_end);
|
|
@@ -54013,8 +54082,9 @@ console.log("###bRealign: " + bRealign);
|
|
|
54013
54082
|
|
|
54014
54083
|
if(ic.chainsSeq[chainid1] === undefined || ic.chainsSeq[chainid1][j] === undefined) break;
|
|
54015
54084
|
|
|
54016
|
-
let resi = (bRealign
|
|
54017
|
-
let resn = (bRealign) ? this.getResnFromResi(chainid1, j).toLowerCase() : ic.chainsSeq[chainid1][j].name.toLowerCase();
|
|
54085
|
+
let resi = this.getResiAferAlign(chainid1, bRealign, j + 1);
|
|
54086
|
+
// let resn = (bRealign && me.cfg.aligntool == 'tmalign') ? this.getResnFromResi(chainid1, j).toLowerCase() : ic.chainsSeq[chainid1][j].name.toLowerCase();
|
|
54087
|
+
let resn = this.getResnFromResi(chainid1, resi).toLowerCase();
|
|
54018
54088
|
|
|
54019
54089
|
if(resn == '?') continue;
|
|
54020
54090
|
|
|
@@ -54032,11 +54102,11 @@ console.log("###bRealign: " + bRealign);
|
|
|
54032
54102
|
posChain2[j] = 1;
|
|
54033
54103
|
|
|
54034
54104
|
if(ic.chainsSeq[chainid2] === undefined || ic.chainsSeq[chainid2] === undefined) break;
|
|
54035
|
-
|
|
54036
|
-
|
|
54037
|
-
//let resn = ic.chainsSeq[chainid2][j].name.toLowerCase();
|
|
54038
|
-
let
|
|
54039
|
-
|
|
54105
|
+
|
|
54106
|
+
let resi = this.getResiAferAlign(chainid2, bRealign, j + 1);
|
|
54107
|
+
// let resn = (bRealign && me.cfg.aligntool == 'tmalign') ? this.getResnFromResi(chainid2, j).toLowerCase() : ic.chainsSeq[chainid2][j].name.toLowerCase();
|
|
54108
|
+
let resn = this.getResnFromResi(chainid2, resi).toLowerCase();
|
|
54109
|
+
|
|
54040
54110
|
|
|
54041
54111
|
if(resn == '?') continue;
|
|
54042
54112
|
|
|
@@ -54080,6 +54150,7 @@ console.log("###bRealign: " + bRealign);
|
|
|
54080
54150
|
if(ic.chainsSeq[chainid1] === undefined || ic.chainsSeq[chainid2] === undefined) break;
|
|
54081
54151
|
|
|
54082
54152
|
let resi1, resi2, resn1, resn2;
|
|
54153
|
+
/*
|
|
54083
54154
|
if(bRealign) { // tmalign: just one residue in this for loop
|
|
54084
54155
|
if(me.cfg.aligntool == 'tmalign') {
|
|
54085
54156
|
resi1 = ic.qt_start_end[chainIndex][i].t_start;
|
|
@@ -54093,15 +54164,30 @@ console.log("###bRealign: " + bRealign);
|
|
|
54093
54164
|
resn1 = this.getResnFromResi(chainid1, resi1).toUpperCase();
|
|
54094
54165
|
resn2 = this.getResnFromResi(chainid2, resi2).toUpperCase();
|
|
54095
54166
|
|
|
54167
|
+
if(resn1 == '?' || resn2 == '?') continue;
|
|
54168
|
+
}
|
|
54169
|
+
*/
|
|
54170
|
+
if(bRealign && me.cfg.aligntool == 'tmalign') { // tmalign: just one residue in this for loop
|
|
54171
|
+
resi1 = ic.qt_start_end[chainIndex][i].t_start;
|
|
54172
|
+
resi2 = ic.qt_start_end[chainIndex][i].q_start;
|
|
54173
|
+
|
|
54174
|
+
resn1 = this.getResnFromResi(chainid1, resi1).toUpperCase();
|
|
54175
|
+
resn2 = this.getResnFromResi(chainid2, resi2).toUpperCase();
|
|
54176
|
+
|
|
54096
54177
|
if(resn1 == '?' || resn2 == '?') continue;
|
|
54097
54178
|
}
|
|
54098
54179
|
else {
|
|
54099
54180
|
if(ic.chainsSeq[chainid1][j + start1] === undefined || ic.chainsSeq[chainid2][j + start2] === undefined) continue;
|
|
54100
54181
|
|
|
54101
|
-
resi1 = ic.chainsSeq[chainid1][j + start1].resi;
|
|
54102
|
-
resi2 = ic.chainsSeq[chainid2][j + start2].resi;
|
|
54103
|
-
resn1 = ic.chainsSeq[chainid1][j + start1].name.toUpperCase();
|
|
54104
|
-
resn2 = ic.chainsSeq[chainid2][j + start2].name.toUpperCase();
|
|
54182
|
+
// resi1 = ic.chainsSeq[chainid1][j + start1].resi;
|
|
54183
|
+
// resi2 = ic.chainsSeq[chainid2][j + start2].resi;
|
|
54184
|
+
// resn1 = ic.chainsSeq[chainid1][j + start1].name.toUpperCase();
|
|
54185
|
+
// resn2 = ic.chainsSeq[chainid2][j + start2].name.toUpperCase();
|
|
54186
|
+
|
|
54187
|
+
resi1 = this.getResiAferAlign(chainid1, bRealign, j + start1 + 1);
|
|
54188
|
+
resi2 = this.getResiAferAlign(chainid2, bRealign, j + start2 + 1);
|
|
54189
|
+
resn1 = this.getResnFromResi(chainid1, resi1).toUpperCase();
|
|
54190
|
+
resn2 = this.getResnFromResi(chainid2, resi2).toUpperCase();
|
|
54105
54191
|
}
|
|
54106
54192
|
|
|
54107
54193
|
if(resn1 === resn2) {
|
|
@@ -54404,9 +54490,9 @@ console.log("###bRealign: " + bRealign);
|
|
|
54404
54490
|
return resn;
|
|
54405
54491
|
}
|
|
54406
54492
|
|
|
54407
|
-
getResnFromResid(resid) { let ic = this.icn3d
|
|
54408
|
-
|
|
54409
|
-
}
|
|
54493
|
+
// getResnFromResid(resid) { let ic = this.icn3d, me = ic.icn3dui;
|
|
54494
|
+
// return ic.residueId2Name[resid];
|
|
54495
|
+
// }
|
|
54410
54496
|
|
|
54411
54497
|
getResiPosInTemplate(chainid1, resi_t) { let ic = this.icn3d; ic.icn3dui;
|
|
54412
54498
|
// check the number of gaps before resiStart1 (nGap), and insert 'notAlnLen2 - notAlnLen1 - nGap' gaps
|
|
@@ -54535,7 +54621,7 @@ console.log("###bRealign: " + bRealign);
|
|
|
54535
54621
|
|
|
54536
54622
|
for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
|
|
54537
54623
|
let start1, start2, end1, end2, resiStart1, start1Pos, end1Pos;
|
|
54538
|
-
if(bRealign) { // real residue numbers are stored
|
|
54624
|
+
if(bRealign && me.cfg.aligntool == 'tmalign') { // real residue numbers are stored
|
|
54539
54625
|
start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start);
|
|
54540
54626
|
start2 = parseInt(ic.qt_start_end[chainIndex][i].q_start);
|
|
54541
54627
|
end1 = parseInt(ic.qt_start_end[chainIndex][i].t_end);
|
|
@@ -54619,8 +54705,8 @@ console.log("###bRealign: " + bRealign);
|
|
|
54619
54705
|
else {
|
|
54620
54706
|
let resi1 = (bRealign) ? start1 + k : ic.ParserUtilsCls.getResi(chainid1, start1 + k);
|
|
54621
54707
|
let resi2 = (bRealign) ? start2 + k : ic.ParserUtilsCls.getResi(chainid2, start2 + k);
|
|
54622
|
-
let resn1 = this.
|
|
54623
|
-
let resn2 = this.
|
|
54708
|
+
let resn1 = this.getResnFromResi(chainid1, resi1); //this.getResn(chainid1, start1 + k);
|
|
54709
|
+
let resn2 = this.getResnFromResi(chainid2, resi2); //this.getResn(chainid2, start2 + k);
|
|
54624
54710
|
|
|
54625
54711
|
let bAlign = true;
|
|
54626
54712
|
let resObject = this.getResObject(chainid2, false, bAlign, resi2, resn2, resn1);
|
|
@@ -55883,7 +55969,7 @@ class Vastplus {
|
|
|
55883
55969
|
|
|
55884
55970
|
let queryDataArray = [];
|
|
55885
55971
|
for(let index = 0, indexl = chainidpairArray.length; index < indexl; ++index) {
|
|
55886
|
-
let queryData = dataArray[index].value; //[0];
|
|
55972
|
+
let queryData = (me.bNode) ? dataArray[index] : dataArray[index].value; //[0];
|
|
55887
55973
|
|
|
55888
55974
|
queryDataArray.push(queryData);
|
|
55889
55975
|
/*
|
|
@@ -60039,7 +60125,7 @@ class SelectByCommand {
|
|
|
60039
60125
|
let residArray = [];
|
|
60040
60126
|
|
|
60041
60127
|
if(bRefnum) {
|
|
60042
|
-
let residArrayTmp = (ic.refnum2residArray[k]) ? ic.refnum2residArray[k] : [];
|
|
60128
|
+
let residArrayTmp = (ic.refnum2residArray[k.toString()]) ? ic.refnum2residArray[k.toString()] : [];
|
|
60043
60129
|
for(let m = 0, ml = residArrayTmp.length; m < ml; ++m) {
|
|
60044
60130
|
let residueId = residArrayTmp[m];
|
|
60045
60131
|
if(residueId.substr(0, residueId.lastIndexOf('_')) == molecule_chain) {
|
|
@@ -62097,14 +62183,14 @@ class Dssp {
|
|
|
62097
62183
|
}
|
|
62098
62184
|
}
|
|
62099
62185
|
|
|
62100
|
-
async parseDsspData(dataArray, struArray, bAppend) { let ic = this.icn3d
|
|
62186
|
+
async parseDsspData(dataArray, struArray, bAppend) { let ic = this.icn3d, me = ic.icn3dui;
|
|
62101
62187
|
//var dataArray =(struArray.length == 1) ? [data] : data;
|
|
62102
62188
|
|
|
62103
62189
|
// Each argument is an array with the following structure: [ data, statusText, jqXHR ]
|
|
62104
62190
|
//var data2 = v2[0];
|
|
62105
62191
|
for(let index = 0, indexl = dataArray.length; index < indexl; ++index) {
|
|
62106
62192
|
//let ssHash = dataArray[index][0];
|
|
62107
|
-
let ssHash = dataArray[index].value;
|
|
62193
|
+
let ssHash = (me.bNode) ? dataArray[index] : dataArray[index].value;
|
|
62108
62194
|
|
|
62109
62195
|
if(ssHash !== undefined && JSON.stringify(ssHash).indexOf('Oops there was a problem') === -1) {
|
|
62110
62196
|
for(let chainNum in ic.chainsSeq) {
|
|
@@ -62230,8 +62316,19 @@ class Dssp {
|
|
|
62230
62316
|
ic.bShowRefnum = false;
|
|
62231
62317
|
|
|
62232
62318
|
ic.hAtoms = {};
|
|
62233
|
-
ic.bResetAnno = true;
|
|
62234
|
-
|
|
62319
|
+
//ic.bResetAnno = true;
|
|
62320
|
+
|
|
62321
|
+
// await ic.showAnnoCls.showAnnotations();
|
|
62322
|
+
if(ic.bAnnoShown) {
|
|
62323
|
+
for(let chain in ic.protein_chainid) {
|
|
62324
|
+
let chainidBase = ic.protein_chainid[chain];
|
|
62325
|
+
ic.showSeqCls.showSeq(chain, chainidBase, 'protein');
|
|
62326
|
+
}
|
|
62327
|
+
}
|
|
62328
|
+
else {
|
|
62329
|
+
await ic.showAnnoCls.showAnnotations();
|
|
62330
|
+
}
|
|
62331
|
+
|
|
62235
62332
|
ic.hlUpdateCls.updateHlAll();
|
|
62236
62333
|
}
|
|
62237
62334
|
|
|
@@ -62268,7 +62365,7 @@ class Dssp {
|
|
|
62268
62365
|
ic.refpdbArray = ['NaCaExchanger_2fwuA_dog_n2', 'C3_2qkiD_human_n1', 'Siglec3_5j0bB_human_C2-n2', 'ICOS_6x4gA_human_V', 'B2Microglobulin_7phrL_human_C1', 'VTCN1_Q7Z7D3_human_V-n2', 'Contactin1_2ee2A_human_FN3-n9', 'InsulinR_8guyE_human_FN3-n1', 'JAM1_1nbqA_human_VorIset-n2', 'LAG3_7tzgD_human_C2-n2', 'Palladin_2dm3A_human_Iset-n1', 'PD1_4zqkB_human_V', 'CD8a_1cd8A_human_V', 'VISTA_6oilA_human_V', 'LAG3_7tzgD_human_V-n1', 'TP47_1o75A_bacteria', 'TP34_2o6cA_bacteria', 'TEAD1_3kysC_human', 'RBPJ_6py8C_human_Unk-n2', 'TCRa_6jxrm_human_C1-n2', 'IsdA_2iteA_bacteria', 'LaminAC_1ifrA_human', 'CD19_6al5A_human_C2orV-n1'];
|
|
62269
62366
|
|
|
62270
62367
|
// round 2
|
|
62271
|
-
ic.refpdbHash = {};
|
|
62368
|
+
ic.refpdbHash = {};
|
|
62272
62369
|
ic.refpdbHash['NaCaExchanger_2fwuA_dog_n2'] = ['NaCaExchanger_2fwuA_dog_n2', 'ORF7a_1xakA_virus', 'ECadherin_4zt1A_human_n2', 'NaKATPaseTransporterBeta_2zxeB_spurdogshark'];
|
|
62273
62370
|
ic.refpdbHash['C3_2qkiD_human_n1'] = ['C3_2qkiD_human_n1', 'RBPJ_6py8C_human_Unk-n1', 'BArrestin1_4jqiA_rat_n1'];
|
|
62274
62371
|
ic.refpdbHash['Siglec3_5j0bB_human_C2-n2'] = ['Siglec3_5j0bB_human_C2-n2', 'CD2_1hnfA_human_C2-n2', 'GHR_1axiB_human_FN3-n1'];
|
|
@@ -62457,15 +62554,16 @@ class Dssp {
|
|
|
62457
62554
|
domainAtomsArray.push(domainAtoms);
|
|
62458
62555
|
}
|
|
62459
62556
|
}
|
|
62460
|
-
|
|
62557
|
+
|
|
62461
62558
|
for(let k = 0, kl = domainAtomsArray.length; k < kl; ++k) {
|
|
62462
62559
|
let pdb_target = ic.saveFileCls.getAtomPDB(domainAtomsArray[k], undefined, undefined, undefined, undefined, struct);
|
|
62463
|
-
|
|
62560
|
+
// ig strand for any subset will have the same k, use the number of residue to separate them
|
|
62561
|
+
let domainid = chainid + '-' + k + '_' + domainAtomsArray[k].length;
|
|
62464
62562
|
ic.domainid2pdb[domainid] = pdb_target;
|
|
62465
62563
|
|
|
62466
62564
|
for(let index = 0, indexl = dataArray.length; index < indexl; ++index) {
|
|
62467
62565
|
let struct2 = ic.defaultPdbId + index;
|
|
62468
|
-
let pdb_query = dataArray[index].value; //[0];
|
|
62566
|
+
let pdb_query = (me.bNode) ? dataArray[index] : dataArray[index].value; //[0];
|
|
62469
62567
|
let header = 'HEADER ' + struct2 + '\n';
|
|
62470
62568
|
pdb_query = header + pdb_query;
|
|
62471
62569
|
|
|
@@ -62504,20 +62602,20 @@ console.log("###subdomains.length: " + subdomains.length + " domainAtomsArray.le
|
|
|
62504
62602
|
// find the best alignment for each chain
|
|
62505
62603
|
let domainid2score = {}, domainid2segs = {}, chainid2segs = {};
|
|
62506
62604
|
|
|
62507
|
-
|
|
62508
|
-
|
|
62509
|
-
|
|
62510
|
-
|
|
62605
|
+
if(!ic.chainid2refpdbname) ic.chainid2refpdbname = {};
|
|
62606
|
+
if(!ic.domainid2refpdbname) ic.domainid2refpdbname = {};
|
|
62607
|
+
if(!ic.domainid2ig2kabat) ic.domainid2ig2kabat = {};
|
|
62608
|
+
if(!ic.domainid2ig2imgt) ic.domainid2ig2imgt = {};
|
|
62511
62609
|
|
|
62512
|
-
ic.chainid2refpdbname = {};
|
|
62513
|
-
ic.domainid2refpdbname = {};
|
|
62514
|
-
ic.domainid2ig2kabat = {};
|
|
62515
|
-
ic.domainid2ig2imgt = {};
|
|
62610
|
+
// ic.chainid2refpdbname = {};
|
|
62611
|
+
// ic.domainid2refpdbname = {};
|
|
62612
|
+
// ic.domainid2ig2kabat = {};
|
|
62613
|
+
// ic.domainid2ig2imgt = {};
|
|
62516
62614
|
|
|
62517
62615
|
let minResidues = 20;
|
|
62518
62616
|
|
|
62519
62617
|
for(let i = 0, il = domainidpairArray.length; i < il; ++i) {
|
|
62520
|
-
let queryData = dataArray[i].value; //[0];
|
|
62618
|
+
let queryData = (me.bNode) ? dataArray[i] : dataArray[i].value; //[0];
|
|
62521
62619
|
|
|
62522
62620
|
if(!queryData) {
|
|
62523
62621
|
if(!me.bNode) console.log("The alignment data for " + domainidpairArray[i] + " is unavailable...");
|
|
@@ -62592,7 +62690,6 @@ console.log("###subdomains.length: " + subdomains.length + " domainAtomsArray.le
|
|
|
62592
62690
|
}
|
|
62593
62691
|
|
|
62594
62692
|
if(!ic.refpdbHash[refpdbname]) {
|
|
62595
|
-
console.log("### refpdbname: " + refpdbname);
|
|
62596
62693
|
continue;
|
|
62597
62694
|
}
|
|
62598
62695
|
|
|
@@ -62610,7 +62707,7 @@ console.log("###subdomains.length: " + subdomains.length + " domainAtomsArray.le
|
|
|
62610
62707
|
let pdb_target = ic.domainid2pdb[domainid];
|
|
62611
62708
|
for(let index = 0, indexl = ic.pdbDataArray.length; index < indexl; ++index) {
|
|
62612
62709
|
let struct2 = ic.defaultPdbId + index;
|
|
62613
|
-
let pdb_query = ic.pdbDataArray[index].value; //[0];
|
|
62710
|
+
let pdb_query = (me.bNode) ? ic.pdbDataArray[index] : ic.pdbDataArray[index].value; //[0];
|
|
62614
62711
|
let header = 'HEADER ' + struct2 + '\n';
|
|
62615
62712
|
pdb_query = header + pdb_query;
|
|
62616
62713
|
|
|
@@ -62707,8 +62804,17 @@ console.log("###subdomains.length: " + subdomains.length + " domainAtomsArray.le
|
|
|
62707
62804
|
|
|
62708
62805
|
// open sequence view
|
|
62709
62806
|
ic.hAtomsRefnum = {};
|
|
62710
|
-
ic.bResetAnno = true;
|
|
62711
|
-
|
|
62807
|
+
//ic.bResetAnno = true;
|
|
62808
|
+
if(ic.bAnnoShown) {
|
|
62809
|
+
for(let chain in ic.protein_chainid) {
|
|
62810
|
+
let chainidBase = ic.protein_chainid[chain];
|
|
62811
|
+
ic.showSeqCls.showSeq(chain, chainidBase, 'protein');
|
|
62812
|
+
}
|
|
62813
|
+
}
|
|
62814
|
+
else {
|
|
62815
|
+
await ic.showAnnoCls.showAnnotations();
|
|
62816
|
+
}
|
|
62817
|
+
|
|
62712
62818
|
ic.annotationCls.setAnnoViewAndDisplay('detailed view');
|
|
62713
62819
|
}
|
|
62714
62820
|
else {
|
|
@@ -62833,7 +62939,7 @@ console.log("###subdomains.length: " + subdomains.length + " domainAtomsArray.le
|
|
|
62833
62939
|
}
|
|
62834
62940
|
|
|
62835
62941
|
rmStrandFromRefnumlabel(refnumLabel) {
|
|
62836
|
-
return refnumLabel.replace(/'/g, '').replace(/\*/g, '').replace(/\^/g, '').replace(/\+/g, '').replace(/\-/g, '').substr(1); // C', C''
|
|
62942
|
+
return (!refnumLabel) ? refnumLabel : refnumLabel.replace(/'/g, '').replace(/\*/g, '').replace(/\^/g, '').replace(/\+/g, '').replace(/\-/g, '').substr(1); // C', C''
|
|
62837
62943
|
}
|
|
62838
62944
|
}
|
|
62839
62945
|
|
|
@@ -62894,6 +63000,8 @@ class Scap {
|
|
|
62894
63000
|
async retrieveScap(snp, bInteraction, bPdb) { let ic = this.icn3d, me = ic.icn3dui;
|
|
62895
63001
|
let thisClass = this;
|
|
62896
63002
|
|
|
63003
|
+
ic.bScap = true;
|
|
63004
|
+
|
|
62897
63005
|
//snp: 6M0J_E_484_K,6M0J_E_501_Y,6M0J_E_417_N
|
|
62898
63006
|
let snpStr = '';
|
|
62899
63007
|
let snpArray = snp.split(','); //stru_chain_resi_snp
|
|
@@ -70817,7 +70925,7 @@ class iCn3DUI {
|
|
|
70817
70925
|
//even when multiple iCn3D viewers are shown together.
|
|
70818
70926
|
this.pre = this.cfg.divid + "_";
|
|
70819
70927
|
|
|
70820
|
-
this.REVISION = '3.25.
|
|
70928
|
+
this.REVISION = '3.25.3';
|
|
70821
70929
|
|
|
70822
70930
|
// In nodejs, iCn3D defines "window = {navigator: {}}"
|
|
70823
70931
|
this.bNode = (Object.keys(window).length < 2) ? true : false;
|