Skip to main content

An interactive screening tool for ionic liquid cation generation, structural filtering, and melting point (Tm) prediction.

Project description

ILs-screening-tm

An interactive, modular screening tool for ionic liquid cation generation, structural filtering, synthetic accessibility scoring, and machine learning-driven melting point ($T_m$) prediction.

This repository decouples core chemical and deep learning calculations from the interactive user interface, providing a clean production pipeline suitable for virtual materials discovery.

You can run the entire interactive pipeline directly in your browser without installing anything locally. Click the badge below to launch the pre-configured environment in Google Colab (remember to run the setup cell at the top to initialize the environment and display the interactive UI):

Open In Colab

Graphical Abstract

๐Ÿ“‚ Repository Structure

The repository is organized into distinct structural layers following software development standards:

Git/
โ”œโ”€โ”€ ils_screening_tm/          # Core production Python package
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ main.py                # Pipeline orchestrator & Interactive UI (ipywidgets)
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ database/              # Fixed chemical databases
โ”‚   โ”‚   โ”œโ”€โ”€ base_cations.csv
โ”‚   โ”‚   โ”œโ”€โ”€ substituents_library.csv
โ”‚   โ”‚   โ””โ”€โ”€ anions_library.csv
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ models/                # Deep learning weights & feature scalers
โ”‚   โ”‚   โ”œโ”€โ”€ pscnn_fold_1.keras ... pscnn_fold_5.keras
โ”‚   โ”‚   โ”œโ”€โ”€ scaler_mordred.pkl
โ”‚   โ”‚   โ””โ”€โ”€ for-external.pkl
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ Generation/            # Step 1: Combinatorial generation engine
โ”‚   โ”œโ”€โ”€ SAScore/               # Step 2: RDKit accessibility screening & pairing
โ”‚   โ”œโ”€โ”€ Prediction_tm/         # Step 3: Mordred descriptor & CNN inference
โ”‚   โ””โ”€โ”€ Display/               # Step 4: Visual analytics & structural rendering
โ”‚
โ”œโ”€โ”€ output/                    # Generated pipeline checkpoints and final datasets
โ”‚   โ”œโ”€โ”€ generated_cations_raw.csv     # Output from Step 1
โ”‚   โ”œโ”€โ”€ ionic_liquids_raw_pairs.csv   # Output from Step 2
โ”‚   โ””โ”€โ”€ ionic_liquids_filtered_tm.csv # Ultimate Target Dataset (Step 3 & 4)
โ”‚
โ”œโ”€โ”€ tests/                     # Interactive testing & Validation notebooks
โ”‚   โ””โ”€โ”€ test_pipeline.ipynb    # Demo notebook to launch the UI
โ”‚
โ”œโ”€โ”€ training/                  # Research environment for model development
โ”‚   โ”œโ”€โ”€ dataset/
โ”‚   โ”‚   โ””โ”€โ”€ tm_data.csv        # Curated experimental benchmark training set
โ”‚   โ””โ”€โ”€ train_tm_model.py      # Dual-Input Parallel-Scaffold CNN training script
โ”‚
โ”œโ”€โ”€ pyproject.toml
โ””โ”€โ”€ README.md

โš™๏ธ The 4-Step Screening Pipeline

When executed via the interactive dashboard, the package orchestrates a sequential 4-step pipeline using the output/ directory to store intermediate results:

Step 1: Combinatorial Cation Generation (Generation/)

  • Takes an atom-map-encoded scaffold selected in the UI.
  • Applies combinatorial functional group grafting using local connection matrix rules.
  • Filters out non-compliant structures based on custom structural SMARTS filters.
  • Saves unique generated scaffolds to output/generated_cations_raw.csv.

Step 2: Synthetic Accessibility Filtering & Anion Pairing (SAScore/)

  • Computes SAScores (via RDKit contributions) for every single unique cation.
  • Enforces a strict synthesis gate (<= 6.0) to discard overly complex or unstable chemical entities.
  • Performs a cross-join (product cartesian) between surviving cations and the standard anion library.
  • Saves fully-paired salt structures alongside their cation SAScore to output/ionic_liquids_raw_pairs.csv.

Step 3: Deep Learning Tm Prediction (Prediction_tm/)

  • Computes 209 mathematical Mordred structural descriptors for both the cation and anion blocks.
  • Standardizes feature blocks using pre-trained scalers.
  • Feeds data into a 5-Fold Cross-Validation Ensemble of Parallel-Scaffold Convolutional Neural Networks (PSCNN).
  • Computes the ensemble average melting point and applies a room-temperature/low-melting screening threshold (Tm <= 100ยฐC).
  • Saves the final screened dataset containing both Tm and SAScore properties to output/ionic_liquids_filtered_tm.csv.

Step 4: Visual Analytics & Reporting (Display/)

  • Outputs a formatted cross-statistical summary report in the terminal (min, max, average values for both Tm and SAScores).
  • Performs a randomized sample extraction from the top stable candidates.
  • Renders a 2D high-resolution molecular grid (Cation alongside Anion) inside the notebook layout.

๐ŸŽ›๏ธ Interactive Dashboard Features

The screening pipeline comes with an intuitive ipywidgets-based graphical interface that allows you to easily configure your structural modifications and screening constraints in real-time.

1. Screening Bounds Settings (Advanced Performance)

At the top of the interface, you will find two direct numeric entry boxes to protect your workstation or server memory against combinatorics explosions:

  • Max Subts: Controls the maximum number of unique substituents loaded from your library for each active chemical site family.
  • Max Comb: Sets a hard absolute ceiling for the total number of generated cation structures. If the combinatorics estimation exceeds this number, the generation safely truncates to prevent Out of Memory crashes (highly recommended when running on free cloud environments like Google Colab).

2. Scaffold Selection & Core Slicing

  • Scaffold Slider: Scroll through your available base cation scaffolds from the loaded database (index from 0 to 6). The index mapping corresponds to the following chemical families:
    • 0: Pyrrolidinium
    • 1: Pyridinium
    • 2: Piperidinium
    • 3: Ammonium
    • 4: Phosphonium
    • 5: Sulfonium
    • 6: Imidazolium
  • Cut Atoms Selector: Select one or multiple atom indices to dynamically remove them from the structure, opening up new coordination sites for branching.

3. Symmetry Configuration & Launch

  • Symmetry Dropdowns: Once an anchor placeholder ([*]) is detected on the remaining core structure, dropdown menus automatically appear to configure architectural symmetries.
  • Launch Button: Triggers the 4-step pipeline sequentially: Combinatorial Generation $\rightarrow$ SAScore & Anion Crossover $\rightarrow$ Deep Learning $T_m$ Forecasting $\rightarrow$ Visual Sampling.

๐Ÿš€ Execution & Interactive UI

Testing and running the pipeline is containerized inside the tests/ directory to protect production code from volatile Jupyter execution paths.

1. Launching the Interactive Test Notebook

Navigate to the tests/ directory and open test_pipeline.ipynb. Create a cell with the following block to append the local package and launch the graphical interface:

import os
import sys
import pandas as pd

# Append parent directory to sys.path so Python detects the package locally
sys.path.append(os.path.abspath('..'))

from ils_screening_tm.main import start_screening_interface

# Load the scaffold baseline database
df = pd.read_csv('../ils_screening_tm/database/base_cations.csv')

# Render the interactive dashboard
start_screening_interface(df)

2. Live Statistics Dashboard Output

Upon execution, a real-time tracking panel will render, enabling live slicing, atom cutting, and symmetry management. Clicking the "Launch Full Pipeline" button runs the 4 steps and outputs the following comprehensive analysis:

==================================================
 ๐Ÿ“Š SCREENING PIPELINE FINAL SUMMARY
==================================================
 Total stable ionic liquids retained : 295
--------------------------------------------------
 ๐ŸŒก๏ธ Predicted Melting Point (Tm):
   Minimum Predicted Tm              : -7.47ยฐC (265.68 K)
   Maximum Predicted Tm              : 99.62ยฐC (372.77 K)
   Average Predicted Tm              : 44.69ยฐC (317.84 K)
--------------------------------------------------
 ๐Ÿงช Synthetic Accessibility Score (SAScore):
   Minimum SAScore (Easiest)         : 5.65
   Maximum SAScore (Hardest)         : 5.98
   Average SAScore                   : 5.82
   (Scale: 1 = Very Easy, 10 = Extremely Difficult)
==================================================

๐Ÿ“ฆ Installation & Local Usage

Standard Installation (via PyPI)

If you prefer to run the screening pipeline locally on your machine, the package is officially hosted on PyPI. You can install it and all its core dependencies with a single command:

pip install ils-screening-tm

Local Installation

To install the package in editable development mode (useful if you want to modify the source code), clone the repository and run from the root directory:

pip install -e . 

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ils_screening_tm-0.1.2.tar.gz (96.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ils_screening_tm-0.1.2-py3-none-any.whl (96.3 MB view details)

Uploaded Python 3

File details

Details for the file ils_screening_tm-0.1.2.tar.gz.

File metadata

  • Download URL: ils_screening_tm-0.1.2.tar.gz
  • Upload date:
  • Size: 96.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.16

File hashes

Hashes for ils_screening_tm-0.1.2.tar.gz
Algorithm Hash digest
SHA256 630669262b5ba30eab822de9fb9a7093f7c211e7f90e43c5ea397635cdfeb5bc
MD5 2ba00beaf72576a546297eb23bcf1e22
BLAKE2b-256 673e86da6faa607678d3775a25172f2a47999880436b3f97b077a46c7192b8d8

See more details on using hashes here.

File details

Details for the file ils_screening_tm-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for ils_screening_tm-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ea8c6ff20f776a85859cd26044c8f22039b30fc1d46f9f304df45dda41e51376
MD5 98c6f91a35827243d8ad26fcc4d5c160
BLAKE2b-256 808fb5e967bd18220020b68f37bbaa579f3511357ddebd80e27cf403ff30fcbc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page