@datagrok/grokky 1.0.4 → 1.1.0

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.
Files changed (203) hide show
  1. package/.claude/skills/deploy-grokky/SKILL.md +193 -0
  2. package/.grokignore +2 -0
  3. package/.turbo/turbo-build.log +24 -0
  4. package/.vscode/settings.json +16 -0
  5. package/CHANGELOG.md +151 -8
  6. package/CLAUDE.md +284 -0
  7. package/CREDITS.md +173 -0
  8. package/LICENSE.md +16 -0
  9. package/README.md +24 -0
  10. package/bdd/bdd.config.json +1 -0
  11. package/bdd/bindings/elements.ts +9 -0
  12. package/bdd/bindings/steps.ts +787 -0
  13. package/bdd/features/ai-panel/platform-work.feature +63 -0
  14. package/bdd/features/ai-panel/session.feature +69 -0
  15. package/bdd/features/ai-panel/table-work.feature +99 -0
  16. package/bdd/generated/ai-panel/platform-work.test.ts +103 -0
  17. package/bdd/generated/ai-panel/session.test.ts +100 -0
  18. package/bdd/generated/ai-panel/table-work.test.ts +150 -0
  19. package/bdd/package.json +1 -0
  20. package/bdd/tsconfig.json +13 -0
  21. package/css/ai.css +637 -49
  22. package/dist/package-test.js +4 -1707
  23. package/dist/package-test.js.map +1 -1
  24. package/dist/package.js +742 -92317
  25. package/dist/package.js.map +1 -1
  26. package/dockerfiles/claude-runtime/.dockerignore +1 -0
  27. package/{.eslintrc.json → dockerfiles/claude-runtime/.eslintrc.json} +7 -16
  28. package/dockerfiles/claude-runtime/Dockerfile +73 -13
  29. package/dockerfiles/claude-runtime/agent/grokky_agent/__init__.py +0 -0
  30. package/dockerfiles/claude-runtime/agent/grokky_agent/__main__.py +80 -0
  31. package/dockerfiles/claude-runtime/agent/grokky_agent/browser_tools.py +180 -0
  32. package/dockerfiles/claude-runtime/agent/grokky_agent/config.py +26 -0
  33. package/dockerfiles/claude-runtime/agent/grokky_agent/formats.py +155 -0
  34. package/dockerfiles/claude-runtime/agent/grokky_agent/guard.py +87 -0
  35. package/dockerfiles/claude-runtime/agent/grokky_agent/hermes.py +212 -0
  36. package/dockerfiles/claude-runtime/agent/grokky_agent/hermes.yaml +45 -0
  37. package/dockerfiles/claude-runtime/agent/grokky_agent/hermes_plugin/__init__.py +8 -0
  38. package/dockerfiles/claude-runtime/agent/grokky_agent/hermes_plugin/plugin.yaml +3 -0
  39. package/dockerfiles/claude-runtime/agent/grokky_agent/protocol.py +174 -0
  40. package/dockerfiles/claude-runtime/agent/grokky_agent/providers/__init__.py +21 -0
  41. package/dockerfiles/claude-runtime/agent/grokky_agent/providers/anthropic.py +21 -0
  42. package/dockerfiles/claude-runtime/agent/grokky_agent/providers/azure.py +46 -0
  43. package/dockerfiles/claude-runtime/agent/grokky_agent/providers/base.py +127 -0
  44. package/dockerfiles/claude-runtime/agent/grokky_agent/providers/bedrock.py +46 -0
  45. package/dockerfiles/claude-runtime/agent/grokky_agent/providers/custom.py +40 -0
  46. package/dockerfiles/claude-runtime/agent/grokky_agent/providers/databricks.py +54 -0
  47. package/dockerfiles/claude-runtime/agent/grokky_agent/providers/openai_platform.py +41 -0
  48. package/dockerfiles/claude-runtime/agent/grokky_agent/providers/openrouter.py +46 -0
  49. package/dockerfiles/claude-runtime/agent/grokky_agent/session.py +471 -0
  50. package/dockerfiles/claude-runtime/agent/grokky_agent/skills.py +44 -0
  51. package/dockerfiles/claude-runtime/agent/grokky_agent/structured.py +40 -0
  52. package/dockerfiles/claude-runtime/container.json +2 -2
  53. package/dockerfiles/claude-runtime/entrypoint.sh +20 -0
  54. package/dockerfiles/claude-runtime/package-lock.json +1721 -306
  55. package/dockerfiles/claude-runtime/package.json +20 -5
  56. package/dockerfiles/claude-runtime/plugin/.claude-plugin/plugin.json +5 -0
  57. package/dockerfiles/claude-runtime/plugin/skills/datagrok-calc-column/SKILL.md +92 -0
  58. package/dockerfiles/claude-runtime/plugin/skills/datagrok-chem-data/SKILL.md +250 -0
  59. package/dockerfiles/claude-runtime/plugin/skills/datagrok-chem-toolkit/SKILL.md +395 -0
  60. package/dockerfiles/claude-runtime/plugin/skills/datagrok-df-and-columns/SKILL.md +454 -0
  61. package/dockerfiles/claude-runtime/plugin/skills/datagrok-entities/SKILL.md +38 -0
  62. package/dockerfiles/claude-runtime/plugin/skills/datagrok-exec/SKILL.md +209 -0
  63. package/dockerfiles/claude-runtime/plugin/skills/datagrok-filtering/SKILL.md +185 -0
  64. package/dockerfiles/claude-runtime/plugin/skills/datagrok-grid-customization/SKILL.md +270 -0
  65. package/dockerfiles/claude-runtime/plugin/skills/datagrok-projects/SKILL.md +100 -0
  66. package/dockerfiles/claude-runtime/plugin/skills/datagrok-selection/SKILL.md +344 -0
  67. package/dockerfiles/claude-runtime/plugin/skills/datagrok-undo/SKILL.md +78 -0
  68. package/dockerfiles/claude-runtime/plugin/skills/datagrok-viewers/SKILL.md +303 -0
  69. package/dockerfiles/claude-runtime/pyproject.toml +18 -0
  70. package/dockerfiles/claude-runtime/src/agent/pool.ts +411 -0
  71. package/dockerfiles/claude-runtime/src/agent/turn.ts +153 -0
  72. package/dockerfiles/claude-runtime/src/constants.ts +20 -0
  73. package/dockerfiles/claude-runtime/src/credentials.ts +45 -0
  74. package/dockerfiles/claude-runtime/src/grounding.ts +104 -0
  75. package/dockerfiles/claude-runtime/src/help-index.ts +118 -0
  76. package/dockerfiles/claude-runtime/src/privileges.ts +8 -0
  77. package/dockerfiles/claude-runtime/src/prompts.ts +211 -0
  78. package/dockerfiles/claude-runtime/src/server.ts +134 -234
  79. package/dockerfiles/claude-runtime/src/session.ts +328 -0
  80. package/dockerfiles/claude-runtime/src/shared-api-client.ts +112 -0
  81. package/dockerfiles/claude-runtime/src/stream-filter.ts +80 -0
  82. package/dockerfiles/claude-runtime/src/sync/home-files.ts +80 -0
  83. package/dockerfiles/claude-runtime/src/sync/orchestrator.ts +214 -0
  84. package/dockerfiles/claude-runtime/src/sync/packages.ts +145 -0
  85. package/dockerfiles/claude-runtime/src/sync/shared-connections.ts +87 -0
  86. package/dockerfiles/claude-runtime/src/sync/workspace.ts +68 -0
  87. package/dockerfiles/claude-runtime/src/tasks.ts +124 -0
  88. package/dockerfiles/claude-runtime/src/tool-summary.ts +66 -0
  89. package/dockerfiles/claude-runtime/src/types.ts +142 -23
  90. package/dockerfiles/claude-runtime/src/user/installed-packages.ts +17 -0
  91. package/dockerfiles/claude-runtime/src/user/staged-workspace.ts +80 -0
  92. package/dockerfiles/claude-runtime/src/user/user-dir.ts +108 -0
  93. package/dockerfiles/claude-runtime/src/verify.ts +136 -0
  94. package/dockerfiles/claude-runtime/src/watchdog.ts +115 -0
  95. package/dockerfiles/claude-runtime/test/credentials.test.js +43 -0
  96. package/dockerfiles/claude-runtime/test/grounding.test.js +191 -0
  97. package/dockerfiles/claude-runtime/test/help-index.test.js +115 -0
  98. package/dockerfiles/claude-runtime/test/plugin-skills.test.js +57 -0
  99. package/dockerfiles/claude-runtime/test/prompts.test.js +62 -0
  100. package/dockerfiles/claude-runtime/test/reaper.test.js +60 -0
  101. package/dockerfiles/claude-runtime/test/stream-filter.test.js +132 -0
  102. package/dockerfiles/claude-runtime/test/tasks.test.js +74 -0
  103. package/dockerfiles/claude-runtime/test/user-dir.test.js +71 -0
  104. package/dockerfiles/claude-runtime/test/verify.test.js +187 -0
  105. package/dockerfiles/claude-runtime/test/watchdog.test.js +43 -0
  106. package/dockerfiles/mcp-server/.eslintrc.json +39 -0
  107. package/dockerfiles/mcp-server/Dockerfile +10 -2
  108. package/dockerfiles/mcp-server/package-lock.json +1743 -98
  109. package/dockerfiles/mcp-server/package.json +27 -5
  110. package/dockerfiles/mcp-server/src/api-client.ts +123 -66
  111. package/dockerfiles/mcp-server/src/format.ts +51 -0
  112. package/dockerfiles/mcp-server/src/index.ts +44 -113
  113. package/dockerfiles/mcp-server/src/ops.ts +325 -0
  114. package/dockerfiles/mcp-server/src/shared-api-client.ts +81 -0
  115. package/dockerfiles/mcp-server/test/format.test.js +62 -0
  116. package/dockerfiles/mcp-server/test/ops.test.js +84 -0
  117. package/dockerfiles/mcp-server/test/shared-api-client.test.js +35 -0
  118. package/dockerfiles/queue/Dockerfile +2 -0
  119. package/dockerfiles/queue/container.json +7 -0
  120. package/docs/AUDIT-2026-08-03.md +1064 -0
  121. package/docs/BENCHMARK.md +292 -0
  122. package/docs/CLAUDE_CODE_FLOW.md +746 -0
  123. package/docs/EXAMPLES.md +82 -0
  124. package/docs/FEATURES.md +71 -0
  125. package/docs/IMPLEMENTATION.md +128 -0
  126. package/docs/LATENCY.md +170 -0
  127. package/docs/VISION.md +36 -0
  128. package/files/benchmark/suite.yaml +404 -0
  129. package/files/scripts/process-cro-results.md +14 -0
  130. package/files/suggestions.yaml +344 -0
  131. package/package.json +39 -97
  132. package/src/ai/ai-window.ts +157 -0
  133. package/src/ai/benchmark/benchmark.ts +737 -0
  134. package/src/ai/db-view-functions.ts +56 -0
  135. package/src/ai/engine.ts +98 -0
  136. package/src/ai/gemma-engine.ts +81 -0
  137. package/src/ai/panel.ts +1385 -0
  138. package/src/ai/prompt-suggestions.ts +209 -0
  139. package/src/ai/search/combined-search.ts +244 -0
  140. package/src/{llm-utils → ai/search}/query-matching.ts +46 -167
  141. package/src/{llm-utils → ai}/storage.ts +0 -1
  142. package/src/ai/table-tools.ts +145 -0
  143. package/src/ai/ui.ts +720 -0
  144. package/src/ai/usage-limiter.ts +105 -0
  145. package/src/ai/view-tools.ts +352 -0
  146. package/src/claude/ai-feature.ts +16 -0
  147. package/src/claude/exec-blocks.ts +176 -0
  148. package/src/claude/queue-task.ts +84 -0
  149. package/src/claude/runtime-client.ts +310 -0
  150. package/src/claude/turn-log.ts +114 -0
  151. package/src/claude/undoable.ts +105 -0
  152. package/src/{llm-utils → db}/db-index-tools.ts +24 -32
  153. package/src/db/sql-tools.ts +336 -0
  154. package/src/depr/LLM-client.ts +251 -0
  155. package/src/depr/ai-panel.ts +174 -0
  156. package/src/depr/chatgpt-assistant.ts +257 -0
  157. package/src/depr/creds.ts +30 -0
  158. package/src/depr/deepwikiclient.ts +118 -0
  159. package/src/depr/indexes/dg-repository-index.ts +266 -0
  160. package/src/depr/interfaces.ts +170 -0
  161. package/src/depr/is-help-request.ts +39 -0
  162. package/src/depr/prompt-engine.ts +52 -0
  163. package/src/depr/rendering-tools.ts +103 -0
  164. package/src/depr/script-tools.ts +785 -0
  165. package/src/depr/tableview-tools.ts +746 -0
  166. package/src/depr/viewers-ai.ts +67 -0
  167. package/src/package-api.ts +87 -28
  168. package/src/package-test.ts +1 -0
  169. package/src/package.g.ts +98 -48
  170. package/src/package.ts +211 -157
  171. package/src/polyfills.ts +12 -0
  172. package/src/utils.ts +128 -0
  173. package/tsconfig.json +8 -70
  174. package/webpack.config.js +3 -49
  175. package/.eslintignore +0 -2
  176. package/src/ai-panel.ts +0 -174
  177. package/src/claude-code/claude-panel.ts +0 -34
  178. package/src/claude-code/claude-runtime-client.ts +0 -148
  179. package/src/llm-utils/LLM-client.ts +0 -251
  180. package/src/llm-utils/combined-search.ts +0 -162
  181. package/src/llm-utils/creds.ts +0 -30
  182. package/src/llm-utils/deepwikiclient.ts +0 -118
  183. package/src/llm-utils/indexes/dg-repository-index.ts +0 -266
  184. package/src/llm-utils/panel.ts +0 -866
  185. package/src/llm-utils/script-tools.ts +0 -784
  186. package/src/llm-utils/sql-tools.ts +0 -840
  187. package/src/llm-utils/tableview-tools.ts +0 -704
  188. package/src/llm-utils/ui.ts +0 -315
  189. package/src/prompt-engine/chatgpt-assistant.ts +0 -257
  190. package/src/prompt-engine/interfaces.ts +0 -170
  191. package/src/prompt-engine/prompt-engine.ts +0 -52
  192. package/src/prompt-engine/rendering-tools.ts +0 -103
  193. package/src/prompts/is-help-request.ts +0 -26
  194. package/src/viewers-ai.ts +0 -67
  195. /package/src/{llm-utils → db}/indexes/biologics-index.ts +0 -0
  196. /package/src/{llm-utils → db}/indexes/chembl-index.ts +0 -0
  197. /package/src/{llm-utils → db}/query-meta-utils.ts +0 -0
  198. /package/src/{llm-utils/depr → depr}/AI-API-providers/openai-chat-completions-provider.ts +0 -0
  199. /package/src/{llm-utils/depr → depr}/AI-API-providers/openai-responses-provider.ts +0 -0
  200. /package/src/{llm-utils/depr → depr}/AI-API-providers/types.ts +0 -0
  201. /package/src/{llm-utils/depr → depr}/depr.ts +0 -0
  202. /package/src/{llm-utils/depr → depr}/embeddings.ts +0 -0
  203. /package/src/{llm-utils/depr → depr}/sql-utils.ts +0 -0
@@ -0,0 +1,395 @@
1
+ ---
2
+ name: datagrok-chem-toolkit
3
+ description: Cheminformatics toolkit catalog for small molecules. Covers RDKit/OpenChemLib calculations, descriptors, fingerprints, similarity/substructure search, R-group, MMP, scaffold tree, chemical space, MPO, reactions, and ADMET predictions. Open this skill when the user asks about computing molecular properties, comparing/searching molecules, or predicting ADMET/tox.
4
+ ---
5
+
6
+ # datagrok-chem-toolkit
7
+
8
+ Function catalog for the **structure-and-modeling** half of Datagrok cheminformatics:
9
+ Chem, Admetica.
10
+
11
+ Every function below is callable through the `datagrok_exec` tool via
12
+ `grok.functions.call('<Package>:<funcName>', {param1, param2, ...})`. For ones
13
+ exposed under a top-menu path, the path is shown so you can describe it in plain
14
+ language ("Top menu → Chem → ...").
15
+
16
+ ### Param-type conventions used below
17
+
18
+ Types match the Datagrok function declarations: `dataframe`, `column`, `string`,
19
+ `int`, `float`, `bool`, `list<T>`, `object`. A column with a required semType is
20
+ written `column<semType>` (e.g. `column<Molecule>`, `column<Macromolecule>`,
21
+ `column<numerical>`). Choices for enum-style params are listed inline as
22
+ `'a' | 'b' | 'c'`. `?` marks optional, `= x` shows the default.
23
+
24
+ ### Always emit an exec block when the intent is clear
25
+
26
+ If the user asks for a concrete chemistry action ("generate analogs", "dock these
27
+ ligands", "compute IC50", "register this compound", "what is the SMILES of
28
+ aspirin") — call `datagrok_exec` with code calling the relevant function below,
29
+ even if some args have to be guessed from context (table columns, sensible
30
+ defaults). Don't ask the user to re-state inputs you can already infer; if a
31
+ required input is genuinely missing, still emit the block with the best guess
32
+ and add a one-line note. Don't answer chemistry questions from memory when a
33
+ catalog function exists — call the function.
34
+
35
+ ---
36
+
37
+ ## Cross-package routing — "User wants X → call Y"
38
+
39
+ | User intent | Function | Package |
40
+ |---|---|---|
41
+ | Draw / depict a molecule | `Chem:drawMolecule` | Chem |
42
+ | Convert SMILES ↔ Molfile ↔ SMARTS ↔ InChI | `Chem:convertMolNotation` | Chem |
43
+ | Get InChI / InChI key | `Chem:getInchis`, `Chem:getInchiKeys` | Chem |
44
+ | Molecular formula | `Chem:getMolecularFormula` | Chem |
45
+ | Canonical SMILES | `Chem:canonicalize` | Chem |
46
+ | Validate SMILES (RDKit) | `Chem:validateMolecule`, `Chem:isSmiles`, `Chem:isSmarts` | Chem |
47
+ | Basic properties (MW, LogP, HBA, HBD, PSA, ...) | `Chem:addChemPropertiesColumns` or `Chem:getProperties` | Chem |
48
+ | Single-molecule cLogP only | `Chem:getCLogP` | Chem |
49
+ | Chemical descriptors (RDKit set) | `Chem:getDescriptors` / `Chem:chemDescriptors` | Chem |
50
+ | Toxicity risks (OCL: mutagenicity, tumorigenicity, ...) | `Chem:addChemRisksColumns` or `Chem:getToxicityRisks` | Chem |
51
+ | Structural alerts (PAINS, BMS, SureChEMBL, ...) | `Chem:structuralAlertsTopMenu` or `Chem:getStructuralAlerts` | Chem |
52
+ | Pharmacophore features (donor, acceptor, ...) | `Chem:pharmacophoreFeaturesTopMenu` | Chem |
53
+ | Morgan / RDKit / MACCS / AtomPair fingerprints | `Chem:getMorganFingerprints`, `Chem:getFingerprints` | Chem |
54
+ | Find similar molecules in a column | `Chem:findSimilar`, `Chem:callChemSimilaritySearch` | Chem |
55
+ | Tanimoto similarity matrix | `Chem:similarityMatrixTopMenu` | Chem |
56
+ | Substructure search | `Chem:searchSubstructure`, `Chem:SubstructureSearchTopMenu` | Chem |
57
+ | Chemical space 2D (UMAP / t-SNE) | `Chem:chemSpaceTopMenu` | Chem |
58
+ | Diversity picking | `Chem:callChemDiversitySearch` | Chem |
59
+ | BitBIRCH O(N) clustering | `Chem:bitbirchClusteringTopMenu` | Chem |
60
+ | Cluster MCS (most-common-substructure per cluster) | `Chem:performClusterMCS` | Chem |
61
+ | R-Group decomposition | `Chem:rGroupsAnalysisMenu`, `Chem:rGroupDecomposition` | Chem |
62
+ | Matched Molecular Pairs | `Chem:mmpAnalysis` | Chem |
63
+ | Activity cliffs | `Chem:activityCliffs` | Chem |
64
+ | Scaffold tree (hierarchical) | `Chem:getScaffoldTree`, `Chem:addScaffoldTree` | Chem |
65
+ | Elemental analysis (atom counts) | `Chem:elementalAnalysis` | Chem |
66
+ | Synthon (REAL-like) space search | `Chem:synthonSearchFunc` | Chem |
67
+ | Drug name(s) → SMILES (ibuprofen, aspirin, ...) | `Chem:namesToSmiles` (ChEMBL-backed; **needs Chembl pkg**) | Chem |
68
+ | Free text → SMILES (LLM fallback) | `Chem:freeTextToSmiles` | Chem |
69
+ | Map IDs incl. InChI key → ChEMBL, ChEMBL → DrugBank, etc. | `Chem:getMapIdentifiers` / `Chem:mapIdentifiersTransform` | Chem |
70
+ | MPO score (weighted desirability) | `Chem:mpoCalculate`, `Chem:_mpo` | Chem |
71
+ | Apply reaction SMARTS (transformation) | `Chem:transformationReactionsTopMenu` | Chem |
72
+ | Two-column reaction enumeration | `Chem:twoComponentReactionTopMenu` | Chem |
73
+ | Remove water and salts | `Chem:removeWaterAndSaltsTopMenu` | Chem |
74
+ | Deprotect (remove protecting groups) | `Chem:deprotect` | Chem |
75
+ | Recalculate 2D coordinates | `Chem:recalculateCoords` | Chem |
76
+ | Train Chemprop QSAR model | `Chem:trainChemprop` | Chem |
77
+ | Apply Chemprop QSAR model | `Chem:applyChemprop` | Chem |
78
+ | ADMET predictions (full panel) | `Admetica:getAdmeProperties` | Admetica |
79
+ | ADMET for single molecule | `Admetica:getAdmePropertiesSingle` | Admetica |
80
+ | ADMET in Hit Triage pipeline | `Admetica:admeticaHT` | Admetica |
81
+
82
+ ---
83
+
84
+ ## Calling conventions for column-based functions
85
+
86
+ Most Chem functions operate on a `DG.Column` of molecules and a parent
87
+ `DG.DataFrame`. In `datagrok_exec` code:
88
+
89
+ ```js
90
+ const mol = t.columns.bySemType(DG.SEMTYPE.MOLECULE); // first Molecule column
91
+ const res = await grok.functions.call('Chem:getProperties', { molecules: mol });
92
+ // res is a DG.DataFrame with one column per requested property
93
+ ```
94
+
95
+ Function tables below carry a **Tags** column. The values it can hold:
96
+
97
+ | Tag | Meaning |
98
+ |-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
99
+ | `vectorFunc` | Returns a `DG.DataFrame`. Usable from the Add-New-Column dialog and inside a `t.columns.addNewCalculated(name, formula)` call. Functions WITHOUT this tag cannot be embedded in a formula — call them via `grok.functions.call`. |
100
+ | `join(table)` | Output declares `action: 'join(table)'` — result columns are auto-appended to the input table. Do not also append yourself. |
101
+ | `transform` | Tagged as a data-sync transform — same behavior as the un-tagged sibling, but tracked in the project history. |
102
+ | `topMenu` | Has a Top-menu path; otherwise programmatic only. |
103
+ | `panel` | Context-panel widget — returns `DG.Widget`, shown in the right side panel. |
104
+ | `action` | Right-click / context-menu action. |
105
+
106
+ If the molecule notation is unknown, `sourceNotation: DG.chem.Notation.Unknown`
107
+ works for SMILES, SMARTS, molblock, and V3K molblock inputs.
108
+
109
+ ---
110
+
111
+ ## Chem package — RDKit/OpenChemLib core (`Chem:...`)
112
+
113
+ The flagship cheminformatics package. RDKit is the engine; OpenChemLib provides
114
+ fallback rendering and a few descriptors (logP, logS, drug-likeness, toxicity).
115
+
116
+ ### Four pitfalls to avoid
117
+
118
+ 1. **MW / LogP / LogS / HBA / HBD / PSA / Rotatable bonds / Stereo centers /
119
+ Molecule charge** are **boolean flags** on `Chem:addChemPropertiesColumns(...)`
120
+ and **strings in the `selected` list** of `Chem:getProperties(molecules, selected?)`.
121
+ No standalone `Chem:CalculateMW` / `Chem:CalculateLogP` etc. exist.
122
+ 2. **`Chem:convertMolNotation` has no `inchi`.** The `sourceNotation` /
123
+ `targetNotation` enum is `'smiles' | 'cxsmiles' | 'smarts' | 'cxsmarts' |
124
+ 'molblock' | 'v3Kmolblock'`. For InChI use `Chem:getInchis` /
125
+ `Chem:getInchiKeys`. For InChI key → ChEMBL ID, use
126
+ `Chem:getMapIdentifiers` / `Chem:mapIdentifiersTransform` (sources
127
+ include `inchi_key`, `chembl`, `pubchem`, `drugbank`, `zinc`, ...).
128
+ 3. **`Chem:namesToSmiles` is ChEMBL-backed.** It delegates to
129
+ `Chembl:namesToSmiles` and will fail if the Chembl package / DB isn't
130
+ deployed. Still pick it for any "drug name → SMILES" / list-of-names task
131
+ (aspirin, ibuprofen, caffeine, ...). Don't fall back to `Chem:freeTextToSmiles`
132
+ (LLM path, for free-form text fragments). Don't answer from memory.
133
+ 4. **Docking / generation must route to the right package.**
134
+ "Dock these ligands" → `Docking:getAutodockResults` / `Docking:runAutodock`
135
+ or `Boltz1:docking` — **never** to a `Chem:` function. "Generate analogs" /
136
+ "design new molecules" → `Reinvent4:reinvent` / `Reinvent4:reinventTopMenu`
137
+ — **not** R-group, MMP, or reaction enumeration (those operate on existing
138
+ series). Always make the `datagrok_exec` call; if a target/seed is missing,
139
+ pass a sensible default (first molecule column, first configured target).
140
+
141
+ ### Rendering & notation
142
+
143
+ Notation enum (used by `convertMolNotation`, `convertMoleculeNotation`,
144
+ `convertNotation`): `'smiles' | 'cxsmiles' | 'smarts' | 'cxsmarts' | 'molblock' | 'v3Kmolblock'`. **No `inchi`** — use `getInchis` / `getInchiKeys` instead.
145
+
146
+ | Function | Tags | What it does |
147
+ |---|---|---|
148
+ | `drawMolecule(molStr: string, w?: int, h?: int, popupMenu?: bool)` | — | Returns an `HTMLElement` of a rendered molecule. |
149
+ | `canvasMol(x: int, y: int, w: int, h: int, canvas: object, molString: string, scaffoldMolString: string, options?: object, renderingOptions?: object)` | — | Draws into an existing canvas (with optional scaffold highlight). |
150
+ | `convertMolNotation(molecule: string, sourceNotation: <notation>, targetNotation: <notation>)` | — | Returns a single string in the target notation. |
151
+ | `convertMoleculeNotation(molecule: column<Molecule>, targetNotation: <notation>, kekulize?: bool = false)` | `vectorFunc` | Notation conversion. Returns a new `DG.Column`. |
152
+ | `convertNotation(data: dataframe, molecules: column<Molecule>, targetNotation: <notation> = 'smiles', overwrite: bool = false, join: bool = true, kekulize?: bool)` | `topMenu` | Top-menu version: appends or overwrites the column. Top menu: Chem → Transform → Convert Notation. |
153
+ | `recalculateCoords(table: dataframe, molecules: column<Molecule>, method: 'OCL' \| 'CoordGen' = 'OCL', join: bool = true)` | `topMenu` | Recompute 2D layout. Top menu: Chem → Transform → Recalculate Coordinates. |
154
+ | `canonicalize(molecule: string)` | — | → canonical SMILES (string). |
155
+ | `getInchis(molecules: column<Molecule>)` / `getInchiKeys(molecules: column<Molecule>)` | `vectorFunc` | Vector InChI / InChI key. |
156
+ | `addInchisTopMenu(table: dataframe, molecules: column<Molecule>)` / `addInchisKeysTopMenu(table: dataframe, molecules: column<Molecule>)` | `topMenu` | Append as a new column. Top menu: Chem → Calculate → To InchI / To InchI Keys. |
157
+ | `getMolecularFormula(molecule: string)` | — | Hill formula string (via OCL). |
158
+ | `isSmiles(s: string)` / `isSmarts(s: string)` / `validateMolecule(s: string)` | — | RDKit-based validators. `validateMolecule` returns the RDKit error string or `null` if OK. |
159
+ | `detectSmiles(col: column, min: int)` | — | Heuristic — tags the column as `SMILES` / `Molecule` if enough cells parse. |
160
+ | `getMolFileHandler(molString)` | — | Returns a low-level molfile parser handler. |
161
+ | `getRdKitModule()` | — | Returns the raw RDKit-JS module (for advanced calls like `mol.get_descriptors()`). |
162
+ | `chemCellRenderer` / `rdKitCellRenderer` / `rdKitReactionRenderer` / `rdKitMixtureRenderer` | — | Cell renderers — call only via the grid system, not directly. |
163
+ | `editMoleculeCell(cell)` | — | Pops a sketcher dialog bound to a grid cell. |
164
+ | `openChemLibSketcher()` | — | Returns the OCL sketcher widget. |
165
+
166
+ ### Properties, descriptors, fingerprints
167
+
168
+ **Property names** for `getProperties(molecules, selected)` and equivalent flags
169
+ on `addChemPropertiesColumns`: `'MW' | 'HBA' | 'HBD' | 'LogP' | 'LogS' | 'PSA' |
170
+ 'Rotatable bonds' | 'Stereo centers' | 'Molecule charge'`. Pass them in
171
+ `selected` as a list of strings, exactly as shown.
172
+
173
+ **Fingerprint enum** (`<fp>`): `'Morgan' | 'RDKit' | 'Pattern' | 'AtomPair' | 'MACCS' | 'TopologicalTorsion'`.
174
+
175
+ **Similarity metric enum** (`<metric>`, from `BitArrayMetricsNames` in
176
+ `@datagrok-libraries/ml`): `'Tanimoto' | 'Dice' | 'Asymmetric' | 'Braun-Blanquet' | 'Cosine' | 'Kulczynski' | 'Mc-Connaughey' | 'Rogot-Goldberg' | 'Russel' | 'Sokal' | 'Hamming' | 'Euclidean BitArray'`. Default is `'Tanimoto'`.
177
+
178
+ **Toxicity risk names** for `getToxicityRisks(molecules, risks)`: `'mutagenicity' | 'tumorigenicity' | 'irritatingEffects' | 'reproductiveEffects'`.
179
+
180
+ **Structural alert rule sets** for `getStructuralAlerts(molecules, alerts)` and the per-flag args of `structuralAlertsTopMenu`: `'PAINS' | 'BMS' | 'SureChEMBL' | 'MLSMR' | 'Dundee' | 'Inpharmatica' | 'LINT' | 'Glaxo'`.
181
+
182
+ | Function | Tags | What it does |
183
+ |---|---|---|
184
+ | `addChemPropertiesColumns(table: dataframe, molecules: column<Molecule>, MW?: bool = true, HBA?: bool = false, HBD?: bool = false, logP?: bool = false, logS?: bool = false, PSA?: bool = false, rotatableBonds?: bool = false, stereoCenters?: bool = false, moleculeCharge?: bool = false)` | `topMenu` | OCL-based properties → appended as columns. Top menu: Chem → Calculate → Chemical Properties. |
185
+ | `getProperties(molecules: column<Molecule>, selected?: list<string>)` | `vectorFunc` | Vector form. `selected` is a subset of the property names above; omit/empty for all. Returns a standalone DataFrame — NOT auto-joined; append its columns to your table yourself. |
186
+ | `getCLogP(smiles: string)` | — | Single-mol Crippen logP (RDKit). |
187
+ | `getChemPropertyFunction(name: string)` | — | Returns a `(smiles) => any` closure for one property — useful for `column.applyFormula`. |
188
+ | `getDescriptors(molecules: column<Molecule>, selected?: list<string>)` | `vectorFunc` | RDKit descriptor set (via Chem docker). Returns a standalone DataFrame — NOT auto-joined; append its columns yourself. Use `chemDescriptorsTree()` for the legal `selected` names. |
189
+ | `chemDescriptors(table: dataframe, molecules: column<Molecule>, descriptors: list<string>)` | `topMenu` | Same, appended to `table`. |
190
+ | `chemDescriptorsTree()` | — | Returns the tree of available descriptor groups (for UI). |
191
+ | `descriptorsDocker()` | `topMenu` | Opens the descriptors picker dialog. Top menu: Chem → Calculate → Descriptors. |
192
+ | `calculateDescriptorsTransform(table: dataframe, molecules: column<Molecule>, selected: list<string>)` | `transform` | Same but tagged `transform` for data-sync projects. |
193
+ | `getMorganFingerprints(molColumn: column<Molecule>)` | `vectorFunc` | Returns a Column of `DG.BitSet` fingerprints. |
194
+ | `getMorganFingerprint(molString: string)` | — | Single-mol → `DG.BitSet`. |
195
+ | `getFingerprints(col: column<Molecule>, _metric?: string, fingerprintType?: <fp>)` | — | Returns `{entries, options}` for the dim-reduction preprocessor. |
196
+ | `addChemRisksColumns(table: dataframe, molecules: column<Molecule>, mutagenicity?: bool = true, tumorigenicity?: bool = false, irritatingEffects?: bool = false, reproductiveEffects?: bool = false)` | `topMenu` | OCL toxicity risk flags. Top menu: Chem → Calculate → Toxicity Risks. |
197
+ | `getToxicityRisks(molecules: column<Molecule>, risks?: list<string>)` | `vectorFunc` | Vector form. `risks` is a subset of the risk names above. Returns a standalone DataFrame — NOT auto-joined; append its columns yourself. |
198
+ | `structuralAlertsTopMenu(table: dataframe, molecules: column<Molecule>, pains: bool = true, bms: bool = false, sureChembl: bool = false, mlsmr: bool = false, dundee: bool = false, inpharmatica: bool = false, lint: bool = false, glaxo: bool = false)` | `topMenu` | Apply rule-based structural alerts. Top menu: Chem → Analyze → Structural Alerts. |
199
+ | `getStructuralAlerts(molecules: column<Molecule>, alerts?: list<string>)` | `vectorFunc` | Vector form. Returns a standalone DataFrame — NOT auto-joined; append its columns yourself. |
200
+ | `pharmacophoreFeaturesTopMenu(table: dataframe, molecules: column<Molecule>, donor: bool = true, acceptor: bool = true, hydrophobic: bool = true, aromatic: bool = true, positive: bool = false, negative: bool = false, halogenBond: bool = false)` | `topMenu` | RDKit pharmacophore family flags. Top menu: Chem → Analyze → Pharmacophore Features. |
201
+ | `biochemPropsWidget()` | `topMenu` | Opens the auto-discovery dialog for biochem calculators. Top menu: Chem → Calculate → Biochemical Properties. |
202
+
203
+ ### Similarity, diversity, substructure search
204
+
205
+ **Shorthand recap** — `<metric>` expands to the 12-value `BitArrayMetricsNames` enum defined above ("Similarity metric enum"); `<fp>` expands to the 6-value fingerprint enum ("Fingerprint enum"). Used in this section by `callChemSimilaritySearch`, `callChemDiversitySearch`, `similarityMatrixTopMenu`. The dim-reduction entries (`chemSpaceTopMenu`, `getChemSpaceEmbeddings`, `activityCliffs`) hard-narrow `<metric>` via `choices:` to the 4-value subset `'Tanimoto' | 'Asymmetric' | 'Cosine' | 'Sokal'` — those rows inline the narrowed list directly in the signature.
206
+
207
+ | Function | Tags | What it does |
208
+ |---|---|---|
209
+ | `findSimilar(molStringsColumn: column<Molecule>, molString: string, limit: int = MAX, cutoff: float = 0.0)` | — | Returns a DataFrame of the most-similar molecules (Morgan/Tanimoto). |
210
+ | `callChemSimilaritySearch(df: dataframe, col: column<Molecule>, molecule: string, metricName: <metric>, fingerprint: <fp>, limit: int, minScore: float)` | — | Underlying version with explicit metric and FP type. |
211
+ | `getSimilarities(molStringsColumn: column<Molecule>, molString: string)` | — | Returns just the similarity scores as a DataFrame. |
212
+ | `getDiversities(molStringsColumn: column<Molecule>, limit: int)` | — | DataFrame of the most-diverse molecules. |
213
+ | `callChemDiversitySearch(col: column<Molecule>, metricName: <metric>, fingerprint: <fp>, limit: int)` | — | Returns indices of diverse picks. |
214
+ | `similarityMatrixTopMenu(table: dataframe, molecules: column<Molecule>, symbols: column, fingerprintType: <fp> = 'Morgan')` | `topMenu` | Full pairwise Tanimoto matrix → opens as a new table. Top menu: Chem → Calculate → Similarity Matrix. |
215
+ | `searchSubstructure(molStringsColumn: column<Molecule>, molString: string, molBlockFailover: string)` | — | RDKit substructure search → returns a Column wrapping a BitSet of matches. |
216
+ | `SubstructureSearchTopMenu(molecules: column<Molecule>)` | `topMenu` | Opens the filter sketcher. Top menu: Chem → Search → Substructure Search. |
217
+ | `similaritySearchViewer()` / `diversitySearchViewer()` | — | Returns a `ChemSimilarityViewer` / `ChemDiversityViewer`. Add via `view.addViewer('Chem Similarity Search')`. |
218
+ | `similaritySearchTopMenu()` / `diversitySearchTopMenu()` | `topMenu` | Top menu shortcuts. Top menu: Chem → Search. |
219
+ | `sortBySimilarity(value: object)` | `action` | Right-click action that sorts the grid by similarity to the picked molecule. |
220
+ | `useAsSubstructureFilter(value: object)` | `action` | Right-click action that adds the picked molecule as a substructure filter. |
221
+ | `synthonSearchFunc(spaceName: string, molecule: string, maxHits: int = 100, searchType: 'substructure' \| 'similarity' \| 'exact', similarityCutoff?: float = 0.5, includeSynthons?: bool = false)` | — | Search in a synthon (REAL-style) chemical space. |
222
+ | `getSynthonSpacesFunc()` | — | Lists installed synthon spaces (filenames in `Chem/files/synthon-data/`). |
223
+ | `removeDuplicates(molecules: list<string>, molecule: string)` | — | Removes duplicates of `molecule` from a list. |
224
+
225
+ ### Chemical space, R-groups, MMP, activity cliffs, scaffold tree
226
+
227
+ **Dim-reduction method enum**: `'UMAP' | 't-SNE'`.
228
+ **R-group matching strategy**: `'Greedy' | 'GreedyChunks' | 'Exhaustive' | 'NoSymmetrization' | 'GA'`.
229
+ **MMP diff type**: `'delta' | 'ratio'`. **MMP activity scaling**: `'none' | 'lg' | '-lg'`.
230
+
231
+ | Function | Tags | What it does |
232
+ |---|---|---|
233
+ | `chemSpaceTopMenu(table: dataframe, molecules: column<Molecule>, methodName: 'UMAP' \| 't-SNE', similarityMetric: 'Tanimoto' \| 'Asymmetric' \| 'Cosine' \| 'Sokal' = 'Tanimoto', plotEmbeddings: bool = true, options?: object, preprocessingFunction?: func, clusterEmbeddings?: bool, clusterMCS?: bool)` | `topMenu` | Projects molecules to 2D (UMAP / t-SNE) + scatter plot. Top menu: Chem → Analyze → Chemical Space. |
234
+ | `chemSpaceTransform(...)` | `transform` | Transform-tagged version (for data-sync). |
235
+ | `getChemSpaceEmbeddings(col: column<Molecule>, methodName: 'UMAP' \| 't-SNE', similarityMetric: 'Tanimoto' \| 'Asymmetric' \| 'Cosine' \| 'Sokal', xAxis: string, yAxis: string, options?: object)` | — | Raw embedding without UI. Returns `ISequenceSpaceResult`. |
236
+ | `getChemSimilaritiesMatrix(dim: int, col: column<Molecule>, df: dataframe, colName: string, simArr: object)` | — | Internal — pairwise similarity matrix as columns. |
237
+ | `rGroupsAnalysisMenu()` | `topMenu` | Opens the R-group analysis dialog. Top menu: Chem → Analyze → R-Groups Analysis. |
238
+ | `rGroupDecomposition(df: dataframe, molColName: string, core: string, rGroupName: string, rGroupMatchingStrategy: 'Greedy' \| 'GreedyChunks' \| 'Exhaustive' \| 'NoSymmetrization' \| 'GA', onlyMatchAtRGroups?: bool)` | — | Programmatic R-group decomposition. Returns `RGroupDecompRes`. |
239
+ | `mmpAnalysis(table: dataframe, molecules: column<Molecule>, activities: list<column<numerical>>, diffTypes: list<'delta'\|'ratio'>, scalings: list<'none'\|'lg'\|'-lg'>, fragmentCutoff: float = 0.4)` | `topMenu` | Matched Molecular Pairs analysis. Top menu: Chem → Analyze → Matched Molecular Pairs. |
240
+ | `mmpViewer()` | — | Returns `MatchedMolecularPairsViewer` for manual `view.addViewer`. |
241
+ | `activityCliffs(table: dataframe, molecules: column<Molecule>, activities: column<numerical>, similarity: float = 80, methodName: 'UMAP' \| 't-SNE', similarityMetric: 'Tanimoto' \| 'Asymmetric' \| 'Cosine' \| 'Sokal', preprocessingFunction?: func, options?: object, isDemo?: bool, isTest?: bool)` | `topMenu` | Finds pairs of similar molecules with large activity differences. Top menu: Chem → Analyze → Activity Cliffs. |
242
+ | `addScaffoldTree()` | `topMenu` | Adds a `ScaffoldTreeViewer` to the current view. Top menu: Chem → Analyze → Scaffold Tree. |
243
+ | `scaffoldTreeViewer()` | — | Returns `ScaffoldTreeViewer` for manual use. |
244
+ | `scaffoldTreeFilter()` | — | Returns `ScaffoldTreeFilter`. |
245
+ | `getScaffoldTree(data: dataframe, ringCutoff: int = 10, dischargeAndDeradicalize: bool = false)` | — | Returns the scaffold tree as a JSON string. |
246
+ | `substructureFilter()` | — | Returns an RDKit-based `SubstructureFilter`. |
247
+ | `bitbirchClusteringTopMenu(table: dataframe, molecules: column<Molecule>, threshold: float = 0.65, fingerprintType: 'Morgan' \| 'RDKit' \| 'Pattern' \| 'AtomPair' \| 'MACCS' \| 'TopologicalTorsion' = 'Morgan')` | `topMenu` | O(N) BitBIRCH clustering → cluster ID column. Top menu: Chem → Calculate → BitBIRCH Clustering. |
248
+ | `clusterMCSTopMenu(table: dataframe, molCol: column<Molecule>, clusterCol: column)` | `topMenu` | Most-common substructure per cluster → appends MCS column. Top menu: Chem → Calculate → Cluster MCS. |
249
+ | `performClusterMCS(molCol: column<Molecule>, clusterCol: column)` | `vectorFunc` | Vector form. |
250
+ | `elementalAnalysis(table: dataframe, molecules: column<Molecule>, radarViewer: bool = false, radarGrid: bool = false)` | `topMenu` | Adds atom-count columns; optional radar viewer. Top menu: Chem → Analyze → Elemental Analysis. |
251
+ | `runElementalAnalysis(table: dataframe, molecules: column<Molecule>)` | `transform` | Returns the list of added column names. |
252
+
253
+ ### MPO, identifiers, reactions
254
+
255
+ **MPO aggregation enum** (`WEIGHTED_AGGREGATIONS_LIST`): `'Average' | 'Sum' | 'Product' | 'Geomean' | 'Min' | 'Max'`.
256
+
257
+ **Identifier source enum** for `mapIdentifiersTransform(fromSource, toSource)` — non-exhaustive: `'smiles' | 'inchi' | 'inchi_key' | 'chembl' | 'pubchem' | 'drugbank' | 'pdb' | 'zinc' | 'chebi' | 'kegg_ligand' | 'hmdb' | 'drugcentral' | 'surechembl' | 'bindingdb' | 'fdasrs' | 'lipidmaps' | 'mcule' | 'gtopdb'` (full list ≈ 35 UniChem sources). The catalog's standard reverse-lookup path (e.g. **InChI key → ChEMBL ID**) is `mapIdentifiersTransform(table, molecules, 'inchi_key', 'chembl')`.
258
+
259
+ | Function | Tags | What it does |
260
+ |---|---|---|
261
+ | `_mpo()` | `topMenu` | Opens the MPO Score dialog. Top menu: Chem → Calculate → MPO Score. |
262
+ | `mpoCalculate(df: dataframe, columns: list<column>, profileName: string, aggregation: 'Average' \| 'Sum' \| 'Product' \| 'Geomean' \| 'Min' \| 'Max', createDesirabilityColumns: bool = false)` | — | Computes MPO score + optional per-property desirability columns. |
263
+ | `mpoTransformFunction(df: dataframe, profileName: string, aggregation: 'Average' \| 'Sum' \| 'Product' \| 'Geomean' \| 'Min' \| 'Max', currentProperties: string, silent: bool = false)` | `transform` | Wrapper used by data-sync. |
264
+ | `mpoProfilesApp(path?: string)` | — | Opens the MPO Profiles app. |
265
+ | `getMapIdentifiers()` | `topMenu` | Opens the ID-mapping dialog. Top menu: Chem → Calculate → Map Identifiers. |
266
+ | `mapIdentifiersTransform(table: dataframe, molecules: column<Molecule>, fromSource: <id-source>, toSource: <id-source>)` | `transform` | Appends a column with mapped IDs. **This is also the right entry for "InChI key → ChEMBL ID" and similar reverse lookups** (chemblIdToSmilesTs goes only ID→SMILES, never the reverse). |
267
+ | `freeTextToSmiles(molfile: string)` | — | LLM-backed: parses free text into SMILES. Returns `string \| null`. Use only when names aren't clean enough for `namesToSmiles`. |
268
+ | `namesToSmiles(data: dataframe, names: column<string>)` | `topMenu` | Looks up compound names → canonical SMILES via ChEMBL. **Requires the Chembl package + ChEMBL DB.** Use for any "drug name → SMILES" task (aspirin, ibuprofen, caffeine, ...) — wrap the list of names in a `DG.Column.fromStrings(...)` and call. Top menu: Chem → Transform → Names To Smiles. |
269
+ | `deprotect(table: dataframe, molecules: column<Molecule>, fragment: string)` | `topMenu` | Removes the drawn fragment as a protecting group. Top menu: Chem → Transform → Reactions → Deprotect. |
270
+ | `removeWaterAndSaltsTopMenu(table: dataframe, molecules: column<Molecule>)` | `topMenu` | Strip water/salts. Top menu: Chem → Transform → Reactions → Remove Water and Salts. |
271
+ | `transformationReactionsTopMenu()` | `topMenu` | Run reaction SMARTS over a column of reactants. Top menu: Chem → Transform → Reactions → Transformation. |
272
+ | `twoComponentReactionTopMenu()` | `topMenu` | Cross-product reaction between two columns. Top menu: Chem → Transform → Reactions → Two-Component Reaction. |
273
+ | `transformationReactionsApp() / twoComponentReactionsApp()` | — | App entry points (browsePath `Chem | Reactions`). |
274
+ | `reactionEnumeratorApp()` | — | Forward-reaction library enumeration over building blocks + SMARTS. |
275
+ | `beautifyMols(mols: list<string>)` | `vectorFunc` | Returns clean V3K molblocks. |
276
+ | `convertToV3KViaOCL(mols: list<string>)` | — | OCL-based V2K → V3K conversion. |
277
+ | `convertMolNotationAction(col: column<Molecule>)` | `action` | Right-click action wired to `convertNotation`. |
278
+ | `convertMixtureToSmiles(col: column)` | `action` | Right-click action for `ChemicalMixture` columns. |
279
+ | `copyAsAction(value: object)` / `copyAsSmiles` / `copyAsMolfileV2000` / `copyAsMolfileV3000` / `copyAsSmarts` / `copyAsImage` | `action` | Right-click "Copy as ..." actions. |
280
+
281
+ ### File I/O
282
+
283
+ | Function | Tags | What it does |
284
+ |---|---|---|
285
+ | `importSdf(bytes)` | — | SDF / MOL → DataFrames. Registered as fileHandler for `.sdf`, `.mol`. |
286
+ | `importSmi(bytes)` | — | SMI file handler. |
287
+ | `importMol2(bytes)` | — | Tripos MOL2 file handler. |
288
+ | `importMol(content)` | — | Single MOL file (string). |
289
+ | `saveAsSdf()` | — | Export current table as SDF. File exporter: "As SDF…". |
290
+
291
+ ### Chemprop QSAR (deep learning)
292
+
293
+ | Function | Tags | What it does |
294
+ |---|---|---|
295
+ | `trainChemprop(df: dataframe, predictColumn: column, dataset_type: 'regression' \| 'classification' = 'regression', /* +22 more snake_case args */)` | — | Trains a Chemprop MPN model via the `chem-chemprop` Docker container. Returns the model blob. |
296
+ | `applyChemprop(df: dataframe, model: dynamic)` | — | Applies a saved Chemprop model → DataFrame with `outcome` column. |
297
+ | `isApplicableNN(df: dataframe, predictColumn: column)` / `isInteractiveNN(df: dataframe, predictColumn: column)` | — | ML framework hooks (not called directly). |
298
+
299
+ `trainChemprop` has 25 **snake_case** params total (`dataset_type`, `metric`,
300
+ `multiclass_num_classes`, `num_folds`, `data_seed`, `split_sizes`, `split_type`,
301
+ `activation`, `atom_messages`, `message_bias`, `ensemble_size`,
302
+ `message_hidden_dim`, `depth`, `dropout`, `ffn_hidden_dim`, `ffn_num_layers`,
303
+ `epochs` (default `50`), `batch_size` (default `64`), `warmup_epochs`,
304
+ `init_lr`, `max_lr`, `final_lr`, `no_descriptor_scaling`, ...). Pass at least
305
+ `predictColumn`, `dataset_type`, and `epochs`.
306
+
307
+ **Chemprop enum-constrained params** (from `choices:` decorators in source):
308
+ - `dataset_type`: `'regression' | 'classification'` (default `'regression'`)
309
+ - `metric`: `'mse' | 'mae' | 'rmse' | 'bounded-mse' | 'bounded-mae' | 'bounded-rmse' | 'r2' | 'binary-mcc' | 'multiclass-mcc' | 'roc' | 'prc' | 'accuracy' | 'f1'` (default `'rmse'`)
310
+ - `split_type`: `'random' | 'scaffold_balanced' | 'cv' | 'cv_no_val' | 'kennard_stone' | 'kmeans' | 'random_with_repeated_smiles'` (default `'random'`)
311
+ - `activation`: `'ReLU' | 'LeakyReLU' | 'PReLU' | 'tanh' | 'SELU' | 'ELU'` (default `'ReLU'`)
312
+
313
+ For the full numeric-default schema, use the MCP `datagrok_functions(op:"get", args:{id:'Chem:trainChemprop'})`
314
+ call before invoking — don't guess param names.
315
+
316
+ ### Panels (context-panel widgets — show in the right-side panel when a molecule cell is selected)
317
+
318
+ Useful to call via `datagrok_exec` when you want to render a panel
319
+ inline. All return `DG.Widget`.
320
+
321
+ All entries below have the `panel` tag.
322
+
323
+ | Panel | What |
324
+ |---|---|
325
+ | `properties(smiles)` | "Chemistry \| Properties" |
326
+ | `descriptorsWidget(smiles)` | "Chemistry \| Descriptors" |
327
+ | `structure2d(molecule)` / `structure3D(molecule)` | "Structure \| 2D Structure" / "Structure \| 3D Structure" |
328
+ | `identifiers(smiles)` | "Structure \| Identifiers" |
329
+ | `drugLikeness(smiles)` | "Biology \| Drug Likeness" |
330
+ | `toxicity(smiles)` | "Biology \| Toxicity" |
331
+ | `structuralAlerts(smiles)` | "Biology \| Structural Alerts" |
332
+ | `pharmacophoreFeatures(smiles)` | "Biology \| Pharmacophore Features" |
333
+ | `mpoWidget(semValue)` | "Chemistry \| MPO" |
334
+ | `mixtureWidget(mixture)` / `mixtureTreeWidget(mixture)` | "Chemistry \| Mixture" / "MixtureTree" |
335
+ | `molColumnPropertyPanel(molColumn)` / `molColumnHighlights(molColumn)` | Rendering / highlighting options for a Molecule column. |
336
+ | `synthonSubstructureSearchWidget(molecule)` / `synthonSimilaritySearchWidget(molecule)` | Synthon space search panels. |
337
+
338
+ ### Demos (each opens a tutorial layout — use only on user request)
339
+
340
+ `demoSimilarityDiversitySearch` (Demo Similarity Search), `demoMMPA` (Demo
341
+ Matched Molecular Pairs), `demoRgroupAnalysis` (Demo R Group Analysis),
342
+ `demoMoleculeActivityCliffs` (Demo Activity Cliffs), `demoChemicalSpace` (Demo
343
+ Chemical Space), `demoScaffold` (Demo Scaffold Tree).
344
+
345
+ ### Skipped on purpose (do not advertise to the user)
346
+
347
+ - `init`, `initChemAutostart` — package init lifecycle, runs automatically.
348
+ - Internal helpers: `getContainer`, `getChempropError`, `trainModelChemprop`,
349
+ `applyModelChemprop` (used internally by `trainChemprop` / `applyChemprop`).
350
+ - Editors: `SearchSubstructureEditor`, `ChemSpaceEditor`, `ActivityCliffsEditor`,
351
+ `MMPEditor`, `DeprotectEditor`, `mpoProfileEditor` — invoked by the framework.
352
+ - `mpoProfilesAppTreeBrowser`, `checkJsonMpoProfile` — UI plumbing.
353
+
354
+ ---
355
+
356
+ ## Admetica package — ADMET predictions (`Admetica:...`)
357
+
358
+ Docker-backed ADMET model panel covering Absorption, Distribution, Metabolism,
359
+ Excretion, and Toxicity endpoints.
360
+
361
+ **ADMET category enum** for `getModels(property)`: `'Absorption' | 'Distribution' | 'Metabolism' | 'Excretion' | 'Toxicity'` (or omit for all).
362
+
363
+ | Function | Tags | What it does |
364
+ |---|---|---|
365
+ | `getModels(property?: 'Absorption' \| 'Distribution' \| 'Metabolism' \| 'Excretion' \| 'Toxicity')` | — | Lists available endpoints. |
366
+ | `getAdmeProperties(table: dataframe, molecules: column<Molecule>, props?: list<string>)` | `vectorFunc`, `join(table)` | **Main entry point.** Predicts ADMET for a column → returns a DataFrame appended to `table`. `props` is a list of model names from `getModels()`; omit for all. |
367
+ | `getAdmePropertiesSingle(molecule: string)` | — | One molecule → DataFrame of ADMET predictions. |
368
+ | `admeticaMenu(table: dataframe, molecules: column<Molecule>, template: string, models: list<string>, addPiechart: bool, addForm: bool)` | `topMenu` | Same as `getAdmeProperties` but with optional pie-chart and form viewers. Top menu: Chem → Admetica → Calculate. |
369
+ | `admeticaHT(table: dataframe, molecules: column<Molecule>, absorption: list<string>, distribution: list<string>, metabolism: list<string>, excretion: list<string>)` | — | Hit Triage variant — pass per-category model lists (each from `getModels('<Category>')`). |
370
+ | `admeticaWidget(semValue: object)` | `panel` | Per-molecule context panel: "Biology \| Admetica". |
371
+ | `runAdmeticaApplication() / admeticaDemo()` | — | Opens the Admetica app / demo (browsePath `Chem`). |
372
+
373
+ Skipped: `info` (debug), `AdmeticaEditor` (UI editor).
374
+
375
+ ---
376
+
377
+ ## Out of scope
378
+
379
+ Generative chemistry (Reinvent4), molecular docking (Docking / Boltz1) are intentionally NOT covered by this catalog. Open the matching skill directly if the user asks for those — they're available as registered functions but not described here.
380
+
381
+ ---
382
+
383
+ ## Companion data-side catalog
384
+
385
+ For ChEMBL, MolTrack, HitTriage, and Curves (compound registration, hit triage
386
+ workflows, dose-response analysis, bioactivity DBs), see the sibling skill
387
+ **`datagrok-chem-data`**.
388
+
389
+ ## Generic compute / simulation
390
+
391
+ The `Compute` package exists but contains no small-molecule-specific functions
392
+ — it provides the `RichFunctionView` and `Pipeline` scaffolding plus
393
+ non-cheminformatics demo scripts (Lorenz attractor, Newton cooling, Lotka-
394
+ Volterra, antibody Fab-arm exchange). Skip it unless the user asks for the
395
+ RichFunctionView UI shell or compute pipeline framework.