@datagrok/sequence-translator 1.10.13 → 1.10.14

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.
@@ -0,0 +1,5 @@
1
+ Core
2
+ n1nc([*:3])n([*:2])c1[*:1]
3
+ C1C2CN([*:2])CC2CN1[*:1]
4
+ OC1CN([*:2])CCC1N[*:1]
5
+ CC1(N[*:1])CCN([*:2])C1
@@ -0,0 +1,5 @@
1
+ R1,R2,R3
2
+ CC1CCN([*:1])C1C,O=C(C[*:2])NCC(F)(F)F,Cc1cccc([*:3])n1
3
+ NCCC(=O)[*:1],O=C1NC(C(=O)[*:2])CO1,
4
+ CC(=O)[*:1],O=C(CCCF)[*:2],
5
+ O=C(c1cc[nH]n1)[*:1],c1ccc(C[*:2])nc1,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@datagrok/sequence-translator",
3
3
  "friendlyName": "Sequence Translator",
4
- "version": "1.10.13",
4
+ "version": "1.10.14",
5
5
  "author": {
6
6
  "name": "Davit Rizhinashvili",
7
7
  "email": "drizhinashvili@datagrok.ai"
@@ -140,7 +140,7 @@ class StructureAppLayout {
140
140
  const clearBlock = Object.fromEntries(
141
141
  STRANDS.map(
142
142
  (key) => {
143
- const clearIcon = ui.icons.delete(() => { coloredInput[key].inputBase.value = ''; });
143
+ const clearIcon = ui.icons.delete(() => { coloredInput[key].inputBase.value = ''; }, 'Delete');
144
144
  const clearButton = ui.button(clearIcon, () => {});
145
145
  ui.tooltip.bind(clearButton, `Clear ${key.toUpperCase()}`);
146
146
  return [key, clearIcon];
@@ -202,7 +202,7 @@ class TranslatorAppLayout {
202
202
  const formatChoiceInput = ui.div([this.formatChoiceInput]);
203
203
 
204
204
  const clearButton = ui.button(
205
- ui.icons.delete(() => { sequenceColoredInput.inputBase.value = ''; }),
205
+ ui.icons.delete(() => { sequenceColoredInput.inputBase.value = ''; }, 'Delete'),
206
206
  () => {}
207
207
  );
208
208
  ui.tooltip.bind(clearButton, 'Clear input');
@@ -102,6 +102,13 @@ export namespace funcs {
102
102
  return await grok.functions.call('SequenceTranslator:PolyToolEnumerateChemTopMenu', {});
103
103
  }
104
104
 
105
+ /**
106
+ Enumerate cores and R-group lists into a molecule table (Zip or Cartesian)
107
+ */
108
+ export async function chemEnumerateReactionsTopMenu(): Promise<void> {
109
+ return await grok.functions.call('SequenceTranslator:ChemEnumerateReactionsTopMenu', {});
110
+ }
111
+
105
112
  export async function polyToolColumnChoice(df: DG.DataFrame , macroMolecule: DG.Column ): Promise<void> {
106
113
  return await grok.functions.call('SequenceTranslator:PolyToolColumnChoice', { df, macroMolecule });
107
114
  }
@@ -114,7 +121,7 @@ export namespace funcs {
114
121
  return await grok.functions.call('SequenceTranslator:PtEnumeratorHelmApp', {});
115
122
  }
116
123
 
117
- export async function ptEnumeratorChemApp(): Promise<void> {
124
+ export async function ptEnumeratorChemApp(): Promise<DG.View> {
118
125
  return await grok.functions.call('SequenceTranslator:PtEnumeratorChemApp', {});
119
126
  }
120
127
 
@@ -13,6 +13,7 @@ import './tests/polytool-convert-tests';
13
13
  import './tests/polytool-unrule-tests';
14
14
  import './tests/polytool-enumerate-tests';
15
15
  import './tests/polytool-enumerate-breadth-tests';
16
+ import './tests/polytool-enumerate-chem-tests';
16
17
  import './tests/polytool-chain-parse-notation-tests';
17
18
  import './tests/polytool-chain-from-notation-tests';
18
19
  import './tests/toAtomicLevel-tests';
package/src/package.g.ts CHANGED
@@ -148,6 +148,13 @@ export async function polyToolEnumerateChemTopMenu() : Promise<void> {
148
148
  await PackageFunctions.polyToolEnumerateChemTopMenu();
149
149
  }
150
150
 
151
+ //name: chemEnumerateReactions
152
+ //description: Enumerate cores and R-group lists into a molecule table (Zip or Cartesian)
153
+ //top-menu: Chem | Transform | Reactions | Enumerate...
154
+ export async function chemEnumerateReactionsTopMenu() : Promise<void> {
155
+ await PackageFunctions.chemEnumerateReactionsTopMenu();
156
+ }
157
+
151
158
  //input: dataframe df { description: Input data table }
152
159
  //input: column macroMolecule
153
160
  export async function polyToolColumnChoice(df: DG.DataFrame, macroMolecule: DG.Column) : Promise<void> {
@@ -170,11 +177,12 @@ export async function ptEnumeratorHelmApp() : Promise<void> {
170
177
 
171
178
  //name: Chem Enumerator
172
179
  //tags: app
180
+ //output: view result
173
181
  //meta.icon: img/icons/structure.png
174
- //meta.browsePath: Peptides | PolyTool
182
+ //meta.browsePath: Chem | PolyTool
175
183
  //meta.role: app
176
- export async function ptEnumeratorChemApp() : Promise<void> {
177
- await PackageFunctions.ptEnumeratorChemApp();
184
+ export async function ptEnumeratorChemApp() {
185
+ return await PackageFunctions.ptEnumeratorChemApp();
178
186
  }
179
187
 
180
188
  //name: Polytool Helm Enumerator dialog
package/src/package.ts CHANGED
@@ -17,7 +17,7 @@ import {getExternalAppViewFactories} from './plugins/mermade';
17
17
  import {defaultErrorHandler} from './utils/err-info';
18
18
 
19
19
  import {polyToolConvert, polyToolConvertUI} from './polytool/pt-dialog';
20
- import {polyToolEnumerateChemUI} from './polytool/pt-dialog';
20
+ import {polyToolEnumerateChemApp, polyToolEnumerateChemUI} from './polytool/pt-chem-enum-dialog';
21
21
  import {polyToolEnumerateHelmUI, polyToolEnumerateSeq} from './polytool/pt-enumerate-seq-dialog';
22
22
  import {_setPeptideColumn} from './polytool/utils';
23
23
  import {PolyToolCsvLibHandler} from './polytool/csv-to-json-monomer-lib-converter';
@@ -276,6 +276,16 @@ export class PackageFunctions {
276
276
  }
277
277
 
278
278
 
279
+ @grok.decorators.func({
280
+ 'top-menu': 'Chem | Transform | Reactions | Enumerate...',
281
+ 'name': 'chemEnumerateReactions',
282
+ 'description': 'Enumerate cores and R-group lists into a molecule table (Zip or Cartesian)'
283
+ })
284
+ static async chemEnumerateReactionsTopMenu(): Promise<void> {
285
+ polyToolEnumerateChemUI();
286
+ }
287
+
288
+
279
289
  @grok.decorators.func()
280
290
  static async polyToolColumnChoice(
281
291
  @grok.decorators.param({options: {description: 'Input data table'}}) df: DG.DataFrame,
@@ -314,14 +324,15 @@ export class PackageFunctions {
314
324
  @grok.decorators.func({
315
325
  meta: {
316
326
  icon: 'img/icons/structure.png',
317
- browsePath: 'Peptides | PolyTool',
327
+ browsePath: 'Chem | PolyTool',
318
328
  role: 'app'
319
329
  },
320
330
  name: 'Chem Enumerator',
321
- tags: ['app']
331
+ tags: ['app'],
332
+ outputs: [{type: 'view', name: 'result'}]
322
333
  })
323
- static async ptEnumeratorChemApp(): Promise<void> {
324
- polyToolEnumerateChemUI();
334
+ static async ptEnumeratorChemApp() {
335
+ return await polyToolEnumerateChemApp();
325
336
  }
326
337
 
327
338
 
@@ -38,7 +38,7 @@ export const PT_UI_USE_CHIRALITY = 'Chirality engine';
38
38
  export const PT_UI_HIGHLIGHT_MONOMERS = 'Highlight monomers';
39
39
  export const PT_UI_DIALOG_CONVERSION = 'PolyTool Conversion';
40
40
  export const PT_UI_DIALOG_UNRULE = 'PolyTool Unrule';
41
- export const PT_UI_DIALOG_ENUMERATION = 'PolyTool Enumeration';
41
+ export const PT_HELM_UI_DIALOG_ENUMERATION = 'PolyTool Helm Enumeration';
42
42
  export const PT_UI_RULES_USED = 'Rules used';
43
43
 
44
44
  export const PT_ENUM_TYPE_TOOLTIPS: Record<string, string> = {