Skip to content
cccskills
FreePublished on GitHub

datagrok-chem-data

Bioactivity and small-molecule data-side catalog. Covers ChEMBL search/lookup, MolTrack compound and batch registration, HitTriage / HitDesign / PeptiHit workflows, and Curves dose-response analysis (IC50/EC50 fitting). Open this skill when the user asks about querying ChEMBL, registering or looking up compounds in MolTrack, running a hit-triage campaign, or fitting/inspecting dose-response curves.

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md19.5 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

datagrok-chem-data

Function catalog for the data and workflow half of Datagrok cheminformatics: Chembl, MolTrack, HitTriage, Curves.

All functions are callable through the datagrok_exec tool via grok.functions.call('<Package>:<funcName>', {param1, param2, ...}). For the data-side packages, results are usually DG.DataFrame objects produced by SQL queries or by Docker services (MolTrack).

For the structure-and-modeling side (Chem, Admetica, Reinvent4, Docking, Boltz1), see the sibling skill datagrok-chem-toolkit.

Param-type conventions used below

Types match Datagrok function declarations: dataframe, column, string, int, float, bool, list<T>, object. A column with a required semType is written column<semType> (e.g. column<Molecule>). Enum values are listed inline as 'a' | 'b' | 'c'. ? marks optional, = x shows the default.

Namespace casing

The package is referenced as Chembl: in grok.functions.call(...) and grok.data.query(...). It's branded as "ChEMBL" in UI text, but the function namespace is namespace-exact lowercase-after-first-letter: Chembl:foo, never ChEMBL:foo or chembl:foo.

Always emit an exec block when the intent is clear

If the user asks for a concrete data-side action ("register this compound", "fit IC50 from this data", "what is the SMILES of aspirin", "list ChEMBL compounds for organism X") — call datagrok_exec with code calling the relevant function below. Don't answer chemistry/data questions from memory when a catalog function exists. If a required input (SMILES, payload, mapping JSON) is missing, emit the block with a clearly-marked placeholder or sensible default and add a one-line note — don't bail out into a conversational reply.

Tag legend (used in function tables below)

Same tags as datagrok-chem-toolkit's "Calling conventions" section, plus a few data-side specific ones. Common values that appear in the Tags column:

TagMeaning
vectorFuncReturns a DG.DataFrame. Usable inside a t.columns.addNewCalculated(name, formula) call and the Add-New-Column dialog. Without it, call via grok.functions.call.
transformTagged as a data-sync transform — same behavior as the un-tagged sibling but tracked in project history.
topMenuHas a Top-menu path.
app / appTreeBrowserApp entry point / its tree-browser sidebar hook.
panelContext-panel widget — DG.Widget shown in the right side panel.
demoDemo function — opens a tutorial layout.
fileViewer / fileHandlerRegistered for a specific file extension.
cellRendererCustom cell renderer.
converterType converter (meta.role: 'converter' with an inputRegexp).
curveConverterCurves package — registers a curve-format converter (3dx, compact-dr, pzfx).
hitTriageDataSource / pepTriageDataSourceHitTriage / PepTriage data source registered for the campaign-ingest picker.

Cross-package routing — "User wants X → call Y"

User intentFunctionPackage
ChEMBL substructure searchChembl:chemblSubstructureSearchPanel (panel) or query Chembl:patternSubstructureSearchChembl
ChEMBL similarity searchChembl:chemblSimilaritySearchPanel (panel) or query Chembl:patternSimilaritySearchChembl
ChEMBL ID → SMILESChembl:chemblIdToSmilesTsChembl
Get ChEMBL molregno for SMILESChembl:chemblMolregnoChembl
Pull ChEMBL compounds by organismChembl:getChemblCompoundsByOrganismChembl
Open MolTrackMolTrack:molTrackAppMolTrack
Register one compound / batchMolTrack:registerMolTrackProperties (props), MolTrack:registerBulk (bulk CSV)MolTrack
Look up compound by corporate IDMolTrack:getCompoundByCorporateIdMolTrack
Look up batch by corporate IDMolTrack:getBatchByCorporateIdMolTrack
Advanced compound search with structured filterMolTrack:advancedSearchMolTrack
Generic entity search (compounds / batches / assays / runs / results)MolTrack:searchMolTrack
List compound / batch / assay schemaMolTrack:fetchCompoundProperties, MolTrack:fetchBatchProperties, MolTrack:fetchSchema, MolTrack:fetchDirectSchemaMolTrack
Register assay / assay resultsMolTrack:registerAssaysMolTrack
Retrieve all entities of a scopeMolTrack:retrieveEntityMolTrack
Start a Hit Triage campaignHitTriage:hitTriageAppHitTriage
Start a Hit Design campaignHitTriage:hitDesignAppHitTriage
Start a PeptiHit campaignHitTriage:peptiHitAppHitTriage
Get demo molecule dataset (100 / 5000 / N)HitTriage:demoFileIngest, HitTriage:demoFileIngest1, HitTriage:demoFileIngest2HitTriage
Convert raw plate readouts into fit-curve cellsCurves:dataToCurves or Curves:dataToCurvesTopMenuCurves
Compute IC50 / Hill / AUC / Top / Bottom from dose-response dataCurves:dataToCurves (fit) → Curves:addStatisticsColumn (extract)Curves
Pull a stat from existing fit cellsCurves:addStatisticsColumnCurves
Aggregate fit stats across seriesCurves:addAggrStatisticsColumnCurves
Open a .pzfx GraphPad Prism fileCurves:previewPzfxCurves
Compute Minimum Significant Ratioscript Curves:CalculateMSR (see Curves Scripts)Curves

Chembl package — local ChEMBL search and lookup (Chembl:...)

Thin TS layer over SQL queries against a local ChEMBL PostgreSQL connection. The heavy lifting is in Chembl/queries/ — these TS functions just expose useful entry points.

Programmatic functions

FunctionTagsWhat it does
chemblIdToSmilesTs(id: string = 'CHEMBL1185')converterCHEMBL ID (e.g. 'CHEMBL1185') → canonical SMILES. Registered as a converter for the (CHEMBL[0-9]+) regex — string fields auto-resolve. Only goes ID → SMILES; for InChI key / other-ID → ChEMBL ID, use Chem:mapIdentifiersTransform from the toolkit skill.
chemblMolregno(table: dataframe, molecules: column<Molecule>)—Appends a CHEMBL molregno column to the table by looking up each SMILES in the ChEMBL DB.
getChemblCompoundsByOrganism(maxNumberOfMolecules: int = 1000, organism: string = 'Shigella')hitTriageDataSourcePulls compounds active against targets of the given organism. Returns DataFrame.
getChemblCompounds(maxNumberOfMolecules: int = 1000)hitTriageDataSourcePulls a generic ChEMBL compound sample.
namesToSmiles(names: list<string>) (SQL query)—The underlying SQL query that powers Chem:namesToSmiles. Returns a DataFrame with a canonical_smiles column. Invoke via grok.functions.call('Chembl:namesToSmiles', {names: ['aspirin','ibuprofen',...]}) or via grok.data.query.

Panels (context-panel widgets)

All entries below have the panel tag.

PanelWhat
chemblSubstructureSearchPanel(mol)"Databases | ChEMBL | Substructure Search (Internal)".
chemblSimilaritySearchPanel(mol)"Databases | ChEMBL | Similarity Search (Internal)".
chemblSearchWidgetLocalDb(mol: string, substructure: bool = false)The underlying widget — call directly to embed in custom UI.

Demos

demoDatabasesChembl() — opens the "Database Queries" demo. Top menu: Cheminformatics → Database Queries.

Skipped

  • init — registers the CHEMBL ID handler at startup.

MolTrack package — small-molecule registration system (MolTrack:...)

Docker-backed compound and batch registration with dynamic properties, assay schema, and a structured search DSL. Backed by the moltrack Docker container and a moltrack PostgreSQL connection.

Entity scope enum (used by registerBulk, search, retrieveEntity): 'compounds' | 'batches' | 'assays' | 'assay_runs' | 'assay_results'.

App and views

FunctionTagsWhat it does
molTrackApp(path?: string)appOpens the MolTrack app. path (URL) routes to sub-views: 'Compound' | 'Batch' | 'Register' | 'Search' | 'Saved Searches' | 'Bulk' | 'Assay' | 'Schema'. URL params corporate_compound_id / corporate_batch_id jump to a specific entity. browsePath Chem.
molTrackAppTreeBrowser(appNode: object, browseView: object)appTreeBrowserWires the tree-browser sidebar (auto).
initDB()—Initializes all MolTrack schemas + assay data — call once after first deploy.

Lookups and metadata

FunctionTagsWhat it does
getCompoundByCorporateId(corporateValue: string)—Compound JSON by corporate compound ID.
getBatchByCorporateId(corporateValue: string)—Batch JSON by corporate batch ID.
fetchCompoundProperties() / fetchBatchProperties()—JSON describing all properties for the compound / batch scope. Cached monthly.
fetchSchema()—JSON of all dynamic fields.
fetchDirectSchema()—JSON of all static (direct-table-column) fields.

Registration

FunctionTagsWhat it does
registerMolTrackProperties(jsonPayload: string)—Registers compound/batch property definitions. jsonPayload is a JSON string defining fields name, value_type, entity_type, nullable, etc.
registerAssays(assayPayload: string)—Register assay schema (JSON string with name, properties, result types).
registerBulk(csvFile: file, scope: 'compounds' | 'batches' | 'assays' | 'assay_runs' | 'assay_results', mapping: string, errorHandling: 'reject_all' | 'reject_row')—Bulk-register rows from CSV. mapping is a JSON string { csvColumn: moltrackProperty }. errorHandling: 'reject_all' aborts on any invalid row; 'reject_row' skips.

For "register this compound" intent: even if the payload isn't fully spelled out, emit an exec block that calls MolTrack:registerMolTrackProperties with a placeholder jsonPayload string (e.g. {"name":"...","value_type":"...","entity_type":"compound","nullable":false}) or MolTrack:registerBulk with a placeholder CSV/mapping. Do NOT bail into a conversational reply — surface the function call with TODOs.

Search

FunctionTagsWhat it does
search(query: string, entityEndpoint: 'compounds' | 'batches' | 'assays' | 'assay_runs' | 'assay_results')—Generic search — query is a JSON string with level, output, filter, output_format.
advancedSearch(outputFields: list<string>, filter: object)—Most useful programmatic entry. Returns a DataFrame of compounds. outputFields are fully-qualified (compounds.canonical_smiles, compounds.details.<dynamic_prop>). filter is a structured boolean tree. Operators: string '=' | '!=' | 'IN' | 'STARTS WITH' | 'ENDS WITH' | 'LIKE' | 'CONTAINS'; numeric '<' | '>' | '<=' | '>=' | 'RANGE'; datetime 'BEFORE' | 'AFTER' | 'ON'; molecular (only for compounds.structure) 'IS SIMILAR' (needs threshold), 'IS SUBSTRUCTURE OF', 'HAS SUBSTRUCTURE'. Compose with {operator: 'AND' | 'OR', conditions: [...]}.
retrieveEntity(scope: 'compounds' | 'batches' | 'assays' | 'assay_runs' | 'assay_results')—Returns all entities of a scope as a flattened DataFrame.
getMoltrackPropPanelById(id: semantic_value<Grok ID>)panel"Databases | MolTrack" context panel for a Grok ID cell.

Skipped

  • init — bootstraps MolTrack queries, semantic types, and schema once per session.

Queries shipped in queries/

  • setup.sql — schema-init queries; called via init (checkDBInitialized, etc.).
  • search.sql — backing query used by the search UI.

HitTriage package — small-mol hit triage workflows (HitTriage:...)

Multi-step campaign apps for triaging hits, designing new molecules, and the peptide-flavored variants.

Apps (each returns a DG.ViewBase)

All entries below have the app tag.

FunctionWhat it does
hitTriageApp()Hit Triage — end-to-end small-mol triage pipeline. browsePath Chem.
hitDesignApp()Hit Design — design + score new analogs. browsePath Chem.
peptiHitApp()PeptiHit — peptide variant. Internally inits Bio. browsePath Peptides.
pepTriageApp()PepTriage — peptide triage. Internally inits Bio. browsePath Peptides.

Tree-browser hooks (auto-registered)

hitTriageAppTreeBrowser, hitDesignAppTreeBrowser, peptiHitAppTreeBrowser, pepTriageAppTreeBrowser — populate the campaigns tree in the sidebar.

Demo data sources

FunctionTagsWhat it does
demoFileIngest()hitTriageDataSource100-molecule demo dataset.
demoFileIngest1()hitTriageDataSource5000-molecule demo dataset.
demoFileIngest2(numberOfMolecules: int)hitTriageDataSourceVariable-size demo dataset.
demoPeptideSequences(peptideCount: int)pepTriageDataSourceDemo HELM peptide sequences for PeptiHit.
demoFileSubmit(df: dataframe, molecules: string)—Demo submit handler (logs row count).

Misc

FunctionTagsWhat it does
registerMoleculesToViD()—Pushes all campaign molecules into MolTrack-managed ViD.
hitDesignVidPanel(vid: semantic_value<HIT_DESIGN_VID>)panel"Hit Design V-iD" context panel — shows campaigns for a V-iD.
gasteigerCellRenderer()cellRendererPNG cell renderer for Gasteiger charge images.
htPackageSettingEditor(propList: object)—Hit Triage package settings editor (UI).

Skipped (UI plumbing)

Tree-browser callbacks above are not invoked directly by user code.

Queries shipped in queries/

  • locks.sql — concurrency / lock tracking queries.
  • vid.sql — campaign V-iD lookups: getCampaignsByVid, getMoleculeByVid (used by the hitDesignVidPanel panel).

Curves package — dose-response curves (Curves:...)

Stores curve data in a single cell (one DG.Column of fit chart JSON) and renders it as a per-cell curve. Includes converters from XML 3DX, compact-DR, and GraphPad Prism .pzfx formats.

Fit-statistic property enum (used by addStatisticsColumn and addAggrStatisticsColumn's propName): keys from the curve FitStatistics type — 'rSquared' | 'auc' | 'interceptX' | 'interceptY' | 'slope' | 'top' | 'bottom'. (IC50 corresponds to interceptX for the standard 50% intercept; aliases like 'IC50' / 'Hill' / 'AUC' are recognised at the UI/sigmoid layer but the canonical key is interceptX — a key outside this enum yields an all-null column with no error.)

Building and inspecting curves

FunctionTagsWhat it does
dataToCurves(df: dataframe, concentrationCol: column<numerical>, readoutCol: column<numerical>, batchIDCol: column, assayCol: column, runIDCol: column, compoundIDCol: column, targetEntityCol: column, excludeOutliersCol?: column, parentTable?: dataframe, fitParamColumns?: list<string>, reportedIC50Column?: string, reportedQualifiedIC50Column?: string, experimentIDColumn?: string, qualifierColumn?: string, additionalColumns?: list<string>, wellLevelJoinCol?: string, parentLevelJoinCol?: string, wellLevelAdditionalColumns?: list<string>)—Main programmatic entry. Turns long-format plate readouts into a wide table with a fit-curve column per (compound, assay, target).
dataToCurvesTopMenu()topMenuUI wrapper around dataToCurves. Top menu: Data → Curves → Data to Curves.
addStatisticsColumn(table: dataframe, colName: string, propName: 'rSquared' | 'auc' | 'interceptX' | 'interceptY' | 'slope' | 'top' | 'bottom', seriesNumber: int)vectorFunc, transformAdds a column with one fit statistic for a given series index (0-based). propName is a key of the FitStatistics type — IC50 is the standard 50% intercept (interceptX).
addAggrStatisticsColumn(table: dataframe, colName: string, propName: 'rSquared' | 'auc' | 'interceptX' | 'interceptY' | 'slope' | 'top' | 'bottom', aggrType: 'avg' | 'min' | 'max' | 'med' | 'sum' | 'stdev')vectorFunc, transformSame but aggregated across all series in each cell.

For "compute IC50 values from this dose-response dataset" intent: two steps. (1) Fit: Curves:dataToCurves(t, concCol, readoutCol, batchCol, assayCol, runCol, compoundCol, targetCol) — guess the columns from the current table (concentration/dose, readout/response, compound/batch IDs). (2) Extract: Curves:addStatisticsColumn(fitTable, 'fit', 'interceptX', 0) to pull IC50 from series 0. Always make both calls back-to-back; never reply conversationally for an IC50 request.

Demos

curveFitDemo() — generic curve-fit demo. assayCurveFitDemo() — multi-compound assay-curve dashboard.

Curve format converters

All entries below have the curveConverter tag.

FunctionFormat
convertXmlCurveToJsonFunc3dx XML curves
convertCompactDrToJsonFunccompact-dr JSON
convertPzfxToJsonFuncGraphPad Prism .pzfx

File handlers

FunctionTagsWhat it does
previewPzfx(file: file)fileViewerOpens .pzfx as a curve grid.
pzfxFileHandler(bytes: list<int>)fileHandlerParses .pzfx → list of DataFrames.

Skipped (lifecycle)

  • _initCurves — registers handlers + external converters.

Scripts shipped in scripts/

  • CalculateMSR (Python) — Minimum Significant Ratio for assay reproducibility. Callable as grok.functions.call('Curves:CalculateMSR', { ... }) once you know its inputs (open the script to see the #input: header).

Note on Compute package

The Compute package has no small-molecule-specific functions or scripts. Its package.ts exposes the RichFunctionView, Pipeline, validators, and uploaders for the compute-utils framework; its scripts/ are physics / dynamics demos (Lorenz attractor, Lotka-Volterra, Newton cooling, antibody Fab-arm exchange, maximal-filter-volume in R, bioreactor utilities). If a small-molecule task seems to need Compute, you almost certainly want a different package — usually one of the ones cataloged here or in datagrok-chem-toolkit.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Add support for a new curve data format in the Curves package converter system

The English summary is being prepared. Showing the original description.

datagrok-ai/public74Updated Oct 20, 2026

Create info panels that appear in the context panel based on semantic types

The English summary is being prepared. Showing the original description.

datagrok-ai/public74Updated Oct 20, 2026

Add a new single-objective optimization algorithm to the sci-comp library. Use when the user asks to implement a new optimizer (e.g. gradient descent, BFGS, simulated annealing, differential evolution).

The English summary is being prepared. Showing the original description.

datagrok-ai/public74Updated Oct 20, 2026

Add unit tests to a Datagrok package

The English summary is being prepared. Showing the original description.

datagrok-ai/public74Updated Oct 20, 2026

Answer a "how do I …" question about the platform with a Gherkin scenario on @datagrok-libraries/bdd that is filmed into a how-to video (grok-bdd guide), so the answer is demonstrated, sent as a video plus numbered steps, and kept as a regression test; the same scenarios, filmed in help mode, are the GIFs of the help pages

The English summary is being prepared. Showing the original description.

datagrok-ai/public74Updated Oct 20, 2026

Translate hand-written Playwright specs (or any existing UI tests) into Gherkin features on @datagrok-libraries/bdd, then prove the features test what they claim by backward-matching them against the originals with independent reviewers, and fix the gaps in the core, the library and the features

The English summary is being prepared. Showing the original description.

datagrok-ai/public74Updated Oct 20, 2026

See all skills by datagrok-ai

Report a problem with this skill