icn3d 3.45.4 → 3.45.5

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 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, sigma2fofc);
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
  });
@@ -59369,7 +59369,7 @@ class SetMenu {
59369
59369
  html += this.getLink('mn1_mmcifid', 'RCSB mmCIF ID ' + me.htmlCls.wifiStr, undefined, 2);
59370
59370
  //html += this.getLink('mn1_gi', 'NCBI gi ' + me.htmlCls.wifiStr, undefined, 2);
59371
59371
 
59372
- html += this.getLink('mn1_cid', 'PubChem CID/Name/InchI ' + me.htmlCls.wifiStr, 1, 2);
59372
+ html += this.getLink('mn1_cid', 'PubChem CID/Name/InChI ' + me.htmlCls.wifiStr, 1, 2);
59373
59373
  html += this.getLink('mn1_smiles', 'Chemical SMILES ', undefined, 2);
59374
59374
 
59375
59375
  html += "</ul>";
@@ -59737,9 +59737,9 @@ class SetMenu {
59737
59737
 
59738
59738
  html += this.getMenuText('mn2_rotate90', 'Rotate 90&deg;', undefined, undefined, 2);
59739
59739
  html += "<ul>";
59740
- html += this.getRadio('mn6_rotate90', 'mn6_rotatex', 'rotate x', undefined, undefined, 2);
59741
- html += this.getRadio('mn6_rotate90', 'mn6_rotatey', 'rotate y', undefined, undefined, 2);
59742
- html += this.getRadio('mn6_rotate90', 'mn6_rotatez', 'rotate z', undefined, undefined, 2);
59740
+ html += this.getRadio('mn6_rotate90', 'mn6_rotatex', 'rotate x', undefined, undefined, 3);
59741
+ html += this.getRadio('mn6_rotate90', 'mn6_rotatey', 'rotate y', undefined, undefined, 3);
59742
+ html += this.getRadio('mn6_rotate90', 'mn6_rotatez', 'rotate z', undefined, undefined, 3);
59743
59743
  html += "</ul>";
59744
59744
  html += "</li>";
59745
59745
  html += this.getMenuText('mn2_rotateauto', 'Auto Rotation', undefined, 1, 2);
@@ -61823,7 +61823,7 @@ class SetDialog {
61823
61823
 
61824
61824
  html += me.htmlCls.divStr + "dl_mmdbafid' class='" + dialogClass + "' style='max-width:600px'>";
61825
61825
  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,4N7N,P69905,P01942' size=30> <br><br>";
61826
+ 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
61827
  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
61828
  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
61829
 
@@ -61870,7 +61870,7 @@ class SetDialog {
61870
61870
 
61871
61871
  html += me.htmlCls.divStr + "dl_cid' class='" + dialogClass + "'>";
61872
61872
  html += this.addNotebookTitle('dl_cid', 'Please input a PubChem Compound');
61873
- html += "PubChem CID/Name/InchI: " + me.htmlCls.inputTextStr + "id='" + me.pre + "cid' value='2244' size=8> ";
61873
+ html += "PubChem CID/Name/InChI: " + me.htmlCls.inputTextStr + "id='" + me.pre + "cid' value='2244' size=8> ";
61874
61874
  html += me.htmlCls.buttonStr + "reload_cid'>Load</button>";
61875
61875
  html += "</div>";
61876
61876
 
@@ -61900,7 +61900,6 @@ class SetDialog {
61900
61900
 
61901
61901
  html += me.htmlCls.divStr + "dl_video' class='" + dialogClass + "'>";
61902
61902
  html += this.addNotebookTitle('dl_video', 'Save canvas changes in a video');
61903
- html += "State file: " + me.htmlCls.inputFileStr + "id='" + me.pre + "state'><br/>";
61904
61903
  html += me.htmlCls.buttonStr + "video_start' style='margin-top: 6px;'>Video Start</button>";
61905
61904
  html += me.htmlCls.buttonStr + "video_end' style='margin: 6px 0px 0px 30px;'>Video End</button>";
61906
61905
  html += "</div>";
@@ -63434,7 +63433,7 @@ class Events {
63434
63433
  ic.cam.quaternion.setFromUnitVectors(new Vector3$1(0, 0, -1), new Vector3$1(directionArray[0], directionArray[1], directionArray[2]));
63435
63434
  ic.cam.up.set(upvectorArray[0], upvectorArray[1], upvectorArray[2]);
63436
63435
  ic.cam.fov = fov;
63437
- //ic.container.whratio = aspect;
63436
+ // ic.container.whratio = aspect;
63438
63437
 
63439
63438
  ic.drawCls.applyTransformation(ic._zoomFactor, ic.mouseChange, ic.quaternion);
63440
63439
  ic.drawCls.render();
@@ -64018,7 +64017,7 @@ class Events {
64018
64017
  e.preventDefault();
64019
64018
  if(!me.cfg.notebook) dialog.dialog( "close" );
64020
64019
 
64021
- let alignment = $("#" + me.pre + "chainalignids").val();
64020
+ let alignment = $("#" + me.pre + "chainalignids").val().replace(/\s/g, '');
64022
64021
  let alignment_final = thisClass.convertUniProtInChains(alignment);
64023
64022
 
64024
64023
  thisClass.setLogCmd("load chains " + alignment_final + " on asymmetric unit | residues | resdef ", false);
@@ -64030,7 +64029,7 @@ class Events {
64030
64029
  e.preventDefault();
64031
64030
  if(!me.cfg.notebook) dialog.dialog( "close" );
64032
64031
 
64033
- let alignment = $("#" + me.pre + "chainalignids2").val();
64032
+ let alignment = $("#" + me.pre + "chainalignids2").val().replace(/\s/g, '');
64034
64033
  let alignment_final = thisClass.convertUniProtInChains(alignment);
64035
64034
  let resalign = $("#" + me.pre + "resalignids").val();
64036
64035
 
@@ -64043,7 +64042,7 @@ class Events {
64043
64042
  e.preventDefault();
64044
64043
  if(!me.cfg.notebook) dialog.dialog( "close" );
64045
64044
 
64046
- let alignment = $("#" + me.pre + "chainalignids3").val();
64045
+ let alignment = $("#" + me.pre + "chainalignids3").val().replace(/\s/g, '');
64047
64046
  let alignment_final = thisClass.convertUniProtInChains(alignment);
64048
64047
 
64049
64048
  let predefinedres = $("#" + me.pre + "predefinedres").val().trim().replace(/\n/g, ': ');
@@ -64061,7 +64060,7 @@ class Events {
64061
64060
  e.preventDefault();
64062
64061
  if(!me.cfg.notebook) dialog.dialog( "close" );
64063
64062
 
64064
- let alignment = $("#" + me.pre + "chainalignids4").val();
64063
+ let alignment = $("#" + me.pre + "chainalignids4").val().replace(/\s/g, '');
64065
64064
  let alignment_final = thisClass.convertUniProtInChains(alignment);
64066
64065
 
64067
64066
  let predefinedres = $("#" + me.pre + "predefinedres2").val().trim().replace(/\n/g, ': ');
@@ -64070,7 +64069,8 @@ class Events {
64070
64069
  return;
64071
64070
  }
64072
64071
 
64073
- me.cfg.resdef = predefinedres.replace(/:/gi, ';');
64072
+ // me.cfg.resdef = predefinedres.replace(/:/gi, ';');
64073
+ me.cfg.resdef = predefinedres;
64074
64074
 
64075
64075
  let bRealign = true, bPredefined = true;
64076
64076
  let chainidArray = alignment_final.split(',');
@@ -65350,7 +65350,6 @@ class Events {
65350
65350
  });
65351
65351
  me.myEventCls.onIds("#" + me.pre + "applypick_aroundsphere", "click", function(e) { let ic = me.icn3d;
65352
65352
  //e.preventDefault();
65353
-
65354
65353
  let radius = parseFloat($("#" + me.pre + "radius_aroundsphere").val());
65355
65354
  let nameArray = $("#" + me.pre + "atomsCustomSphere").val();
65356
65355
  let nameArray2 = $("#" + me.pre + "atomsCustomSphere2").val();
@@ -74154,8 +74153,11 @@ class Scene {
74154
74153
 
74155
74154
  ic.fogCls.setFog();
74156
74155
 
74157
- if(ic.bSetCamera) { // load a URL with trackball transformation, or no info after "|||"
74158
- ic.cameraCls.setCamera();
74156
+ ic.cameraCls.setCamera();
74157
+ // set the ratio for view point, which was set in ic.transformCls.resetOrientation_base
74158
+ if(!ic.container.whratio) {
74159
+ ic.container.whratio = me.htmlCls.WIDTH / me.htmlCls.HEIGHT;
74160
+ ic.cam.aspect = ic.container.whratio;
74159
74161
  }
74160
74162
 
74161
74163
  if(ic.opts['slab'] === 'yes') ic.cameraCls.setSlab();
@@ -78611,8 +78613,8 @@ class Tube {
78611
78613
  }
78612
78614
  }
78613
78615
 
78614
- // add one more residue if only one residue is available
78615
- if(pnts.length == 1 && ic.residues.hasOwnProperty(nextoneResid)) {
78616
+ // add one more residue if only one residue is available and it's not part of helix/sheet
78617
+ if(pnts.length == 1 && ic.residues.hasOwnProperty(nextoneResid) && atom.ss == 'coil') {
78616
78618
  let nextAtom = ic.firstAtomObjCls.getAtomFromResi(nextoneResid, atomName);
78617
78619
 
78618
78620
  if(nextAtom) {
@@ -83392,8 +83394,10 @@ class ApplyCenter {
83392
83394
 
83393
83395
  //ic.container.widthInv = 1 / (ic.scaleFactor*width);
83394
83396
  //ic.container.heightInv = 1 / (ic.scaleFactor*height);
83395
-
83396
- ic.container.whratio = width / height;
83397
+ if(ic.cam) {
83398
+ ic.container.whratio = width / height;
83399
+ ic.cam.aspect = ic.container.whratio;
83400
+ }
83397
83401
  }
83398
83402
  }
83399
83403
 
@@ -86465,7 +86469,6 @@ class Alternate {
86465
86469
  this.applyTransformation(ic._zoomFactor, ic.mouseChange, ic.quaternion);
86466
86470
  this.render(bVrAr);
86467
86471
  }
86468
-
86469
86472
  //ic.impostorCls.clearImpostors();
86470
86473
 
86471
86474
  // show membranes
@@ -92728,7 +92731,8 @@ class AnnoSnpClinVar {
92728
92731
 
92729
92732
  let snpResn = snpStr.substr(posSymbol - 1, 1);
92730
92733
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[chnid + '_' + realResi]);
92731
- let oneLetterRes = (atom) ? me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3)) : '';
92734
+ // let oneLetterRes = (atom) ? me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3)) : ''; // !!!
92735
+ let oneLetterRes = (atom) ? me.utilsCls.residueName2Abbr(atom.resn) : '';
92732
92736
  if(!bFromClinVarDb && ic.chainsSeq[chnid][resi - 1]) {
92733
92737
  oneLetterRes = ic.chainsSeq[chnid][resi - 1].name;
92734
92738
  }
@@ -96858,7 +96862,8 @@ class Annotation {
96858
96862
 
96859
96863
  let atom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.chains[chainid]);
96860
96864
  if(atom && atom.resn !== undefined) {
96861
- let oneLetterRes = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
96865
+ // let oneLetterRes = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
96866
+ let oneLetterRes = me.utilsCls.residueName2Abbr(atom.resn);
96862
96867
  $("#" + ic.pre + "anno_" + oneLetterRes).show();
96863
96868
  }
96864
96869
  }
@@ -101062,23 +101067,27 @@ class ShowInter {
101062
101067
  ic.hAtoms[i] = 1;
101063
101068
  }
101064
101069
  }
101070
+
101065
101071
  // do not change the set of displaying atoms
101066
101072
  //ic.dAtoms = me.hashUtilsCls.cloneHash(ic.atoms);
101067
101073
  let commandname, commanddesc, commandname2;
101068
101074
  let firstAtom = ic.firstAtomObjCls.getFirstAtomObj(atomlistTarget);
101069
101075
 
101070
101076
  if(firstAtom !== undefined) {
101071
- commandname = "sphere." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + radius + "A";
101077
+ // commandname = "sphere." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + radius + "A";
101078
+ commandname = "sphere." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn).trim() + firstAtom.resi + "-" + radius + "A";
101072
101079
  //sometimes firstAtom.resi changed, thus we add a general name
101073
101080
  commandname2 = "sphere-" + radius + "A";
101074
101081
  if(bInteraction) {
101075
- commandname = "interactions." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + $("#" + ic.pre + "contactthreshold").val() + "A";
101082
+ // commandname = "interactions." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + $("#" + ic.pre + "contactthreshold").val() + "A";
101083
+ commandname = "interactions." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn).trim() + firstAtom.resi + "-" + $("#" + ic.pre + "contactthreshold").val() + "A";
101076
101084
  commandname2 = "interactions-" + $("#" + ic.pre + "contactthreshold").val() + "A";
101077
101085
  }
101078
101086
  commanddesc = commandname;
101079
101087
  ic.selectionCls.addCustomSelection(residueArray, commandname, commanddesc, select, true);
101080
101088
  ic.selectionCls.addCustomSelection(residueArray, commandname2, commanddesc, select, true);
101081
101089
  }
101090
+
101082
101091
  ic.selectionCls.saveSelectionIfSelected();
101083
101092
  ic.drawCls.draw();
101084
101093
  }
@@ -101328,8 +101337,10 @@ class ViewInterPairs {
101328
101337
  let commandname, commanddesc;
101329
101338
  let firstAtom = ic.firstAtomObjCls.getFirstAtomObj(residues);
101330
101339
  if(firstAtom !== undefined) {
101331
- commandname = "sphere." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + radius + "A";
101332
- if(bInteraction) commandname = "interactions." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + $("#" + ic.pre + "contactthreshold").val() + "A";
101340
+ // commandname = "sphere." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + radius + "A";
101341
+ commandname = "sphere." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn).trim() + firstAtom.resi + "-" + radius + "A";
101342
+ // if(bInteraction) commandname = "interactions." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + $("#" + ic.pre + "contactthreshold").val() + "A";
101343
+ if(bInteraction) commandname = "interactions." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn).trim() + firstAtom.resi + "-" + $("#" + ic.pre + "contactthreshold").val() + "A";
101333
101344
  commanddesc = commandname;
101334
101345
  ic.selectionCls.addCustomSelection(residueArray, commandname, commanddesc, select, true);
101335
101346
  }
@@ -101340,6 +101351,7 @@ class ViewInterPairs {
101340
101351
  tableHtml += this.exportSpherePairs(true, type, labelType);
101341
101352
  } // same set
101342
101353
  }
101354
+
101343
101355
  ic.hAtoms = me.hashUtilsCls.cloneHash(hAtoms);
101344
101356
  ic.bRender = true;
101345
101357
  //ic.hlUpdateCls.updateHlAll();
@@ -103304,7 +103316,6 @@ class ChainalignParser {
103304
103316
  for(let i = 0, il = dataArray.length; i < il; ++i) {
103305
103317
  let mmdbid_q = struArray[i];
103306
103318
  let index = indexArray[i];
103307
-
103308
103319
  this.transformStructure(mmdbid_q, index, 'query');
103309
103320
  }
103310
103321
 
@@ -103535,7 +103546,8 @@ class ChainalignParser {
103535
103546
 
103536
103547
  transformStructure(mmdbid, index, alignType, bForce) { let ic = this.icn3d, me = ic.icn3dui;
103537
103548
  let chainidArray = ic.structures[mmdbid];
103538
-
103549
+ if(!chainidArray) return;
103550
+
103539
103551
  for(let i = 0, il = chainidArray.length; i < il; ++i) {
103540
103552
  for(let serial in ic.chains[chainidArray[i]]) {
103541
103553
  let atm = ic.atoms[serial];
@@ -103670,6 +103682,8 @@ class ChainalignParser {
103670
103682
  addPostfixForStructureids(structArray) { let ic = this.icn3d; ic.icn3dui;
103671
103683
  let struct2cnt = {};
103672
103684
  for(let i = 0, il = structArray.length; i < il; ++i) {
103685
+ 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
103686
+
103673
103687
  let struct = structArray[i].toUpperCase();
103674
103688
 
103675
103689
  if(!struct2cnt.hasOwnProperty(struct)) {
@@ -104054,6 +104068,8 @@ class ChainalignParser {
104054
104068
  }
104055
104069
  else {
104056
104070
  for(let i = 0, il = structArrayTmp.length; i < il; ++i) {
104071
+ if(structArrayTmp[i].toLowerCase().substr(0,8) == 'pdb_0000') structArrayTmp[i] = structArrayTmp[i].substr(8); // temperary support long PDB ID such as pdb_00001tup
104072
+
104057
104073
  let id = structArrayTmp[i].toUpperCase();
104058
104074
  if(!ic.structures.hasOwnProperty(id)) structArray.push(structArrayTmp[i]);
104059
104075
  }
@@ -105922,7 +105938,6 @@ class MmdbParser {
105922
105938
 
105923
105939
  hAtoms = ic.loadAtomDataCls.loadAtomDataIn(data, pdbid, 'mmdbid', undefined, type, chainid, chainIndex, bLastQuery, bNoTransformNoSeqalign);
105924
105940
  }
105925
-
105926
105941
  // show ligand-protein interaction
105927
105942
  if(me.cfg.ligand) { // sid123059722
105928
105943
  for(let chainid in ic.chainid2sid) {
@@ -105994,7 +106009,6 @@ class MmdbParser {
105994
106009
  }
105995
106010
  } // for each domainArray
105996
106011
  } // for each molid
105997
-
105998
106012
  // "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
106013
  ic.bAssemblyUseAsu =(data.asuAtomCount !== undefined) ? true : false;
106000
106014
  if(type !== undefined) {
@@ -106128,7 +106142,6 @@ class MmdbParser {
106128
106142
  //ic.molid2color = molid2color;
106129
106143
  //ic.chain2molid = chain2molid;
106130
106144
  ic.molid2chain = molid2chain;
106131
-
106132
106145
  // small structure with all atoms
106133
106146
  // show surface options
106134
106147
  $("#" + ic.pre + "accordion5").show();
@@ -108366,7 +108379,8 @@ class RealignParser {
108366
108379
  ic.realignResid[chainid] = [];
108367
108380
  }
108368
108381
 
108369
- ic.realignResid[chainid].push({'resid': chainid + '_' + atom.resi, 'resn': me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3)).substr(0, 1)});
108382
+ // ic.realignResid[chainid].push({'resid': chainid + '_' + atom.resi, 'resn': me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3)).substr(0, 1)});
108383
+ ic.realignResid[chainid].push({'resid': chainid + '_' + atom.resi, 'resn': me.utilsCls.residueName2Abbr(atom.resn).substr(0, 1)});
108370
108384
 
108371
108385
  struct2chain[atom.structure] = atom.structure + '_' + atom.chain;
108372
108386
 
@@ -108790,7 +108804,9 @@ let resRangeArray = (me.cfg.resrange) ? decodeURIComponent(me.cfg.resrange).spli
108790
108804
  let alignAjax;
108791
108805
  if(me.cfg.aligntool != 'tmalign') {
108792
108806
  let jsonStr_q = ic.domain3dCls.getDomainJsonForAlign(struct2domain[struct2][chainid2]);
108793
-
108807
+ console.log("@@@ realign " + struct1 + " " + chainid1 + " and " + struct2 + " " + chainid2);
108808
+ console.log("@@@ jsonStr_q " + jsonStr_q);
108809
+ console.log("@@@ jsonStr_t " + jsonStr_t);
108794
108810
  let dataObj = {'domains1': jsonStr_q, 'domains2': jsonStr_t};
108795
108811
  alignAjax = me.getAjaxPostPromise(urlalign, dataObj);
108796
108812
  }
@@ -108924,8 +108940,9 @@ let resRangeArray = (me.cfg.resrange) ? decodeURIComponent(me.cfg.resrange).spli
108924
108940
  let predefinedResArray, predefinedResPair;
108925
108941
 
108926
108942
  if(bPredefined) {
108927
- // predefinedResArray = decodeURIComponent(me.cfg.resdef).trim().replace(/\+/gi, ' ').split(': ');
108928
- predefinedResArray = decodeURIComponent(me.cfg.resdef).trim().replace(/\+/gi, ' ').split('; ');
108943
+ me.cfg.resdef.replace(/; /gi, ': ');
108944
+ predefinedResArray = decodeURIComponent(me.cfg.resdef).trim().replace(/\+/gi, ' ').split(': ');
108945
+ // predefinedResArray = decodeURIComponent(me.cfg.resdef).trim().replace(/\+/gi, ' ').split('; ');
108929
108946
 
108930
108947
  if(predefinedResArray.length != chainidArray.length - 1) {
108931
108948
  var aaa = 1; //alert("Please make sure the number of chains and the lines of predefined residues are the same...");
@@ -111370,7 +111387,8 @@ class LoadAtomData {
111370
111387
  atm.coord = new Vector3$1(atm.coord.x, atm.coord.y, atm.coord.z);
111371
111388
  }
111372
111389
 
111373
- let oneLetterRes = me.utilsCls.residueName2Abbr(atm.resn.substr(0, 3));
111390
+ // let oneLetterRes = me.utilsCls.residueName2Abbr(atm.resn.substr(0, 3));
111391
+ let oneLetterRes = me.utilsCls.residueName2Abbr(atm.resn);
111374
111392
 
111375
111393
  if((type === 'mmdbid' || type === 'align') && ic.bFullUi ) {
111376
111394
  // set ic.mmdbMolidResid2mmdbChainResi
@@ -111497,7 +111515,6 @@ class LoadAtomData {
111497
111515
  let residueid = chainid + '_' + atm.resi;
111498
111516
  if(ic.residues[residueid] === undefined) ic.residues[residueid] = {};
111499
111517
  ic.residues[residueid][serial] = 1;
111500
-
111501
111518
  residueNum = chainNum + '_' + atm.resi;
111502
111519
 
111503
111520
  // different residue
@@ -111666,7 +111683,6 @@ class LoadAtomData {
111666
111683
  }
111667
111684
  // remove the reference
111668
111685
  data.atoms = {};
111669
-
111670
111686
  //ic.cnt =(alignType === undefined || alignType === 'target') ? serial : serial - ic.lastTargetSerial;
111671
111687
  ic.cnt = serial;
111672
111688
 
@@ -112343,7 +112359,7 @@ class SetSeqAlign {
112343
112359
  }
112344
112360
  }
112345
112361
  }
112346
-
112362
+
112347
112363
  for(let j = 0; j <= end1 - start1; ++j) {
112348
112364
  ///if(ic.chainsSeq[chainid1] === undefined || ic.chainsSeq[chainid2] === undefined) break;
112349
112365
 
@@ -112456,11 +112472,15 @@ class SetSeqAlign {
112456
112472
  for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
112457
112473
  let start1, end1;
112458
112474
 
112459
- // start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start) - 1;
112460
- // end1 = parseInt(ic.qt_start_end[chainIndex][i].t_end) - 1;
112461
-
112462
- start1 = ic.ParserUtilsCls.getResiNCBI(chainid1, ic.qt_start_end[chainIndex][i].t_start) - 1;
112463
- end1 = ic.ParserUtilsCls.getResiNCBI(chainid1, ic.qt_start_end[chainIndex][i].t_end) - 1;
112475
+ //ic.qt_start_end is zero-based
112476
+ if(!bRealign && me.cfg.aligntool != 'tmalign') { // vast alignment
112477
+ start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start) - 1;
112478
+ end1 = parseInt(ic.qt_start_end[chainIndex][i].t_end) - 1;
112479
+ }
112480
+ else {
112481
+ start1 = ic.ParserUtilsCls.getResiNCBI(chainid1, ic.qt_start_end[chainIndex][i].t_start) - 1;
112482
+ end1 = ic.ParserUtilsCls.getResiNCBI(chainid1, ic.qt_start_end[chainIndex][i].t_end) - 1;
112483
+ }
112464
112484
 
112465
112485
  for(let j = start1; j <= end1; ++j) {
112466
112486
  let resi, resid;
@@ -112553,7 +112573,6 @@ class SetSeqAlign {
112553
112573
  resObject.color2 = (resid2range_t[resid]) ? '#FF0000' : me.htmlCls.GREYC; // color by conservation
112554
112574
  // resObject.class = (resid2range_t[resid]) ? 'icn3d-align' : 'icn3d-nalign';
112555
112575
  resObject.class = (resid2range_t[resid]) ? 'icn3d-cons' : 'icn3d-nalign';
112556
-
112557
112576
  ic.alnChainsSeq[chainid1].push(resObject);
112558
112577
 
112559
112578
  if(resid2range_t[resid]) {
@@ -112712,6 +112731,7 @@ class SetSeqAlign {
112712
112731
  for(let j = 0, jl = alignedChainIndice.length - 1; j < jl; ++j) {
112713
112732
  let chainidTmp = chainidArray[alignedChainIndice[j]];
112714
112733
  let gapResObject = this.getResObject(chainidTmp, true);
112734
+
112715
112735
  //for(let k = 0, kl = len - nGap; k < kl; ++k) {
112716
112736
  for(let k = 0, kl = len; k < kl; ++k) {
112717
112737
  ic.alnChainsSeq[chainidTmp].splice(pos_t, 0, gapResObject);
@@ -112721,12 +112741,12 @@ class SetSeqAlign {
112721
112741
  //return len - nGap;
112722
112742
  }
112723
112743
 
112724
- insertNotAlignRes(chainid, start, len, bRealign) { let ic = this.icn3d; ic.icn3dui;
112744
+ insertNotAlignRes(chainid, start, len, bRealign) { let ic = this.icn3d, me = ic.icn3dui;
112725
112745
  // insert non-aligned residues in query seq
112726
112746
  for(let j = 0, jl = len; j < jl; ++j) {
112727
112747
  // let resi2 = ic.ParserUtilsCls.getResi(chainid, start + j);
112728
112748
  // let resn2 = this.getResn(chainid, start + j);
112729
- let resi2 = start + j;
112749
+ let resi2 = (bRealign && me.cfg.aligntool == 'tmalign') ? start + j : ic.ParserUtilsCls.getResi(chainid, start + j);
112730
112750
  let resn2 = this.getResnFromResi(chainid, resi2);
112731
112751
  let resn1 = '-';
112732
112752
  let bAlign = false;
@@ -112735,16 +112755,21 @@ class SetSeqAlign {
112735
112755
  }
112736
112756
  }
112737
112757
 
112738
- getTemplatePosFromOriResi(chainid1, start, end, bRealign) { let ic = this.icn3d; ic.icn3dui;
112758
+ getTemplatePosFromOriResi(chainid1, start, end, bRealign) { let ic = this.icn3d, me = ic.icn3dui;
112739
112759
  // let startResi = ic.ParserUtilsCls.getResi(chainid1, start);
112740
112760
  // let endResi = ic.ParserUtilsCls.getResi(chainid1, end);
112741
- let startResi = start;
112742
- let endResi = end;
112761
+ if(bRealign && me.cfg.aligntool == 'tmalign') { // vast alignment
112762
+ let startResi = start;
112763
+ let endResi = end;
112743
112764
 
112744
- let result1 = this.getResiPosInTemplate(chainid1, startResi);
112745
- let result2 = this.getResiPosInTemplate(chainid1, endResi);
112746
-
112747
- return {"pos1": result1.pos, "pos2": result2.pos};
112765
+ let result1 = this.getResiPosInTemplate(chainid1, startResi);
112766
+ let result2 = this.getResiPosInTemplate(chainid1, endResi);
112767
+
112768
+ return {"pos1": result1.pos, "pos2": result2.pos};
112769
+ }
112770
+ else {
112771
+ return {"pos1": start, "pos2": end};
112772
+ }
112748
112773
  }
112749
112774
 
112750
112775
  mergeTwoSeqForAll(chainidArray, index, alignedChainIndice, resid2range_t, start_t, end_t, bRealign) { let ic = this.icn3d, me = ic.icn3dui;
@@ -112807,6 +112832,9 @@ class SetSeqAlign {
112807
112832
 
112808
112833
  let result;
112809
112834
 
112835
+ let nGapInTemplate = 0; // number of gaps inserted into the template sequence
112836
+ let startPosInTemplate = 0; // position in the template sequence to start the mapping
112837
+
112810
112838
  for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
112811
112839
  let start1, start2, end1, end2, resiStart1, start1Pos;
112812
112840
 
@@ -112840,6 +112868,8 @@ class SetSeqAlign {
112840
112868
 
112841
112869
  // if the mapping does not start from start_t, add gaps to the query seq
112842
112870
  if(i == 0) {
112871
+ startPosInTemplate = start1Pos;
112872
+
112843
112873
  //result = this.getTemplatePosFromOriResi(chainid1, start_t, start1, bRealign);
112844
112874
  result = this.getTemplatePosFromOriResi(chainid1, start_t, start1Pos, bRealign);
112845
112875
  pos1 = result.pos1;
@@ -112862,7 +112892,6 @@ class SetSeqAlign {
112862
112892
 
112863
112893
  // insert non-aligned residues in query seq
112864
112894
  this.insertNotAlignRes(chainid2, prevIndex2+1, notAlnLen2, bRealign);
112865
-
112866
112895
  if(notAlnLen1 >= notAlnLen2) {
112867
112896
  // add gaps before the query sequence
112868
112897
  for(let j = 0, jl = notAlnLen1 - notAlnLen2; j < jl; ++j) {
@@ -112872,6 +112901,7 @@ class SetSeqAlign {
112872
112901
  else {
112873
112902
  // check the number of gaps before resiStart1 (n), and insert 'notAlnLen2 - notAlnLen1 - n' gaps
112874
112903
  this.addGapAllAlnChains(chainidArray, alignedChainIndice, chainid1, resiStart1, notAlnLen2 - notAlnLen1);
112904
+ nGapInTemplate += (notAlnLen2 - notAlnLen1);
112875
112905
  }
112876
112906
  }
112877
112907
 
@@ -112880,18 +112910,19 @@ class SetSeqAlign {
112880
112910
  //result = this.getTemplatePosFromOriResi(chainid1, start1Pos, end1Pos, bRealign);
112881
112911
  pos1 = result.pos1;
112882
112912
  pos2 = result.pos2;
112883
-
112913
+
112884
112914
  let k = 0;
112885
112915
  if(!ic.chainsMapping[chainid1]) ic.chainsMapping[chainid1] = {};
112886
112916
  if(!ic.chainsMapping[chainid2]) ic.chainsMapping[chainid2] = {};
112917
+ let resiAdjust = (bRealign && me.cfg.aligntool == 'tmalign') ? 0 : - startPosInTemplate + nGapInTemplate;
112887
112918
  for(let j = pos1; j <= pos2; ++j) {
112888
112919
  // inherit the gaps from the template
112889
- if(ic.alnChainsSeq[chainid1][j].resn == '-') {
112920
+ if(ic.alnChainsSeq[chainid1][j + resiAdjust].resn == '-') {
112890
112921
  ic.alnChainsSeq[chainid2].push(gapResObject2);
112891
112922
  }
112892
112923
  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);
112924
+ let resi1 = (bRealign && me.cfg.aligntool == 'tmalign') ? start1 + k : ic.ParserUtilsCls.getResi(chainid1, start1 + k);
112925
+ let resi2 = (bRealign && me.cfg.aligntool == 'tmalign') ? start2 + k : ic.ParserUtilsCls.getResi(chainid2, start2 + k);
112895
112926
  let resn1 = this.getResnFromResi(chainid1, resi1); //this.getResn(chainid1, start1 + k);
112896
112927
  let resn2 = this.getResnFromResi(chainid2, resi2); //this.getResn(chainid2, start2 + k);
112897
112928
 
@@ -112899,7 +112930,7 @@ class SetSeqAlign {
112899
112930
  let resObject = this.getResObject(chainid2, false, bAlign, resi2, resn2, resn1);
112900
112931
  ic.alnChainsSeq[chainid2].push(resObject);
112901
112932
  // update color in the template
112902
- ic.alnChainsSeq[chainid1][j].color = resObject.color;
112933
+ ic.alnChainsSeq[chainid1][j + resiAdjust].color = resObject.color;
112903
112934
 
112904
112935
  ic.chainsMapping[chainid1][chainid1 + '_' + resi1] = resn1 + resi1;
112905
112936
  ic.chainsMapping[chainid2][chainid2 + '_' + resi2] = resn1 + resi1;
@@ -114239,7 +114270,8 @@ class LoadPDB {
114239
114270
  || (ic.nucleotides.hasOwnProperty(serialArray[i]) && (atom.name == "O3'" || atom.name == "O3*")) ) {
114240
114271
  if(atom.resi == lastResi) continue; // e.g., Alt A and B
114241
114272
 
114242
- let resn = (atom.resn.trim().length > 3) ? atom.resn.trim().substr(0, 3) : atom.resn.trim();
114273
+ // let resn = (atom.resn.trim().length > 3) ? atom.resn.trim().substr(0, 3) : atom.resn.trim();
114274
+ let resn = atom.resn.trim();
114243
114275
  if(!me.parasCls.chargeColors.hasOwnProperty(resn)) {
114244
114276
  continue; // regular residues
114245
114277
  }
@@ -116961,20 +116993,23 @@ class ApplyCommand {
116961
116993
  || commandOri.indexOf('ligplot interaction pairs') == 0
116962
116994
  ) {
116963
116995
  let paraArray = commandOri.split(' | ');
116964
- if(paraArray.length >= 3) {
116996
+ if(paraArray.length >= 2) {
116965
116997
  let setNameArray = paraArray[1].split(' ');
116966
116998
 
116967
116999
  if(setNameArray.length == 2) {
116968
117000
  let nameArray2 = setNameArray[0].split(',');
116969
117001
  let nameArray = setNameArray[1].split(',');
116970
117002
 
116971
- let bHbond = paraArray[2].indexOf('hbonds') !== -1;
116972
- let bSaltbridge = paraArray[2].indexOf('salt bridge') !== -1;
116973
- let bInteraction = paraArray[2].indexOf('interactions') !== -1;
117003
+ let bHbond = 1, bSaltbridge = 1, bInteraction = 1, bHalogen = 1, bPication = 1, bPistacking = 1;
117004
+ if(paraArray.length >= 3) {
117005
+ bHbond = paraArray[2].indexOf('hbonds') !== -1;
117006
+ bSaltbridge = paraArray[2].indexOf('salt bridge') !== -1;
117007
+ bInteraction = paraArray[2].indexOf('interactions') !== -1;
116974
117008
 
116975
- let bHalogen = paraArray[2].indexOf('halogen') !== -1;
116976
- let bPication = paraArray[2].indexOf('pi-cation') !== -1;
116977
- let bPistacking = paraArray[2].indexOf('pi-stacking') !== -1;
117009
+ bHalogen = paraArray[2].indexOf('halogen') !== -1;
117010
+ bPication = paraArray[2].indexOf('pi-cation') !== -1;
117011
+ bPistacking = paraArray[2].indexOf('pi-stacking') !== -1;
117012
+ }
116978
117013
 
116979
117014
  let bHbondCalc;
116980
117015
  if(paraArray.length >= 4) {
@@ -117899,12 +117934,10 @@ class DefinedSets {
117899
117934
  //Set the menu of defined sets with an array of defined names "commandnameArray".
117900
117935
  setAtomMenu(commandnameArray) { let ic = this.icn3d; ic.icn3dui;
117901
117936
  let html = "";
117902
-
117903
117937
  let nameArray1 =(ic.defNames2Residues !== undefined) ? Object.keys(ic.defNames2Residues) : [];
117904
117938
  let nameArray2 =(ic.defNames2Atoms !== undefined) ? Object.keys(ic.defNames2Atoms) : [];
117905
117939
 
117906
117940
  let nameArrayTmp = nameArray1.concat(nameArray2).sort();
117907
-
117908
117941
  let nameArray = [];
117909
117942
  // $.each(nameArrayTmp, function(i, el){
117910
117943
  // if($.inArray(el, nameArray) === -1) nameArray.push(el);
@@ -117922,7 +117955,6 @@ class DefinedSets {
117922
117955
  // }
117923
117956
  // });
117924
117957
  // });
117925
-
117926
117958
  //for(let i in ic.defNames2Atoms) {
117927
117959
  for(let i = 0, il = nameArray.length; i < il; ++i) {
117928
117960
  let name = nameArray[i];
@@ -117953,7 +117985,6 @@ class DefinedSets {
117953
117985
  html += "<option value='" + name + "' style='color:#" + color + "'>" + name + "</option>";
117954
117986
  }
117955
117987
  }
117956
-
117957
117988
  return html;
117958
117989
  }
117959
117990
 
@@ -117978,17 +118009,18 @@ class DefinedSets {
117978
118009
  }
117979
118010
  else { // chemicals, etc
117980
118011
  let resid = atom.structure + '_' + atom.chain + '_' + atom.resi;
117981
- let resn = atom.resn.substr(0, 3);
118012
+ // let resn = atom.resn.substr(0, 3);
118013
+ let resn = atom.resn;
117982
118014
 
117983
118015
  if(!nonProtNuclResHash[resn]) {
117984
- nonProtNuclResHash[resn] = ic.residues[resid];
118016
+ nonProtNuclResHash[resn] = me.hashUtilsCls.cloneHash(ic.residues[resid]);
117985
118017
  }
117986
118018
  else {
117987
118019
  nonProtNuclResHash[resn] = me.hashUtilsCls.unionHash(nonProtNuclResHash[atom.resn], ic.residues[resid]);
117988
118020
  }
117989
118021
  }
117990
118022
  }
117991
-
118023
+
117992
118024
  // chemicals etc
117993
118025
  for(let resn in nonProtNuclResHash) {
117994
118026
  ic.defNames2Residues[resn] = Object.keys(ic.firstAtomObjCls.getResiduesFromAtoms(nonProtNuclResHash[resn]));
@@ -117996,7 +118028,7 @@ class DefinedSets {
117996
118028
 
117997
118029
  ic.defNames2Command[resn] = 'select :3' + resn;
117998
118030
  }
117999
-
118031
+
118000
118032
  // select whole structure
118001
118033
  if(ic.structures && Object.keys(ic.structures) == 1) {
118002
118034
  let structure = Object.keys(ic.structures)[0];
@@ -118089,10 +118121,8 @@ class DefinedSets {
118089
118121
 
118090
118122
  if(ic.bSetChainsAdvancedMenu === undefined || !ic.bSetChainsAdvancedMenu || ic.bResetSets) {
118091
118123
  this.setPredefinedInMenu();
118092
-
118093
118124
  ic.bSetChainsAdvancedMenu = true;
118094
118125
  }
118095
-
118096
118126
  ic.hAtoms = me.hashUtilsCls.cloneHash(prevHAtoms);
118097
118127
  ic.dAtoms = me.hashUtilsCls.cloneHash(prevDAtoms);
118098
118128
 
@@ -121745,14 +121775,22 @@ class Delphi {
121745
121775
  let paraArray = command.split(" | ");
121746
121776
 
121747
121777
  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
121778
  let type = typeArray[2];
121753
- let contour = contourArray[1]; //parseFloat(contourArray[1]);
121754
- let gsize = gsizeArray[1]; //parseInt(gsizeArray[1]);
121755
- let salt = saltArray[1]; //parseFloat(saltArray[1]);
121779
+
121780
+ let contour = 2, gsize = 65, salt = 0.15; // default values for contour, gsize, salt
121781
+ ic.phisurftype = 22; // default value for surface type
121782
+ ic.phisurfop = 1.0; // default value for surface opacity
121783
+ ic.phisurfwf = "no"; // default value for surface wireframe
121784
+
121785
+ if(paraArray.length == 7) {
121786
+ let contourArray = paraArray[1].split(" ");
121787
+ let gsizeArray = paraArray[2].split(" ");
121788
+ let saltArray = paraArray[3].split(" ");
121789
+
121790
+ contour = contourArray[1]; //parseFloat(contourArray[1]);
121791
+ gsize = gsizeArray[1]; //parseInt(gsizeArray[1]);
121792
+ salt = saltArray[1]; //parseFloat(saltArray[1]);
121793
+ }
121756
121794
 
121757
121795
  // The values should be string
121758
121796
  $("#" + ic.pre + "delphi1gsize").val(gsize);
@@ -121769,12 +121807,12 @@ class Delphi {
121769
121807
  ic.phisurftype = surfaceArray[1];
121770
121808
  ic.phisurfop = opacityArray[1]; //parseFloat(opacityArray[1]);
121771
121809
  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
121810
  }
121777
121811
 
121812
+ $("#" + ic.pre + "delphi" + "surftype").val(ic.phisurftype);
121813
+ $("#" + ic.pre + "delphi" + "surfop").val(ic.phisurfop);
121814
+ $("#" + ic.pre + "delphi" + "surfwf").val(ic.phisurfwf);
121815
+
121778
121816
  let bSurface =(type == 'surface') ? true : false;
121779
121817
 
121780
121818
  await thisClass.CalcPhi(gsize, salt, contour, bSurface);
@@ -123312,7 +123350,8 @@ class Dssp {
123312
123350
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
123313
123351
  if(!atom) continue;
123314
123352
 
123315
- let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
123353
+ // let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
123354
+ let resn = me.utilsCls.residueName2Abbr(atom.resn);
123316
123355
 
123317
123356
  let domainid = ic.resid2domainid[resid];
123318
123357
  let refnumLabel = ic.resid2refnum[resid];
@@ -123389,7 +123428,8 @@ class Dssp {
123389
123428
 
123390
123429
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
123391
123430
  if(!atom) continue;
123392
- let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
123431
+ // let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
123432
+ let resn = me.utilsCls.residueName2Abbr(atom.resn);
123393
123433
 
123394
123434
  if(refnumLabel) {
123395
123435
  let refnumStr_ori = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
@@ -123412,7 +123452,8 @@ class Dssp {
123412
123452
 
123413
123453
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
123414
123454
  if(!atom) continue;
123415
- let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
123455
+ // let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
123456
+ let resn = me.utilsCls.residueName2Abbr(atom.resn);
123416
123457
 
123417
123458
  if(refnumLabel) {
123418
123459
  let refnumStr_ori = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
@@ -127682,7 +127723,8 @@ class Ligplot {
127682
127723
  }
127683
127724
  }
127684
127725
 
127685
- let oneLetterRes = me.utilsCls.residueName2Abbr(atom2.resn.substr(0, 3));
127726
+ // let oneLetterRes = me.utilsCls.residueName2Abbr(atom2.resn.substr(0, 3));
127727
+ let oneLetterRes = me.utilsCls.residueName2Abbr(atom2.resn);
127686
127728
  let resName2 = oneLetterRes + atom2.resi;
127687
127729
  let textColor2 = (atom2.color) ? atom2.color.getHexString() : '000';
127688
127730
  let lineColor = ic.lineGraphCls.getStrokecolor(undefined, interactionType);
@@ -128060,11 +128102,12 @@ class Transform {
128060
128102
  this.icn3d = icn3d;
128061
128103
  }
128062
128104
 
128063
- resetOrientation_base(commandTransformation) { let ic = this.icn3d; ic.icn3dui;
128105
+ resetOrientation_base(commandTransformation) { let ic = this.icn3d, me = ic.icn3dui;
128064
128106
  if(commandTransformation.length == 2 && commandTransformation[1].length > 0) {
128107
+ if(commandTransformation[1].substr(0, 4) == 'pos:') ic.bSetCamera = false;
128108
+
128065
128109
  if(ic.bSetCamera) { // |||{"factor"...}
128066
128110
  let transformation = JSON.parse(commandTransformation[1]);
128067
-
128068
128111
  ic._zoomFactor = transformation.factor;
128069
128112
 
128070
128113
  ic.mouseChange.x = transformation.mouseChange.x;
@@ -128095,6 +128138,12 @@ class Transform {
128095
128138
  }
128096
128139
  }
128097
128140
  });
128141
+
128142
+ // set the aspect ratio
128143
+ if(!ic.container.whratio) {
128144
+ ic.container.whratio = me.htmlCls.WIDTH / me.htmlCls.HEIGHT;
128145
+ ic.cam.aspect = ic.container.whratio;
128146
+ }
128098
128147
  }
128099
128148
  }
128100
128149
  else {
@@ -132793,7 +132842,7 @@ class iCn3DUI {
132793
132842
  //even when multiple iCn3D viewers are shown together.
132794
132843
  this.pre = this.cfg.divid + "_";
132795
132844
 
132796
- this.REVISION = '3.45.2';
132845
+ this.REVISION = '3.45.3';
132797
132846
 
132798
132847
  // In nodejs, iCn3D defines "window = {navigator: {}}", and added window = {navigator: {}, "__THREE__":"177"}
132799
132848
  this.bNode = (Object.keys(window).length < 3) ? true : false;
@@ -133044,18 +133093,21 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
133044
133093
  await ic.pdbParserCls.downloadUrl(url, type, me.cfg.command);
133045
133094
  }
133046
133095
  else if(me.cfg.mmtfid !== undefined) {
133096
+ 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
133097
  ic.inputid = me.cfg.mmtfid;
133048
133098
  ic.loadCmd = 'load mmtf ' + me.cfg.mmtfid;
133049
133099
  me.htmlCls.clickMenuCls.setLogCmd(ic.loadCmd, true);
133050
133100
  await ic.bcifParserCls.downloadBcif(me.cfg.mmtfid);
133051
133101
  }
133052
133102
  else if(me.cfg.bcifid !== undefined) {
133103
+ 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
133104
  ic.inputid = me.cfg.bcifid;
133054
133105
  ic.loadCmd = 'load bcif ' + me.cfg.bcifid;
133055
133106
  me.htmlCls.clickMenuCls.setLogCmd(ic.loadCmd, true);
133056
133107
  await ic.bcifParserCls.downloadBcif(me.cfg.bcifid);
133057
133108
  }
133058
133109
  else if(me.cfg.pdbid !== undefined) {
133110
+ 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
133111
  ic.inputid = me.cfg.pdbid;
133060
133112
  ic.loadCmd = 'load pdb ' + me.cfg.pdbid;
133061
133113
  me.htmlCls.clickMenuCls.setLogCmd(ic.loadCmd, true);
@@ -133078,6 +133130,7 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
133078
133130
  await ic.opmParserCls.downloadOpm(me.cfg.opmid);
133079
133131
  }
133080
133132
  else if(me.cfg.mmdbid !== undefined) {
133133
+ 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
133134
  ic.inputid = me.cfg.mmdbid;
133082
133135
  // ic.bNCBI = true;
133083
133136
  ic.loadCmd = 'load mmdb ' + me.cfg.mmdbid + ' | parameters ' + me.cfg.inpara;
@@ -133216,6 +133269,7 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
133216
133269
  await ic.sdfParserCls.downloadSmiles(me.cfg.smiles);
133217
133270
  }
133218
133271
  else if(me.cfg.mmcifid !== undefined) {
133272
+ // long PDB ID was supported with mmcifid
133219
133273
  ic.inputid = me.cfg.mmcifid;
133220
133274
  ic.loadCmd = 'load mmcif ' + me.cfg.mmcifid;
133221
133275
  me.htmlCls.clickMenuCls.setLogCmd(ic.loadCmd, true);