PaTz β€” Physics-Aware Transformer with eXplainability
● API Offlinepatz_env

Physics-Informed Modeling

E_PHYS

Differentiable CΞ± energy terms enforcing physical protein geometry during diffusion-based structure generation.

Total Physics Loss
L_phys = w_bondΒ·E_bond + w_angleΒ·E_angle + w_clashΒ·E_clash
Ξ»(t)Β·L_phys added to score-matching loss with linear warmup
Physics loss warmed up gradually from 0 over warmup_epochs
Bond Length Energy
E_bond = Ξ£_bonds k_b (d βˆ’ dβ‚€)Β²

Harmonic penalty on Cα–CΞ± virtual bonds. dβ‚€ = 3.8 Γ… (ideal CΞ± distance). Differentiable via PyTorch autograd.

Bond Angle Energy
E_angle = Ξ£_angles k_a (ΞΈ βˆ’ ΞΈβ‚€)Β²

Harmonic penalty on consecutive Cα–Cα–CΞ± angles. ΞΈβ‚€ = 2.1 rad. High initial values indicate unconstrained diffusion in early epochs.

Steric Clash Energy
E_clash = Ξ£_{i<j} max(0, d_min βˆ’ d_ij)Β²

Repulsive term for atoms closer than d_min = 3.5 Γ…. Prevents non-physical atom overlap during structure generation.

Training Log β€” Epoch 1 Physics Values
loss_phys = 1147.84
e_bond = 144.4
e_angle = 2000.0 ← high early (unconstrained diffusion)
e_clash = 3.44
# Physics terms decrease as model learns physical geometry
Physics Config
dβ‚€ (ideal CΞ± bond)
3.8 Γ…
ΞΈβ‚€ (ideal CΞ± angle)
2.1 rad
d_min (clash threshold)
3.5 Γ…
w_bond
0.1
w_angle
0.1
w_clash
0.5