Reach for GenMol when the constraint is structural — a scaffold to decorate, two fragments to link, a motif to extend — and for REINVENT 4 when the constraint is a numeric objective you want a model to optimize against over many rounds. GenMol generates molecules as sequences of fragments using masked discrete diffusion, so substructure constraints are expressed in the representation itself rather than bolted onto a decoder. REINVENT 4 generates SMILES from an RNN or transformer prior and then reshapes that prior with reinforcement learning, transfer learning and curriculum stages against a scoring function you define. Neither is a screening tool: both produce candidate structures that still have to be filtered, docked and costed for synthesis. If you want the wider map of open tools first, see open-source computational drug discovery tools; for what happens to generated molecules downstream, see in silico ADMET vs in vivo.
The two methods, side by side#
| GenMol | REINVENT 4 | |
|---|---|---|
| Representation | SAFE: molecules as an unordered sequence of fragment blocks | SMILES strings |
| Generative model | Masked discrete diffusion, non-autoregressive bidirectional parallel decoding | RNN and transformer priors, generated left to right |
| How you steer it | Masking: fix the fragments you want kept, regenerate the rest | A scoring function, optimized by reinforcement learning with curriculum stages |
| Built-in modes | De novo, scaffold decoration, linker design, motif extension, lead optimization | De novo design, R-group replacement, library design, linker design, scaffold hopping, molecule optimization |
| Multi-objective design | Not intrinsic: score the output in a separate step | Intrinsic: weighted scoring components inside the loop |
| Interface upstream | NVIDIA model, GitHub | Command-line tool reading TOML or JSON config, Apache 2.0, GitHub |
| On .bloom* | genmol_generate, the preferred generator — docs | reinvent4_generate, soft-deprecated — docs |
How GenMol works: fragments as the unit of generation#
The interesting choice in GenMol is not the diffusion, it is what the diffusion operates on. GenMol generates SAFE sequences — Sequential Attachment-based Fragment Embedding, a line notation introduced by Noutahi et al. that rewrites a SMILES string as an unordered sequence of interconnected fragment blocks while staying parseable by ordinary SMILES parsers (Digital Discovery 2024). Because the fragments are blocks rather than characters, tasks like scaffold decoration, fragment linking and scaffold hopping become ordinary sequence-completion problems instead of special decoding procedures. The SAFE authors demonstrated the representation by training an 87-million-parameter GPT2-like model on a dataset of 1.1 billion SAFE representations.
GenMol builds on that representation with a single masked discrete diffusion model rather than an autoregressive one. Per the GenMol paper, it decodes SAFE sequences through non-autoregressive bidirectional parallel decoding, so the model can use molecular context that does not depend on token ordering; it introduces fragment remasking, which optimizes a molecule by masking and regenerating chosen fragments; and it adds molecular context guidance, a guidance method tailored to its masked diffusion (Lee et al., arXiv:2501.06158). The authors report that GenMol significantly outperforms the previous GPT-based model on de novo and fragment-constrained generation, and reaches state-of-the-art performance on goal-directed hit generation and lead optimization.
Fragment remasking is the part worth internalizing, because it explains the fit. "Keep this hinge binder, regenerate the solvent-exposed arm" is a masking pattern. You do not need a reward signal to express it.
How REINVENT 4 works: a prior plus an optimization loop#
REINVENT 4 is AstraZeneca's open-source generative framework, published in the Journal of Cheminformatics in 2024. Its design is explicitly two-part: recurrent neural network and transformer architectures drive molecule generation, and those generators are embedded within general machine learning optimization algorithms — transfer learning, reinforcement learning and curriculum learning (Loeffler et al., 2024). The framework covers de novo design, R-group replacement, library design, linker design, scaffold hopping and molecule optimization, and it runs as a command-line tool that reads a user configuration in TOML or JSON. It is released under Apache 2.0.
The optimization loop is the product. A scoring function made of weighted components — a QED term, a Tanimoto similarity to a reference, physicochemical filters, SMARTS blocklists, a custom Python scorer — defines the target profile, and the RL loop samples, scores and updates the agent so that high-scoring structures become more likely. Curriculum stages let you warm up on an easy objective before switching to the real one, and diversity filters such as penalizing repeated Murcko scaffolds are there because the failure mode of a well-rewarded agent is collapsing onto one scaffold. Our scoring functions and RL loops and curriculum pages walk through the config.
This is a genuinely different shape of control from masking. You are not saying which atoms to keep; you are saying what "better" means and paying compute until the model believes it.
Which tasks suit which method#
Pick GenMol for structural constraints. Scaffold decoration, linker design between two fragments, and motif extension all reduce to "hold these blocks fixed, generate the rest" — which is exactly what SAFE plus masking expresses natively. Lead optimization around a starting molecule under a similarity constraint is the same shape: fragment remasking regenerates part of a known compound rather than sampling a new one from scratch. Unconstrained de novo generation also works, and is the default.
Pick REINVENT 4 for a numeric objective over many rounds. If the question is "give me molecules that are simultaneously drug-like, similar to this reference, free of these alerts, and predicted active", you want a loop that scores and reweights, not a sampler you post-filter. The same applies when you need the surrounding machinery: transfer learning onto a focused dataset, diversity filters, curriculum stages, or a reproducible config you can commit to a repository.
Neither is the right answer when the real task is enumeration. If you want analogues of a known compound by matched-molecular-pair logic or scaffold replacement rules, a cheminformatics approach gets there faster and more interpretably — see the RDKit tooling. Generative models earn their cost when you want structures the rules would not propose.
What GuacaMol and MOSES do and do not tell you#
Both tools get compared on two standard suites, and it is worth knowing what each one measures.
GuacaMol (Brown et al., Journal of Chemical Information and Modeling 2019) splits evaluation into distribution-learning benchmarks — validity, uniqueness, novelty, how well the generated set matches ChEMBL's property distributions — and goal-directed benchmarks, where a model must optimize toward specified objectives (doi:10.1021/acs.jcim.8b00839).
MOSES (Polykovskiy et al.) standardizes the training and test datasets and the metric set so that models are compared on the same footing rather than on each author's own split (arXiv:1811.12823).
The caveat that matters for a project decision: these suites measure properties of the generated distribution and performance against computational objectives. A high score on a goal-directed benchmark means the model optimized a cheap oracle well. It is not evidence that the molecules are synthesizable, selective, or active in an assay. Treat benchmark rankings as a reason to try a model, never as a substitute for running your own filters on your own series.
Limitations to plan around#
- Validity is a setting, not a constant. On .bloom*, GenMol's default
generation_priority="quality"uses BRICS fragment slicing and produces around 95% chemically valid outputs; switching to"novelty"uses HR slicing for more diverse structures at roughly 75–85% validity. Expect to generate more than you need and deduplicate. - A valid molecule is not a makeable molecule. Chemical validity is a parser check. Route feasibility is a separate question, and the honest way to answer it is to run retrosynthesis on the output — see AiZynthFinder.
- Fragments must be fragments. GenMol's constrained modes take small substructures with attachment points, not complete drug molecules. Decompose first, then pass the pieces; the backend rejects whole molecules supplied as fragments.
- An RL run can converge on one scaffold. Reward hacking in generative chemistry looks like a thousand near-identical molecules with excellent scores. Diversity filters exist for this and should be on by default.
- Scoring components inherit their own error bars. A REINVENT objective built on predicted properties optimizes the predictor, not the property. If a component model is weak on your chemotype, the loop will exploit that weakness.
reinvent4_generateis soft-deprecated on .bloom*. It still runs, and we have kept it rather than removing it, but GenMol is the default generator. Reach for REINVENT by name when you specifically want its RL features.
How to run both on .bloom*#
Both generators run as GPU jobs and both need you to be signed in. Ask for what you want in plain language and the platform routes it; the Generative and de novo overview lists the whole domain.
GenMol (genmol_generate) takes a run type, a molecule count from 1 to 10,000, a sampling temperature, and — for the constrained modes — an array of fragment SMILES. Its modes are de novo, scaffold decoration, linker design, motif extension and lead optimization, the last of which takes a starting molecule plus a minimum Tanimoto similarity. It returns a CSV of SMILES with computed properties alongside a JSON results file, so the output drops straight into a downstream tool. Note that scoring against an objective is an explicit next step here, not a loop inside the job: generate, then score. Start with the GenMol quickstart and inputs.
REINVENT 4 (reinvent4_generate) runs sampling, sampling-with-scoring, or scoring of molecules you supply, across the reinvent, libinvent, linkinvent, mol2mol and pepinvent generators. It returns a CSV of SMILES with the model's negative log-likelihood per molecule. Multi-stage transfer learning and staged RL campaigns are configured through the dedicated REINVENT form rather than a single chat request — the datasets and outputs pages cover setup and what comes back.
The chain after either one matters more than the choice between them. A useful default: generate, filter for drug-likeness and structural alerts with RDKit, screen the survivors with ADMET-AI, then run retrosynthesis on whatever is left to see which candidates have a route. The filter compounds for drug-likeness and hit to lead recipes are runnable versions of that pass. Reporting the attrition at each stage is the honest measure of a generative run — not the number of molecules it produced.
Generate, filter and cost a route for your own series on the .bloom* platform.
References#
- Lee, S. et al. "GenMol: A Drug Discovery Generalist with Discrete Diffusion." (2025). arXiv:2501.06158 · GitHub
- Loeffler, H. H., He, J., Tibo, A., Janet, J. P., Voronov, A., Mervin, L. H. & Engkvist, O. "Reinvent 4: Modern AI-driven generative molecule design." Journal of Cheminformatics 16, 20 (2024). doi:10.1186/s13321-024-00812-5 · GitHub
- Noutahi, E., Gabellini, C., Craig, M., Lim, J. S. C. & Tossou, P. "Gotta be SAFE: a new framework for molecular design." Digital Discovery 3, 796–804 (2024). doi:10.1039/D4DD00019F · arXiv:2310.10773 · GitHub
- Brown, N., Fiscato, M., Segler, M. H. S. & Vaucher, A. C. "GuacaMol: Benchmarking Models for de Novo Molecular Design." Journal of Chemical Information and Modeling 59, 1096–1108 (2019). doi:10.1021/acs.jcim.8b00839 · GitHub
- Polykovskiy, D. et al. "Molecular Sets (MOSES): A Benchmarking Platform for Molecular Generation Models." (2018). arXiv:1811.12823 · GitHub