Direct methods at high resolution have depended on the resolution of atomic like features in the map. At data resolutions more typical for protein structures (2-3 A) individual atoms may not be resolved, so larger features must be identified. At one extreme the whole molecule may be located using the diffraction magnitudes alone by the molecular-replacement method. At the other extreme it is possible to locate individual residues in a well phased map. In this paper an intermediate problem is addressed: the location of multi-residue fragments on the basis of weak phase information. An agreement function based on the mean-squared difference between model and map over a masked region is shown to be more effective than a simple overlap integral, and may be efficiently calculated by Fourier methods. The techniques are compared using poorly phased electron-density maps at approximately 3 A for the proteins RNAse and O6-methylguanine-DNA-methyltransferase.