icn3d 3.45.4 → 3.45.6
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 +180 -118
- package/icn3d.min.js +5 -5
- package/icn3d.module.js +180 -118
- package/package.json +1 -1
package/icn3d.js
CHANGED
|
@@ -54156,7 +54156,7 @@ class HashUtilsCls {
|
|
|
54156
54156
|
//Get the union of two hashes "atoms1" and "atoms2". The returned hash has atom index as key and 1 as value.
|
|
54157
54157
|
unionHash(atoms1, atoms2) { let me = this.icn3dui;
|
|
54158
54158
|
// much slower
|
|
54159
|
-
//return me.hashUtilsCls.unionHashNotInPlace(atoms1, atoms2);
|
|
54159
|
+
// return me.hashUtilsCls.unionHashNotInPlace(atoms1, atoms2);
|
|
54160
54160
|
|
|
54161
54161
|
// much faster
|
|
54162
54162
|
return me.hashUtilsCls.unionHashInPlace(atoms1, atoms2);
|
|
@@ -57999,7 +57999,7 @@ class ClickMenu {
|
|
|
57999
57999
|
let sigmafofc = parseFloat($("#" + me.pre + "sigmafofc" ).val());
|
|
58000
58000
|
let type = 'fofc';
|
|
58001
58001
|
//await ic.dsn6ParserCls.dsn6Parser(ic.inputid, type, sigmafofc);
|
|
58002
|
-
await ic.densityCifParserCls.densityCifParser(ic.inputid, type,
|
|
58002
|
+
await ic.densityCifParserCls.densityCifParser(ic.inputid, type, sigmafofc);
|
|
58003
58003
|
//ic.setOptionCls.setOption('map', 'fofc');
|
|
58004
58004
|
thisClass.setLogCmd('set map fofc sigma ' + sigmafofc, true);
|
|
58005
58005
|
});
|
|
@@ -58415,11 +58415,13 @@ class ClickMenu {
|
|
|
58415
58415
|
});
|
|
58416
58416
|
|
|
58417
58417
|
me.myEventCls.onIds("#" + me.pre + "mn6_cameraPers", "click", function(e) { let ic = me.icn3d; //e.preventDefault();
|
|
58418
|
+
ic.bChangeCamera = true;
|
|
58418
58419
|
ic.setOptionCls.setOption('camera', 'perspective');
|
|
58419
58420
|
thisClass.setLogCmd('set camera perspective', true);
|
|
58420
58421
|
});
|
|
58421
58422
|
|
|
58422
58423
|
me.myEventCls.onIds("#" + me.pre + "mn6_cameraOrth", "click", function(e) { let ic = me.icn3d; //e.preventDefault();
|
|
58424
|
+
ic.bChangeCamera = true;
|
|
58423
58425
|
ic.setOptionCls.setOption('camera', 'orthographic');
|
|
58424
58426
|
thisClass.setLogCmd('set camera orthographic', true);
|
|
58425
58427
|
});
|
|
@@ -59369,7 +59371,7 @@ class SetMenu {
|
|
|
59369
59371
|
html += this.getLink('mn1_mmcifid', 'RCSB mmCIF ID ' + me.htmlCls.wifiStr, undefined, 2);
|
|
59370
59372
|
//html += this.getLink('mn1_gi', 'NCBI gi ' + me.htmlCls.wifiStr, undefined, 2);
|
|
59371
59373
|
|
|
59372
|
-
html += this.getLink('mn1_cid', 'PubChem CID/Name/
|
|
59374
|
+
html += this.getLink('mn1_cid', 'PubChem CID/Name/InChI ' + me.htmlCls.wifiStr, 1, 2);
|
|
59373
59375
|
html += this.getLink('mn1_smiles', 'Chemical SMILES ', undefined, 2);
|
|
59374
59376
|
|
|
59375
59377
|
html += "</ul>";
|
|
@@ -59737,9 +59739,9 @@ class SetMenu {
|
|
|
59737
59739
|
|
|
59738
59740
|
html += this.getMenuText('mn2_rotate90', 'Rotate 90°', undefined, undefined, 2);
|
|
59739
59741
|
html += "<ul>";
|
|
59740
|
-
html += this.getRadio('mn6_rotate90', 'mn6_rotatex', 'rotate x', undefined, undefined,
|
|
59741
|
-
html += this.getRadio('mn6_rotate90', 'mn6_rotatey', 'rotate y', undefined, undefined,
|
|
59742
|
-
html += this.getRadio('mn6_rotate90', 'mn6_rotatez', 'rotate z', undefined, undefined,
|
|
59742
|
+
html += this.getRadio('mn6_rotate90', 'mn6_rotatex', 'rotate x', undefined, undefined, 3);
|
|
59743
|
+
html += this.getRadio('mn6_rotate90', 'mn6_rotatey', 'rotate y', undefined, undefined, 3);
|
|
59744
|
+
html += this.getRadio('mn6_rotate90', 'mn6_rotatez', 'rotate z', undefined, undefined, 3);
|
|
59743
59745
|
html += "</ul>";
|
|
59744
59746
|
html += "</li>";
|
|
59745
59747
|
html += this.getMenuText('mn2_rotateauto', 'Auto Rotation', undefined, 1, 2);
|
|
@@ -61823,7 +61825,7 @@ class SetDialog {
|
|
|
61823
61825
|
|
|
61824
61826
|
html += me.htmlCls.divStr + "dl_mmdbafid' class='" + dialogClass + "' style='max-width:600px'>";
|
|
61825
61827
|
html += this.addNotebookTitle('dl_mmdbafid', 'Please input a list of PDB/AlphaFold IDs');
|
|
61826
|
-
html += "List of PDB, MMDB, or AlphaFold UniProt structures: " + me.htmlCls.inputTextStr + "id='" + me.pre + "mmdbafid' placeholder='e.g., 1HHO,
|
|
61828
|
+
html += "List of PDB, MMDB, or AlphaFold UniProt structures: " + me.htmlCls.inputTextStr + "id='" + me.pre + "mmdbafid' placeholder='e.g., 1HHO,pdb_00004n7n,P69905,P01942' size=30> <br><br>";
|
|
61827
61829
|
html += "<div style='display:inline-block; width:20px'></div>" + me.htmlCls.buttonStr + "reload_mmdbaf' style='width:150px'>Load Biological Unit</button>" + me.htmlCls.buttonStr + "reload_mmdbaf_asym' style='margin-left:30px; width:250px'>Load Asymmetric Unit (All Chains)</button>" + "<br/><br/>";
|
|
61828
61830
|
html += "<div style='display:inline-block; width:20px'>or</div>" + me.htmlCls.buttonStr + "reload_mmdbaf_append' style='width:150px'>Append Biological Unit</button>" + me.htmlCls.buttonStr + "reload_mmdbaf_asym_append' style='margin-left:30px; width:250px'>Append Asymmetric Unit (All Chains)</button>" + "<br/><br/>";
|
|
61829
61831
|
|
|
@@ -61870,7 +61872,7 @@ class SetDialog {
|
|
|
61870
61872
|
|
|
61871
61873
|
html += me.htmlCls.divStr + "dl_cid' class='" + dialogClass + "'>";
|
|
61872
61874
|
html += this.addNotebookTitle('dl_cid', 'Please input a PubChem Compound');
|
|
61873
|
-
html += "PubChem CID/Name/
|
|
61875
|
+
html += "PubChem CID/Name/InChI: " + me.htmlCls.inputTextStr + "id='" + me.pre + "cid' value='2244' size=8> ";
|
|
61874
61876
|
html += me.htmlCls.buttonStr + "reload_cid'>Load</button>";
|
|
61875
61877
|
html += "</div>";
|
|
61876
61878
|
|
|
@@ -61900,7 +61902,6 @@ class SetDialog {
|
|
|
61900
61902
|
|
|
61901
61903
|
html += me.htmlCls.divStr + "dl_video' class='" + dialogClass + "'>";
|
|
61902
61904
|
html += this.addNotebookTitle('dl_video', 'Save canvas changes in a video');
|
|
61903
|
-
html += "State file: " + me.htmlCls.inputFileStr + "id='" + me.pre + "state'><br/>";
|
|
61904
61905
|
html += me.htmlCls.buttonStr + "video_start' style='margin-top: 6px;'>Video Start</button>";
|
|
61905
61906
|
html += me.htmlCls.buttonStr + "video_end' style='margin: 6px 0px 0px 30px;'>Video End</button>";
|
|
61906
61907
|
html += "</div>";
|
|
@@ -63434,7 +63435,7 @@ class Events {
|
|
|
63434
63435
|
ic.cam.quaternion.setFromUnitVectors(new Vector3$1(0, 0, -1), new Vector3$1(directionArray[0], directionArray[1], directionArray[2]));
|
|
63435
63436
|
ic.cam.up.set(upvectorArray[0], upvectorArray[1], upvectorArray[2]);
|
|
63436
63437
|
ic.cam.fov = fov;
|
|
63437
|
-
//ic.container.whratio = aspect;
|
|
63438
|
+
// ic.container.whratio = aspect;
|
|
63438
63439
|
|
|
63439
63440
|
ic.drawCls.applyTransformation(ic._zoomFactor, ic.mouseChange, ic.quaternion);
|
|
63440
63441
|
ic.drawCls.render();
|
|
@@ -63780,7 +63781,7 @@ class Events {
|
|
|
63780
63781
|
me.myEventCls.onIds(["#" + me.pre + "show_2ddgm", "#" + me.pre + "mn2_2ddgm"], "click", async function(e) { let ic = me.icn3d;
|
|
63781
63782
|
me.htmlCls.dialogCls.openDlg('dl_2ddgm', '2D Diagram');
|
|
63782
63783
|
await ic.viewInterPairsCls.retrieveInteractionData();
|
|
63783
|
-
thisClass.setLogCmd("view
|
|
63784
|
+
thisClass.setLogCmd("view 2d diagram", true);
|
|
63784
63785
|
});
|
|
63785
63786
|
|
|
63786
63787
|
me.myEventCls.onIds("#" + me.pre + "mn2_2ddepiction", "click", async function(e) { let ic = me.icn3d;
|
|
@@ -64018,7 +64019,7 @@ class Events {
|
|
|
64018
64019
|
e.preventDefault();
|
|
64019
64020
|
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
64020
64021
|
|
|
64021
|
-
let alignment = $("#" + me.pre + "chainalignids").val();
|
|
64022
|
+
let alignment = $("#" + me.pre + "chainalignids").val().replace(/\s/g, '');
|
|
64022
64023
|
let alignment_final = thisClass.convertUniProtInChains(alignment);
|
|
64023
64024
|
|
|
64024
64025
|
thisClass.setLogCmd("load chains " + alignment_final + " on asymmetric unit | residues | resdef ", false);
|
|
@@ -64030,7 +64031,7 @@ class Events {
|
|
|
64030
64031
|
e.preventDefault();
|
|
64031
64032
|
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
64032
64033
|
|
|
64033
|
-
let alignment = $("#" + me.pre + "chainalignids2").val();
|
|
64034
|
+
let alignment = $("#" + me.pre + "chainalignids2").val().replace(/\s/g, '');
|
|
64034
64035
|
let alignment_final = thisClass.convertUniProtInChains(alignment);
|
|
64035
64036
|
let resalign = $("#" + me.pre + "resalignids").val();
|
|
64036
64037
|
|
|
@@ -64043,7 +64044,7 @@ class Events {
|
|
|
64043
64044
|
e.preventDefault();
|
|
64044
64045
|
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
64045
64046
|
|
|
64046
|
-
let alignment = $("#" + me.pre + "chainalignids3").val();
|
|
64047
|
+
let alignment = $("#" + me.pre + "chainalignids3").val().replace(/\s/g, '');
|
|
64047
64048
|
let alignment_final = thisClass.convertUniProtInChains(alignment);
|
|
64048
64049
|
|
|
64049
64050
|
let predefinedres = $("#" + me.pre + "predefinedres").val().trim().replace(/\n/g, ': ');
|
|
@@ -64061,7 +64062,7 @@ class Events {
|
|
|
64061
64062
|
e.preventDefault();
|
|
64062
64063
|
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
64063
64064
|
|
|
64064
|
-
let alignment = $("#" + me.pre + "chainalignids4").val();
|
|
64065
|
+
let alignment = $("#" + me.pre + "chainalignids4").val().replace(/\s/g, '');
|
|
64065
64066
|
let alignment_final = thisClass.convertUniProtInChains(alignment);
|
|
64066
64067
|
|
|
64067
64068
|
let predefinedres = $("#" + me.pre + "predefinedres2").val().trim().replace(/\n/g, ': ');
|
|
@@ -64070,7 +64071,8 @@ class Events {
|
|
|
64070
64071
|
return;
|
|
64071
64072
|
}
|
|
64072
64073
|
|
|
64073
|
-
me.cfg.resdef = predefinedres.replace(/:/gi, ';');
|
|
64074
|
+
// me.cfg.resdef = predefinedres.replace(/:/gi, ';');
|
|
64075
|
+
me.cfg.resdef = predefinedres;
|
|
64074
64076
|
|
|
64075
64077
|
let bRealign = true, bPredefined = true;
|
|
64076
64078
|
let chainidArray = alignment_final.split(',');
|
|
@@ -65350,7 +65352,6 @@ class Events {
|
|
|
65350
65352
|
});
|
|
65351
65353
|
me.myEventCls.onIds("#" + me.pre + "applypick_aroundsphere", "click", function(e) { let ic = me.icn3d;
|
|
65352
65354
|
//e.preventDefault();
|
|
65353
|
-
|
|
65354
65355
|
let radius = parseFloat($("#" + me.pre + "radius_aroundsphere").val());
|
|
65355
65356
|
let nameArray = $("#" + me.pre + "atomsCustomSphere").val();
|
|
65356
65357
|
let nameArray2 = $("#" + me.pre + "atomsCustomSphere2").val();
|
|
@@ -74154,8 +74155,13 @@ class Scene {
|
|
|
74154
74155
|
|
|
74155
74156
|
ic.fogCls.setFog();
|
|
74156
74157
|
|
|
74157
|
-
if(ic.
|
|
74158
|
+
if(!ic.cam || ic.bChangeCamera) {
|
|
74158
74159
|
ic.cameraCls.setCamera();
|
|
74160
|
+
// set the ratio for view point, which was set in ic.transformCls.resetOrientation_base
|
|
74161
|
+
if(!ic.container.whratio) {
|
|
74162
|
+
ic.container.whratio = me.htmlCls.WIDTH / me.htmlCls.HEIGHT;
|
|
74163
|
+
ic.cam.aspect = ic.container.whratio;
|
|
74164
|
+
}
|
|
74159
74165
|
}
|
|
74160
74166
|
|
|
74161
74167
|
if(ic.opts['slab'] === 'yes') ic.cameraCls.setSlab();
|
|
@@ -78611,8 +78617,8 @@ class Tube {
|
|
|
78611
78617
|
}
|
|
78612
78618
|
}
|
|
78613
78619
|
|
|
78614
|
-
// add one more residue if only one residue is available
|
|
78615
|
-
if(pnts.length == 1 && ic.residues.hasOwnProperty(nextoneResid)) {
|
|
78620
|
+
// add one more residue if only one residue is available and it's not part of helix/sheet
|
|
78621
|
+
if(pnts.length == 1 && ic.residues.hasOwnProperty(nextoneResid) && atom.ss == 'coil') {
|
|
78616
78622
|
let nextAtom = ic.firstAtomObjCls.getAtomFromResi(nextoneResid, atomName);
|
|
78617
78623
|
|
|
78618
78624
|
if(nextAtom) {
|
|
@@ -83392,8 +83398,10 @@ class ApplyCenter {
|
|
|
83392
83398
|
|
|
83393
83399
|
//ic.container.widthInv = 1 / (ic.scaleFactor*width);
|
|
83394
83400
|
//ic.container.heightInv = 1 / (ic.scaleFactor*height);
|
|
83395
|
-
|
|
83396
|
-
|
|
83401
|
+
if(ic.cam) {
|
|
83402
|
+
ic.container.whratio = width / height;
|
|
83403
|
+
ic.cam.aspect = ic.container.whratio;
|
|
83404
|
+
}
|
|
83397
83405
|
}
|
|
83398
83406
|
}
|
|
83399
83407
|
|
|
@@ -86357,7 +86365,7 @@ class Alternate {
|
|
|
86357
86365
|
}
|
|
86358
86366
|
|
|
86359
86367
|
ic.bShowHighlight = false;
|
|
86360
|
-
|
|
86368
|
+
ic.opts['rotationcenter'] = 'highlight center';
|
|
86361
86369
|
}
|
|
86362
86370
|
|
|
86363
86371
|
// also alternating the surfaces
|
|
@@ -86465,7 +86473,6 @@ class Alternate {
|
|
|
86465
86473
|
this.applyTransformation(ic._zoomFactor, ic.mouseChange, ic.quaternion);
|
|
86466
86474
|
this.render(bVrAr);
|
|
86467
86475
|
}
|
|
86468
|
-
|
|
86469
86476
|
//ic.impostorCls.clearImpostors();
|
|
86470
86477
|
|
|
86471
86478
|
// show membranes
|
|
@@ -92728,7 +92735,8 @@ class AnnoSnpClinVar {
|
|
|
92728
92735
|
|
|
92729
92736
|
let snpResn = snpStr.substr(posSymbol - 1, 1);
|
|
92730
92737
|
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[chnid + '_' + realResi]);
|
|
92731
|
-
|
|
92738
|
+
// let oneLetterRes = (atom) ? me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3)) : ''; // !!!
|
|
92739
|
+
let oneLetterRes = (atom) ? me.utilsCls.residueName2Abbr(atom.resn) : '';
|
|
92732
92740
|
if(!bFromClinVarDb && ic.chainsSeq[chnid][resi - 1]) {
|
|
92733
92741
|
oneLetterRes = ic.chainsSeq[chnid][resi - 1].name;
|
|
92734
92742
|
}
|
|
@@ -96858,7 +96866,8 @@ class Annotation {
|
|
|
96858
96866
|
|
|
96859
96867
|
let atom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.chains[chainid]);
|
|
96860
96868
|
if(atom && atom.resn !== undefined) {
|
|
96861
|
-
let oneLetterRes = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
|
|
96869
|
+
// let oneLetterRes = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
|
|
96870
|
+
let oneLetterRes = me.utilsCls.residueName2Abbr(atom.resn);
|
|
96862
96871
|
$("#" + ic.pre + "anno_" + oneLetterRes).show();
|
|
96863
96872
|
}
|
|
96864
96873
|
}
|
|
@@ -101062,23 +101071,27 @@ class ShowInter {
|
|
|
101062
101071
|
ic.hAtoms[i] = 1;
|
|
101063
101072
|
}
|
|
101064
101073
|
}
|
|
101074
|
+
|
|
101065
101075
|
// do not change the set of displaying atoms
|
|
101066
101076
|
//ic.dAtoms = me.hashUtilsCls.cloneHash(ic.atoms);
|
|
101067
101077
|
let commandname, commanddesc, commandname2;
|
|
101068
101078
|
let firstAtom = ic.firstAtomObjCls.getFirstAtomObj(atomlistTarget);
|
|
101069
101079
|
|
|
101070
101080
|
if(firstAtom !== undefined) {
|
|
101071
|
-
commandname = "sphere." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + radius + "A";
|
|
101081
|
+
// commandname = "sphere." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + radius + "A";
|
|
101082
|
+
commandname = "sphere." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn).trim() + firstAtom.resi + "-" + radius + "A";
|
|
101072
101083
|
//sometimes firstAtom.resi changed, thus we add a general name
|
|
101073
101084
|
commandname2 = "sphere-" + radius + "A";
|
|
101074
101085
|
if(bInteraction) {
|
|
101075
|
-
commandname = "interactions." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + $("#" + ic.pre + "contactthreshold").val() + "A";
|
|
101086
|
+
// commandname = "interactions." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + $("#" + ic.pre + "contactthreshold").val() + "A";
|
|
101087
|
+
commandname = "interactions." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn).trim() + firstAtom.resi + "-" + $("#" + ic.pre + "contactthreshold").val() + "A";
|
|
101076
101088
|
commandname2 = "interactions-" + $("#" + ic.pre + "contactthreshold").val() + "A";
|
|
101077
101089
|
}
|
|
101078
101090
|
commanddesc = commandname;
|
|
101079
101091
|
ic.selectionCls.addCustomSelection(residueArray, commandname, commanddesc, select, true);
|
|
101080
101092
|
ic.selectionCls.addCustomSelection(residueArray, commandname2, commanddesc, select, true);
|
|
101081
101093
|
}
|
|
101094
|
+
|
|
101082
101095
|
ic.selectionCls.saveSelectionIfSelected();
|
|
101083
101096
|
ic.drawCls.draw();
|
|
101084
101097
|
}
|
|
@@ -101328,8 +101341,10 @@ class ViewInterPairs {
|
|
|
101328
101341
|
let commandname, commanddesc;
|
|
101329
101342
|
let firstAtom = ic.firstAtomObjCls.getFirstAtomObj(residues);
|
|
101330
101343
|
if(firstAtom !== undefined) {
|
|
101331
|
-
commandname = "sphere." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + radius + "A";
|
|
101332
|
-
|
|
101344
|
+
// commandname = "sphere." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + radius + "A";
|
|
101345
|
+
commandname = "sphere." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn).trim() + firstAtom.resi + "-" + radius + "A";
|
|
101346
|
+
// if(bInteraction) commandname = "interactions." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + $("#" + ic.pre + "contactthreshold").val() + "A";
|
|
101347
|
+
if(bInteraction) commandname = "interactions." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn).trim() + firstAtom.resi + "-" + $("#" + ic.pre + "contactthreshold").val() + "A";
|
|
101333
101348
|
commanddesc = commandname;
|
|
101334
101349
|
ic.selectionCls.addCustomSelection(residueArray, commandname, commanddesc, select, true);
|
|
101335
101350
|
}
|
|
@@ -101340,6 +101355,7 @@ class ViewInterPairs {
|
|
|
101340
101355
|
tableHtml += this.exportSpherePairs(true, type, labelType);
|
|
101341
101356
|
} // same set
|
|
101342
101357
|
}
|
|
101358
|
+
|
|
101343
101359
|
ic.hAtoms = me.hashUtilsCls.cloneHash(hAtoms);
|
|
101344
101360
|
ic.bRender = true;
|
|
101345
101361
|
//ic.hlUpdateCls.updateHlAll();
|
|
@@ -103304,7 +103320,6 @@ class ChainalignParser {
|
|
|
103304
103320
|
for(let i = 0, il = dataArray.length; i < il; ++i) {
|
|
103305
103321
|
let mmdbid_q = struArray[i];
|
|
103306
103322
|
let index = indexArray[i];
|
|
103307
|
-
|
|
103308
103323
|
this.transformStructure(mmdbid_q, index, 'query');
|
|
103309
103324
|
}
|
|
103310
103325
|
|
|
@@ -103535,7 +103550,8 @@ class ChainalignParser {
|
|
|
103535
103550
|
|
|
103536
103551
|
transformStructure(mmdbid, index, alignType, bForce) { let ic = this.icn3d, me = ic.icn3dui;
|
|
103537
103552
|
let chainidArray = ic.structures[mmdbid];
|
|
103538
|
-
|
|
103553
|
+
if(!chainidArray) return;
|
|
103554
|
+
|
|
103539
103555
|
for(let i = 0, il = chainidArray.length; i < il; ++i) {
|
|
103540
103556
|
for(let serial in ic.chains[chainidArray[i]]) {
|
|
103541
103557
|
let atm = ic.atoms[serial];
|
|
@@ -103670,6 +103686,8 @@ class ChainalignParser {
|
|
|
103670
103686
|
addPostfixForStructureids(structArray) { let ic = this.icn3d; ic.icn3dui;
|
|
103671
103687
|
let struct2cnt = {};
|
|
103672
103688
|
for(let i = 0, il = structArray.length; i < il; ++i) {
|
|
103689
|
+
if(structArray[i].toLowerCase().toLowerCase().substr(0,8) == 'pdb_0000') structArray[i] = structArray[i].substr(8); // temperary support long PDB ID such as pdb_00001tup
|
|
103690
|
+
|
|
103673
103691
|
let struct = structArray[i].toUpperCase();
|
|
103674
103692
|
|
|
103675
103693
|
if(!struct2cnt.hasOwnProperty(struct)) {
|
|
@@ -104054,6 +104072,8 @@ class ChainalignParser {
|
|
|
104054
104072
|
}
|
|
104055
104073
|
else {
|
|
104056
104074
|
for(let i = 0, il = structArrayTmp.length; i < il; ++i) {
|
|
104075
|
+
if(structArrayTmp[i].toLowerCase().substr(0,8) == 'pdb_0000') structArrayTmp[i] = structArrayTmp[i].substr(8); // temperary support long PDB ID such as pdb_00001tup
|
|
104076
|
+
|
|
104057
104077
|
let id = structArrayTmp[i].toUpperCase();
|
|
104058
104078
|
if(!ic.structures.hasOwnProperty(id)) structArray.push(structArrayTmp[i]);
|
|
104059
104079
|
}
|
|
@@ -104147,7 +104167,7 @@ class ChainalignParser {
|
|
|
104147
104167
|
targetOrQuery = 'query';
|
|
104148
104168
|
bAppend = true;
|
|
104149
104169
|
}
|
|
104150
|
-
|
|
104170
|
+
console.log("### i " + i + " structArray[i] " + structArray[i]);
|
|
104151
104171
|
//if(structArray[i].length > 4) {
|
|
104152
104172
|
if(isNaN(structArray[i]) && structArray[i].length > 5) { // PDB ID plus postfix could be 5
|
|
104153
104173
|
//let bNoDssp = true;
|
|
@@ -104165,8 +104185,8 @@ class ChainalignParser {
|
|
|
104165
104185
|
// hAtoms = me.hashUtilsCls.unionHash(hAtoms, hAtomsTmp);
|
|
104166
104186
|
}
|
|
104167
104187
|
|
|
104168
|
-
let structArrayAll = Object.keys(ic.structures);
|
|
104169
|
-
|
|
104188
|
+
let structArrayAll = structArray; //Object.keys(ic.structures);
|
|
104189
|
+
console.log("### ic.chains: " + JSON.stringify(ic.chains) + " ic.structures " + JSON.stringify(ic.structures));
|
|
104170
104190
|
ic.opts['color'] = (structArrayAll.length > 1) ? 'structure' : ((structArrayAll[0].length > 5) ? 'confidence' : 'chain');
|
|
104171
104191
|
|
|
104172
104192
|
// add color for all structures
|
|
@@ -105922,7 +105942,6 @@ class MmdbParser {
|
|
|
105922
105942
|
|
|
105923
105943
|
hAtoms = ic.loadAtomDataCls.loadAtomDataIn(data, pdbid, 'mmdbid', undefined, type, chainid, chainIndex, bLastQuery, bNoTransformNoSeqalign);
|
|
105924
105944
|
}
|
|
105925
|
-
|
|
105926
105945
|
// show ligand-protein interaction
|
|
105927
105946
|
if(me.cfg.ligand) { // sid123059722
|
|
105928
105947
|
for(let chainid in ic.chainid2sid) {
|
|
@@ -105994,7 +106013,6 @@ class MmdbParser {
|
|
|
105994
106013
|
}
|
|
105995
106014
|
} // for each domainArray
|
|
105996
106015
|
} // for each molid
|
|
105997
|
-
|
|
105998
106016
|
// "asuAtomCount" is defined when: 1) atom count is over the threshold 2) bu=1 3) asu atom count is smaller than biological unit atom count
|
|
105999
106017
|
ic.bAssemblyUseAsu =(data.asuAtomCount !== undefined) ? true : false;
|
|
106000
106018
|
if(type !== undefined) {
|
|
@@ -106128,7 +106146,6 @@ class MmdbParser {
|
|
|
106128
106146
|
//ic.molid2color = molid2color;
|
|
106129
106147
|
//ic.chain2molid = chain2molid;
|
|
106130
106148
|
ic.molid2chain = molid2chain;
|
|
106131
|
-
|
|
106132
106149
|
// small structure with all atoms
|
|
106133
106150
|
// show surface options
|
|
106134
106151
|
$("#" + ic.pre + "accordion5").show();
|
|
@@ -108366,7 +108383,8 @@ class RealignParser {
|
|
|
108366
108383
|
ic.realignResid[chainid] = [];
|
|
108367
108384
|
}
|
|
108368
108385
|
|
|
108369
|
-
ic.realignResid[chainid].push({'resid': chainid + '_' + atom.resi, 'resn': me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3)).substr(0, 1)});
|
|
108386
|
+
// ic.realignResid[chainid].push({'resid': chainid + '_' + atom.resi, 'resn': me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3)).substr(0, 1)});
|
|
108387
|
+
ic.realignResid[chainid].push({'resid': chainid + '_' + atom.resi, 'resn': me.utilsCls.residueName2Abbr(atom.resn).substr(0, 1)});
|
|
108370
108388
|
|
|
108371
108389
|
struct2chain[atom.structure] = atom.structure + '_' + atom.chain;
|
|
108372
108390
|
|
|
@@ -108790,7 +108808,9 @@ let resRangeArray = (me.cfg.resrange) ? decodeURIComponent(me.cfg.resrange).spli
|
|
|
108790
108808
|
let alignAjax;
|
|
108791
108809
|
if(me.cfg.aligntool != 'tmalign') {
|
|
108792
108810
|
let jsonStr_q = ic.domain3dCls.getDomainJsonForAlign(struct2domain[struct2][chainid2]);
|
|
108793
|
-
|
|
108811
|
+
console.log("@@@ realign " + struct1 + " " + chainid1 + " and " + struct2 + " " + chainid2);
|
|
108812
|
+
console.log("@@@ jsonStr_q " + jsonStr_q);
|
|
108813
|
+
console.log("@@@ jsonStr_t " + jsonStr_t);
|
|
108794
108814
|
let dataObj = {'domains1': jsonStr_q, 'domains2': jsonStr_t};
|
|
108795
108815
|
alignAjax = me.getAjaxPostPromise(urlalign, dataObj);
|
|
108796
108816
|
}
|
|
@@ -108924,8 +108944,9 @@ let resRangeArray = (me.cfg.resrange) ? decodeURIComponent(me.cfg.resrange).spli
|
|
|
108924
108944
|
let predefinedResArray, predefinedResPair;
|
|
108925
108945
|
|
|
108926
108946
|
if(bPredefined) {
|
|
108927
|
-
|
|
108928
|
-
predefinedResArray = decodeURIComponent(me.cfg.resdef).trim().replace(/\+/gi, ' ').split('
|
|
108947
|
+
me.cfg.resdef.replace(/; /gi, ': ');
|
|
108948
|
+
predefinedResArray = decodeURIComponent(me.cfg.resdef).trim().replace(/\+/gi, ' ').split(': ');
|
|
108949
|
+
// predefinedResArray = decodeURIComponent(me.cfg.resdef).trim().replace(/\+/gi, ' ').split('; ');
|
|
108929
108950
|
|
|
108930
108951
|
if(predefinedResArray.length != chainidArray.length - 1) {
|
|
108931
108952
|
var aaa = 1; //alert("Please make sure the number of chains and the lines of predefined residues are the same...");
|
|
@@ -111370,7 +111391,8 @@ class LoadAtomData {
|
|
|
111370
111391
|
atm.coord = new Vector3$1(atm.coord.x, atm.coord.y, atm.coord.z);
|
|
111371
111392
|
}
|
|
111372
111393
|
|
|
111373
|
-
let oneLetterRes = me.utilsCls.residueName2Abbr(atm.resn.substr(0, 3));
|
|
111394
|
+
// let oneLetterRes = me.utilsCls.residueName2Abbr(atm.resn.substr(0, 3));
|
|
111395
|
+
let oneLetterRes = me.utilsCls.residueName2Abbr(atm.resn);
|
|
111374
111396
|
|
|
111375
111397
|
if((type === 'mmdbid' || type === 'align') && ic.bFullUi ) {
|
|
111376
111398
|
// set ic.mmdbMolidResid2mmdbChainResi
|
|
@@ -111497,7 +111519,6 @@ class LoadAtomData {
|
|
|
111497
111519
|
let residueid = chainid + '_' + atm.resi;
|
|
111498
111520
|
if(ic.residues[residueid] === undefined) ic.residues[residueid] = {};
|
|
111499
111521
|
ic.residues[residueid][serial] = 1;
|
|
111500
|
-
|
|
111501
111522
|
residueNum = chainNum + '_' + atm.resi;
|
|
111502
111523
|
|
|
111503
111524
|
// different residue
|
|
@@ -111666,7 +111687,6 @@ class LoadAtomData {
|
|
|
111666
111687
|
}
|
|
111667
111688
|
// remove the reference
|
|
111668
111689
|
data.atoms = {};
|
|
111669
|
-
|
|
111670
111690
|
//ic.cnt =(alignType === undefined || alignType === 'target') ? serial : serial - ic.lastTargetSerial;
|
|
111671
111691
|
ic.cnt = serial;
|
|
111672
111692
|
|
|
@@ -112343,7 +112363,7 @@ class SetSeqAlign {
|
|
|
112343
112363
|
}
|
|
112344
112364
|
}
|
|
112345
112365
|
}
|
|
112346
|
-
|
|
112366
|
+
|
|
112347
112367
|
for(let j = 0; j <= end1 - start1; ++j) {
|
|
112348
112368
|
///if(ic.chainsSeq[chainid1] === undefined || ic.chainsSeq[chainid2] === undefined) break;
|
|
112349
112369
|
|
|
@@ -112456,11 +112476,15 @@ class SetSeqAlign {
|
|
|
112456
112476
|
for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
|
|
112457
112477
|
let start1, end1;
|
|
112458
112478
|
|
|
112459
|
-
//
|
|
112460
|
-
|
|
112461
|
-
|
|
112462
|
-
|
|
112463
|
-
|
|
112479
|
+
//ic.qt_start_end is zero-based
|
|
112480
|
+
if(!bRealign && me.cfg.aligntool != 'tmalign') { // vast alignment
|
|
112481
|
+
start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start) - 1;
|
|
112482
|
+
end1 = parseInt(ic.qt_start_end[chainIndex][i].t_end) - 1;
|
|
112483
|
+
}
|
|
112484
|
+
else {
|
|
112485
|
+
start1 = ic.ParserUtilsCls.getResiNCBI(chainid1, ic.qt_start_end[chainIndex][i].t_start) - 1;
|
|
112486
|
+
end1 = ic.ParserUtilsCls.getResiNCBI(chainid1, ic.qt_start_end[chainIndex][i].t_end) - 1;
|
|
112487
|
+
}
|
|
112464
112488
|
|
|
112465
112489
|
for(let j = start1; j <= end1; ++j) {
|
|
112466
112490
|
let resi, resid;
|
|
@@ -112553,7 +112577,6 @@ class SetSeqAlign {
|
|
|
112553
112577
|
resObject.color2 = (resid2range_t[resid]) ? '#FF0000' : me.htmlCls.GREYC; // color by conservation
|
|
112554
112578
|
// resObject.class = (resid2range_t[resid]) ? 'icn3d-align' : 'icn3d-nalign';
|
|
112555
112579
|
resObject.class = (resid2range_t[resid]) ? 'icn3d-cons' : 'icn3d-nalign';
|
|
112556
|
-
|
|
112557
112580
|
ic.alnChainsSeq[chainid1].push(resObject);
|
|
112558
112581
|
|
|
112559
112582
|
if(resid2range_t[resid]) {
|
|
@@ -112712,6 +112735,7 @@ class SetSeqAlign {
|
|
|
112712
112735
|
for(let j = 0, jl = alignedChainIndice.length - 1; j < jl; ++j) {
|
|
112713
112736
|
let chainidTmp = chainidArray[alignedChainIndice[j]];
|
|
112714
112737
|
let gapResObject = this.getResObject(chainidTmp, true);
|
|
112738
|
+
|
|
112715
112739
|
//for(let k = 0, kl = len - nGap; k < kl; ++k) {
|
|
112716
112740
|
for(let k = 0, kl = len; k < kl; ++k) {
|
|
112717
112741
|
ic.alnChainsSeq[chainidTmp].splice(pos_t, 0, gapResObject);
|
|
@@ -112721,12 +112745,12 @@ class SetSeqAlign {
|
|
|
112721
112745
|
//return len - nGap;
|
|
112722
112746
|
}
|
|
112723
112747
|
|
|
112724
|
-
insertNotAlignRes(chainid, start, len, bRealign) { let ic = this.icn3d
|
|
112748
|
+
insertNotAlignRes(chainid, start, len, bRealign) { let ic = this.icn3d, me = ic.icn3dui;
|
|
112725
112749
|
// insert non-aligned residues in query seq
|
|
112726
112750
|
for(let j = 0, jl = len; j < jl; ++j) {
|
|
112727
112751
|
// let resi2 = ic.ParserUtilsCls.getResi(chainid, start + j);
|
|
112728
112752
|
// let resn2 = this.getResn(chainid, start + j);
|
|
112729
|
-
let resi2 = start + j;
|
|
112753
|
+
let resi2 = (bRealign && me.cfg.aligntool == 'tmalign') ? start + j : ic.ParserUtilsCls.getResi(chainid, start + j);
|
|
112730
112754
|
let resn2 = this.getResnFromResi(chainid, resi2);
|
|
112731
112755
|
let resn1 = '-';
|
|
112732
112756
|
let bAlign = false;
|
|
@@ -112735,16 +112759,21 @@ class SetSeqAlign {
|
|
|
112735
112759
|
}
|
|
112736
112760
|
}
|
|
112737
112761
|
|
|
112738
|
-
getTemplatePosFromOriResi(chainid1, start, end, bRealign) { let ic = this.icn3d
|
|
112762
|
+
getTemplatePosFromOriResi(chainid1, start, end, bRealign) { let ic = this.icn3d, me = ic.icn3dui;
|
|
112739
112763
|
// let startResi = ic.ParserUtilsCls.getResi(chainid1, start);
|
|
112740
112764
|
// let endResi = ic.ParserUtilsCls.getResi(chainid1, end);
|
|
112741
|
-
|
|
112742
|
-
|
|
112765
|
+
if(bRealign && me.cfg.aligntool == 'tmalign') { // vast alignment
|
|
112766
|
+
let startResi = start;
|
|
112767
|
+
let endResi = end;
|
|
112743
112768
|
|
|
112744
|
-
|
|
112745
|
-
|
|
112746
|
-
|
|
112747
|
-
|
|
112769
|
+
let result1 = this.getResiPosInTemplate(chainid1, startResi);
|
|
112770
|
+
let result2 = this.getResiPosInTemplate(chainid1, endResi);
|
|
112771
|
+
|
|
112772
|
+
return {"pos1": result1.pos, "pos2": result2.pos};
|
|
112773
|
+
}
|
|
112774
|
+
else {
|
|
112775
|
+
return {"pos1": start, "pos2": end};
|
|
112776
|
+
}
|
|
112748
112777
|
}
|
|
112749
112778
|
|
|
112750
112779
|
mergeTwoSeqForAll(chainidArray, index, alignedChainIndice, resid2range_t, start_t, end_t, bRealign) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -112807,6 +112836,9 @@ class SetSeqAlign {
|
|
|
112807
112836
|
|
|
112808
112837
|
let result;
|
|
112809
112838
|
|
|
112839
|
+
let nGapInTemplate = 0; // number of gaps inserted into the template sequence
|
|
112840
|
+
let startPosInTemplate = 0; // position in the template sequence to start the mapping
|
|
112841
|
+
|
|
112810
112842
|
for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
|
|
112811
112843
|
let start1, start2, end1, end2, resiStart1, start1Pos;
|
|
112812
112844
|
|
|
@@ -112840,6 +112872,8 @@ class SetSeqAlign {
|
|
|
112840
112872
|
|
|
112841
112873
|
// if the mapping does not start from start_t, add gaps to the query seq
|
|
112842
112874
|
if(i == 0) {
|
|
112875
|
+
startPosInTemplate = start1Pos;
|
|
112876
|
+
|
|
112843
112877
|
//result = this.getTemplatePosFromOriResi(chainid1, start_t, start1, bRealign);
|
|
112844
112878
|
result = this.getTemplatePosFromOriResi(chainid1, start_t, start1Pos, bRealign);
|
|
112845
112879
|
pos1 = result.pos1;
|
|
@@ -112862,7 +112896,6 @@ class SetSeqAlign {
|
|
|
112862
112896
|
|
|
112863
112897
|
// insert non-aligned residues in query seq
|
|
112864
112898
|
this.insertNotAlignRes(chainid2, prevIndex2+1, notAlnLen2, bRealign);
|
|
112865
|
-
|
|
112866
112899
|
if(notAlnLen1 >= notAlnLen2) {
|
|
112867
112900
|
// add gaps before the query sequence
|
|
112868
112901
|
for(let j = 0, jl = notAlnLen1 - notAlnLen2; j < jl; ++j) {
|
|
@@ -112872,6 +112905,7 @@ class SetSeqAlign {
|
|
|
112872
112905
|
else {
|
|
112873
112906
|
// check the number of gaps before resiStart1 (n), and insert 'notAlnLen2 - notAlnLen1 - n' gaps
|
|
112874
112907
|
this.addGapAllAlnChains(chainidArray, alignedChainIndice, chainid1, resiStart1, notAlnLen2 - notAlnLen1);
|
|
112908
|
+
nGapInTemplate += (notAlnLen2 - notAlnLen1);
|
|
112875
112909
|
}
|
|
112876
112910
|
}
|
|
112877
112911
|
|
|
@@ -112880,18 +112914,19 @@ class SetSeqAlign {
|
|
|
112880
112914
|
//result = this.getTemplatePosFromOriResi(chainid1, start1Pos, end1Pos, bRealign);
|
|
112881
112915
|
pos1 = result.pos1;
|
|
112882
112916
|
pos2 = result.pos2;
|
|
112883
|
-
|
|
112917
|
+
|
|
112884
112918
|
let k = 0;
|
|
112885
112919
|
if(!ic.chainsMapping[chainid1]) ic.chainsMapping[chainid1] = {};
|
|
112886
112920
|
if(!ic.chainsMapping[chainid2]) ic.chainsMapping[chainid2] = {};
|
|
112921
|
+
let resiAdjust = (bRealign && me.cfg.aligntool == 'tmalign') ? 0 : - startPosInTemplate + nGapInTemplate;
|
|
112887
112922
|
for(let j = pos1; j <= pos2; ++j) {
|
|
112888
112923
|
// inherit the gaps from the template
|
|
112889
|
-
if(ic.alnChainsSeq[chainid1][j].resn == '-') {
|
|
112924
|
+
if(ic.alnChainsSeq[chainid1][j + resiAdjust].resn == '-') {
|
|
112890
112925
|
ic.alnChainsSeq[chainid2].push(gapResObject2);
|
|
112891
112926
|
}
|
|
112892
112927
|
else {
|
|
112893
|
-
let resi1 = (bRealign) ? start1 + k : ic.ParserUtilsCls.getResi(chainid1, start1 + k);
|
|
112894
|
-
let resi2 = (bRealign) ? start2 + k : ic.ParserUtilsCls.getResi(chainid2, start2 + k);
|
|
112928
|
+
let resi1 = (bRealign && me.cfg.aligntool == 'tmalign') ? start1 + k : ic.ParserUtilsCls.getResi(chainid1, start1 + k);
|
|
112929
|
+
let resi2 = (bRealign && me.cfg.aligntool == 'tmalign') ? start2 + k : ic.ParserUtilsCls.getResi(chainid2, start2 + k);
|
|
112895
112930
|
let resn1 = this.getResnFromResi(chainid1, resi1); //this.getResn(chainid1, start1 + k);
|
|
112896
112931
|
let resn2 = this.getResnFromResi(chainid2, resi2); //this.getResn(chainid2, start2 + k);
|
|
112897
112932
|
|
|
@@ -112899,7 +112934,7 @@ class SetSeqAlign {
|
|
|
112899
112934
|
let resObject = this.getResObject(chainid2, false, bAlign, resi2, resn2, resn1);
|
|
112900
112935
|
ic.alnChainsSeq[chainid2].push(resObject);
|
|
112901
112936
|
// update color in the template
|
|
112902
|
-
ic.alnChainsSeq[chainid1][j].color = resObject.color;
|
|
112937
|
+
ic.alnChainsSeq[chainid1][j + resiAdjust].color = resObject.color;
|
|
112903
112938
|
|
|
112904
112939
|
ic.chainsMapping[chainid1][chainid1 + '_' + resi1] = resn1 + resi1;
|
|
112905
112940
|
ic.chainsMapping[chainid2][chainid2 + '_' + resi2] = resn1 + resi1;
|
|
@@ -114239,7 +114274,8 @@ class LoadPDB {
|
|
|
114239
114274
|
|| (ic.nucleotides.hasOwnProperty(serialArray[i]) && (atom.name == "O3'" || atom.name == "O3*")) ) {
|
|
114240
114275
|
if(atom.resi == lastResi) continue; // e.g., Alt A and B
|
|
114241
114276
|
|
|
114242
|
-
let resn = (atom.resn.trim().length > 3) ? atom.resn.trim().substr(0, 3) : atom.resn.trim();
|
|
114277
|
+
// let resn = (atom.resn.trim().length > 3) ? atom.resn.trim().substr(0, 3) : atom.resn.trim();
|
|
114278
|
+
let resn = atom.resn.trim();
|
|
114243
114279
|
if(!me.parasCls.chargeColors.hasOwnProperty(resn)) {
|
|
114244
114280
|
continue; // regular residues
|
|
114245
114281
|
}
|
|
@@ -116015,7 +116051,7 @@ class ApplyCommand {
|
|
|
116015
116051
|
ic.selectionCls.selectAll();
|
|
116016
116052
|
//ic.hlObjectsCls.addHlObjects();
|
|
116017
116053
|
}
|
|
116018
|
-
else if(command == 'show all') {
|
|
116054
|
+
else if(command == 'show all' || command == 'view all') {
|
|
116019
116055
|
ic.selectionCls.showAll();
|
|
116020
116056
|
}
|
|
116021
116057
|
else if(command == 'select complement') {
|
|
@@ -116395,7 +116431,7 @@ class ApplyCommand {
|
|
|
116395
116431
|
ic.applyCenterCls.centerSelection();
|
|
116396
116432
|
ic.drawCls.draw();
|
|
116397
116433
|
}
|
|
116398
|
-
else if(command == 'show selection') {
|
|
116434
|
+
else if(command == 'show selection' || command == 'view selection') {
|
|
116399
116435
|
ic.selectionCls.showSelection();
|
|
116400
116436
|
}
|
|
116401
116437
|
else if(command == 'hide selection') {
|
|
@@ -116438,12 +116474,12 @@ class ApplyCommand {
|
|
|
116438
116474
|
else if(command == 'delete selected sets') {
|
|
116439
116475
|
ic.definedSetsCls.deleteSelectedSets();
|
|
116440
116476
|
}
|
|
116441
|
-
else if(command == 'view interactions') {
|
|
116477
|
+
else if(command == 'view interactions' || command == 'view 2d diagram') {
|
|
116442
116478
|
if(me.cfg.mmdbid !== undefined || me.cfg.gi !== undefined) {
|
|
116443
116479
|
ic.ParserUtilsCls.set2DDiagrams(ic.inputid);
|
|
116444
116480
|
}
|
|
116445
116481
|
}
|
|
116446
|
-
else if(command == 'show annotations all chains') {
|
|
116482
|
+
else if(command == 'show annotations all chains' || command == 'view annotations all chains') {
|
|
116447
116483
|
ic.annotationCls.showAnnoAllChains();
|
|
116448
116484
|
}
|
|
116449
116485
|
|
|
@@ -116505,7 +116541,7 @@ class ApplyCommand {
|
|
|
116505
116541
|
else if(command == 'clear symd symmetry') {
|
|
116506
116542
|
ic.symdArray = [];
|
|
116507
116543
|
}
|
|
116508
|
-
else if(command == 'show axis') {
|
|
116544
|
+
else if(command == 'show axis' || command == 'view axis') {
|
|
116509
116545
|
ic.bAxisOnly = true;
|
|
116510
116546
|
}
|
|
116511
116547
|
|
|
@@ -116953,7 +116989,7 @@ class ApplyCommand {
|
|
|
116953
116989
|
}
|
|
116954
116990
|
}
|
|
116955
116991
|
else if(commandOri.indexOf('display interaction 3d') == 0
|
|
116956
|
-
|| commandOri.indexOf('view interaction pairs') == 0
|
|
116992
|
+
|| commandOri.indexOf('view interaction pairs') == 0 || commandOri.indexOf('show interaction pairs') == 0
|
|
116957
116993
|
|| commandOri.indexOf('save1 interaction pairs') == 0
|
|
116958
116994
|
|| commandOri.indexOf('save2 interaction pairs') == 0
|
|
116959
116995
|
|| commandOri.indexOf('line graph interaction pairs') == 0
|
|
@@ -116961,20 +116997,23 @@ class ApplyCommand {
|
|
|
116961
116997
|
|| commandOri.indexOf('ligplot interaction pairs') == 0
|
|
116962
116998
|
) {
|
|
116963
116999
|
let paraArray = commandOri.split(' | ');
|
|
116964
|
-
if(paraArray.length >=
|
|
117000
|
+
if(paraArray.length >= 2) {
|
|
116965
117001
|
let setNameArray = paraArray[1].split(' ');
|
|
116966
117002
|
|
|
116967
117003
|
if(setNameArray.length == 2) {
|
|
116968
117004
|
let nameArray2 = setNameArray[0].split(',');
|
|
116969
117005
|
let nameArray = setNameArray[1].split(',');
|
|
116970
117006
|
|
|
116971
|
-
let bHbond =
|
|
116972
|
-
|
|
116973
|
-
|
|
117007
|
+
let bHbond = 1, bSaltbridge = 1, bInteraction = 1, bHalogen = 1, bPication = 1, bPistacking = 1;
|
|
117008
|
+
if(paraArray.length >= 3) {
|
|
117009
|
+
bHbond = paraArray[2].indexOf('hbonds') !== -1;
|
|
117010
|
+
bSaltbridge = paraArray[2].indexOf('salt bridge') !== -1;
|
|
117011
|
+
bInteraction = paraArray[2].indexOf('interactions') !== -1;
|
|
116974
117012
|
|
|
116975
|
-
|
|
116976
|
-
|
|
116977
|
-
|
|
117013
|
+
bHalogen = paraArray[2].indexOf('halogen') !== -1;
|
|
117014
|
+
bPication = paraArray[2].indexOf('pi-cation') !== -1;
|
|
117015
|
+
bPistacking = paraArray[2].indexOf('pi-stacking') !== -1;
|
|
117016
|
+
}
|
|
116978
117017
|
|
|
116979
117018
|
let bHbondCalc;
|
|
116980
117019
|
if(paraArray.length >= 4) {
|
|
@@ -117001,7 +117040,7 @@ class ApplyCommand {
|
|
|
117001
117040
|
if(commandOri.indexOf('display interaction 3d') == 0) {
|
|
117002
117041
|
type = '3d';
|
|
117003
117042
|
}
|
|
117004
|
-
else if(commandOri.indexOf('view interaction pairs') == 0) {
|
|
117043
|
+
else if(commandOri.indexOf('view interaction pairs') == 0 || commandOri.indexOf('show interaction pairs') == 0) {
|
|
117005
117044
|
type = 'view';
|
|
117006
117045
|
}
|
|
117007
117046
|
else if(commandOri.indexOf('save1 interaction pairs') == 0) {
|
|
@@ -117361,7 +117400,7 @@ class ApplyCommand {
|
|
|
117361
117400
|
let dataStr = paraArray[1].replace(/\\n/g, '\n');
|
|
117362
117401
|
await ic.refnumCls.parseCustomRefFile(dataStr);
|
|
117363
117402
|
}
|
|
117364
|
-
else if(command.indexOf('show ref number') == 0) {
|
|
117403
|
+
else if(command.indexOf('show ref number') == 0 || command.indexOf('view ref number') == 0) {
|
|
117365
117404
|
ic.bShownRefnum = true;
|
|
117366
117405
|
}
|
|
117367
117406
|
else if(command.indexOf('hide ref number') == 0) {
|
|
@@ -117617,7 +117656,7 @@ class ApplyCommand {
|
|
|
117617
117656
|
else if(cmd.indexOf('set annotation clinvar') == 0) return seqAnnoStr + ': "ClinVar" checkbox';
|
|
117618
117657
|
else if(cmd.indexOf('set annotation snp') == 0) return seqAnnoStr + ': "SNP" checkbox';
|
|
117619
117658
|
else if(cmd.indexOf('set annotation 3ddomain') == 0) return seqAnnoStr + ': "3D Domains" checkbox';
|
|
117620
|
-
else if(cmd.indexOf('view interactions') == 0) return 'Windows > View 2D Diagram';
|
|
117659
|
+
else if(cmd.indexOf('view interactions') == 0 || cmd.indexOf('view 2d diagram') == 0) return 'Windows > View 2D Diagram';
|
|
117621
117660
|
else if(cmd.indexOf('symmetry') == 0) return 'Analysis > Symmetry';
|
|
117622
117661
|
else if(cmd.indexOf('realign on seq align') == 0) return 'File > Realign Selection > on Sequence Alignment';
|
|
117623
117662
|
else if(cmd.indexOf('realign') == 0) return 'File > Realign Selection > Residue by Residue';
|
|
@@ -117709,7 +117748,7 @@ class ApplyCommand {
|
|
|
117709
117748
|
else if(cmd == 'clear all') return 'Select > Clear Selection';
|
|
117710
117749
|
else if(cmd == 'defined sets') return 'Windows > Defined Sets';
|
|
117711
117750
|
else if(cmd == 'delete selected sets') return 'Windows > Defined Sets: "Delete Selected Sets" button';
|
|
117712
|
-
else if(cmd == 'view interactions') return 'Windows > View Interactions';
|
|
117751
|
+
else if(cmd == 'view interactions' || cmd == 'view 2d diagram') return 'Windows > View Interactions';
|
|
117713
117752
|
else if(cmd == 'show annotations all chains') return seqAnnoStr + ': "Show All Chains" button';
|
|
117714
117753
|
else if(cmd == 'save color') return 'Color > Save Color';
|
|
117715
117754
|
else if(cmd == 'apply saved color') return 'Color > Apply Saved Color';
|
|
@@ -117899,12 +117938,10 @@ class DefinedSets {
|
|
|
117899
117938
|
//Set the menu of defined sets with an array of defined names "commandnameArray".
|
|
117900
117939
|
setAtomMenu(commandnameArray) { let ic = this.icn3d; ic.icn3dui;
|
|
117901
117940
|
let html = "";
|
|
117902
|
-
|
|
117903
117941
|
let nameArray1 =(ic.defNames2Residues !== undefined) ? Object.keys(ic.defNames2Residues) : [];
|
|
117904
117942
|
let nameArray2 =(ic.defNames2Atoms !== undefined) ? Object.keys(ic.defNames2Atoms) : [];
|
|
117905
117943
|
|
|
117906
117944
|
let nameArrayTmp = nameArray1.concat(nameArray2).sort();
|
|
117907
|
-
|
|
117908
117945
|
let nameArray = [];
|
|
117909
117946
|
// $.each(nameArrayTmp, function(i, el){
|
|
117910
117947
|
// if($.inArray(el, nameArray) === -1) nameArray.push(el);
|
|
@@ -117922,7 +117959,6 @@ class DefinedSets {
|
|
|
117922
117959
|
// }
|
|
117923
117960
|
// });
|
|
117924
117961
|
// });
|
|
117925
|
-
|
|
117926
117962
|
//for(let i in ic.defNames2Atoms) {
|
|
117927
117963
|
for(let i = 0, il = nameArray.length; i < il; ++i) {
|
|
117928
117964
|
let name = nameArray[i];
|
|
@@ -117953,7 +117989,6 @@ class DefinedSets {
|
|
|
117953
117989
|
html += "<option value='" + name + "' style='color:#" + color + "'>" + name + "</option>";
|
|
117954
117990
|
}
|
|
117955
117991
|
}
|
|
117956
|
-
|
|
117957
117992
|
return html;
|
|
117958
117993
|
}
|
|
117959
117994
|
|
|
@@ -117978,17 +118013,18 @@ class DefinedSets {
|
|
|
117978
118013
|
}
|
|
117979
118014
|
else { // chemicals, etc
|
|
117980
118015
|
let resid = atom.structure + '_' + atom.chain + '_' + atom.resi;
|
|
117981
|
-
|
|
118016
|
+
// let resn = atom.resn.substr(0, 3);
|
|
118017
|
+
let resn = atom.resn;
|
|
117982
118018
|
|
|
117983
118019
|
if(!nonProtNuclResHash[resn]) {
|
|
117984
|
-
nonProtNuclResHash[resn] = ic.residues[resid];
|
|
118020
|
+
nonProtNuclResHash[resn] = me.hashUtilsCls.cloneHash(ic.residues[resid]);
|
|
117985
118021
|
}
|
|
117986
118022
|
else {
|
|
117987
118023
|
nonProtNuclResHash[resn] = me.hashUtilsCls.unionHash(nonProtNuclResHash[atom.resn], ic.residues[resid]);
|
|
117988
118024
|
}
|
|
117989
118025
|
}
|
|
117990
118026
|
}
|
|
117991
|
-
|
|
118027
|
+
|
|
117992
118028
|
// chemicals etc
|
|
117993
118029
|
for(let resn in nonProtNuclResHash) {
|
|
117994
118030
|
ic.defNames2Residues[resn] = Object.keys(ic.firstAtomObjCls.getResiduesFromAtoms(nonProtNuclResHash[resn]));
|
|
@@ -117996,7 +118032,7 @@ class DefinedSets {
|
|
|
117996
118032
|
|
|
117997
118033
|
ic.defNames2Command[resn] = 'select :3' + resn;
|
|
117998
118034
|
}
|
|
117999
|
-
|
|
118035
|
+
|
|
118000
118036
|
// select whole structure
|
|
118001
118037
|
if(ic.structures && Object.keys(ic.structures) == 1) {
|
|
118002
118038
|
let structure = Object.keys(ic.structures)[0];
|
|
@@ -118089,10 +118125,8 @@ class DefinedSets {
|
|
|
118089
118125
|
|
|
118090
118126
|
if(ic.bSetChainsAdvancedMenu === undefined || !ic.bSetChainsAdvancedMenu || ic.bResetSets) {
|
|
118091
118127
|
this.setPredefinedInMenu();
|
|
118092
|
-
|
|
118093
118128
|
ic.bSetChainsAdvancedMenu = true;
|
|
118094
118129
|
}
|
|
118095
|
-
|
|
118096
118130
|
ic.hAtoms = me.hashUtilsCls.cloneHash(prevHAtoms);
|
|
118097
118131
|
ic.dAtoms = me.hashUtilsCls.cloneHash(prevDAtoms);
|
|
118098
118132
|
|
|
@@ -118985,7 +119019,7 @@ class LoadScript {
|
|
|
118985
119019
|
|
|
118986
119020
|
await ic.annotationCls.setAnnoTabAll();
|
|
118987
119021
|
}
|
|
118988
|
-
else if(command.indexOf('view interactions') == 0 && me.cfg.align !== undefined) { // the command may have "|||{"factor"...
|
|
119022
|
+
else if((command.indexOf('view interactions') == 0 || command.indexOf('view 2d diagram') == 0) && me.cfg.align !== undefined) { // the command may have "|||{"factor"...
|
|
118989
119023
|
await thisClass.applyCommandViewinteraction(strArray[0].trim());
|
|
118990
119024
|
}
|
|
118991
119025
|
else if(command.indexOf('view 2d depiction') == 0) { // the command may have "|||{"factor"...
|
|
@@ -119196,7 +119230,7 @@ class LoadScript {
|
|
|
119196
119230
|
thisClass.applyCommand3ddomain(lastCommand);
|
|
119197
119231
|
await ic.annotationCls.setAnnoTabAll();
|
|
119198
119232
|
}
|
|
119199
|
-
else if(lastCommand.indexOf('view interactions') == 0 && me.cfg.align !== undefined) {
|
|
119233
|
+
else if((lastCommand.indexOf('view interactions') == 0 || lastCommand.indexOf('view 2d diagram') == 0) && me.cfg.align !== undefined) {
|
|
119200
119234
|
await thisClass.applyCommandViewinteraction(lastCommand);
|
|
119201
119235
|
}
|
|
119202
119236
|
else if(lastCommand.indexOf('view 2d depiction') == 0) {
|
|
@@ -119657,7 +119691,7 @@ class LoadScript {
|
|
|
119657
119691
|
|
|
119658
119692
|
if(commandTransformation.length == 2 && commandTransformation[1].substr(0,1) == '{') ic.bTransformation = true;
|
|
119659
119693
|
|
|
119660
|
-
ic.transformCls.resetOrientation_base(commandTransformation);
|
|
119694
|
+
// ic.transformCls.resetOrientation_base(commandTransformation);
|
|
119661
119695
|
|
|
119662
119696
|
ic.selectionCls.oneStructurePerWindow();
|
|
119663
119697
|
|
|
@@ -119723,8 +119757,12 @@ class LoadScript {
|
|
|
119723
119757
|
$("#ncbi_logo").hide();
|
|
119724
119758
|
}
|
|
119725
119759
|
|
|
119760
|
+
ic.transformCls.resetOrientation_base(commandTransformation);
|
|
119761
|
+
|
|
119726
119762
|
// an extra render to remove artifacts in transparent surface
|
|
119727
|
-
if(ic.bTransparentSurface && ic.bRender) ic.drawCls.render();
|
|
119763
|
+
// if(ic.bTransparentSurface && ic.bRender) ic.drawCls.render();
|
|
119764
|
+
ic.drawCls.applyTransformation(ic._zoomFactor, ic.mouseChange, ic.quaternion);
|
|
119765
|
+
ic.drawCls.render();
|
|
119728
119766
|
|
|
119729
119767
|
if(me.cfg.imageonly) ic.saveFileCls.saveFile(undefined, 'png', undefined, true);
|
|
119730
119768
|
|
|
@@ -121745,14 +121783,22 @@ class Delphi {
|
|
|
121745
121783
|
let paraArray = command.split(" | ");
|
|
121746
121784
|
|
|
121747
121785
|
let typeArray = paraArray[0].split(" ");
|
|
121748
|
-
let contourArray = paraArray[1].split(" ");
|
|
121749
|
-
let gsizeArray = paraArray[2].split(" ");
|
|
121750
|
-
let saltArray = paraArray[3].split(" ");
|
|
121751
|
-
|
|
121752
121786
|
let type = typeArray[2];
|
|
121753
|
-
|
|
121754
|
-
let gsize =
|
|
121755
|
-
|
|
121787
|
+
|
|
121788
|
+
let contour = 2, gsize = 65, salt = 0.15; // default values for contour, gsize, salt
|
|
121789
|
+
ic.phisurftype = 22; // default value for surface type
|
|
121790
|
+
ic.phisurfop = 1.0; // default value for surface opacity
|
|
121791
|
+
ic.phisurfwf = "no"; // default value for surface wireframe
|
|
121792
|
+
|
|
121793
|
+
if(paraArray.length == 7) {
|
|
121794
|
+
let contourArray = paraArray[1].split(" ");
|
|
121795
|
+
let gsizeArray = paraArray[2].split(" ");
|
|
121796
|
+
let saltArray = paraArray[3].split(" ");
|
|
121797
|
+
|
|
121798
|
+
contour = contourArray[1]; //parseFloat(contourArray[1]);
|
|
121799
|
+
gsize = gsizeArray[1]; //parseInt(gsizeArray[1]);
|
|
121800
|
+
salt = saltArray[1]; //parseFloat(saltArray[1]);
|
|
121801
|
+
}
|
|
121756
121802
|
|
|
121757
121803
|
// The values should be string
|
|
121758
121804
|
$("#" + ic.pre + "delphi1gsize").val(gsize);
|
|
@@ -121769,12 +121815,12 @@ class Delphi {
|
|
|
121769
121815
|
ic.phisurftype = surfaceArray[1];
|
|
121770
121816
|
ic.phisurfop = opacityArray[1]; //parseFloat(opacityArray[1]);
|
|
121771
121817
|
ic.phisurfwf = wireframeArray[1];
|
|
121772
|
-
|
|
121773
|
-
$("#" + ic.pre + "delphi" + "surftype").val(ic.phisurftype);
|
|
121774
|
-
$("#" + ic.pre + "delphi" + "surfop").val(ic.phisurfop);
|
|
121775
|
-
$("#" + ic.pre + "delphi" + "surfwf").val(ic.phisurfwf);
|
|
121776
121818
|
}
|
|
121777
121819
|
|
|
121820
|
+
$("#" + ic.pre + "delphi" + "surftype").val(ic.phisurftype);
|
|
121821
|
+
$("#" + ic.pre + "delphi" + "surfop").val(ic.phisurfop);
|
|
121822
|
+
$("#" + ic.pre + "delphi" + "surfwf").val(ic.phisurfwf);
|
|
121823
|
+
|
|
121778
121824
|
let bSurface =(type == 'surface') ? true : false;
|
|
121779
121825
|
|
|
121780
121826
|
await thisClass.CalcPhi(gsize, salt, contour, bSurface);
|
|
@@ -123312,7 +123358,8 @@ class Dssp {
|
|
|
123312
123358
|
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
123313
123359
|
if(!atom) continue;
|
|
123314
123360
|
|
|
123315
|
-
let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
|
|
123361
|
+
// let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
|
|
123362
|
+
let resn = me.utilsCls.residueName2Abbr(atom.resn);
|
|
123316
123363
|
|
|
123317
123364
|
let domainid = ic.resid2domainid[resid];
|
|
123318
123365
|
let refnumLabel = ic.resid2refnum[resid];
|
|
@@ -123389,7 +123436,8 @@ class Dssp {
|
|
|
123389
123436
|
|
|
123390
123437
|
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
123391
123438
|
if(!atom) continue;
|
|
123392
|
-
let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
|
|
123439
|
+
// let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
|
|
123440
|
+
let resn = me.utilsCls.residueName2Abbr(atom.resn);
|
|
123393
123441
|
|
|
123394
123442
|
if(refnumLabel) {
|
|
123395
123443
|
let refnumStr_ori = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
|
|
@@ -123412,7 +123460,8 @@ class Dssp {
|
|
|
123412
123460
|
|
|
123413
123461
|
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
123414
123462
|
if(!atom) continue;
|
|
123415
|
-
let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
|
|
123463
|
+
// let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
|
|
123464
|
+
let resn = me.utilsCls.residueName2Abbr(atom.resn);
|
|
123416
123465
|
|
|
123417
123466
|
if(refnumLabel) {
|
|
123418
123467
|
let refnumStr_ori = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
|
|
@@ -127682,7 +127731,8 @@ class Ligplot {
|
|
|
127682
127731
|
}
|
|
127683
127732
|
}
|
|
127684
127733
|
|
|
127685
|
-
let oneLetterRes = me.utilsCls.residueName2Abbr(atom2.resn.substr(0, 3));
|
|
127734
|
+
// let oneLetterRes = me.utilsCls.residueName2Abbr(atom2.resn.substr(0, 3));
|
|
127735
|
+
let oneLetterRes = me.utilsCls.residueName2Abbr(atom2.resn);
|
|
127686
127736
|
let resName2 = oneLetterRes + atom2.resi;
|
|
127687
127737
|
let textColor2 = (atom2.color) ? atom2.color.getHexString() : '000';
|
|
127688
127738
|
let lineColor = ic.lineGraphCls.getStrokecolor(undefined, interactionType);
|
|
@@ -128060,11 +128110,12 @@ class Transform {
|
|
|
128060
128110
|
this.icn3d = icn3d;
|
|
128061
128111
|
}
|
|
128062
128112
|
|
|
128063
|
-
resetOrientation_base(commandTransformation) { let ic = this.icn3d
|
|
128113
|
+
resetOrientation_base(commandTransformation) { let ic = this.icn3d, me = ic.icn3dui;
|
|
128064
128114
|
if(commandTransformation.length == 2 && commandTransformation[1].length > 0) {
|
|
128115
|
+
if(commandTransformation[1].substr(0, 4) == 'pos:') ic.bSetCamera = false;
|
|
128116
|
+
|
|
128065
128117
|
if(ic.bSetCamera) { // |||{"factor"...}
|
|
128066
128118
|
let transformation = JSON.parse(commandTransformation[1]);
|
|
128067
|
-
|
|
128068
128119
|
ic._zoomFactor = transformation.factor;
|
|
128069
128120
|
|
|
128070
128121
|
ic.mouseChange.x = transformation.mouseChange.x;
|
|
@@ -128095,6 +128146,12 @@ class Transform {
|
|
|
128095
128146
|
}
|
|
128096
128147
|
}
|
|
128097
128148
|
});
|
|
128149
|
+
|
|
128150
|
+
// set the aspect ratio
|
|
128151
|
+
if(!ic.container.whratio) {
|
|
128152
|
+
ic.container.whratio = me.htmlCls.WIDTH / me.htmlCls.HEIGHT;
|
|
128153
|
+
ic.cam.aspect = ic.container.whratio;
|
|
128154
|
+
}
|
|
128098
128155
|
}
|
|
128099
128156
|
}
|
|
128100
128157
|
else {
|
|
@@ -132204,7 +132261,7 @@ class iCn3D {
|
|
|
132204
132261
|
|
|
132205
132262
|
this.transparentRenderOrder = false; // false: regular transparency; true: expensive renderOrder for each face
|
|
132206
132263
|
|
|
132207
|
-
this.AFUniprotVersion = '
|
|
132264
|
+
this.AFUniprotVersion = 'v6';
|
|
132208
132265
|
this.defaultPdbId = 'stru';
|
|
132209
132266
|
|
|
132210
132267
|
if(!this.icn3dui.bNode) {
|
|
@@ -132793,7 +132850,7 @@ class iCn3DUI {
|
|
|
132793
132850
|
//even when multiple iCn3D viewers are shown together.
|
|
132794
132851
|
this.pre = this.cfg.divid + "_";
|
|
132795
132852
|
|
|
132796
|
-
this.REVISION = '3.45.
|
|
132853
|
+
this.REVISION = '3.45.4';
|
|
132797
132854
|
|
|
132798
132855
|
// In nodejs, iCn3D defines "window = {navigator: {}}", and added window = {navigator: {}, "__THREE__":"177"}
|
|
132799
132856
|
this.bNode = (Object.keys(window).length < 3) ? true : false;
|
|
@@ -133044,18 +133101,21 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
|
|
|
133044
133101
|
await ic.pdbParserCls.downloadUrl(url, type, me.cfg.command);
|
|
133045
133102
|
}
|
|
133046
133103
|
else if(me.cfg.mmtfid !== undefined) {
|
|
133104
|
+
if(me.cfg.mmtfid.toLowerCase().substr(0,8) == 'pdb_0000') me.cfg.mmtfid = me.cfg.mmtfid.substr(8); // temperary support long PDB ID such as pdb_00001tup
|
|
133047
133105
|
ic.inputid = me.cfg.mmtfid;
|
|
133048
133106
|
ic.loadCmd = 'load mmtf ' + me.cfg.mmtfid;
|
|
133049
133107
|
me.htmlCls.clickMenuCls.setLogCmd(ic.loadCmd, true);
|
|
133050
133108
|
await ic.bcifParserCls.downloadBcif(me.cfg.mmtfid);
|
|
133051
133109
|
}
|
|
133052
133110
|
else if(me.cfg.bcifid !== undefined) {
|
|
133111
|
+
if(me.cfg.bcifid.toLowerCase().substr(0,8) == 'pdb_0000') me.cfg.bcifid = me.cfg.bcifid.substr(8); // temperary support long PDB ID such as pdb_00001tup
|
|
133053
133112
|
ic.inputid = me.cfg.bcifid;
|
|
133054
133113
|
ic.loadCmd = 'load bcif ' + me.cfg.bcifid;
|
|
133055
133114
|
me.htmlCls.clickMenuCls.setLogCmd(ic.loadCmd, true);
|
|
133056
133115
|
await ic.bcifParserCls.downloadBcif(me.cfg.bcifid);
|
|
133057
133116
|
}
|
|
133058
133117
|
else if(me.cfg.pdbid !== undefined) {
|
|
133118
|
+
if(me.cfg.pdbid.toLowerCase().substr(0,8) == 'pdb_0000') me.cfg.pdbid = me.cfg.pdbid.substr(8); // temperary support long PDB ID such as pdb_00001tup
|
|
133059
133119
|
ic.inputid = me.cfg.pdbid;
|
|
133060
133120
|
ic.loadCmd = 'load pdb ' + me.cfg.pdbid;
|
|
133061
133121
|
me.htmlCls.clickMenuCls.setLogCmd(ic.loadCmd, true);
|
|
@@ -133078,6 +133138,7 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
|
|
|
133078
133138
|
await ic.opmParserCls.downloadOpm(me.cfg.opmid);
|
|
133079
133139
|
}
|
|
133080
133140
|
else if(me.cfg.mmdbid !== undefined) {
|
|
133141
|
+
if(me.cfg.mmdbid.toLowerCase().substr(0,8) == 'pdb_0000') me.cfg.mmdbid = me.cfg.mmdbid.substr(8); // temperary support long PDB ID such as pdb_00001tup
|
|
133081
133142
|
ic.inputid = me.cfg.mmdbid;
|
|
133082
133143
|
// ic.bNCBI = true;
|
|
133083
133144
|
ic.loadCmd = 'load mmdb ' + me.cfg.mmdbid + ' | parameters ' + me.cfg.inpara;
|
|
@@ -133216,6 +133277,7 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
|
|
|
133216
133277
|
await ic.sdfParserCls.downloadSmiles(me.cfg.smiles);
|
|
133217
133278
|
}
|
|
133218
133279
|
else if(me.cfg.mmcifid !== undefined) {
|
|
133280
|
+
// long PDB ID was supported with mmcifid
|
|
133219
133281
|
ic.inputid = me.cfg.mmcifid;
|
|
133220
133282
|
ic.loadCmd = 'load mmcif ' + me.cfg.mmcifid;
|
|
133221
133283
|
me.htmlCls.clickMenuCls.setLogCmd(ic.loadCmd, true);
|