pKaPredict project
Project description
pKaPredict
📦 Overview
pKaPredict is a cheminformatics tool that predicts the acid dissociation constant (pKa) of chemical compounds from their SMILES strings. The package is designed to be easily pip-installable and modular, making it ideal for cheminformatics applications. The package combines RDKit generated molecular descriptors with a pre-trained LGBMRegressor model for fast, reproducible predictions. The workflow includes training data preprocessing, descriptor generation, model loading, prediction, and result visualization.
💡 Main Functions :
Functions used to train the machine learning model on a training dataset
→ clean_and_visualize_pka Cleans the training dataset by removing duplicates and missing values; also provides basic visualizations for data exploration.
→ RDKit_descriptors Transforms a DataFrame of SMILES into molecular descriptors, used for training the model.
→ plot_data Creates scatter plots comparing predicted vs. experimental pKa values to evaluate model performance and choose the most adapted model for this usage.
Core functions for predicting pKa from user-provided SMILES inputs
→ load_model Loads the pre-trained LightGBM model optimized for pKa prediction.
→ smiles_to_rdkit_descriptors Converts a user-provided SMILES input into a vector of RDKit molecular descriptors.
→ predict_pKa Takes molecular descriptors as input and returns predicted pKa values using the loaded model.
👩💻 Installation
- Clone the repository:
git clone https://github.com/anastasiafloris/pKaPredict.git
cd pKaPredict
- Create and activate the conda environnement:
conda create -n pkapredict_env python=3.10 -y
conda activate pkapredict_env
- Install the package:
pip install pKaPredict
🍏 For macOS users (⚠ required for LightGBM to work):
- Install the system library libomp:
brew install libomp
If brew is not installed, follow the instructions here: https://brew.sh
- Navigate to the root directory of the package in your terminal:
cd src
cd pkapredict
- The package is yours 🎁:
Run the test_package.py file in your terminal to predict the pKa of a molecule of your choice, using its SMILES string:
python test_package.py
🪪 License
This project is licensed under the MIT License.
You are free to use, modify, and distribute it with proper attribution.
📗 References
The dataset used in this project is the test_acids_bases_descfinal_nozwitterions.csv file from the cbio3lab repository.
It was originally extracted from the Harvard Dataverse.
👯♀️ Authors
This project was completed as part of the EPFL course Practical Programming in Chemistry.
Project details
Release history Release notifications | RSS feed
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 pkapredict-0.1.7.tar.gz.
File metadata
- Download URL: pkapredict-0.1.7.tar.gz
- Upload date:
- Size: 4.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4abb06712343efb1672e65a3aaee209fc34b2c787c8997a6be22d96ecdf13c57
|
|
| MD5 |
ec0a2011128b4339afe7686c25493784
|
|
| BLAKE2b-256 |
46fd7225f417248f0041832fba1db589dc0a5e76181e7657fe554852397c454b
|
File details
Details for the file pkapredict-0.1.7-py3-none-any.whl.
File metadata
- Download URL: pkapredict-0.1.7-py3-none-any.whl
- Upload date:
- Size: 147.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba04f476aa3599ba4b0746041590de9628cbe22809d773bdc08beb6372ceb8d5
|
|
| MD5 |
aefac1db76a9bd2328cffa55e5aec881
|
|
| BLAKE2b-256 |
6ff24ec5e6cb3d4f6c1fa3f6a336c3d6bb136ec32aecd9dba55f09ece1a9f213
|