Skip to main content

QSARcons - smart search for consensus of QSAR models

The motivation behind this project is that there are many available chemical descriptors and machine learning methods, and usually, it is not obvious which combination to prefer for modelling the target property of the molecule. Therefore, the idea is just to build multiple (>100) simple individual QSAR models with diverse descriptors and algorithms, and then a genetic algorithm to smartly optimize the subset of models delivering the best performance on the validation dataset.

Motivation

1. Simple design: QSARcons focuses on simplicity of use. The default pipeline just requires training and test data.

2. Traditional QSAR: QSARcons includes a wide range of traditional molecular descriptors and machine learning algorithms, providing a transparent baseline for comparison with more advanced approaches like deep learning-based or complex QSAR workflows.

3. Universal workflow - QSARcons can be applied to any type of chemical property modelling.

Overview

QSARcons provides a two-layer workflow.

1. Model generation

Build multiple QSAR models (>100) using 2D chemical descriptors and traditional machine learning algorithms. The individual model building pipeline is kept simple, without advanced data preprocessing. Optional in-house stepwise hyperparameter optimization is available for all ML methods.

2. Consensus search

Identify the optimal subset of QSAR models using several search strategies:

  • Random search

  • Systematic search

  • Genetic search

Installation

pip install qsarcons

QSARcons benchmarking

QSARcons can be easily benchmarked against alternative approaches. For that, just call the default pipeline function below. Input data are dataframes where the first column is molecule SMILES and the second column is molecule property (regression or binary classification).

from datasets import load_dataset
from qsarcons.meta import ConsensusModel

train_df = load_dataset("openadmet/openadmet-expansionrx-challenge-data", split="train").to_pandas()
test_df = load_dataset("openadmet/openadmet-expansionrx-challenge-data", split="test").to_pandas()

prop_name = "Caco-2 Permeability Efflux"
train_df = train_df[["SMILES", prop_name]].dropna()
test_df = test_df[["SMILES", prop_name]].dropna()

output_folder = f"{prop_name}_qsarcons"

model = ConsensusModel(hopt=False, output_folder=output_folder, verbose=True)
test_df_pred = model.run_predict(train_df, test_df)

print(model.best_cons)

Colab

See an example in QSARcons pipeline .

QSARcons Basic vs. QSARcons Pro

The QSARcons idea is that diverse and strong individual models can be combined to even stronger consensus. Currently, two versions are under development:

  • QSARcons Basic: includes RDKit descriptors + scikit-learn ML methods

  • QSARcons Pro: will include QSARcons Basic + other workflows for building individual models (e.g. chemprop and QSARmil) to combine traditional and advanced modelling approaches into stronger consensuses

Metadata

Release files for qsarcons 1.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qsarcons 1.1.5
File Size Uploaded
qsarcons-1.1.5.tar.gz 16.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for qsarcons 1.1.5
File Interpreter ABI Platform
qsarcons-1.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 33.5 kB

Release files / qsarcons-1.1.5.tar.gz

Download URL qsarcons-1.1.5.tar.gz
Size 16.0 kB
Tags Source
SHA-256 checksum
How to use checksums
af560f77e4ca50fa762052fca11f3deffc145d8589259b0dbc3cbc9b1e126999
BLAKE2b-256 checksum
How to use checksums
9edde32d0859a87d7caa36e0a6a70a360c071f36eb82ea25a0bc591287adc7c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.20

Release files / qsarcons-1.1.5-py3-none-any.whl

Download URL qsarcons-1.1.5-py3-none-any.whl
Size 17.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
80f187c4bb4c4a8361a8b96034483d1f1cda53205fe91ebfe44de1e4996a79c7
BLAKE2b-256 checksum
How to use checksums
0443834d2d69ea004ab5eef81e6f68363fec086aac6b99f617160c3c61c2543c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.20

Release history Release notifications | RSS feed

1.1.7

2 release files

1.1.6

2 release files

This release

1.1.5 This release

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page