Breakthrough Graph Neural Network system for predicting blood-brain barrier permeability
No installation needed - predict BBB permeability in your browser
- 🎯 Hybrid GNN Architecture - GAT + GCN + GraphSAGE (1.37M parameters)
- 📊 Interactive Visualizations - Real-time charts with Plotly
- ⚡ Instant Predictions - <1 second inference time
- 🔬 26+ Pre-loaded Molecules - CNS drugs, amphetamines, neurotransmitters
- 💾 Export Results - Download predictions as CSV or JSON
- 📈 Comprehensive Analysis - 12+ molecular properties and drug-likeness scores
Select a molecule → Get instant prediction → Analyze properties → Export results
SMILES → Graph → GAT → GCN → GraphSAGE → GAT → Triple Pooling → MLP → Prediction
- Parameters: 1,372,545
- Layers: 4 GNN layers (2× GAT, 1× GCN, 1× GraphSAGE)
- Attention Heads: 8 (multi-head attention)
- Pooling: Triple (mean + max + sum)
- Activation: ELU
- Normalization: LayerNorm
| Metric | Value |
|---|---|
| Validation MAE | 0.0967 |
| Validation RMSE | 0.1334 |
| Inference Time | <1 second |
| Model Size | 7.5 MB |
# Clone repository
git clone https://github.com/YOUR_USERNAME/BBB-Predictor.git
cd BBB-Predictor
# Install dependencies
pip install -r requirements.txt
# Run web interface
streamlit run app.pyAccess at http://localhost:8501
from predict_bbb import BBBGNNPredictor
# Initialize predictor
predictor = BBBGNNPredictor()
# Predict BBB permeability
result = predictor.predict('CN1C=NC2=C1C(=O)N(C(=O)N2C)C') # Caffeine
print(f"BBB Score: {result['bbb_score']:.3f}") # 0.782
print(f"Category: {result['category']}") # BBB+
print(f"LogP: {result['molecular_descriptors']['logp']:.2f}") # -1.03| Compound | SMILES | BBB Score | Category |
|---|---|---|---|
| Caffeine | CN1C=NC2=C1C(=O)N(C(=O)N2C)C |
0.782 | BBB+ ✅ |
| Morphine | CN1CCC23C4C1CC5=C2C(=C(C=C5)O)OC3C(C=C4)O |
0.756 | BBB+ ✅ |
| Glucose | C(C(C(C(C(C=O)O)O)O)O)O |
0.109 | BBB- ❌ |
| Compound | BBB Score | Clinical Use |
|---|---|---|
| Amphetamine | 0.845 | ADHD, Narcolepsy |
| Methamphetamine | 0.892 | Rarely (Schedule II) |
| MDMA | 0.831 | Research (PTSD) |
-
Physicochemical:
- Molecular Weight
- LogP (lipophilicity)
- TPSA (polar surface area)
-
Hydrogen Bonding:
- H-bond donors
- H-bond acceptors
-
Drug-likeness:
- Lipinski's Rule of 5
- BBB-specific rules
- Rotatable bonds
- Aromatic rings
- Pre-loaded Molecules - 26+ compounds organized by category
- SMILES String - Paste any molecular structure
- Molecule Name - Search by common drug names (beta)
- Gauge Chart - BBB permeability score (0-1)
- Radar Chart - Drug-likeness profile
- Bar Chart - Molecular properties distribution
- Color-coded Results - Instant visual feedback
- CSV format (for spreadsheets)
- JSON format (for programmatic use)
Layer 1: Graph Attention Network (GAT)
- Multi-head attention (8 heads)
- Learns importance weights for molecular features
- 9 input features → 128 channels
Layer 2: Graph Convolutional Network (GCN)
- Spectral graph convolution
- Captures global graph structure
- 128 → 256 channels
Layer 3: GraphSAGE
- Neighborhood aggregation
- Inductive learning capability
- 256 → 128 channels
Layer 4: Graph Attention Network (GAT)
- Final attention-based refinement
- 128 → 64 channels (8 heads)
Pooling: Triple pooling (mean + max + sum)
MLP: Deep predictor (512 → 256 → 128 → 64 → 1)
- 🔬 Drug Discovery - Screen CNS drug candidates
- 🧪 Chemical Property Prediction - Predict BBB permeability
- 📚 Education - Learn about GNNs and molecular ML
- 💼 Portfolio - Showcase ML engineering skills
- 🎓 Research - BBB prediction methodology
- Deep Learning: PyTorch, PyTorch Geometric
- Chemistry: RDKit
- Web Interface: Streamlit
- Visualizations: Plotly
- Data Processing: Pandas, NumPy
- Deployment: Streamlit Cloud
- Hybrid GNN architecture
- Web interface
- Basic dataset (42 compounds)
- Real-time predictions
- Export functionality
- Real BBBP dataset (2,039 compounds)
- Proper cross-validation
- Uncertainty quantification
- Attention visualization
- Ensemble methods
- Multi-task learning
- 3D structure viewer
- Batch processing
- 10,000+ compounds
- API endpoints
- User accounts
- Peer-reviewed publication
Contributions welcome! See CONTRIBUTING.md
- Fork the repository
- Create feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open Pull Request
MIT License - see LICENSE file
- PyTorch Geometric team for excellent GNN library
- RDKit developers for cheminformatics tools
- Streamlit for amazing web framework
- MoleculeNet for BBB datasets
Your Name - @yourhandle
Project Link: https://github.com/YOUR_USERNAME/BBB-Predictor
Live Demo: https://your-app.streamlit.app
If you use this in your research:
@software{bbb_predictor_2025,
author = {Your Name},
title = {BBB Permeability Predictor: Hybrid GNN Approach},
year = {2025},
publisher = {GitHub},
url = {https://github.com/YOUR_USERNAME/BBB-Predictor},
note = {Hybrid GAT+GCN+GraphSAGE architecture for blood-brain barrier prediction}
}Built with ❤️ using PyTorch Geometric and Streamlit
