icn3d 3.51.3 → 3.51.4

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
@@ -102053,20 +102053,12 @@ class GetGraph {
102053
102053
  let thickness = me.htmlCls.coilValue;
102054
102054
  let prevChain = '', prevResName = '', prevResi = 0;
102055
102055
  // add chemicals as well
102056
- let residHash = {};
102057
- for(let i in atomSet) {
102058
- let atom = ic.atoms[i];
102056
+ let residHash = ic.firstAtomObjCls.getResiduesFromAtoms(atomSet);
102057
+ for(let resid in residHash) {
102058
+ let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
102059
102059
 
102060
- if(atom.chain != 'DUM' && (bAnyAtom || atom.het || (atom.name == "CA" && atom.elem == "C") || atom.name == "O3'" || atom.name == "O3*" || atom.name == "P")) {
102061
- // starting nucleotide have "P"
102062
- //if(atom.chain != 'DUM' &&(atom.name == "CA" || atom.name == "P")) {
102063
- let resid = atom.structure + '_' + atom.chain + '_' + atom.resi;
102064
- if(residHash.hasOwnProperty(resid)) {
102065
- continue;
102066
- }
102067
- else {
102068
- residHash[resid] = 1;
102069
- }
102060
+ //if(atom.chain != 'DUM' && (bAnyAtom || atom.het || (atom.name == "CA" && atom.elem == "C") || atom.name == "O3'" || atom.name == "O3*" || atom.name == "P")) {
102061
+ if(atom.chain != 'DUM') {
102070
102062
  let resName = me.utilsCls.residueName2Abbr(atom.resn) + atom.resi;
102071
102063
  if(labelType == 'chain' || labelType == 'structure') resName += '.' + atom.chain;
102072
102064
  if(labelType == 'structure') resName += '.' + atom.structure;
@@ -121560,6 +121552,7 @@ class DefinedSets {
121560
121552
  }
121561
121553
  }
121562
121554
  //}
121555
+
121563
121556
  return residuesHash;
121564
121557
  }
121565
121558
 
@@ -123490,6 +123483,8 @@ class Selection {
123490
123483
  selectMainChains() { let ic = this.icn3d, me = ic.icn3dui;
123491
123484
  let currHAtoms = me.hashUtilsCls.cloneHash(ic.hAtoms);
123492
123485
 
123486
+ ic.opts.pk = 'atom';
123487
+
123493
123488
  ic.hAtoms = ic.applyDisplayCls.selectMainChainSubset(currHAtoms);
123494
123489
 
123495
123490
  ic.hlUpdateCls.showHighlight();
@@ -123499,6 +123494,8 @@ class Selection {
123499
123494
  selectSideChains() { let ic = this.icn3d, me = ic.icn3dui;
123500
123495
  let currHAtoms = me.hashUtilsCls.cloneHash(ic.hAtoms);
123501
123496
 
123497
+ ic.opts.pk = 'atom';
123498
+
123502
123499
  ic.hAtoms = this.getSideAtoms(currHAtoms);
123503
123500
  ic.hlUpdateCls.showHighlight();
123504
123501
  }
@@ -123520,6 +123517,8 @@ class Selection {
123520
123517
  selectMainSideChains() { let ic = this.icn3d, me = ic.icn3dui;
123521
123518
  let residHash = ic.firstAtomObjCls.getResiduesFromAtoms(ic.hAtoms);
123522
123519
 
123520
+ ic.opts.pk = 'residue';
123521
+
123523
123522
  ic.hAtoms = {};
123524
123523
  for(let resid in residHash) {
123525
123524
  ic.hAtoms = me.hashUtilsCls.unionHash(ic.hAtoms, ic.residues[resid]);
@@ -123696,8 +123695,9 @@ class Selection {
123696
123695
  description = name;
123697
123696
  }
123698
123697
 
123699
- if(Object.keys(ic.selectedResidues).length > 0) {
123700
- if(ic.pk == 1) {
123698
+ //if(Object.keys(ic.selectedResidues).length > 0) {
123699
+ // if(ic.pk == 1) {
123700
+ if(ic.opts.pk == 'atom') {
123701
123701
  let bAtom = true;
123702
123702
  this.selectResidueList(ic.hAtoms, name, description, undefined, undefined, bAtom);
123703
123703
  //ic.hlUpdateCls.updateHlAll();
@@ -123724,7 +123724,7 @@ class Selection {
123724
123724
  me.htmlCls.clickMenuCls.setLogCmd('select ' + ic.resid2specCls.residueids2spec(Object.keys(ic.selectedResidues)), true);
123725
123725
  }
123726
123726
  }
123727
- }
123727
+ //}
123728
123728
  }
123729
123729
 
123730
123730
  saveSelInCommand() { let ic = this.icn3d, me = ic.icn3dui;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icn3d",
3
- "version": "3.51.3",
3
+ "version": "3.51.4",
4
4
  "main": "./icn3d.js",
5
5
  "exports": {
6
6
  ".": {