Utilizing Deep Learning for Drug Lead Optimization
January 2, 2026 ยท View on GitHub
Overview
This project implements a Deep Learning-based Autoencoder to explore chemical space and generate novel drug analogues for lead optimization. The model is trained on chemical structures represented as SMILES (Simplified Molecular Input Line Entry System) strings. Specifically, it focuses on generating analogues for the FDA-approved cancer drug Vandetanib by introducing Gaussian noise into the model's latent space.
Quick Start
You can run the model directly in your browser using Google Colab:
Key Features
-
SMILES Preprocessing: Converts chemical text strings into padded integer sequences suitable for neural network training.
-
Generative Autoencoder:
-
Encoder: Compresses SMILES strings into a continuous, 100-dimensional latent space using LSTM and Embedding layers.
-
Decoder: Reconstructs the chemical structure from the latent representation.
-
Analogue Generation: Generates new molecular structures by adding controlled random noise to the latent vector of a known lead compound (Vandetanib).
-
Visualization: Uses RDKit to render 2D images of the generated chemical structures.
Prerequisites
The code is designed to run in a Python environment (e.g., Google Colab) and requires the following libraries:
- Python 3.x
- TensorFlow (v2.8.0 specified in the notebook)
- RDKit (for cheminformatics and chemical visualization)
- NumPy
- Scikit-learn
- Matplotlib
Installation
To set up the environment, run the following command to install the specific version of TensorFlow and other dependencies:
pip install tensorflow==2.8.0
pip install rdkit-pypi
Model Architecture
The neural network architecture consists of:
- Input Layer: Accepts padded SMILES sequences (length 100).
- Embedding Layer: Maps characters to 32-dimensional dense vectors.
- Encoder LSTM: A recurrent layer (64 units) that processes the sequence.
- Latent Space: A Dense layer (100 units) followed by Batch Normalization to ensure a Gaussian distribution of features.
- Decoder LSTM: Reconstructs the sequence from the latent vector.
- Output Layer: A TimeDistributed Dense layer with Softmax activation to predict character probabilities.
Usage
1. Data Preparation
The load_dataset function processes the dataset of SMILES strings:
- Maps unique characters to integers.
- Pads sequences to a fixed length of 100 characters.
2. Training (or Loading Weights)
The notebook includes code to define the model. It appears to load pre-trained weights (model_6_batch8192.h5) rather than training from scratch in the provided cells.
3. Generating Analogues
To generate new molecules:
- Input the SMILES string of the lead compound (e.g., Vandetanib).
- The Encoder converts this SMILES into a latent vector.
- Gaussian noise is added to this vector.
- The Decoder translates the noisy vector back into a new, slightly modified SMILES string.
4. Visualization
Run the visualization cells to display the chemical structure of the input drug and its generated analogues using RDKit's Draw.MolToImage.
Reference
This code is associated with the research paper: "Utilizing deep learning to explore chemical space for drug lead optimization" Authors: Rajkumar Chakraborty, Yasha Hasija Published in: Expert Systems With Applications, 2023