Molecule design by reinforcement learning and TOML configs
REINVENT4 generates optimized small molecules via reinforcement learning against a user-defined score, covering everything from scaffold hops to linker design.

What it does
REINVENT4 is a command-line generative chemistry toolkit aimed at early-stage drug discovery. It trains models with reinforcement and transfer learning to propose novel compounds that satisfy a multi-component property profile. The software handles de novo design, scaffold hopping, R-group replacement, linker design, and general molecule optimization.
The interesting bit
The scoring layer is built around Python native namespace packages, so you can add custom scoring components by dropping a file on your PYTHONPATH without patching the core repository. Configuration is declarative and TOML-first, with JSON and YAML tolerated as alternatives.
Key highlights
- Unifies de novo design, scaffold hopping, R-group replacement, linker design, and optimization in a single pipeline.
- Extensible scoring via a plugin architecture that uses native namespace packages—no core code changes required.
- Linux is fully validated; Windows and macOS are supported with limited testing and reduced hardware options.
- A GPU is strongly recommended for transfer learning and model training, though pure reinforcement-learning runs lean heavily on CPU-based scoring.
- Public prior models, example configurations, and jupytext notebooks are provided.
Caveats
- Windows and macOS support is explicitly partial and limited; Linux is the only fully validated platform.
- Some optional scoring components and the full test suite require a proprietary OpenEye license.
Verdict
Medicinal chemists and computational drug-discovery teams who want a programmable, extensible generative pipeline will find a solid workhorse here. If you expect a point-and-click GUI or a one-button solution, this is not your shortcut.
Frequently asked
- What is MolecularAI/REINVENT4?
- REINVENT4 generates optimized small molecules via reinforcement learning against a user-defined score, covering everything from scaffold hops to linker design.
- Is REINVENT4 open source?
- Yes — MolecularAI/REINVENT4 is open source, released under the Apache-2.0 license.
- What language is REINVENT4 written in?
- MolecularAI/REINVENT4 is primarily written in Python.
- How popular is REINVENT4?
- MolecularAI/REINVENT4 has 822 stars on GitHub.
- Where can I find REINVENT4?
- MolecularAI/REINVENT4 is on GitHub at https://github.com/MolecularAI/REINVENT4.