Skip to main content

Package for prediction of chemical species properties from SMILES.

Project description

logo for tgboost

tgBoost

tgBoost is a pipeline englobing QSPR model optimized for the prediction of the glass transition temperature (Tg) of monomer organic compounds. The pipeline is based on mol2vec, a machine learning (ML) algorithm converting molecular SMILES into molecular embeddings. The pipeline can be exapanded to include further QSAR/QSPR models developed from SMILES notation.

Motivation

tgBoost is a kickstart project aiming at expanding the use of ML, Data Engineering and QSAR/QSPR models in atmospheric and physical chemistry. The pipeline comes with a pretrained and ML powered QSPR model predicting Tg of monomer organic compounds. The model is based on a Extreme Gradient Boosting framework (XGBoost) and it is developed from the largest dataset of experimental Tg of monomer organic molecules (Koop et al., 2011).

Requirements

Installation

pip install https://github.com/U0M0Z/tgpipe

tgBoost library needs the independent installation of mol2vec via pip within the working environment:

pip install git+https://github.com/samoturk/mol2vec

Build status

Build status of continus integration i.e. travis, appveyor etc. Ex. -

Build Status Windows Build Status

Documentation

Details on the statistical analysis performed to develop the model and pipeline are found in the supporting article.

Usage

Basic use

This code uses the tgPipeline to train tgBoost a QSPR model for Tg prediction. The QSPR model is based on rdkit, mol2vec and xgboost. In order to use the model on your machine, you need to retrain the model to be conform to the C++ signature of your processor.

The tgBoost model is built, trained, and saved in ./trained_models with the command:

python tgPipeline/tgboost/train_pipeline.py

Check for the following message to confirm successful model training:

*** EXTRACTION step
n_input SMILES:  415 

*** TRANSFORMING step
n_output SMILES:  298 

~~ DATA info
Xtrain:  298 ytrain:  298 Xtest:  0 ytest:  0 

*** REGRESSION step

PIPELINE completed:
_ ~ ^ ~ _ ~ _ ~ ^ ~ _ ~ _ ~ ^ ~ _ ~ ^ ~ _ ~ ^ ~ _
  __       ___                __ 
 / /____ _/ _ )___  ___  ___ / /_
/ __/ _ `/ _  / _ \/ _ \(_-</ __/
\__/\_, /____/\___/\___/___/\__/ 
   /___/                         
_ ~ ^ ~ _ ~ _ ~ ^ ~ _ ~ _ ~ ^ ~ _ ~ ^ ~ _ ~ ^ ~ _

As python module

from tgboost import tgboost.processing.smiles_manager as sm
from tgboost import predict

The first line imports functions to open and preprocess files containing SMILES used for predictions, and the second line imports functions for predicting Tg of SMILES.

Check notebooks repository for examples and details.

How to cite?

✨ 🍰 ✨

@Article{D1EA00090J,
author ="Galeazzo, Tommaso and Shiraiwa, Manabu",
title  ="Predicting glass transition temperature and melting point of organic compounds via machine learning and molecular embeddings",
journal  ="Environ. Sci.: Atmos.",
year  ="2022",
volume  ="2",
issue  ="3",
pages  ="362-374",
publisher  ="RSC",
doi  ="10.1039/D1EA00090J",
url  ="http://dx.doi.org/10.1039/D1EA00090J"
}

Contribute

Contact at tommaso.galeazzo@gmail.com

Credits

Initial development was supported by AirUCI, Irvine, CA.

License

BSD 3-clause © Tommaso Galeazzo

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

tgapp-0.0.6.tar.gz (57.7 MB view details)

Uploaded Source

Built Distribution

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

tgapp-0.0.6-py3-none-any.whl (57.4 MB view details)

Uploaded Python 3

File details

Details for the file tgapp-0.0.6.tar.gz.

File metadata

  • Download URL: tgapp-0.0.6.tar.gz
  • Upload date:
  • Size: 57.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.9.6 requests/2.25.1 requests-toolbelt/0.10.1 tqdm/4.60.0 CPython/3.7.9

File hashes

Hashes for tgapp-0.0.6.tar.gz
Algorithm Hash digest
SHA256 8e6343b901b4595f66c0d2b7745e250aa90b781134436d8ac514b3cc05b44af6
MD5 8f2b08e2a53101ddceca736a5248b3d0
BLAKE2b-256 834ef633bafae20caf474c0ac953fe9606a691225d7b701899da84db2d69cf04

See more details on using hashes here.

File details

Details for the file tgapp-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: tgapp-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 57.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.9.6 requests/2.25.1 requests-toolbelt/0.10.1 tqdm/4.60.0 CPython/3.7.9

File hashes

Hashes for tgapp-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 6018b81502964bf8195f6048a0cfcd4e0ecabc308e44b0100ad8111bfa2691e5
MD5 ab1a0d450679a35dc2eff4fdb8c41ce5
BLAKE2b-256 f13b1395d92432ea1ac225abc3bd300fc43a70e803e3305f049881eba25c6cca

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