-
-
Physicochemical preparation comparison: LogD(pH) partitioning and lead bioactive yield.
-
2D Chemical Space (cLogP vs. TPSA) showing selective metabolite extraction plausibility.
-
5-Tier Reverse Pharmacology Knowledge Graph linking plants, metabolites, and ChEMBL targets.
-
In silico extraction optimizer: Parameter tuning, yield heatmaps, and Arrhenius thermal degradation kinetics for Artemisinin.
-
Regional Ethnopharmacology Atlas: Mined archival survey table with GBIF taxonomy, preparation parameters, and indications.
DecoctionGraph: Reverse Pharmacology & Physicochemical Mining of Historical Herbals
Inspiration
For millennia, human medical knowledge was preserved in historical herbals and apothecary manuscripts. However, historical recipes are not modern pharmaceutical extracts. An ethnobotanical preparation is a multi-parameter chemical system governed by solvent polarity, pH ionization, thermal degradation kinetics, and plant tissue diffusion barriers.
A prominent example is Artemisinin: boiling Artemisia annua thermally destroys the active endoperoxide bridge ($t_{1/2} \approx 11.5 \text{ min at } 100^\circ\text{C}$), whereas cold-water wringing—documented in 4th-century Chinese manuals—preserves it.
We built DecoctionGraph to systematically decode, simulate, and validate the chemical physics and molecular pharmacology locked inside historical medical literature at scale.
What It Does
DecoctionGraph is an autonomous biocomputational reverse-pharmacology pipeline featuring four integrated modules:
- Archival Corpus Miner: Ingests multi-page ethnobotanical survey papers and historical herbals (PDF/TXT), standardizes botanical nomenclature via the GBIF Taxonomic Backbone, and extracts 14 structured extraction parameters per preparation with page-level provenance.
- First-Principles Physicochemical Modeling: Computes an Extraction Plausibility Score ($S_{\text{ext}} \in [0, 1]$) combining three biophysical domains:
$$\log D(\text{pH}) = \log P - \log_{10}\left(1 + 10^{\text{pH} - \text{p}K_a}\right)$$
$$S_{\text{ext}} = S_{\text{solvent}} \times S_{\text{thermal}} \times S_{\text{organ}}$$
- Solvent Partitioning ($S_{\text{solvent}}$) across aqueous, hydroalcoholic, lipid oil, and acidic vinegar media.
- Thermal Stability ($S_{\text{thermal}}$) via pseudo-first-order Arrhenius kinetics ($k = A e^{-E_a / (RT)}$).
- Tissue Diffusion Barrier ($S_{\text{organ}}$) modeling parenchymal root, rhizome, and bark resistance.
- Phytochemical & ChEMBL Target Mapping: Enriches taxa with verified secondary metabolites from LOTUS and links them to macromolecular human and pathogen targets in ChEMBL ($K_i, \text{IC}{50} \le 10\ \mu\text{M}$), validating mechanistic links when $S{\text{ext}} \ge 0.50$ and $\text{Alignment} \ge 0.60$, while screening for toxicophores (e.g., pyrrolizidine alkaloids).
- Interactive 5-Tier Knowledge Graph & Chemical Space: Synthesizes a multi-tier bipartite graph ($\text{Document} \to \text{Taxon} \to \text{Preparation} \to \text{Metabolite} \to \text{Target}$) with 2D chemical space exploration ($\text{PCA} / \text{t-SNE}$) and exportable FAIR JSON-LD and regulatory CSV dossiers.
How We Built It
- Cheminformatics: RDKit for SMILES parsing, aromaticity modeling, toxicophore SMARTS matching, and 2D vector molecule rendering.
- Data Integrity: Pydantic v2 with strict Literal types enforcing schema validation and zero hallucination.
- Graph Topology: NetworkX and PyVis for interactive multi-tier network visualisations.
- Data Science: Scikit-learn, Pandas, and Plotly for 2D molecular embedding and chemical property distributions.
- Corpus Processing: pypdf paired with paragraph-aware regex state machines to ingest multi-page literature and filter reference tables.
- Interface: Streamlit dashboard styled with an obsidian-and-emerald clinical UI.
Challenges We Faced
- Cross-Sentence Bleeding in PDF Ingestion: Naive character slicing cleaved sentences and mixed up indications across different plants. We engineered a section-aware parser that segments along numbered sections, plant transitions, and paragraph boundaries while discarding continuation summary tables.
- Negative Prescriptions & Contraindications: Folk texts frequently warn against specific methods (e.g., "never administer the oil orally"). We implemented syntactic clause-masking to prevent cautionary warnings from overriding actual recipe extraction.
- Alkaloid Ionization Kinetics: Quinine in Cinchona bark dissolves poorly in neutral water ($\text{pH} \approx 7.0$). Accurately capturing historical vinegar maceration required integrating Henderson-Hasselbalch protonation equations to model enhanced salt solubility at $\text{pH} \approx 3.0$.
What We Learned
- Empirical Medicine Was Chemistry in Disguise: Traditional healers systematically matched vehicle and temperature to chemical properties—boiling dense Gentiana roots for bitter amarogentin ($\text{TAS2R10}$), steeping comfrey leaves topically for allantoin ($\text{EGFR}$) while avoiding hepatotoxic pyrrolizidine alkaloids concentrated in roots, and infusing Hypericum in oil to extract lipophilic hyperforin ($\text{TRPC6}$) for wound healing.
- Physical Chemistry Grounding Overcomes Data Scarcity: Anchoring predictions in first-principles thermodynamics and partition coefficients produces interpretable, high-confidence leads from historical records without requiring massive labeled datasets.
Built With
- bioinformatics
- chembl-api
- cheminformatics
- gbif-api
- graph-database
- json-ld
- knowledge-graph
- lotus-database
- natural-language-processing
- natural-products
- networkx
- numpy
- pandas
- plotly
- pydantic
- pypdf
- python
- pyvis
- rdkit
- regex
- scikit-learn
- streamlit