How it is known

The solver that knows no symmetry

Compute a map from amplitudes and random phases, reverse the sign of everything below a small threshold, transform back and keep the phases. Repeat. The structure appears — and so does its space group, which was never supplied.

Assumes The formula that has the answer already, The phase problem and Three phases that do not move when the origin does.

The formula that has the answer already ends by naming three descendants of the tangent formula and lists all three under not owned. The last of them is four lines long:

compute a map, reverse the sign of everything below a small threshold, transform back, keep the new phases and the measured amplitudes, repeat.

It has no triplets in it, no probability distribution, no starting set, and no space group. It was published in 2004 by Gábor Oszlányi and András Sütő, and it works. This is what owning it means.

A map from amplitudes alone, 0.59 grid steps out. The density after 150 cycles of flipping, with the atoms that produced the data drawn as rings — moved into the origin and the handedness the solution chose, because a phase set does not fix either and comparing without allowing for them measures the arbitrariness of the description. Every peak of the map is an atom and every atom has a peak. Nothing about the arrangement went into the calculation: the input was a list of amplitudes and a random set of phases.
Fig. 1 The density after a hundred and fifty cycles, with the atoms that produced the data drawn as rings. They have been moved into the origin and the handedness the solution chose, because a phase set fixes neither. Every peak is an atom and every atom has a peak. The input was a list of amplitudes and a set of random phases.

The whole algorithm

A diffraction experiment measures intensities, so the phases are lost and half of every measurement is thrown away before it is written down. Every method of getting them back works by imposing something known about the density that the amplitudes alone do not enforce.

Charge flipping imposes almost nothing, and that is the surprise. In outline:

  1. Take the measured amplitudes with whatever phases are in hand — random ones, to begin with — and transform to a map.
  2. Wherever the map is below a small positive threshold δ, reverse its sign. Everything above δ is left exactly as it is.
  3. Transform the flipped map back, and keep only its phases.
  4. Put the measured amplitudes back on those phases, and go round again.

The only fact about matter anywhere in that loop is in step two: electron density is positive, so a region where the map is near zero or negative is a region where the map is wrong, and turning it upside down is a crude way of saying so. There is no atomicity, no resolution assumption, no chemistry, and — the point this essay is named for — no symmetry.

One detail in the data matters and is easy to get wrong. The reflection at zero angle is not measured by any experiment, and it is left free here: the transform of the flipped map supplies it afresh each cycle. Supplying it instead pins the map’s mean and the iteration converges to something with the right average density and no contrast.

An agreement figure that is perfect when nothing happens

The natural way to watch such an iteration is the R-factor between the amplitudes the current map produces and the amplitudes that were measured. That number has to be taken at the right moment, and the wrong moment is very inviting.

The indicator that is perfect when nothing happens. The R-factor between the amplitudes the current map produces and the amplitudes that were measured, taken before the measured ones are imposed, cycle by cycle. Flipping at 1.2 standard deviations, it falls and settles, and the map at the end sits 0.59 grid steps from the structure that made the data. With flipping switched off the iteration changes nothing, so the amplitudes come back exactly as they went in and the R-factor is zero at every cycle — a perfect score for a map that is 2.8 grid steps from the answer. An agreement figure is evidence about the step that was taken, and about nothing else.
Fig. 2 The R-factor cycle by cycle, taken before the measured amplitudes are put back. Flipping at 1.2 standard deviations it falls and settles, and the map at the end is well inside a grid step of the structure. With flipping switched off the iteration changes nothing, the amplitudes come back exactly as they went in, and the R-factor is zero at every cycle — a perfect score for a map that is nowhere near the answer.

Taken after the amplitudes are imposed, the R-factor is identically zero for ever, because imposing them is precisely what makes the two agree. A solver watching that number would report perfect convergence from its first cycle for ever.

The refusal that guards it is sharper than a comment and worth stating as a result in its own right. Run the same loop with flipping switched off, so that the iteration is the identity map. Every cycle reproduces the measured amplitudes exactly, so R is zero at every cycle — and the map is noise. An agreement figure is evidence about the step that was taken and about nothing else, and here is a case where a perfect one accompanies a complete failure.

The one threshold on this site

Everything else this collection decides is decided in integers. A pattern has a symmetry or it does not; a lattice permits a five-fold rotation or it does not; a set of translations closes or it does not. δ is different. It is a real parameter, the algorithm’s behaviour depends on it, and no principle picks a value.

Near-symmetry, and the tolerance that is not here sets out what to do in that situation: the moment a threshold is introduced, the answer stops being a fact about the object and becomes a fact about the threshold as well — so the dependence is measured and published rather than a working value being quoted.

A window, from 1.1 to 1.3. How often the same data is solved, from four random starts, at each flipping threshold. Below the window the map is barely changed each cycle and the iteration goes nowhere; above it, too much of the map is inverted and the structure is destroyed as fast as it forms. In between every start arrives. This is the one number in this collection that is genuinely a threshold rather than an exact criterion, and the honest way to carry it is to show the dependence rather than to publish the value that worked.
Fig. 3 How often the same data is solved, from four random starts, at each threshold. Below the window the map is barely changed each cycle and the iteration goes nowhere; above it, so much of the map is inverted that the structure is destroyed as fast as it forms. In between, every start arrives.

The window is narrow and it is a window rather than a direction, which is the interesting shape. Too small a δ flips almost nothing and the iteration is nearly the identity — the failure above, approached continuously. Too large a δ flips almost everything, including the peaks that are the structure, and each cycle destroys what the last one built. The value has to be small enough to leave the peaks alone and large enough to matter, and there is no way to know in advance where that is except by trying.

The threshold is measured here in units of the map’s own standard deviation, which is the only scale the calculation has: the amplitudes arrive on an arbitrary scale, and a threshold in absolute units would be a statement about the units.

The group comes back out

The algorithm is run in P1. It imposes no operation, treats every reflection as independent, and is told nothing about the arrangement that produced the data. The structures it is given here are not in P1 at all.

The group comes back out of the answer. Four structures solved in P1 — the solver imposes no operation and is told nothing about symmetry — and the peaks of each finished map handed to a detector. A solved map is sampled on a grid, so its peaks are measured coordinates and the detector is the one that takes a tolerance; the columns are that tolerance in grid steps. Each row's own group appears at about one step, which is the map's resolution, and the structure with no symmetry acquires none at any tolerance on the ladder. That control is what makes the other three rows a measurement rather than an artefact of a generous threshold.
Fig. 4 Four structures solved in P1 and the peaks of each finished map handed to a detector. The columns are the tolerance the detector was given, in grid steps, because a solved map is sampled on a grid and its peaks are measured coordinates. Each row’s own group appears at about one step — and the structure with no symmetry acquires none at any tolerance on the ladder.

This is the move this collection makes in every pattern figure, pointed in an unusual direction. Ordinarily a pattern is generated from a group, the group is forgotten, and the detector rediscovers it. Here the group was never in the calculation at all: it was in the amplitudes, and the solver — which cannot see it and does not use it — produced a map that has it.

Two details keep that from being a trick.

The peaks have to be moved to their own centroid first. A symmetry element is somewhere rather than nowhere, and the solved map sits at whatever origin the iteration wandered into; a detector that looks only for operations about the origin finds nothing in a perfectly correct answer. That is the same fact the normaliser essays are about, met from the other side.

And the detector needs a tolerance, so the answer needs a control. A map on a grid locates a peak no better than a grid step, so the exact detector used everywhere else on this site does not apply and the one with a tolerance does. A generous tolerance manufactures symmetry — which is exactly what near-symmetry measures — so the census includes a structure built with no symmetry at all, and it reports one operation at every tolerance on the ladder. Without that row the other three would prove nothing.

What it does not need, compared with what came before

The methods this rung sits above need a great deal more.

The tangent formula needs normalised structure factors, which needs a scale and a temperature factor, which needs Wilson statistics; it needs triplets, which needs a resolution good enough for atomicity; it needs an origin fixed by hand, because a phase set does not fix its own origin and a search that does not fix one is searching a continuum of equivalent answers; and it needs a figure of merit to rank many starts, because most of them fail.

Charge flipping needs the amplitudes and a threshold. It fixes no origin — it wanders to one and stays there, which is why every comparison here is minimised over origin and handedness. It ranks nothing, because it does not need many starts. It is told no symmetry, which is why it can be run on a structure whose space group is not yet known, and that is its practical advantage over everything before it: a structure determination usually begins by guessing the space group from the systematic absences, and a wrong guess is a wrong answer arrived at with confidence.

the answer is a fixed point at 12.51°, and no start reaches it. The tangent formula rebuilds each phase from the others. Hand it the true phases and it hands them back, moved by 12.51 degrees on average and 11.67 in the median over 62 reflections — so the answer is very nearly a fixed point of the formula and the formula is right. Start it anywhere else and it does not arrive: the best of 24 random starts settles 47.77 degrees from the truth, against ninety for phases chosen at random, and every start converges to the same place. Having the answer as a fixed point and finding it are different problems, and the second is the one the subject spent twenty years on.
Fig. 5 The predecessor, for contrast: the tangent formula iterated from the true phases and from random starts. It has the answer as a fixed point and cannot find it from anywhere else. The alternation between two spaces is what replaced it — imposing what is simple about the map where it is simple, and what is simple about the amplitudes where they are.

Why alternating between two spaces works at all

The two constraints in this problem live in different places, and neither is expressible where the other is.

In the map, the useful facts are local: density is positive, structures are made of atoms, most of the cell is empty. Saying any of that about a transform takes an infinite number of coupled conditions.

In the transform, the useful fact is that the amplitudes are known and the phases are not. Saying that about a map is equally hopeless.

So an algorithm that alternates can impose each constraint where it costs nothing, and this is the shape of every modern solver. Charge flipping is the minimal member of the family — its real-space step is the crudest imaginable — which is what makes it a good object to compute with, and its success is evidence that the real content of the method is the alternation rather than the sophistication of either half.

The map, from intensities alone. The Patterson function of the same structure, synthesised from |F|² over 841 reflections with every phase set to zero. No phase information is used anywhere in the calculation, which is the whole point: this is the map an experiment can always compute. Its 13 strongest peaks are marked, and 13 of them sit on an interatomic vector of the structure — the comparison is against a list built by subtracting positions, which shares nothing with the Fourier sum. The tall peak at the origin is the n atoms paired with themselves.
Fig. 6 The alternative that gives up on phases entirely: the transform of the intensities, whose peaks are the vectors between atoms rather than the atoms. It is exact, it needs no iteration and no threshold, and what it produces is a map with as many peaks as there are ordered pairs — which is why the methods on this ladder exist.

What the iteration is actually doing

The loop has a fixed point that is not the answer, and understanding why it is escaped is most of the intuition available about the method.

Set the phases to the true ones and the map is the structure: positive peaks on an empty background, with nothing at all below the threshold except the small ripples that a truncated sum leaves — the ones a resolution-limited map always carries. Flipping inverts those ripples and leaves the peaks, which changes the transform slightly, and the phases that come back are almost the ones that went in. The true solution is very nearly stationary, which is what makes it a place the iteration can rest.

Start instead from random phases and the map is noise of both signs, half of it below the threshold. Flipping inverts that half, and the flipped map is not noise: it is noise with a bias towards positive values, because the operation cannot produce anything below −δ. That bias is a weak push towards a positive density, and it is the entire driving force. Each cycle adds a little of it, and after some tens of cycles the peaks that survive are the ones consistent with all the amplitudes at once.

The R-factor curve above records that as a fall and then a plateau, and the plateau’s height is worth a word. It settles at about a third rather than at zero, because the map is on a coarse grid and the data are truncated, so the density the iteration can represent is not the density that produced the amplitudes. A structure is nevertheless recovered to within a grid step. The plateau’s level says nothing about whether the structure is right — only the fall does, and only comparison with the true atoms settles the rest.

What is being imposed, and where

It is worth setting out the two constraints as a pair, because the algorithm is nothing but their alternation and the asymmetry between them is the whole reason it works.

The amplitude constraint is exact, hard, and lives in reciprocal space. Each measured |F| is a number the answer must reproduce, and imposing it is one division per reflection. It is also incomplete: infinitely many maps have the right amplitudes, and the set of them is enormous.

The density constraint is approximate, soft, and lives in real space. “Density is positive” is true; “everything below δ is wrong and should be negated” is not a theorem about anything — it is a nudge in the direction of positivity that happens to be cheap to apply and happens to have a fixed point near the answer.

An algorithm that alternates between a hard constraint in one space and a soft one in the other is a projection method, and this collection has met the structure before without naming it: solving from the vector set alternates between the Patterson map and the superposition condition, and the tangent formula alternates between phases and their relations without ever leaving reciprocal space — which is why it has nowhere to put a statement about the map.

The reason the soft constraint may be crude is that it is applied hundreds of times. A single flip moves the map a little way towards positivity; a hundred and fifty of them, each followed by an exact reimposition of the amplitudes, accumulate into a strong condition. That is a general principle of such methods and it is the one thing about charge flipping that transfers: the useful constraint is not the sophisticated one, it is the one that can be applied cheaply enough to be applied often.

A map from amplitudes alone, 0.54 grid steps out. The density after 200 cycles of flipping, with the atoms that produced the data drawn as rings — moved into the origin and the handedness the solution chose, because a phase set does not fix either and comparing without allowing for them measures the arbitrariness of the description. Every peak of the map is an atom and every atom has a peak. Nothing about the arrangement went into the calculation: the input was a list of amplitudes and a random set of phases.
Fig. 7 The same iteration on data from a structure with four-fold symmetry, solved in P1 as always. The map recovers every atom of the orbit, and the symmetry that was in the amplitudes is in the answer without having been used anywhere in the calculation.

Where the exactness stops

Computed here: amplitudes from a small structure with the zero-angle reflection withheld; the iteration itself; the R-factor before imposition, cycle by cycle, with the identity iteration as a control; the agreement between the final map’s peaks and the atoms, minimised over origin and handedness and reported in grid steps; the success rate at eight thresholds from four starts each; and the operations detected in four solved maps at six tolerances, with a symmetry-free control.

Not claimed: that this is how a structure is solved. The data here are exact amplitudes from point atoms with no noise, no absorption, no missing reflections and no disorder, and every one of those is a real obstacle. A hundred and fifty cycles on a twelve-atom cell is a demonstration of a mechanism.

And the threshold remains a threshold. The window measured above is a property of these data at this resolution. It is not a value to carry to another structure, which is why the figure reports a curve rather than a number.

Who found it, and when

Oszlányi and Sütő published charge flipping in 2004 in Acta Crystallographica, in a paper four pages long, and the reception was some disbelief: the method has no free parameters beyond the threshold, uses no chemical knowledge, and outperformed established direct methods on structures that had defeated them. It was extended to powder data, to incommensurate structures — where the extra dimension makes it periodic and the same iteration runs in superspace — and to electron diffraction within a few years.

The precedents are older and come from outside crystallography: Gerchberg and Saxton’s algorithm for electron microscopy in 1972 and Fienup’s for optical phase retrieval in 1982 alternate between two spaces in exactly this way. What was new in 2004 was the flipping step, which is a much weaker constraint than the ones those methods use and turns out to be enough.

Where the ladder goes next

Back, to what this replaced. Three phases that do not move when the origin does is the invariant everything statistical is built on, and the formula that has the answer already is the method that has it as a fixed point and cannot find it.

Sideways, to the map that needs no phases at all: the Patterson, and solving from the vector set, which is the pre-computational answer to the same question.

And to the reason the symmetry recovered above is worth having. The reflections that are not there is how a space group is normally assigned, where the experiment runs out is why the assignment is sometimes ambiguous — and a solver that needs no assignment at all is a way past both.

The structures it made solvable

Knowing no symmetry sounds like a cost the method pays for its simplicity. It is the reason the method was adopted, and the cases that show why are the ones no earlier solver could reach.

An incommensurately modulated structure has no three-dimensional space group, so every method requiring one is inapplicable to it as written. Its description lives in four dimensions or more, where the unknown is not a set of atomic positions but the shape of an atomic surface — a continuous object, with far more parameters than a list of coordinates.

Charge flipping does not care. The loop is a Fourier transform, a threshold and a sign change, and every one of those runs in any number of dimensions on any lattice. Run it in superspace with the measured main reflections and satellites, and what comes back is a density in four dimensions whose atomic surfaces are read off directly rather than modelled.

That was the method’s first striking success and it is what established it. The same applies to quasicrystals, whose six-dimensional descriptions are worse in the same way, and to structures whose space group is in doubt — since a solver that assumes none cannot be misled by a wrong one.

The general shape is worth extracting. Every method that uses symmetry buys a smaller problem and pays by needing to be told which symmetry. A method that uses none has a larger problem and no such dependency, and where the symmetry is unknown, absent, or in more dimensions than three, the second trade is the better one.

What this makes readable

Essays that name this one as a prerequisite.

Named alongside this one

Essays reaching for the same objects. Nobody chose these; they are what the concept index makes visible.

What links here

Every essay whose body links to this one.

The objects this essay names

Each one links to every other essay that touches it.

Charge flippingDirect methodsElectron densityFigure of meritOrigin fixingPhase problemStructure factor