Iterative lead optimization with analyze-reason-generate-verify-evaluate loop. Paper-backed (MT-Mol, DrugR, MultiMol).
60
71%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./backend/cli/skills/chemistry/molecular-optimization/SKILL.mdLead optimization is the bottleneck of drug discovery — modifying a hit compound to improve potency, selectivity, and ADMET properties without breaking what already works. LLMs frequently generate invalid SMILES or propose modifications that don't appear in the actual structure.
This skill implements an iterative optimization protocol based on three peer-reviewed approaches:
The core loop: Analyze → Identify Liabilities → Generate Candidates → Verify → Evaluate & Rank → Iterate.
Do NOT use this skill for:
denovo-design instead)admet-prediction)molecular-docking, binding-affinity)pip install rdkit-pypi numpy pandaspip install PyTDC datamolOptimize one molecule for improved properties:
python scripts/optimize.py \
--smiles "c1ccc(NC(=O)c2ccccc2Cl)cc1" \
--targets "LogP<3,hERG<0.3,QED>0.5" \
--max-iterations 3 \
--candidates 8 \
--output results.jsonOptimize a CSV of molecules:
python scripts/optimize.py \
--input leads.csv \
--smiles-col SMILES \
--targets "LogP<3,hERG<0.3" \
--output optimized.csvVerify a proposed SMILES matches a claimed modification:
python scripts/verify_smiles.py \
--original "c1ccccc1" \
--proposed "c1ccc(O)cc1" \
--claimed-modification "Added hydroxyl group at para position"Compare multiple candidates against a reference:
python scripts/compare_candidates.py \
--reference "c1ccc(NC(=O)c2ccccc2Cl)cc1" \
--candidates candidates.csv \
--output comparison.html| Script | Purpose | Key Outputs |
|---|---|---|
optimize.py | Full iterative optimization loop | results.json with ranked candidates, descriptor deltas, reasoning |
verify_smiles.py | Validate SMILES and check claimed modifications | Pass/fail report with structural analysis |
compare_candidates.py | Side-by-side descriptor comparison | Comparison table (CSV/HTML) with liability flags |
Compute molecular descriptors: MW, LogP, TPSA, HBA, HBD, RotBonds, QED, aromatic rings, Murcko scaffold. Flag properties outside ADMET target thresholds.
Rank flagged properties by severity (hERG > DILI > CYP > solubility). For each, identify the structural feature causing the liability and propose a specific modification.
Apply proposed modifications via:
Generate 4-8 candidates per iteration.
For each candidate:
Chem.MolFromSmiles() — discard if NoneRecompute descriptors, build comparison table, score by net liability improvement (+1 per fix, -0.5 per new liability).
If no improvement after 3 iterations, return best found with honest assessment.
| Property | Target | Severity |
|---|---|---|
| hERG inhibition | < 0.3 | Critical |
| DILI | < 0.5 | Critical |
| CYP inhibition | < 0.5 | High |
| LogP | 1.0 – 3.0 | Medium |
| TPSA | 20 – 130 | Medium |
| MW | 150 – 500 | Medium |
| QED | > 0.5 | Low |
| Solubility (LogS) | > -4.0 | Medium |
dc00e07
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.