Spaces:
Sleeping
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:
- Common Molecules - Pick from 20+ pre-loaded drugs
- SMILES String - Paste any SMILES notation
- 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
Get SMILES from databases like:
- PubChem
- ChEMBL
- DrugBank
Paste the SMILES string directly
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
- README.md - Complete system documentation
- WEB_INTERFACE.md - Web UI details
- RESULTS.md - Performance metrics
Code Examples
app.py- Web interface codepredict_bbb.py- Prediction APIdemo.py- Command-line examplestrain_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
- Small Size (MW < 450 Da)
- Moderate Lipophilicity (LogP 1-5)
- Low Polarity (TPSA < 90 Ε²)
- Few H-bond Donors (β€3)
- 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
Try the Web Interface
launch_web.batTest Some Molecules
- Start with pre-loaded molecules
- Try your own SMILES strings
Analyze Results
- Compare BBB+ vs BBB- molecules
- Understand property distributions
Export and Share
- Download results as CSV
- Share predictions with team
Explore Advanced Features
- Read WEB_INTERFACE.md
- Check README.md
- Run
python demo.pyfor API examples
π Support
For questions or issues:
- Check this Quick Start guide
- Review WEB_INTERFACE.md
- See README.md for technical details
- Run
python demo.pyfor usage examples
Ready to predict BBB permeability?
# Launch the web interface now!
streamlit run app.py
Enjoy using the BBB Permeability Predictor! π§¬β¨