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.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, sigma2fofc);
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
  });
@@ -60270,7 +60270,7 @@ class SetMenu {
60270
60270
  html += this.getLink('mn1_mmcifid', 'RCSB mmCIF ID ' + me.htmlCls.wifiStr, undefined, 2);
60271
60271
  //html += this.getLink('mn1_gi', 'NCBI gi ' + me.htmlCls.wifiStr, undefined, 2);
60272
60272
 
60273
- html += this.getLink('mn1_cid', 'PubChem CID/Name/InchI ' + me.htmlCls.wifiStr, 1, 2);
60273
+ html += this.getLink('mn1_cid', 'PubChem CID/Name/InChI ' + me.htmlCls.wifiStr, 1, 2);
60274
60274
  html += this.getLink('mn1_smiles', 'Chemical SMILES ', undefined, 2);
60275
60275
 
60276
60276
  html += "</ul>";
@@ -60638,9 +60638,9 @@ class SetMenu {
60638
60638
 
60639
60639
  html += this.getMenuText('mn2_rotate90', 'Rotate 90&deg;', undefined, undefined, 2);
60640
60640
  html += "<ul>";
60641
- html += this.getRadio('mn6_rotate90', 'mn6_rotatex', 'rotate x', undefined, undefined, 2);
60642
- html += this.getRadio('mn6_rotate90', 'mn6_rotatey', 'rotate y', undefined, undefined, 2);
60643
- html += this.getRadio('mn6_rotate90', 'mn6_rotatez', 'rotate z', undefined, undefined, 2);
60641
+ html += this.getRadio('mn6_rotate90', 'mn6_rotatex', 'rotate x', undefined, undefined, 3);
60642
+ html += this.getRadio('mn6_rotate90', 'mn6_rotatey', 'rotate y', undefined, undefined, 3);
60643
+ html += this.getRadio('mn6_rotate90', 'mn6_rotatez', 'rotate z', undefined, undefined, 3);
60644
60644
  html += "</ul>";
60645
60645
  html += "</li>";
60646
60646
  html += this.getMenuText('mn2_rotateauto', 'Auto Rotation', undefined, 1, 2);
@@ -62724,7 +62724,7 @@ class SetDialog {
62724
62724
 
62725
62725
  html += me.htmlCls.divStr + "dl_mmdbafid' class='" + dialogClass + "' style='max-width:600px'>";
62726
62726
  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,4N7N,P69905,P01942' size=30> <br><br>";
62727
+ 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
62728
  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
62729
  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
62730
 
@@ -62771,7 +62771,7 @@ class SetDialog {
62771
62771
 
62772
62772
  html += me.htmlCls.divStr + "dl_cid' class='" + dialogClass + "'>";
62773
62773
  html += this.addNotebookTitle('dl_cid', 'Please input a PubChem Compound');
62774
- html += "PubChem CID/Name/InchI: " + me.htmlCls.inputTextStr + "id='" + me.pre + "cid' value='2244' size=8> ";
62774
+ html += "PubChem CID/Name/InChI: " + me.htmlCls.inputTextStr + "id='" + me.pre + "cid' value='2244' size=8> ";
62775
62775
  html += me.htmlCls.buttonStr + "reload_cid'>Load</button>";
62776
62776
  html += "</div>";
62777
62777
 
@@ -62801,7 +62801,6 @@ class SetDialog {
62801
62801
 
62802
62802
  html += me.htmlCls.divStr + "dl_video' class='" + dialogClass + "'>";
62803
62803
  html += this.addNotebookTitle('dl_video', 'Save canvas changes in a video');
62804
- html += "State file: " + me.htmlCls.inputFileStr + "id='" + me.pre + "state'><br/>";
62805
62804
  html += me.htmlCls.buttonStr + "video_start' style='margin-top: 6px;'>Video Start</button>";
62806
62805
  html += me.htmlCls.buttonStr + "video_end' style='margin: 6px 0px 0px 30px;'>Video End</button>";
62807
62806
  html += "</div>";
@@ -64335,7 +64334,7 @@ class Events {
64335
64334
  ic.cam.quaternion.setFromUnitVectors(new Vector3$1(0, 0, -1), new Vector3$1(directionArray[0], directionArray[1], directionArray[2]));
64336
64335
  ic.cam.up.set(upvectorArray[0], upvectorArray[1], upvectorArray[2]);
64337
64336
  ic.cam.fov = fov;
64338
- //ic.container.whratio = aspect;
64337
+ // ic.container.whratio = aspect;
64339
64338
 
64340
64339
  ic.drawCls.applyTransformation(ic._zoomFactor, ic.mouseChange, ic.quaternion);
64341
64340
  ic.drawCls.render();
@@ -64919,7 +64918,7 @@ class Events {
64919
64918
  e.preventDefault();
64920
64919
  if(!me.cfg.notebook) dialog.dialog( "close" );
64921
64920
 
64922
- let alignment = $("#" + me.pre + "chainalignids").val();
64921
+ let alignment = $("#" + me.pre + "chainalignids").val().replace(/\s/g, '');
64923
64922
  let alignment_final = thisClass.convertUniProtInChains(alignment);
64924
64923
 
64925
64924
  thisClass.setLogCmd("load chains " + alignment_final + " on asymmetric unit | residues | resdef ", false);
@@ -64931,7 +64930,7 @@ class Events {
64931
64930
  e.preventDefault();
64932
64931
  if(!me.cfg.notebook) dialog.dialog( "close" );
64933
64932
 
64934
- let alignment = $("#" + me.pre + "chainalignids2").val();
64933
+ let alignment = $("#" + me.pre + "chainalignids2").val().replace(/\s/g, '');
64935
64934
  let alignment_final = thisClass.convertUniProtInChains(alignment);
64936
64935
  let resalign = $("#" + me.pre + "resalignids").val();
64937
64936
 
@@ -64944,7 +64943,7 @@ class Events {
64944
64943
  e.preventDefault();
64945
64944
  if(!me.cfg.notebook) dialog.dialog( "close" );
64946
64945
 
64947
- let alignment = $("#" + me.pre + "chainalignids3").val();
64946
+ let alignment = $("#" + me.pre + "chainalignids3").val().replace(/\s/g, '');
64948
64947
  let alignment_final = thisClass.convertUniProtInChains(alignment);
64949
64948
 
64950
64949
  let predefinedres = $("#" + me.pre + "predefinedres").val().trim().replace(/\n/g, ': ');
@@ -64962,7 +64961,7 @@ class Events {
64962
64961
  e.preventDefault();
64963
64962
  if(!me.cfg.notebook) dialog.dialog( "close" );
64964
64963
 
64965
- let alignment = $("#" + me.pre + "chainalignids4").val();
64964
+ let alignment = $("#" + me.pre + "chainalignids4").val().replace(/\s/g, '');
64966
64965
  let alignment_final = thisClass.convertUniProtInChains(alignment);
64967
64966
 
64968
64967
  let predefinedres = $("#" + me.pre + "predefinedres2").val().trim().replace(/\n/g, ': ');
@@ -64971,7 +64970,8 @@ class Events {
64971
64970
  return;
64972
64971
  }
64973
64972
 
64974
- me.cfg.resdef = predefinedres.replace(/:/gi, ';');
64973
+ // me.cfg.resdef = predefinedres.replace(/:/gi, ';');
64974
+ me.cfg.resdef = predefinedres;
64975
64975
 
64976
64976
  let bRealign = true, bPredefined = true;
64977
64977
  let chainidArray = alignment_final.split(',');
@@ -66251,7 +66251,6 @@ class Events {
66251
66251
  });
66252
66252
  me.myEventCls.onIds("#" + me.pre + "applypick_aroundsphere", "click", function(e) { let ic = me.icn3d;
66253
66253
  //e.preventDefault();
66254
-
66255
66254
  let radius = parseFloat($("#" + me.pre + "radius_aroundsphere").val());
66256
66255
  let nameArray = $("#" + me.pre + "atomsCustomSphere").val();
66257
66256
  let nameArray2 = $("#" + me.pre + "atomsCustomSphere2").val();
@@ -75055,8 +75054,11 @@ class Scene {
75055
75054
 
75056
75055
  ic.fogCls.setFog();
75057
75056
 
75058
- if(ic.bSetCamera) { // load a URL with trackball transformation, or no info after "|||"
75059
- ic.cameraCls.setCamera();
75057
+ ic.cameraCls.setCamera();
75058
+ // set the ratio for view point, which was set in ic.transformCls.resetOrientation_base
75059
+ if(!ic.container.whratio) {
75060
+ ic.container.whratio = me.htmlCls.WIDTH / me.htmlCls.HEIGHT;
75061
+ ic.cam.aspect = ic.container.whratio;
75060
75062
  }
75061
75063
 
75062
75064
  if(ic.opts['slab'] === 'yes') ic.cameraCls.setSlab();
@@ -79512,8 +79514,8 @@ class Tube {
79512
79514
  }
79513
79515
  }
79514
79516
 
79515
- // add one more residue if only one residue is available
79516
- if(pnts.length == 1 && ic.residues.hasOwnProperty(nextoneResid)) {
79517
+ // add one more residue if only one residue is available and it's not part of helix/sheet
79518
+ if(pnts.length == 1 && ic.residues.hasOwnProperty(nextoneResid) && atom.ss == 'coil') {
79517
79519
  let nextAtom = ic.firstAtomObjCls.getAtomFromResi(nextoneResid, atomName);
79518
79520
 
79519
79521
  if(nextAtom) {
@@ -84293,8 +84295,10 @@ class ApplyCenter {
84293
84295
 
84294
84296
  //ic.container.widthInv = 1 / (ic.scaleFactor*width);
84295
84297
  //ic.container.heightInv = 1 / (ic.scaleFactor*height);
84296
-
84297
- ic.container.whratio = width / height;
84298
+ if(ic.cam) {
84299
+ ic.container.whratio = width / height;
84300
+ ic.cam.aspect = ic.container.whratio;
84301
+ }
84298
84302
  }
84299
84303
  }
84300
84304
 
@@ -87366,7 +87370,6 @@ class Alternate {
87366
87370
  this.applyTransformation(ic._zoomFactor, ic.mouseChange, ic.quaternion);
87367
87371
  this.render(bVrAr);
87368
87372
  }
87369
-
87370
87373
  //ic.impostorCls.clearImpostors();
87371
87374
 
87372
87375
  // show membranes
@@ -93629,7 +93632,8 @@ class AnnoSnpClinVar {
93629
93632
 
93630
93633
  let snpResn = snpStr.substr(posSymbol - 1, 1);
93631
93634
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[chnid + '_' + realResi]);
93632
- let oneLetterRes = (atom) ? me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3)) : '';
93635
+ // let oneLetterRes = (atom) ? me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3)) : ''; // !!!
93636
+ let oneLetterRes = (atom) ? me.utilsCls.residueName2Abbr(atom.resn) : '';
93633
93637
  if(!bFromClinVarDb && ic.chainsSeq[chnid][resi - 1]) {
93634
93638
  oneLetterRes = ic.chainsSeq[chnid][resi - 1].name;
93635
93639
  }
@@ -97759,7 +97763,8 @@ class Annotation {
97759
97763
 
97760
97764
  let atom = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.chains[chainid]);
97761
97765
  if(atom && atom.resn !== undefined) {
97762
- let oneLetterRes = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
97766
+ // let oneLetterRes = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
97767
+ let oneLetterRes = me.utilsCls.residueName2Abbr(atom.resn);
97763
97768
  $("#" + ic.pre + "anno_" + oneLetterRes).show();
97764
97769
  }
97765
97770
  }
@@ -101963,23 +101968,27 @@ class ShowInter {
101963
101968
  ic.hAtoms[i] = 1;
101964
101969
  }
101965
101970
  }
101971
+
101966
101972
  // do not change the set of displaying atoms
101967
101973
  //ic.dAtoms = me.hashUtilsCls.cloneHash(ic.atoms);
101968
101974
  let commandname, commanddesc, commandname2;
101969
101975
  let firstAtom = ic.firstAtomObjCls.getFirstAtomObj(atomlistTarget);
101970
101976
 
101971
101977
  if(firstAtom !== undefined) {
101972
- commandname = "sphere." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + radius + "A";
101978
+ // commandname = "sphere." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + radius + "A";
101979
+ commandname = "sphere." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn).trim() + firstAtom.resi + "-" + radius + "A";
101973
101980
  //sometimes firstAtom.resi changed, thus we add a general name
101974
101981
  commandname2 = "sphere-" + radius + "A";
101975
101982
  if(bInteraction) {
101976
- commandname = "interactions." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + $("#" + ic.pre + "contactthreshold").val() + "A";
101983
+ // commandname = "interactions." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + $("#" + ic.pre + "contactthreshold").val() + "A";
101984
+ commandname = "interactions." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn).trim() + firstAtom.resi + "-" + $("#" + ic.pre + "contactthreshold").val() + "A";
101977
101985
  commandname2 = "interactions-" + $("#" + ic.pre + "contactthreshold").val() + "A";
101978
101986
  }
101979
101987
  commanddesc = commandname;
101980
101988
  ic.selectionCls.addCustomSelection(residueArray, commandname, commanddesc, select, true);
101981
101989
  ic.selectionCls.addCustomSelection(residueArray, commandname2, commanddesc, select, true);
101982
101990
  }
101991
+
101983
101992
  ic.selectionCls.saveSelectionIfSelected();
101984
101993
  ic.drawCls.draw();
101985
101994
  }
@@ -102229,8 +102238,10 @@ class ViewInterPairs {
102229
102238
  let commandname, commanddesc;
102230
102239
  let firstAtom = ic.firstAtomObjCls.getFirstAtomObj(residues);
102231
102240
  if(firstAtom !== undefined) {
102232
- commandname = "sphere." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + radius + "A";
102233
- if(bInteraction) commandname = "interactions." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + $("#" + ic.pre + "contactthreshold").val() + "A";
102241
+ // commandname = "sphere." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + radius + "A";
102242
+ commandname = "sphere." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn).trim() + firstAtom.resi + "-" + radius + "A";
102243
+ // if(bInteraction) commandname = "interactions." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn.substr(0, 3)).trim() + firstAtom.resi + "-" + $("#" + ic.pre + "contactthreshold").val() + "A";
102244
+ if(bInteraction) commandname = "interactions." + firstAtom.chain + ":" + me.utilsCls.residueName2Abbr(firstAtom.resn).trim() + firstAtom.resi + "-" + $("#" + ic.pre + "contactthreshold").val() + "A";
102234
102245
  commanddesc = commandname;
102235
102246
  ic.selectionCls.addCustomSelection(residueArray, commandname, commanddesc, select, true);
102236
102247
  }
@@ -102241,6 +102252,7 @@ class ViewInterPairs {
102241
102252
  tableHtml += this.exportSpherePairs(true, type, labelType);
102242
102253
  } // same set
102243
102254
  }
102255
+
102244
102256
  ic.hAtoms = me.hashUtilsCls.cloneHash(hAtoms);
102245
102257
  ic.bRender = true;
102246
102258
  //ic.hlUpdateCls.updateHlAll();
@@ -104205,7 +104217,6 @@ class ChainalignParser {
104205
104217
  for(let i = 0, il = dataArray.length; i < il; ++i) {
104206
104218
  let mmdbid_q = struArray[i];
104207
104219
  let index = indexArray[i];
104208
-
104209
104220
  this.transformStructure(mmdbid_q, index, 'query');
104210
104221
  }
104211
104222
 
@@ -104436,7 +104447,8 @@ class ChainalignParser {
104436
104447
 
104437
104448
  transformStructure(mmdbid, index, alignType, bForce) { let ic = this.icn3d, me = ic.icn3dui;
104438
104449
  let chainidArray = ic.structures[mmdbid];
104439
-
104450
+ if(!chainidArray) return;
104451
+
104440
104452
  for(let i = 0, il = chainidArray.length; i < il; ++i) {
104441
104453
  for(let serial in ic.chains[chainidArray[i]]) {
104442
104454
  let atm = ic.atoms[serial];
@@ -104571,6 +104583,8 @@ class ChainalignParser {
104571
104583
  addPostfixForStructureids(structArray) { let ic = this.icn3d; ic.icn3dui;
104572
104584
  let struct2cnt = {};
104573
104585
  for(let i = 0, il = structArray.length; i < il; ++i) {
104586
+ 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
104587
+
104574
104588
  let struct = structArray[i].toUpperCase();
104575
104589
 
104576
104590
  if(!struct2cnt.hasOwnProperty(struct)) {
@@ -104955,6 +104969,8 @@ class ChainalignParser {
104955
104969
  }
104956
104970
  else {
104957
104971
  for(let i = 0, il = structArrayTmp.length; i < il; ++i) {
104972
+ if(structArrayTmp[i].toLowerCase().substr(0,8) == 'pdb_0000') structArrayTmp[i] = structArrayTmp[i].substr(8); // temperary support long PDB ID such as pdb_00001tup
104973
+
104958
104974
  let id = structArrayTmp[i].toUpperCase();
104959
104975
  if(!ic.structures.hasOwnProperty(id)) structArray.push(structArrayTmp[i]);
104960
104976
  }
@@ -106823,7 +106839,6 @@ class MmdbParser {
106823
106839
 
106824
106840
  hAtoms = ic.loadAtomDataCls.loadAtomDataIn(data, pdbid, 'mmdbid', undefined, type, chainid, chainIndex, bLastQuery, bNoTransformNoSeqalign);
106825
106841
  }
106826
-
106827
106842
  // show ligand-protein interaction
106828
106843
  if(me.cfg.ligand) { // sid123059722
106829
106844
  for(let chainid in ic.chainid2sid) {
@@ -106895,7 +106910,6 @@ class MmdbParser {
106895
106910
  }
106896
106911
  } // for each domainArray
106897
106912
  } // for each molid
106898
-
106899
106913
  // "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
106914
  ic.bAssemblyUseAsu =(data.asuAtomCount !== undefined) ? true : false;
106901
106915
  if(type !== undefined) {
@@ -107029,7 +107043,6 @@ class MmdbParser {
107029
107043
  //ic.molid2color = molid2color;
107030
107044
  //ic.chain2molid = chain2molid;
107031
107045
  ic.molid2chain = molid2chain;
107032
-
107033
107046
  // small structure with all atoms
107034
107047
  // show surface options
107035
107048
  $("#" + ic.pre + "accordion5").show();
@@ -109267,7 +109280,8 @@ class RealignParser {
109267
109280
  ic.realignResid[chainid] = [];
109268
109281
  }
109269
109282
 
109270
- ic.realignResid[chainid].push({'resid': chainid + '_' + atom.resi, 'resn': me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3)).substr(0, 1)});
109283
+ // ic.realignResid[chainid].push({'resid': chainid + '_' + atom.resi, 'resn': me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3)).substr(0, 1)});
109284
+ ic.realignResid[chainid].push({'resid': chainid + '_' + atom.resi, 'resn': me.utilsCls.residueName2Abbr(atom.resn).substr(0, 1)});
109271
109285
 
109272
109286
  struct2chain[atom.structure] = atom.structure + '_' + atom.chain;
109273
109287
 
@@ -109691,7 +109705,9 @@ let resRangeArray = (me.cfg.resrange) ? decodeURIComponent(me.cfg.resrange).spli
109691
109705
  let alignAjax;
109692
109706
  if(me.cfg.aligntool != 'tmalign') {
109693
109707
  let jsonStr_q = ic.domain3dCls.getDomainJsonForAlign(struct2domain[struct2][chainid2]);
109694
-
109708
+ console.log("@@@ realign " + struct1 + " " + chainid1 + " and " + struct2 + " " + chainid2);
109709
+ console.log("@@@ jsonStr_q " + jsonStr_q);
109710
+ console.log("@@@ jsonStr_t " + jsonStr_t);
109695
109711
  let dataObj = {'domains1': jsonStr_q, 'domains2': jsonStr_t};
109696
109712
  alignAjax = me.getAjaxPostPromise(urlalign, dataObj);
109697
109713
  }
@@ -109825,8 +109841,9 @@ let resRangeArray = (me.cfg.resrange) ? decodeURIComponent(me.cfg.resrange).spli
109825
109841
  let predefinedResArray, predefinedResPair;
109826
109842
 
109827
109843
  if(bPredefined) {
109828
- // predefinedResArray = decodeURIComponent(me.cfg.resdef).trim().replace(/\+/gi, ' ').split(': ');
109829
- predefinedResArray = decodeURIComponent(me.cfg.resdef).trim().replace(/\+/gi, ' ').split('; ');
109844
+ me.cfg.resdef.replace(/; /gi, ': ');
109845
+ predefinedResArray = decodeURIComponent(me.cfg.resdef).trim().replace(/\+/gi, ' ').split(': ');
109846
+ // predefinedResArray = decodeURIComponent(me.cfg.resdef).trim().replace(/\+/gi, ' ').split('; ');
109830
109847
 
109831
109848
  if(predefinedResArray.length != chainidArray.length - 1) {
109832
109849
  var aaa = 1; //alert("Please make sure the number of chains and the lines of predefined residues are the same...");
@@ -112271,7 +112288,8 @@ class LoadAtomData {
112271
112288
  atm.coord = new Vector3$1(atm.coord.x, atm.coord.y, atm.coord.z);
112272
112289
  }
112273
112290
 
112274
- let oneLetterRes = me.utilsCls.residueName2Abbr(atm.resn.substr(0, 3));
112291
+ // let oneLetterRes = me.utilsCls.residueName2Abbr(atm.resn.substr(0, 3));
112292
+ let oneLetterRes = me.utilsCls.residueName2Abbr(atm.resn);
112275
112293
 
112276
112294
  if((type === 'mmdbid' || type === 'align') && ic.bFullUi ) {
112277
112295
  // set ic.mmdbMolidResid2mmdbChainResi
@@ -112398,7 +112416,6 @@ class LoadAtomData {
112398
112416
  let residueid = chainid + '_' + atm.resi;
112399
112417
  if(ic.residues[residueid] === undefined) ic.residues[residueid] = {};
112400
112418
  ic.residues[residueid][serial] = 1;
112401
-
112402
112419
  residueNum = chainNum + '_' + atm.resi;
112403
112420
 
112404
112421
  // different residue
@@ -112567,7 +112584,6 @@ class LoadAtomData {
112567
112584
  }
112568
112585
  // remove the reference
112569
112586
  data.atoms = {};
112570
-
112571
112587
  //ic.cnt =(alignType === undefined || alignType === 'target') ? serial : serial - ic.lastTargetSerial;
112572
112588
  ic.cnt = serial;
112573
112589
 
@@ -113244,7 +113260,7 @@ class SetSeqAlign {
113244
113260
  }
113245
113261
  }
113246
113262
  }
113247
-
113263
+
113248
113264
  for(let j = 0; j <= end1 - start1; ++j) {
113249
113265
  ///if(ic.chainsSeq[chainid1] === undefined || ic.chainsSeq[chainid2] === undefined) break;
113250
113266
 
@@ -113357,11 +113373,15 @@ class SetSeqAlign {
113357
113373
  for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
113358
113374
  let start1, end1;
113359
113375
 
113360
- // start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start) - 1;
113361
- // end1 = parseInt(ic.qt_start_end[chainIndex][i].t_end) - 1;
113362
-
113363
- start1 = ic.ParserUtilsCls.getResiNCBI(chainid1, ic.qt_start_end[chainIndex][i].t_start) - 1;
113364
- end1 = ic.ParserUtilsCls.getResiNCBI(chainid1, ic.qt_start_end[chainIndex][i].t_end) - 1;
113376
+ //ic.qt_start_end is zero-based
113377
+ if(!bRealign && me.cfg.aligntool != 'tmalign') { // vast alignment
113378
+ start1 = parseInt(ic.qt_start_end[chainIndex][i].t_start) - 1;
113379
+ end1 = parseInt(ic.qt_start_end[chainIndex][i].t_end) - 1;
113380
+ }
113381
+ else {
113382
+ start1 = ic.ParserUtilsCls.getResiNCBI(chainid1, ic.qt_start_end[chainIndex][i].t_start) - 1;
113383
+ end1 = ic.ParserUtilsCls.getResiNCBI(chainid1, ic.qt_start_end[chainIndex][i].t_end) - 1;
113384
+ }
113365
113385
 
113366
113386
  for(let j = start1; j <= end1; ++j) {
113367
113387
  let resi, resid;
@@ -113454,7 +113474,6 @@ class SetSeqAlign {
113454
113474
  resObject.color2 = (resid2range_t[resid]) ? '#FF0000' : me.htmlCls.GREYC; // color by conservation
113455
113475
  // resObject.class = (resid2range_t[resid]) ? 'icn3d-align' : 'icn3d-nalign';
113456
113476
  resObject.class = (resid2range_t[resid]) ? 'icn3d-cons' : 'icn3d-nalign';
113457
-
113458
113477
  ic.alnChainsSeq[chainid1].push(resObject);
113459
113478
 
113460
113479
  if(resid2range_t[resid]) {
@@ -113613,6 +113632,7 @@ class SetSeqAlign {
113613
113632
  for(let j = 0, jl = alignedChainIndice.length - 1; j < jl; ++j) {
113614
113633
  let chainidTmp = chainidArray[alignedChainIndice[j]];
113615
113634
  let gapResObject = this.getResObject(chainidTmp, true);
113635
+
113616
113636
  //for(let k = 0, kl = len - nGap; k < kl; ++k) {
113617
113637
  for(let k = 0, kl = len; k < kl; ++k) {
113618
113638
  ic.alnChainsSeq[chainidTmp].splice(pos_t, 0, gapResObject);
@@ -113622,12 +113642,12 @@ class SetSeqAlign {
113622
113642
  //return len - nGap;
113623
113643
  }
113624
113644
 
113625
- insertNotAlignRes(chainid, start, len, bRealign) { let ic = this.icn3d; ic.icn3dui;
113645
+ insertNotAlignRes(chainid, start, len, bRealign) { let ic = this.icn3d, me = ic.icn3dui;
113626
113646
  // insert non-aligned residues in query seq
113627
113647
  for(let j = 0, jl = len; j < jl; ++j) {
113628
113648
  // let resi2 = ic.ParserUtilsCls.getResi(chainid, start + j);
113629
113649
  // let resn2 = this.getResn(chainid, start + j);
113630
- let resi2 = start + j;
113650
+ let resi2 = (bRealign && me.cfg.aligntool == 'tmalign') ? start + j : ic.ParserUtilsCls.getResi(chainid, start + j);
113631
113651
  let resn2 = this.getResnFromResi(chainid, resi2);
113632
113652
  let resn1 = '-';
113633
113653
  let bAlign = false;
@@ -113636,16 +113656,21 @@ class SetSeqAlign {
113636
113656
  }
113637
113657
  }
113638
113658
 
113639
- getTemplatePosFromOriResi(chainid1, start, end, bRealign) { let ic = this.icn3d; ic.icn3dui;
113659
+ getTemplatePosFromOriResi(chainid1, start, end, bRealign) { let ic = this.icn3d, me = ic.icn3dui;
113640
113660
  // let startResi = ic.ParserUtilsCls.getResi(chainid1, start);
113641
113661
  // let endResi = ic.ParserUtilsCls.getResi(chainid1, end);
113642
- let startResi = start;
113643
- let endResi = end;
113662
+ if(bRealign && me.cfg.aligntool == 'tmalign') { // vast alignment
113663
+ let startResi = start;
113664
+ let endResi = end;
113644
113665
 
113645
- let result1 = this.getResiPosInTemplate(chainid1, startResi);
113646
- let result2 = this.getResiPosInTemplate(chainid1, endResi);
113647
-
113648
- return {"pos1": result1.pos, "pos2": result2.pos};
113666
+ let result1 = this.getResiPosInTemplate(chainid1, startResi);
113667
+ let result2 = this.getResiPosInTemplate(chainid1, endResi);
113668
+
113669
+ return {"pos1": result1.pos, "pos2": result2.pos};
113670
+ }
113671
+ else {
113672
+ return {"pos1": start, "pos2": end};
113673
+ }
113649
113674
  }
113650
113675
 
113651
113676
  mergeTwoSeqForAll(chainidArray, index, alignedChainIndice, resid2range_t, start_t, end_t, bRealign) { let ic = this.icn3d, me = ic.icn3dui;
@@ -113708,6 +113733,9 @@ class SetSeqAlign {
113708
113733
 
113709
113734
  let result;
113710
113735
 
113736
+ let nGapInTemplate = 0; // number of gaps inserted into the template sequence
113737
+ let startPosInTemplate = 0; // position in the template sequence to start the mapping
113738
+
113711
113739
  for(let i = 0, il = ic.qt_start_end[chainIndex].length; i < il; ++i) {
113712
113740
  let start1, start2, end1, end2, resiStart1, start1Pos;
113713
113741
 
@@ -113741,6 +113769,8 @@ class SetSeqAlign {
113741
113769
 
113742
113770
  // if the mapping does not start from start_t, add gaps to the query seq
113743
113771
  if(i == 0) {
113772
+ startPosInTemplate = start1Pos;
113773
+
113744
113774
  //result = this.getTemplatePosFromOriResi(chainid1, start_t, start1, bRealign);
113745
113775
  result = this.getTemplatePosFromOriResi(chainid1, start_t, start1Pos, bRealign);
113746
113776
  pos1 = result.pos1;
@@ -113763,7 +113793,6 @@ class SetSeqAlign {
113763
113793
 
113764
113794
  // insert non-aligned residues in query seq
113765
113795
  this.insertNotAlignRes(chainid2, prevIndex2+1, notAlnLen2, bRealign);
113766
-
113767
113796
  if(notAlnLen1 >= notAlnLen2) {
113768
113797
  // add gaps before the query sequence
113769
113798
  for(let j = 0, jl = notAlnLen1 - notAlnLen2; j < jl; ++j) {
@@ -113773,6 +113802,7 @@ class SetSeqAlign {
113773
113802
  else {
113774
113803
  // check the number of gaps before resiStart1 (n), and insert 'notAlnLen2 - notAlnLen1 - n' gaps
113775
113804
  this.addGapAllAlnChains(chainidArray, alignedChainIndice, chainid1, resiStart1, notAlnLen2 - notAlnLen1);
113805
+ nGapInTemplate += (notAlnLen2 - notAlnLen1);
113776
113806
  }
113777
113807
  }
113778
113808
 
@@ -113781,18 +113811,19 @@ class SetSeqAlign {
113781
113811
  //result = this.getTemplatePosFromOriResi(chainid1, start1Pos, end1Pos, bRealign);
113782
113812
  pos1 = result.pos1;
113783
113813
  pos2 = result.pos2;
113784
-
113814
+
113785
113815
  let k = 0;
113786
113816
  if(!ic.chainsMapping[chainid1]) ic.chainsMapping[chainid1] = {};
113787
113817
  if(!ic.chainsMapping[chainid2]) ic.chainsMapping[chainid2] = {};
113818
+ let resiAdjust = (bRealign && me.cfg.aligntool == 'tmalign') ? 0 : - startPosInTemplate + nGapInTemplate;
113788
113819
  for(let j = pos1; j <= pos2; ++j) {
113789
113820
  // inherit the gaps from the template
113790
- if(ic.alnChainsSeq[chainid1][j].resn == '-') {
113821
+ if(ic.alnChainsSeq[chainid1][j + resiAdjust].resn == '-') {
113791
113822
  ic.alnChainsSeq[chainid2].push(gapResObject2);
113792
113823
  }
113793
113824
  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);
113825
+ let resi1 = (bRealign && me.cfg.aligntool == 'tmalign') ? start1 + k : ic.ParserUtilsCls.getResi(chainid1, start1 + k);
113826
+ let resi2 = (bRealign && me.cfg.aligntool == 'tmalign') ? start2 + k : ic.ParserUtilsCls.getResi(chainid2, start2 + k);
113796
113827
  let resn1 = this.getResnFromResi(chainid1, resi1); //this.getResn(chainid1, start1 + k);
113797
113828
  let resn2 = this.getResnFromResi(chainid2, resi2); //this.getResn(chainid2, start2 + k);
113798
113829
 
@@ -113800,7 +113831,7 @@ class SetSeqAlign {
113800
113831
  let resObject = this.getResObject(chainid2, false, bAlign, resi2, resn2, resn1);
113801
113832
  ic.alnChainsSeq[chainid2].push(resObject);
113802
113833
  // update color in the template
113803
- ic.alnChainsSeq[chainid1][j].color = resObject.color;
113834
+ ic.alnChainsSeq[chainid1][j + resiAdjust].color = resObject.color;
113804
113835
 
113805
113836
  ic.chainsMapping[chainid1][chainid1 + '_' + resi1] = resn1 + resi1;
113806
113837
  ic.chainsMapping[chainid2][chainid2 + '_' + resi2] = resn1 + resi1;
@@ -115140,7 +115171,8 @@ class LoadPDB {
115140
115171
  || (ic.nucleotides.hasOwnProperty(serialArray[i]) && (atom.name == "O3'" || atom.name == "O3*")) ) {
115141
115172
  if(atom.resi == lastResi) continue; // e.g., Alt A and B
115142
115173
 
115143
- let resn = (atom.resn.trim().length > 3) ? atom.resn.trim().substr(0, 3) : atom.resn.trim();
115174
+ // let resn = (atom.resn.trim().length > 3) ? atom.resn.trim().substr(0, 3) : atom.resn.trim();
115175
+ let resn = atom.resn.trim();
115144
115176
  if(!me.parasCls.chargeColors.hasOwnProperty(resn)) {
115145
115177
  continue; // regular residues
115146
115178
  }
@@ -117862,20 +117894,23 @@ class ApplyCommand {
117862
117894
  || commandOri.indexOf('ligplot interaction pairs') == 0
117863
117895
  ) {
117864
117896
  let paraArray = commandOri.split(' | ');
117865
- if(paraArray.length >= 3) {
117897
+ if(paraArray.length >= 2) {
117866
117898
  let setNameArray = paraArray[1].split(' ');
117867
117899
 
117868
117900
  if(setNameArray.length == 2) {
117869
117901
  let nameArray2 = setNameArray[0].split(',');
117870
117902
  let nameArray = setNameArray[1].split(',');
117871
117903
 
117872
- let bHbond = paraArray[2].indexOf('hbonds') !== -1;
117873
- let bSaltbridge = paraArray[2].indexOf('salt bridge') !== -1;
117874
- let bInteraction = paraArray[2].indexOf('interactions') !== -1;
117904
+ let bHbond = 1, bSaltbridge = 1, bInteraction = 1, bHalogen = 1, bPication = 1, bPistacking = 1;
117905
+ if(paraArray.length >= 3) {
117906
+ bHbond = paraArray[2].indexOf('hbonds') !== -1;
117907
+ bSaltbridge = paraArray[2].indexOf('salt bridge') !== -1;
117908
+ bInteraction = paraArray[2].indexOf('interactions') !== -1;
117875
117909
 
117876
- let bHalogen = paraArray[2].indexOf('halogen') !== -1;
117877
- let bPication = paraArray[2].indexOf('pi-cation') !== -1;
117878
- let bPistacking = paraArray[2].indexOf('pi-stacking') !== -1;
117910
+ bHalogen = paraArray[2].indexOf('halogen') !== -1;
117911
+ bPication = paraArray[2].indexOf('pi-cation') !== -1;
117912
+ bPistacking = paraArray[2].indexOf('pi-stacking') !== -1;
117913
+ }
117879
117914
 
117880
117915
  let bHbondCalc;
117881
117916
  if(paraArray.length >= 4) {
@@ -118800,12 +118835,10 @@ class DefinedSets {
118800
118835
  //Set the menu of defined sets with an array of defined names "commandnameArray".
118801
118836
  setAtomMenu(commandnameArray) { let ic = this.icn3d; ic.icn3dui;
118802
118837
  let html = "";
118803
-
118804
118838
  let nameArray1 =(ic.defNames2Residues !== undefined) ? Object.keys(ic.defNames2Residues) : [];
118805
118839
  let nameArray2 =(ic.defNames2Atoms !== undefined) ? Object.keys(ic.defNames2Atoms) : [];
118806
118840
 
118807
118841
  let nameArrayTmp = nameArray1.concat(nameArray2).sort();
118808
-
118809
118842
  let nameArray = [];
118810
118843
  // $.each(nameArrayTmp, function(i, el){
118811
118844
  // if($.inArray(el, nameArray) === -1) nameArray.push(el);
@@ -118823,7 +118856,6 @@ class DefinedSets {
118823
118856
  // }
118824
118857
  // });
118825
118858
  // });
118826
-
118827
118859
  //for(let i in ic.defNames2Atoms) {
118828
118860
  for(let i = 0, il = nameArray.length; i < il; ++i) {
118829
118861
  let name = nameArray[i];
@@ -118854,7 +118886,6 @@ class DefinedSets {
118854
118886
  html += "<option value='" + name + "' style='color:#" + color + "'>" + name + "</option>";
118855
118887
  }
118856
118888
  }
118857
-
118858
118889
  return html;
118859
118890
  }
118860
118891
 
@@ -118879,17 +118910,18 @@ class DefinedSets {
118879
118910
  }
118880
118911
  else { // chemicals, etc
118881
118912
  let resid = atom.structure + '_' + atom.chain + '_' + atom.resi;
118882
- let resn = atom.resn.substr(0, 3);
118913
+ // let resn = atom.resn.substr(0, 3);
118914
+ let resn = atom.resn;
118883
118915
 
118884
118916
  if(!nonProtNuclResHash[resn]) {
118885
- nonProtNuclResHash[resn] = ic.residues[resid];
118917
+ nonProtNuclResHash[resn] = me.hashUtilsCls.cloneHash(ic.residues[resid]);
118886
118918
  }
118887
118919
  else {
118888
118920
  nonProtNuclResHash[resn] = me.hashUtilsCls.unionHash(nonProtNuclResHash[atom.resn], ic.residues[resid]);
118889
118921
  }
118890
118922
  }
118891
118923
  }
118892
-
118924
+
118893
118925
  // chemicals etc
118894
118926
  for(let resn in nonProtNuclResHash) {
118895
118927
  ic.defNames2Residues[resn] = Object.keys(ic.firstAtomObjCls.getResiduesFromAtoms(nonProtNuclResHash[resn]));
@@ -118897,7 +118929,7 @@ class DefinedSets {
118897
118929
 
118898
118930
  ic.defNames2Command[resn] = 'select :3' + resn;
118899
118931
  }
118900
-
118932
+
118901
118933
  // select whole structure
118902
118934
  if(ic.structures && Object.keys(ic.structures) == 1) {
118903
118935
  let structure = Object.keys(ic.structures)[0];
@@ -118990,10 +119022,8 @@ class DefinedSets {
118990
119022
 
118991
119023
  if(ic.bSetChainsAdvancedMenu === undefined || !ic.bSetChainsAdvancedMenu || ic.bResetSets) {
118992
119024
  this.setPredefinedInMenu();
118993
-
118994
119025
  ic.bSetChainsAdvancedMenu = true;
118995
119026
  }
118996
-
118997
119027
  ic.hAtoms = me.hashUtilsCls.cloneHash(prevHAtoms);
118998
119028
  ic.dAtoms = me.hashUtilsCls.cloneHash(prevDAtoms);
118999
119029
 
@@ -122646,14 +122676,22 @@ class Delphi {
122646
122676
  let paraArray = command.split(" | ");
122647
122677
 
122648
122678
  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
122679
  let type = typeArray[2];
122654
- let contour = contourArray[1]; //parseFloat(contourArray[1]);
122655
- let gsize = gsizeArray[1]; //parseInt(gsizeArray[1]);
122656
- let salt = saltArray[1]; //parseFloat(saltArray[1]);
122680
+
122681
+ let contour = 2, gsize = 65, salt = 0.15; // default values for contour, gsize, salt
122682
+ ic.phisurftype = 22; // default value for surface type
122683
+ ic.phisurfop = 1.0; // default value for surface opacity
122684
+ ic.phisurfwf = "no"; // default value for surface wireframe
122685
+
122686
+ if(paraArray.length == 7) {
122687
+ let contourArray = paraArray[1].split(" ");
122688
+ let gsizeArray = paraArray[2].split(" ");
122689
+ let saltArray = paraArray[3].split(" ");
122690
+
122691
+ contour = contourArray[1]; //parseFloat(contourArray[1]);
122692
+ gsize = gsizeArray[1]; //parseInt(gsizeArray[1]);
122693
+ salt = saltArray[1]; //parseFloat(saltArray[1]);
122694
+ }
122657
122695
 
122658
122696
  // The values should be string
122659
122697
  $("#" + ic.pre + "delphi1gsize").val(gsize);
@@ -122670,12 +122708,12 @@ class Delphi {
122670
122708
  ic.phisurftype = surfaceArray[1];
122671
122709
  ic.phisurfop = opacityArray[1]; //parseFloat(opacityArray[1]);
122672
122710
  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
122711
  }
122678
122712
 
122713
+ $("#" + ic.pre + "delphi" + "surftype").val(ic.phisurftype);
122714
+ $("#" + ic.pre + "delphi" + "surfop").val(ic.phisurfop);
122715
+ $("#" + ic.pre + "delphi" + "surfwf").val(ic.phisurfwf);
122716
+
122679
122717
  let bSurface =(type == 'surface') ? true : false;
122680
122718
 
122681
122719
  await thisClass.CalcPhi(gsize, salt, contour, bSurface);
@@ -124213,7 +124251,8 @@ class Dssp {
124213
124251
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
124214
124252
  if(!atom) continue;
124215
124253
 
124216
- let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
124254
+ // let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
124255
+ let resn = me.utilsCls.residueName2Abbr(atom.resn);
124217
124256
 
124218
124257
  let domainid = ic.resid2domainid[resid];
124219
124258
  let refnumLabel = ic.resid2refnum[resid];
@@ -124290,7 +124329,8 @@ class Dssp {
124290
124329
 
124291
124330
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
124292
124331
  if(!atom) continue;
124293
- let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
124332
+ // let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
124333
+ let resn = me.utilsCls.residueName2Abbr(atom.resn);
124294
124334
 
124295
124335
  if(refnumLabel) {
124296
124336
  let refnumStr_ori = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
@@ -124313,7 +124353,8 @@ class Dssp {
124313
124353
 
124314
124354
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
124315
124355
  if(!atom) continue;
124316
- let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
124356
+ // let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
124357
+ let resn = me.utilsCls.residueName2Abbr(atom.resn);
124317
124358
 
124318
124359
  if(refnumLabel) {
124319
124360
  let refnumStr_ori = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
@@ -128583,7 +128624,8 @@ class Ligplot {
128583
128624
  }
128584
128625
  }
128585
128626
 
128586
- let oneLetterRes = me.utilsCls.residueName2Abbr(atom2.resn.substr(0, 3));
128627
+ // let oneLetterRes = me.utilsCls.residueName2Abbr(atom2.resn.substr(0, 3));
128628
+ let oneLetterRes = me.utilsCls.residueName2Abbr(atom2.resn);
128587
128629
  let resName2 = oneLetterRes + atom2.resi;
128588
128630
  let textColor2 = (atom2.color) ? atom2.color.getHexString() : '000';
128589
128631
  let lineColor = ic.lineGraphCls.getStrokecolor(undefined, interactionType);
@@ -128961,11 +129003,12 @@ class Transform {
128961
129003
  this.icn3d = icn3d;
128962
129004
  }
128963
129005
 
128964
- resetOrientation_base(commandTransformation) { let ic = this.icn3d; ic.icn3dui;
129006
+ resetOrientation_base(commandTransformation) { let ic = this.icn3d, me = ic.icn3dui;
128965
129007
  if(commandTransformation.length == 2 && commandTransformation[1].length > 0) {
129008
+ if(commandTransformation[1].substr(0, 4) == 'pos:') ic.bSetCamera = false;
129009
+
128966
129010
  if(ic.bSetCamera) { // |||{"factor"...}
128967
129011
  let transformation = JSON.parse(commandTransformation[1]);
128968
-
128969
129012
  ic._zoomFactor = transformation.factor;
128970
129013
 
128971
129014
  ic.mouseChange.x = transformation.mouseChange.x;
@@ -128996,6 +129039,12 @@ class Transform {
128996
129039
  }
128997
129040
  }
128998
129041
  });
129042
+
129043
+ // set the aspect ratio
129044
+ if(!ic.container.whratio) {
129045
+ ic.container.whratio = me.htmlCls.WIDTH / me.htmlCls.HEIGHT;
129046
+ ic.cam.aspect = ic.container.whratio;
129047
+ }
128999
129048
  }
129000
129049
  }
129001
129050
  else {
@@ -133694,7 +133743,7 @@ class iCn3DUI {
133694
133743
  //even when multiple iCn3D viewers are shown together.
133695
133744
  this.pre = this.cfg.divid + "_";
133696
133745
 
133697
- this.REVISION = '3.45.2';
133746
+ this.REVISION = '3.45.3';
133698
133747
 
133699
133748
  // In nodejs, iCn3D defines "window = {navigator: {}}", and added window = {navigator: {}, "__THREE__":"177"}
133700
133749
  this.bNode = (Object.keys(window).length < 3) ? true : false;
@@ -133945,18 +133994,21 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
133945
133994
  await ic.pdbParserCls.downloadUrl(url, type, me.cfg.command);
133946
133995
  }
133947
133996
  else if(me.cfg.mmtfid !== undefined) {
133997
+ 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
133998
  ic.inputid = me.cfg.mmtfid;
133949
133999
  ic.loadCmd = 'load mmtf ' + me.cfg.mmtfid;
133950
134000
  me.htmlCls.clickMenuCls.setLogCmd(ic.loadCmd, true);
133951
134001
  await ic.bcifParserCls.downloadBcif(me.cfg.mmtfid);
133952
134002
  }
133953
134003
  else if(me.cfg.bcifid !== undefined) {
134004
+ 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
134005
  ic.inputid = me.cfg.bcifid;
133955
134006
  ic.loadCmd = 'load bcif ' + me.cfg.bcifid;
133956
134007
  me.htmlCls.clickMenuCls.setLogCmd(ic.loadCmd, true);
133957
134008
  await ic.bcifParserCls.downloadBcif(me.cfg.bcifid);
133958
134009
  }
133959
134010
  else if(me.cfg.pdbid !== undefined) {
134011
+ 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
134012
  ic.inputid = me.cfg.pdbid;
133961
134013
  ic.loadCmd = 'load pdb ' + me.cfg.pdbid;
133962
134014
  me.htmlCls.clickMenuCls.setLogCmd(ic.loadCmd, true);
@@ -133979,6 +134031,7 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
133979
134031
  await ic.opmParserCls.downloadOpm(me.cfg.opmid);
133980
134032
  }
133981
134033
  else if(me.cfg.mmdbid !== undefined) {
134034
+ 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
134035
  ic.inputid = me.cfg.mmdbid;
133983
134036
  // ic.bNCBI = true;
133984
134037
  ic.loadCmd = 'load mmdb ' + me.cfg.mmdbid + ' | parameters ' + me.cfg.inpara;
@@ -134117,6 +134170,7 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
134117
134170
  await ic.sdfParserCls.downloadSmiles(me.cfg.smiles);
134118
134171
  }
134119
134172
  else if(me.cfg.mmcifid !== undefined) {
134173
+ // long PDB ID was supported with mmcifid
134120
134174
  ic.inputid = me.cfg.mmcifid;
134121
134175
  ic.loadCmd = 'load mmcif ' + me.cfg.mmcifid;
134122
134176
  me.htmlCls.clickMenuCls.setLogCmd(ic.loadCmd, true);