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

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.0
File Size Uploaded
medchem-2.1.0.tar.gz 1.4 MB Details

Built distribution (wheel)

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

Total release size: 1.8 MB

Release files / medchem-2.1.0.tar.gz

Download URL medchem-2.1.0.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
2c863bf33e72afe6c05bf70e19abbb6ce41a0dc7054242b827a7492be2aa337b
BLAKE2b-256 checksum
How to use checksums
dfc27505f15e25185fd5c07b6d4ba514d3b4dfabed23359a5e61d166052c48a4
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 9, 2026.

Transparency log

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

Download URL medchem-2.1.0-py3-none-any.whl
Size 424.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da6b19adc49ca4760d93c770f62d6521f4e49315b8830aa365df8e063e2d42fe
BLAKE2b-256 checksum
How to use checksums
1ea1ace3ee4ed5489407ab9253974681bc5b16bef3c39b96be47d295c394d91b
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 9, 2026.

Transparency log

Release history Release notifications | RSS feed

2.1.1

2 release files

This release

2.1.0 This release

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