Figure 1
(a) Schematic overview of information flow during a forward pass in the standard TorchRef refinement loop. The central goal of any macromolecular refinement is to improve the data–model fit. Atomic coordinates are used to evaluate geometry-based restraint targets: bond lengths, bond angles, torsion angles, planarity, non-bonded repulsion, chiral volumes and an opt-in Ramachandran score (off by default and unused in the AlphaFold benchmark). ADPs are used to feed three regularization targets: a bonded similarity restraint, a shifted inverse-gamma population restraint on the B-value distribution and a kNN locality restraint on . From all model parameters, structure factors are computed, scaled against experimental data and compared with observed amplitudes through a maximum-likelihood target. Individual target values are aggregated according to their respective weights into a scalar loss, from which gradients are backpropagated to all refinable parameters via PyTorch's autograd. (b) Overview of the TorchRef refinement workflow. The process begins by loading structure coordinates (PDB or mmCIF format) and reflection data (MTZ or CIF format). An initial scale refinement is performed, followed by the main refinement loop: scale update, coordinate refinement, and joint optimization of occupancies and ADPs. After the specified number of cycles, a final round of scale refinement is performed, followed by writing out the refined model and structure factors. |