A computational pipeline for natural product drug discovery evidence generation. Searches external scientific databases, predicts drug-target interactions, performs molecular docking, ADMET analysis, and generates comprehensive evidence dossiers.
bash run.shThis starts all services:
- Frontend: http://localhost:5173
- API: http://localhost:8000
- API Docs: http://localhost:8000/docs
User creates Product (name, category)
|
v
Pipeline (Celery DAG, 16 steps)
|
+-- Compound Discovery (PubChem, ChEBI, NPASS, FooDB, Dr Duke, KNApSAcK, Wikidata, Literature)
+-- Target Prediction (Ensemble ML + SwissTargetPrediction)
+-- Protein Retrieval (UniProt, PDB, AlphaFold)
+-- Disease Association (OpenTargets, CTD, DisGeNET)
+-- Pathway Analysis (KEGG, Reactome, Gene Ontology)
+-- Network Pharmacology (STRING PPI, NetworkX)
+-- Molecular Docking (AutoDock Vina / RDKit fallback)
+-- ADMET Prediction (Dual predictor + SwissADME)
+-- Literature Mining (PubMed, EuropePMC, Semantic Scholar)
+-- Clinical Trials (ClinicalTrials.gov)
+-- AI Evidence Extraction (LLM-based)
+-- Evidence Scoring & Hallucination Protection
+-- Dossier Assembly (PDF, DOCX, HTML)
|
v
16-tab Evidence Dossier Viewer
| Layer | Technology |
|---|---|
| Backend | Python 3.12, FastAPI, SQLAlchemy 2.0 (async), Celery, Redis |
| Database | PostgreSQL 15 (or SQLite fallback) |
| Frontend | React 19, TypeScript, Vite, TailwindCSS, Recharts, Cytoscape.js |
| ML | RDKit, Chemprop, DeepChem, PyTorch |
| Docking | AutoDock Vina, RDKit conformer energy |
NATURA-EVIDENCE/
├── run.sh # Single-command launcher
├── docker-compose.yml # PostgreSQL + Redis
├── natura-evidence-api/ # Python backend
│ ├── app/
│ │ ├── main.py # FastAPI entry point
│ │ ├── config.py # Settings (env vars)
│ │ ├── database.py # SQLAlchemy async engine
│ │ ├── api/ # 28 API routers
│ │ ├── core/ # 61 core modules (ML, docking, etc.)
│ │ ├── models/ # 14 database models
│ │ ├── services/ # 25 external API clients
│ │ └── tasks/ # Celery pipeline tasks
│ └── tests/ # 53 test files
|── natura-evidence-ui/ # React frontend
└── src/
├── pages/ # 8 page components
├── components/dossier/ # 16 tab components
├── lib/api.ts # API client
└── types/ # TypeScript interfaces
| # | Step | API Sources | Output |
|---|---|---|---|
| 1 | Natural Product Resolution | Wikidata | Taxonomy, synonyms |
| 2 | Compound Discovery | PubChem, ChEBI, NPASS, FooDB, Dr Duke, KNApSAcK, Wikidata, Literature | 71 compounds |
| 3 | Compound Enrichment | RDKit | Molecular descriptors, drug-likeness |
| 4 | Target Prediction | Ensemble ML + SwissTargetPrediction | 400+ protein targets |
| 5 | Protein Retrieval | UniProt, PDB, AlphaFold | 3D structures, sequences |
| 6 | Disease Association | OpenTargets, CTD | Gene-disease associations |
| 7 | Pathway Discovery | KEGG, Reactome, GO | Enriched pathways |
| 8 | Network Pharmacology | STRING, NetworkX | Compound-Target-Disease graph |
| 9 | Molecular Docking | AutoDock Vina / RDKit | Binding energies, poses |
| 10 | ADMET Prediction | Dual predictor + SwissADME | 28 ADMET endpoints |
| 11 | Literature Mining | PubMed, EuropePMC | Scientific publications |
| 12 | Clinical Trials | ClinicalTrials.gov | Trial data |
| 13 | AI Evidence Extraction | LLM-based | Structured claims |
| 14 | Evidence Scoring | Quality assessment | Evidence tiers |
| 15 | Hallucination Protection | Cross-verification | Verified claims |
| 16 | Dossier Assembly | All sources | PDF, DOCX, HTML |
| Endpoint | Purpose |
|---|---|
POST /api/pipeline/{id}/start |
Start pipeline |
GET /api/pipeline/{id}/status |
Pipeline status + SSE stream |
GET /api/products/{id}/compounds |
Compound list |
GET /api/products/{id}/targets |
Target predictions |
GET /api/products/{id}/diseases |
Disease associations |
GET /api/products/{id}/pathways |
Pathway analysis |
GET /api/products/{id}/network |
Network graph |
GET /api/products/{id}/docking |
Docking results |
GET /api/products/{id}/admet |
ADMET profiles |
GET /api/products/{id}/evidence |
Literature evidence |
GET /api/products/{id}/clinical-trials |
Clinical trials |
GET /api/products/{id}/proteins |
Protein structures |
Environment variables (in .env):
# Database
DATABASE_URL=sqlite+aiosqlite:///./natura_evidence.db
# Redis
REDIS_URL=redis://localhost:6380/0
# Celery
CELERY_BROKER_URL=redis://localhost:6380/0
# API Keys (optional — enhances data quality)
DISGENET_API_KEY=
NCBI_API_KEY=
PUBCHEM_API_KEY=# Start everything
bash run.sh
# Or start individually
cd natura-evidence-api
source .venv/bin/activate
uvicorn app.main:app --host 0.0.0.0 --port 8000
celery -A app.tasks.celery_app worker -Q default,compound,target,protein,disease,pathway,network,docking,admet,literature,clinical,ai,dossier --pool=solo --concurrency=1
cd ../natura-evidence-ui
npm run devdocker-compose up -d
# Starts PostgreSQL (port 5433) and Redis (port 6380)cd natura-evidence-api
source .venv/bin/activate
pytest tests/ -vPrivate — for research use only.