Pharma Pharmacology Agent v1.1.0
Overview
Predictive pharmacology profiling for drug candidates using RDKit descriptors and validated rule-based heuristics. Provides comprehensive ADME assessment, drug-likeness scoring, and risk flagging — all from a SMILES string.
Key capabilities:
- Drug-likeness: Lipinski Rule of Five, Veber oral bioavailability rules
- Scores: QED (Quantitative Estimate of Drug-likeness), SA Score (Synthetic Accessibility)
- ADME predictions: BBB permeability, aqueous solubility (ESOL), GI absorption (Egan), CYP3A4 inhibition risk, P-glycoprotein substrate, plasma protein binding
- Safety: PAINS (Pan-Assay Interference) filter alerts
- Risk assessment: Automated flagging of pharmacological concerns
- Standard chain output: JSON schema compatible with all downstream agents
Quick Start
# Profile a molecule from SMILES
exec python scripts/chain_entry.py --input-json '{"smiles": "CC(=O)Oc1ccccc1C(=O)O", "context": "user"}'
# Chain from chemistry-query output
exec python scripts/chain_entry.py --input-json '{"smiles": "<canonical_smiles>", "context": "from_chemistry"}'
Scripts
scripts/chain_entry.py
Main entry point. Accepts JSON with smiles field, returns full pharmacology profile.
Input:
{"smiles": "CN1C=NC2=C1C(=O)N(C(=O)N2C)C", "context": "user"}
Output schema:
{
"agent": "pharma-pharmacology",
"version": "1.1.0",
"smiles": "<canonical>",
"status": "success|error",
"report": {
"descriptors": {"mw": 194.08, "logp": -1.03, "tpsa": 61.82, "hbd": 0, "hba": 6, "rotb": 0, "arom_rings": 2, "heavy_atoms": 14, "mr": 51.2},
"lipinski": {"pass": true, "violations": 0, "details": {...}},
"veber": {"pass": true, "tpsa": {...}, "rotatable_bonds": {...}},
"qed": 0.5385,
"sa_score": 2.3,
"adme": {
"bbb": {"prediction": "moderate", "confidence": "medium", "rationale": "..."},
"solubility": {"logS_estimate": -1.87, "class": "high", "rationale": "..."},
"gi_absorption": {"prediction": "high", "rationale": "..."},
"cyp3a4_inhibition": {"risk": "low", "rationale": "..."},
"pgp_substrate": {"prediction": "unlikely", "rationale": "..."},
"plasma_protein_binding": {"prediction": "moderate-low", "rationale": "..."}
},
"pains": {"alert": false}
},
"risks": [],
"recommend_next": ["toxicology", "ip-expansion"],
"confidence": 0.85,
"warnings": [],
"timestamp": "ISO8601"
}
ADME Prediction Rules
| Property |
Method |
Thresholds |
| BBB permeability |
Clark's rules (TPSA/logP) |
TPSA<60+logP 1-3 = high; TPSA<90 = moderate |
| Solubility |
ESOL approximation |
logS > -2 high; > -4 moderate; else low |
| GI absorption |
Egan egg model |
logP<5.6 and TPSA<131.6 = high |
| CYP3A4 inhibition |
Rule-based |
logP>3 and MW>300 = high risk |
| P-gp substrate |
Rule-based |
MW>400 and HBD>2 = likely |
| Plasma protein binding |
logP correlation |
logP>3 = high (>90%) |
Chaining
This agent is designed to receive output from chemistry-query:
chemistry-query (name→SMILES+props) → pharma-pharmacology (ADME profile) → toxicology / ip-expansion
The recommend_next field always includes ["toxicology", "ip-expansion"] for pipeline continuation.
Tested With
All features verified end-to-end with RDKit 2024.03+:
| Molecule |
MW |
logP |
Lipinski |
Key Findings |
| Caffeine |
194.08 |
-1.03 |
✅ Pass (0 violations) |
High solubility, moderate BBB, QED 0.54 |
| Aspirin |
180.04 |
1.31 |
✅ Pass (0 violations) |
Moderate solubility, SA 1.58 (easy), QED 0.55 |
| Sotorasib |
560.23 |
4.48 |
✅ Pass (1 violation: MW) |
Low solubility, CYP3A4 risk, high PPB |
| Metformin |
129.10 |
-1.03 |
✅ Pass (0 violations) |
High solubility, low BBB, QED 0.25 |
| Invalid SMILES |
— |
— |
— |
Graceful JSON error |
| Empty input |
— |
— |
— |
Graceful JSON error |
Error Handling
- Invalid SMILES: Returns
status: "error" with descriptive warning
- Missing input: Clear error message requesting
smiles or name
- All errors produce valid JSON (never crashes)
Resources
references/api_reference.md — API and methodology references
Changelog
v1.1.0 (2026-02-14)
- Initial production release with full ADME profiling
- Lipinski, Veber, QED, SA Score, PAINS
- BBB, solubility, GI absorption, CYP3A4, P-gp, PPB predictions
- Automated risk assessment
- Standard chain output schema
- Comprehensive error handling
- End-to-end tested with diverse molecules
1---2name: pharma-pharmacology-agent3description: Pharmacology agent for ADME/PK profiling of drug candidates from SMILES. Computes drug-likeness (Lipinski Ro5, Veber rules), QED, SA Score, ADME predictions (BBB permeability, aqueous solubility, GI absorption, CYP3A4 inhibition, P-gp substrate, plasma protein binding), and PAINS alerts. Chains from chemistry-query for SMILES input. Triggers on pharmacology, ADME, PK/PD, drug likeness, Lipinski, absorption, distribution, metabolism, excretion, BBB, solubility, bioavailability, lead optimization, drug profiling.4---5
6# Pharma Pharmacology Agent v1.1.0
7
8## Overview
9
10Predictive pharmacology profiling for drug candidates using RDKit descriptors and validated rule-based heuristics. Provides comprehensive ADME assessment, drug-likeness scoring, and risk flagging — all from a SMILES string.
11
12**Key capabilities:**
13- **Drug-likeness:** Lipinski Rule of Five, Veber oral bioavailability rules
14- **Scores:** QED (Quantitative Estimate of Drug-likeness), SA Score (Synthetic Accessibility)
15- **ADME predictions:** BBB permeability, aqueous solubility (ESOL), GI absorption (Egan), CYP3A4 inhibition risk, P-glycoprotein substrate, plasma protein binding
16- **Safety:** PAINS (Pan-Assay Interference) filter alerts
17- **Risk assessment:** Automated flagging of pharmacological concerns
18- **Standard chain output:** JSON schema compatible with all downstream agents
19
20## Quick Start
21
22```bash
23# Profile a molecule from SMILES
24exec python scripts/chain_entry.py --input-json '{"smiles": "CC(=O)Oc1ccccc1C(=O)O", "context": "user"}'
25
26# Chain from chemistry-query output
27exec python scripts/chain_entry.py --input-json '{"smiles": "<canonical_smiles>", "context": "from_chemistry"}'
28```
29
30## Scripts
31
32### `scripts/chain_entry.py`
33Main entry point. Accepts JSON with `smiles` field, returns full pharmacology profile.
34
35**Input:**
36```json
37{"smiles": "CN1C=NC2=C1C(=O)N(C(=O)N2C)C", "context": "user"}
38```
39
40**Output schema:**
41```json
42{
43 "agent": "pharma-pharmacology",
44 "version": "1.1.0",
45 "smiles": "<canonical>",
46 "status": "success|error",
47 "report": {
48 "descriptors": {"mw": 194.08, "logp": -1.03, "tpsa": 61.82, "hbd": 0, "hba": 6, "rotb": 0, "arom_rings": 2, "heavy_atoms": 14, "mr": 51.2},
49 "lipinski": {"pass": true, "violations": 0, "details": {...}},
50 "veber": {"pass": true, "tpsa": {...}, "rotatable_bonds": {...}},
51 "qed": 0.5385,
52 "sa_score": 2.3,
53 "adme": {
54 "bbb": {"prediction": "moderate", "confidence": "medium", "rationale": "..."},
55 "solubility": {"logS_estimate": -1.87, "class": "high", "rationale": "..."},
56 "gi_absorption": {"prediction": "high", "rationale": "..."},
57 "cyp3a4_inhibition": {"risk": "low", "rationale": "..."},
58 "pgp_substrate": {"prediction": "unlikely", "rationale": "..."},
59 "plasma_protein_binding": {"prediction": "moderate-low", "rationale": "..."}
60 },
61 "pains": {"alert": false}
62 },
63 "risks": [],
64 "recommend_next": ["toxicology", "ip-expansion"],
65 "confidence": 0.85,
66 "warnings": [],
67 "timestamp": "ISO8601"
68}
69```
70
71## ADME Prediction Rules
72
73| Property | Method | Thresholds |
74|----------|--------|-----------|
75| BBB permeability | Clark's rules (TPSA/logP) | TPSA<60+logP 1-3 = high; TPSA<90 = moderate |
76| Solubility | ESOL approximation | logS > -2 high; > -4 moderate; else low |
77| GI absorption | Egan egg model | logP<5.6 and TPSA<131.6 = high |
78| CYP3A4 inhibition | Rule-based | logP>3 and MW>300 = high risk |
79| P-gp substrate | Rule-based | MW>400 and HBD>2 = likely |
80| Plasma protein binding | logP correlation | logP>3 = high (>90%) |
81
82## Chaining
83
84This agent is designed to receive output from `chemistry-query`:
85
86```
87chemistry-query (name→SMILES+props) → pharma-pharmacology (ADME profile) → toxicology / ip-expansion
88```
89
90The `recommend_next` field always includes `["toxicology", "ip-expansion"]` for pipeline continuation.
91
92## Tested With
93
94All features verified end-to-end with RDKit 2024.03+:
95
96| Molecule | MW | logP | Lipinski | Key Findings |
97|----------|-----|------|----------|-------------|
98| Caffeine | 194.08 | -1.03 | ✅ Pass (0 violations) | High solubility, moderate BBB, QED 0.54 |
99| Aspirin | 180.04 | 1.31 | ✅ Pass (0 violations) | Moderate solubility, SA 1.58 (easy), QED 0.55 |
100| Sotorasib | 560.23 | 4.48 | ✅ Pass (1 violation: MW) | Low solubility, CYP3A4 risk, high PPB |
101| Metformin | 129.10 | -1.03 | ✅ Pass (0 violations) | High solubility, low BBB, QED 0.25 |
102| Invalid SMILES | — | — | — | Graceful JSON error |
103| Empty input | — | — | — | Graceful JSON error |
104
105## Error Handling
106
107- Invalid SMILES: Returns `status: "error"` with descriptive warning
108- Missing input: Clear error message requesting `smiles` or `name`
109- All errors produce valid JSON (never crashes)
110
111## Resources
112
113- `references/api_reference.md` — API and methodology references
114
115## Changelog
116
117**v1.1.0** (2026-02-14)
118- Initial production release with full ADME profiling
119- Lipinski, Veber, QED, SA Score, PAINS
120- BBB, solubility, GI absorption, CYP3A4, P-gp, PPB predictions
121- Automated risk assessment
122- Standard chain output schema
123- Comprehensive error handling
124- End-to-end tested with diverse molecules