International
Tables for Crystallography Volume F Crystallography of biological macromolecules Edited by M. G. Rossmann and E. Arnold © International Union of Crystallography 2006 
International Tables for Crystallography (2006). Vol. F, ch. 25.2, pp. 712713

One of the key innovative features of CNS is the ability to symbolically define target functions and their first derivatives for crystallographic searches and refinement. This allows one conveniently to implement new crystallographic methodologies as they are being developed.
The power of symbolic target functions is illustrated by two examples. In the first example, a target function is defined for simultaneous heavyatom parameter refinement of three derivatives. The sites for each of the three derivatives can be disjoint or identical, depending on the particular situation. For simplicity, the Blow & Crick (1959) approach is used, although maximumlikelihood targets are also possible (see below). The heavyatom sites are refined against the target
, and are complex structure factors corresponding to the three sets of heavyatom sites, represents the structure factors of the native crystal, , and are the structurefactor amplitudes of the derivatives, and , and are the variances of the three lackofclosure expressions. The corresponding target expression and its first derivatives with respect to the calculated structure factors are shown in Fig. 25.2.3.4(a). The derivatives of the target function with respect to each of the three associated structurefactor arrays are specified with the `dtarget' expressions. The `tselection' statement specifies the selected subset of reflections to be used in the target function (e.g. excluding outliers), and the `cvselection' statement specifies a subset of reflections to be used for crossvalidation (Brünger, 1992b) (i.e. the subset is not used during refinement but only as a monitor for the progress of refinement).
The second example is the refinement of a perfectly twinned crystal with overlapping reflections from two independent crystal lattices. Refinement of the model is carried out against the residual The symbolic definition of this target is shown in Fig. 25.2.3.4(b). The twinning operation itself is imposed as a relationship between the two sets of selected atoms (not shown). This example assumes that the two calculated structurefactor arrays (`fcalc1' and `fcalc2') that correspond to the two lattices have been appropriately scaled with respect to the observed structure factors, and the twinning fractions have been incorporated into the scale factors. However, a more sophisticated target function could be defined which incorporates scaling.
A major advantage of the symbolic definition of the target function and its derivatives is that any arbitrary function of structurefactor arrays can be used. This means that the scope of possible targets is not limited to leastsquares targets. Symbolic definition of numerical integration over unknown variables (such as phase angles) is also possible. Thus, even complicated maximumlikelihood target functions (Bricogne, 1984; Otwinowski, 1991; Pannu & Read, 1996a; Pannu et al., 1998) can be defined using the CNS language. This is particularly valuable at the prototype stage. For greater efficiency, the standard maximumlikelihood targets are provided through CNS source code which can be accessed as functions in the CNS language. For example, the maximumlikelihood target function MLF (Pannu & Read, 1996a) and its derivative with respect to the calculated structure factors are defined as where `mlf( )' and `dmlf( )' refer to internal maximumlikelihood functions, `fobs' and `sigma' are the observed structurefactor amplitudes and corresponding σ values, `fcalc' is the (complex) calculated structurefactor array, `fbulk' is the structurefactor array for a bulk solvent model, and `d' and are the crossvalidated D and functions (Read, 1990; Kleywegt & Brünger, 1996; Read, 1997) which are precomputed prior to invoking the MLF target function using the test set of reflections. The availability of internal Fortran subroutines for the most computingintensive target functions and the symbolic definitions involving structurefactor arrays allow for maximal flexibility and efficiency. Other examples of available maximumlikelihood target functions include MLI (intensitybased maximumlikelihood refinement), MLHL [crystallographic model refinement with prior phase information (Pannu et al., 1998)], and maximumlikelihood heavyatom parameter refinement for multiple isomorphous replacement (Otwinowski, 1991) and MAD phasing (Hendrickson, 1991; Burling et al., 1996). Work is in progress to define target functions that include correlations between different heavyatom derivatives (Read, 1994).
References
Blow, D. M. & Crick, F. H. C. (1959). The treatment of errors in the isomorphous replacement method. Acta Cryst. 12, 794–802.Google ScholarBricogne, G. (1984). Maximum entropy and the foundations of direct methods. Acta Cryst. A40, 410–445.Google Scholar
Brünger, A. T. (1992b). Free R value: a novel statistical quantity for assessing the accuracy of crystal structures. Nature (London), 355, 472–475.Google Scholar
Burling, F. T., Weis, W. I., Flaherty, K. M. & Brünger, A. T. (1996). Direct observation of protein solvation and discrete disorder with experimental crystallographic phases. Science, 271, 72–77.Google Scholar
Hendrickson, W. A. (1991). Determination of macromolecular structures from anomalous diffraction of synchrotron radiation. Science, 254, 51–58.Google Scholar
Kleywegt, G. J. & Brünger, A. T. (1996). Checking your imagination: applications of the free R value. Structure, 4, 897–904.Google Scholar
Otwinowski, Z. (1991). In Proceedings of the CCP4 study weekend. Isomorphous replacement and anomalous scattering, edited by W. Wolf, P. R. Evans & A. G. W. Leslie, pp. 80–86. Warrington: Daresbury Laboratory.Google Scholar
Pannu, N. S., Murshudov, G. N., Dodson, E. J. & Read, R. J. (1998). Incorporation of prior phase information strengthens maximumlikelihood structure refinement. Acta Cryst. D54, 1285–1294.Google Scholar
Pannu, N. S. & Read, R. J. (1996a). Improved structure refinement through maximum likelihood. Acta Cryst. A52, 659–668.Google Scholar
Read, R. J. (1990). Structurefactor probabilities for related structures. Acta Cryst. A46, 900–912.Google Scholar
Read, R. J. (1994). Maximum likelihood refinement of heavy atoms. Lecture notes for a workshop on isomorphous replacement methods in macromolecular crystallography. American Crystallographic Association Annual Meeting, 1994, Atlanta, GA, USA.Google Scholar
Read, R. J. (1997). Model phases: probabilities and bias. Methods Enzymol. 277, 110–128.Google Scholar