[UI] Add Mol* 3D protein structure viewer to hypothesis pages
ID: eb11ca2a-6ff3-48db-b6ba-a92f85422ac9
Priority: 88
Type: one_shot
Status: done
Goal
Add interactive 3D protein structure viewers using Mol (molstar.org) to hypothesis detail pages. Keep Mol viewer on entity/hypothesis/challenge detail pages where it adds value. Do NOT feature it prominently on /showcase.
Acceptance Criteria
☑ Mol* 3D viewer embedded in hypothesis_detail() page
☑ Mol* 3D viewer embedded in entity_detail() page
☑ Mol* 3D viewer embedded in challenge_detail() page
☑ Mol* viewer NOT shown on /showcase page
☑ PDB structures loaded for target proteins with known PDB IDs
☑ AlphaFold predicted structures used when experimental PDB not available
☑ Lazy-loading (collapsible) to avoid impacting page performance
Implementation
Files Modified
api.py — Added Mol* viewer HTML/JS to hypothesis_detail(), entity_detail(), and challenge_detail()
Key Implementation Details
Lazy-loaded collapsible viewers — Mol* CSS/JS loaded only when user expands the details panel
PDBe Mol* plugin — Uses https://www.ebi.ac.uk/pdbe/pdb-component-library/js/pdbe-molstar-plugin-3.1.0.js
PDB ID mapping — Curated mapping of 80+ neurodegeneration targets to PDB IDs (lines 27207-27399)
AlphaFold fallback — When no experimental structure exists, uses AlphaFold predicted model via UniProt ID
Gene alias resolution — Targets matched by gene name aliases (TDP-43->TARDBP, APOE4->APOE, Tau->MAPT, etc.)
RCSB PDB API fallback — Dynamic search for structures when neither PDB nor AlphaFold ID is knownCommits on Main
afebddfec — [Demo] Add Mol* 3D protein viewers to walkthrough pages [task:8aba1c2f-6223-4836-bbd8-e0c02e958a44]
db23ef9cf — [Artifacts] Add 8 PDB + 3 UniProt protein mappings for Mol* viewers [task:d271b465-bf6]
7fb8ef909 — [Artifacts] Enrich targets with PDB/UniProt IDs + fix challenge Mol* auto-linking [task:e27b4301-b99b-41ae-ad45-d29b603468c0]
91ec0016e — [Quality] Remove Mol* protein viewer section from /showcase page [task:b278d4d3-7b17-4069-b2a1-320a0247e3f4]
Duplicate task note: This task (eb11ca2a) is functionally identical to task 05a277d6-f4cc-4439-ae7a-71806332e313 (spec:
d16_4_molstar_protein_viewer_spec.md). Both ask for Mol* on hypothesis pages with same acceptance criteria. Work was completed via the related task's commits.
Work Log
2026-04-14 00:40 PT — Slot minimax:52
- Status: Verified complete on main — implementation already exists
- Verification:
hypothesis_detail() has Mol* viewer at lines 27404-27560 in api.py
- Verification:
entity_detail() has Mol* viewer at lines 42626-42833 in api.py
- Verification:
challenge_detail() has Mol* viewer at lines 56560-56967 in api.py
- Verification: /showcase has NO Mol* viewer (correct per requirement)
- Result: Task already complete on main via commits afebddfec, db23ef9cf, 7fb8ef909, 91ec0016e (associated with related task 05a277d6)