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.4

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.4
File Size Uploaded
qsarcons-1.1.4.tar.gz 16.1 kB Details

Built distribution (wheel)

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

Total release size: 33.8 kB

Release files / qsarcons-1.1.4.tar.gz

Download URL qsarcons-1.1.4.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3a57ea6035d9d4705152f0d46f7adaca9345c611d4d1473929b143e47f43a9b5
BLAKE2b-256 checksum
How to use checksums
b64dde82b24d8f9ac46721f2885f82386ab465bb4a0eb461eb2c984c1cd2a9eb
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.4-py3-none-any.whl

Download URL qsarcons-1.1.4-py3-none-any.whl
Size 17.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da0f248d3e8c8de09f7f24d4a0cc482077c8663374fb0e296101fdcf6dd7f735
BLAKE2b-256 checksum
How to use checksums
4073b65f7fa43dae3059cc5eeaae4ceba48128c8fadfc274db963b0eaa5c3565
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

1.1.5

2 release files

This release

1.1.4 This release

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