mondalsou/lead_optimization_agent
0
1# ⚡ Quick Start — Lead Optimization Agent2 3Get running in under 5 minutes.4 5---6 7## Prerequisites8 9- Python 3.11+10- An Anthropic API key → [console.anthropic.com](https://console.anthropic.com) (free $5 credit on signup)11 12---13 14## Step 1 — Clone & Install15 16```bash17git clone https://github.com/mondalsou/lead-optimization-agent.git18cd lead-optimization-agent19pip install -r requirements.txt20```21 22> **RDKit trouble?** Use conda instead:23> ```bash24> conda install -c conda-forge rdkit25> ```26 27---28 29## Step 2 — Set your API key30 31```bash32export ANTHROPIC_API_KEY=sk-ant-...33```34 35---36 37## Step 3 — Choose how to run38 39### A) Streamlit UI *(recommended for demo)*40 41```bash42streamlit run app.py43```44 45Open **http://localhost:8501** → select the preset → click **▶ Run Agent**46 47---48 49### B) Jupyter Notebooks *(recommended for walkthrough)*50 51```bash52jupyter notebook notebooks/53```54 55Run in order:56 57| Notebook | What to do |58|---|---|59| `01_admet_tool.ipynb` | Run all cells — explores the API |60| `02_agent_loop.ipynb` | **Main notebook** — runs the agent |61| `03_visualization.ipynb` | Charts & molecule grid |62 63---64 65## What happens when you run66 67```68You enter: Atenolol SMILES + "improve CNS penetration"69 │70 ▼71 Agent analyzes starting molecule72 │73 Proposes structural change (removes amide group)74 │75 Validates SMILES → Analyzes new ADMET scores76 │77 Compares: is it better? → Continue or stop78 │79 ▼80 Best candidate + chemical reasoning81```82 83---84 85## Expected output (Streamlit)86 87After ~3–5 minutes you'll see:88 89| Metric | Before | After |90|---|---|---|91| CNS MPO | 4.55 | **5.45** ↑ |92| BBB Probability | 0.60 | **0.90** ↑ |93| QED | 0.638 | **0.838** ↑ |94| Rotatable Bonds | 8 | **6** ↓ |95 96---97 98## Cost99 100~**$0.10–0.15** per full run. The $5 free credit covers ~35–50 runs.101 102---103 104## Troubleshooting105 106| Problem | Fix |107|---|---|108| First API call hangs ~60s | Normal — Render free tier cold start. Wait it out. |109| `ModuleNotFoundError: rdkit` | `conda install -c conda-forge rdkit` |110| `AuthenticationError` | Check `echo $ANTHROPIC_API_KEY` — must start with `sk-ant-` |111| Streamlit port in use | `streamlit run app.py --server.port 8502` |112 