Namespace: chem
dg.chem
Cheminformatics-related routines
Enumerations
Classes
Variables
CHEM_FILTER_ALIGN
• Const
CHEM_FILTER_ALIGN: "align"
Defined in
CHEM_FILTER_HIGHLIGHT
• Const
CHEM_FILTER_HIGHLIGHT: "highlight"
Defined in
FILTER_KEY
• Const
FILTER_KEY: "chem-filter"
Defined in
KEY
• Const
KEY: "selected"
Defined in
SKETCHER_LOCAL_STORAGE
• SKETCHER_LOCAL_STORAGE: string
= 'sketcher'
Defined in
STORAGE_NAME
• Const
STORAGE_NAME: "sketcher"
Defined in
currentSketcherType
• currentSketcherType: string
= DEFAULT_SKETCHER
Defined in
Functions
canvasMol
▸ canvasMol(x
, y
, w
, h
, canvas
, molString
, scaffoldMolString?
, options?
): Promise
<void
>
Renders a molecule to canvas (using RdKit) TODO: should NOT be async See example: chem
Parameters
Name | Type | Default value |
---|---|---|
x | number | undefined |
y | number | undefined |
w | number | undefined |
h | number | undefined |
canvas | Object | undefined |
molString | string | undefined |
scaffoldMolString | null | string | null |
options | Object | undefined |
options.normalizeDepiction | boolean | true |
options.straightenDepiction | boolean | true |
Returns
Promise
<void
>
Defined in
checkSmiles
▸ checkSmiles(s
): boolean
Parameters
Name | Type |
---|---|
s | string |
Returns
boolean
Defined in
convert
▸ convert(s
, sourceFormat
, targetFormat
): string
Parameters
Name | Type |
---|---|
s | string |
sourceFormat | Notation |
targetFormat | Notation |
Returns
string
Defined in
descriptors
▸ descriptors(table
, column
, descriptors
): Promise
<DataFrame
>
Calculates specified descriptors for the molecular column. See example: https://public.datagrok.ai/js/samples/domains/chem/descriptors
Async
Parameters
Name | Type | Description |
---|---|---|
table | DataFrame | Table. |
column | string | Column name with SMILES to calculate descriptors for. |
descriptors | string [] | RDKit descriptors to calculate. |
Returns
Promise
<DataFrame
>
Defined in
descriptorsTree
▸ descriptorsTree(): Promise
<object
>
Returns available descriptors tree. See example: https://public.datagrok.ai/js/samples/domains/chem/descriptors
Returns
Promise
<object
>
Defined in
diversitySearch
▸ diversitySearch(column
, settings?
): Promise
<DataFrame
>
Returns the specified number of most diverse molecules in the column. See example: https://datagrok.ai/help/datagrok/solutions/domains/chem/#similarity-and-diversity-search
Async
Parameters
Name | Type | Default value | Description |
---|---|---|---|
column | Column <any > | undefined | Column with molecules to search in |
settings | Object | undefined | Settings |
settings.limit | number | Number.MAX_VALUE | Would return top limit molecules |
Returns
Promise
<DataFrame
>
- DataFrame with 1 column:
- molecule: set of diverse structures
Defined in
drawMolecule
▸ drawMolecule(molString
, w?
, h?
, popupMenu?
): HTMLDivElement
Parameters
Name | Type | Default value |
---|---|---|
molString | string | undefined |
w? | number | undefined |
h? | number | undefined |
popupMenu | boolean | false |
Returns
HTMLDivElement
Defined in
findSimilar
▸ findSimilar(column
, molecule?
, settings?
): Promise
<DataFrame
| null
>
Computes similarity scores for molecules in the input vector based on a preferred similarity score. See example: https://public.datagrok.ai/js/samples/domains/chem/similarity-scoring-sorted
Async
Parameters
Name | Type | Default value | Description |
---|---|---|---|
column | Column <any > | undefined | Column with molecules to search in |
molecule | string | '' | Reference molecule in one of formats supported by RDKit: smiles, cxsmiles, molblock, v3Kmolblock, and inchi |
settings | Object | undefined | Properties for the similarity function |
settings.cutoff | number | 0.0 | Would drop molecules which score is lower than cutoff |
settings.limit | number | Number.MAX_VALUE | Would return top limit molecules based on the score |
Returns
Promise
<DataFrame
| null
>
- DataFrame with 3 columns:
- molecule: original molecules string representation from the input column
- score: similarity scores within the range from 0.0 to 1.0; DataFrame is sorted descending by this column
- index: indices of the molecules in the original input column
Defined in
getSimilarities
▸ getSimilarities(column
, molecule?
, settings?
): Promise
<Column
| null
>
Computes similarity scores for molecules in the input vector based on a preferred similarity score. See example: https://public.datagrok.ai/js/samples/domains/chem/similarity-scoring-scores
Async
Parameters
Name | Type | Default value | Description |
---|---|---|---|
column | Column <any > | undefined | Column with molecules to search in |
molecule | string | '' | Reference molecule in one of formats supported by RDKit: smiles, cxsmiles, molblock, v3Kmolblock, and inchi |
settings | object | {} | Properties for the similarity function (type, parameters, etc.) |
Returns
Promise
<Column
| null
>
- Column of corresponding similarity scores
Defined in
isMolBlock
▸ isMolBlock(s
): boolean
Parameters
Name | Type |
---|---|
s | null | string |
Returns
boolean
Defined in
isSmarts
▸ isSmarts(s
): boolean
Parameters
Name | Type |
---|---|
s | string |
Returns
boolean
Defined in
mcs
▸ mcs(table
, column
, returnSmarts?
, exactAtomSearch?
, exactBondSearch?
): Promise
<string
>
Finds Most Common Substructure in the specified column. See example: https://public.datagrok.ai/js/samples/domains/chem/mcs
Async
Parameters
Name | Type | Default value | Description |
---|---|---|---|
table | DataFrame | undefined | - |
column | string | undefined | Column with SMILES to analyze. |
returnSmarts | boolean | false | - |
exactAtomSearch | boolean | true | - |
exactBondSearch | boolean | true | - |
Returns
Promise
<string
>
Defined in
rGroup
▸ rGroup(table
, column
, core
): Promise
<DataFrame
>
Performs R-group analysis. See example: https://public.datagrok.ai/js/samples/domains/chem/descriptors
Async
Parameters
Name | Type | Description |
---|---|---|
table | DataFrame | Table. |
column | string | Column name with molecules to analyze. |
core | string | Core molecule. |
Returns
Promise
<DataFrame
>
Defined in
searchSubstructure
▸ searchSubstructure(column
, pattern?
, settings?
): Promise
<BitSet
>
Searches for a molecular pattern in a given column, returning a bitset with hits. See example: https://public.datagrok.ai/js/samples/domains/chem/substructure-search-library
Async
Parameters
Name | Type | Default value | Description |
---|---|---|---|
column | Column <any > | undefined | Column with molecules to search |
pattern | string | '' | Pattern, either one of which RDKit supports |
settings | Object | {} | |
settings.molBlockFailover? | string | undefined | - |
Returns
Promise
<BitSet
>
Defined in
sketcher
▸ sketcher(onChangedCallback
, smiles?
): HTMLElement
Sketches Molecule sketcher.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
onChangedCallback | Function | undefined | a function that accepts (smiles, molfile) |
smiles | string | '' | Initial molecule |
Returns
HTMLElement
Defined in
smilesFromSmartsWarning
▸ smilesFromSmartsWarning(): string
Returns
string
Defined in
svgMol
▸ svgMol(smiles
, width?
, height?
, options?
): HTMLDivElement
Renders a molecule to SVG See example: https://public.datagrok.ai/js/samples/domains/chem/mol-rendering
Parameters
Name | Type | Default value | Description |
---|---|---|---|
smiles | string | undefined | accepts smiles/molfile format |
width | number | 300 | |
height | number | 200 | |
options? | Object | undefined | OCL.IMoleculeToSVGOptions |
Returns
HTMLDivElement