research papers
Liking likelihood
^{a}University of Cambridge, Department of Haematology, Cambridge Institute for Medical Research, Wellcome Trust/MRC Building, Hills Road, Cambridge CB2 2XY, England
^{*}Correspondence email: ajm201@cam.ac.uk
methods have now been applied to most areas of macromolecular crystallography, including data reduction, experimental phasing and However, students of macromolecular crystallography are predominantly taught only traditional crystallographic methods and therefore have little understanding of the methods underlying the modern software that they routinely use in This situation arises, at least in part, because is considered to be too difficult to be taught to students who lack substantial mathematical training within the limited time frame of undergraduate/graduate courses. A method of introducing concepts with the help of dice is described here and it is then shown how these concepts can form the core of understanding and experimental phasing. Within the framework described, the crystallographic techniques are all reduced to the same basic concepts and become easier and less timeconsuming to teach than traditional methods, which rely on disparate concepts.
Keywords: maximum likelihood.
1. Introduction
i.e. set of parameters, which includes estimates of the errors) on the evidence of the data is the one that explains what has in fact been observed with the highest probability. In the context of macromolecular crystallography, has come to refer to the set of new statistical methods that improved upon the leastsquares methods that preceded them. The leastsquares methods were not contrary to the principle of since least squares is a special case of where the errors in the parameters are simple Gaussians, rather than more complex functions. The slow acceptance of was therefore not because itself was considered inappropriate, but because least squares works acceptably when the data and model are good and because computers were not capable of performing the more complex calculations required for more sophisticated treatments in reasonable times. is not the only method for obtaining a set of parameters from experimental data. Indeed, in other fields of application may not be the best method, as estimators can be severely biased. However, gives little bias when applied in crystallography and it has been extremely successful in supplying better probability models, particularly when the data and/or model are poor, and has been instrumental in the solution of numerous macromolecular structures.
is a branch of statistical inference that asserts that the best hypothesis (Dice have a long history in the explanation of problems in likelihood, maximum e.g. Jaynes, 1968, 1979; Frieden, 1985; MohammedDjafari, 2003). In this tradition, I present here basic concepts using thought experiments with dice. These concepts are then used to explain and experimental phasing.
and Bayesian theory (2. Experiments with dice
There are six important concepts that are needed in order to understand the statistical approach of ).
in crystallography: independence, loglikelihood, Bayes' theorem, integrating out nuisance variables and the central limit theorem. These concepts will be explored with the help of dice with different numbers of sides (Fig. 12.1. Dice and probability
A game of dice.

It is obvious that there is a one in four chance of getting the correct answer. If the experiment is performed a large number of times you will guess the answer a quarter of the time, or if a large number of people guess each time a quarter will guess correctly.
2.2. Dice and maximum likelihood
A game of dice with data.

If I were to roll a 10, it is obvious that the die selected must have been the tensided die. Why is it obvious? Because the probability of rolling a 10 from the four, six or eightsided die is zero, but the probability of rolling a 10 from the tensided die is nonzero. The probability is written as
where the semicolon means `given' (for a glossary of terms see Table 1) and I have denoted the type of die by its number of sides in bold. The probability of the observed data (the number rolled) given the model (the number of sides of the die) is called the likelihood.

What would be the case if I rolled a 7? If the same analysis is performed again, the likelihood of rolling a 7 from the four or sixsided die is 0, but the likelihood of rolling a 7 from the eightsided die is one in eight and the likelihood of rolling a 7 from the tensided die is one in ten. Therefore, it is most likely that the eightsided die would have been selected. What if I roll a 1? It is most likely that the foursided die would have been selected. The most likely die is the one with the highest likelihood of generating the data: this is the principle of maximum likelihood.
How confident are you that the die is an eightsided die if the roll was a 7? Not very, because the difference between the likelihood of rolling a 7 from the eightsided and tensided die is only small. The ratio between two likelihoods is a measure of confidence (known as the likelihood ratio). For example, when I roll a 10, the likelihood ratio agrees that you are supremely confident that I selected a tensided die, rather than, say, the eightsided die,
In the case where I roll a 7, the likelihoodratio is close to 1 (the ratio for equal likelihoods),
2.3. Dice, independence and loglikelihood
A game of dice with more data.

If I roll a 7 three times, you would expect that I selected an eightsided die, as the answer should be consistent with the game above when only one roll (of a 7) was made. How is the formal analysis performed? The chance of rolling a 7 three times from the four or sixsided die is 0, but what is the chance of throwing a 7 three times from an eightsided or tensided die? The chance of throwing a 7, or any other number, the second or third time is not influenced by the value of the first roll. This is the principle of independence. When probabilities are independent, they multiply. If the calculations are performed, the eightsided die is indeed more likely,
After obtaining data from three rolls, your confidence that you have guessed the correct die has increased compared with when you only knew the result of one roll, so the likelihood ratio increases,
What is the probability of rolling a 7 from an eightsided die one hundred thousand times? (Of course, if you really were to roll 7 one hundred thousand times, you might have some difficulty believing that the die is unbiased. Please continue to assume that it is.) Although the formula for the probability can be written down,
and you could work out the answer and write it down on a (very long) piece of paper,
the number is too small (has too many decimal places) to be stored by a computer. The solution to this computational problem is to calculate loglikelihood rather than the likelihood,
Calculation of the loglikelihood solves the smallnumber computation problem, but is the switch from using the likelihood allowed? Fortunately it is, because logarithmic functions are monotonic functions [i.e. if a < b then log(a) < log(b)]. This means that the parameter values obtained by optimizing loglikelihood are the same as the parameter values obtained by optimizing the likelihood. In fact, computer algorithms are designed to minimize, so parameters are optimized by minimizing the −loglikelihood. There are also other more theoretical justifications for using the loglikelihood, which come from the statistical field of information theory.
Is there a paradox in that the computer needs to store the likelihood before taking its logarithm? Fortunately not, because there is a shortcut to the loglikelihood when the total likelihood is a product of likelihoods, (i.e. when the likelihoods are independent),
In the case where I rolled 7 three times from an eightsided die, there are thus two ways of calculating the loglikelihood. Using the product method,
Using the sum method,
However, the product method required the intermediate of calculating a number close to zero (0.001953), while the sum method did not require any numbers close to zero (the smallest numbers were the independent probabilities themselves, 0.125).
When the loglikelihood is used instead of the likelihood, the loglikelihood gain is calculated instead of the likelihood ratio. The loglikelihood gain is the difference between loglikelihoods [since log(a/b) = log(a) − log(b)]. Whereas for the likelihood ratio more favourable likelihoods are indicated by values greater than 1, for the loglikelihood gain they are indicated by any positive value. The loglikelihood gain for the die being the eightsided rather than the tensided after rolling 7 three times is
What would happen if the result of previous rolls influenced the result of the subsequent rolls? In this case the data points are not independent, but correlated. Note that correlation is not the same as bias. A biased die would be one that, for example, always rolled a 7, but a correlated die would be one that, for example, always rolled one number higher than the previous roll. Highly correlated data points make the determination of the likelihood difficult, if not impossible, and so the assumption of independence is often applied even when it is not justified. In crystallography, reflections are assumed to be independent, even though to a certain extent they are not. Correlations are introduced by the presence of solvent, which means that the molecular transform is oversampled, and by
(if present). However, the correlations are sufficiently weak that the approximation of assuming independence is very good. To calculate the total loglikelihood for all the reflections in a data set (of the order of one hundred thousand), the sum of the loglikelihoods for each reflection is used.2.4. Dice and Bayes' theorem
A game of dice with multiple copies of a die.

I roll a 4. In this case the probability of selecting the tensided die in the first place overwhelms the slightly higher chance of rolling the 4 from the eightsided die. The chance of selecting the tensided die in the first place is included in the probability calculation with Bayes' theorem,
In experimental situations P(data) is constant and when comparing probabilities can be ignored, so Bayes' theorem becomes
Bayes' theorem is also called the rule of inverse probability since it shows how to turn P(data; model) (e.g. the probability of rolling the 4 from the tensided die, which we can calculate) into P(model; data) (e.g. the probability of the tensided die given a roll of 4, which is what we want to know). P(model) is the probability of the model without having any data (e.g. the chance of selecting the tensided die in the first place). P(model; data) is called the posterior probability, P(data; model) is called the likelihood (as before) and P(model) is called the prior probability. If Bayes' theorem is used to calculate the probability rather that just the likelihood, then the method of optimizing the probability should properly be called the maximumposterior method, rather than the method, but the term `maximum likelihood' is generally used for both. True can be thought of as a special case of maximum posterior when the prior probability P(model) is constant for all the models. This was the case for the examples in §§2.2 and 2.3 above.
Using Bayes' theorem, the probability that the die was tensided given a roll of 4,
is higher than the probability that the die was eightsided given a roll of 4,
so a tensided die is more likely, as expected.
Bayes' theorem is very useful in crystallography because it enables exploitation of the things that are known about protein structure even before the Xray data are collected. For example, a carbon–oxygen double bond is known to be 1.23 Å long. So, if the electron density for a structure showed no density 1.23 Å from a particular peptide carbon, but a large piece of density 2 Å away from it, prior knowledge of the carbon–oxygen doublebond length means that it would be extremely unlikely that the density 2 Å away was due to an O atom bound to the carbonyl O atom. It would be more likely that the density 2 Å away from the carbon was due to noise or some other feature of the structure. However, if the O atom had been moved into this density during rebuilding (and the carbon–oxygen bond stretched), a etc. is introduced (Terwilliger, 2000; McCoy, 2002).
program would use Bayes' theorem to restrain the bond length to 1.23 Å and produce the more likely structure. Bayes' theorem is also used in density modification, where information about solvent content,2.5. Dice and integrating out nuisance variables
A game of dice with unknown dice.

I roll a 3. The problem here is to calculate the likelihoods P(3; blue box) and P(3; red box) and find the maximum without knowing which die actually produced the roll of 3. Consider P(3; blue box). The blue box could have contained either the foursided or the tensided die. To calculate P(3; blue box), the likelihood of the 3 being rolled from the two possibilities for the contents of the blue box (the foursided and the tensided die) are added,
The basic probability identity P(A, B) = P(B; A) × P(A) [which can also have any number of conditions added, so P(A, B; C) = P(B; A, C) × P(A; C), for example] can be used to write
Substituting in values for these probabilities,
Likewise, P(3; red box) is the likelihood of the 3 being rolled and the die being sixsided plus the likelihood of the 3 being rolled and the die being eightsided,
So, it is slightly more likely that the die came from the blue box if I roll a 3.
The likelihood for the red and blue boxes has been calculated even though which die actually produced the roll of 3 was not known. Summing the probabilities for all the possibilities for the die solves the problem of not knowing which die actually produced the roll. In general, if the unknown variable (call it x) of the model can take n values between a and b, then
where a < x_{i} ≤ b.
The probability distribution for the dice is for discrete variables, because it is only defined for certain values (the dice must have an integer number of sides). In crystallography, the probability distributions are for continuous variables, meaning that they are defined for all values (an infinite number) over an interval (for example, an atom can be anywhere and an occupancy can be anywhere between 0 and 1). When the probability distribution is continuous, the sum in the equation for the discrete probability distribution becomes an integral, because an integral can be thought of as a sum of an infinite number of infinitesimally small numbers. If the unknown variable x can take values between a and b, then
The unknown variable x is called a nuisance variable. The removal of a nuisance variable from a probability distribution by integration is called integrate out (or marginalization of) the nuisance variable. Although termed `nuisance', these variables can be very useful in probability distributions. It may be easier to describe a probability function using an extra variable (such as the phase of the observed structure factor) and then to integrating it out at the end of the analysis than to attempt to develop a probability function without ever referring to the extra variable.
2.6. Dice and the central limit theorem
A game of dice taking the average of many rolls of the dice.

The histogram is Gaussian (bellshaped curve, see Fig. 2), with a maximum at 3.5 (see Fig. 3). Now I play the game again with a biased sixsided die: the die is biased so that it will roll its values with a probability linearly proportional to the value, i.e. a 2 is twice as likely as a 1, a 3 is three times as likely as a 1 etc. Again, the histogram looks like a Gaussian. The only difference is that the mean of the distribution is shifted to about 4.3 and the variance of the distribution is smaller (see Fig. 2 for an explanation of the mean and variance of a Gaussian). Now I play the game again with a sixsided die that is biased so that it will roll its values with a probability proportional to the square of the value i.e. a 2 is four times more likely than a 1, a 3 is nine times more likely than a 1 etc. Again, the histogram looks like a Gaussian (with an even higher mean and smaller variance). For most types of bias of the die, the histogram generated by the game of dice is Gaussian, even when the bias of the die (from which the average is computed) is decidedly nonGaussian. This property is called the central limit theorem. The central limit theorem is possibly the most important theorem in probability. In crystallography, the central limit theorem allows us to describe the errors in the structure factors (in reciprocal space) that arise from errors in the atomic model (in real space). It says that even though the errors in an individual atom's contribution to the total may be very complicated, in the end the error for the total (the sum of the atomic structurefactor contributions) is a simple twodimensional Gaussian in reciprocal space.
2.7. Dice summary
the best model is the one that maximizes the probability of observing the experimental data.
Independence: probabilities multiply when the experimental data points are independent, i.e. all observations are independent of one another.
Loglikelihood: the loglikelihood is used instead of the likelihood as it has its maximum at the same parameter values as the likelihood but it is safer to calculate on a computer because the numerical range is smaller.
Bayes' theorem: P(model; data) = P(model) × P(data; model), where P(data; model) is called the likelihood and P(model) is called the prior probability.
Integrating out variables: nuisance variables in a joint probability distribution can be eliminated by integration.
Central limit theorem: the distribution of the average tends to be Gaussian, even when the distribution from which the average is computed is decidedly nonGaussian.
3. in macromolecular crystallography
There are many ways of applying ab initio (cf. Bricogne, 1993). Instead, simplifications and approximations are made to allow to be applied to specific areas of crystallography such as and experimental phasing.
to crystallography. Ideally, all the information from chemistry and the diffraction experiment should be included to create the `mother of all likelihood functions'. Although the chemical and diffraction information that should contribute to this likelihood function is known, there are too many correlations between the contributions to allow a practical precise formula to be written down. This is rather unfortunate, because there is enough information in the chemistry and the diffraction experiment to solve the4. Refinement
The Bayesian view of crystallographic ; Bricogne & Irwin, 1996; Murshudov et al., 1997). The probability function for (here called Prefinement) is thus, by Bayes' theorem (see §2.4), the product of the prior probability (here called Pchemistry) and the likelihood (here called PXray),
is that the prior probability comes from chemistry (a great deal is known about what molecules look like even before the experiment) and the likelihood comes from the Xray diffraction experiment (Pannu & Read, 1996The chemical probabilities for all the different chemical interactions in the structure are taken to be independent (see §2.3), so that Pchemistry is the product of these individual chemical interaction probabilities Pchemistry_{i}. This is not a very good approximation, as the bond lengths and angles are correlated with each other; the problems that this approximation causes are discussed in §4.4. If the number of interactions is I,
It is also assumed that reflections are independent, so that PXray is the product of the reflection likelihoods (PXray_{r}). This is a good approximation (see §2.3). If the number of reflections is R,
Since there are hundreds of thousands of interactions and hundreds of thousands of reflections, the loglikelihood is calculated rather than the likelihood (see §2.3). To optimize the model parameters (atomic positions, occupancies and B factors), the −loglikelihood is minimized,
4.1. Prior probability
Macromolecules obey the same chemical rules as small organic molecules and so ideal bond lengths and angles for macromolecules can be derived from the results of smallmolecule crystallography (Engh & Huber, 1991). The bond lengths and angles in the crystal are restrained to these ideal values using a probability distribution. For example, the prior probability for having a bond of length b is given by a Gaussian about the ideal length b_{ideal} for the bond type (see Fig. 2 for the equation for a Gaussian),
Here, σ_{b} reflects the distribution of a particular bond type about its mean; e.g. a C—C bond has an ideal length of 1.54 Å and a σ_{b} of about 0.02 Å. There are similar equations for the other types of chemical interaction restraints.
4.2. likelihood
The likelihood for a reflection (PXray_{r}) is the probability of the data (i.e. the observed structurefactor amplitude F_{o}) given the current model. The model is in real space and the Xray observed data are in so in order to calculate the likelihood, the model (in real space) must be used to calculate structure factors (in reciprocal space). The for the whole (F_{c}) is calculated as follows: first the for the model in the (F_{m}) is calculated from the sum of the structure factors of the atoms in that model (F_{atom}). Then, F_{m} and all its symmetry relatives are added to obtain the total F_{c} (see Fig. 4; the importance of the symmetry relatives will become apparent in the explanation of the rotationfunction likelihood below). However, the data for a given reflection is the observed structurefactor amplitude F_{o}, so in order to compare like with like the model must be the calculated structurefactor amplitude F_{c},
Without considering errors, if F_{c} matches F_{o} the probability is 1 and if it does not match the probability is 0 (the model is either `correct' or `incorrect'). However, if errors in the model and the data are considered, then F_{c} and F_{o} are allowed to differ somewhat and the likelihood function should give a nonzero probability when F_{c} and F_{o} are close (the closer the better). It is easier to model the errors in terms of the phased structure factors F_{c} and F_{o} with the phase between them defined as α, rather than in terms of the structurefactor amplitudes alone. The introduced variable, the phase α, is a nuisance variable (a case where a nuisance variable is very useful) and must be integrated out of the probability distribution at the end of the analysis (see §2.5). The integration limits are 0–2π, i.e. all angles,
The errors in the model arise from Gaussian errors in the atomic positions and atomic scattering. Gaussian errors in the atomic positions and scattering give rise to Gaussian errors in the phases and amplitudes of the corresponding atomic structurefactor contributions, respectively (see Fig. 5). When these atomic structurefactor contributions and their errors are summed to give the total and its error for a given reflection, by the central limit theorem (see §2.6) the resulting distribution is a twodimensional Gaussian (see Fig. 2) in centred on DF_{c} (where D is between 0 and 1) with variance termed (see Fig. 6),
Using this probability and the integral above, it can be shown (Appendix A) that the likelihood function is a Rice distribution (Sim, 1959; Read, 1990),
where I_{0} is the modified Bessel function of order 0. The Rice distribution is the key distribution for in crystallography and it will appear over and over again in the equations below. It applies to acentric reflections (those for which the phase is not restricted) and, for simplicity, the discussions below will only concern acentric structure factors (and assume the expected intensity factor, generally denoted ∊, to be 1). For a full explanation of the derivation of the Rice function, see Appendix A. Centric structure factors (those where the phase is restricted to 0 or 180°) are treated similarly to give a different likelihood function (see Appendix B).
There are also experimental errors (σ_{F}) in the measurements. Experimental error is accounted for by widening the probability distribution, a method that is termed inflating the variance (Green, 1979; Murshudov et al., 1997; de La Fortelle & Bricogne, 1997). The likelihood function used for is therefore given by
4.3. Sigma A
D and σ_{Δ} are anticorrelated: if the model is very bad and therefore if is large then D will be small and vice versa. If E values (normalized structure factors) are used rather than F values, D and σ_{Δ} can be replaced with a single parameter σ_{A} (Srinivasan & Ramachandran, 1965), with DF_{c} = σ_{A}E_{c} and = 1 − ,
where σ_{E} is the normalized structurefactor experimental error. The probability distributions are very sensitive to the estimates of σ_{A}, and σ_{A} is refined along with the atomic parameters in structure Unfortunately, if the same data are used to refine σ_{A} and the atomic parameters, the data are severely overfitted and σ_{A} is overestimated. This problem is partially avoided by estimating σ_{A} from the data that are used to compute R_{free} (which are excluded from the refinement).
4.4. Weighting
In principle, if all errors are estimated properly there is no need to apply a weighting between the prior probability (Pchemistry) and likelihood (PXray) to calculate Prefinement using Bayes' theorem, but in practice it is necessary to overweight the likelihood (PXray) for to converge. This is partly because the probabilities used are only approximate (particularly for the chemistry terms, where the correlations between bond lengths and angles are not taken into account) and partly because the algorithm does not account for the fact that improvements in the model will sharpen the experimental likelihood function (because the model and the σ_{A} values are refined against different subsets of the data). As the resolution becomes higher and the model becomes better, the amount of overweighting required is reduced.
4.5. Experimental phases
Experimental phasing information can be incorporated into the et al., 1998). The prior probability can be modelled using Hendrickson–Lattman coefficients (Hendrickson & Lattman, 1970).
likelihood function as a prior probability when integrating out the phase (Pannu4.6. Probabilities and energies
Some P of observing a state in the physical system with energy E,
programs minimize energy rather than the −loglikelihood. In fact, the two targets of are equivalent. If the experiment is considered as a physical system with energy, Boltzmann's law gives the probabilitywhere k is Boltzmann's constant and T is the temperature. Taking the logarithm of Boltzman's law, the energy is proportional to the logarithm of the probability,
Boltzman's law in logarithm form leads to harmonic bond restraints,
Boltzman's law in this logarithm form also allows Bayes' theorem (in terms of probabilities) to be expressed in terms of energies
5. Molecular replacement
; Read, 2001, 2003b) can be divided into a rotation function (RF) followed by a translation function (TF) in the same way that traditional molecularreplacement methods are. Each type of search is a `bruteforce' search procedure. The likelihood for the models is generated on a grid of angles (RF) or positions (TF) and the angle (RF) or position (TF) of the model that has the highest likelihood is selected as the `solution' to the molecularreplacement problem. Currently, prior information (such as packing constraints and noncrystallographic symmetry) is not included in and so Bayes' theorem (see §2.4) is not used. Reflections are assumed to be independent, so that the likelihood for the rotation function (here called PRF) and the likelihood for the translation function (here called PTF) is the product of the reflection likelihoods (see §2.3). If the number of reflections is R,
(Bricogne, 1992and
In practice, the −loglikelihood is used as the target for the molecularreplacement searches,
and
5.1. Translationfunction likelihood
The data are the observed structurefactor amplitudes (F_{o}) and the model is the molecularreplacement structure oriented and positioned at the search point. This is exactly the same situation as for the approximate locations of all the atoms are known and a structurefactor amplitude F_{c} can be calculated from the scattering in the The translation function target is therefore the same Rice function as the target for structure The only difference is that the errors will be much larger for the translation function than for (D will be smaller and σ_{Δ} larger). The same function is also suitable for a bruteforce sixdimensional (orientation and position) search,
5.2. Rotationfunction likelihood
At each rotationfunction search orientation, the model consists of the molecularreplacement model with defined orientation but undefined position. Undefined positions in real space correspond to undefined phases of the structurefactor contributions in F_{c} cannot be calculated from the sum of the phased structurefactor contributions as it was for the case of and the translation function. However, because the relative positions of the atoms in the model are known, the atomic structurefactor contributions (F_{atom}) for the model can be added up with relative phases to calculate F_{m}, i.e. the amplitude but not the phase of the model structurefactor contribution. This can also be performed for all the symmetry relatives of the model in order to obtain the set of amplitudes of the model structurefactor contributions, {F_{m}}_{sym}. The symmetry relatives have different amplitudes because as the model rotates its strength of scattering in any given direction changes. Since these model structurefactor contributions are unphased, they cannot be added together to obtain the for the scattering from the whole F_{c}. The model in for the rotation function is therefore not F_{c}, but the set of amplitudes of the model structurefactor contributions, {F_{m}}_{sym},
Thus,It is easiest to generate a function for this probability by introducing a (useful) nuisance phase variable, the phase α between the observed F_{o} and one of the F_{m}. It is best to select the symmetry relative of F_{m} with the largest amplitude, F_{big} (the reason is given shortly). The symmetry operator that gives rise to the largest F_{m} will be different for each reflection, so F_{big} corresponds to a different symmetry operator for each reflection. The set of symmetry relatives of F_{m} is thus split into the set not including F_{big}, {F_{m}}_{sym≠big}, which are left unphased, and F_{big}, which is given the phase α relative to F_{o}. The introduced nuisance phase α must be integrated out of the probability distribution at the end of the analysis (see §2.6),
The probability distribution for {F_{m}}_{sym≠big} comes from a `random walk' (Fig. 7) in Fixing the phase of the largest of the symmetry relatives of F_{m} results in the narrowest probability distribution for the `random walk' and this is why the largest F_{m} was chosen to have the phase α relative to F_{o}. Errors in the model must also be accounted for in the probability distribution, just as they were for Using the same reasoning that applied for developing the target (see Fig. 6), errors in the model mean that all symmetry relatives of F_{m} (including F_{big}) are downweighted by a Dfactor (0 ≤ D ≤ 1). The probability distribution is thus a twodimensional Gaussian centred on DF_{big} with variance Σ_{S} dependent on {DF_{m}}_{sym≠big} (see Fig. 8),
Using this probability and the integral above, it can be shown (Appendix A) that the likelihood function is another Rice distribution,
Experimental errors (σ_{F}) are incorporated by inflating the variance of the distribution, as was the case for the likelihood function,
Notice the similarities between this equation and the equation for PXray_{r} [and PTF_{r}; (1)]. The only differences are that F_{big} replaces F_{c} and Σ_{S} replaces . The latter difference shows an unfortunate inconsistency in the notation for variances that has arisen in crystallography. Sometimes the variance is shown as the square of the standard deviation, with the standard deviation written with a lower case Greek sigma (e.g. ), and sometimes the variance is shown as a single parameter, written with an upper case Greek sigma (e.g. Σ_{S}). The differences in the equations can be traced back to differences in the position of the centre and difference in the width of the twodimensional Gaussian in that gave rise to the Rice distribution.
5.3. Partial structure
e.g. known orientation and position of known orientation of only and any combination thereof. Any information makes the probability distribution more exacting (reduces the variance) and improves the signal of the search.
allows incorporation of any information about the structure already determined,5.4. Fast searches
bruteforce rotation and translation searches are very slow to compute. However, there are approximations to the full search targets that can be calculated with fast Fourier transforms and are therefore much faster. The fast rotation search is calculated with a series of twodimensional fast Fourier transforms, while the fast translation search is calculated with one threedimensional fast Fourier transform. These likelihoodenhanced fast rotation and translation searches can be generated by a Taylor series expansion of the full likelihood targets (Storoni6. Experimental phasing
There are many forms of experimental phasing, including MIR (multiplewavelength isomorphous replacement), MIRAS (multiplewavelength ; Read, 1991, 1994; de La Fortelle & Bricogne, 1997). Prior information is not included in experimental phasing and so Bayes' theorem is not used (see §2.4). Reflections are assumed to be independent, so that the total likelihood is the product of reflection likelihoods (see §2.3). If the number of reflections is R, then for example in the case of MIR the likelihood (here called PMIR) is given by
with anomalous scattering), MAD (multiplewavelength anomalous dispersion) and SAD (singlewavelength anomalous dispersion). They all have different types of data and types of models and so require different types of likelihood functions (Bricogne, 1991In practice, the −loglikelihood is used,
Similarly, the MIRAS, MAD and SAD likelihoods are the products of their respective reflection likelihoods. The heavyatom sites must have been found using a Patterson, directmethods or dualspace method before invoking F_{H} (in reciprocal space).
phasing. The heavyatom sites (in real space) are then used to calculate the model for the heavyatom structure factors6.1. MIR likelihood
In MIR, the data are the observed native and derivative structurefactor amplitudes. Unfortunately, there are significant correlations in the data because all data sets share the scattering from the native protein component, i.e. if a reflection is strong/weak in the native then it is likely to be strong/weak in all the derivative data sets as well. To simplify the analysis a (useful) nuisance variable is introduced, the `true' F_{T}, which is the component of scattering shared by the native and derivatives (Read, 2003a) and can be thought of as the scattering from a `true' crystal. With the introduction of F_{T} in MIR there is nothing `special' about the native data set. The native is treated in exactly the same way as the derivatives: the native is simply a derivative without heavy atoms. In the nomenclature used here, the observed native and derivative structure factors are all denoted F_{o}. Elsewhere, F_{o} is often written as F_{P}, denoting that it contains native protein only, or F_{PH}, denoting that it contains native protein and heavy atoms. The data, the set of all `native' and derivative observed structurefactor amplitudes, is denoted {F_{oj}}, and the model, the set of all calculated heavyatom structure factors, is denoted {F_{Hj}}, with the derivative number denoted by the subscript j. The introduced (useful) nuisance variable F_{T} must be integrated out of the probability distribution at the end of the analysis (see §2.6). Since F_{T} is a vector, integrating out the parameter requires integrating over the whole complex plane (a double integral, with real and imaginary components integrated from +∞ to −∞). The MIR likelihood function for a reflection is therefore given by
The reason for introducing the nuisance variable F_{T} is that by explicitly including the correlated component of the scattering between all the data, the `leftover' parts of the scattering can be considered to be independent. Therefore, the probabilities for each derivative F_{oj} given its F_{Hj} and F_{T} are (approximately) independent and can be multiplied to give the joint conditional probability (see §2.3),
However, this is an expression for the probability of {F_{oj}} given {F_{Hj}} and F_{T}, not for the probability of {F_{oj}} and F_{T} given {F_{Hj}}, which is what is required for integrating out F_{T} (3). The relationship between the two probabilities is given by P(B, A; C) = P(A; C) × P(B; C, A). Taking F_{T} ≡ A, {F_{oj}} ≡ B and {F_{Hj}} ≡ C,
If the `true crystal' lacks atoms at the heavyatom positions of the derivative, then P(F_{T}; {F_{Hj}}) is the same as P(F_{T}), i.e. {F_{Hj}} is irrelevant. P(F_{T}) is then the probability of F_{T} when all that is known is the number and type of atoms in the `true crystal' e.g. the number of C, N, O and S atoms if the `true crystal' contains protein only (Wilson, 1949). The probability distribution given by this information is relatively flat and can be ignored (Read, 1991). [However, if F_{T} does have atoms coincident with the heavyatom positions, it should be included (Read, 2003a).]
Substituting (6) into the integral (3),
P(F_{oj}; F_{Hj},F_{T}) is the probability of the observed structurefactor amplitude F_{oj} given F_{H} and F_{T} for derivative j; to calculate this probability, F_{Hj} and F_{T} must be used to calculate the structurefactor amplitude F_{cj} that can be compared with F_{oj}. The calculated (phased) F_{cj} is the sum of the heavyatom and protein structure factors (phased) for the derivative. If the heavyatom model is perfect (and thus F_{Hj} is perfect) and the protein component of the derivative is identical (isomorphous) to F_{T}, then the calculated F_{cj} is simply given by the sum of F_{Hj} and F_{T}. However, F_{Hj} will not be perfect because the heavy atoms will not have perfect positions and occupancies and some of the sites may be missing from the model and F_{T} will not be perfectly isomorphous with the native component of the derivative. Using the same reasoning that applied for developing the target, F_{T} and F_{Hj} are thus downweighted by D factors (0 ≤ D ≤ 1). Refining the D factor for F_{Hj} has the same effect as refining the occupancies and B factors of the heavy atoms and so can be absorbed by these parameters during Including errors, the calculated F_{cj} is given by
The calculated structurefactor amplitude F_{cj} (in terms of F_{T} and F_{Hj}) can now be compared with the observed structurefactor amplitude F_{oj},
where F_{cj} = D_{j}F_{T} + F_{Hj}.
As was the case for deriving the equation for α between the observed and calculated structure factors while developing the likelihood function and then to integrate out this (useful) nuisance phase at the end of the analysis (Bricogne, 1991; Read, 1991),
likelihood and the rotationfunction likelihood, the trick to deriving a MIR function is to introduce the phase differenceThe probability of F_{oj} is a twodimensional Gaussian in reciprocal space centred on F_{cj} with variance (Fig. 9),
Using this probability and the integral above, it can be shown (Appendix A) that the likelihood function is yet another Rice distribution,
Experimental errors are incorporated by inflating the variance of the distribution
This is the likelihood function for a single reflection and a single derivative. Notice the similarities between this equation and the equations for PXray_{r} [and PTF_{r}; (1)] and PRF_{r} (2). The likelihood function is virtually identical to that for PXray_{r} except that F_{c} is not calculated directly from the model but from the sum of DF_{T} and F_{H}. To combine all the derivatives, the product over all the derivatives is taken before integrating out the nuisance parameter F_{T}. Substituting (8) into (7),
where F_{cj} = D_{j}F_{T} + F_{Hj}.
Unfortunately, the integrating out of F_{T} cannot be performed analytically; it must be performed numerically (values calculated and summed). Double numerical integrations are generally slow to compute and so they have to be performed cleverly.
The MIR likelihood function assumes that errors in the models of heavy atoms are uncorrelated to one another. It also assumes that the nonisomorphism differences between the derivatives are uncorrelated to one another. This is not always the case, particularly when the heavyatom compounds are chemically related.
6.2. MIRAS likelihood
The likelihood function for MIRAS is the probability of all the F_{o}^{+} and F_{o}^{} given all the calculated heavyatom structure factors and (rather than just the mean F_{o} and mean F_{H} as for MIR). However, this probability function is difficult to generate by because F_{o}^{+} and F_{o}^{} are highly correlated (if F_{o}^{+} is large/small then F_{o}^{} will also be large/small). This problem is partially avoided if the mean F_{o} and anomalous difference ΔF are used instead of F_{o}^{+} and F_{o}^{}, as these are less correlated with one another (if the mean F is large, the anomalous difference ΔF need not be large; North, 1965; Matthews, 1966; de La Fortelle & Bricogne, 1997). The probabilities for the normal and components are then considered to be independent. The probability of the normal scattering component is the same as that derived for MIR. The probability for the anomalous difference is approximated by a leastsquares term (rather than being given by a true likelihood term).
6.3. MAD likelihood
Currently, ), where the derivatives correspond to the wavelengths. This is unsatisfactory because the assumption that the errors in the models of heavy atoms between derivatives (i.e. wavelengths) are uncorrelated with one another is necessarily violated in MAD. To be treated properly, the likelihood function would have to be computed by performing an integration for each unknown phase. For example, in twowavelength MAD, four integrations would be required, one each for , , and . Only one such integral can be performed analytically (to give a Rice distribution) and all the others must be performed numerically. Numerical instability and limitations in computing power currently preclude this approach, although Bricogne (2000) has proposed an alternative solution to the problem of performing multiple integrations.
is treated as a case of MIRAS (de La Fortelle & Bricogne, 19976.4. SAD likelihood
In the special case of SAD, there is a likelihood function that explicitly accounts for the correlations between F_{o}^{+} and F_{o}^{} (Pannu & Read, 2004). The function includes the familiar Rice distribution, which primarily accounts for the anomalous difference, but also another term that accounts for the heavy atoms being part of the model of the normal scatterers (McCoy et al., 2004). Only a single numerical (phase) integration is required. The SAD likelihood for a reflection (PSAD_{r}) is given by
where F_{c}^{+} =  + D_{Φ}( − ) and
7. Discussion
The Rice distribution is ubiquitous where
is applied in crystallography because it is the result of integrating out the phase of a twodimensional Gaussian: the phase must be integrated out because only structurefactor amplitudes are measured and twodimensional Gaussians are ubiquitous because of the central limit theorem or `random walks' of structurefactor components. In fact, the twodimensional Gaussians arising from `random walks' are also fundamentally a result of the central limit theorem. Understanding how and why the Rice distribution arises are concepts that link to all aspects of macromolecular crystallography.I hope that this material will give students the confidence to look deeper into the https://wwwstructmed.cimr.cam.ac.uk (by Randy J. Read, Airlie J. McCoy, Andrew G. W. Leslie and Philip R. Evans) are recommended as an appropriate second step.
literature and discover some of the subtleties lost in the simple explanations. For those who are inspired to know more, the crystallography course notes atAPPENDIX A
Probability distribution for acentric reflections
The probability distribution for F_{o} given F_{c} is a twodimensional Gaussian with variance centred on F_{c} (Fig. 10),
The cosine rule with the phase α between F_{o} and F_{c} gives
The likelihood function is given by integrating out the phase α from the probability P(F_{o}, α; F_{c}) (Fig. 10a),
The relationship between P(F_{o}, α; F_{c}) and P(F_{o}; F_{c}) is given by
where the factor F_{o} is introduced by changing the descriptions of the Fs from Cartesian coordinates (i.e. expressed in terms of real and imaginary components) to polar coordinates (i.e. expressed in terms of radial and angular components; this factor is called the Jacobian). Therefore,
This integral has an analytical solution of the form
where I_{0} is the modified Bessel function of order 0. Therefore,
This is known as the Rice distribution (Fig. 10b). In the special case where F_{c} is zero,
This is known as the Wilson distribution.
APPENDIX B
Probability distribution for centric reflections
The probability distribution for F_{o} given F_{c} is a onedimensional Gaussian with variance centred on F_{c}. F_{o} is either in phase or out of phase with F_{c} (Fig. 11). Summing over the two possibilities for the unknown phase,
Expanding the quadratics and using
gives
This is known as the Woolfson distribution (Woolfson, 1956). In the special case where F_{c} is zero,
Acknowledgements
I thank Randy Read, Garib Murshudov and Laurent Storoni for many useful discussions. I also thank Eleanor Dodson for comments on the manuscript.
References
Bricogne, G. (1991). Proceedings of the CCP4 Study Weekend. Isomorphous Replacement and Anomalous Scattering, edited by P. R. Evans & A. G. W. Leslie, pp. 60–68. Warrington: Daresbury Laboratory. Google Scholar
Bricogne, G. (1992). Proceedings of the CCP4 Study Weekend. Molecular Replacement, edited by W. Wolf, E. J. Dodson & S. Glover, pp. 62–75. Warrington: Daresbury Laboratory. Google Scholar
Bricogne, G. (1993). Acta Cryst. D49, 37–60. CrossRef CAS Web of Science IUCr Journals Google Scholar
Bricogne, G. (2000). Advanced Special Functions and Applications: Proceedings of the Melfi School on Advanced Topics in Mathematics and Physics, edited by D. Cocoliccio, G. Dattoli & H. M. Srivastava, pp. 315–232. Rome: Aracne Editrice. Google Scholar
Bricogne, G. & Irwin, J. (1996). Proceedings of the CCP4 Study Weekend. Macromolecular Refinement, edited by E. Dodson. M. Moore, A. Ralph & S. Bailey, pp. 85–92. Warrington: Daresbury Laboratory. Google Scholar
Engh, R. A. & Huber, R. (1991). Acta Cryst. A47, 392–400. CrossRef CAS Web of Science IUCr Journals Google Scholar
Frieden, B. R. (1985). J. Opt. Soc. Am. 73, 1764–1770. Google Scholar
Green, E. A. (1979). Acta Cryst. A35, 351–359. CrossRef CAS IUCr Journals Web of Science Google Scholar
Hendrickson, W. A. & Lattman, E. E. (1970). Acta Cryst. B26, 136–143. CrossRef CAS IUCr Journals Google Scholar
Jaynes, E. T. (1968). IEEE Trans. Syst. Sci. Cybern. SSC4, 227–241. Google Scholar
Jaynes, E. T. (1979). The Maximum Entropy Formalism, edited by R. D. Levine & M. Tribus, pp 15–118. Cambridge: MIT Press. Google Scholar
La Fortelle, E. de & Bricogne, G. (1997). Methods Enzymol. 276, 472–494. Google Scholar
McCoy, A. J. (2002). Curr. Opin. Struct. Biol. 12, 670–673. Web of Science CrossRef PubMed CAS Google Scholar
McCoy, A. J., Storoni, L. C. & Read, R. J. (2004). Acta Cryst. D60, 1220–1228. Web of Science CrossRef CAS IUCr Journals Google Scholar
Matthews, B. W. (1966). Acta Cryst. 20, 82–86. CrossRef IUCr Journals Web of Science Google Scholar
MohammedDjafari, A. (2003). Am. Inst. Phys. Conf. Proc. 659, 281–306. Google Scholar
Murshudov, G. N., Vagin, A. A. & Dodson, E. J. (1997). Acta Cryst D53, 240–255. CrossRef CAS Web of Science IUCr Journals Google Scholar
North, A. C. T. (1965). Acta Cryst. 18, 212–216. CrossRef IUCr Journals Web of Science Google Scholar
Pannu, N. S., Murshudov, G. N., Dodson, E. J. & Read, R. J. (1998). Acta Cryst. D54, 1285–1294. Web of Science CrossRef CAS IUCr Journals Google Scholar
Pannu, N. S. & Read, R. J. (1996). Acta Cryst. A52, 659–668. CrossRef CAS Web of Science IUCr Journals Google Scholar
Pannu, N. S. & Read, R. J. (2004). Acta Cryst. D60, 22–27. Web of Science CrossRef CAS IUCr Journals Google Scholar
Read, R. J. (1990). Acta Cryst. A46, 900–912. CrossRef CAS Web of Science IUCr Journals Google Scholar
Read, R. J. (1991). Proceedings of the CCP4 Study Weekend. Isomorphous Replacement and Anomalous Scattering, edited by P. R. Evans & A. G. W. Leslie, pp. 69–79. Warrington: Daresbury Laboratory. Google Scholar
Read, R. J. (1994). Lecture Notes from the Workshop on Isomorphous Replacement Methods in Macromolecular Crystallography. Am. Crystallogr. Assoc. Ann. Meet., Atlanta, GA, USA. Google Scholar
Read, R. J. (2001). Acta Cryst. D57, 1373–1382. Web of Science CrossRef CAS IUCr Journals Google Scholar
Read, R. J. (2003a). Acta Cryst. D59, 1891–1902. Web of Science CrossRef CAS IUCr Journals Google Scholar
Read, R. J. (2003b). Crystallogr. Rev. 9, 33–41. CrossRef CAS Google Scholar
Sim, G. A. (1959). Acta Cryst. 12, 813–815. CrossRef IUCr Journals Web of Science Google Scholar
Srinivasan, R. & Ramachandran, G. N. (1965). Acta Cryst. 19, 1003–1007. CrossRef CAS IUCr Journals Web of Science Google Scholar
Storoni, L. C., McCoy, A. J. & Read, R. J. (2004). Acta Cryst. D60, 432–438. Web of Science CrossRef CAS IUCr Journals Google Scholar
Terwilliger, T. C. (2000). Acta Cryst. D56, 965–972. Web of Science CrossRef CAS IUCr Journals Google Scholar
Wilson, A. J. C. (1949). Acta Cryst. 2, 318–321. CrossRef IUCr Journals Web of Science Google Scholar
Woolfson, M. M. (1956). Acta Cryst. 9, 804–810. CrossRef CAS IUCr Journals Web of Science Google Scholar
© International Union of Crystallography. Prior permission is not required to reproduce short quotations, tables and figures from this article, provided the original authors and source are cited. For more information, click here.