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):
๐ 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d3b015ed100271bc41997de88518c994e49af6b92a0cf1ad5ed0ef1a91398fc
|
|
| MD5 |
a77033ea2a8995fbeb2a18da3475eef0
|
|
| BLAKE2b-256 |
15bb51972f6d59b76f8ab12245d12492223967db91b4e26558582d215cd23624
|
File details
Details for the file ils_screening_tm-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ils_screening_tm-0.1.1-py3-none-any.whl
- Upload date:
- Size: 96.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a91c8d27b8f1faf5caf9daf1cda58545087c87ac2c0f96232c36c4a90c7f518
|
|
| MD5 |
0287b6523aef675ce97b6c55dea27676
|
|
| BLAKE2b-256 |
269cd2a52e15390fefc9fc2710e92b3d3356484cd3a443d1f19b8100bcb05327
|