torchref.refinement.targets.adp.scaler_u module
- class torchref.refinement.targets.adp.scaler_u.ScalerURegularizationTarget(scaler, n_reflections, verbose=0)[source]
Bases:
TargetPin the isotropic component of the scaler’s anisotropic U to zero.
F_scaled = scale · exp(-2π²·sᵀUs) · F_calccouplesUinto the same Debye-Waller slot as the atomic B-factors. The anisotropic deviatoric part of U encodes real directional attenuation in the data and should stay free. The isotropic part — the traceU11 + U22 + U33— is a straight trade with a uniform atomic B shift and must be anchored so the atoms absorb the B-factor roll-off, not the scaler.Penalty
(tr U)² · N_ref / 6— squared trace, scaled by the order of magnitude of the xray gradient on U. The/ 6matches the per-component gradient scaling the user originally requested.