**Authors:** George Davenport and Syd Hall

**Contact: ** Syd Hall, Crystallography Centre,
University of Western Australia, Nedlands 6907, Australia

*ADDREF adds measured reflection data to the archive bdf and converts them
into different structure factor coefficients. ADDREF can also create reflection
data, expand or contract an existing reflection record, and merge reflection
records. Options include the insertion of interpolated form factors into the
reflection record, the removal of systematically absent reflections, and the
calculation and application of the Lorentz-polarization factor for a range of
geometries.*

Most crystallographic calculations require reflection information to be present in the bdf. The basic reflection data includes the Miller indices, sin/, reflection multiplicity, the symmetry reinforcement factor (epsilon), phase restriction codes and |F| relative. Other quantities such as |F|, reflection weights, the Lorentz-polarization factor, scale group number, and interpolated scattering factors may be added as the user requires.

Up to five sources of input may be used (input lines and/or up to four binary
data files) or dummy reflection records may be generated from the cell
dimensions within specified limits of h, k, l, and sin/.
Generated data is useful for calculating structure factors when only the atomic
parameters are available. When more than one input source is used, it is vital
that each source have the same set of reflections and refer to the same
compound. This constitutes a *lrrefl:* merging feature. Also worth noting
is that the input archive bdf must contain all cell, symmetry, and cell content
information pertinent to the compound. In other words, the input archive bdf
must contain the data generated by

The sources of reflection data, as well as the specific items, are specified
using combinations of **bdfin** and **hklin** lines.
One **hklin** line is allowed, and one **bdfin** line
per input bdf is allowed. These lines can be in any order, but an important
*caveat* applies. That is, if a data item is specified as coming from two
different sources (e.g. if the Miller indices are given on an
**hklin** line and also on a **bdfin** line), the item
will be taken from the source specified *first*.

For convenience, a **remove** line has also been provided. For
cases in which a large number of items are to be taken from an input bdf, it
may be easier to specify those items which are not to be output than those
items which are to be output. The **remove** line may thus be used
in conjunction with a **bdfin** line (using the **all**
option) to trim unneeded items from the reflection record (see Examples).

Items on **bdfin**,**hklin**,**remove**, and
**c** (continuation) lines may be specified in two ways. A set of
four-letter mnemonics are available for the most commonly used quantities. For
more involved applications, items can be specified using their identification
numbers as listed in the BDF section at the back of the manual.

The printed output contains a list of items from each source, along with the
status of each item. The status refers to possible user errors, such as a
duplicate request for an item or the absence of an item on the given source. A
list of data for each reflection is given, for either a specified number of
reflections or all reflections, depending on the user's choice. A list of items
contained in the reflection record of the output bdf is given, along with the
maxima and minima of the data for those items. In addition, the maximum
magnitudes of the Miller indices and the maximum and minimum values of
sin/ for the output bdf are stored in *lrdset:* of the
output bdf for use by other programs.

ADDREF tests each reflection to see if it is systematically absent under the space group symmetry given. Systematically absent reflections are either rejected from the file or marked with an rcode of 5 and these must not be included in the bdf as observed reflections. Inclusion of such reflections will cause the Fourier transform to show incorrect symmetry. To ensure that no

duplicate reflections are present on the bdf, the program
* SORTRF* (with

**Reflection status codes (rcode)**

The values of *rcode* which are recognised for most XTAL calculations are
as follows:

"observed" reflection (ie. Y>= nY)

"less than" reflection (ie. Y< nY)

unreliable reflection not used in refinement or R factors

Friedel-related value is missing when data stored as Friedel pairs

systematically absent

**Generate hkl data**

Occasionally it is necessary to produce a file containing 'dummy' reflection
data. Measured diffraction data may not be available for input but reflections
are needed in order to calculate structure factors with programs such as
* FC*.
Reflection data may be generated by entering the

The minimum contents of the *lrrefl:* record are the packed hkl word,
sin/, the packed
phase-code/multiplicity/epsilon word and
structure factor coefficient (this can be Frel, Frel squared or Irel). The
input

When running SORTRF after ADDREF make sure that, in addition to specifying the
sort order code, the **aver** **1** and the merged
coefficient ( **frel** , **f2rl** or
**irel** ) are also entered. Note that if Friedel equivalent
data is
to be preserved the **pakfrl** or **sepfrl**
code must be entered on the **SORTRF** line.

The * lrscat:* are present in the

ADDREF provides many options for reducing the data to be stored in the output archive bdf. It is a "two pass" program. During the first pass, statistical information on the reflection data is calculated and written to a scratch file. During the second pass, reflection data processing is completed and the results are written to the output archive bdf.

*The following calculations may be performed:*

transform Miller indices

generate hkl data

calculate sin/

calculate the multiplicity and reinforcement factor, and phase restriction code

determine if reflection is systematically absent for this space group

apply Bayesian statistics to weak data

interpolate the scattering factors and store reflection packets

obtain max/min h, k, l, sin/, and other quantities

calculate and apply 1/Lp for all geometries and radiation

convert input function of F to requested output function of F

calculate the standard deviation in the chosen F function

Algorithms for the common 1/Lp factors are available. In the equations below
refers to the reflection diffraction angle, and _{m} to
the diffractometer angle for the monochromator crystal.

The formulae used for polarization are those described by Azaroff (1955), Hope
(1971), and Vincent & Flack (1980). The general expression for polarization
of a *twice-diffracted* beam is

P = K_{i}(1-B)(cos^{2}
cos^{2}2+sin^{2}) + B(sin^{2}
cos^{2}2+cos^{2}) / [(1-B)K_{i}+B]

where K_{i}, the polarization ratio is K_{k} =
cos^{2}2_{m} for an ideal mozaic crystal and
K_{d} = |cos 2_{m}| for an ideal crystal. B is the
fraction of the intensity with the electric field parallel to the plane of the
monochromator (Azaroff's notation is E_{}).
This direction is given
by the cross product of the vector in the direction of the source beam and the
normal to the monochromator crystal plane. In a standard X-ray diffractometer
the source beam is unpolarized and B=0.5. _{m} is the
monochromator angle and is the angle between 2 planes of diffraction
(i.e. planes, containing the incident and reflected rays of the monochromator
and the sample).

The general expression for the integrated polarization of
*mosaic/perfect* crystal is

P_{i} = (1-C) P_{k} + C P_{d}.

where C is the monochromator perfection factor (the fraction of the
monochromator crystal considered to be perfect) and P_{k} and
P_{d} the kinematic and dynamical components of the polarization.
**RLP** is the reciprocal of Lp.

*X-ray powder, no monochromator*

**RLP1** = 2sin sin 2 / (1 + cos^{2}2)

*X-ray single crystal, no monochromator*

**RLP2** = 2sin 2 / (1 + cos^{2}2)

*X-ray single crystal, with monochromator and perfection factor,
perpendicular setting*

In the perpendicular monochromator setting, the rotation axis of the
monochromator crystal is perpendicular to the normal to the equatorial plane of
the diffractometer (ie. 2 axis), such that the plane of the incident
beam and the beam reflected by the monochromator is perpendicular to the plane
of the beam reflected by the monochromator and the beam reflected by the
crystal under study. Rho, as defined by Azaroff, is 90°. If the source
beam incident on the monochromator is unpolarized then B=0.5. For a perfectly
polarized beam B=0. for this setting. *This is the CAD4 setting.*

T1 = (1 - C) ((1-B)cos^{2}2_{m} +
Bcos^{2}2) / (B +(1-B) cos^{2}2_{m})

T2 = C(Bcos^{2}2 + (1-B)cos2_{m}) / (B +
(1-B)cos2_{m})

**RLP3** = sin2 / (T1 + T2)

*X-ray single crystal, with monochromator and perfection factor, parallel
setting*

For the equatorial, or normal, monochromator setting, the rotation axis of the
monochromator is parallel to the normal to the equatorial plane of the
diffractometer (ie. 2 axis) such that the incident beam, the beam
reflected by the monochromator and the beam reflected by the crystal under
study all lie in the same plane. If the source beam incident on the
monochromator is unpolarized then B=0.5. For a perfectly polarized beam B=1.
for this setting. *This is the Nicolet setting.*

T1 = (1 - C) (B + (1-B)cos^{2}2
cos^{2}2_{m}) / (B +
(1-B)cos^{2}2_{m})

T2 = C(B + (1-B)cos^{2}2 cos2_{m}) / (B +
(1-B)cos2_{m})

**RLP4** = sin2 / (T1 + T2)

*Neutron powder (no polarization)*

**RLP1** = 2sin sin 2

*Neutron single crystal*

**RLP2** = 2sin 2

Reads

and symmetry data from the input archive bdf*lrcell:*Writes updated file to the output archive bdf

Optionally, reads reflection data form specified (on

**bdfin**) bdf

title CREATION OF AB INITIO REFLECTION RECORD ADDREF dset 1 ffac list reduce itof rlp2 hklin skip hkl rcod irel sigi absf eval remove irel sigi hkl p6122 0 1 1 1 22004.8 4043.4 1.0 3.0 hkl p6122 0 1 4 1 387.4 205.5 1.0 1.0 hkl p6122 0 1 5 1 6735.0 1110.5 1.0 3.0 :...................................reflection data omitted for brevity hkl p6122 2 2 7 1 358.1 98.2 1.0 0.3 hkl p6122 2 2 8 1 384.3 78.1 1.0 0.3 hkl p6122 2 3 3 1 2275.6 247.0 1.0 2.0 |

The ADDREF line specifies that interpolated form factors are to be inserted in
*lrrefl:*, and that all reflections are to be listed. The

title EXAMPLE USE OF CONTINUATION LINES ADDREF dset 1 hklin hkl frel sigf fcal 1000 1001 1002 c 1003 rcod tbar hkl 1 1 1 40 5 56 289 33 256 4 0.1 |

title Generate reflection data to sin(theta)/lambda=.5 ADDREF limits *4 0.5 hklgen hkl frel title Complete data preparation sequence STARTX cell 11.52 11.21 4.92 90 90.833 90 288.0 cellsd .012 .011 .005 0.0 .0005 0.0 sgname -p 2yab :p21/a celcon o 12 celcon c 28 celcon h 24 DIFDAT cad attenu 5. genscl 3 SORTRF order khl aver 1 cull 1.5 print 1500 pakfrl ADDREF dset 1 list 7 ffac lpin friedel reduce itof rlp2 xray bdfin hkl irel sigi rcod ifri sfri rcdf remove irel sigi ifri sfri |

In this example a run of
* STARTX*,

Azaroff, L.V. 1955.

*Polarization Correction for Crystal-MonochromatizedX-radiation.*Acta Cryst.**8**, 701.Hope, H. 1977.

*Polarization Factor for Graphite X-ray Monochrometers.*Acta Cryst.**A27**, 392.Iwasaki, Hitoshi and Ito, Tetsuzo. 1977.

*Values of Epsilon for Obtaining Normalized Structure Factors .*Acta Cryst.**A33**, 227-229.Karle, I. 1969.

*General Procedure for Phase Determination.*Crystallographic Computing. F.R. Ahmed, Sydney R. Hall, C.P. Huber, eds., Munksgaard. Copenhagen:19-25.Kasper, John S. and Lonsdale, Kathleen. 1959. Eds.

*International Tables for X-ray Crystallography Vol. II.*Birmingham, England: Kynoch Press.Larson, A.C. 1969.

*The Inclusion of Secondary Extinction in Least-Squares Refinement of Crystal Structures*. Crystallographic Computing.F.R. Ahmed, S.R.Hall, C.P.Huber, eds., Munksgaard. Copenhagen: 291-294. Rollett, J.S. 1965.

*Computing Techniques in Crystallography.*Elmsford, NY: Pergamon Press.Stewart, J.M. and Karle, J. 1976.

*The Calculation of Epsilon Associated with Normalized Structure Factors, E*. Acta Cryst.**A32**, 1005-1007.Stewart, J.M. and Karle, J. 1977.

*Two Papers on the Calculation of Epsilon for Obtaining Normalized Structure Factors*. Acta Cryst.**A33**, 519.Vincent, M.G. and Flack, H.D. 1980.

*On the Polarization Factor for Crystal Monochromated X-radiation I Assessment of Errors.*Acta Cryst.**A36**,610.