Beautiful, interactive web application for predicting blood-brain barrier permeability of molecules.
- Modern gradient design
- Responsive layout
- Interactive visualizations
- Real-time predictions
- BBB Permeability Score (0-1 scale)
- Category Classification (BBB+, BBB±, BBB-)
- Molecular Properties (MW, LogP, TPSA, etc.)
- Drug-likeness Metrics
- BBB Rule Compliance
- Warning System for suboptimal properties
-
Common Molecules - Select from 20+ pre-loaded molecules
- CNS Drugs (Caffeine, Cocaine, Morphine, etc.)
- Simple Molecules (Ethanol, Benzene, Glucose)
- Amino Acids (Glycine, Alanine, Tryptophan)
- Neurotransmitters (Dopamine, Serotonin, GABA)
-
SMILES String - Direct SMILES input for any molecule
-
Molecule Name (Beta) - Type common drug names
- Gauge Chart - BBB score visualization
- Radar Chart - Drug-likeness profile
- Bar Chart - Molecular properties
- Color-coded Results - Instant visual feedback
- CSV export for spreadsheet analysis
- JSON export for programmatic use
# Install required packages
pip install streamlit plotly
# Or install all requirements
pip install -r requirements.txtstreamlit run app.pyOr with environment variable for OpenMP:
# Windows
set KMP_DUPLICATE_LIB_OK=TRUE
streamlit run app.py
# Linux/Mac
export KMP_DUPLICATE_LIB_OK=TRUE
streamlit run app.pyThe app will open in your default browser at http://localhost:8501
-
Select Input Mode in the sidebar
- Choose "Common Molecules" for quick testing
- Choose "SMILES String" for custom molecules
-
Select or Enter Molecule
- Browse categories (CNS Drugs, Amino Acids, etc.)
- Or paste a SMILES string
-
Click "Predict BBB Permeability"
- Get instant results with visualizations
-
Analyze Results
- View BBB score and category
- Check molecular properties
- Review warnings if any
-
Export Results (optional)
- Download as CSV or JSON
- Input Mode Selection
- Model Information (MAE, parameters, architecture)
- Category Guide (BBB+, BBB±, BBB-)
- About Section
- Input Section - Select/enter molecules
- Prediction Button - Trigger analysis
- Results Display:
- Color-coded category box
- BBB score gauge
- Drug-likeness radar
- Property metrics
- Detailed analysis
- Warning system
- Export buttons
Category: BBB+ (High permeability)
Score: 0.782
MW: 194.2 Da
LogP: -1.03
TPSA: 61.8 A^2
Category: BBB- (Low permeability)
Score: 0.114
MW: 75.1 Da
LogP: -0.97
TPSA: 63.3 A^2
Category: BBB+ (High permeability)
Score: 0.802
MW: 78.1 Da
LogP: 1.69
TPSA: 0.0 A^2
The app includes 20+ common molecules:
CNS Drugs:
- Caffeine, Cocaine, Morphine, Nicotine
- Aspirin, Ibuprofen, Acetaminophen
- Propranolol
Simple Molecules:
- Ethanol, Benzene, Toluene, Glucose
Amino Acids:
- Glycine, Alanine, Tryptophan
Neurotransmitters:
- Dopamine, Serotonin, GABA
- Architecture: Hybrid GAT+GraphSAGE GNN
- Parameters: 649,345
- Validation MAE: 0.0967
- Training Dataset: 42 curated compounds
- Gauge Chart: Real-time BBB score with thresholds
- Radar Chart: Drug-likeness across 5 properties
- Bar Chart: Comprehensive molecular properties
- Green: BBB+ (High permeability, ≥0.6)
- Orange: BBB± (Moderate permeability, 0.4-0.6)
- Red: BBB- (Low permeability, <0.4)
Error: Failed to load model
Solution: Train the model first:
python train_gnn.pyOMP: Error #15: Initializing libiomp5md.dll
Solution: Set environment variable:
set KMP_DUPLICATE_LIB_OK=TRUE # Windows
export KMP_DUPLICATE_LIB_OK=TRUE # Linux/MacError: Port 8501 is already in use
Solution: Specify a different port:
streamlit run app.py --server.port 8502Edit COMMON_MOLECULES dictionary in app.py:
COMMON_MOLECULES = {
"Your Molecule": "SMILES_STRING",
# Add more here
}Create .streamlit/config.toml:
[theme]
primaryColor = "#667eea"
backgroundColor = "#ffffff"
secondaryBackgroundColor = "#f0f2f6"
textColor = "#262730"
font = "sans serif"Edit the chart creation functions in app.py:
create_gauge_chart()- BBB score gaugecreate_property_radar()- Drug-likeness radarcreate_property_bars()- Property bars
- Prediction Time: <1 second per molecule
- Batch Processing: Supported via API mode
- Concurrent Users: Streamlit caching enables multi-user support
Planned features:
- Molecule drawing interface (JSME/RDKit)
- Batch upload (CSV/Excel)
- 3D molecule visualization
- Historical predictions tracking
- Comparison mode (multiple molecules)
- API endpoint mode
- Mobile-optimized view
- Dark theme support
The interface includes:
- Header - Beautiful gradient title
- Sidebar - Settings and information
- Input Section - Multiple input modes
- Results Panel - Comprehensive analysis
- Visualizations - Interactive charts
- Export Options - Download results
For issues or questions:
- Check README.md for system documentation
- Review RESULTS.md for model performance
- See example predictions in
demo.py
Part of the BBB Permeability Prediction System.
Launch the app: streamlit run app.py
Enjoy predicting BBB permeability with beautiful visualizations! 🧬✨