Skip to content

Instantly share code, notes, and snippets.

@PatWalters
Created October 8, 2024 00:36
Show Gist options
  • Save PatWalters/3f97e8e235563427af6e063d58c7c67a to your computer and use it in GitHub Desktop.
Save PatWalters/3f97e8e235563427af6e063d58c7c67a to your computer and use it in GitHub Desktop.
Using InChI keys to find cases where the same molecule is present in different charge states
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 62,
"id": "ab122eb6-2910-4c1e-9f5a-b172ba7be44f",
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import mols2grid"
]
},
{
"cell_type": "markdown",
"id": "0c237716-7864-4746-9720-90b1a2e40d0e",
"metadata": {},
"source": [
"A quick utility function"
]
},
{
"cell_type": "code",
"execution_count": 54,
"id": "fbfb4c12-bb51-4e76-bf33-0d677d6d7eb8",
"metadata": {},
"outputs": [],
"source": [
"def value_counts_df(df_in, col_in):\n",
" \"\"\"Returns pd.value_counts() as a DataFrame\n",
"\n",
" :param df_in: Dataframe on which to run value_counts(), must have column `col`.\n",
" :param col_in: Name of column in `df` for which to generate counts\n",
" :return: Returned dataframe will have two columns, one named \"count\" which contains the count_values()\n",
" for each unique value of df[col]. The other column will be named `col`.\n",
" \"\"\"\n",
" df_out = pd.DataFrame(df_in[col_in].value_counts())\n",
" df_out.index.name = col_in\n",
" df_out.columns = ['count']\n",
" return df_out.reset_index()"
]
},
{
"cell_type": "markdown",
"id": "4fb67480-247f-4ce1-a838-2e9c4f4c410a",
"metadata": {},
"source": [
"Read the BindingDB tsv file, just a few columns to conserve memory"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "98a28920-b43d-4a52-92c4-9521801c97a5",
"metadata": {},
"outputs": [],
"source": [
"columns_to_read = ['BindingDB Reactant_set_id', 'Ligand SMILES', 'Ligand InChI Key']"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "3bc71e3d-7d5d-4f7f-94ed-6fa03d05a2e6",
"metadata": {},
"outputs": [],
"source": [
"df = pd.read_csv(\"BindingDB_All.tsv\",sep=\"\\t\", usecols=columns_to_read)"
]
},
{
"cell_type": "markdown",
"id": "2c5c265d-ea70-45f9-83de-5c9045f80a43",
"metadata": {},
"source": [
"Remove the spaces from column names for convenience"
]
},
{
"cell_type": "code",
"execution_count": 48,
"id": "91f5bdba-fa92-4d52-bf30-50c0b2a1d565",
"metadata": {},
"outputs": [],
"source": [
"df.columns = [x.replace(\" \",\"_\") for x in df.columns]"
]
},
{
"cell_type": "markdown",
"id": "7f9d0a10-dafa-4a21-8e98-89479153807e",
"metadata": {},
"source": [
"Get the unique molecules"
]
},
{
"cell_type": "code",
"execution_count": 49,
"id": "ba2cf912-8595-45bc-ad48-0e370710d4bb",
"metadata": {},
"outputs": [],
"source": [
"df_unique = df.drop_duplicates(subset='Ligand_InChI_Key').copy()"
]
},
{
"cell_type": "markdown",
"id": "6835eaa5-4baf-44a3-9dcf-c2a25189dd70",
"metadata": {},
"source": [
"Trim of the last part of the InChI key that specifies the charge state"
]
},
{
"cell_type": "code",
"execution_count": 50,
"id": "f51492f9-9294-4dfd-ab7d-b515dfc04b6f",
"metadata": {},
"outputs": [],
"source": [
"df_unique['inchi_base'] = df_unique['Ligand_InChI_Key'].str.extract(r\"([^-]+-[^-]+)\")"
]
},
{
"cell_type": "markdown",
"id": "22e0fad8-23d6-4deb-9594-8733798ad30a",
"metadata": {},
"source": [
"Find the molecules with more than one occurence of inchi_base"
]
},
{
"cell_type": "code",
"execution_count": 57,
"id": "53540d86-109c-4aa2-b589-2bc303b2bc73",
"metadata": {},
"outputs": [],
"source": [
"count_df = value_counts_df(df_unique,\"inchi_base\").query(\"count > 1\")"
]
},
{
"cell_type": "markdown",
"id": "d4950f8c-0707-461d-a9ae-21aa223fc5e5",
"metadata": {},
"source": [
"Create a new dataframe with the molecules represented as multiple charge states"
]
},
{
"cell_type": "code",
"execution_count": 66,
"id": "59dc425c-e9bd-49d6-a43f-f02d8bcd84a8",
"metadata": {},
"outputs": [],
"source": [
"dupe_df = df_unique.query(\"inchi_base in @count_df.inchi_base\").copy()"
]
},
{
"cell_type": "markdown",
"id": "8a798f62-16c4-4008-9ffc-3faa95cdb4dd",
"metadata": {},
"source": [
"Sort the records to by inchi_base"
]
},
{
"cell_type": "code",
"execution_count": 72,
"id": "256a31fc-f499-47ea-83be-aa83e8c09534",
"metadata": {},
"outputs": [],
"source": [
"dupe_df.sort_values(\"inchi_base\",inplace=True)"
]
},
{
"cell_type": "markdown",
"id": "71e52bf5-ecfa-4cd7-84e7-7c7e11a3c1e6",
"metadata": {},
"source": [
"View the data"
]
},
{
"cell_type": "code",
"execution_count": 73,
"id": "ea97bec7-781c-4cb6-8dab-bba85ffdc725",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "8e60f3d290d44f63a7d5f7d72df4dfaf",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"MolGridWidget()"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<style>\n",
" /* Some CSS to integrate with Jupyter more cleanly */\n",
" div.output_subarea {\n",
" /* Undo an unfortunate max-width parameter\n",
" that causes the output area to be too narrow\n",
" on smaller screens. */\n",
" max-width: none;\n",
"\n",
" /* Align the table with the content */\n",
" padding: 0;\n",
"\n",
" /* Let it breathe */\n",
" margin-top: 20px;\n",
" }\n",
"</style>\n",
"\n",
"<iframe class=\"mols2grid-iframe\" frameborder=\"0\" width=\"100%\"\n",
" \n",
" \n",
" allow=\"clipboard-write\"\n",
" \n",
" \n",
" sandbox=\"allow-scripts allow-same-origin allow-downloads allow-popups allow-modals\"\n",
" \n",
" srcdoc=\"\n",
"\n",
"\n",
"\n",
"&lt;html lang=&quot;en&quot;&gt;\n",
" &lt;head&gt;\n",
" &lt;meta charset=&quot;UTF-8&quot; /&gt;\n",
" &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot; /&gt;\n",
" &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot; /&gt;\n",
" &lt;title&gt;Document!&lt;/title&gt;\n",
"\n",
"\n",
"\n",
" &lt;style&gt;\n",
" /**\n",
" * General styling\n",
" */\n",
"body {\n",
" font-family: &#x27;DejaVu&#x27;, sans-serif;\n",
"}\n",
"h1,h2,h3,h4 {\n",
" margin: 0 0 10px 0;\n",
"}\n",
"h1 {\n",
" font-size: 26px;\n",
"}\n",
"h2 {\n",
" font-size: 20px;\n",
" font-weight: 400;\n",
"}\n",
"h3 {\n",
"\tfont-size: 16px;\n",
"}\n",
"p {\n",
" margin: 0 0 10px 0;\n",
"}\n",
"\n",
"\n",
"/* Remove body margin inside iframe */\n",
"body.m2g-inside-iframe {\n",
" margin: 0;\n",
"}\n",
"\n",
"/* In-cell text */\n",
"#mols2grid .data:not(.data-img) {\n",
" height: 16px;\n",
" line-height: 16px;\n",
"}\n",
"/* Text truncation */\n",
"#mols2grid .data {\n",
" /* Break text into multiple lines (default for static)... */\n",
" word-wrap: normal;\n",
"\n",
" /* ...or truncate it (default for interactive). */\n",
" overflow: hidden;\n",
" white-space: nowrap;\n",
" text-overflow: ellipsis;\n",
"}\n",
"\n",
"\n",
"/**\n",
" * Popover\n",
" * - - -\n",
" * Note: this is a bootstrap variable which is not namespaced.\n",
" * To avoid any contamination, we only style it when the\n",
" * x-placement parameter is set.\n",
" */\n",
".popover[x-placement] {\n",
" font-family: &#x27;DejaVu&#x27;, sans-serif;\n",
" background: white;\n",
" border: solid 1px rgba(0,0,0,.2);\n",
" font-size: 12px;\n",
" padding: 10px;\n",
" border-radius: 5px;\n",
" box-shadow: 0 0 20px rgba(0,0,0,.15);\n",
" user-select: none;\n",
"}\n",
".popover[x-placement] h3 {\n",
" margin: 0;\n",
"}\n",
".popover[x-placement] .arrow {\n",
" width: 10px;\n",
" height: 10px;\n",
" background: #fff;\n",
" border: solid 1px rgba(0,0,0,.2);\n",
" box-sizing: border-box;\n",
" position: absolute;\n",
" transform-origin: 5px 5px;\n",
" clip-path: polygon(0 0, 100% 0, 100% 100%);\n",
"}\n",
".popover[x-placement=&#x27;left&#x27;] .arrow {\n",
" transform: rotate(45deg);\n",
" top: 50%;\n",
" right: -5px;\n",
"}\n",
".popover[x-placement=&#x27;right&#x27;] .arrow {\n",
" transform: rotate(-135deg);\n",
" top: 50%;\n",
" left: -5px;\n",
"}\n",
".popover[x-placement=&#x27;top&#x27;] .arrow {\n",
" transform: rotate(135deg);\n",
" left: 50%;\n",
" bottom: -5px;\n",
"}\n",
".popover[x-placement=&#x27;bottom&#x27;] .arrow {\n",
" transform: rotate(-45deg);\n",
" left: 50%;\n",
" top: -5px;\n",
"}\n",
" body {\n",
" /* Colors */\n",
" --m2g-black: rgba(0,0,0,.75);\n",
" --m2g-black-soft: rgba(0,0,0,.35);\n",
" --m2g-black-10: rgba(0,0,0,.1);\n",
" --m2g-bg: #f6f6f6;\n",
" --m2g-border: solid 1px rgba(0,0,0,0.2);\n",
" --m2g-hl: #555; /* Highlight color */\n",
" --m2g-hl-shadow: inset 0 0 0 1px var(--m2g-hl); /* Inset 1px shadow to make border thicker */\n",
" --m2g-blue: #0f62fe;\n",
" --m2g-blue-soft: rgba(15,98,254,.2);\n",
"\n",
" /* Icons */\n",
" --m2g-icn-triangle: url(&#x27;data:image/svg+xml;utf8,&lt;svg width=&quot;20&quot; fill=&quot;rgba(0,0,0,.75)&quot; height=&quot;20&quot; viewBox=&quot;0 0 20 20&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M9.5713 13.285L6.2543 7.757C6.0543 7.424 6.2953 7 6.6823 7L13.3173 7C13.7053 7 13.9463 7.424 13.7453 7.757L10.4283 13.285C10.2343 13.609 9.7653 13.609 9.5713 13.285Z&quot;/&gt;&lt;/svg&gt;&#x27;);\n",
" --m2g-icn-triangle-white: url(&#x27;data:image/svg+xml;utf8,&lt;svg width=&quot;20&quot; fill=&quot;white&quot; height=&quot;20&quot; viewBox=&quot;0 0 20 20&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M9.5713 13.285L6.2543 7.757C6.0543 7.424 6.2953 7 6.6823 7L13.3173 7C13.7053 7 13.9463 7.424 13.7453 7.757L10.4283 13.285C10.2343 13.609 9.7653 13.609 9.5713 13.285Z&quot;/&gt;&lt;/svg&gt;&#x27;);\n",
" --m2g-icn-cb-white: url(&#x27;data:image/svg+xml;utf8,&lt;svg width=&quot;16&quot; height=&quot;16&quot; viewBox=&quot;0 0 16 16&quot; fill=&quot;none&quot; stroke=&quot;white&quot; stroke-width=&quot;2.5&quot; stroke-linecap=&quot;round&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M4 7.65686L7 10.6569L12.6569 5.00001&quot;/&gt;&lt;/svg&gt;&#x27;);\n",
" \n",
" /* Border radius */\n",
" --m2g-br: 3px;\n",
" --m2g-br-l: var(--m2g-br) 0 0 var(--m2g-br); /* Left-only */\n",
" --m2g-br-r: 0 var(--m2g-br) var(--m2g-br) 0; /* Right-only */\n",
"\n",
" /* Text */\n",
" --m2g-fs: 14px; /* UI font-size */\n",
" --m2g-fs-cell: 12px; /* Cell font-size */\n",
"\n",
" /* Transition speeds */\n",
" --m2g-trans: 150ms;\n",
"\n",
" /* Layout */\n",
" --m2g-h: 40px; /* Form element height */\n",
"}\n",
"\n",
"/* Styling */\n",
"#mols2grid {\n",
" font-family: &#x27;DejaVu&#x27;, sans-serif;\n",
" font-size: var(--m2g-fs);\n",
"}\n",
"\n",
"/* Fixes */\n",
"#mols2grid *,\n",
"#mols2grid *::before,\n",
"#mols2grid *::after {\n",
" box-sizing: border-box;\n",
" outline: none;\n",
"}\n",
"\n",
"\n",
"\n",
"/**\n",
" * Functions section\n",
" */\n",
"\n",
"#mols2grid .m2g-functions {\n",
" display: flex;\n",
"}\n",
"#mols2grid .m2g-functions .m2g-row {\n",
" flex: 0;\n",
" display: flex;\n",
"}\n",
"\n",
"/* Individual elements don&#x27;t scale */\n",
"#mols2grid .m2g-functions .m2g-row &gt; * {\n",
" flex: 0 0;\n",
" margin-right: 10px;\n",
"}\n",
"#mols2grid .m2g-functions .m2g-row:last-child &gt; *:last-child {\n",
" margin-right: 0;\n",
"}\n",
"\n",
"/* Row 1: pagination + gap + sort */\n",
"#mols2grid .m2g-functions .m2g-row:first-child {\n",
" flex: 1; /* Scale */\n",
"}\n",
"#mols2grid .m2g-functions .m2g-gap {\n",
" /* The gap in between will scale, so the pagination\n",
" stays on the left, while the rest moves to the right */\n",
" flex: 1;\n",
" margin-right: 0;\n",
"}\n",
"\n",
"\n",
"\n",
"/*\n",
" * Pagination\n",
" */\n",
"\n",
"#mols2grid ul.m2g-pagination {\n",
" /* Unset defaults */\n",
" list-style-type: none;\n",
" margin-block-start: 0;\n",
" margin-block-end: 0;\n",
" margin-inline-start: 0;\n",
" margin-inline-end: 0;\n",
" padding-inline-start: 0;\n",
"\n",
" /* Custom */\n",
" display: flex;\n",
"}\n",
"#mols2grid ul.m2g-pagination li {\n",
" background: var(--m2g-bg) ;\n",
" border: var(--m2g-border);\n",
" height: var(--m2g-h);\n",
" min-width: calc(var(--m2g-h) + 1px);\n",
" position: relative;\n",
" user-select: none;\n",
" \n",
" /* Compensate for double border */\n",
" margin-right: -1px;\n",
" \n",
" /* Center text */\n",
" display: flex;\n",
" align-items: center;\n",
" justify-content: center;\n",
"}\n",
"#mols2grid ul.m2g-pagination li:last-child {\n",
" min-width: var(--m2g-h);\n",
"}\n",
"#mols2grid ul.m2g-pagination li a {\n",
" text-decoration: none;\n",
" color: var(--m2g-black);\n",
" padding: 0 10px;\n",
" width: 100%;\n",
" height: var(--m2g-h);\n",
" line-height: var(--m2g-h);\n",
" text-align: center;\n",
" /* Compensate for border so there&#x27;s no gap between click areas */\n",
" margin: 0 -1px;\n",
"}\n",
"\n",
"/* Corner shape */\n",
"#mols2grid ul.m2g-pagination li:first-child {\n",
" border-radius: var(--m2g-br-l);\n",
"}\n",
"#mols2grid ul.m2g-pagination li:last-child {\n",
" border-radius: var(--m2g-br-r);\n",
" margin-right: 0;\n",
"}\n",
"\n",
"/* Focus state */\n",
"#mols2grid ul.m2g-pagination li:focus-within {\n",
" border-color: var(--m2g-hl);\n",
" box-shadow: var(--m2g-hl-shadow);\n",
" z-index: 1;\n",
"}\n",
"\n",
"/* Active state */\n",
"#mols2grid ul.m2g-pagination li.active {\n",
" background: var(--m2g-hl);\n",
" z-index: 1;\n",
"}\n",
"#mols2grid ul.m2g-pagination li.active a {\n",
" cursor: default;\n",
" color: #fff;\n",
"}\n",
"\n",
"/* Disabled sate */\n",
"#mols2grid ul.m2g-pagination li.disabled a {\n",
" cursor: default;\n",
" color: rgba(0,0,0,.25);\n",
" pointer-events: none;\n",
"}\n",
"\n",
"\n",
"\n",
"/*\n",
" * Dropdowns\n",
" */\n",
"\n",
"#mols2grid ::placeholder {\n",
" color: var(--m2g-black-soft);\n",
"}\n",
"#mols2grid .m2g-dropdown {\n",
" height: var(--m2g-h);\n",
" background: var(--m2g-bg);\n",
" border: var(--m2g-border);\n",
" border-radius: var(--m2g-br);\n",
" position: relative;\n",
"}\n",
"#mols2grid .m2g-dropdown select {\n",
" -webkit-appearance: none;\n",
" -moz-appearance: none;\n",
" -ms-appearance: none;\n",
" appearance: none;\n",
" background: transparent;\n",
" border: none;\n",
" height: 100%;\n",
" padding: 0 13px;\n",
" min-width: 0;\n",
" max-width: 250px;\n",
" color: var(--m2g-black);\n",
" cursor: pointer;\n",
"}\n",
"\n",
"/* Icon */\n",
"#mols2grid .m2g-dropdown .m2g-icon {\n",
" width: 30px;\n",
" height: var(--m2g-h);\n",
" display: flex;\n",
" align-items: center;\n",
" justify-content: center;\n",
" position: absolute;\n",
" top: 0;\n",
" right: 0;\n",
" pointer-events: none;\n",
"}\n",
"#mols2grid .m2g-dropdown .m2g-icon svg:not(.m2g-stroke) {\n",
" fill: var(--m2g-black);\n",
"}\n",
"#mols2grid .m2g-dropdown .m2g-icon svg.m2g-stroke {\n",
" stroke: var(--m2g-black);\n",
"}\n",
"\n",
"/* Display */\n",
"/* We hide the native select element because\n",
" * it is limited in styling. Instead, we display\n",
" * the selected value in a div. */\n",
"#mols2grid .m2g-dropdown .m2g-display {\n",
" position: absolute;\n",
" left: 0;\n",
" right: 0;\n",
" top: 0;\n",
" bottom: 0;\n",
" pointer-events: none;\n",
" color: var(--m2g-black);\n",
" line-height: var(--m2g-h);\n",
" padding: 0 25px 0 13px;\n",
"\n",
" /* Truncate dropdown text */\n",
" white-space: nowrap;\n",
"\ttext-overflow: ellipsis;\n",
"\toverflow: hidden;\n",
"}\n",
"\n",
"/* Focus state */\n",
"#mols2grid .m2g-dropdown:focus-within {\n",
" border-color: var(--m2g-hl);\n",
" box-shadow: var(--m2g-hl-shadow);\n",
"}\n",
"\n",
"\n",
"\n",
"/**\n",
" * Action dropdown\n",
" */\n",
"\n",
"#mols2grid .m2g-dropdown.m2g-actions {\n",
" width: var(--m2g-h);\n",
" padding: 0;\n",
"}\n",
"#mols2grid .m2g-dropdown.m2g-actions select {\n",
" opacity: 0;\n",
" width: var(--m2g-h);\n",
"}\n",
"#mols2grid .m2g-dropdown.m2g-actions .m2g-icon {\n",
" width: var(--m2g-h);\n",
"}\n",
"\n",
"\n",
"\n",
"/*\n",
" * Sort dropdown\n",
" */\n",
"\n",
"#mols2grid .m2g-dropdown.m2g-sort {\n",
" flex: 0 0 200px;\n",
" width: 200px; /* Needed in addition to flex-basis for small sizes! */\n",
" border-radius: var(--m2g-br);\n",
" background: var(--m2g-bg);\n",
" display: flex;\n",
"}\n",
"\n",
"/* Dropdown */\n",
"#mols2grid .m2g-dropdown.m2g-sort select {\n",
" flex: 1 1;\n",
" opacity: 0;\n",
" /* padding-right: 70px; Space for &quot;Sort:&quot; */\n",
" box-sizing: border-box;\n",
"}\n",
"\n",
"/* Sort order */\n",
"#mols2grid .m2g-dropdown.m2g-sort .m2g-order {\n",
" background: var(--m2g-bg) var(--m2g-icn-triangle) no-repeat center;\n",
" flex: 0 0 30px;\n",
" height: 100%;\n",
" border-left: var(--m2g-border);\n",
" cursor: pointer;\n",
"}\n",
"#mols2grid .m2g-dropdown.m2g-sort.m2d-arrow-desc .m2g-order {\n",
" transform: rotate(180deg);\n",
" border-left: none;\n",
" border-right: var(--m2g-border);\n",
"}\n",
"\n",
"/* Display */\n",
"#mols2grid .m2g-dropdown.m2g-sort .m2g-display {\n",
" right: 31px;\n",
" padding-right: 13px;\n",
"}\n",
"#mols2grid .m2g-dropdown.m2g-sort .m2g-display::before {\n",
" content: &#x27;Sort: &#x27;;\n",
"}\n",
"\n",
"/* Focus state */\n",
"#mols2grid .m2g-dropdown.m2g-sort:focus-within .m2g-display,\n",
"#mols2grid .m2g-dropdown.m2g-sort:focus-within .m2g-order {\n",
" background-color: transparent;\n",
"}\n",
"\n",
"\n",
"\n",
"/*\n",
" * Search bar\n",
" */\n",
"\n",
"#mols2grid .m2g-search-wrap {\n",
" height: var(--m2g-h);\n",
" display: flex;\n",
" align-items: center;\n",
" justify-content: flex-end;\n",
" background: var(--m2g-bg);\n",
" border: var(--m2g-border);\n",
" border-radius: var(--m2g-br);\n",
"}\n",
"#mols2grid .m2g-searchbar {\n",
" width: 170px;\n",
" height: var(--m2g-h);\n",
" padding: 0 13px;\n",
" border: none;\n",
" color: var(--m2g-black);\n",
" cursor: text;\n",
" background: transparent;\n",
"}\n",
"\n",
"/* Focus state */\n",
"#mols2grid .m2g-search-wrap:focus-within {\n",
" border-color: var(--m2g-hl);\n",
" box-shadow: var(--m2g-hl-shadow);\n",
"}\n",
"\n",
"/* Option buttons */\n",
"#mols2grid .m2g-search-options {\n",
" font-size: 12px;\n",
" display: flex;\n",
" height: calc(1.5em + .75rem);\n",
" line-height: calc(1.5em + .75rem);\n",
" margin-right: 5px;\n",
" border-radius: var(--m2g-br);\n",
" color: var(--m2g-black);\n",
"}\n",
"#mols2grid .m2g-search-options .m2g-option {\n",
" background: var(--m2g-black-10);\n",
" padding: 0 13px;\n",
" cursor: default;\n",
" user-select: none;\n",
"}\n",
"#mols2grid .m2g-search-options .m2g-option:not(.sel) {\n",
" cursor: pointer;\n",
"}\n",
"#mols2grid .m2g-search-options .m2g-option:first-child {\n",
" border-radius: 2px 0 0 2px;\n",
"}\n",
"#mols2grid .m2g-search-options .m2g-option:last-child {\n",
" border-radius: 0 2px 2px 0;\n",
"}\n",
"#mols2grid .m2g-search-options .m2g-option.sel {\n",
" background: var(--m2g-hl);\n",
" color: #fff;\n",
"}\n",
"\n",
"\n",
"\n",
"/**\n",
" * Grid\n",
" */\n",
"\n",
"/* Container */\n",
"#mols2grid .m2g-list {\n",
" display: flex;\n",
" flex-wrap: wrap;\n",
" align-items: flex-start;\n",
" justify-content: flex-start;\n",
" padding: 1px; /* Compensate for negative padding on cell */\n",
" user-select: none;\n",
" margin: 0px;\n",
" margin-top: 20px;\n",
" font-family: &#x27;DejaVu&#x27;, sans-serif;\n",
" \n",
"}\n",
"\n",
"/* Cell */\n",
"#mols2grid .m2g-cell {\n",
" border: 1px solid #cccccc;\n",
" text-align: center;\n",
" vertical-align: top;\n",
" font-family: var(--font-family);\n",
" padding: 10px;\n",
" padding-top: max(10px, 20px);\n",
" margin: -1px -1px 0 0;\n",
" flex: 1 0 130px;\n",
" position: relative;\n",
" font-size: var(--m2g-fs-cell);\n",
" cursor: pointer;\n",
" color: var(--m2g-black);\n",
" overflow: hidden;\n",
" box-sizing: border-box;\n",
" background-color: white;\n",
"}\n",
"#mols2grid .m2g-cell:focus {\n",
" z-index: 1;\n",
" border-color: var(--m2g-hl);\n",
" box-shadow: var(--m2g-hl-shadow);\n",
"}\n",
"\n",
"/* Phantom cells to maintain grid structure with less results */\n",
"#mols2grid .m2g-cell.m2g-phantom {\n",
" border: none;\n",
" pointer-events: none;\n",
" height: 0;\n",
" padding: 0;\n",
"}\n",
"\n",
"/* Checkbox &amp; ID */\n",
"#mols2grid .m2g-cb-wrap {\n",
" position: absolute;\n",
" top: 3px;\n",
" left: 3px;\n",
" display: flex;\n",
" border-radius: 2px;\n",
" font-size: 0;\n",
" line-height: 0;\n",
" padding: 3px;\n",
" padding-right: 0;\n",
"}\n",
"#mols2grid .m2g-cb-wrap input[type=checkbox] {\n",
" display: none;\n",
"}\n",
"#mols2grid .m2g-cb-wrap input[type=checkbox] + .m2g-cb {\n",
"\twidth: 16px;\n",
"\theight: 16px;\n",
"\tbox-sizing: border-box;\n",
"\tbackground: #fff;\n",
"\tborder: var(--m2g-border);\n",
"\tborder-radius: 2px;\n",
" margin-right: 5px;\n",
"}\n",
"#mols2grid .m2g-cb-wrap input[type=checkbox]:checked + .m2g-cb {\n",
" border: none;\n",
" background-color: var(--m2g-blue);\n",
" background-image: var(--m2g-icn-cb-white);\n",
"}\n",
"#mols2grid .m2g-tooltip {\n",
" /* This is a div spanning full cell size where the\n",
" tooltip is rendered around, because you can&#x27;t attach\n",
" it to the parent due to list.js limitation. */\n",
" width: 100%;\n",
" height: 100%;\n",
" position: absolute;\n",
" left: 0;\n",
" top: 0;\n",
" z-index: -1;\n",
" pointer-events: none;\n",
" opacity: 0;\n",
"}\n",
"#mols2grid .m2g-cell:has(:checked) {\n",
" background: #ffd !important; /* Overrides user-set background color */\n",
"}\n",
"#mols2grid .data-mols2grid-id-display {\n",
" font-size: var(--m2g-fs-cell);\n",
" line-height: 16px;\n",
"}\n",
"#mols2grid .m2g-cb-wrap input[type=checkbox] + .data-mols2grid-id-display {\n",
" padding: 0 5px 0 5px;\n",
"}\n",
"#mols2grid .m2g-cb-wrap .data-name-display {\n",
" font-size: var(--m2g-fs);\n",
" line-height: 16px;\n",
"}\n",
"\n",
"/* Info + callback button wrap (28px high) */\n",
"#mols2grid .m2g-cell-actions {\n",
" position: absolute;\n",
" top: 0;\n",
" right: 0;\n",
" display: flex;\n",
" flex-direction: row;\n",
" font-size: 0;\n",
" line-height: 0;\n",
" \n",
" /* background: yellow; */\n",
"}\n",
"\n",
"/* Info button */\n",
"#mols2grid .m2g-info {\n",
" width: 28px;\n",
" height: 28px;\n",
" border-radius: 2px;\n",
" line-height: 28px;\n",
" font-size: min(14px, 12px);\n",
" font-family: Georgia, serif;\n",
" font-style: italic;\n",
" padding: 0;\n",
" text-align: center;\n",
"}\n",
"#mols2grid .m2g-keep-tooltip .m2g-info {\n",
" color: #fff;\n",
"}\n",
"#mols2grid .m2g-keep-tooltip .m2g-info::before {\n",
" content: &#x27;i&#x27;;\n",
" width: 18px;\n",
" height: 18px;\n",
" line-height: 18px;\n",
" background: var(--m2g-hl);\n",
" position: absolute;\n",
" left: 5px;\n",
" top: 5px;\n",
" border-radius: 9px;\n",
"}\n",
"\n",
"/* Callback button */\n",
"#mols2grid .m2g-callback {\n",
" width: 28px;\n",
" height: 28px;\n",
" cursor: pointer;\n",
"}\n",
"#mols2grid .m2g-callback::after {\n",
" content: &#x27;&#x27;;\n",
" display: block;\n",
" width: 16px;\n",
" height: 16px;\n",
" margin: 6px;\n",
" border: var(--m2g-border);\n",
" border-radius: 2px;\n",
" background: var(--m2g-bg) var(--m2g-icn-triangle) no-repeat center;\n",
" transform: rotate(-90deg);\n",
"}\n",
"\n",
"/* Image */\n",
"#mols2grid .m2g-cell .data-img {\n",
" padding: 0;\n",
"}\n",
"#mols2grid .m2g-cell img,\n",
"#mols2grid .m2g-cell svg {\n",
" max-width: 100%;\n",
" height: auto;\n",
" padding: 0;\n",
"}\n",
"#mols2grid .m2g-cell svg &gt; rect:first-child {\n",
" /* Remove the SVG background */\n",
" fill: transparent !important;\n",
"}\n",
"\n",
"/* Text below image */\n",
".m2g-copy-blink {\n",
" animation: m2g-blink var(--m2g-trans) 3;\n",
"}\n",
"@keyframes m2g-blink {\n",
" 0% {\n",
" opacity: 1;\n",
" }\n",
" 49% {\n",
" opacity: 1;\n",
" }\n",
" 50% {\n",
" opacity: 0;\n",
" }\n",
" 100% {\n",
" opacity: 0;\n",
" }\n",
"}\n",
"\n",
"/* Copyable text */\n",
".copy-me {\n",
" position: relative;\n",
" cursor: pointer;\n",
"}\n",
"\n",
"\n",
"\n",
"/**\n",
" * Modal popup\n",
" * - - -\n",
" * Triggered by make_popup_callback()\n",
" * See https://mols2grid.readthedocs.io/en/latest/notebooks/callbacks.html#Display-a-popup-containing-descriptors\n",
" */\n",
"\n",
"/* Container */\n",
"#m2g-modal-container {\n",
" display: flex;\n",
" align-items: center;\n",
" justify-content: center;\n",
" background: var(--m2g-black-10);\n",
" position: fixed;\n",
" top: 0;\n",
" left: 0;\n",
" z-index: 1;\n",
" width: 100%;\n",
" height: 100%;\n",
" \n",
" /* Transition */\n",
" opacity: 0;\n",
" transition: opacity var(--m2g-trans) linear;\n",
"}\n",
"\n",
"/* Modal */\n",
"#m2g-modal {\n",
" background: #fff;\n",
" border-radius: var(--m2g-br);\n",
" box-shadow: 0 0 30px var(--m2g-black-10);\n",
" padding: 20px;\n",
" position: relative;\n",
" max-width: calc(100% - 80px);\n",
" max-height: calc(100% - 80px);\n",
" display: flex;\n",
" flex-direction: column;\n",
" min-width: 26px;\n",
"\n",
" /* Transition */\n",
" opacity: 0;\n",
" transform: translate(0, 5px);\n",
" transition: transform var(--m2g-trans) ease-in-out, opacity var(--m2g-trans) linear;\n",
"}\n",
"#m2g-modal .m2g-modal-header {\n",
" flex: 0 0 26px;\n",
" margin-bottom: 10px;\n",
"}\n",
"#m2g-modal .m2g-modal-header h2 {\n",
" margin-bottom: 0;\n",
"}\n",
"#m2g-modal .m2g-modal-header h2 + p {\n",
" font-size: 15px;\n",
"}\n",
"#m2g-modal .m2g-modal-body {\n",
" flex: 1;\n",
" position: relative;\n",
"}\n",
"\n",
"/* Transition */\n",
"#m2g-modal-container.show {\n",
" opacity: 1;\n",
"}\n",
"#m2g-modal-container.show #m2g-modal {\n",
" opacity: 1;\n",
" transform: translate(0, 0);\n",
"}\n",
"\n",
"/* Header + close btn */\n",
"#m2g-modal h2 {\n",
" line-height: 26px;\n",
" padding-right: 40px;\n",
" text-transform: capitalize;\n",
"}\n",
"#m2g-modal h3 {\n",
" \n",
"}\n",
"#m2g-modal button.close {\n",
" background: transparent;\n",
" padding: 0;\n",
" color: var(--m2g-black);\n",
" font-size: 1.5rem;\n",
" width: 40px;\n",
" height: 40px;\n",
" position: absolute;\n",
" top: 13px;\n",
" right: 13px;\n",
" border: none;\n",
"}\n",
"\n",
"/* Image */\n",
"#m2g-modal .svg-wrap svg {\n",
" max-width: 100%;\n",
" margin-bottom: 20px;\n",
"}\n",
"\n",
"/* Separator */\n",
"hr {\n",
" width: 100%;\n",
" height: 1px;\n",
" background: #ddd;\n",
" margin: 15px 0;\n",
" border: none;\n",
"}\n",
"\n",
"\n",
"\n",
"/**\n",
" * Hover states\n",
" */\n",
"@media (hover:hover) {\n",
" /* Pagination */\n",
" #mols2grid ul.m2g-pagination li:not(.active):not(.disabled):hover {\n",
" background: #f0f0f0;\n",
" z-index: 1;\n",
" }\n",
" #mols2grid ul.m2g-pagination li.active + li:hover {\n",
" /* Keeping the hover border consiistent */\n",
" margin-left: 1px;\n",
" border-left: none;\n",
" min-width: 40px;\n",
" }\n",
"\n",
" /* Dropdowns &amp; search */\n",
" #mols2grid .m2g-dropdown:not(:focus-within):hover,\n",
" #mols2grid .m2g-search-wrap:not(:focus-within):hover,\n",
" #mols2grid .m2g-sort:not(:focus-within) .m2g-order:hover {\n",
" background-color: #f0f0f0;\n",
" }\n",
" #mols2grid .m2g-search-wrap:not(:focus-within):hover {\n",
" background: #fff;\n",
" border-color: rgba(0,0,0,.3);\n",
" }\n",
" /* Hocus pocus to have separate hover states for dropdown and arrow */\n",
" #mols2grid .m2g-dropdown.m2g-sort:not(:focus-within):hover .m2g-order:not(:hover) + .m2g-display {\n",
" background-color: transparent;\n",
" }\n",
"\n",
" /* Search options */\n",
" #mols2grid .m2g-search-options .m2g-option:not(.sel):hover {\n",
" background: rgba(0,0,0,.15);\n",
" }\n",
"\n",
" /* Grid */\n",
" /* Note: this is in an ::after pseudo element, so the transparent\n",
" hover color plays nice with the cell background color. */\n",
" #mols2grid .m2g-cell:hover::after {\n",
" content: &#x27;&#x27;;\n",
" width: 100%;\n",
" height: 100%;\n",
" position: absolute;\n",
" top: 0;\n",
" left: 0;\n",
" background-color: rgba(0,0,0,0.05);\n",
" pointer-events: none;\n",
" }\n",
"\n",
" /* info button */\n",
" #mols2grid .m2g-info:hover::before {\n",
" content: &#x27;i&#x27;;\n",
" color: #fff;\n",
" width: 18px;\n",
" height: 18px;\n",
" line-height: 18px;\n",
" background: var(--m2g-hl);\n",
" position: absolute;\n",
" left: 5px;\n",
" top: 5px;\n",
" border-radius: 9px;\n",
" }\n",
" \n",
" /* Callback button */\n",
" #mols2grid .m2g-callback:hover::after {\n",
" background-color: var(--m2g-black);\n",
" background-image: var(--m2g-icn-triangle-white);\n",
" border-color: transparent;\n",
" }\n",
"\n",
" /* Copyable text */\n",
" .copy-me:hover {\n",
" text-decoration: underline;\n",
" text-decoration-color: var(--m2g-blue);\n",
" }\n",
"}\n",
"\n",
"\n",
"\n",
"/**\n",
" * Responsive behavior.\n",
" * - - -\n",
" * Note: container queries won&#x27;t work in older browsers,\n",
" * but this is purely aesthetical behavior so that&#x27;s ok.\n",
" * https://caniuse.com/css-container-queries\n",
" */\n",
"\n",
"/* This sets the msg-list div as reference container */\n",
"#mols2grid {\n",
" container-type: inline-size;\n",
"}\n",
"\n",
"\n",
"\n",
"/**\n",
" * Functions section\n",
" */\n",
"\n",
"/* When there&#x27;s not enough space to put everything in one row, we break it into two.\n",
" * - - -\n",
" * 870px = pagination 280 + sort 200 + search 300 + menu 40 + (3*10 gap) = 850 + 20 buffer.\n",
" * Buffer required because the button width inside the search depends on the font.\n",
" */\n",
"@container (max-width: 870px) {\n",
" #mols2grid .m2g-functions {\n",
" flex-direction: column-reverse;\n",
" gap: 10px;\n",
" }\n",
" #mols2grid .m2g-functions .m2g-row:last-child {\n",
" justify-content: flex-end;\n",
" }\n",
" #mols2grid .m2g-functions .m2g-row:first-child *:last-child {\n",
" margin-right: 0;\n",
" }\n",
"}\n",
"\n",
"/* When there&#x27;s not enough room for pagination + sort on one row,\n",
" * we reduce the sort drodpwon width.\n",
" */\n",
"@container (max-width: 500px) {\n",
" #mols2grid .m2g-functions .m2g-sort {\n",
" width: 80px;\n",
" flex-basis: 80px;\n",
" }\n",
" #mols2grid .m2g-functions .m2g-sort .m2g-display {\n",
" font-size: 0;\n",
" line-height: 0;\n",
" padding-right: 0;\n",
" }\n",
" #mols2grid .m2g-functions .m2g-sort .m2g-display::before {\n",
" content: &#x27;Sort&#x27;;\n",
" font-size: var(--m2g-fs);\n",
" line-height: var(--m2g-h);\n",
" }\n",
"}\n",
"\n",
"/* When there&#x27;s not enough room for pagination + reduced sort on one row,\n",
" * we reduce the pagination width.\n",
" */\n",
"@container (max-width: 500px) {\n",
" /* We&#x27;re overriding min-width from different\n",
" locations, including responsive rules */\n",
" #mols2grid ul.m2g-pagination li,\n",
" #mols2grid ul.m2g-pagination li:last-child,\n",
" #mols2grid ul.m2g-pagination li.active + li:hover {\n",
" min-width: 0;\n",
" }\n",
"}\n",
"\n",
"/* When there&#x27;s not enough room for searchbar + menu\n",
" * we scale down the searchbar to fit the container.\n",
" */\n",
"@container (max-width: 370px) {\n",
" #mols2grid .m2g-functions .m2g-row .m2g-search-wrap {\n",
" flex: 1;\n",
" }\n",
" #mols2grid .m2g-searchbar {\n",
" width: calc(100% - 50px);\n",
" }\n",
" #mols2grid .m2g-search-options {\n",
" width: 50px;\n",
" }\n",
"\n",
" /* Collapse options in T/M buttons */\n",
" #mols2grid .m2g-search-options .m2g-option {\n",
" width: 25px;\n",
" text-align: center;\n",
" padding: 0;\n",
" overflow: hidden;\n",
" }\n",
" #mols2grid .m2g-search-options .m2g-option:first-child::before {\n",
" content: &#x27;T\\A&#x27;\n",
" }\n",
" #mols2grid .m2g-search-options .m2g-option:last-child::before {\n",
" content: &#x27;S\\A&#x27;\n",
" }\n",
"}\n",
"\n",
"\n",
"\n",
"/**\n",
" * Grid\n",
" */\n",
"\n",
"/* When there&#x27;s room for 5 columns, fall back to 4 */\n",
"@container (min-width: 519px) and (max-width: 779px) {\n",
" #mols2grid .m2g-cell {\n",
" flex-basis: calc(100% / 4);\n",
" }\n",
"}\n",
"\n",
"/* When there&#x27;s room for 7-11 columns, fall back to 6 */\n",
"@container (min-width: 779px) and (max-width: 1559px) {\n",
" #mols2grid .m2g-cell {\n",
" flex-basis: calc(100% / 6);\n",
" }\n",
"}\n",
"\n",
"/* When there&#x27;s room for 13+ columns, fall back to 12 */\n",
"@container (min-width: 1559px) {\n",
" #mols2grid .m2g-cell {\n",
" flex-basis: calc(100% / 12);\n",
" }\n",
"}\n",
"\n",
" /* Custom CSS */\n",
" \n",
" &lt;/style&gt;\n",
" &lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/list.js/2.3.1/list.min.js&quot;&gt;&lt;/script&gt;\n",
"&lt;script src=&quot;https://code.jquery.com/jquery-3.6.0.min.js&quot; integrity=&quot;sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=&quot; crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt;\n",
"&lt;script src=&quot;https://unpkg.com/@rdkit/[email protected]/Code/MinimalLib/dist/RDKit_minimal.js&quot;&gt;&lt;/script&gt;\n",
" &lt;script&gt;\n",
" // Set iframe height to fit content.\n",
" function fitIframe(iframe) {\n",
" // Ignore when there&#x27;s no iframe\n",
" if (!iframe) return\n",
"\n",
" // Only fit height when no specific height was given.\n",
" if (iframe.getAttribute(&#x27;height&#x27;)) return;\n",
"\n",
" // Initial fit + refit whenever the window width changes.\n",
" _fit()\n",
" $(window).on(&#x27;resize&#x27;, function() {\n",
" if (window.innerWidth != window.prevInnerWidth) {\n",
" window.prevInnerWidth = window.innerWidth\n",
" _fit();\n",
" }\n",
" })\n",
"\n",
" // Fit iframe height to content height.\n",
" function _fit() {\n",
" var height = iframe.contentDocument.body.scrollHeight + 18 + &#x27;px&#x27;;\n",
" iframe.style.height = height;\n",
" }\n",
" }\n",
"&lt;/script&gt;\n",
"\n",
"&lt;!-- prettier-ignore --&gt;\n",
"&lt;script src=&quot;https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js&quot; integrity=&quot;sha384-Piv4xVNRyMGpqkS2by6br4gNJ7DXjqk09RmUpJ8jgGtD7zP9yug3goQfGII0yAns&quot; crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt;\n",
" \n",
" &lt;!-- Custom header --&gt;\n",
" \n",
"\n",
"\n",
"\n",
"\n",
" &lt;/head&gt;\n",
" &lt;body class=&quot;m2g-inside-iframe&quot;&gt;\n",
"\n",
"\n",
"\n",
" &lt;div id=&quot;mols2grid&quot; class=&quot;grid-default&quot;&gt;\n",
" &lt;!-- Pagination &amp; search --&gt;\n",
" &lt;div class=&quot;m2g-functions&quot;&gt;\n",
" \n",
" &lt;div class=&quot;m2g-row&quot;&gt;\n",
" &lt;!-- Pagination --&gt;\n",
" &lt;ul class=&quot;m2g-pagination&quot; class=&quot;d-flex&quot;&gt;&lt;/ul&gt;\n",
" &lt;div class=&quot;m2g-gap&quot;&gt;&lt;/div&gt;\n",
"\n",
" &lt;!-- Sort dropdown --&gt;\n",
" &lt;div class=&quot;m2g-dropdown m2g-sort&quot;&gt;\n",
" &lt;select&gt;\n",
" \n",
" \n",
" \n",
" \n",
" \n",
" &lt;option value=&quot;mols2grid-id&quot; selected&gt;Index&lt;/option&gt;\n",
" \n",
" \n",
" \n",
" \n",
" \n",
" &lt;option value=&quot;data-BindingDB_Reactant_set_id&quot;&gt;BindingDB_Reactant_set_id&lt;/option&gt;\n",
" \n",
" \n",
" \n",
" \n",
" \n",
" &lt;option value=&quot;data-Ligand_SMILES&quot;&gt;Ligand_SMILES&lt;/option&gt;\n",
" \n",
" \n",
" \n",
" \n",
" \n",
" &lt;option value=&quot;data-Ligand_InChI_Key&quot;&gt;Ligand_InChI_Key&lt;/option&gt;\n",
" \n",
" \n",
" \n",
" \n",
" \n",
" &lt;option value=&quot;data-inchi_base&quot;&gt;inchi_base&lt;/option&gt;\n",
" \n",
" \n",
" \n",
" &lt;option value=&quot;checkbox&quot;&gt;Selected&lt;/option&gt;\n",
" \n",
" &lt;/select&gt;\n",
" &lt;div class=&quot;m2g-order&quot;&gt;&lt;/div&gt;\n",
" &lt;div class=&quot;m2g-display&quot;&gt;\n",
" Index\n",
" &lt;/div&gt;\n",
" &lt;/div&gt;\n",
" &lt;/div&gt;\n",
" &lt;div class=&quot;m2g-row&quot;&gt;\n",
" &lt;!-- Search bar --&gt;\n",
" &lt;div class=&quot;m2g-search-wrap&quot;&gt;\n",
" &lt;input\n",
" type=&quot;text&quot;\n",
" class=&quot;m2g-searchbar form-control&quot;\n",
" placeholder=&quot;Search&quot;\n",
" aria-label=&quot;Search&quot;\n",
" aria-describedby=&quot;basic-addon1&quot;\n",
" /&gt;\n",
" &lt;div class=&quot;m2g-search-options&quot;&gt;\n",
" &lt;div class=&quot;m2g-option m2g-search-text sel&quot;&gt;Text&lt;/div&gt;\n",
" &lt;div class=&quot;m2g-option m2g-search-smarts&quot;&gt;SMARTS&lt;/div&gt;\n",
" &lt;/div&gt;\n",
" &lt;/div&gt;\n",
"\n",
" &lt;!-- Action dropdown --&gt;\n",
" &lt;div class=&quot;m2g-dropdown m2g-actions&quot;&gt;\n",
" &lt;select&gt;\n",
" &lt;option hidden&gt;-&lt;/option&gt;\n",
" &lt;option value=&quot;select-all&quot;&gt;Select all&lt;/option&gt;\n",
" &lt;option value=&quot;select-matching&quot;&gt;Select matching&lt;/option&gt;\n",
" &lt;option value=&quot;unselect-all&quot;&gt;Unselect all&lt;/option&gt;\n",
" &lt;option value=&quot;invert&quot;&gt;Invert&lt;/option&gt;\n",
" &lt;option value=&quot;copy&quot;&gt;Copy to clipboard&lt;/option&gt;\n",
" &lt;option value=&quot;save-smiles&quot;&gt;Save SMILES&lt;/option&gt;\n",
" &lt;option value=&quot;save-csv&quot;&gt;Save CSV&lt;/option&gt;\n",
" &lt;/select&gt;\n",
" &lt;div class=&quot;m2g-icon&quot;&gt;\n",
" &lt;svg width=&quot;20&quot; height=&quot;20&quot; viewBox=&quot;0 0 20 20&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;\n",
" &lt;path d=&quot;M11.5 4C11.5 4.82843 10.8284 5.5 10 5.5C9.17157 5.5 8.5 4.82843 8.5 4C8.5 3.17157 9.17157 2.5 10 2.5C10.8284 2.5 11.5 3.17157 11.5 4ZM11.5 10C11.5 10.8284 10.8284 11.5 10 11.5C9.17157 11.5 8.5 10.8284 8.5 10C8.5 9.17157 9.17157 8.5 10 8.5C10.8284 8.5 11.5 9.17157 11.5 10ZM10 17.5C10.8284 17.5 11.5 16.8284 11.5 16C11.5 15.1716 10.8284 14.5 10 14.5C9.17157 14.5 8.5 15.1716 8.5 16C8.5 16.8284 9.17157 17.5 10 17.5Z&quot;/&gt;\n",
" &lt;/svg&gt;\n",
" &lt;/div&gt;\n",
" &lt;/div&gt;\n",
" &lt;/div&gt;\n",
" &lt;/div&gt;\n",
"\n",
" &lt;!-- Grid --&gt;\n",
" \n",
" &lt;div class=&quot;m2g-list&quot;&gt;&lt;div class=&quot;m2g-cell&quot; data-mols2grid-id=&quot;0&quot; tabindex=&quot;0&quot;&gt;&lt;div class=&quot;m2g-cb-wrap&quot;&gt;&lt;input type=&quot;checkbox&quot; tabindex=&quot;-1&quot; class=&quot;position-relative float-left cached_checkbox&quot;&gt;&lt;div class=&quot;m2g-cb&quot;&gt;&lt;/div&gt;&lt;div class=&quot;data-mols2grid-id-display&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;m2g-cell-actions&quot;&gt;&lt;div class=&quot;m2g-info&quot;&gt;i&lt;/div&gt;&lt;/div&gt;&lt;a class=&quot;data data-img&quot;&gt;&lt;/a&gt;&lt;div class=&quot;data data-BindingDB_Reactant_set_id&quot; style=&quot;display: none;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;data data-Ligand_SMILES&quot; style=&quot;display: none;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;data data-Ligand_InChI_Key&quot; style=&quot;display: none;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;data data-inchi_base&quot; style=&quot;display: none;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;m2g-tooltip&quot; data-toggle=&quot;popover&quot; data-content=&quot;.&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;\n",
" &lt;/div&gt;\n",
" &lt;script&gt;\n",
" // list.js\n",
"var listObj = new List(&#x27;mols2grid&#x27;, {\n",
" listClass: &#x27;m2g-list&#x27;,\n",
" valueNames: [{data: [&#x27;mols2grid-id&#x27;]}, &#x27;data-Ligand_SMILES&#x27;, &#x27;data-BindingDB_Reactant_set_id&#x27;, &#x27;data-inchi_base&#x27;, &#x27;data-mols2grid-id&#x27;, &#x27;data-Ligand_InChI_Key&#x27;, &#x27;data-img&#x27;, &#x27;data-mols2grid-id-display&#x27;, {attr: &#x27;data-content&#x27;, name: &#x27;m2g-tooltip&#x27;}],\n",
" item: &#x27;&lt;div class=&quot;m2g-cell&quot; data-mols2grid-id=&quot;0&quot; tabindex=&quot;0&quot;&gt;&lt;div class=&quot;m2g-cb-wrap&quot;&gt;&lt;input type=&quot;checkbox&quot; tabindex=&quot;-1&quot; class=&quot;position-relative float-left cached_checkbox&quot;&gt;&lt;div class=&quot;m2g-cb&quot;&gt;&lt;/div&gt;&lt;div class=&quot;data-mols2grid-id-display&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;m2g-cell-actions&quot;&gt;&lt;div class=&quot;m2g-info&quot;&gt;i&lt;/div&gt;&lt;/div&gt;&lt;a class=&quot;data data-img&quot;&gt;&lt;/a&gt;&lt;div class=&quot;data data-BindingDB_Reactant_set_id&quot; style=&quot;display: none;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;data data-Ligand_SMILES&quot; style=&quot;display: none;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;data data-Ligand_InChI_Key&quot; style=&quot;display: none;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;data data-inchi_base&quot; style=&quot;display: none;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;m2g-tooltip&quot; data-toggle=&quot;popover&quot; data-content=&quot;.&quot;&gt;&lt;/div&gt;&lt;/div&gt;&#x27;,\n",
" page: 24,\n",
" pagination: {\n",
" paginationClass: &quot;m2g-pagination&quot;,\n",
" item: &#x27;&lt;li class=&quot;page-item&quot;&gt;&lt;a class=&quot;page page-link&quot; href=&quot;#&quot; onclick=&quot;event.preventDefault()&quot;&gt;&lt;/a&gt;&lt;/li&gt;&#x27;,\n",
" innerWindow: 1,\n",
" outerWindow: 1,\n",
" },\n",
"});\n",
"listObj.remove(&quot;mols2grid-id&quot;, &quot;0&quot;);\n",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment