Skip to main content

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

Metadata

Release files for medchem 2.1.1

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

Source distribution (sdist)

Source distribution for medchem 2.1.1
File Size Uploaded
medchem-2.1.1.tar.gz 1.4 MB Details

Built distribution (wheel)

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

Total release size: 1.8 MB

Release files / medchem-2.1.1.tar.gz

Download URL medchem-2.1.1.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
6634e144e2a7f7baed34ac268bda06184e069b35ce8a5af8ce17ecdfa4a50bab
BLAKE2b-256 checksum
How to use checksums
fcc78e460c138e01aab52d8aac30f12bf5349a3b4ec81216bd682418c9104039
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.8 {"installer":{"name":"uv","version":"0.12.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release files / medchem-2.1.1-py3-none-any.whl

Download URL medchem-2.1.1-py3-none-any.whl
Size 424.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1590cdd1577098558ddbd3da84b1cd8adae4373df71ae6301ea1c384290237db
BLAKE2b-256 checksum
How to use checksums
37e944abe1d7f4aa8d10fe182071f8f79cd06334634efb037d6bfbc983098979
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.8 {"installer":{"name":"uv","version":"0.12.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.1.1 This release

2 release files

2.1.0

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

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