icn3d 3.38.0 → 3.38.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
@@ -37848,6 +37848,10 @@ class Contact {
37848
37848
  for(let i in atomlistTarget) {
37849
37849
  //var oriAtom = atomlistTarget[i];
37850
37850
  let oriAtom = ic.atoms[i];
37851
+
37852
+ // skip hydrogen atoms
37853
+ if(bInteraction && oriAtom.elem == 'H') continue;
37854
+
37851
37855
  let r1 = me.parasCls.vdwRadii[oriAtom.elem.toUpperCase()];
37852
37856
  let chainid1 = oriAtom.structure + '_' + oriAtom.chain;
37853
37857
 
@@ -37874,6 +37878,10 @@ class Contact {
37874
37878
 
37875
37879
  for (let j in neighbors) {
37876
37880
  let atom = neighbors[j];
37881
+
37882
+ // skip hydrogen atoms
37883
+ if(bInteraction && atom.elem == 'H') continue;
37884
+
37877
37885
  let r2 = me.parasCls.vdwRadii[atom.elem.toUpperCase()];
37878
37886
  let chainid2 = atom.structure + '_' + atom.chain;
37879
37887
 
@@ -58736,16 +58744,14 @@ class SdfParser {
58736
58744
  }
58737
58745
 
58738
58746
  async downloadSmiles(smiles) { let ic = this.icn3d, me = ic.icn3dui;
58739
- let urlSmiles = me.htmlCls.baseUrl + "openbabel/openbabel.cgi?smiles2pdb=" + smiles;
58740
- let pdbStr = await me.getAjaxPromise(urlSmiles, 'text');
58747
+ let urlSmiles = me.htmlCls.baseUrl + "openbabel/openbabel.cgi?smiles2sdf=" + smiles;
58748
+ let sdfStr = await me.getAjaxPromise(urlSmiles, 'text');
58741
58749
 
58742
58750
  ic.init();
58743
-
58744
58751
  ic.bInputfile = true;
58745
- ic.InputfileType = 'pdb';
58746
- ic.InputfileData = (ic.InputfileData) ? ic.InputfileData + '\nENDMDL\n' + pdbStr : pdbStr;
58747
-
58748
- await ic.pdbParserCls.loadPdbData(pdbStr);
58752
+ ic.InputfileData = (ic.InputfileData) ? ic.InputfileData + '\nENDMDL\n' + sdfStr : sdfStr;
58753
+ ic.InputfileType = 'sdf';
58754
+ await ic.sdfParserCls.loadSdfData(sdfStr);
58749
58755
  }
58750
58756
 
58751
58757
  async loadSdfData(data) { let ic = this.icn3d, me = ic.icn3dui;
@@ -83329,7 +83335,7 @@ iCn3D.prototype.resetConfig = function () { let ic = this, me = ic.icn3dui;
83329
83335
  this.opts['nucleotides'] = 'o3 trace';
83330
83336
  }
83331
83337
 
83332
- if(me.cfg.cid !== undefined) {
83338
+ if(me.cfg.cid !== undefined || me.cfg.smiles !== undefined) {
83333
83339
  this.opts['color'] = 'atom';
83334
83340
 
83335
83341
  this.opts['pk'] = 'atom';
@@ -83372,7 +83378,7 @@ class iCn3DUI {
83372
83378
  //even when multiple iCn3D viewers are shown together.
83373
83379
  this.pre = this.cfg.divid + "_";
83374
83380
 
83375
- this.REVISION = '3.38.0';
83381
+ this.REVISION = '3.38.1';
83376
83382
 
83377
83383
  // In nodejs, iCn3D defines "window = {navigator: {}}"
83378
83384
  this.bNode = (Object.keys(window).length < 2) ? true : false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icn3d",
3
- "version": "3.38.0",
3
+ "version": "3.38.2",
4
4
  "main": "./icn3d.js",
5
5
  "exports": {
6
6
  ".": {