StereoAwareGNN1 / QUICK_START.md
nabilyasini's picture
Upload folder using huggingface_hub
84766d8 verified

BBB Permeability Predictor - Quick Start Guide

Get started with BBB predictions in 3 easy steps!

πŸš€ Quick Start (3 Steps)

Step 1: Launch the Web Interface

Windows:

# Double-click this file
launch_web.bat

Command Line:

streamlit run app.py

Step 2: Select a Molecule

Choose from three input methods:

  1. Common Molecules - Pick from 20+ pre-loaded drugs
  2. SMILES String - Paste any SMILES notation
  3. Molecule Name - Type the drug name (beta)

Step 3: Get Predictions!

Click "Predict BBB Permeability" and instantly see:

  • βœ… BBB+ (High permeability)
  • ⚠️ BBBΒ± (Moderate permeability)
  • ❌ BBB- (Low permeability)

πŸ“Š What You Get

Instant Results

  • BBB Permeability Score (0.0 - 1.0)
  • Category Classification (BBB+/BBBΒ±/BBB-)
  • Confidence Level

Detailed Analysis

  • Molecular Properties

    • Molecular Weight
    • LogP (lipophilicity)
    • TPSA (polar surface area)
    • H-bond donors/acceptors
  • Drug-likeness Metrics

    • Lipinski's Rule of 5
    • BBB-specific rules
    • Warnings for suboptimal properties

Beautiful Visualizations

  • πŸ“Š Gauge Chart - BBB score meter
  • πŸ•ΈοΈ Radar Chart - Drug-likeness profile
  • πŸ“ˆ Bar Chart - Property distribution

Export Options

  • πŸ’Ύ Download results as CSV
  • πŸ“„ Download results as JSON

🎯 Example Predictions

Example 1: Caffeine (CNS Drug)

Input: Caffeine (or SMILES: CN1C=NC2=C1C(=O)N(C(=O)N2C)C)
Output:
  BBB Score: 0.782
  Category: BBB+ βœ…
  Interpretation: HIGH BBB permeability
  MW: 194.2 Da | LogP: -1.03 | TPSA: 61.8 A^2

Example 2: Glucose (Sugar)

Input: Glucose (or SMILES: C(C(C(C(C(C=O)O)O)O)O)O)
Output:
  BBB Score: 0.109
  Category: BBB- ❌
  Interpretation: LOW BBB permeability
  MW: 180.2 Da | LogP: -3.24 | TPSA: 110.4 A^2

Example 3: Benzene (Aromatic)

Input: Benzene (or SMILES: c1ccccc1)
Output:
  BBB Score: 0.802
  Category: BBB+ βœ…
  Interpretation: HIGH BBB permeability
  MW: 78.1 Da | LogP: 1.69 | TPSA: 0.0 A^2

πŸ”¬ Pre-loaded Molecules

The app includes 20+ common molecules across 4 categories:

CNS Drugs (8 molecules)

  • Caffeine
  • Cocaine
  • Morphine
  • Nicotine
  • Aspirin
  • Ibuprofen
  • Acetaminophen
  • Propranolol

Simple Molecules (4 molecules)

  • Ethanol
  • Benzene
  • Toluene
  • Glucose

Amino Acids (3 molecules)

  • Glycine
  • Alanine
  • Tryptophan

Neurotransmitters (3 molecules)

  • Dopamine
  • Serotonin
  • GABA

πŸ’‘ Tips for Best Results

Using SMILES Input

  1. Get SMILES from databases like:

    • PubChem
    • ChEMBL
    • DrugBank
  2. Paste the SMILES string directly

  3. Click "Predict BBB Permeability"

Understanding Results

BBB+ (Score β‰₯ 0.6)

  • βœ… Likely crosses blood-brain barrier
  • βœ… Potential CNS activity
  • βœ… Good for neurological drugs

BBBΒ± (Score 0.4-0.6)

  • ⚠️ Moderate permeability
  • ⚠️ Case-by-case evaluation needed
  • ⚠️ May require optimization

BBB- (Score < 0.4)

  • ❌ Unlikely to cross BBB
  • ❌ Peripheral action only
  • ❌ Not suitable for CNS targets

Interpreting Warnings

Common warnings and what they mean:

"High molecular weight (>450 Da)"

  • Large molecules struggle to cross BBB
  • Consider reducing molecular size

"LogP outside optimal range (1-5)"

  • Too hydrophilic (LogP < 1): Poor membrane penetration
  • Too lipophilic (LogP > 5): Poor solubility

"High TPSA (>90 A^2)"

  • Too polar to cross BBB efficiently
  • Reduce polar surface area

"High H-bond donors (>3)"

  • Too many H-bond donors reduce permeability
  • Mask or remove donor groups

πŸ› οΈ Troubleshooting

Problem: "Model not found"

Solution: Train the model first

python train_gnn.py

Problem: "OpenMP Error"

Solution: Set environment variable

set KMP_DUPLICATE_LIB_OK=TRUE  # Windows
export KMP_DUPLICATE_LIB_OK=TRUE  # Linux/Mac

Problem: Web interface won't start

Solution: Install dependencies

pip install streamlit plotly

Problem: Port already in use

Solution: Use different port

streamlit run app.py --server.port 8502

πŸ“š Additional Resources

Documentation

Code Examples

  • app.py - Web interface code
  • predict_bbb.py - Prediction API
  • demo.py - Command-line examples
  • train_gnn.py - Training pipeline

Research Background

  • BBB permeability is critical for CNS drug development
  • Only ~2% of small molecules cross the BBB
  • Our GNN model achieves MAE of 0.0967 on validation set

πŸŽ“ Understanding BBB Permeability

What is the Blood-Brain Barrier?

The BBB is a selective barrier that protects the brain from harmful substances while allowing nutrients to pass through.

Why is it Important?

  • Drug Development: CNS drugs must cross BBB
  • Toxicity: Non-CNS drugs should NOT cross BBB
  • Neurological Diseases: BBB permeability affects treatment efficacy

Key Factors for BBB Crossing

  1. Small Size (MW < 450 Da)
  2. Moderate Lipophilicity (LogP 1-5)
  3. Low Polarity (TPSA < 90 Ε²)
  4. Few H-bond Donors (≀3)
  5. Few H-bond Acceptors (≀7)

🌟 Key Features

Model Specifications

  • Architecture: Hybrid GAT+GraphSAGE
  • Parameters: 649,345
  • Validation MAE: 0.0967
  • Training Dataset: 42 curated compounds
  • Prediction Time: <1 second

Web Interface Features

  • ✨ Modern gradient UI design
  • πŸ“± Responsive layout
  • 🎨 Interactive visualizations
  • πŸ’Ύ Export to CSV/JSON
  • πŸ” Real-time predictions
  • πŸ“Š Comprehensive analysis
  • ⚠️ Intelligent warning system

πŸš€ Next Steps

  1. Try the Web Interface

    launch_web.bat
    
  2. Test Some Molecules

    • Start with pre-loaded molecules
    • Try your own SMILES strings
  3. Analyze Results

    • Compare BBB+ vs BBB- molecules
    • Understand property distributions
  4. Export and Share

    • Download results as CSV
    • Share predictions with team
  5. Explore Advanced Features


πŸ“ž Support

For questions or issues:

  1. Check this Quick Start guide
  2. Review WEB_INTERFACE.md
  3. See README.md for technical details
  4. Run python demo.py for usage examples

Ready to predict BBB permeability?

# Launch the web interface now!
streamlit run app.py

Enjoy using the BBB Permeability Predictor! 🧬✨