An algorithm is described for refining a set of phases to agree with t
he Sayre equation. All operations are carried out using Fourier transf
orms with modest computer-store requirements even for very large syste
ms. The procedure is tested with two moderate-sized proteins, one cont
aining heavy atoms, and is found to give good refinement with data at
more than atomic resolution (1.17 Angstrom) and useful, if less good,
refinement when the data resolution is lower (1.5 Angstrom). It is con
cluded that at atomic resolution, or slightly below, the Sayre equatio
n still has something to offer both for phase refinement and phase ext
ension, especially if used cautiously with weighted multiple isomorpho
us replacement phases acting as a constraint on the phase changes. Eve
n when the Sayre equation on its own refines phases badly, or not at a
ll, it may still make an important contribution in conjunction with ot
her real-space refinement procedures.