Skip to content

Repository files navigation

Medchem - Molecular filtering for drug discovery


PyPI Conda PyPI - Downloads Conda PyPI - Python Version license GitHub Repo stars GitHub Repo stars test release code-check doc

Medchem is a Python library that proposes multiple molecular medchem filters to a wide range of use cases relevant in a drug discovery context.

Updates

Medchem 2.1.0 updates the supported Python and RDKit stack, adds RDKit SpacialScore support, corrects the Toxicophore Michael-acceptor rule, and refreshes the optional Lilly MedChem Rules integration against upstream 2.1. The Lilly wrapper now preserves every input row, uses the reference thresholds and query set, supports parallel batches, and streams its native stages.

See the complete changelog and the 2.1.0 upgrade guide.

Installation

Install from PyPI or conda-forge:

# uv (recommended)
uv add medchem

# pip
pip install medchem

# conda-forge
micromamba install -c conda-forge medchem

Medchem 2.1.0 supports Python 3.11 through 3.14 and RDKit 2024.09 or newer. See the upgrade guide for details.

Optional Lilly MedChem Rules

LillyDemeritsFilters uses the upstream Lilly command-line tools. Install them once after Medchem:

# pip or conda-forge environment
medchem install-lilly

# uv-managed project
uv run medchem install-lilly

The installer compiles the pinned upstream 2.1 tools from source, so a C++ toolchain is required: Linux needs a C++ compiler, GNU Make, zlib, and Ruby; macOS needs the Xcode command-line tools and Ruby. On Windows, run it through WSL.

Documentation

Visit https://medchem-docs.datamol.io/.

Development lifecycle

Setup dev environment

uv sync --all-extras
uv run medchem install-lilly

env.yml remains available when a Conda development environment is required.

Tests

You can run tests locally with:

uv run python -m pytest -m "not integration"
uv run python -m pytest -m integration --no-cov -n 0

The first command is the fast core suite. The second runs the available Lilly 2.1 checks and executable tutorials. GitHub Actions validates the Python core on Linux, Windows, macOS Apple Silicon, and macOS Intel. The pinned Lilly release is built and tested separately on Linux and both macOS architectures.

License

Under the Apache-2.0 license. See LICENSE.md. Bundled Lilly query data retain their upstream attribution. The optional native tools are a separate upstream distribution.

Citation

DOI

About

Molecular filtering for drug discovery.

Resources

Code of conduct

Stars

78 stars

Watchers

4 watching

Forks

Releases

Used by

Contributors

Languages