Metadata-Version: 2.4
Name: medchem
Version: 2.1.0
Summary: Medchem: Molecular filtering for drug discovery.
Author-email: Emmanuel Noutahi <emmanuel@valencediscovery.com>, Hadrien Mary <hadrien@valencediscovery.com>
License-Expression: Apache-2.0
Project-URL: Source Code, https://github.com/datamol-io/medchem
Project-URL: Bug Tracker, https://github.com/datamol-io/medchem/issues
Project-URL: Documentation, https://medchem-docs.datamol.io/
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Healthcare Industry
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE.md
License-File: medchem/data/LILLY_NOTICE
Requires-Dist: datamol>=0.12.5
Requires-Dist: fsspec>=2023.9.2
Requires-Dist: lark>=1.2
Requires-Dist: loguru>=0.7
Requires-Dist: networkx>=3.2
Requires-Dist: numpy>=1.26
Requires-Dist: pandas>=2.2
Requires-Dist: rdkit>=2024.9.1
Requires-Dist: typer>=0.16
Provides-Extra: test
Requires-Dist: ipykernel>=6.29; extra == "test"
Requires-Dist: nbconvert>=7.16; extra == "test"
Requires-Dist: nbformat>=5.10; extra == "test"
Requires-Dist: pyarrow>=15; extra == "test"
Requires-Dist: pytest>=8; extra == "test"
Requires-Dist: pytest-cov>=6; extra == "test"
Requires-Dist: pytest-xdist>=3.6; extra == "test"
Provides-Extra: docs
Requires-Dist: markdown-include>=0.8.1; extra == "docs"
Requires-Dist: mike>=2; extra == "docs"
Requires-Dist: mkdocs>=1.6; extra == "docs"
Requires-Dist: mkdocs-click>=0.8; extra == "docs"
Requires-Dist: mkdocs-jupyter>=0.25; extra == "docs"
Requires-Dist: mkdocs-material>=9.5; extra == "docs"
Requires-Dist: mkdocs-material-extensions>=1.3; extra == "docs"
Requires-Dist: mkdocstrings[python]>=0.30; extra == "docs"
Provides-Extra: dev
Requires-Dist: black>=25; extra == "dev"
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: pre-commit>=4; extra == "dev"
Requires-Dist: ruff>=0.11; extra == "dev"
Requires-Dist: twine>=6; extra == "dev"
Dynamic: license-file

<div align="center">
    <img src="docs/images/logo.png" height="200px">
    <h3>Medchem - Molecular filtering for drug discovery</h3>
</div>

---

[![PyPI](https://img.shields.io/pypi/v/medchem)](https://pypi.org/project/medchem/)
[![Conda](https://img.shields.io/conda/v/conda-forge/medchem?label=conda&color=success)](https://anaconda.org/conda-forge/medchem)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/medchem)](https://pypi.org/project/medchem/)
[![Conda](https://img.shields.io/conda/dn/conda-forge/medchem)](https://anaconda.org/conda-forge/medchem)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/medchem)](https://pypi.org/project/medchem/)
[![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE.md)
[![GitHub Repo stars](https://img.shields.io/github/stars/datamol-io/medchem)](https://github.com/datamol-io/medchem/stargazers)
[![GitHub Repo stars](https://img.shields.io/github/forks/datamol-io/medchem)](https://github.com/datamol-io/medchem/network/members)
[![test](https://github.com/datamol-io/medchem/actions/workflows/test.yml/badge.svg)](https://github.com/datamol-io/medchem/actions/workflows/test.yml)
[![release](https://github.com/datamol-io/medchem/actions/workflows/release.yml/badge.svg)](https://github.com/datamol-io/medchem/actions/workflows/release.yml)
[![code-check](https://github.com/datamol-io/medchem/actions/workflows/code-check.yml/badge.svg)](https://github.com/datamol-io/medchem/actions/workflows/code-check.yml)
[![doc](https://github.com/datamol-io/medchem/actions/workflows/doc.yml/badge.svg)](https://github.com/datamol-io/medchem/actions/workflows/doc.yml)

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](CHANGELOG.md) and the
[2.1.0 upgrade guide](docs/migration.md).

## Installation

Install from PyPI or conda-forge:

```bash
# 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](docs/migration.md) for details.

### Optional Lilly MedChem Rules

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

```bash
# 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

```bash
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:

```bash
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](LICENSE.md).
Bundled Lilly query data retain their [upstream attribution](medchem/data/LILLY_NOTICE).
The optional native tools are a separate upstream distribution.

## Citation

[![DOI](https://zenodo.org/badge/653814138.svg)](https://doi.org/10.5281/zenodo.14588937)
