@datagrok/bio 2.12.22 → 2.12.23

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/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "name": "Aleksandr Tanas",
6
6
  "email": "atanas@datagrok.ai"
7
7
  },
8
- "version": "2.12.22",
8
+ "version": "2.12.23",
9
9
  "description": "Bioinformatics support (import/export of sequences, conversion, visualization, analysis). [See more](https://github.com/datagrok-ai/public/blob/master/packages/Bio/README.md) for details.",
10
10
  "repository": {
11
11
  "type": "git",
@@ -34,5 +34,14 @@ export class MolfileAtomsV3K extends MolfileAtoms {
34
34
  }).replace(rGroupsRegex, '');
35
35
  });
36
36
  }
37
+
38
+ replaceRGroupSymbolByElement(atomIdx: number, newElementSymbol: string): void {
39
+ super.replaceRGroupSymbolByElement(atomIdx, newElementSymbol);
40
+ // rdkit can generate (out of thin air) masses for r groups, so we need to remove them as well.
41
+ //they are at the end of the line after coordinates and other data
42
+ const lineInfo = this.rawAtomLines[atomIdx].substring(3).split(' ');
43
+ if (lineInfo.length > 7)
44
+ this.rawAtomLines[atomIdx] = `M ${lineInfo.slice(0, 7).join(' ')}`;
45
+ }
37
46
  }
38
47