Medchem is a Python library that proposes multiple molecular medchem filters to a wide range of use cases relevant in a drug discovery context.
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.
Install from PyPI or conda-forge:
# uv (recommended)
uv add medchem
# pip
pip install medchem
# conda-forge
micromamba install -c conda-forge medchemMedchem 2.1.0 supports Python 3.11 through 3.14 and RDKit 2024.09 or newer. See the upgrade guide for details.
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-lillyThe 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.
Visit https://medchem-docs.datamol.io/.
uv sync --all-extras
uv run medchem install-lillyenv.yml remains available when a Conda development environment is required.
You can run tests locally with:
uv run python -m pytest -m "not integration"
uv run python -m pytest -m integration --no-cov -n 0The 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.
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.
