icn3d 3.19.1 → 3.19.2

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
@@ -4985,6 +4985,57 @@ class ParasCls {
4985
4985
  'GLN': this.thr().setHSL(1/3.0, 1, 0.5 + 0.5 * (0.58 + 1.85)/2.5)
4986
4986
  };
4987
4987
 
4988
+ this.hydrophobicValues = {
4989
+ // charged residues
4990
+ ' G': 3, ' A': 3, ' T': 3,
4991
+ ' C': 3, ' U': 3, ' DG': 3,
4992
+ ' DA': 3, ' DT': 3, ' DC': 3,
4993
+ ' DU': 3, 'G': 3, 'A': 3,
4994
+ 'T': 3, 'C': 3, 'U': 3,
4995
+ 'DG': 3, 'DA': 3, 'DT': 3,
4996
+ 'DC': 3, 'DU': 3, 'ARG': 1,
4997
+ 'LYS': 1, 'ASP': 3, 'GLU': 3,
4998
+ 'HIS': 2,
4999
+
5000
+ // + 0.81)/(1.14 + 0.81)),
5001
+ // hydrophobic
5002
+ // https://en.m.wikipedia.org/wiki/Hydrophobicity_scales#Wimley%E2%80%93White_whole_residue_hydrophobicity_scales
5003
+ // 0.65 ~ -1.85: white ~ green
5004
+ 'TRP': -1.85,
5005
+ 'PHE': -1.13,
5006
+ 'TYR': -0.94,
5007
+ 'LEU': -0.56,
5008
+ 'ILE': -0.31,
5009
+ 'CYS': -0.24,
5010
+ 'MET': -0.23,
5011
+
5012
+ // polar
5013
+ 'GLY': 0.01,
5014
+ 'VAL': 0.07,
5015
+ 'SER': 0.13,
5016
+ 'THR': 0.14,
5017
+ 'ALA': 0.17,
5018
+ 'ASN': 0.42,
5019
+ 'PRO': 0.45,
5020
+ 'GLN': 0.58
5021
+ };
5022
+
5023
+ this.residueAbbrev = {
5024
+ ALA: "A (Ala)", ARG: "R (Arg)", ASN: "N (Asn)",
5025
+ ASP: "D (Asp)", CYS: "C (Cys)", GLN: "Q (Gln)",
5026
+ GLU: "E (Glu)", GLY: "G (Gly)", HIS: "H (His)",
5027
+ ILE: "I (Ile)", LEU: "L (Leu)", LYS: "K (Lys)",
5028
+ MET: "M (Met)", PHE: "F (Phe)", PRO: "P (Pro)",
5029
+ SER: "S (Ser)", THR: "T (Thr)", TRP: "W (Trp)",
5030
+ TYR: "Y (Tyr)", VAL: "V (Val)",
5031
+ //ASX: "B (Asx)", GLX: "Z (Glx)",
5032
+ ASX: "X (Asx)", GLX: "X (Glx)",
5033
+ 'G': "Guanine", 'A': "Adenine",
5034
+ 'T': "Thymine", 'C': "Cytosine", 'U': "Uracil",
5035
+ 'DG': "deoxy-Guanine", 'DA': "deoxy-Adenine", 'DT': "deoxy-Thymine",
5036
+ 'DC': "deoxy-Cytosine", 'DU': 'deoxy-Uracil'
5037
+ };
5038
+
4988
5039
  this.ssColors = {
4989
5040
  helix: this.thr(0xFF0000),
4990
5041
  sheet: this.thr(0x008000),
@@ -6931,7 +6982,8 @@ class FirstAtomObj {
6931
6982
  for(let i in atomsHash) {
6932
6983
  if((ic.atoms[i].name == 'CA' && ic.proteins.hasOwnProperty(i)) || !ic.proteins.hasOwnProperty(i)) {
6933
6984
  let residueid = ic.atoms[i].structure + '_' + ic.atoms[i].chain + '_' + ic.atoms[i].resi;
6934
- residuesHash[residueid] = 1;
6985
+ //residuesHash[residueid] = 1;
6986
+ residuesHash[residueid] = ic.atoms[i].resn;
6935
6987
  }
6936
6988
  }
6937
6989
 
@@ -9298,11 +9350,11 @@ class Cylinder {
9298
9350
  if (atom.ss === 'sheet') beta[atom.serial] = atom;
9299
9351
  if (atom.name !== 'CA') continue;
9300
9352
  if (atom.ss === 'helix' && atom.ssend) {
9301
- if (start !== null && currentChain === atom.chain && currentResi < atom.resi) {
9353
+ if (start !== null && currentChain === atom.chain && parseInt(currentResi) < parseInt(atom.resi)) {
9302
9354
  if(bHighlight === 1 || bHighlight === 2) {
9303
9355
  this.createCylinder(start.coord, atom.coord, radius, ic.hColor, bHighlight);
9304
9356
  }
9305
- else {
9357
+ else {
9306
9358
  this.createCylinder(start.coord, atom.coord, radius, atom.color);
9307
9359
  }
9308
9360
  }
@@ -12838,7 +12890,8 @@ class ShareLink {
12838
12890
  if(ic.bAfMem) {
12839
12891
  paraHash['afmem'] = 'on';
12840
12892
  }
12841
- else {
12893
+ //else {
12894
+ else if(me.cfg.afid || (Object.keys(ic.structures).length == 1 && Object.keys(ic.structures)[0].length > 5) ) {
12842
12895
  paraHash['afmem'] = 'off';
12843
12896
  }
12844
12897
 
@@ -12928,16 +12981,16 @@ class ShareLink {
12928
12981
  else if(prevCommandStr.indexOf(toggleStr) !== -1) {
12929
12982
  ++cntToggle;
12930
12983
  }
12931
- // adding this section will remove the first command!!!
12932
- // else if(i === start + 1) {
12933
- // //tmpUrl += prevCommandStr;
12934
-
12935
- // if(!(inparaWithoutCommand !== undefined && ic.inputid)) {
12936
- // tmpUrl += prevCommandStr;
12937
- // }
12984
+ else if(i === start + 1) {
12985
+ //tmpUrl += prevCommandStr;
12986
+
12987
+ //if(!(inparaWithoutCommand !== undefined && ic.inputid)) {
12988
+ if(prevCommandStr.substr(0, 4) !== 'load') {
12989
+ tmpUrl += prevCommandStr;
12990
+ }
12938
12991
 
12939
- // //statefile += prevCommandStr + "\n";
12940
- // }
12992
+ //statefile += prevCommandStr + "\n";
12993
+ }
12941
12994
  else {
12942
12995
  tmpUrl += (tmpUrl) ? '; ' + prevCommandStr : prevCommandStr;
12943
12996
  //statefile += prevCommandStr + "\n";
@@ -17445,6 +17498,14 @@ class ViewInterPairs {
17445
17498
  bHbond, bSaltbridge, bInteraction, bHalogen, bPication, bPistacking, contactDist) { let ic = this.icn3d, me = ic.icn3dui;
17446
17499
  let bondCnt;
17447
17500
 
17501
+ // reset
17502
+ ic.hbondpnts = [];
17503
+ ic.saltbridgepnts = [];
17504
+ ic.contactpnts = [];
17505
+ ic.halogenpnts = [];
17506
+ ic.picationpnts = [];
17507
+ ic.pistackingpnts = [];
17508
+
17448
17509
  // type: view, save, forcegraph
17449
17510
  ic.bRender = false;
17450
17511
  let hAtoms = {};
@@ -17929,7 +17990,7 @@ class ViewInterPairs {
17929
17990
  html += '<br><table class="icn3d-sticky" align=center border=1 cellpadding=10 cellspacing=0><thead>';
17930
17991
  html += '<tr><th rowspan=2>Residue</th><th rowspan=2># Hydrogen<br>Bond</th><th rowspan=2># Salt Bridge<br>/Ionic Interaction</th><th rowspan=2># Contact</th>';
17931
17992
  html += '<th rowspan=2># Halogen<br>Bond</th><th rowspan=2># &pi;-Cation</th><th rowspan=2># &pi;-Stacking</th>';
17932
- html += '<th>Hydrogen Bond</th><th>Salt Bridge/Ionic Interaction</th><th>Contact</th>';
17993
+ html += '<th>Hydrogen Bond (backbone atoms: @CA, @N, @C, @O)</th><th>Salt Bridge/Ionic Interaction</th><th>Contact</th>';
17933
17994
  html += '<th>Halogen Bond</th><th>&pi;-Cation</th><th>&pi;-Stacking</th></tr>';
17934
17995
  html += '<tr>';
17935
17996
  let tmpStr = '<td><table width="100%" class="icn3d-border"><tr><td>Atom1</td><td>Atom2</td><td>Distance(&#8491;)</td><td>Highlight in 3D</td></tr></table></td>';
@@ -18098,7 +18159,7 @@ class ViewInterPairs {
18098
18159
  }
18099
18160
  }
18100
18161
  let text = '<div style="text-align:center"><br><b>' + cnt
18101
- + ' hydrogen bond pairs</b>:</div><br>';
18162
+ + ' hydrogen bond pairs</b> (backbone atoms: @CA, @N, @C, @O):</div><br>';
18102
18163
  if(cnt > 0) {
18103
18164
  text += '<br><table align=center border=1 cellpadding=10 cellspacing=0>'
18104
18165
  + '<tr><th>Atom 1</th><th>Atom 2</th><th>Distance(&#8491;)</th>';
@@ -23620,8 +23681,10 @@ class Dssp {
23620
23681
 
23621
23682
  let ajaxArray = [];
23622
23683
 
23623
- //let url = me.htmlCls.baseUrl + "mmcifparser/mmcifparser.cgi";
23624
- let url = "/Structure/mmcifparser/mmcifparser.cgi";
23684
+ let url = (window && window.location && window.location.hostname.indexOf('ncbi.nlm.nih.gov') != -1) ? "/Structure/mmcifparser/mmcifparser.cgi" :
23685
+ me.htmlCls.baseUrl + "mmcifparser/mmcifparser.cgi";
23686
+ //let url = "https://www.ncbi.nlm.nih.gov/Structure/mmcifparser/mmcifparser.cgi";
23687
+
23625
23688
  for(let i = 0, il = struArray.length; i < il; ++i) {
23626
23689
  let pdbStr = '';
23627
23690
  /// pdbStr += ic.saveFileCls.getPDBHeader(i);
@@ -25509,6 +25572,7 @@ class RealignParser {
25509
25572
  let lastStruResi = '';
25510
25573
  for(let serial in ic.hAtoms) {
25511
25574
  let atom = ic.atoms[serial];
25575
+ let chainid = atom.structure + '_' + atom.chain;
25512
25576
  if((ic.proteins.hasOwnProperty(serial) && atom.name == "CA")
25513
25577
  ||(ic.nucleotides.hasOwnProperty(serial) &&(atom.name == "O3'" || atom.name == "O3*")) ) {
25514
25578
  if(atom.structure + '_' + atom.resi == lastStruResi) continue; // e.g., Alt A and B
@@ -25518,11 +25582,11 @@ class RealignParser {
25518
25582
  }
25519
25583
  structHash[atom.structure].push(atom.coord.clone());
25520
25584
 
25521
- if(!ic.realignResid.hasOwnProperty(atom.structure)) {
25522
- ic.realignResid[atom.structure] = [];
25585
+ if(!ic.realignResid.hasOwnProperty(chainid)) {
25586
+ ic.realignResid[chainid] = [];
25523
25587
  }
25524
25588
 
25525
- ic.realignResid[atom.structure].push({'resid': atom.structure + '_' + atom.chain + '_' + atom.resi, 'resn': me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3)).substr(0, 1)});
25589
+ ic.realignResid[chainid].push({'resid': chainid + '_' + atom.resi, 'resn': me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3)).substr(0, 1)});
25526
25590
 
25527
25591
  struct2chain[atom.structure] = atom.structure + '_' + atom.chain;
25528
25592
 
@@ -25598,12 +25662,12 @@ class RealignParser {
25598
25662
  let residArray1 = struct2resid[chainpair][toStruct];
25599
25663
  let residArray2 = struct2resid[chainpair][fromStruct];
25600
25664
 
25601
- ic.realignResid[toStruct] = [];
25602
- ic.realignResid[fromStruct] = [];
25665
+ ic.realignResid[chainTo] = [];
25666
+ ic.realignResid[chainFrom] = [];
25603
25667
 
25604
25668
  for(let i = 0, il = seq1.length; i < il; ++i) {
25605
- ic.realignResid[toStruct].push({'resid':residArray1[i], 'resn':seq1[i]});
25606
- ic.realignResid[fromStruct].push({'resid':residArray2[i], 'resn':seq2[i]});
25669
+ ic.realignResid[chainTo].push({'resid':residArray1[i], 'resn':seq1[i]});
25670
+ ic.realignResid[chainFrom].push({'resid':residArray2[i], 'resn':seq2[i]});
25607
25671
  }
25608
25672
 
25609
25673
  let bChainAlign = true;
@@ -25648,6 +25712,7 @@ class RealignParser {
25648
25712
  let toStruct = chainidArray[0].substr(0, chainidArray[0].indexOf('_')); //.toUpperCase();
25649
25713
  if(!bRealign) toStruct = toStruct.toUpperCase();
25650
25714
 
25715
+
25651
25716
  let hAtoms = {};
25652
25717
 
25653
25718
  ic.realignResid = {};
@@ -25672,7 +25737,7 @@ class RealignParser {
25672
25737
 
25673
25738
  chainidArray[0] = chainTo;
25674
25739
  chainidArray[index + 1] = chainFrom;
25675
-
25740
+ /*
25676
25741
  let seq1 = struct2SeqHash[toStruct];
25677
25742
  let seq2 = struct2SeqHash[fromStruct];
25678
25743
 
@@ -25681,6 +25746,15 @@ class RealignParser {
25681
25746
 
25682
25747
  let residArray1 = struct2resid[toStruct];
25683
25748
  let residArray2 = struct2resid[fromStruct];
25749
+ */
25750
+ let seq1 = struct2SeqHash[chainTo];
25751
+ let seq2 = struct2SeqHash[chainFrom];
25752
+
25753
+ let coord1 = struct2CoorHash[chainTo];
25754
+ let coord2 = struct2CoorHash[chainFrom];
25755
+
25756
+ let residArray1 = struct2resid[chainTo];
25757
+ let residArray2 = struct2resid[chainFrom];
25684
25758
 
25685
25759
  let query, target;
25686
25760
 
@@ -25699,8 +25773,8 @@ class RealignParser {
25699
25773
 
25700
25774
  let seqto = '', seqfrom = '';
25701
25775
 
25702
- ic.realignResid[toStruct] = [];
25703
- ic.realignResid[fromStruct] = [];
25776
+ ic.realignResid[chainTo] = [];
25777
+ ic.realignResid[chainFrom] = [];
25704
25778
 
25705
25779
  let segArray = target.segs;
25706
25780
  for(let i = 0, il = segArray.length; i < il; ++i) {
@@ -25720,8 +25794,8 @@ class RealignParser {
25720
25794
 
25721
25795
  // one chaincould be longer than the other
25722
25796
  if(j == 0 ||(prevChain1 == chainid1 && prevChain2 == chainid2) ||(prevChain1 != chainid1 && prevChain2 != chainid2)) {
25723
- ic.realignResid[toStruct].push({'resid':residArray1[j + seg.orifrom], 'resn':seq1[j + seg.orifrom]});
25724
- ic.realignResid[fromStruct].push({'resid':residArray2[j + seg.from], 'resn':seq2[j + seg.from]});
25797
+ ic.realignResid[chainTo].push({'resid':residArray1[j + seg.orifrom], 'resn':seq1[j + seg.orifrom]});
25798
+ ic.realignResid[chainFrom].push({'resid':residArray2[j + seg.from], 'resn':seq2[j + seg.from]});
25725
25799
  }
25726
25800
 
25727
25801
  prevChain1 = chainid1;
@@ -25733,6 +25807,8 @@ class RealignParser {
25733
25807
  //let chainFrom = chainidArray[index + 1];
25734
25808
 
25735
25809
  let bChainAlign = true;
25810
+
25811
+
25736
25812
  let result = ic.ParserUtilsCls.alignCoords(coordsFrom, coordsTo, fromStruct, undefined, chainTo, chainFrom, index + 1, bChainAlign);
25737
25813
  hAtoms = me.hashUtilsCls.unionHash(hAtoms, result.hAtoms);
25738
25814
 
@@ -25970,12 +26046,18 @@ class RealignParser {
25970
26046
  //return;
25971
26047
  continue;
25972
26048
  }
25973
-
26049
+ /*
25974
26050
  if(!struct2SeqHash.hasOwnProperty(mmdbid) && !bPredefined) {
25975
26051
  struct2SeqHash[mmdbid] = '';
25976
26052
  struct2CoorHash[mmdbid] = [];
25977
26053
  struct2resid[mmdbid] = [];
25978
26054
  }
26055
+ */
26056
+ if(!struct2SeqHash.hasOwnProperty(chainid) && !bPredefined) {
26057
+ struct2SeqHash[chainid] = '';
26058
+ struct2CoorHash[chainid] = [];
26059
+ struct2resid[chainid] = [];
26060
+ }
25979
26061
 
25980
26062
  if(bPredefined) {
25981
26063
  base = parseInt(ic.chainsSeq[chainid][0].resi);
@@ -26034,6 +26116,7 @@ class RealignParser {
26034
26116
  }
26035
26117
  }
26036
26118
  else {
26119
+ /*
26037
26120
  if(i == 0) { // master
26038
26121
  base = parseInt(ic.chainsSeq[chainid][0].resi);
26039
26122
 
@@ -26108,6 +26191,78 @@ class RealignParser {
26108
26191
 
26109
26192
  ajaxArray.push(queryAjax);
26110
26193
  }
26194
+ */
26195
+ if(i == 0) { // master
26196
+ base = parseInt(ic.chainsSeq[chainid][0].resi);
26197
+
26198
+ resiArray = [];
26199
+ if(bRealign) {
26200
+ //resiArray = [resRange];
26201
+ let residHash = ic.firstAtomObjCls.getResiduesFromAtoms(ic.hAtoms);
26202
+ for(var resid in residHash) {
26203
+ let resi = resid.substr(resid.lastIndexOf('_') + 1);
26204
+
26205
+ let chainidTmp = resid.substr(0, resid.lastIndexOf('_'));
26206
+ if(chainidTmp == chainid) resiArray.push(resi);
26207
+ }
26208
+ }
26209
+ else if(me.cfg.resnum) {
26210
+ resiArray = me.cfg.resnum.split(",");
26211
+ }
26212
+
26213
+ //if(!bPredefined) {
26214
+ result = thisClass.getSeqCoorResid(resiArray, chainid, base);
26215
+ struct2SeqHash[chainid] += result.seq;
26216
+ struct2CoorHash[chainid] = struct2CoorHash[chainid].concat(result.coor);
26217
+ struct2resid[chainid] = struct2resid[chainid].concat(result.resid);
26218
+ //}
26219
+ }
26220
+ else {
26221
+ // if selected both chains
26222
+ let bSelectedBoth = false;
26223
+ if(bRealign) {
26224
+ //resiArray = [resRange];
26225
+ let residHash = ic.firstAtomObjCls.getResiduesFromAtoms(ic.hAtoms);
26226
+ for(var resid in residHash) {
26227
+ //let resi = resid.substr(resid.lastIndexOf('_') + 1);
26228
+ let chainidTmp = resid.substr(0, resid.lastIndexOf('_'));
26229
+ if(chainidTmp == chainid) {
26230
+ bSelectedBoth = true;
26231
+
26232
+ let resn = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]).resn;
26233
+ struct2SeqHash[chainid] += me.utilsCls.residueName2Abbr(resn);
26234
+
26235
+ struct2CoorHash[chainid] = struct2CoorHash[chainid].concat(this.getResCoorArray(resid));
26236
+
26237
+ struct2resid[chainid].push(resid);
26238
+ }
26239
+ }
26240
+ }
26241
+
26242
+ if(!bSelectedBoth) {
26243
+ for(let j = 0, jl = ic.chainsSeq[chainid].length; j < jl; ++j) {
26244
+ struct2SeqHash[chainid] += ic.chainsSeq[chainid][j].name;
26245
+ let resid = chainid + '_' + ic.chainsSeq[chainid][j].resi;
26246
+
26247
+ struct2CoorHash[chainid] = struct2CoorHash[chainid].concat(this.getResCoorArray(resid));
26248
+
26249
+ struct2resid[chainid].push(resid);
26250
+ }
26251
+ }
26252
+
26253
+ let seq1 = struct2SeqHash[chainid_t];
26254
+ let seq2 = struct2SeqHash[chainid];
26255
+
26256
+ let queryAjax = $.ajax({
26257
+ url: url,
26258
+ type: 'POST',
26259
+ data : {'targets': seq1, 'queries': seq2},
26260
+ dataType: 'jsonp',
26261
+ cache: true
26262
+ });
26263
+
26264
+ ajaxArray.push(queryAjax);
26265
+ }
26111
26266
  }
26112
26267
  } // for
26113
26268
 
@@ -32234,7 +32389,7 @@ class AddTrack {
32234
32389
 
32235
32390
  thisClass.showNewTrack(chainid, title, result.text, undefined, undefined, 'custom', undefined, undefined, result.fromArray, result.toArray);
32236
32391
 
32237
- me.htmlCls.clickMenuCls.setLogCmd("add track | chainid " + chainid + " | title " + title + " | text " + text + " | type custom", true);
32392
+ me.htmlCls.clickMenuCls.setLogCmd("add track | chainid " + chainid + " | title " + title + " | text " + thisClass.simplifyText(text) + " | type custom", true);
32238
32393
  });
32239
32394
 
32240
32395
  // current selection
@@ -32683,6 +32838,9 @@ class AddTrack {
32683
32838
  let out = ''; // 1-based text positions
32684
32839
  let bFoundText = false;
32685
32840
 
32841
+ // replace 'undefined' to space
32842
+ text = text.replace(/undefined/g, ' ');
32843
+
32686
32844
  let i, il, prevEmptyPos = -1;
32687
32845
  for(i = 0, il = text.length; i < il; ++i) {
32688
32846
  if(text[i] == '-' || text[i] == ' ') {
@@ -34710,19 +34868,19 @@ class ApplyCommand {
34710
34868
  let para = p1Array[0];
34711
34869
  let value = parseFloat(p1Array[1]);
34712
34870
 
34713
- if(para == 'linerad') ic.lineRadius = value;
34714
- if(para == 'coilrad') ic.coilWidth = value;
34715
- if(para == 'stickrad') ic.cylinderRadius = value;
34716
- if(para == 'crosslinkrad') ic.crosslinkRadius = value;
34717
- if(para == 'tracerad') ic.traceRadius = value;
34718
- if(para == 'ballscale') ic.dotSphereScale = value;
34719
-
34720
- if(para == 'ribbonthick') ic.ribbonthickness = value;
34721
- if(para == 'proteinwidth') ic.helixSheetWidth = value;
34722
- if(para == 'nucleotidewidth') ic.nucleicAcidWidth = value;
34871
+ if(para == 'linerad' && !isNaN(value)) ic.lineRadius = value;
34872
+ if(para == 'coilrad' && !isNaN(value)) ic.coilWidth = value;
34873
+ if(para == 'stickrad' && !isNaN(value)) ic.cylinderRadius = value;
34874
+ if(para == 'crosslinkrad' && !isNaN(value)) ic.crosslinkRadius = value;
34875
+ if(para == 'tracerad' && !isNaN(value)) ic.traceRadius = value;
34876
+ if(para == 'ballscale' && !isNaN(value)) ic.dotSphereScale = value;
34723
34877
 
34724
- ic.drawCls.draw();
34878
+ if(para == 'ribbonthick' && !isNaN(value)) ic.ribbonthickness = value;
34879
+ if(para == 'proteinwidth' && !isNaN(value)) ic.helixSheetWidth = value;
34880
+ if(para == 'nucleotidewidth' && !isNaN(value)) ic.nucleicAcidWidth = value;
34725
34881
  }
34882
+
34883
+ ic.drawCls.draw();
34726
34884
  }
34727
34885
  else if(commandOri.indexOf('set light') == 0) {
34728
34886
  let paraArray = command.split(' | ');
@@ -34736,9 +34894,9 @@ class ApplyCommand {
34736
34894
  if(para == 'light1') ic.light1 = value;
34737
34895
  if(para == 'light2') ic.light2 = value;
34738
34896
  if(para == 'light3') ic.light3 = value;
34739
-
34740
- ic.drawCls.draw();
34741
34897
  }
34898
+
34899
+ ic.drawCls.draw();
34742
34900
  }
34743
34901
  else if(commandOri.indexOf('set shininess') == 0) {
34744
34902
  let pos = command.lastIndexOf(' ');
@@ -35374,6 +35532,9 @@ class ApplyCommand {
35374
35532
 
35375
35533
  ic.resid2specCls.selectProperty(property, from, to);
35376
35534
  }
35535
+ else if(command.indexOf('select each residue') !== -1) {
35536
+ ic.selectionCls.saveEachResiInSel();
35537
+ }
35377
35538
  else if(command.indexOf('select') == 0 && command.indexOf('name') !== -1) {
35378
35539
  let paraArray = commandOri.split(' | '); // atom names might be case-sensitive
35379
35540
 
@@ -37403,7 +37564,7 @@ class SetSeqAlign {
37403
37564
  if(ic.alnChainsSeq[chainid1]) {
37404
37565
  for(let j = 0, jl = ic.alnChainsSeq[chainid1].length; j < jl; ++j) {
37405
37566
  //add gap before the mapping region
37406
- if(parseInt(ic.alnChainsSeq[chainid1][j].resi) == resi_t) {
37567
+ if(parseInt(ic.alnChainsSeq[chainid1][j].resi) == parseInt(resi_t)) {
37407
37568
  pos_t = j;
37408
37569
  break;
37409
37570
  }
@@ -37586,7 +37747,7 @@ class SetSeqAlign {
37586
37747
  result = this.getTemplatePosFromOriPos(chainid1, start1, end1, bRealign);
37587
37748
  pos1 = result.pos1;
37588
37749
  pos2 = result.pos2;
37589
-
37750
+
37590
37751
  let k = 0;
37591
37752
  for(let j = pos1; j <= pos2; ++j) {
37592
37753
  // inherit the gaps from the template
@@ -37610,7 +37771,7 @@ class SetSeqAlign {
37610
37771
  ++k;
37611
37772
  }
37612
37773
  }
37613
-
37774
+
37614
37775
  prevIndex1 = end1;
37615
37776
  prevIndex2 = end2;
37616
37777
  }
@@ -37630,13 +37791,13 @@ class SetSeqAlign {
37630
37791
  //var chainid_t = ic.chainidArray[0];
37631
37792
 
37632
37793
  // let structureArray = Object.keys(ic.structures);
37633
- let structure1 = chainid_t.substr(0, chainid_t.indexOf('_')); //structureArray[0];
37634
- let structure2 = chainid.substr(0, chainid.indexOf('_')); //structureArray[1];
37794
+ // let structure1 = chainid_t.substr(0, chainid_t.indexOf('_')); //structureArray[0];
37795
+ // let structure2 = chainid.substr(0, chainid.indexOf('_')); //structureArray[1];
37635
37796
 
37636
- if(structure1 == structure2) structure2 += me.htmlCls.postfix;
37797
+ // if(structure1 == structure2) structure2 += me.htmlCls.postfix;
37637
37798
 
37638
- ic.conservedName1 = structure1 + '_cons';
37639
- ic.conservedName2 = structure2 + '_cons';
37799
+ ic.conservedName1 = chainid_t + '_cons';
37800
+ ic.conservedName2 = chainid + '_cons';
37640
37801
 
37641
37802
  ic.consHash1 = {};
37642
37803
  ic.consHash2 = {};
@@ -37663,15 +37824,15 @@ class SetSeqAlign {
37663
37824
  if(!ic.chainsMapping[chainid_t]) ic.chainsMapping[chainid_t] = {};
37664
37825
  if(!ic.chainsMapping[chainid]) ic.chainsMapping[chainid] = {};
37665
37826
 
37666
- for(let i = 0, il = ic.realignResid[structure1].length; i < il; ++i) {
37667
- let resObject1 = ic.realignResid[structure1][i];
37827
+ for(let i = 0, il = ic.realignResid[chainid_t].length; i < il; ++i) {
37828
+ let resObject1 = ic.realignResid[chainid_t][i];
37668
37829
  let pos1 = resObject1.resid.lastIndexOf('_');
37669
37830
  let chainid1 = resObject1.resid.substr(0, pos1);
37670
37831
  let resi1 = resObject1.resid.substr(pos1 + 1);
37671
37832
  resObject1.resi = resi1;
37672
37833
  resObject1.aligned = true;
37673
37834
 
37674
- let resObject2 = ic.realignResid[structure2][i];
37835
+ let resObject2 = ic.realignResid[chainid][i];
37675
37836
  let pos2 = resObject2.resid.lastIndexOf('_');
37676
37837
  let chainid2 = resObject2.resid.substr(0, pos2);
37677
37838
  let resi2 = resObject2.resid.substr(pos2 + 1);
@@ -37929,8 +38090,8 @@ class ParserUtils {
37929
38090
  }
37930
38091
 
37931
38092
  getQtStartEndFromRealignResid(chainid_t, chainid_q) { let ic = this.icn3d; ic.icn3dui;
37932
- let struct_t = chainid_t.substr(0, chainid_t.indexOf('_'));
37933
- let struct_q = chainid_q.substr(0, chainid_q.indexOf('_'));
38093
+ chainid_t.substr(0, chainid_t.indexOf('_'));
38094
+ chainid_q.substr(0, chainid_q.indexOf('_'));
37934
38095
 
37935
38096
  let qt_start_end = [];
37936
38097
 
@@ -37946,11 +38107,11 @@ class ParserUtils {
37946
38107
  resi2pos_q[resi] = i + 1;
37947
38108
  }
37948
38109
 
37949
- for(let i = 0, il = ic.realignResid[struct_t].length; i < il && i < ic.realignResid[struct_q].length; ++i) {
37950
- let resid_t = ic.realignResid[struct_t][i].resid;
38110
+ for(let i = 0, il = ic.realignResid[chainid_t].length; i < il && i < ic.realignResid[chainid_q].length; ++i) {
38111
+ let resid_t = ic.realignResid[chainid_t][i].resid;
37951
38112
  let pos_t = resid_t.lastIndexOf('_');
37952
38113
  let resi_t = parseInt(resid_t.substr(pos_t + 1));
37953
- let resid_q = ic.realignResid[struct_q][i].resid;
38114
+ let resid_q = ic.realignResid[chainid_q][i].resid;
37954
38115
  let pos_q = resid_q.lastIndexOf('_');
37955
38116
  let resi_q = parseInt(resid_q.substr(pos_q + 1));
37956
38117
 
@@ -38894,7 +39055,7 @@ class MmcifParser {
38894
39055
  }
38895
39056
 
38896
39057
  // not all listed residues are considered missing, e.g., PDB ID 4OR2, only the firts four residues are considered missing
38897
- if(!isNaN(resi) &&(prevMissingChain == '' ||(chain != prevMissingChain) ||(chain == prevMissingChain && resi > maxMissingResi)) ) {
39058
+ if(!isNaN(resi) &&(prevMissingChain == '' ||(chain != prevMissingChain) ||(chain == prevMissingChain && parseInt(resi) > maxMissingResi)) ) {
38898
39059
  ic.chainMissingResidueArray[chainNum].push(resObject);
38899
39060
 
38900
39061
  maxMissingResi = resi;
@@ -44241,6 +44402,22 @@ class Selection {
44241
44402
  }
44242
44403
  }
44243
44404
 
44405
+ saveEachResiInSel() { let ic = this.icn3d; ic.icn3dui;
44406
+ ic.selectionCls.saveSelectionPrep();
44407
+
44408
+ ic.selectedResidues = {};
44409
+
44410
+ ic.selectedResidues = ic.firstAtomObjCls.getResiduesFromCalphaAtoms(ic.hAtoms);
44411
+
44412
+ for(let resid in ic.selectedResidues) {
44413
+ let eachResidueHash = {};
44414
+ eachResidueHash[resid] = 1;
44415
+ let name = resid + '_' + ic.selectedResidues[resid];
44416
+
44417
+ this.selectResidueList(eachResidueHash, name, name);
44418
+ }
44419
+ }
44420
+
44244
44421
  removeSelection() { let ic = this.icn3d; ic.icn3dui;
44245
44422
  if(!ic.bAnnotations) {
44246
44423
  ic.hlUpdateCls.removeSeqChainBkgd();
@@ -45527,14 +45704,16 @@ class ApplyDisplay {
45527
45704
  let coilWidth = parseFloat(me.htmlCls.setHtmlCls.getCookie('coilWidth'));
45528
45705
  let cylinderRadius = parseFloat(me.htmlCls.setHtmlCls.getCookie('cylinderRadius'));
45529
45706
  let clRad = me.htmlCls.setHtmlCls.getCookie('crosslinkRadius');
45530
- let crosslinkRadius = (!isNaN(clRad)) ? parseFloat(clRad) : ic.crosslinkRadius;
45707
+ let crosslinkRadius = (clRad && !isNaN(clRad)) ? parseFloat(clRad) : ic.crosslinkRadius;
45531
45708
  let traceRadius = parseFloat(me.htmlCls.setHtmlCls.getCookie('traceRadius'));
45532
45709
  let dotSphereScale = parseFloat(me.htmlCls.setHtmlCls.getCookie('dotSphereScale'));
45533
45710
  let ribbonthickness = parseFloat(me.htmlCls.setHtmlCls.getCookie('ribbonthickness'));
45534
45711
  let helixSheetWidth = parseFloat(me.htmlCls.setHtmlCls.getCookie('helixSheetWidth'));
45535
45712
  let nucleicAcidWidth = parseFloat(me.htmlCls.setHtmlCls.getCookie('nucleicAcidWidth'));
45536
45713
 
45537
- if(ic.lineRadius != lineRadius || ic.coilWidth != coilWidth || ic.cylinderRadius != cylinderRadius || ic.crosslinkRadius != crosslinkRadius || ic.traceRadius != traceRadius || ic.dotSphereScale != dotSphereScale || ic.ribbonthickness != ribbonthickness || ic.helixSheetWidth != helixSheetWidth || ic.nucleicAcidWidth != nucleicAcidWidth) {
45714
+ if(!ic.bSetThicknessOnce && (ic.lineRadius != lineRadius || ic.coilWidth != coilWidth || ic.cylinderRadius != cylinderRadius || ic.crosslinkRadius != crosslinkRadius || ic.traceRadius != traceRadius || ic.dotSphereScale != dotSphereScale || ic.ribbonthickness != ribbonthickness || ic.helixSheetWidth != helixSheetWidth || ic.nucleicAcidWidth != nucleicAcidWidth) ) {
45715
+ ic.bSetThicknessOnce = true;
45716
+
45538
45717
  me.htmlCls.clickMenuCls.setLogCmd('set thickness | linerad ' + lineRadius + ' | coilrad ' + coilWidth + ' | stickrad ' + cylinderRadius + ' | crosslinkrad ' + crosslinkRadius + ' | tracerad ' + traceRadius + ' | ribbonthick ' + ribbonthickness + ' | proteinwidth ' + helixSheetWidth + ' | nucleotidewidth ' + nucleicAcidWidth + ' | ballscale ' + dotSphereScale, true);
45539
45718
  }
45540
45719
 
@@ -55034,8 +55213,19 @@ class SaveFile {
55034
55213
  if(!isNaN(resi) && atom.chain.length > 3 && !isNaN(atom.chain.substr(3)) ) { // such as: chain = NAG2, resi=1 => chain = NAG, resi=2
55035
55214
  resi = resi - 1 + parseInt(atom.chain.substr(3));
55036
55215
  }
55037
- line +=(resi.toString().length <= 4) ? resi.toString().padStart(4, ' ') : resi.toString().substr(0, 4);
55038
- line += ' '.padStart(4, ' ');
55216
+ let resiInt = parseInt(resi);
55217
+ line +=(resiInt.toString().length <= 4) ? resiInt.toString().padStart(4, ' ') : resiInt.toString().substr(0, 4);
55218
+ //line += ' '.padStart(4, ' ');
55219
+ // insert
55220
+ let lastChar = resi.toString().substr(resi.toString().length - 1, 1);
55221
+ if(isNaN(lastChar)) {
55222
+ line += lastChar;
55223
+ }
55224
+ else {
55225
+ line += ' ';
55226
+ }
55227
+ line += ' '.padStart(3, ' ');
55228
+
55039
55229
  line += atom.coord.x.toFixed(3).toString().padStart(8, ' ');
55040
55230
  line += atom.coord.y.toFixed(3).toString().padStart(8, ' ');
55041
55231
  line += atom.coord.z.toFixed(3).toString().padStart(8, ' ');
@@ -56232,15 +56422,19 @@ class ClickMenu {
56232
56422
  thisClass.setLogCmd('defined sets', true);
56233
56423
  //thisClass.setLogCmd('window defined sets', true);
56234
56424
  });
56235
- me.myEventCls.onIds("#" + me.pre + "setOr", "click", function(e) { let ic = me.icn3d; e.preventDefault();
56236
- ic.setOperation = 'or';
56425
+ $(document).on("click", "#" + me.pre + "setOr", function(e) { let ic = me.icn3d;
56426
+ e.stopImmediatePropagation();
56427
+ ic.setOperation = 'or';
56237
56428
  });
56238
- me.myEventCls.onIds("#" + me.pre + "setAnd", "click", function(e) { let ic = me.icn3d; e.preventDefault();
56239
- ic.setOperation = 'and';
56429
+ $(document).on("click", "#" + me.pre + "setAnd", function(e) { let ic = me.icn3d;
56430
+ e.stopImmediatePropagation();
56431
+ ic.setOperation = 'and';
56240
56432
  });
56241
- me.myEventCls.onIds("#" + me.pre + "setNot", "click", function(e) { let ic = me.icn3d; e.preventDefault();
56242
- ic.setOperation = 'not';
56433
+ $(document).on("click", "#" + me.pre + "setNot", function(e) { let ic = me.icn3d;
56434
+ e.stopImmediatePropagation();
56435
+ ic.setOperation = 'not';
56243
56436
  });
56437
+
56244
56438
  // },
56245
56439
  // clkMn2_pkNo: function() {
56246
56440
  me.myEventCls.onIds("#" + me.pre + "mn2_pkNo", "click", function(e) { let ic = me.icn3d; e.preventDefault();
@@ -58600,6 +58794,7 @@ class SetMenu {
58600
58794
 
58601
58795
  html += me.htmlCls.setHtmlCls.getLink('mn2_saveselection', 'Save Selection', 1, 1);
58602
58796
  html += me.htmlCls.setHtmlCls.getLink('clearall', 'Clear Selection', undefined, 1);
58797
+ html += me.htmlCls.setHtmlCls.getLink('mn2_saveresidue', 'Save Res. in Sel.', 1, 1);
58603
58798
 
58604
58799
  html += me.htmlCls.setHtmlCls.getMenuSep();
58605
58800
 
@@ -58999,7 +59194,7 @@ class SetMenu {
58999
59194
  html += "<ul>";
59000
59195
  html += me.htmlCls.setHtmlCls.getLink('mn5_elecmap2fofc', '2Fo-Fc Map', undefined, 2);
59001
59196
  html += me.htmlCls.setHtmlCls.getLink('mn5_elecmapfofc', 'Fo-Fc Map', undefined, 2);
59002
- html += me.htmlCls.setHtmlCls.getLinkWrapper('mn5_elecmapNo', 'Remove Map', 'mapWrapper2', undefined, undefined, 2);
59197
+ html += me.htmlCls.setHtmlCls.getLinkWrapper('mn5_elecmapNo', 'Remove Map', 'mapWrapper2', undefined, 2);
59003
59198
 
59004
59199
  html += "</ul>";
59005
59200
  html += "</li>";
@@ -60670,7 +60865,7 @@ class SetDialog {
60670
60865
 
60671
60866
  html += me.htmlCls.divStr + "dl_mutation' class='" + dialogClass + "'>";
60672
60867
  html += "<div style='width:500px'>";
60673
- html += 'Please specify the mutations with a comma separated mutation list. Each mutation can be specified as "[PDB ID or AlphaFold UniProt ID]_[Chain ID]_[Residue Number]_[One Letter Mutatnt Residue]". E.g., the mutation of N501Y in the E chain of PDB 6M0J can be specified as "6M0J_E_501_Y". For AlphaFold structures, the "Chain ID" is "A".<br/><br/>';
60868
+ html += 'Please specify the mutations with a comma separated mutation list. Each mutation can be specified as "[<b>uppercase</b> PDB ID or AlphaFold UniProt ID]_[Chain ID]_[Residue Number]_[One Letter Mutant Residue]". E.g., the mutation of N501Y in the E chain of PDB 6M0J can be specified as "6M0J_E_501_Y". For AlphaFold structures, the "Chain ID" is "A".<br/><br/>';
60674
60869
  html += "<div style='display:inline-block; width:110px'>Mutations: </div>" + me.htmlCls.inputTextStr + "id='" + me.pre + "mutationids' value='6M0J_E_484_K,6M0J_E_501_Y,6M0J_E_417_N' size=50><br/><br/>";
60675
60870
 
60676
60871
  // html += "<b>Data Source</b>: <select id='" + me.pre + "idsource'>";
@@ -61777,8 +61972,8 @@ class Events {
61777
61972
  }
61778
61973
 
61779
61974
  setPredefinedMenu(id) { let me = this.icn3dui, ic = me.icn3d;
61780
- if(Object.keys(ic.structures).length < 2) {
61781
- alert("At least two structures are required for alignment...");
61975
+ if(Object.keys(ic.chains).length < 2) {
61976
+ alert("At least two chains are required for alignment...");
61782
61977
  return;
61783
61978
  }
61784
61979
  if(ic.bSetChainsAdvancedMenu === undefined || !ic.bSetChainsAdvancedMenu) {
@@ -61798,14 +61993,14 @@ class Events {
61798
61993
  launchMmdb(ids, bBiounit, hostUrl) { let me = this.icn3dui; me.icn3d;
61799
61994
  let flag = bBiounit ? '1' : '0';
61800
61995
 
61801
- ids = ids.replace(/,/g, ' ').replace(/\s+/g, ' ').trim();
61996
+ ids = ids.replace(/,/g, ' ').replace(/\s+/g, ',').trim();
61802
61997
 
61803
61998
  if(!ids) {
61804
61999
  alert("Please enter a list of PDB IDs or AlphaFold UniProt IDs...");
61805
62000
  return;
61806
62001
  }
61807
62002
 
61808
- let idArray = ids.split(' ');
62003
+ let idArray = ids.split(',');
61809
62004
  if(idArray.length == 1 && (idArray[0].length == 4 || !isNaN(idArray[0])) ) {
61810
62005
  me.htmlCls.clickMenuCls.setLogCmd("load mmdb" + flag + " " + ids, false);
61811
62006
  window.open(hostUrl + '?mmdbid=' + ids + '&bu=' + flag, '_blank');
@@ -61965,8 +62160,8 @@ class Events {
61965
62160
  });
61966
62161
 
61967
62162
  me.myEventCls.onIds("#" + me.pre + "realignSelection", "click", function(e) { let ic = me.icn3d;
61968
- if(Object.keys(ic.structures).length < 2) {
61969
- alert("At least two structures are required for alignment...");
62163
+ if(Object.keys(ic.chains).length < 2) {
62164
+ alert("At least two chains are required for alignment...");
61970
62165
  return;
61971
62166
  }
61972
62167
 
@@ -63942,6 +64137,16 @@ class Events {
63942
64137
  //var description = $("#" + me.pre + "seq_command_desc2").val();
63943
64138
  ic.selectionCls.saveSelection(name, name);
63944
64139
  });
64140
+
64141
+ me.myEventCls.onIds("#" + me.pre + "mn2_saveresidue", "click", function(e) { let ic = me.icn3d;
64142
+ e.stopImmediatePropagation();
64143
+ if(!me.cfg.notebook) dialog.dialog( "close" );
64144
+
64145
+ ic.selectionCls.saveEachResiInSel();
64146
+
64147
+ me.htmlCls.clickMenuCls.setLogCmd('select each residue', true);
64148
+ });
64149
+
63945
64150
  // },
63946
64151
  // clickAlignSeqSaveSelection: function() {
63947
64152
  me.myEventCls.onIds("#" + me.pre + "alignseq_saveselection", "click", function(e) { let ic = me.icn3d;
@@ -65750,6 +65955,9 @@ class Alternate {
65750
65955
  else if(colorType == 'normalized hydrophobic') {
65751
65956
  colorLabel = 'Normalized Hydrophobicity';
65752
65957
  }
65958
+ else if(colorType == 'hydrophobic') {
65959
+ colorLabel = 'Hydrophobicity';
65960
+ }
65753
65961
 
65754
65962
  let html = "Color by <b>" + colorLabel + "</b><br><br>";
65755
65963
 
@@ -65771,35 +65979,55 @@ class Alternate {
65771
65979
  html += this.getColorLegendForCharge(ic.hAtoms);
65772
65980
  }
65773
65981
  //else if (ic.legendClick == 4){
65774
- else if (colorType == 'normalized hydrophobic') {
65775
- let resSet = this.getRes2color(ic.hAtoms);
65982
+ else if (colorType == 'normalized hydrophobic' || colorType == 'hydrophobic') {
65983
+ let bOriResn = true;
65984
+ let resSet = this.getRes2color(ic.hAtoms, bOriResn);
65776
65985
 
65777
65986
  // polar first - most to least
65778
65987
  // create hydrophobic table
65779
65988
  var items = Object.keys(resSet).map(
65780
- (key) => { return [key, Object.keys(resSet[key])[0]]
65989
+ //(key) => { return [key, Object.keys(resSet[key])[0]]
65990
+ (key) => { return [key, me.parasCls.hydrophobicValues[key]]
65781
65991
  });
65782
65992
 
65993
+ // items.sort(
65994
+ // (first, second) => {
65995
+ // return ((parseInt(second[1].substring(2,4), 16) - parseInt(second[1].substring(4,6), 16)) - (parseInt(first[1].substring(2,4), 16) - parseInt(first[1].substring(4,6), 16)));
65996
+ // }
65997
+ // );
65998
+
65783
65999
  items.sort(
65784
66000
  (first, second) => {
65785
- return ((parseInt(second[1].substring(2,4), 16) - parseInt(second[1].substring(4,6), 16)) - (parseInt(first[1].substring(2,4), 16) - parseInt(first[1].substring(4,6), 16))) }
66001
+ return parseFloat(first[1]) - parseFloat(second[1]);
66002
+ }
65786
66003
  );
65787
66004
 
65788
66005
  var keys = items.map(
65789
- (e) => { return [e[0], e[1]]
66006
+ //(e) => { return [e[0], e[1]]
66007
+ (e) => { return [e[0], Object.keys(resSet[e[0]])[0]]
65790
66008
  });
65791
66009
 
65792
66010
  html += "<div>";
65793
66011
 
65794
- html += "Dark green (W, F, Y, L, I, C, M): Hydrophobic<br>";
65795
- html += "Light green (G, V, S, T, A, N, P, Q): Polar<br>";
65796
- html += "Grey: Charged, not hydrophobic<br><br>";
66012
+ if(colorType == 'normalized hydrophobic') {
66013
+ html += "Dark green (W, F, Y, L, I, C, M): Hydrophobic<br>";
66014
+ html += "Light green (G, V, S, T, A, N, P, Q): Polar<br>";
66015
+ html += "Grey: Charged, not hydrophobic<br><br>";
66016
+ }
66017
+ else {
66018
+ html += "Green (W, F, Y, L, I, C, M): Hydrophobic<br>";
66019
+ html += "Yellow (G, V, S, T, A, N, P, Q): Polar<br>";
66020
+ html += "Red: Negatively Charged<br>";
66021
+ html += "Blue: Positively Charged<br><br>";
66022
+ }
65797
66023
 
65798
66024
  let cnt = 0;
65799
66025
  for (let key of keys) {
66026
+ if(!me.parasCls.residueAbbrev[key[0]]) continue;
66027
+
65800
66028
  html += "<div style='display:inline-block; width:100px'>";
65801
66029
  html += "<div style='width: 10px; height: 10px; background-color:#" + key[1] + "; border: 0px;display:inline-block;' ></div> ";
65802
- html += key[0] + "</div>";
66030
+ html += me.parasCls.residueAbbrev[key[0]] + "</div>";
65803
66031
 
65804
66032
  if(cnt % 4 == 3) html += "<br>";
65805
66033
 
@@ -65863,31 +66091,15 @@ class Alternate {
65863
66091
  return html;
65864
66092
  }
65865
66093
 
65866
- getRes2color(atomHash) { let ic = this.icn3d; ic.icn3dui;
66094
+ getRes2color(atomHash, bOriResn) { let ic = this.icn3d, me = ic.icn3dui;
65867
66095
  let resSet = {};
65868
66096
 
65869
- const residueAbbrev = {
65870
- ALA: "A (Ala)", ARG: "R (Arg)", ASN: "N (Asn)",
65871
- ASP: "D (Asp)", CYS: "C (Cys)", GLN: "Q (Gln)",
65872
- GLU: "E (Glu)", GLY: "G (Gly)", HIS: "H (His)",
65873
- ILE: "I (Ile)", LEU: "L (Leu)", LYS: "K (Lys)",
65874
- MET: "M (Met)", PHE: "F (Phe)", PRO: "P (Pro)",
65875
- SER: "S (Ser)", THR: "T (Thr)", TRP: "W (Trp)",
65876
- TYR: "Y (Tyr)", VAL: "V (Val)",
65877
- //ASX: "B (Asx)", GLX: "Z (Glx)",
65878
- ASX: "X (Asx)", GLX: "X (Glx)",
65879
- 'G': "Guanine", 'A': "Adenine",
65880
- 'T': "Thymine", 'C': "Cytosine", 'U': "Uracil",
65881
- 'DG': "deoxy-Guanine", 'DA': "deoxy-Adenine", 'DT': "deoxy-Thymine",
65882
- 'DC': "deoxy-Cytosine", 'DU': 'deoxy-Uracil'
65883
- };
65884
-
65885
66097
  let residueHash = ic.firstAtomObjCls.getResiduesFromAtoms(atomHash);
65886
66098
  for(let resid in residueHash){
65887
66099
  let atomHash = ic.residues[resid];
65888
66100
 
65889
66101
  let atom = ic.firstAtomObjCls.getFirstAtomObj(atomHash);
65890
- let resiLabel = residueAbbrev[atom.resn];
66102
+ let resiLabel = (bOriResn) ? atom.resn : me.parasCls.residueAbbrev[atom.resn];
65891
66103
  let temp = (atom === undefined || atom.color === undefined || atom.color.getHexString().toUpperCase() === 'FFFFFF') ? 'DDDDDD' : atom.color.getHexString();
65892
66104
 
65893
66105
  if (resiLabel != undefined){
@@ -68596,7 +68808,6 @@ class Vastplus {
68596
68808
  let subdomains = result.subdomains;
68597
68809
 
68598
68810
  let domainAtomsArray = [];
68599
-
68600
68811
  if(subdomains.length <= 1) {
68601
68812
  domainAtomsArray.push(ic.chains[chainid]);
68602
68813
 
@@ -70139,6 +70350,8 @@ class iCn3D {
70139
70350
  this.midValue = 50;
70140
70351
  this.endValue = 100;
70141
70352
 
70353
+ this.crosslinkRadius = 0.4;
70354
+
70142
70355
  // classes
70143
70356
  this.sceneCls = new Scene(this);
70144
70357
  this.cameraCls = new Camera(this);
@@ -70485,7 +70698,7 @@ class iCn3DUI {
70485
70698
  //even when multiple iCn3D viewers are shown together.
70486
70699
  this.pre = this.cfg.divid + "_";
70487
70700
 
70488
- this.REVISION = '3.19.0';
70701
+ this.REVISION = '3.19.1';
70489
70702
 
70490
70703
  // In nodejs, iCn3D defines "window = {navigator: {}}"
70491
70704
  this.bNode = (Object.keys(window).length < 2) ? true : false;