StereoAwareGNN1 / INTERFACE_GUIDE.md
nabilyasini's picture
Upload folder using huggingface_hub
84766d8 verified
# ๐ŸŒ BBB Web Interface - Visual Guide
## ๐Ÿš€ How to Launch
### Method 1: Double-Click (Easiest!)
```
๐Ÿ“ C:\Users\nakhi\BBB_System\
๐Ÿ“„ START_HERE.bat โ† DOUBLE-CLICK THIS FILE!
```
### Method 2: Command Line
```bash
cd C:\Users\nakhi\BBB_System
streamlit run app.py
```
The interface will automatically open at: **http://localhost:8501**
---
## ๐ŸŽจ What You'll See
### HEADER (Top of Page)
```
โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘ โ•‘
โ•‘ ๐Ÿงฌ BBB Permeability Predictor โ•‘
โ•‘ โ•‘
โ•‘ Graph Neural Network powered Blood-Brain Barrier โ•‘
โ•‘ prediction โ•‘
โ•‘ โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
```
*(Beautiful blue gradient background)*
---
### SIDEBAR (Left Panel)
```
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ โš™๏ธ Settings โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Input Mode: โ”‚
โ”‚ โ—‹ Common Molecules โ”‚
โ”‚ โ—‹ SMILES String โ”‚
โ”‚ โ—‹ Molecule Name (Beta) โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ ๐Ÿ“Š Model Info โ”‚
โ”‚ Validation MAE: 0.0967 โ”‚
โ”‚ Parameters: 649,345 โ”‚
โ”‚ Architecture: GAT+SAGE โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ ๐Ÿ“– Categories โ”‚
โ”‚ โœ… BBB+ (โ‰ฅ0.6): High permeabilityโ”‚
โ”‚ โš ๏ธ BBBยฑ (0.4-0.6): Moderate โ”‚
โ”‚ โŒ BBB- (<0.4): Low permeability โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ โ„น๏ธ About โ”‚
โ”‚ This tool uses a hybrid Graph โ”‚
โ”‚ Attention Network... โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
```
---
### MAIN PANEL (Center)
#### Step 1: Select Molecule
```
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Select a Common Molecule โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ โ”‚
โ”‚ Category: [CNS Drugs โ–ผ] โ”‚
โ”‚ โ”‚
โ”‚ Molecule: [Caffeine โ–ผ] โ”‚
โ”‚ Options: โ”‚
โ”‚ - Caffeine โ”‚
โ”‚ - Cocaine โ”‚
โ”‚ - Morphine โ”‚
โ”‚ - Nicotine โ”‚
โ”‚ - Aspirin โ”‚
โ”‚ - Ibuprofen โ”‚
โ”‚ - Acetaminophen โ”‚
โ”‚ - Propranolol โ”‚
โ”‚ โ”‚
โ”‚ SMILES: CN1C=NC2=C1C(=O)N(C(=O)N2C)C โ”‚
โ”‚ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
```
#### Step 2: Predict Button
```
โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘ ๐Ÿ”ฎ Predict BBB Permeability โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
```
*(Large blue gradient button)*
---
### RESULTS DISPLAY
#### Prediction Box (After clicking predict)
```
โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘ โ•‘
โ•‘ โœ… BBB+ โ•‘
โ•‘ โ•‘
โ•‘ HIGH BBB permeability โ•‘
โ•‘ โ•‘
โ•‘ 0.782 โ•‘
โ•‘ โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
```
*(Green gradient for BBB+, Red for BBB-, Orange for BBBยฑ)*
#### Visualizations Side-by-Side
**Left Side: Gauge Chart**
```
BBB Permeability Score
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ•ฑ โ•ฒ
โ•ฑ ๐Ÿ”ด Red ๐ŸŸก ๐ŸŸข โ•ฒ
โ”‚ 0.0 0.4 0.6 1.0โ”‚
โ•ฒ โ†‘ โ•ฑ
โ•ฒ 0.782 โ•ฑ
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
(Needle points to green zone)
```
**Right Side: Radar Chart**
```
MW Score
โ•ฑโ•ฒ
โ•ฑ โ•ฒ
H-Acc โ•ฑ โ•ฒ LogP
โ•ฑ โฌก โ•ฒ
โ•ฑ โ•ฒ
โ•ฑโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฒ
TPSA H-Donors
```
#### Metrics Cards
```
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Molecular โ”‚ LogP โ”‚ TPSA โ”‚ BBB Rules โ”‚
โ”‚ Weight โ”‚ โ”‚ โ”‚ โ”‚
โ”‚ 194.1 Da โ”‚ -1.03 โ”‚ 61.8 Aยฒ โ”‚ โŒ No โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
```
#### Properties Table
```
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Hydrogen Bonding โ”‚ Structure โ”‚
โ”‚ โ€ข H-bond Donors: 0 (โ‰ค3) โ”‚ โ€ข Rotatable Bonds: 0 โ”‚
โ”‚ โ€ข H-bond Acceptors: 6 (โ‰ค7) โ”‚ โ€ข Aromatic Rings: 2 โ”‚
โ”‚ โ”‚ โ€ข Total Atoms: 14 โ”‚
โ”‚ Drug-likeness โ”‚ BBB Rules Criteria โ”‚
โ”‚ โ€ข Lipinski Violations: 0/4 โ”‚ โ€ข MW: 150-450 Da โ”‚
โ”‚ โ€ข BBB Compliance: โŒ No โ”‚ โ€ข LogP: 1-5 โ”‚
โ”‚ โ”‚ โ€ข TPSA: <90 Aยฒ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
```
#### Warnings Section (if any)
```
โš ๏ธ Warnings:
- LogP outside optimal range (1-5): -1.03
```
#### Bar Chart (Molecular Properties)
```
Molecular Properties
MW โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘ 194.2
LogP โ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ -1.03
TPSA โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘ 61.8
H-D โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 0
H-A โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘ 6
Rot โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 0
0 50 100 150 200
```
#### Download Buttons
```
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ ๐Ÿ“ฅ Download Results (CSV)โ”‚ ๐Ÿ“ฅ Download Results (JSON)โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
```
---
## ๐ŸŽฏ Example Walkthrough
### Testing Caffeine (BBB+)
1. **Select Input Mode:** "Common Molecules"
2. **Choose Category:** "CNS Drugs"
3. **Select Molecule:** "Caffeine"
4. **Click:** "๐Ÿ”ฎ Predict BBB Permeability"
5. **See Results:**
- โœ… **BBB+** in green box
- **Score: 0.782**
- Gauge shows in green zone
- Radar shows drug profile
- Warning: LogP outside range
### Testing Glucose (BBB-)
1. **Select Category:** "Simple Molecules"
2. **Select Molecule:** "Glucose"
3. **Click Predict**
4. **See Results:**
- โŒ **BBB-** in red box
- **Score: 0.109**
- Gauge shows in red zone
- Multiple warnings
### Custom SMILES Input
1. **Select Input Mode:** "SMILES String"
2. **Paste SMILES:** `c1ccccc1` (Benzene)
3. **Click Predict**
4. **See Results:**
- โœ… **BBB+** with score 0.802
---
## ๐ŸŽจ Color Guide
### Category Colors
- **๐ŸŸข Green (BBB+):** High permeability, good for CNS drugs
- **๐ŸŸ  Orange (BBBยฑ):** Moderate permeability, uncertain
- **๐Ÿ”ด Red (BBB-):** Low permeability, won't cross BBB
### Gauge Zones
- **๐Ÿ”ด Red (0.0-0.4):** BBB- zone
- **๐ŸŸก Yellow (0.4-0.6):** BBBยฑ zone
- **๐ŸŸข Green (0.6-1.0):** BBB+ zone
---
## ๐Ÿ“Š All Available Molecules
### CNS Drugs (8)
1. Caffeine - Stimulant
2. Cocaine - Stimulant
3. Morphine - Opioid
4. Nicotine - Stimulant
5. Aspirin - Pain reliever
6. Ibuprofen - Anti-inflammatory
7. Acetaminophen - Pain reliever
8. Propranolol - Beta blocker
### Simple Molecules (4)
1. Ethanol - Alcohol
2. Benzene - Aromatic
3. Toluene - Solvent
4. Glucose - Sugar
### Amino Acids (3)
1. Glycine - Simplest amino acid
2. Alanine - Small amino acid
3. Tryptophan - Aromatic amino acid
### Neurotransmitters (3)
1. Dopamine - Reward neurotransmitter
2. Serotonin - Mood neurotransmitter
3. GABA - Inhibitory neurotransmitter
---
## ๐Ÿ’ก Tips for Best Experience
### 1. Start with Common Molecules
- Try Caffeine first (BBB+)
- Then try Glucose (BBB-)
- Compare the differences!
### 2. Use SMILES for Custom Molecules
- Get SMILES from PubChem
- Paste directly into input
- Get instant predictions
### 3. Read the Warnings
- Understand why predictions are made
- Learn about molecular properties
- Optimize your drug candidates
### 4. Export Results
- Download as CSV for Excel
- Download as JSON for programming
- Keep records of predictions
### 5. Compare Molecules
- Try multiple molecules
- Look at property patterns
- Understand structure-activity relationships
---
## ๐Ÿ–ฅ๏ธ System Requirements
- **Browser:** Chrome, Firefox, Edge, Safari
- **Internet:** Not required (runs locally)
- **RAM:** 2GB minimum
- **Storage:** Model file ~7.5 MB
---
## ๐ŸŽฌ Quick Start Commands
### Windows
```batch
cd C:\Users\nakhi\BBB_System
START_HERE.bat
```
### Linux/Mac
```bash
cd /path/to/BBB_System
export KMP_DUPLICATE_LIB_OK=TRUE
streamlit run app.py
```
### Custom Port
```bash
streamlit run app.py --server.port 8502
```
---
## ๐Ÿ“ธ Screenshot Guide
When you open the app, you'll see:
1. **Top:** Blue gradient header with title
2. **Left:** Sidebar with settings and info
3. **Center:** Molecule selection area
4. **Bottom:** Large predict button
5. **After prediction:** Colorful results with charts
The entire interface is:
- **Responsive** - Works on any screen size
- **Interactive** - Hover for tooltips
- **Beautiful** - Professional gradients
- **Fast** - Predictions in <1 second
---
## ๐ŸŽ‰ You're Ready!
### To start:
1. Double-click **START_HERE.bat**
2. Browser opens automatically
3. Select Caffeine from dropdown
4. Click predict
5. See beautiful results!
**Enjoy your BBB Permeability Predictor!** ๐Ÿงฌโœจ
---
**Questions?** Check:
- [QUICK_START.md](QUICK_START.md) - User guide
- [WEB_INTERFACE.md](WEB_INTERFACE.md) - Technical details
- [README.md](README.md) - Full documentation