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.module.js
CHANGED
|
@@ -55057,7 +55057,7 @@ class HashUtilsCls {
|
|
|
55057
55057
|
//Get the union of two hashes "atoms1" and "atoms2". The returned hash has atom index as key and 1 as value.
|
|
55058
55058
|
unionHash(atoms1, atoms2) { let me = this.icn3dui;
|
|
55059
55059
|
// much slower
|
|
55060
|
-
//return me.hashUtilsCls.unionHashNotInPlace(atoms1, atoms2);
|
|
55060
|
+
// return me.hashUtilsCls.unionHashNotInPlace(atoms1, atoms2);
|
|
55061
55061
|
|
|
55062
55062
|
// much faster
|
|
55063
55063
|
return me.hashUtilsCls.unionHashInPlace(atoms1, atoms2);
|
|
@@ -58900,7 +58900,7 @@ class ClickMenu {
|
|
|
58900
58900
|
let sigmafofc = parseFloat($("#" + me.pre + "sigmafofc" ).val());
|
|
58901
58901
|
let type = 'fofc';
|
|
58902
58902
|
//await ic.dsn6ParserCls.dsn6Parser(ic.inputid, type, sigmafofc);
|
|
58903
|
-
await ic.densityCifParserCls.densityCifParser(ic.inputid, type,
|
|
58903
|
+
await ic.densityCifParserCls.densityCifParser(ic.inputid, type, sigmafofc);
|
|
58904
58904
|
//ic.setOptionCls.setOption('map', 'fofc');
|
|
58905
58905
|
thisClass.setLogCmd('set map fofc sigma ' + sigmafofc, true);
|
|
58906
58906
|
});
|
|
@@ -59316,11 +59316,13 @@ class ClickMenu {
|
|
|
59316
59316
|
});
|
|
59317
59317
|
|
|
59318
59318
|
me.myEventCls.onIds("#" + me.pre + "mn6_cameraPers", "click", function(e) { let ic = me.icn3d; //e.preventDefault();
|
|
59319
|
+
ic.bChangeCamera = true;
|
|
59319
59320
|
ic.setOptionCls.setOption('camera', 'perspective');
|
|
59320
59321
|
thisClass.setLogCmd('set camera perspective', true);
|
|
59321
59322
|
});
|
|
59322
59323
|
|
|
59323
59324
|
me.myEventCls.onIds("#" + me.pre + "mn6_cameraOrth", "click", function(e) { let ic = me.icn3d; //e.preventDefault();
|
|
59325
|
+
ic.bChangeCamera = true;
|
|
59324
59326
|
ic.setOptionCls.setOption('camera', 'orthographic');
|
|
59325
59327
|
thisClass.setLogCmd('set camera orthographic', true);
|
|
59326
59328
|
});
|
|
@@ -60270,7 +60272,7 @@ class SetMenu {
|
|
|
60270
60272
|
html += this.getLink('mn1_mmcifid', 'RCSB mmCIF ID ' + me.htmlCls.wifiStr, undefined, 2);
|
|
60271
60273
|
//html += this.getLink('mn1_gi', 'NCBI gi ' + me.htmlCls.wifiStr, undefined, 2);
|
|
60272
60274
|
|
|
60273
|
-
html += this.getLink('mn1_cid', 'PubChem CID/Name/
|
|
60275
|
+
html += this.getLink('mn1_cid', 'PubChem CID/Name/InChI ' + me.htmlCls.wifiStr, 1, 2);
|
|
60274
60276
|
html += this.getLink('mn1_smiles', 'Chemical SMILES ', undefined, 2);
|
|
60275
60277
|
|
|
60276
60278
|
html += "</ul>";
|
|
@@ -60638,9 +60640,9 @@ class SetMenu {
|
|
|
60638
60640
|
|
|
60639
60641
|
html += this.getMenuText('mn2_rotate90', 'Rotate 90°', undefined, undefined, 2);
|
|
60640
60642
|
html += "<ul>";
|
|
60641
|
-
html += this.getRadio('mn6_rotate90', 'mn6_rotatex', 'rotate x', undefined, undefined,
|
|
60642
|
-
html += this.getRadio('mn6_rotate90', 'mn6_rotatey', 'rotate y', undefined, undefined,
|
|
60643
|
-
html += this.getRadio('mn6_rotate90', 'mn6_rotatez', 'rotate z', undefined, undefined,
|
|
60643
|
+
html += this.getRadio('mn6_rotate90', 'mn6_rotatex', 'rotate x', undefined, undefined, 3);
|
|
60644
|
+
html += this.getRadio('mn6_rotate90', 'mn6_rotatey', 'rotate y', undefined, undefined, 3);
|
|
60645
|
+
html += this.getRadio('mn6_rotate90', 'mn6_rotatez', 'rotate z', undefined, undefined, 3);
|
|
60644
60646
|
html += "</ul>";
|
|
60645
60647
|
html += "</li>";
|
|
60646
60648
|
html += this.getMenuText('mn2_rotateauto', 'Auto Rotation', undefined, 1, 2);
|
|
@@ -62724,7 +62726,7 @@ class SetDialog {
|
|
|
62724
62726
|
|
|
62725
62727
|
html += me.htmlCls.divStr + "dl_mmdbafid' class='" + dialogClass + "' style='max-width:600px'>";
|
|
62726
62728
|
html += this.addNotebookTitle('dl_mmdbafid', 'Please input a list of PDB/AlphaFold IDs');
|
|
62727
|
-
html += "List of PDB, MMDB, or AlphaFold UniProt structures: " + me.htmlCls.inputTextStr + "id='" + me.pre + "mmdbafid' placeholder='e.g., 1HHO,
|
|
62729
|
+
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>";
|
|
62728
62730
|
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/>";
|
|
62729
62731
|
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/>";
|
|
62730
62732
|
|
|
@@ -62771,7 +62773,7 @@ class SetDialog {
|
|
|
62771
62773
|
|
|
62772
62774
|
html += me.htmlCls.divStr + "dl_cid' class='" + dialogClass + "'>";
|
|
62773
62775
|
html += this.addNotebookTitle('dl_cid', 'Please input a PubChem Compound');
|
|
62774
|
-
html += "PubChem CID/Name/
|
|
62776
|
+
html += "PubChem CID/Name/InChI: " + me.htmlCls.inputTextStr + "id='" + me.pre + "cid' value='2244' size=8> ";
|
|
62775
62777
|
html += me.htmlCls.buttonStr + "reload_cid'>Load</button>";
|
|
62776
62778
|
html += "</div>";
|
|
62777
62779
|
|
|
@@ -62801,7 +62803,6 @@ class SetDialog {
|
|
|
62801
62803
|
|
|
62802
62804
|
html += me.htmlCls.divStr + "dl_video' class='" + dialogClass + "'>";
|
|
62803
62805
|
html += this.addNotebookTitle('dl_video', 'Save canvas changes in a video');
|
|
62804
|
-
html += "State file: " + me.htmlCls.inputFileStr + "id='" + me.pre + "state'><br/>";
|
|
62805
62806
|
html += me.htmlCls.buttonStr + "video_start' style='margin-top: 6px;'>Video Start</button>";
|
|
62806
62807
|
html += me.htmlCls.buttonStr + "video_end' style='margin: 6px 0px 0px 30px;'>Video End</button>";
|
|
62807
62808
|
html += "</div>";
|
|
@@ -64335,7 +64336,7 @@ class Events {
|
|
|
64335
64336
|
ic.cam.quaternion.setFromUnitVectors(new Vector3$1(0, 0, -1), new Vector3$1(directionArray[0], directionArray[1], directionArray[2]));
|
|
64336
64337
|
ic.cam.up.set(upvectorArray[0], upvectorArray[1], upvectorArray[2]);
|
|
64337
64338
|
ic.cam.fov = fov;
|
|
64338
|
-
//ic.container.whratio = aspect;
|
|
64339
|
+
// ic.container.whratio = aspect;
|
|
64339
64340
|
|
|
64340
64341
|
ic.drawCls.applyTransformation(ic._zoomFactor, ic.mouseChange, ic.quaternion);
|
|
64341
64342
|
ic.drawCls.render();
|
|
@@ -64681,7 +64682,7 @@ class Events {
|
|
|
64681
64682
|
me.myEventCls.onIds(["#" + me.pre + "show_2ddgm", "#" + me.pre + "mn2_2ddgm"], "click", async function(e) { let ic = me.icn3d;
|
|
64682
64683
|
me.htmlCls.dialogCls.openDlg('dl_2ddgm', '2D Diagram');
|
|
64683
64684
|
await ic.viewInterPairsCls.retrieveInteractionData();
|
|
64684
|
-
thisClass.setLogCmd("view
|
|
64685
|
+
thisClass.setLogCmd("view 2d diagram", true);
|
|
64685
64686
|
});
|
|
64686
64687
|
|
|
64687
64688
|
me.myEventCls.onIds("#" + me.pre + "mn2_2ddepiction", "click", async function(e) { let ic = me.icn3d;
|
|
@@ -64919,7 +64920,7 @@ class Events {
|
|
|
64919
64920
|
e.preventDefault();
|
|
64920
64921
|
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
64921
64922
|
|
|
64922
|
-
let alignment = $("#" + me.pre + "chainalignids").val();
|
|
64923
|
+
let alignment = $("#" + me.pre + "chainalignids").val().replace(/\s/g, '');
|
|
64923
64924
|
let alignment_final = thisClass.convertUniProtInChains(alignment);
|
|
64924
64925
|
|
|
64925
64926
|
thisClass.setLogCmd("load chains " + alignment_final + " on asymmetric unit | residues | resdef ", false);
|
|
@@ -64931,7 +64932,7 @@ class Events {
|
|
|
64931
64932
|
e.preventDefault();
|
|
64932
64933
|
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
64933
64934
|
|
|
64934
|
-
let alignment = $("#" + me.pre + "chainalignids2").val();
|
|
64935
|
+
let alignment = $("#" + me.pre + "chainalignids2").val().replace(/\s/g, '');
|
|
64935
64936
|
let alignment_final = thisClass.convertUniProtInChains(alignment);
|
|
64936
64937
|
let resalign = $("#" + me.pre + "resalignids").val();
|
|
64937
64938
|
|
|
@@ -64944,7 +64945,7 @@ class Events {
|
|
|
64944
64945
|
e.preventDefault();
|
|
64945
64946
|
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
64946
64947
|
|
|
64947
|
-
let alignment = $("#" + me.pre + "chainalignids3").val();
|
|
64948
|
+
let alignment = $("#" + me.pre + "chainalignids3").val().replace(/\s/g, '');
|
|
64948
64949
|
let alignment_final = thisClass.convertUniProtInChains(alignment);
|
|
64949
64950
|
|
|
64950
64951
|
let predefinedres = $("#" + me.pre + "predefinedres").val().trim().replace(/\n/g, ': ');
|
|
@@ -64962,7 +64963,7 @@ class Events {
|
|
|
64962
64963
|
e.preventDefault();
|
|
64963
64964
|
if(!me.cfg.notebook) dialog.dialog( "close" );
|
|
64964
64965
|
|
|
64965
|
-
let alignment = $("#" + me.pre + "chainalignids4").val();
|
|
64966
|
+
let alignment = $("#" + me.pre + "chainalignids4").val().replace(/\s/g, '');
|
|
64966
64967
|
let alignment_final = thisClass.convertUniProtInChains(alignment);
|
|
64967
64968
|
|
|
64968
64969
|
let predefinedres = $("#" + me.pre + "predefinedres2").val().trim().replace(/\n/g, ': ');
|
|
@@ -64971,7 +64972,8 @@ class Events {
|
|
|
64971
64972
|
return;
|
|
64972
64973
|
}
|
|
64973
64974
|
|
|
64974
|
-
me.cfg.resdef = predefinedres.replace(/:/gi, ';');
|
|
64975
|
+
// me.cfg.resdef = predefinedres.replace(/:/gi, ';');
|
|
64976
|
+
me.cfg.resdef = predefinedres;
|
|
64975
64977
|
|
|
64976
64978
|
let bRealign = true, bPredefined = true;
|
|
64977
64979
|
let chainidArray = alignment_final.split(',');
|
|
@@ -66251,7 +66253,6 @@ class Events {
|
|
|
66251
66253
|
});
|
|
66252
66254
|
me.myEventCls.onIds("#" + me.pre + "applypick_aroundsphere", "click", function(e) { let ic = me.icn3d;
|
|
66253
66255
|
//e.preventDefault();
|
|
66254
|
-
|
|
66255
66256
|
let radius = parseFloat($("#" + me.pre + "radius_aroundsphere").val());
|
|
66256
66257
|
let nameArray = $("#" + me.pre + "atomsCustomSphere").val();
|
|
66257
66258
|
let nameArray2 = $("#" + me.pre + "atomsCustomSphere2").val();
|
|
@@ -75055,8 +75056,13 @@ class Scene {
|
|
|
75055
75056
|
|
|
75056
75057
|
ic.fogCls.setFog();
|
|
75057
75058
|
|
|
75058
|
-
if(ic.
|
|
75059
|
+
if(!ic.cam || ic.bChangeCamera) {
|
|
75059
75060
|
ic.cameraCls.setCamera();
|
|
75061
|
+
// set the ratio for view point, which was set in ic.transformCls.resetOrientation_base
|
|
75062
|
+
if(!ic.container.whratio) {
|
|
75063
|
+
ic.container.whratio = me.htmlCls.WIDTH / me.htmlCls.HEIGHT;
|
|
75064
|
+
ic.cam.aspect = ic.container.whratio;
|
|
75065
|
+
}
|
|
75060
75066
|
}
|
|
75061
75067
|
|
|
75062
75068
|
if(ic.opts['slab'] === 'yes') ic.cameraCls.setSlab();
|
|
@@ -79512,8 +79518,8 @@ class Tube {
|
|
|
79512
79518
|
}
|
|
79513
79519
|
}
|
|
79514
79520
|
|
|
79515
|
-
// add one more residue if only one residue is available
|
|
79516
|
-
if(pnts.length == 1 && ic.residues.hasOwnProperty(nextoneResid)) {
|
|
79521
|
+
// add one more residue if only one residue is available and it's not part of helix/sheet
|
|
79522
|
+
if(pnts.length == 1 && ic.residues.hasOwnProperty(nextoneResid) && atom.ss == 'coil') {
|
|
79517
79523
|
let nextAtom = ic.firstAtomObjCls.getAtomFromResi(nextoneResid, atomName);
|
|
79518
79524
|
|
|
79519
79525
|
if(nextAtom) {
|
|
@@ -84293,8 +84299,10 @@ class ApplyCenter {
|
|
|
84293
84299
|
|
|
84294
84300
|
//ic.container.widthInv = 1 / (ic.scaleFactor*width);
|
|
84295
84301
|
//ic.container.heightInv = 1 / (ic.scaleFactor*height);
|
|
84296
|
-
|
|
84297
|
-
|
|
84302
|
+
if(ic.cam) {
|
|
84303
|
+
ic.container.whratio = width / height;
|
|
84304
|
+
ic.cam.aspect = ic.container.whratio;
|
|
84305
|
+
}
|
|
84298
84306
|
}
|
|
84299
84307
|
}
|
|
84300
84308
|
|
|
@@ -87258,7 +87266,7 @@ class Alternate {
|
|
|
87258
87266
|
}
|
|
87259
87267
|
|
|
87260
87268
|
ic.bShowHighlight = false;
|
|
87261
|
-
|
|
87269
|
+
ic.opts['rotationcenter'] = 'highlight center';
|
|
87262
87270
|
}
|
|
87263
87271
|
|
|
87264
87272
|
// also alternating the surfaces
|
|
@@ -87366,7 +87374,6 @@ class Alternate {
|
|
|
87366
87374
|
this.applyTransformation(ic._zoomFactor, ic.mouseChange, ic.quaternion);
|
|
87367
87375
|
this.render(bVrAr);
|
|
87368
87376
|
}
|
|
87369
|
-
|
|
87370
87377
|
//ic.impostorCls.clearImpostors();
|
|
87371
87378
|
|
|
87372
87379
|
// show membranes
|
|
@@ -93629,7 +93636,8 @@ class AnnoSnpClinVar {
|
|
|
93629
93636
|
|
|
93630
93637
|
let snpResn = snpStr.substr(posSymbol - 1, 1);
|
|
93631
93638
|
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[chnid + '_' + realResi]);
|
|
93632
|
-
|
|
93639
|
+
// let oneLetterRes = (atom) ? me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3)) : ''; // !!!
|
|
93640
|
+
let oneLetterRes = (atom) ? me.utilsCls.residueName2Abbr(atom.resn) : '';
|
|
93633
93641
|
if(!bFromClinVarDb && ic.chainsSeq[chnid][resi - 1]) {
|
|
93634
93642
|
oneLetterRes = ic.chainsSeq[chnid][resi - 1].name;
|
|
93635
93643
|
}
|
|
@@ -97759,7 +97767,8 @@ class Annotation {
|
|
|
97759
97767
|
|
|
97760
97768
|
let atom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.chains[chainid]);
|
|
97761
97769
|
if(atom && atom.resn !== undefined) {
|
|
97762
|
-
let oneLetterRes = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
|
|
97770
|
+
// let oneLetterRes = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
|
|
97771
|
+
let oneLetterRes = me.utilsCls.residueName2Abbr(atom.resn);
|
|
97763
97772
|
$("#" + ic.pre + "anno_" + oneLetterRes).show();
|
|
97764
97773
|
}
|
|
97765
97774
|
}
|
|
@@ -101963,23 +101972,27 @@ class ShowInter {
|
|
|
101963
101972
|
ic.hAtoms[i] = 1;
|
|
101964
101973
|
}
|
|
101965
101974
|
}
|
|
101975
|
+
|
|
101966
101976
|
// do not change the set of displaying atoms
|
|
101967
101977
|
//ic.dAtoms = me.hashUtilsCls.cloneHash(ic.atoms);
|
|
101968
101978
|
let commandname, commanddesc, commandname2;
|
|
101969
101979
|
let firstAtom = ic.firstAtomObjCls.getFirstAtomObj(atomlistTarget);
|
|
101970
101980
|
|
|
101971
101981
|
if(firstAtom !== undefined) {
|
|
101972
|
-
commandname = "sphere." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + radius + "A";
|
|
101982
|
+
// commandname = "sphere." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + radius + "A";
|
|
101983
|
+
commandname = "sphere." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn).trim() + firstAtom.resi + "-" + radius + "A";
|
|
101973
101984
|
//sometimes firstAtom.resi changed, thus we add a general name
|
|
101974
101985
|
commandname2 = "sphere-" + radius + "A";
|
|
101975
101986
|
if(bInteraction) {
|
|
101976
|
-
commandname = "interactions." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + $("#" + ic.pre + "contactthreshold").val() + "A";
|
|
101987
|
+
// commandname = "interactions." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + $("#" + ic.pre + "contactthreshold").val() + "A";
|
|
101988
|
+
commandname = "interactions." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn).trim() + firstAtom.resi + "-" + $("#" + ic.pre + "contactthreshold").val() + "A";
|
|
101977
101989
|
commandname2 = "interactions-" + $("#" + ic.pre + "contactthreshold").val() + "A";
|
|
101978
101990
|
}
|
|
101979
101991
|
commanddesc = commandname;
|
|
101980
101992
|
ic.selectionCls.addCustomSelection(residueArray, commandname, commanddesc, select, true);
|
|
101981
101993
|
ic.selectionCls.addCustomSelection(residueArray, commandname2, commanddesc, select, true);
|
|
101982
101994
|
}
|
|
101995
|
+
|
|
101983
101996
|
ic.selectionCls.saveSelectionIfSelected();
|
|
101984
101997
|
ic.drawCls.draw();
|
|
101985
101998
|
}
|
|
@@ -102229,8 +102242,10 @@ class ViewInterPairs {
|
|
|
102229
102242
|
let commandname, commanddesc;
|
|
102230
102243
|
let firstAtom = ic.firstAtomObjCls.getFirstAtomObj(residues);
|
|
102231
102244
|
if(firstAtom !== undefined) {
|
|
102232
|
-
commandname = "sphere." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + radius + "A";
|
|
102233
|
-
|
|
102245
|
+
// commandname = "sphere." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + radius + "A";
|
|
102246
|
+
commandname = "sphere." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn).trim() + firstAtom.resi + "-" + radius + "A";
|
|
102247
|
+
// if(bInteraction) commandname = "interactions." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + $("#" + ic.pre + "contactthreshold").val() + "A";
|
|
102248
|
+
if(bInteraction) commandname = "interactions." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn).trim() + firstAtom.resi + "-" + $("#" + ic.pre + "contactthreshold").val() + "A";
|
|
102234
102249
|
commanddesc = commandname;
|
|
102235
102250
|
ic.selectionCls.addCustomSelection(residueArray, commandname, commanddesc, select, true);
|
|
102236
102251
|
}
|
|
@@ -102241,6 +102256,7 @@ class ViewInterPairs {
|
|
|
102241
102256
|
tableHtml += this.exportSpherePairs(true, type, labelType);
|
|
102242
102257
|
} // same set
|
|
102243
102258
|
}
|
|
102259
|
+
|
|
102244
102260
|
ic.hAtoms = me.hashUtilsCls.cloneHash(hAtoms);
|
|
102245
102261
|
ic.bRender = true;
|
|
102246
102262
|
//ic.hlUpdateCls.updateHlAll();
|
|
@@ -104205,7 +104221,6 @@ class ChainalignParser {
|
|
|
104205
104221
|
for(let i = 0, il = dataArray.length; i < il; ++i) {
|
|
104206
104222
|
let mmdbid_q = struArray[i];
|
|
104207
104223
|
let index = indexArray[i];
|
|
104208
|
-
|
|
104209
104224
|
this.transformStructure(mmdbid_q, index, 'query');
|
|
104210
104225
|
}
|
|
104211
104226
|
|
|
@@ -104436,7 +104451,8 @@ class ChainalignParser {
|
|
|
104436
104451
|
|
|
104437
104452
|
transformStructure(mmdbid, index, alignType, bForce) { let ic = this.icn3d, me = ic.icn3dui;
|
|
104438
104453
|
let chainidArray = ic.structures[mmdbid];
|
|
104439
|
-
|
|
104454
|
+
if(!chainidArray) return;
|
|
104455
|
+
|
|
104440
104456
|
for(let i = 0, il = chainidArray.length; i < il; ++i) {
|
|
104441
104457
|
for(let serial in ic.chains[chainidArray[i]]) {
|
|
104442
104458
|
let atm = ic.atoms[serial];
|
|
@@ -104571,6 +104587,8 @@ class ChainalignParser {
|
|
|
104571
104587
|
addPostfixForStructureids(structArray) { let ic = this.icn3d; ic.icn3dui;
|
|
104572
104588
|
let struct2cnt = {};
|
|
104573
104589
|
for(let i = 0, il = structArray.length; i < il; ++i) {
|
|
104590
|
+
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
|
|
104591
|
+
|
|
104574
104592
|
let struct = structArray[i].toUpperCase();
|
|
104575
104593
|
|
|
104576
104594
|
if(!struct2cnt.hasOwnProperty(struct)) {
|
|
@@ -104955,6 +104973,8 @@ class ChainalignParser {
|
|
|
104955
104973
|
}
|
|
104956
104974
|
else {
|
|
104957
104975
|
for(let i = 0, il = structArrayTmp.length; i < il; ++i) {
|
|
104976
|
+
if(structArrayTmp[i].toLowerCase().substr(0,8) == 'pdb_0000') structArrayTmp[i] = structArrayTmp[i].substr(8); // temperary support long PDB ID such as pdb_00001tup
|
|
104977
|
+
|
|
104958
104978
|
let id = structArrayTmp[i].toUpperCase();
|
|
104959
104979
|
if(!ic.structures.hasOwnProperty(id)) structArray.push(structArrayTmp[i]);
|
|
104960
104980
|
}
|
|
@@ -105048,7 +105068,7 @@ class ChainalignParser {
|
|
|
105048
105068
|
targetOrQuery = 'query';
|
|
105049
105069
|
bAppend = true;
|
|
105050
105070
|
}
|
|
105051
|
-
|
|
105071
|
+
console.log("### i " + i + " structArray[i] " + structArray[i]);
|
|
105052
105072
|
//if(structArray[i].length > 4) {
|
|
105053
105073
|
if(isNaN(structArray[i]) && structArray[i].length > 5) { // PDB ID plus postfix could be 5
|
|
105054
105074
|
//let bNoDssp = true;
|
|
@@ -105066,8 +105086,8 @@ class ChainalignParser {
|
|
|
105066
105086
|
// hAtoms = me.hashUtilsCls.unionHash(hAtoms, hAtomsTmp);
|
|
105067
105087
|
}
|
|
105068
105088
|
|
|
105069
|
-
let structArrayAll = Object.keys(ic.structures);
|
|
105070
|
-
|
|
105089
|
+
let structArrayAll = structArray; //Object.keys(ic.structures);
|
|
105090
|
+
console.log("### ic.chains: " + JSON.stringify(ic.chains) + " ic.structures " + JSON.stringify(ic.structures));
|
|
105071
105091
|
ic.opts['color'] = (structArrayAll.length > 1) ? 'structure' : ((structArrayAll[0].length > 5) ? 'confidence' : 'chain');
|
|
105072
105092
|
|
|
105073
105093
|
// add color for all structures
|
|
@@ -106823,7 +106843,6 @@ class MmdbParser {
|
|
|
106823
106843
|
|
|
106824
106844
|
hAtoms = ic.loadAtomDataCls.loadAtomDataIn(data, pdbid, 'mmdbid', undefined, type, chainid, chainIndex, bLastQuery, bNoTransformNoSeqalign);
|
|
106825
106845
|
}
|
|
106826
|
-
|
|
106827
106846
|
// show ligand-protein interaction
|
|
106828
106847
|
if(me.cfg.ligand) { // sid123059722
|
|
106829
106848
|
for(let chainid in ic.chainid2sid) {
|
|
@@ -106895,7 +106914,6 @@ class MmdbParser {
|
|
|
106895
106914
|
}
|
|
106896
106915
|
} // for each domainArray
|
|
106897
106916
|
} // for each molid
|
|
106898
|
-
|
|
106899
106917
|
// "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
|
|
106900
106918
|
ic.bAssemblyUseAsu =(data.asuAtomCount !== undefined) ? true : false;
|
|
106901
106919
|
if(type !== undefined) {
|
|
@@ -107029,7 +107047,6 @@ class MmdbParser {
|
|
|
107029
107047
|
//ic.molid2color = molid2color;
|
|
107030
107048
|
//ic.chain2molid = chain2molid;
|
|
107031
107049
|
ic.molid2chain = molid2chain;
|
|
107032
|
-
|
|
107033
107050
|
// small structure with all atoms
|
|
107034
107051
|
// show surface options
|
|
107035
107052
|
$("#" + ic.pre + "accordion5").show();
|
|
@@ -109267,7 +109284,8 @@ class RealignParser {
|
|
|
109267
109284
|
ic.realignResid[chainid] = [];
|
|
109268
109285
|
}
|
|
109269
109286
|
|
|
109270
|
-
ic.realignResid[chainid].push({'resid': chainid + '_' + atom.resi, 'resn': me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3)).substr(0, 1)});
|
|
109287
|
+
// ic.realignResid[chainid].push({'resid': chainid + '_' + atom.resi, 'resn': me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3)).substr(0, 1)});
|
|
109288
|
+
ic.realignResid[chainid].push({'resid': chainid + '_' + atom.resi, 'resn': me.utilsCls.residueName2Abbr(atom.resn).substr(0, 1)});
|
|
109271
109289
|
|
|
109272
109290
|
struct2chain[atom.structure] = atom.structure + '_' + atom.chain;
|
|
109273
109291
|
|
|
@@ -109691,7 +109709,9 @@ let resRangeArray = (me.cfg.resrange) ? decodeURIComponent(me.cfg.resrange).spli
|
|
|
109691
109709
|
let alignAjax;
|
|
109692
109710
|
if(me.cfg.aligntool != 'tmalign') {
|
|
109693
109711
|
let jsonStr_q = ic.domain3dCls.getDomainJsonForAlign(struct2domain[struct2][chainid2]);
|
|
109694
|
-
|
|
109712
|
+
console.log("@@@ realign " + struct1 + " " + chainid1 + " and " + struct2 + " " + chainid2);
|
|
109713
|
+
console.log("@@@ jsonStr_q " + jsonStr_q);
|
|
109714
|
+
console.log("@@@ jsonStr_t " + jsonStr_t);
|
|
109695
109715
|
let dataObj = {'domains1': jsonStr_q, 'domains2': jsonStr_t};
|
|
109696
109716
|
alignAjax = me.getAjaxPostPromise(urlalign, dataObj);
|
|
109697
109717
|
}
|
|
@@ -109825,8 +109845,9 @@ let resRangeArray = (me.cfg.resrange) ? decodeURIComponent(me.cfg.resrange).spli
|
|
|
109825
109845
|
let predefinedResArray, predefinedResPair;
|
|
109826
109846
|
|
|
109827
109847
|
if(bPredefined) {
|
|
109828
|
-
|
|
109829
|
-
predefinedResArray = decodeURIComponent(me.cfg.resdef).trim().replace(/\+/gi, ' ').split('
|
|
109848
|
+
me.cfg.resdef.replace(/; /gi, ': ');
|
|
109849
|
+
predefinedResArray = decodeURIComponent(me.cfg.resdef).trim().replace(/\+/gi, ' ').split(': ');
|
|
109850
|
+
// predefinedResArray = decodeURIComponent(me.cfg.resdef).trim().replace(/\+/gi, ' ').split('; ');
|
|
109830
109851
|
|
|
109831
109852
|
if(predefinedResArray.length != chainidArray.length - 1) {
|
|
109832
109853
|
var aaa = 1; //alert("Please make sure the number of chains and the lines of predefined residues are the same...");
|
|
@@ -112271,7 +112292,8 @@ class LoadAtomData {
|
|
|
112271
112292
|
atm.coord = new Vector3$1(atm.coord.x, atm.coord.y, atm.coord.z);
|
|
112272
112293
|
}
|
|
112273
112294
|
|
|
112274
|
-
let oneLetterRes = me.utilsCls.residueName2Abbr(atm.resn.substr(0, 3));
|
|
112295
|
+
// let oneLetterRes = me.utilsCls.residueName2Abbr(atm.resn.substr(0, 3));
|
|
112296
|
+
let oneLetterRes = me.utilsCls.residueName2Abbr(atm.resn);
|
|
112275
112297
|
|
|
112276
112298
|
if((type === 'mmdbid' || type === 'align') && ic.bFullUi ) {
|
|
112277
112299
|
// set ic.mmdbMolidResid2mmdbChainResi
|
|
@@ -112398,7 +112420,6 @@ class LoadAtomData {
|
|
|
112398
112420
|
let residueid = chainid + '_' + atm.resi;
|
|
112399
112421
|
if(ic.residues[residueid] === undefined) ic.residues[residueid] = {};
|
|
112400
112422
|
ic.residues[residueid][serial] = 1;
|
|
112401
|
-
|
|
112402
112423
|
residueNum = chainNum + '_' + atm.resi;
|
|
112403
112424
|
|
|
112404
112425
|
// different residue
|
|
@@ -112567,7 +112588,6 @@ class LoadAtomData {
|
|
|
112567
112588
|
}
|
|
112568
112589
|
// remove the reference
|
|
112569
112590
|
data.atoms = {};
|
|
112570
|
-
|
|
112571
112591
|
//ic.cnt =(alignType === undefined || alignType === 'target') ? serial : serial - ic.lastTargetSerial;
|
|
112572
112592
|
ic.cnt = serial;
|
|
112573
112593
|
|
|
@@ -113244,7 +113264,7 @@ class SetSeqAlign {
|
|
|
113244
113264
|
}
|
|
113245
113265
|
}
|
|
113246
113266
|
}
|
|
113247
|
-
|
|
113267
|
+
|
|
113248
113268
|
for(let j = 0; j <= end1 - start1; ++j) {
|
|
113249
113269
|
///if(ic.chainsSeq[chainid1] === undefined || ic.chainsSeq[chainid2] === undefined) break;
|
|
113250
113270
|
|
|
@@ -113357,11 +113377,15 @@ class SetSeqAlign {
|
|
|
113357
113377
|
for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
|
|
113358
113378
|
let start1, end1;
|
|
113359
113379
|
|
|
113360
|
-
//
|
|
113361
|
-
|
|
113362
|
-
|
|
113363
|
-
|
|
113364
|
-
|
|
113380
|
+
//ic.qt_start_end is zero-based
|
|
113381
|
+
if(!bRealign && me.cfg.aligntool != 'tmalign') { // vast alignment
|
|
113382
|
+
start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start) - 1;
|
|
113383
|
+
end1 = parseInt(ic.qt_start_end[chainIndex][i].t_end) - 1;
|
|
113384
|
+
}
|
|
113385
|
+
else {
|
|
113386
|
+
start1 = ic.ParserUtilsCls.getResiNCBI(chainid1, ic.qt_start_end[chainIndex][i].t_start) - 1;
|
|
113387
|
+
end1 = ic.ParserUtilsCls.getResiNCBI(chainid1, ic.qt_start_end[chainIndex][i].t_end) - 1;
|
|
113388
|
+
}
|
|
113365
113389
|
|
|
113366
113390
|
for(let j = start1; j <= end1; ++j) {
|
|
113367
113391
|
let resi, resid;
|
|
@@ -113454,7 +113478,6 @@ class SetSeqAlign {
|
|
|
113454
113478
|
resObject.color2 = (resid2range_t[resid]) ? '#FF0000' : me.htmlCls.GREYC; // color by conservation
|
|
113455
113479
|
// resObject.class = (resid2range_t[resid]) ? 'icn3d-align' : 'icn3d-nalign';
|
|
113456
113480
|
resObject.class = (resid2range_t[resid]) ? 'icn3d-cons' : 'icn3d-nalign';
|
|
113457
|
-
|
|
113458
113481
|
ic.alnChainsSeq[chainid1].push(resObject);
|
|
113459
113482
|
|
|
113460
113483
|
if(resid2range_t[resid]) {
|
|
@@ -113613,6 +113636,7 @@ class SetSeqAlign {
|
|
|
113613
113636
|
for(let j = 0, jl = alignedChainIndice.length - 1; j < jl; ++j) {
|
|
113614
113637
|
let chainidTmp = chainidArray[alignedChainIndice[j]];
|
|
113615
113638
|
let gapResObject = this.getResObject(chainidTmp, true);
|
|
113639
|
+
|
|
113616
113640
|
//for(let k = 0, kl = len - nGap; k < kl; ++k) {
|
|
113617
113641
|
for(let k = 0, kl = len; k < kl; ++k) {
|
|
113618
113642
|
ic.alnChainsSeq[chainidTmp].splice(pos_t, 0, gapResObject);
|
|
@@ -113622,12 +113646,12 @@ class SetSeqAlign {
|
|
|
113622
113646
|
//return len - nGap;
|
|
113623
113647
|
}
|
|
113624
113648
|
|
|
113625
|
-
insertNotAlignRes(chainid, start, len, bRealign) { let ic = this.icn3d
|
|
113649
|
+
insertNotAlignRes(chainid, start, len, bRealign) { let ic = this.icn3d, me = ic.icn3dui;
|
|
113626
113650
|
// insert non-aligned residues in query seq
|
|
113627
113651
|
for(let j = 0, jl = len; j < jl; ++j) {
|
|
113628
113652
|
// let resi2 = ic.ParserUtilsCls.getResi(chainid, start + j);
|
|
113629
113653
|
// let resn2 = this.getResn(chainid, start + j);
|
|
113630
|
-
let resi2 = start + j;
|
|
113654
|
+
let resi2 = (bRealign && me.cfg.aligntool == 'tmalign') ? start + j : ic.ParserUtilsCls.getResi(chainid, start + j);
|
|
113631
113655
|
let resn2 = this.getResnFromResi(chainid, resi2);
|
|
113632
113656
|
let resn1 = '-';
|
|
113633
113657
|
let bAlign = false;
|
|
@@ -113636,16 +113660,21 @@ class SetSeqAlign {
|
|
|
113636
113660
|
}
|
|
113637
113661
|
}
|
|
113638
113662
|
|
|
113639
|
-
getTemplatePosFromOriResi(chainid1, start, end, bRealign) { let ic = this.icn3d
|
|
113663
|
+
getTemplatePosFromOriResi(chainid1, start, end, bRealign) { let ic = this.icn3d, me = ic.icn3dui;
|
|
113640
113664
|
// let startResi = ic.ParserUtilsCls.getResi(chainid1, start);
|
|
113641
113665
|
// let endResi = ic.ParserUtilsCls.getResi(chainid1, end);
|
|
113642
|
-
|
|
113643
|
-
|
|
113666
|
+
if(bRealign && me.cfg.aligntool == 'tmalign') { // vast alignment
|
|
113667
|
+
let startResi = start;
|
|
113668
|
+
let endResi = end;
|
|
113644
113669
|
|
|
113645
|
-
|
|
113646
|
-
|
|
113647
|
-
|
|
113648
|
-
|
|
113670
|
+
let result1 = this.getResiPosInTemplate(chainid1, startResi);
|
|
113671
|
+
let result2 = this.getResiPosInTemplate(chainid1, endResi);
|
|
113672
|
+
|
|
113673
|
+
return {"pos1": result1.pos, "pos2": result2.pos};
|
|
113674
|
+
}
|
|
113675
|
+
else {
|
|
113676
|
+
return {"pos1": start, "pos2": end};
|
|
113677
|
+
}
|
|
113649
113678
|
}
|
|
113650
113679
|
|
|
113651
113680
|
mergeTwoSeqForAll(chainidArray, index, alignedChainIndice, resid2range_t, start_t, end_t, bRealign) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -113708,6 +113737,9 @@ class SetSeqAlign {
|
|
|
113708
113737
|
|
|
113709
113738
|
let result;
|
|
113710
113739
|
|
|
113740
|
+
let nGapInTemplate = 0; // number of gaps inserted into the template sequence
|
|
113741
|
+
let startPosInTemplate = 0; // position in the template sequence to start the mapping
|
|
113742
|
+
|
|
113711
113743
|
for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
|
|
113712
113744
|
let start1, start2, end1, end2, resiStart1, start1Pos;
|
|
113713
113745
|
|
|
@@ -113741,6 +113773,8 @@ class SetSeqAlign {
|
|
|
113741
113773
|
|
|
113742
113774
|
// if the mapping does not start from start_t, add gaps to the query seq
|
|
113743
113775
|
if(i == 0) {
|
|
113776
|
+
startPosInTemplate = start1Pos;
|
|
113777
|
+
|
|
113744
113778
|
//result = this.getTemplatePosFromOriResi(chainid1, start_t, start1, bRealign);
|
|
113745
113779
|
result = this.getTemplatePosFromOriResi(chainid1, start_t, start1Pos, bRealign);
|
|
113746
113780
|
pos1 = result.pos1;
|
|
@@ -113763,7 +113797,6 @@ class SetSeqAlign {
|
|
|
113763
113797
|
|
|
113764
113798
|
// insert non-aligned residues in query seq
|
|
113765
113799
|
this.insertNotAlignRes(chainid2, prevIndex2+1, notAlnLen2, bRealign);
|
|
113766
|
-
|
|
113767
113800
|
if(notAlnLen1 >= notAlnLen2) {
|
|
113768
113801
|
// add gaps before the query sequence
|
|
113769
113802
|
for(let j = 0, jl = notAlnLen1 - notAlnLen2; j < jl; ++j) {
|
|
@@ -113773,6 +113806,7 @@ class SetSeqAlign {
|
|
|
113773
113806
|
else {
|
|
113774
113807
|
// check the number of gaps before resiStart1 (n), and insert 'notAlnLen2 - notAlnLen1 - n' gaps
|
|
113775
113808
|
this.addGapAllAlnChains(chainidArray, alignedChainIndice, chainid1, resiStart1, notAlnLen2 - notAlnLen1);
|
|
113809
|
+
nGapInTemplate += (notAlnLen2 - notAlnLen1);
|
|
113776
113810
|
}
|
|
113777
113811
|
}
|
|
113778
113812
|
|
|
@@ -113781,18 +113815,19 @@ class SetSeqAlign {
|
|
|
113781
113815
|
//result = this.getTemplatePosFromOriResi(chainid1, start1Pos, end1Pos, bRealign);
|
|
113782
113816
|
pos1 = result.pos1;
|
|
113783
113817
|
pos2 = result.pos2;
|
|
113784
|
-
|
|
113818
|
+
|
|
113785
113819
|
let k = 0;
|
|
113786
113820
|
if(!ic.chainsMapping[chainid1]) ic.chainsMapping[chainid1] = {};
|
|
113787
113821
|
if(!ic.chainsMapping[chainid2]) ic.chainsMapping[chainid2] = {};
|
|
113822
|
+
let resiAdjust = (bRealign && me.cfg.aligntool == 'tmalign') ? 0 : - startPosInTemplate + nGapInTemplate;
|
|
113788
113823
|
for(let j = pos1; j <= pos2; ++j) {
|
|
113789
113824
|
// inherit the gaps from the template
|
|
113790
|
-
if(ic.alnChainsSeq[chainid1][j].resn == '-') {
|
|
113825
|
+
if(ic.alnChainsSeq[chainid1][j + resiAdjust].resn == '-') {
|
|
113791
113826
|
ic.alnChainsSeq[chainid2].push(gapResObject2);
|
|
113792
113827
|
}
|
|
113793
113828
|
else {
|
|
113794
|
-
let resi1 = (bRealign) ? start1 + k : ic.ParserUtilsCls.getResi(chainid1, start1 + k);
|
|
113795
|
-
let resi2 = (bRealign) ? start2 + k : ic.ParserUtilsCls.getResi(chainid2, start2 + k);
|
|
113829
|
+
let resi1 = (bRealign && me.cfg.aligntool == 'tmalign') ? start1 + k : ic.ParserUtilsCls.getResi(chainid1, start1 + k);
|
|
113830
|
+
let resi2 = (bRealign && me.cfg.aligntool == 'tmalign') ? start2 + k : ic.ParserUtilsCls.getResi(chainid2, start2 + k);
|
|
113796
113831
|
let resn1 = this.getResnFromResi(chainid1, resi1); //this.getResn(chainid1, start1 + k);
|
|
113797
113832
|
let resn2 = this.getResnFromResi(chainid2, resi2); //this.getResn(chainid2, start2 + k);
|
|
113798
113833
|
|
|
@@ -113800,7 +113835,7 @@ class SetSeqAlign {
|
|
|
113800
113835
|
let resObject = this.getResObject(chainid2, false, bAlign, resi2, resn2, resn1);
|
|
113801
113836
|
ic.alnChainsSeq[chainid2].push(resObject);
|
|
113802
113837
|
// update color in the template
|
|
113803
|
-
ic.alnChainsSeq[chainid1][j].color = resObject.color;
|
|
113838
|
+
ic.alnChainsSeq[chainid1][j + resiAdjust].color = resObject.color;
|
|
113804
113839
|
|
|
113805
113840
|
ic.chainsMapping[chainid1][chainid1 + '_' + resi1] = resn1 + resi1;
|
|
113806
113841
|
ic.chainsMapping[chainid2][chainid2 + '_' + resi2] = resn1 + resi1;
|
|
@@ -115140,7 +115175,8 @@ class LoadPDB {
|
|
|
115140
115175
|
|| (ic.nucleotides.hasOwnProperty(serialArray[i]) && (atom.name == "O3'" || atom.name == "O3*")) ) {
|
|
115141
115176
|
if(atom.resi == lastResi) continue; // e.g., Alt A and B
|
|
115142
115177
|
|
|
115143
|
-
let resn = (atom.resn.trim().length > 3) ? atom.resn.trim().substr(0, 3) : atom.resn.trim();
|
|
115178
|
+
// let resn = (atom.resn.trim().length > 3) ? atom.resn.trim().substr(0, 3) : atom.resn.trim();
|
|
115179
|
+
let resn = atom.resn.trim();
|
|
115144
115180
|
if(!me.parasCls.chargeColors.hasOwnProperty(resn)) {
|
|
115145
115181
|
continue; // regular residues
|
|
115146
115182
|
}
|
|
@@ -116916,7 +116952,7 @@ class ApplyCommand {
|
|
|
116916
116952
|
ic.selectionCls.selectAll();
|
|
116917
116953
|
//ic.hlObjectsCls.addHlObjects();
|
|
116918
116954
|
}
|
|
116919
|
-
else if(command == 'show all') {
|
|
116955
|
+
else if(command == 'show all' || command == 'view all') {
|
|
116920
116956
|
ic.selectionCls.showAll();
|
|
116921
116957
|
}
|
|
116922
116958
|
else if(command == 'select complement') {
|
|
@@ -117296,7 +117332,7 @@ class ApplyCommand {
|
|
|
117296
117332
|
ic.applyCenterCls.centerSelection();
|
|
117297
117333
|
ic.drawCls.draw();
|
|
117298
117334
|
}
|
|
117299
|
-
else if(command == 'show selection') {
|
|
117335
|
+
else if(command == 'show selection' || command == 'view selection') {
|
|
117300
117336
|
ic.selectionCls.showSelection();
|
|
117301
117337
|
}
|
|
117302
117338
|
else if(command == 'hide selection') {
|
|
@@ -117339,12 +117375,12 @@ class ApplyCommand {
|
|
|
117339
117375
|
else if(command == 'delete selected sets') {
|
|
117340
117376
|
ic.definedSetsCls.deleteSelectedSets();
|
|
117341
117377
|
}
|
|
117342
|
-
else if(command == 'view interactions') {
|
|
117378
|
+
else if(command == 'view interactions' || command == 'view 2d diagram') {
|
|
117343
117379
|
if(me.cfg.mmdbid !== undefined || me.cfg.gi !== undefined) {
|
|
117344
117380
|
ic.ParserUtilsCls.set2DDiagrams(ic.inputid);
|
|
117345
117381
|
}
|
|
117346
117382
|
}
|
|
117347
|
-
else if(command == 'show annotations all chains') {
|
|
117383
|
+
else if(command == 'show annotations all chains' || command == 'view annotations all chains') {
|
|
117348
117384
|
ic.annotationCls.showAnnoAllChains();
|
|
117349
117385
|
}
|
|
117350
117386
|
|
|
@@ -117406,7 +117442,7 @@ class ApplyCommand {
|
|
|
117406
117442
|
else if(command == 'clear symd symmetry') {
|
|
117407
117443
|
ic.symdArray = [];
|
|
117408
117444
|
}
|
|
117409
|
-
else if(command == 'show axis') {
|
|
117445
|
+
else if(command == 'show axis' || command == 'view axis') {
|
|
117410
117446
|
ic.bAxisOnly = true;
|
|
117411
117447
|
}
|
|
117412
117448
|
|
|
@@ -117854,7 +117890,7 @@ class ApplyCommand {
|
|
|
117854
117890
|
}
|
|
117855
117891
|
}
|
|
117856
117892
|
else if(commandOri.indexOf('display interaction 3d') == 0
|
|
117857
|
-
|| commandOri.indexOf('view interaction pairs') == 0
|
|
117893
|
+
|| commandOri.indexOf('view interaction pairs') == 0 || commandOri.indexOf('show interaction pairs') == 0
|
|
117858
117894
|
|| commandOri.indexOf('save1 interaction pairs') == 0
|
|
117859
117895
|
|| commandOri.indexOf('save2 interaction pairs') == 0
|
|
117860
117896
|
|| commandOri.indexOf('line graph interaction pairs') == 0
|
|
@@ -117862,20 +117898,23 @@ class ApplyCommand {
|
|
|
117862
117898
|
|| commandOri.indexOf('ligplot interaction pairs') == 0
|
|
117863
117899
|
) {
|
|
117864
117900
|
let paraArray = commandOri.split(' | ');
|
|
117865
|
-
if(paraArray.length >=
|
|
117901
|
+
if(paraArray.length >= 2) {
|
|
117866
117902
|
let setNameArray = paraArray[1].split(' ');
|
|
117867
117903
|
|
|
117868
117904
|
if(setNameArray.length == 2) {
|
|
117869
117905
|
let nameArray2 = setNameArray[0].split(',');
|
|
117870
117906
|
let nameArray = setNameArray[1].split(',');
|
|
117871
117907
|
|
|
117872
|
-
let bHbond =
|
|
117873
|
-
|
|
117874
|
-
|
|
117908
|
+
let bHbond = 1, bSaltbridge = 1, bInteraction = 1, bHalogen = 1, bPication = 1, bPistacking = 1;
|
|
117909
|
+
if(paraArray.length >= 3) {
|
|
117910
|
+
bHbond = paraArray[2].indexOf('hbonds') !== -1;
|
|
117911
|
+
bSaltbridge = paraArray[2].indexOf('salt bridge') !== -1;
|
|
117912
|
+
bInteraction = paraArray[2].indexOf('interactions') !== -1;
|
|
117875
117913
|
|
|
117876
|
-
|
|
117877
|
-
|
|
117878
|
-
|
|
117914
|
+
bHalogen = paraArray[2].indexOf('halogen') !== -1;
|
|
117915
|
+
bPication = paraArray[2].indexOf('pi-cation') !== -1;
|
|
117916
|
+
bPistacking = paraArray[2].indexOf('pi-stacking') !== -1;
|
|
117917
|
+
}
|
|
117879
117918
|
|
|
117880
117919
|
let bHbondCalc;
|
|
117881
117920
|
if(paraArray.length >= 4) {
|
|
@@ -117902,7 +117941,7 @@ class ApplyCommand {
|
|
|
117902
117941
|
if(commandOri.indexOf('display interaction 3d') == 0) {
|
|
117903
117942
|
type = '3d';
|
|
117904
117943
|
}
|
|
117905
|
-
else if(commandOri.indexOf('view interaction pairs') == 0) {
|
|
117944
|
+
else if(commandOri.indexOf('view interaction pairs') == 0 || commandOri.indexOf('show interaction pairs') == 0) {
|
|
117906
117945
|
type = 'view';
|
|
117907
117946
|
}
|
|
117908
117947
|
else if(commandOri.indexOf('save1 interaction pairs') == 0) {
|
|
@@ -118262,7 +118301,7 @@ class ApplyCommand {
|
|
|
118262
118301
|
let dataStr = paraArray[1].replace(/\\n/g, '\n');
|
|
118263
118302
|
await ic.refnumCls.parseCustomRefFile(dataStr);
|
|
118264
118303
|
}
|
|
118265
|
-
else if(command.indexOf('show ref number') == 0) {
|
|
118304
|
+
else if(command.indexOf('show ref number') == 0 || command.indexOf('view ref number') == 0) {
|
|
118266
118305
|
ic.bShownRefnum = true;
|
|
118267
118306
|
}
|
|
118268
118307
|
else if(command.indexOf('hide ref number') == 0) {
|
|
@@ -118518,7 +118557,7 @@ class ApplyCommand {
|
|
|
118518
118557
|
else if(cmd.indexOf('set annotation clinvar') == 0) return seqAnnoStr + ': "ClinVar" checkbox';
|
|
118519
118558
|
else if(cmd.indexOf('set annotation snp') == 0) return seqAnnoStr + ': "SNP" checkbox';
|
|
118520
118559
|
else if(cmd.indexOf('set annotation 3ddomain') == 0) return seqAnnoStr + ': "3D Domains" checkbox';
|
|
118521
|
-
else if(cmd.indexOf('view interactions') == 0) return 'Windows > View 2D Diagram';
|
|
118560
|
+
else if(cmd.indexOf('view interactions') == 0 || cmd.indexOf('view 2d diagram') == 0) return 'Windows > View 2D Diagram';
|
|
118522
118561
|
else if(cmd.indexOf('symmetry') == 0) return 'Analysis > Symmetry';
|
|
118523
118562
|
else if(cmd.indexOf('realign on seq align') == 0) return 'File > Realign Selection > on Sequence Alignment';
|
|
118524
118563
|
else if(cmd.indexOf('realign') == 0) return 'File > Realign Selection > Residue by Residue';
|
|
@@ -118610,7 +118649,7 @@ class ApplyCommand {
|
|
|
118610
118649
|
else if(cmd == 'clear all') return 'Select > Clear Selection';
|
|
118611
118650
|
else if(cmd == 'defined sets') return 'Windows > Defined Sets';
|
|
118612
118651
|
else if(cmd == 'delete selected sets') return 'Windows > Defined Sets: "Delete Selected Sets" button';
|
|
118613
|
-
else if(cmd == 'view interactions') return 'Windows > View Interactions';
|
|
118652
|
+
else if(cmd == 'view interactions' || cmd == 'view 2d diagram') return 'Windows > View Interactions';
|
|
118614
118653
|
else if(cmd == 'show annotations all chains') return seqAnnoStr + ': "Show All Chains" button';
|
|
118615
118654
|
else if(cmd == 'save color') return 'Color > Save Color';
|
|
118616
118655
|
else if(cmd == 'apply saved color') return 'Color > Apply Saved Color';
|
|
@@ -118800,12 +118839,10 @@ class DefinedSets {
|
|
|
118800
118839
|
//Set the menu of defined sets with an array of defined names "commandnameArray".
|
|
118801
118840
|
setAtomMenu(commandnameArray) { let ic = this.icn3d; ic.icn3dui;
|
|
118802
118841
|
let html = "";
|
|
118803
|
-
|
|
118804
118842
|
let nameArray1 =(ic.defNames2Residues !== undefined) ? Object.keys(ic.defNames2Residues) : [];
|
|
118805
118843
|
let nameArray2 =(ic.defNames2Atoms !== undefined) ? Object.keys(ic.defNames2Atoms) : [];
|
|
118806
118844
|
|
|
118807
118845
|
let nameArrayTmp = nameArray1.concat(nameArray2).sort();
|
|
118808
|
-
|
|
118809
118846
|
let nameArray = [];
|
|
118810
118847
|
// $.each(nameArrayTmp, function(i, el){
|
|
118811
118848
|
// if($.inArray(el, nameArray) === -1) nameArray.push(el);
|
|
@@ -118823,7 +118860,6 @@ class DefinedSets {
|
|
|
118823
118860
|
// }
|
|
118824
118861
|
// });
|
|
118825
118862
|
// });
|
|
118826
|
-
|
|
118827
118863
|
//for(let i in ic.defNames2Atoms) {
|
|
118828
118864
|
for(let i = 0, il = nameArray.length; i < il; ++i) {
|
|
118829
118865
|
let name = nameArray[i];
|
|
@@ -118854,7 +118890,6 @@ class DefinedSets {
|
|
|
118854
118890
|
html += "<option value='" + name + "' style='color:#" + color + "'>" + name + "</option>";
|
|
118855
118891
|
}
|
|
118856
118892
|
}
|
|
118857
|
-
|
|
118858
118893
|
return html;
|
|
118859
118894
|
}
|
|
118860
118895
|
|
|
@@ -118879,17 +118914,18 @@ class DefinedSets {
|
|
|
118879
118914
|
}
|
|
118880
118915
|
else { // chemicals, etc
|
|
118881
118916
|
let resid = atom.structure + '_' + atom.chain + '_' + atom.resi;
|
|
118882
|
-
|
|
118917
|
+
// let resn = atom.resn.substr(0, 3);
|
|
118918
|
+
let resn = atom.resn;
|
|
118883
118919
|
|
|
118884
118920
|
if(!nonProtNuclResHash[resn]) {
|
|
118885
|
-
nonProtNuclResHash[resn] = ic.residues[resid];
|
|
118921
|
+
nonProtNuclResHash[resn] = me.hashUtilsCls.cloneHash(ic.residues[resid]);
|
|
118886
118922
|
}
|
|
118887
118923
|
else {
|
|
118888
118924
|
nonProtNuclResHash[resn] = me.hashUtilsCls.unionHash(nonProtNuclResHash[atom.resn], ic.residues[resid]);
|
|
118889
118925
|
}
|
|
118890
118926
|
}
|
|
118891
118927
|
}
|
|
118892
|
-
|
|
118928
|
+
|
|
118893
118929
|
// chemicals etc
|
|
118894
118930
|
for(let resn in nonProtNuclResHash) {
|
|
118895
118931
|
ic.defNames2Residues[resn] = Object.keys(ic.firstAtomObjCls.getResiduesFromAtoms(nonProtNuclResHash[resn]));
|
|
@@ -118897,7 +118933,7 @@ class DefinedSets {
|
|
|
118897
118933
|
|
|
118898
118934
|
ic.defNames2Command[resn] = 'select :3' + resn;
|
|
118899
118935
|
}
|
|
118900
|
-
|
|
118936
|
+
|
|
118901
118937
|
// select whole structure
|
|
118902
118938
|
if(ic.structures && Object.keys(ic.structures) == 1) {
|
|
118903
118939
|
let structure = Object.keys(ic.structures)[0];
|
|
@@ -118990,10 +119026,8 @@ class DefinedSets {
|
|
|
118990
119026
|
|
|
118991
119027
|
if(ic.bSetChainsAdvancedMenu === undefined || !ic.bSetChainsAdvancedMenu || ic.bResetSets) {
|
|
118992
119028
|
this.setPredefinedInMenu();
|
|
118993
|
-
|
|
118994
119029
|
ic.bSetChainsAdvancedMenu = true;
|
|
118995
119030
|
}
|
|
118996
|
-
|
|
118997
119031
|
ic.hAtoms = me.hashUtilsCls.cloneHash(prevHAtoms);
|
|
118998
119032
|
ic.dAtoms = me.hashUtilsCls.cloneHash(prevDAtoms);
|
|
118999
119033
|
|
|
@@ -119886,7 +119920,7 @@ class LoadScript {
|
|
|
119886
119920
|
|
|
119887
119921
|
await ic.annotationCls.setAnnoTabAll();
|
|
119888
119922
|
}
|
|
119889
|
-
else if(command.indexOf('view interactions') == 0 && me.cfg.align !== undefined) { // the command may have "|||{"factor"...
|
|
119923
|
+
else if((command.indexOf('view interactions') == 0 || command.indexOf('view 2d diagram') == 0) && me.cfg.align !== undefined) { // the command may have "|||{"factor"...
|
|
119890
119924
|
await thisClass.applyCommandViewinteraction(strArray[0].trim());
|
|
119891
119925
|
}
|
|
119892
119926
|
else if(command.indexOf('view 2d depiction') == 0) { // the command may have "|||{"factor"...
|
|
@@ -120097,7 +120131,7 @@ class LoadScript {
|
|
|
120097
120131
|
thisClass.applyCommand3ddomain(lastCommand);
|
|
120098
120132
|
await ic.annotationCls.setAnnoTabAll();
|
|
120099
120133
|
}
|
|
120100
|
-
else if(lastCommand.indexOf('view interactions') == 0 && me.cfg.align !== undefined) {
|
|
120134
|
+
else if((lastCommand.indexOf('view interactions') == 0 || lastCommand.indexOf('view 2d diagram') == 0) && me.cfg.align !== undefined) {
|
|
120101
120135
|
await thisClass.applyCommandViewinteraction(lastCommand);
|
|
120102
120136
|
}
|
|
120103
120137
|
else if(lastCommand.indexOf('view 2d depiction') == 0) {
|
|
@@ -120558,7 +120592,7 @@ class LoadScript {
|
|
|
120558
120592
|
|
|
120559
120593
|
if(commandTransformation.length == 2 && commandTransformation[1].substr(0,1) == '{') ic.bTransformation = true;
|
|
120560
120594
|
|
|
120561
|
-
ic.transformCls.resetOrientation_base(commandTransformation);
|
|
120595
|
+
// ic.transformCls.resetOrientation_base(commandTransformation);
|
|
120562
120596
|
|
|
120563
120597
|
ic.selectionCls.oneStructurePerWindow();
|
|
120564
120598
|
|
|
@@ -120624,8 +120658,12 @@ class LoadScript {
|
|
|
120624
120658
|
$("#ncbi_logo").hide();
|
|
120625
120659
|
}
|
|
120626
120660
|
|
|
120661
|
+
ic.transformCls.resetOrientation_base(commandTransformation);
|
|
120662
|
+
|
|
120627
120663
|
// an extra render to remove artifacts in transparent surface
|
|
120628
|
-
if(ic.bTransparentSurface && ic.bRender) ic.drawCls.render();
|
|
120664
|
+
// if(ic.bTransparentSurface && ic.bRender) ic.drawCls.render();
|
|
120665
|
+
ic.drawCls.applyTransformation(ic._zoomFactor, ic.mouseChange, ic.quaternion);
|
|
120666
|
+
ic.drawCls.render();
|
|
120629
120667
|
|
|
120630
120668
|
if(me.cfg.imageonly) ic.saveFileCls.saveFile(undefined, 'png', undefined, true);
|
|
120631
120669
|
|
|
@@ -122646,14 +122684,22 @@ class Delphi {
|
|
|
122646
122684
|
let paraArray = command.split(" | ");
|
|
122647
122685
|
|
|
122648
122686
|
let typeArray = paraArray[0].split(" ");
|
|
122649
|
-
let contourArray = paraArray[1].split(" ");
|
|
122650
|
-
let gsizeArray = paraArray[2].split(" ");
|
|
122651
|
-
let saltArray = paraArray[3].split(" ");
|
|
122652
|
-
|
|
122653
122687
|
let type = typeArray[2];
|
|
122654
|
-
|
|
122655
|
-
let gsize =
|
|
122656
|
-
|
|
122688
|
+
|
|
122689
|
+
let contour = 2, gsize = 65, salt = 0.15; // default values for contour, gsize, salt
|
|
122690
|
+
ic.phisurftype = 22; // default value for surface type
|
|
122691
|
+
ic.phisurfop = 1.0; // default value for surface opacity
|
|
122692
|
+
ic.phisurfwf = "no"; // default value for surface wireframe
|
|
122693
|
+
|
|
122694
|
+
if(paraArray.length == 7) {
|
|
122695
|
+
let contourArray = paraArray[1].split(" ");
|
|
122696
|
+
let gsizeArray = paraArray[2].split(" ");
|
|
122697
|
+
let saltArray = paraArray[3].split(" ");
|
|
122698
|
+
|
|
122699
|
+
contour = contourArray[1]; //parseFloat(contourArray[1]);
|
|
122700
|
+
gsize = gsizeArray[1]; //parseInt(gsizeArray[1]);
|
|
122701
|
+
salt = saltArray[1]; //parseFloat(saltArray[1]);
|
|
122702
|
+
}
|
|
122657
122703
|
|
|
122658
122704
|
// The values should be string
|
|
122659
122705
|
$("#" + ic.pre + "delphi1gsize").val(gsize);
|
|
@@ -122670,12 +122716,12 @@ class Delphi {
|
|
|
122670
122716
|
ic.phisurftype = surfaceArray[1];
|
|
122671
122717
|
ic.phisurfop = opacityArray[1]; //parseFloat(opacityArray[1]);
|
|
122672
122718
|
ic.phisurfwf = wireframeArray[1];
|
|
122673
|
-
|
|
122674
|
-
$("#" + ic.pre + "delphi" + "surftype").val(ic.phisurftype);
|
|
122675
|
-
$("#" + ic.pre + "delphi" + "surfop").val(ic.phisurfop);
|
|
122676
|
-
$("#" + ic.pre + "delphi" + "surfwf").val(ic.phisurfwf);
|
|
122677
122719
|
}
|
|
122678
122720
|
|
|
122721
|
+
$("#" + ic.pre + "delphi" + "surftype").val(ic.phisurftype);
|
|
122722
|
+
$("#" + ic.pre + "delphi" + "surfop").val(ic.phisurfop);
|
|
122723
|
+
$("#" + ic.pre + "delphi" + "surfwf").val(ic.phisurfwf);
|
|
122724
|
+
|
|
122679
122725
|
let bSurface =(type == 'surface') ? true : false;
|
|
122680
122726
|
|
|
122681
122727
|
await thisClass.CalcPhi(gsize, salt, contour, bSurface);
|
|
@@ -124213,7 +124259,8 @@ class Dssp {
|
|
|
124213
124259
|
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
124214
124260
|
if(!atom) continue;
|
|
124215
124261
|
|
|
124216
|
-
let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
|
|
124262
|
+
// let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
|
|
124263
|
+
let resn = me.utilsCls.residueName2Abbr(atom.resn);
|
|
124217
124264
|
|
|
124218
124265
|
let domainid = ic.resid2domainid[resid];
|
|
124219
124266
|
let refnumLabel = ic.resid2refnum[resid];
|
|
@@ -124290,7 +124337,8 @@ class Dssp {
|
|
|
124290
124337
|
|
|
124291
124338
|
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
124292
124339
|
if(!atom) continue;
|
|
124293
|
-
let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
|
|
124340
|
+
// let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
|
|
124341
|
+
let resn = me.utilsCls.residueName2Abbr(atom.resn);
|
|
124294
124342
|
|
|
124295
124343
|
if(refnumLabel) {
|
|
124296
124344
|
let refnumStr_ori = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
|
|
@@ -124313,7 +124361,8 @@ class Dssp {
|
|
|
124313
124361
|
|
|
124314
124362
|
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
124315
124363
|
if(!atom) continue;
|
|
124316
|
-
let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
|
|
124364
|
+
// let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
|
|
124365
|
+
let resn = me.utilsCls.residueName2Abbr(atom.resn);
|
|
124317
124366
|
|
|
124318
124367
|
if(refnumLabel) {
|
|
124319
124368
|
let refnumStr_ori = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
|
|
@@ -128583,7 +128632,8 @@ class Ligplot {
|
|
|
128583
128632
|
}
|
|
128584
128633
|
}
|
|
128585
128634
|
|
|
128586
|
-
let oneLetterRes = me.utilsCls.residueName2Abbr(atom2.resn.substr(0, 3));
|
|
128635
|
+
// let oneLetterRes = me.utilsCls.residueName2Abbr(atom2.resn.substr(0, 3));
|
|
128636
|
+
let oneLetterRes = me.utilsCls.residueName2Abbr(atom2.resn);
|
|
128587
128637
|
let resName2 = oneLetterRes + atom2.resi;
|
|
128588
128638
|
let textColor2 = (atom2.color) ? atom2.color.getHexString() : '000';
|
|
128589
128639
|
let lineColor = ic.lineGraphCls.getStrokecolor(undefined, interactionType);
|
|
@@ -128961,11 +129011,12 @@ class Transform {
|
|
|
128961
129011
|
this.icn3d = icn3d;
|
|
128962
129012
|
}
|
|
128963
129013
|
|
|
128964
|
-
resetOrientation_base(commandTransformation) { let ic = this.icn3d
|
|
129014
|
+
resetOrientation_base(commandTransformation) { let ic = this.icn3d, me = ic.icn3dui;
|
|
128965
129015
|
if(commandTransformation.length == 2 && commandTransformation[1].length > 0) {
|
|
129016
|
+
if(commandTransformation[1].substr(0, 4) == 'pos:') ic.bSetCamera = false;
|
|
129017
|
+
|
|
128966
129018
|
if(ic.bSetCamera) { // |||{"factor"...}
|
|
128967
129019
|
let transformation = JSON.parse(commandTransformation[1]);
|
|
128968
|
-
|
|
128969
129020
|
ic._zoomFactor = transformation.factor;
|
|
128970
129021
|
|
|
128971
129022
|
ic.mouseChange.x = transformation.mouseChange.x;
|
|
@@ -128996,6 +129047,12 @@ class Transform {
|
|
|
128996
129047
|
}
|
|
128997
129048
|
}
|
|
128998
129049
|
});
|
|
129050
|
+
|
|
129051
|
+
// set the aspect ratio
|
|
129052
|
+
if(!ic.container.whratio) {
|
|
129053
|
+
ic.container.whratio = me.htmlCls.WIDTH / me.htmlCls.HEIGHT;
|
|
129054
|
+
ic.cam.aspect = ic.container.whratio;
|
|
129055
|
+
}
|
|
128999
129056
|
}
|
|
129000
129057
|
}
|
|
129001
129058
|
else {
|
|
@@ -133105,7 +133162,7 @@ class iCn3D {
|
|
|
133105
133162
|
|
|
133106
133163
|
this.transparentRenderOrder = false; // false: regular transparency; true: expensive renderOrder for each face
|
|
133107
133164
|
|
|
133108
|
-
this.AFUniprotVersion = '
|
|
133165
|
+
this.AFUniprotVersion = 'v6';
|
|
133109
133166
|
this.defaultPdbId = 'stru';
|
|
133110
133167
|
|
|
133111
133168
|
if(!this.icn3dui.bNode) {
|
|
@@ -133694,7 +133751,7 @@ class iCn3DUI {
|
|
|
133694
133751
|
//even when multiple iCn3D viewers are shown together.
|
|
133695
133752
|
this.pre = this.cfg.divid + "_";
|
|
133696
133753
|
|
|
133697
|
-
this.REVISION = '3.45.
|
|
133754
|
+
this.REVISION = '3.45.4';
|
|
133698
133755
|
|
|
133699
133756
|
// In nodejs, iCn3D defines "window = {navigator: {}}", and added window = {navigator: {}, "__THREE__":"177"}
|
|
133700
133757
|
this.bNode = (Object.keys(window).length < 3) ? true : false;
|
|
@@ -133945,18 +134002,21 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
|
|
|
133945
134002
|
await ic.pdbParserCls.downloadUrl(url, type, me.cfg.command);
|
|
133946
134003
|
}
|
|
133947
134004
|
else if(me.cfg.mmtfid !== undefined) {
|
|
134005
|
+
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
|
|
133948
134006
|
ic.inputid = me.cfg.mmtfid;
|
|
133949
134007
|
ic.loadCmd = 'load mmtf ' + me.cfg.mmtfid;
|
|
133950
134008
|
me.htmlCls.clickMenuCls.setLogCmd(ic.loadCmd, true);
|
|
133951
134009
|
await ic.bcifParserCls.downloadBcif(me.cfg.mmtfid);
|
|
133952
134010
|
}
|
|
133953
134011
|
else if(me.cfg.bcifid !== undefined) {
|
|
134012
|
+
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
|
|
133954
134013
|
ic.inputid = me.cfg.bcifid;
|
|
133955
134014
|
ic.loadCmd = 'load bcif ' + me.cfg.bcifid;
|
|
133956
134015
|
me.htmlCls.clickMenuCls.setLogCmd(ic.loadCmd, true);
|
|
133957
134016
|
await ic.bcifParserCls.downloadBcif(me.cfg.bcifid);
|
|
133958
134017
|
}
|
|
133959
134018
|
else if(me.cfg.pdbid !== undefined) {
|
|
134019
|
+
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
|
|
133960
134020
|
ic.inputid = me.cfg.pdbid;
|
|
133961
134021
|
ic.loadCmd = 'load pdb ' + me.cfg.pdbid;
|
|
133962
134022
|
me.htmlCls.clickMenuCls.setLogCmd(ic.loadCmd, true);
|
|
@@ -133979,6 +134039,7 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
|
|
|
133979
134039
|
await ic.opmParserCls.downloadOpm(me.cfg.opmid);
|
|
133980
134040
|
}
|
|
133981
134041
|
else if(me.cfg.mmdbid !== undefined) {
|
|
134042
|
+
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
|
|
133982
134043
|
ic.inputid = me.cfg.mmdbid;
|
|
133983
134044
|
// ic.bNCBI = true;
|
|
133984
134045
|
ic.loadCmd = 'load mmdb ' + me.cfg.mmdbid + ' | parameters ' + me.cfg.inpara;
|
|
@@ -134117,6 +134178,7 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
|
|
|
134117
134178
|
await ic.sdfParserCls.downloadSmiles(me.cfg.smiles);
|
|
134118
134179
|
}
|
|
134119
134180
|
else if(me.cfg.mmcifid !== undefined) {
|
|
134181
|
+
// long PDB ID was supported with mmcifid
|
|
134120
134182
|
ic.inputid = me.cfg.mmcifid;
|
|
134121
134183
|
ic.loadCmd = 'load mmcif ' + me.cfg.mmcifid;
|
|
134122
134184
|
me.htmlCls.clickMenuCls.setLogCmd(ic.loadCmd, true);
|