xraytools.

Charge Flipping

The phases are thrown away and this gets them back. Transform, change the sign of everything below a small threshold, transform back, put the measured amplitudes in again — a few hundred times. Nothing in it knows what an atom is, and the atoms appear anyway.

You supply
One of the named structures, and three numbers with defaults: the flip threshold as a multiple of the map’s rms, how many cycles to run, and which random start. The amplitudes are computed from the published coordinates and the phases are then discarded.
Reading it
Every result is printed beside a floor — what the same test scores on maps built from random phases. The comparison fixes neither the origin nor the hand of the structure, so it searches both, and on a structure whose sites fall on a regular pattern that search fits a noise map perfectly. Where the floor equals the full count, a perfect score is evidence of nothing, and the page says so.

Worked examples: cristobalite · rock salt — a score worth nothing · berlinite — nothing to show

Input

× the map’s rms

Density at or below this changes sign each cycle. Blank means 0.2; the range is -0.5 to 2.

How many times the four steps run. Blank means 400, and 2000 is the most this will do.

Which set of random starting phases, from 1 to 999. It is a lottery: the same structure solves from some starts and not others, and changing this is how you play it again.

Throw the phases away and get them back

A diffraction experiment measures |F| and loses the phase, and the Fourier page shows what that costs: the amplitudes alone draw nothing. The Patterson function gets a real answer without phases and pays by answering about interatomic vectors rather than atoms, and direct methods show the phases are constrained without being measured. Charge flipping is the one that just solves it.

The whole algorithm is four steps, repeated a few hundred times. Transform the current coefficients into a map. Wherever the density is at or below a small threshold, change its sign. Transform back. Throw away the amplitudes that came out and put the measured ones back, keeping the new phases. Nothing in it knows what an atom is; the only assumption is that a real electron density is mostly flat with a few sharp peaks, and the flip is what enforces it.

Choose a structure. Its amplitudes are computed from the published coordinates, the phases are then discarded and replaced with random numbers, and what comes back is compared with the atoms it never saw.

This runs on the projection down c, using only the hk0 reflections, so the map is a plane and the transform is two-dimensional. Atoms at the same x and y but different z fall on one another, which is why a structure can have more atoms than the map has sites. In one dimension the same algorithm fails on everything but the simplest structures, because a 1-D projection is not sparse and sparseness is the whole assumption the flip enforces.

Where this comes from