| name | generative-design |
| description | Generate and optimise novel small molecules with REINVENT 4 — de novo sampling from a chemical language model, scaffold decoration with LibInvent, fragment linking with LinkInvent, and similarity-constrained analogue generation with Mol2Mol. Use this skill to set up reinforcement-learning or curriculum runs, compose a multi-parameter scoring function from docking scores, predictive models, and physicochemical desirability, and read the resulting sampled sets. Also trigger on REINVENT, LibInvent, LinkInvent, Mol2Mol, scaffold hopping, R-group replacement, linker design, chemical language model, or reinforcement-learning molecule optimisation. |
| license | MIT |
| allowed-tools | Read Write Edit Bash |
| compatibility | Requires Python 3.10+. The bundled scripts build REINVENT TOML configuration and parse sampled CSV output using only the standard library. Running a generation job needs REINVENT 4 installed from github.com/MolecularAI/REINVENT4 (not on PyPI, Apache-2.0) with its model priors, and an NVIDIA GPU for practical reinforcement-learning throughput. |
| metadata | {"version":"1.0","skill-author":"K-Dense Inc.","openclaw":{"emoji":"🧪","homepage":"https://github.com/MolecularAI/REINVENT4"},"hermes":{"category":"research"}} |
Generative Molecular Design
The Design half of design-make-test-analyse. REINVENT 4 turns a scoring function into molecules —
de novo, or by decorating a scaffold, linking two fragments, or transforming a known active. It is
the most capable open-source generative framework in medicinal chemistry, and it will optimise
exactly what you ask for, including the parts you did not mean.
Tool: REINVENT 4 v4.8, Apache-2.0.
Not on PyPI — git clone and pip install -e .. Priors ship with the repository. An NVIDIA
GPU is effectively required for reinforcement learning.
Checked against: v4.8, June 2026.
Read references/reinvent-configuration.md before writing a
run file, references/scoring-functions.md before defining an
objective, and
references/evaluating-generated-molecules.md
before believing the output — that one is judgement, not syntax.
The three scripts
| Script | Answers |
|---|
reinvent_config.py | Which generator, which prior, and what does the run file look like? |
scoring_profile.py | What am I actually asking the model to optimise? |
parse_run.py | Did the run produce distinct, useful molecules — or one scaffold a thousand times? |
The scoring function is the experiment
The model does not know what you meant. Everything it produces is a literal consequence of the
objective, and unbounded rewards get exploited without exception:
| Reward | What the agent returns |
|---|
| logP, unbounded | long greasy alkyl chains |
| molecular weight upward | 900 Da molecules that satisfy nothing else |
| similarity to one reference | the reference, regenerated forever |
| a docking score | molecules exploiting that scoring function's blind spots |
So every numeric component gets a window, not a direction. Most properties have a desirable
range — molecular weight should be 250–500, not "as low as possible" — which is what
double_sigmoid is for. A on molecular weight optimises toward methane.