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

๐Ÿ“‚ 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.

๐Ÿš€ 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.1.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.1-py3-none-any.whl (96.3 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ils_screening_tm-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 1d3b015ed100271bc41997de88518c994e49af6b92a0cf1ad5ed0ef1a91398fc
MD5 a77033ea2a8995fbeb2a18da3475eef0
BLAKE2b-256 15bb51972f6d59b76f8ab12245d12492223967db91b4e26558582d215cd23624

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ils_screening_tm-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2a91c8d27b8f1faf5caf9daf1cda58545087c87ac2c0f96232c36c4a90c7f518
MD5 0287b6523aef675ce97b6c55dea27676
BLAKE2b-256 269cd2a52e15390fefc9fc2710e92b3d3356484cd3a443d1f19b8100bcb05327

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