Message Passing Neural Networks for Molecules, Rebuilt From Scratch
If you've ever tried to predict a molecule's properties with machine learning, you know the drill: you either hand-engineer descriptors and hope they capture the right chemistry, or you wrestle a graph neural network into submission. Chemprop sits right in that space, and it recently got a full rewrite. If you work with molecular data, this one's worth a look.
What It Does
Chemprop is a repository containing message passing neural networks for molecular property prediction. In plain terms, it takes molecules (and, based on the references, reactions too) and learns representations of them so you can predict things like activity, toxicity, or other chemical properties. Instead of you deciding which features matter, the network learns them.
The project just went through a ground-up rewrite and a new major release, v2.0.0. That's not a minor version bump with a changelog full of deprecations. It's a rebuild, and the maintainers have published a transition guide that includes a side-by-side comparison of CLI arguments between v1 and v2, a list of which arguments are coming in later v2 releases, and a rundown of changes to default hyperparameters. If you've been using v1, that guide is the first thing you'll want to read.
There's also documentation over on Read the Docs and tutorial notebooks in the examples/ directory, so you're not left piecing things together from source alone.
Why It's Cool
-
It's honest about its own history. A lot of projects quietly rewrite themselves and leave users to figure out what broke. Chemprop published a whole transition document covering CLI argument differences and default hyperparameter changes. That kind of transparency saves you hours of debugging.
-
The theory is documented, not just the code. The README cites the foundational papers—the original work on analyzing learned molecular representations for property prediction, and the paper on learned representations of the condensed graph of reaction. You can actually understand why the architecture works instead of treating it as a black box.
-
It handles reactions, not just molecules. The reaction support comes from that condensed graph of reaction paper, which broadens the scope beyond the usual small-molecule property prediction.
-
Interpretability is built in. There's interpretation functionality available in v2 as an example notebook, based on the multi-objective molecule generation paper. If you need to explain why a model made a prediction—not just what it predicted—that matters.
-
Atom and bond predictions are covered. These are based on work examining when quantum mechanical descriptors help graph neural networks predict chemical properties, which is a question worth asking before you bolt on expensive QM features.
-
It's been used for real science. Chemprop was used to predict antibiotic activity against E. coli, which led to the discovery of Halicin, published in Cell in 2020. That's a concrete example of the tool doing something that mattered.
One detail worth flagging: the README notes a known inconsistency between the cited references and the repository. The edge update function in all chemprop versions uses preactivation instead of postactivation initial edge hidden states. The specifics are in the supplementary information of the v2 paper. It's a small thing, but it's the kind of note that tells you the maintainers are paying attention to the gap between paper and implementation.
How to Try It
Getting started is straightforward. Chemprop is on PyPI and conda-forge, so pick whichever fits your environment:
pip install chemprop
Or with conda:
conda install -c conda-forge chemprop
From there, head to the tutorial notebooks in the examples/ directory. They'll walk you through the workflow better than any README summary can. The full documentation lives at chemprop.readthedocs.io.
If you're migrating from v1, read the transition guide first—it's linked in the README and covers the argument mapping and hyperparameter changes you'll need to account for.
Everything is MIT licensed, so you can use it freely. The logo is CC0.
The repository is at github.com/chemprop/chemprop.
Final Thoughts
Chemprop is a mature, well-documented tool that's been validated in real research. The v2 rewrite is the headline here—if you're starting fresh, you get the new architecture and the cleaner design. If you're on v1, the transition guide softens what could otherwise be a painful upgrade. It's best suited for computational chemists and ML practitioners who work with molecular or reaction data and want learned representations without building the pipeline themselves. If that's you, the tutorials and documentation make it easy to find out whether it fits your problem.