---
title: GenMol troubleshooting
description: 'Fix GenMol invalid SMILES, low validity or diversity through temperature and num_steps — plus the known defect that min_qed and max_sa_score never apply.'
tags:
  - genmol
  - troubleshooting
---

This page helps you diagnose the most common [GenMol](/docs/genmol) problems — invalid SMILES, low validity or diversity, over-aggressive quality filtering, job timeouts, unexpected scaffold decorations, and SAFE fragment ingestion failures — and points to the parameters to adjust for each.

## Common issues and fixes

GenMol uses masked discrete diffusion on SAFE molecular representations. Understanding common issues helps you configure jobs correctly and interpret results appropriately.

## Invalid SMILES errors

- Verify your SMILES string parses correctly using the real-time validator in .bloom* or an external tool like RDKit
- Check for unmatched parentheses, invalid ring closure digits, or incorrect element symbols
- Ensure stereochemistry notation (`@`, `@@`, `/`, `\`) is syntactically correct
- Remove whitespace, newlines, or extraneous characters from the SMILES string
- For scaffold decoration, confirm SAFE attachment points use valid numbered bracket syntax (e.g., `[1]`)

## Low validity rate

- If fewer than 80% of generated molecules are valid, try reducing the temperature parameter (e.g., from 1.0 to 0.7) for more conservative sampling
- Increase the number of diffusion steps (`num_steps`) for more refined denoising
- In fragment-constrained mode, ensure the fixed fragments are chemically reasonable and have valid attachment points
- For linker design, verify both fragment SMILES are individually valid before submission

## Low diversity in generated molecules

- Increase the temperature parameter (e.g., from 1.0 to 1.3) for more diverse sampling
- In lead optimization mode, reduce the similarity threshold to allow more structural variation
- Increase the number of molecules generated; larger batches naturally produce more diverse sets
- If using PMO mode, the oracle may be driving convergence to a narrow chemical space; this is expected behavior for goal-directed generation

## Fewer usable molecules than expected

The quality filters remove molecules from the returned set, so a low count can come from the filters as well as from the generation. `enforce_validity` and `enforce_uniqueness` are on by default; `apply_druglikeness_filter`, `min_qed` and `max_sa_score` bind only when you set them, except in `lead_optimization`, which applies its own QED floor and SA ceiling.

- Read the `quality_filters` block in the result: it reports how many molecules went in, how many came out, and how many each filter removed
- If a lead run returns nothing, widen `min_qed` — the QED floor is the bound most likely to have emptied the set
- If your own QED cutoff is removing most molecules, lower the temperature for more conservative sampling, then re-apply the cutoff
- Generate more molecules to compensate for your own filtering loss
- For makeability, run [AiZynthFinder](/docs/aizynthfinder) on the survivors rather than relying on a score — see [how GenMol results compare to the bench](/docs/genmol/translatability)

## Job timeouts or long runtimes

- Reduce the number of molecules per job (try 500 instead of 5,000)
- Lower the number of diffusion steps (`num_steps`) to reduce per-molecule generation time
- For very large campaigns, split into multiple jobs of 1,000 molecules each
- Check cluster capacity and retry during lower-traffic windows if queue times are long

## Scaffold decoration produces unexpected R-groups

- Verify that SAFE attachment points are correctly placed on the scaffold
- Check that the scaffold SMILES is in canonical form
- Ensure attachment point numbering is consistent and sequential
- Try generating with a lower temperature to produce more conservative decorations
- Review the SAFE encoding of your scaffold to confirm fragment boundaries are where you expect them

## PMO mode converges to unreasonable molecules

- Some oracles reward extreme property values. This is reward exploitation: when a computed oracle is the only judge, the optimizer finds that oracle's blind spots, and a high oracle score becomes a statement about the oracle
- Limit the optimization budget to prevent excessive optimization into unrealistic chemical space
- Set `min_qed` on the run, or apply your own post-hoc cutoffs (for example QED &gt; 0.3) to the returned properties
- Inspect the 2D structures. Spot-checking is the cheapest control available and catches failures no metric reports

## SAFE fragment ingestion failures

- Fragments from generated molecules are automatically ingested into the project fragment library
- If fragments are not appearing, check that the job completed successfully (not just partially)
- Verify the `FEATURE_SAFE_INGESTION` flag is not disabled in your environment
- Very small fragments (fewer than 3 heavy atoms) may be filtered during ingestion

## Still stuck?

- Provide the job ID, generation mode, SMILES input (if applicable), and parameter settings
- Note whether the issue is at submission, during generation, or in the output
- Share the validity rate and any error messages from the job log
- Ask Ivy for real-time guidance on parameter tuning

## Read next
