---
title: GenMol inputs and parameters
description: >-
  Run modes, fragment constraints, SMILES formats, and quality filter
  configuration for GenMol.
tags:
  - genmol
  - inputs
---

You provide a generation mode and, for most modes, one or more seed SMILES — a reference molecule, scaffold, or fragments. The mode you choose is what most shapes the result: it determines whether generation runs unconstrained (de novo, PMO) or is anchored to the structures you supply (lead optimization, scaffold decoration, linker design, motif extension, fragment-constrained).

## Webapp input methods

The .bloom* webapp provides several input methods depending on the selected generation mode.

## Input type selection

| Input Type | Applicable Modes | Description |
|------------|-----------------|-------------|
| **No input** | de novo, PMO | Fully unconstrained generation |
| **Single SMILES** | lead optimization, motif extension | Seed molecule or motif as SMILES string |
| **Scaffold SMILES** | scaffold decoration | Core scaffold with SAFE attachment points |
| **Two fragment SMILES** | linker design | Two fragments to be connected by a generated linker |
| **SAFE constraints** | fragment constrained | Fixed SAFE tokens with mask tokens for generation |
| **From previous job** | all modes | Import SMILES from fragment library, PubChem, or other tools |

## Generation modes

### De novo generation

- **Input**: None required
- **Behavior**: Generates molecules from scratch by sampling the full learned distribution
- **Best for**: Chemical space exploration, library enumeration, diversity-focused campaigns

### Lead optimization

- **Input**: Reference SMILES string
- **Additional parameter**: `similarity_threshold` (0.0-1.0)
- **Behavior**: Generates analogs constrained to be within the specified Tanimoto similarity to the seed molecule
- **Best for**: SAR exploration around a known hit or lead compound

### Scaffold decoration

- **Input**: Scaffold SMILES with SAFE attachment points
- **Behavior**: Keeps the core scaffold fixed and generates R-group substituents at marked positions
- **Best for**: Exploring R-group variations on a validated scaffold

### Linker design

- **Input**: Two fragment SMILES
- **Behavior**: Generates molecular linkers connecting the two fragments into a single molecule
- **Best for**: Fragment-based drug design where fragment hits need to be merged

### Motif extension

- **Input**: Motif SMILES (pharmacophore or substructure)
- **Behavior**: Grows the motif into a full drug-like molecule while preserving the core substructure
- **Best for**: Growing fragment hits or pharmacophore motifs into full molecules

### PMO (Practical Molecular Optimization)

- **Input**: Oracle name (e.g., qed, gsk3b, jnk3, drd2)
- **Behavior**: Goal-directed generation targeting high scores on the specified oracle
- **Best for**: Benchmark optimization, targeting specific computational endpoints

### Fragment-constrained generation

- **Input**: SAFE-encoded molecule with fixed and masked tokens
- **Behavior**: Keeps specified SAFE fragments fixed while generating the remaining portions
- **Best for**: Fine-grained control over which parts of the molecule are generated vs. preserved

## SMILES input requirements

### Valid SMILES
- **Standard notation**: Use canonical or isomeric SMILES (e.g., `CC(=O)Oc1ccccc1C(=O)O`)
- **Validation**: Real-time checking via RDKit; invalid SMILES are rejected before submission
- **Stereochemistry**: Supported but not required (e.g., `C[C@@H](O)CC` for specified chirality)
- **Case sensitivity**: Element symbols are case-sensitive (e.g., `c` for aromatic carbon, `C` for aliphatic)

### SAFE notation
- **Fragment representation**: Molecules are decomposed into fragments with numbered attachment points (e.g., `[1]c1ccccc1.[1]N`)
- **Attachment points**: Numbered brackets indicate where fragments connect (e.g., `[1]`, `[2]`)
- **Dot separation**: Fragments are separated by dots in SAFE strings
- **Automatic conversion**: .bloom* can convert SMILES to SAFE notation automatically

### Size constraints
- **Maximum SMILES length**: ~200 characters for seed molecules
- **Minimum fragment size**: At least 3 heavy atoms per fragment
- **Maximum fragments**: Up to 10 fixed fragments per constrained generation job

## Generation parameters

### Core parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| **run_type** | string | `denovo` | Generation mode (denovo, fragment, linker_design, linker_design_onestep, motif_extension, scaffold_decoration, superstructure_generation, pmo, lead_optimization) |
| **num_molecules** | integer | 100 | Number of molecules to generate (1-10,000) |
| **fragments** | string[] | - | Seed SMILES fragments (scaffold_decoration, linker_design, motif_extension, fragment modes) |
| **starting_molecule** | string | - | Seed SMILES for lead_optimization mode |
| **num_diffusion_steps** | integer | 50 | Diffusion denoising steps per molecule (10-200) |
| **temperature** | float | 1.0 | Sampling temperature (0.1-2.0) |

### Quality filter parameters

> **These filters change what you get back**

> `enforce_validity` and `enforce_uniqueness` are **on by default**, so a run returns only parseable molecules and no repeated SMILES — the validity and uniqueness rates still describe everything that was generated, so they can sit below 100% while every molecule you receive passes. The thresholds below default to unset and bind only when you set them, except in `lead_optimization`, which applies its own QED floor and SA ceiling (see mode-specific parameters). A molecule whose property could not be computed is **dropped** by a filter you asked for rather than passed through. See [interpreting outputs](/docs/genmol/outputs).

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| **enforce_validity** | boolean | true | Drop molecules RDKit cannot parse |
| **enforce_uniqueness** | boolean | true | Drop repeats of a SMILES already returned |
| **apply_druglikeness_filter** | boolean | false | Drop molecules breaking any of Lipinski's four bounds (MW ≤ 500, logP ≤ 5, HBD ≤ 5, HBA ≤ 10) |
| **min_qed** | float | unset | Drop molecules whose RDKit QED is below this value (0-1) |
| **max_sa_score** | float | unset | Drop molecules whose synthetic accessibility is above this value (1 easy to 10 hard) |

The result carries a `quality_filters` block with the counts in, the counts out and how many molecules each filter removed, plus a plain-language caveat for any filter that could not be evaluated.

### Mode-specific parameters

| Parameter | Mode | Type | Default | Description |
|-----------|------|------|---------|-------------|
| **similarity_threshold** | lead optimization | float | 0.4 | Minimum Tanimoto similarity to seed |
| **oracle_name** | PMO | string | required | TDC scoring oracle for goal-directed generation (e.g. `jnk3`, `gsk3b`, `drd2`) |
| **optimization_budget** | PMO | integer | 10,000 | Maximum oracle evaluations (100-100,000) |
| **fragments** | linker design | string[] | required | Both fragment SMILES to connect, as a two-element list |
| **min_qed_lead** | lead optimization | float | 0.5 | QED floor applied to a lead run's output. Set `min_qed` to override it |
| **max_sa_lead** | lead optimization | float | 5.0 | Synthetic-accessibility ceiling applied to a lead run's output. Set `max_sa_score` to override it |

The two lead bounds are GenMol's own softer band rather than thresholds invented here; the paper's stricter 0.6 / 4 pair excludes approved drugs such as aspirin (QED 0.550), which is why it is not the default. A lead run that returns nothing says which bound removed everything and names the parameter that widens it.

## Previous job integration

### Compatible tools
- **Fragment library**: SAFE fragments from previous GenMol, REINVENT4, or fragment extraction jobs
- **PubChem**: Compound SMILES from structure lookups
- **Fragment search/extraction**: Fragment hits from screening campaigns
- **Other GenMol runs**: Top-scoring molecules for iterative optimization

### Data handling
- **Multi-molecule files**: Select individual molecules from multi-compound outputs
- **Format conversion**: Automatic handling of SDF, MOL, and other chemical file formats
- **Provenance tracking**: Maintains connection to original data source for reproducibility

## Batch processing strategies

### Single-mode batches
- **Recommended**: Submit one job per generation mode for clear result organization
- **Molecule count**: 100-1,000 per job for good balance of speed and diversity
- **Error isolation**: Issues affect only individual jobs

### Iterative optimization
- **Round 1**: De novo generation with 1,000 molecules and strict quality filters
- **Round 2**: Lead optimization using top hits from Round 1 as seeds
- **Round 3**: Scaffold decoration using the best scaffold from Round 2
- **Track lineage**: .bloom* maintains provenance across iterative runs

## Pre-submission validation

### SMILES quality checks
- **Validity**: Ensure SMILES parses correctly (use the real-time validator in .bloom*)
- **Sanitization**: Check for valence errors, impossible bond orders, or invalid atom types
- **Stereochemistry**: Verify chirality specifications are intentional
- **Canonicalization**: Canonical SMILES avoids duplicate representations of the same molecule

### Parameter optimization
- **Start conservative**: Use defaults for first runs, then tune based on results
- **Temperature exploration**: Try 0.7 (conservative), 1.0 (balanced), and 1.3 (diverse) to find the sweet spot
- **Step count**: More steps generally improve quality but increase runtime

## Read next
