Policy: REAL DATA ONLY, NO FALSE DATA FALLBACKS ✅
You said:
"let's fix this and we will try to avoid fall back function as much as possible"
What I initially did (WRONG):
- ❌ Added hash-based fallback when Vina unavailable
- ❌ Generated fake selectivity numbers
- ❌ Returned data even without real docking
What I fixed it to:
- ✅ REMOVED all fallback logic
- ✅ REAL Vina docking ONLY
- ✅ Returns EMPTY if dependencies missing (NO false data)
# Check if we can do REAL docking
if not (vina_installed and obabel_installed):
return {} # ← EMPTY, never false data
if not (off_targets_loaded and pdb_structures_available):
return {} # ← EMPTY, never false data
# Only if EVERYTHING available: run real Vina
selectivity_results = await real_vina_docking()If all dependencies available:
{
"selectivity_results": [
{
"smiles": "CC(C)Cc1ccc...",
"target_affinity": -9.1,
"best_off_target_affinity": -2.8,
"selectivity_score": 0.92,
"is_validated": true
}
]
}If Vina/OpenBabel missing or PDB structures unavailable:
{}No false data, just empty.
💡 The mutation geometrically reshaped the binding pocket.
Novel molecules were designed to fit the new geometry.
💡 Why These Molecules Were Designed
✓ Larger aromatic rings will fit expanded pocket (+45.2 ų)
✓ More polar groups engage with hydrophilic regions (-0.32)
✓ H-bond donors/acceptors now favorable (+0.15 polarity)
Each structural feature targets specific geometric changes.
REQUIRED (no exceptions):
✓ AutoDock Vina 1.2.7+
✓ Open Babel 3.1.1+
✓ Off-target PDB structures loaded by PlannerAgentWithout these → SelectivityAgent returns empty (no selectivity data shown).
pip install vina meeko openbabel-wheel
cd backend
python -m uvicorn main:app --reloadPOST: {"query": "EGFR T790M"}
Result: selectivity_results populated with real Vina docking data
cd backend
python -m uvicorn main:app --reloadPOST: {"query": "EGFR T790M"}
Result: selectivity_results: [] (empty, no fake data)
| File | What | Why |
|---|---|---|
backend/agents/SelectivityAgent.py |
Removed fallback, returns empty if deps missing | Zero false data |
backend/agents/PlannerAgent.py |
Loads off-target PDBs at pipeline start | Provides real structures |
frontend/.../PocketGeometryAnalysis.tsx |
Dynamic design explanations | Shows WHY molecules designed |
✅ No false data ever generated ✅ Only real AutoDock Vina results ✅ Empty selectivity tab if dependencies missing ✅ Pocket geometry shows specific design rationale ✅ 100% transparent about data quality
Status: Fixed to match your requirements 🧬