where k B is the Boltzmann constant, T is a weighting temperature, n is the number of points at which the energy is evaluated, W j is the contribution from the weighting scheme, λ is the regularization coefficient (this term is independent of n and can take any positive value), V i is the torsion parameter being optimized and V 0 i is an initial estimate of the torsion parameter. Where we have used a harmonic restraint, we have used V 0 i = 0 as the initial guess as previously suggested. The V 4 term was set to zero throughout the fitting procedure to avoid overfitting. 1 E j QM and E j M M are the QM and MM optimized energies at each sampled dihedral angle relative to the lowest QM or MM energy. MM scans allow all other degrees of freedom to optimize, and so the structures are similar, but not identical, to the QM structures. Weighting schemes are used to prioritize accuracy in particular regions of the dihedral scan, for example in the β-sheet region of the Ramachandran plot. A range of weighting schemes has been previously used, including schemes that prioritize the lowest QM energies 1 or that prioritize regions that have been shown experimentally to be most populated by proteins. 3 Methods