generative-design — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited generative-design (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
De novo design of novel molecules with desired properties using generative models — the core ML capability for lead generation and scaffold hopping in drug discovery.
| Paradigm | Method | Strength | Weakness |
|---|---|---|---|
| Language model | SMILES/SELFIES GPT, LSTM | Fast, scalable, fine-tunable | SMILES can be invalid; needs SELFIES |
| VAE | JT-VAE, MolVAE | Smooth latent space, BO-ready | Mode collapse; slow tree encode |
| GNN flow/GAN | GraphAF, GCPN, JunctionGAN | Graph-native; no linearity | Training instability |
| RL optimization | REINVENT 4, REINFORCE | Property-guided; no new arch needed | Reward hacking; mode collapse |
| 3D diffusion | DiffSBDD, TargetDiff | Pocket-conditioned; 3D geometry | Slow, needs structure |
| Fragment-based | DeLinker, DiffLinker | Fragment growing, FBDD | Limited to provided fragments |
| Metric | What it measures | Target |
|---|---|---|
| Validity | % chemically valid | ~100% (SELFIES) / 85-99% (SMILES LM) |
| Uniqueness | % unique in generated set | >99% |
| Novelty | % not in training set | >99% |
| FCD | Fréchet ChemNet Distance (distribution) | Lower = closer to drug-like distribution |
| KL divergence | Property distributions vs. reference | Lower |
| Scaffold diversity | # unique Murcko scaffolds / N | Higher |
| IntDiv | Internal diversity (mean pairwise 1-Tc) | > 0.85 |
| SNN | Similarity to nearest neighbor in training | < 0.6 (novel) |
import selfies as sf
from rdkit import Chem
# Encode/decode SELFIES (guaranteed valid)
smiles = "CC(=O)Oc1ccccc1C(=O)O" # aspirin
selfies_str = sf.encoder(smiles)
decoded_smiles = sf.decoder(selfies_str)
mol = Chem.MolFromSmiles(decoded_smiles) # always valid
# Get SELFIES alphabet for tokenization
alphabet = sf.get_semantic_robust_alphabet()
# Decode a random generated SELFIES token sequence (always valid):
generated_tokens = ["[C]", "[Branch1]", "[C]", "[=O]", "[N]", "[H]"]
generated_smiles = sf.decoder("".join(generated_tokens))# Install: pip install reinvent
# REINVENT 4 uses TOML config for staged learning
import toml
config = {
"run_type": "reinforcement_learning",
"device": "cuda",
"tb_logdir": "tb_logs",
"json_out_config": "run_config.json",
"parameters": {
"use_checkpoint": False,
"prior_file": "path/to/prior.prior",
"agent_file": "path/to/prior.prior",
"batch_size": 128,
"n_steps": 1000,
},
"scoring": {
"type": "custom_product",
"parallel": False,
"components": [
{"type": "qed", "name": "QED", "weight": 1.0},
{"type": "sa_score", "name": "SA", "weight": 1.0,
"transform": {"type": "reverse_sigmoid", "low": 1.0, "high": 6.0, "k": 0.5}},
],
"diversity_filter": {
"type": "IdenticalMurckoScaffold",
"minscore": 0.4,
"bucket_size": 25,
}
}
}
with open("rl_config.toml", "w") as f:
toml.dump(config, f)
# Run: reinvent -l rl_run.log rl_config.toml| Task | Reference |
|---|---|
| Theory: molecular space, SMILES/SELFIES/graphs, metrics, MOSES/GuacaMol benchmarks | references/generation-theory.md |
| SELFIES grammar, SMILES LM (GPT/LSTM), HuggingFace fine-tuning, sampling strategies | references/selfies-lm.md |
| REINVENT 4: RL optimization, multi-component scoring, diversity filters, oracles | references/rl-reinvent.md |
| JT-VAE: tree decomposition, latent BO; TorchDrug graph generative models overview | references/vae-jtvae.md |
| Structure-based 3D generation: DiffSBDD, TargetDiff, Pocket2Mol, linker design | references/sbdd-diffusion.md |
| Package | Install | Role |
|---|---|---|
selfies | pip install selfies | Always-valid molecular grammar |
reinvent | pip install reinvent | RL de novo design (AZ REINVENT 4) |
guacamol | pip install guacamol | Benchmark suite (17 goal-directed + distributional) |
moses | pip install molsets | MOSES benchmark (6 metrics) |
transformers | pip install transformers | GPT/LSTM LMs (HuggingFace) |
torchdrug | pip install torchdrug | GCPN, GraphAF, JT-VAE (graph-native) |
DiffSBDD | GitHub: arneschneuing/DiffSBDD | 3D pocket-conditioned diffusion |
DiffLinker | GitHub: igashov/DiffLinker | Linker design in 3D |
homology-modeling → structure-prep)torchdrug — GCPN, GraphAF, GraphDF, JT-VAE implementationrdkit — validity checks, property scoring oracles (QED, SA, fingerprints)docking — docking oracle for RL scoring (Vina/Gnina scoring function)pharmacophore — pharmacophore constraints for conditional generationhomology-modeling → structure-prep — pocket preparation for SBDDscientific-skills:zinc-database — training/reference sets (ZINC20)mmpa (upcoming) — matched molecular pair analysis on generated series~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.