Rtx09 commited on
Commit
b90bf21
·
1 Parent(s): 4af965c

fix: clean up phonons tab info

Browse files
Files changed (1) hide show
  1. app.py +29 -7
app.py CHANGED
@@ -411,8 +411,34 @@ def predict_jdft2d(formula: str):
411
  if err: return f"❌ {err}", ""
412
  return f"### {pred:.1f} meV/atom", f"**{pred:.1f} meV/atom** exfoliation"
413
 
414
- def predict_phonons_placeholder(formula: str):
415
- return "### ⚠️ Structure Required", "Phonon peak frequency (cm⁻¹) requires CIF file."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
416
 
417
 
418
  # ─────────────────────────────────────────────────────────────────
@@ -466,11 +492,7 @@ def build():
466
  btn_j.click(predict_jdft2d, f_j, [out_j, ctx_j])
467
 
468
  with gr.Tab("🎵 Phonons"):
469
- f_ph = gr.Textbox(label="Formula", value="Si")
470
- btn_ph = gr.Button("Show info", variant="primary")
471
- out_ph = gr.Markdown(elem_id="result_text")
472
- ctx_ph = gr.Markdown()
473
- btn_ph.click(predict_phonons_placeholder, f_ph, [out_ph, ctx_ph])
474
 
475
  return demo
476
 
 
411
  if err: return f"❌ {err}", ""
412
  return f"### {pred:.1f} meV/atom", f"**{pred:.1f} meV/atom** exfoliation"
413
 
414
+ PHONONS_INFO = """
415
+ ## 🎵 Phonon Peak Frequency
416
+
417
+ The **TRIADS V6 Graph-TRM** achieves **41.91 ± 4.04 cm⁻¹ MAE** on Matbench phonons, using a gate-based halting Graph Neural Network that adaptively runs 4–16 message-passing cycles.
418
+
419
+ ### Architecture
420
+ - **Gate-based halting**: 4–16 adaptive GNN cycles (halts when gate activations drop below threshold)
421
+ - **Graph Attention TRM**: line-graph bond updates + joint self-attention + cross-attention
422
+ - **Input**: Full crystal structure — atom positions, bond distances, angles (requires CIF/POSCAR)
423
+
424
+ ### Why no live demo?
425
+ The phonons model requires a **pre-computed crystal graph** (atom positions, bond lengths, bond angles).
426
+ Composition-only featurization is insufficient for phonon prediction — structural details like bond stiffness
427
+ and crystal symmetry are essential.
428
+
429
+ ### Benchmark Results
430
+ | Model | MAE (cm⁻¹) |
431
+ |---|---|
432
+ | **TRIADS V6 (ours)** | **41.91 ± 4.04** |
433
+ | MEGNet | 28.76 |
434
+ | ALIGNN | 29.34 |
435
+ | MODNet | 45.39 |
436
+ | CrabNet | 47.09 |
437
+ | TRIADS V4 | 56.33 |
438
+
439
+ > **Note**: MEGNet and ALIGNN use full DFT structural relaxation data.
440
+ > TRIADS V6 achieves competitive performance with a simpler, more parameter-efficient Graph-TRM architecture (< 50K parameters).
441
+ """
442
 
443
 
444
  # ─────────────────────────────────────────────────────────────────
 
492
  btn_j.click(predict_jdft2d, f_j, [out_j, ctx_j])
493
 
494
  with gr.Tab("🎵 Phonons"):
495
+ gr.Markdown(PHONONS_INFO)
 
 
 
 
496
 
497
  return demo
498