Refinement RIETICA Manual
Refinement RIETICA Manual
ORGANIZATION
LUCAS HEIGHTS RESEARCH LABORATORIES
LHPM
A COMPUTER PROGRAM FOR RIETVELD ANALYSIS
OF X-RAY AND NEUTRON
POWDER DIFFRACTION PATTERNS
by
February 2000
AUSTRALIAN NUCLEAR SCIENCE AND
TECHNOLOGY ORGANIZATION
by
ABSTRACT
This manual gives detailed instructions for the Rietveld analysis computer program LHPM. The program is
based on a program from Wiles and Young* but incorporates improvements which make it significantly different.
Extensions to the program allow refinements of multiple x-ray and/or neutron datasets. A brief account of the
Rietveld method and its implementation, and a program description are included.
*Program DBW3.2 of D.B. Wiles and R.A. Young, School of Physics and Engineering Experimental Station,
Atlanta, Georgia 30332, USA.
Contents
1. INTRODUCTION ............................................................................................................................................ 4
2. THE METHOD AND ITS IMPLEMENTATION................................................................................................. 6
2.1 Peak Shape Functions .............................................................................................................................................. 6
2.2 Preferred Orientation................................................................................................................................................. 8
2.3 Absorption Correction ............................................................................................................................................... 8
2.4 Extinction Correction ................................................................................................................................................. 9
2.5 Lorentz-Polarization Factor ....................................................................................................................................... 9
2.6 Background............................................................................................................................................................... 9
2.7 Quantitative Phase Analysis.................................................................................................................................... 10
2.8 Thermal Parameters ............................................................................................................................................... 10
2.9 Least Squares......................................................................................................................................................... 10
3. THE PROGRAM........................................................................................................................................... 13
3.1 Availability .............................................................................................................................................................. 13
3.2 Description.............................................................................................................................................................. 13
3.3 Parameters and Codewords .................................................................................................................................... 14
3.4 Distribution Tape..................................................................................................................................................... 14
3.5 Notes on Compilation.............................................................................................................................................. 15
4. OPERATION OF THE PROGRAM ............................................................................................................... 15
5. MAXIMUM PARAMETER VALUES .............................................................................................................. 16
6. INPUT AND OUTPUT FILES - OVERVIEW.................................................................................................. 16
7. INPUT AND OUTPUT FILES - DETAIL ........................................................................................................ 17
7.1 Unit 4: Observed Stepscan Data ............................................................................................................................. 17
7.2 Unit 5: Control Variables and Structure and Profile Parameters ............................................................................... 18
7.3 Unit 6: Main Output File .......................................................................................................................................... 23
7.4 Unit 9: Plot File Output............................................................................................................................................ 23
7.4 Unit 10: Bond Valence Output File........................................................................................................................... 24
7.5 Unit 11: Distance and Angle Calculations ................................................................................................................ 24
7.6 Unit 20: Fourier Output File ..................................................................................................................................... 24
8. HINTS .......................................................................................................................................................... 24
8.1 The Data File .......................................................................................................................................................... 24
8.2 The Input File.......................................................................................................................................................... 25
8.2.1 Multiple Histrograms ............................................................................................................................................ 25
8.2.2 Wavelength/DIFC ............................................................................................................................................ 25
8.2.3 Time-of-Flight.................................................................................................................................................. 25
8.2.4 Scattering Factors ........................................................................................................................................... 25
8.2.5 Background..................................................................................................................................................... 25
8.2.6 Preferred Orientation ....................................................................................................................................... 25
8.2.7 Peak Shape..................................................................................................................................................... 25
9. ACKNOWLEDGEMENTS............................................................................................................................. 26
10. REFERENCES........................................................................................................................................... 27
1. INTRODUCTION
The Rietveld method [Rietveld,1969, Rietveld,1967] for the analysis of X-ray and neutron powder diffraction
patterns is now well established. (See, for example, reviews by [Cheetham and Taylor,1977], [Albinati and
Willis,1982] and [Taylor,1985]) This is a method for crystal structure refinement that does not use integrated
powder diffraction intensities, but employs directly the profile intensities obtained from step-scanning
measurements of the powder diagram. The Rietveld method can also be used in conjunction with Fourier
techniques to assist in the ab initio solution of crystal structures from powder diffraction data.
The first computer program for the implementation of the Rietveld method was described by Rietveld [1969].
This program was written specifically for the analysis of neutron diffraction data from fixed-wavelength
diffractometers. The program had two steps: a data preparation step, and a refinement step. The program was
developed further by [Hewat,1973] and applied by a number of other workers with great success. [Von Dreele, et
al.,1982] extended the program to the refinement of neutron patterns recorded with time-of-flight diffractometers.
Meanwhile. the first applications of the Rietveld method to the analysis of X-ray data were reported [Malmros and
Thomas,1977] and [Khattak and Cox,1977]. Additional programs for Rietveld refinement have been described,
including those by [Pawley, et al.,1977] and [Baerlocher,1993] which allow the refinement of crystal structures
subject to quite sophisticated constraints, and The Generalised Structure Analysis System (GSAS) by [Larson and
Von Dreele,1986] includes some of these features in a menu driven system.
[Wiles and Young,1981] described a program for the Rietveld analysis of either X-ray or neutron diffraction
patterns recorded with conventional (fixed wavelength) diffractometers. This program incorporated certain
important advances in that it allowed the refinement of the structures of two phases simultaneously, it
accommodated data recorded at either one or two wavelengths (the two-wavelength option could be used for data
obtained with the X-ray doublet), and it offered the choice of four peak shape functions. The background could be
prescribed or refined as required. The program was relatively easy to use, with single-step operation (in contrast
with earlier programs), a built-in table of X-ray scattering factors and neutron nuclear scattering lengths, and
calculation of symmetry operators from a standard space-group symbol. [Wiles and Young,1981] referred to
version DBW2.9 of their program, written in Fortran IV. Later, a version DBW3.2, written in Fortran 77, was
distributed. This version benefited from the experience with DBW2.9 of a number of users, including ourselves.
We made extensive use of version DBW3.2, then developed from it a new program called LHPM5, which is
described below. The new program retains all the desirable features of the Wiles and Young program DBW3.2,
and in addition incorporates the following changes:
• A rearrangement of the peak shape options, which also provides for the possible variation of peak shape
across the pattern [Hill and Howard,1985, Hill,1984] and the application of different peak shapes for the
different phases.
• Inclusion of a pure Voigt peak shape function, intended mainly for use in the analysis of neutron data. This is
coded with a Gaussian component, the width of which varies according to the formula given by [Caglioti, et
al.,1958], and a Lorentzian component with width varying as for particle-size broadening.
• An option to model peak asymmetry using either the asymmetric multiplying factor suggested by
[Rietveld,1969] or the sum of (five) symmetric functions developed by [Howard,1982].
-1
• Inclusion of a term of the form (2θ) in the background function to account for the observed variation of
background in the low angle region.
• A modification of the weighting scheme to provide for appropriate weighting of data from multicounter
diffractometers. Weights may be based on either observed or calculated intensities as required.
• Calculation and output of coefficients for use in subsequent Fourier analyses.
• Extensive modification of the derivative calculations, to improve program structure and efficiency, and several
other more technical program amendments.
The increasing use of synchrotron powder diffraction, time-of-flight neutron diffraction and simultaneous x-
ray/neutron refinements has made it desirable to add several new capabilities to LHPM. These include:
• Ability to read new data formats, including higher precision 2θ values in the input and data files, and a listed
format datafile consisting of rows of 2θ, Intensity (and optionally weight(Intensity)).
• Multiple x-ray and/or neutron histograms (datasets) allowing different scales, zeros, peak profile types and
values, backgrounds, wavelengths, preferred orientations for each histogram - all of which are refinable.
• Ability to calculate and refine neutron time-of-flight data.
• Each histogram can have it’s own scattering form factors/lengths, so can be used in anomalous scattering
experiments. The ability to refine f’ and f’’ now allows extra flexibility with synchrotron diffraction data.
• Can interpolate x-ray form factors from a series of (sin(θ)/λ, f) values, so that any form factor profile can be
used. The old scheme of fitting the values to a form factor equation has been removed.
• An anisotropic gaussian peak broadening for all peak shape types.
• Ability to refine wavelength(s).
• A new absorption correction formula allowing µR > 1.0, based on [Sabine, et al.,1997] for cylindrical geometry
and a flat plate absorption correction based surface roughness by [Hermann and Ermrich,1987]
• New background functions to deal with amorphous background contributions
• Several technical amendments including: calculation of contributions from peaks at low 2θ (in addition to the
high 2θ) beyond the observed data limits and improvements in the U, V, W calculations
• Ability to stop calculation of weak peaks, such as for large monoclinic cells in multiphase systems.
• Addition of a new peak shape specifically for TOF based on the convolution of a pair of split exponentials with
a pseudo-Voigt function.
• Allows a phase to be calculated from atomic site information (normal method) or the intensities can be
extracted using the Le Bail extraction method.
• Calculates bond distances and angles (with cross-correlation errors), and metal – oxygen/chlorine/fluorine
bond valences.
• Addition of the Finger, Cox and Jephcoat asymmetry correction for the Pseudo-Voigt peak shape. [Finger et
al, 1997].
• Has the option to use the Marquardt algorithm for least squares refinement. This dramatically increases the
chances of convergence in an unstable refinement.
The LHPM program has been run successfully on the following computers: IBM-PC compatible’s, Silicon
Graphics, VAX-VMS, DEC-Station and DEC-Alpha’s.
This manual documents version 6.6 of our computer program for the Rietveld analysis of X-ray and neutron
powder diffraction patterns.
2. THE METHOD AND ITS IMPLEMENTATION
The basis of the Rietveld method [Rietveld,1969, Rietveld,1967] is the equation
k p2
yic = yib + ∑ ∑ Gik
p
Ik (1)
p k =k 1p
where yic the net intensity calculated at point i in the pattern, yib is the background intensity, Gik is a normalised
peak profile function, Ik is the intensity of the kth Bragg reflection, k1 ... k2 are the reflections contributing intensity
to point i, and the superscript p corresponds to the possible phases present in the sample.
where S is the scale factor, Mk is the multiplicity, Lk is the Lorentz-polarisation factor, and Fk is the structure factor,
n
Fk = ∑ fj exp[2πi (hrt rj − h kt B j h k )] (3)
j =1
where fj the scattering factor or scattering length of atom j, and hk, rj and Bj are matrices representing the Miller
indices, atomic coordinates and anisotropic thermal vibration parameters, respectively, and the superscript t
indicates matrix transposition. The factor Pk is intended to describe the effects of preferred orientation: for
powders unaffected by preferred orientation Pk = 1. The factor Ak is the absorption correction and Ek an extinction
correction.
The positions of the Bragg peaks from each phase are determined by their respective set of cell dimensions, in
conjunction with a zero parameter and the wavelength (or diffractometer constants) provided. All of these
parameters may be refined simultaneously with the profile (see below) and crystal structural parameters. For TOF
the position of the Bragg peak is calculated using
TOFk = DIFC.dk + DIFA.dk2 + ZERO (4)
where dk is the d spacing of the kth reflection, DIFC is the diffractometer constant and is dependent on the path
length of the instrument, DIFA is a variable correction factor and ZERO is the zero point value.
The wavelength (or diffractometer constant) is refinable, but some or all of the cell dimensions must be fixed
to avoid divergences in the least squares procedure. When more than one wavelength is used in a histogram,
such as Kα1 and Kα2, the second wavelength is automatically tied to the first so that λ1/λ2 is constant. The ratio of
2
the intensities for two possible wavelengths is absorbed in the calculation of |Fk| , so that only a single scale factor
for each phase is required. This ratio is not a refinable parameter.
The peak profile function Gjk can be chosen from the following options:
(a) Pseudo-Voigt
C10/ 2
[ ] C11/ 2
[ ]
−1
Gik = γ 1 + C 0 X ik2 + (1 − γ ) exp −C 1 X 2ik (5)
Hk π H k π 1/ 2
where C0 = 4, C1 =4ln2, Hk is the full-width at half-maximum (FWHM) of the kth Bragg reflection, Xjk = (2θi -
2θk)/Hk and γ is a refinable 'mixing' parameter.
C11/ 2
Re ω C11/ 2 X ik + iC 3 Lk H
Gik = H
(7)
H Gk π 1/ 2 Gk
where C1 = 2ln2, C3 = (ln2)1/2, HGk is the FWHM of the contributing Gaussian, HLk is the FWHM of the contributing
Lorentzian, ω is the complex error function, ω(z) = exp(z2 ) erfc(z), and Re denotes its real part.
Gik =
αβ
2(α +β)
(
(1 − η) eu Erfc(y) + evErfc(z) ) −
2η
π
( )
Im ep E1(p) + eqE1(q) (8)
where α and β are exponential decay terms defined to vary with d-spacing, d, as α = α0 + α1/d and β = β0 + β1/d4
respectively. The functions Erfc and E1 are the complex error function and complex exponential integral function
respectively. The other terms are defined as u = 0.5α( ασ2 + 2Xik ), v = 0.5β( βσ2 - 2Xik ), y = (ασ2+ Xik )/(√2σ), z
= ( βσ2 - Xik )/(√2σ), p = -αXik + iαγ/2, q = -βXik + iβγ/2 and Xik = (TOFi - TOFk)/Hk, where Hk is the FWHM. The
value σ is related to the FWHM of the contributing Gaussian by HG = σ (8 ln2), and γ is related to the Lorentzian
FWHM by HL = γ . The total FWHM is determined by the expression,
Hk = (HG5 + 2.69269HG4HL + 2.42843HG3HL2 + 4.47163HG2HL3 + 0.07842HGHL4 + HL5)0.2 (9)
and the value η is determined by
η = 1.36603(HL/Hk) – 0.47719(HL/Hk)2 + 0.11116(HL/Hk)3 (10)
as given by Thompson et al.
The pseudo-Voigt and Pearson VII profile functions can be assigned a fixed shape of any type between their
limiting Gaussian and Lorentzian forms (γ = 0 and 1, respectively, for the pseudo-Voigt and γ = ∞ and 1,
respectively, for the Pearson Vll). Alternatively, the peak shape can be varied across the pattern by application of
the function
For both of these profile types, the variation of the peak FWHM is defined by the function described by
[Caglioti, et al.,1958]:
2 1/2
Hk = (U tan θ + V tanθ + W) (12)
where U, V and W are refinable parameters. The U parameter can have an additional (hkl) dependent term, Uanis,
2
defined as Uanis = Uacos φ, where φ is the angle between the (hkl) reflection and the direction of anisotropic
broadening. The parameter Ua is refinable. The U value is typically associated with strain broadening. A particle
size parameter, typically having a sec(θ) dependence, can be calculated from U and W, via sec2(θ) = 1 + tan2(θ).
In the case of the Voigt profile function, the widths of the Gaussian and Lorentzian components of the peaks
are coded to vary in separate ways with 2θ. The Gaussian component width varies in accordance with equation
(12), but the width of the Lorentzian component varies with secθ and tanθ:
180 λ 180
HLk = sec(θ) + S tan(θ) = Ks sec(θ) + K t tan(θ) (13)
π D π
The Scherrer equation, the sec(θ) dependent term, is an attempt to describe particle-size effects. We note that a
physical interpretation of the resultant 'size' parameter, D, is likely to have meaning only in the case of neutron
diffraction data for which the instrumental component of the peak shapes is Gaussian in form. The tan(θ) term, is
a strain dependent term, similar to that in equation (12).
For the TOF profile function, the widths are governed by a Gaussian component of the form:
(
HLk = γ 0 + γ 1 d + γ 2 d 2 ) (15)
Following [Rietveld,1969] three of the CW profile functions can be corrected for peak asymmetry using the
semi-empirical function
A ik = 1 − AS [sign (2 θ i − 2θ k )] (2 θ i − 2 θ k ) 2 cot(θ k ) (16)
In the cases of the pseudo-Voigt and Voigt profile functions, an asymmetry correction may also be applied in
the form of a sum of five pseudo-Voigt or five Voigt peaks. [Howard,1982] has demonstrated that this procedure
provides a more physically appropriate correction for peak asymmetry in the case of neutron fixed wavelength
powder diffraction data.
The asymmetry of Finger, Cox and Jephcoat can also be used in the case of the pseudo-voigt peak shape. It
gives excellent results where instrumental asymmetry causes problems and the Howard asymmetry is inadequate.
The asymmetry is defined by two parameters, S/L and D/L, where S/L is the source size to sample-detector
distance ratio and D/L is the detector size to sample-detector distance ratio. It is best to fix these if known, as the
refinements can sometimes be unstable with both parameters refined simultaneously. Use of the Marquardt
algorithm can help in the stability.
The intensity Ik of the Bragg peaks can be modified during structure refinement to allow for preferred
orientation due to the presence of platey crystallites in the sample by use of the function ([Dollase,1986])
[ ]
−3 / 2
Pk = P12 cos 2 α k + P1−1 sin 2 α k (17)
where P1 is a refinable parameter, and αk is the acute angle between the scattering vector and the normal to the
crystallites (calculated internally from the Miller Index of the crystal platelet face). Typically, for high symmetry
space groups, Pk is calculated as a sum over all equivalent reflections since the angle αk can be different for each
equivalent reflection. For symmetries lower than tetragonal it is not required. This ability can be turned on and off
using a flag (IPREF).
The value of Ik, may also be corrected for the effects of sample absorption by applying a transmission factor.
For CW X-ray and neutron data the correction of [Sabine, et al.,1997] is used:
For flat plate geometry, where absorption from weak surface roughness is a significant factor, the expressions
of [Hermann and Ermrich,1987] are used:
Ak = ( 1 - P0 - Ps(θ) ) = 1 - Po( 1 + α0( τ/sin(θ)( 1- τ/sin(θ)) - 1) ) (19)
where P0 is the bulk term, while Ps is a θ dependent term and is a function of the packing density, αo, and the
degree of roughness, τ. The parameters P0, α0 and τ are refinable, although P0 can be highly correlated to the
scale factor.
Extinction for constant wavelength is corrected using the [Sabine,1988] extinction correction,
EL =
[ ]
(23)
2 π x 1 − 18 x − 3 128 x 2 − 15 1024x 3 +... x >1
where x = D.(λ.Fk/V)2, D = mosaic block size, λ = wavelength, Fk = structure factor of reflection k and V = volume
of unit cell.
The Lorentz-Polarization factor consists of two factors: a polarization correction and a powder specific
correction. For x-ray diffraction, the incident x-ray beam can be polarized or non-poliarized. If the incident beam is
unpolarised then the scattered intensity (single crystal or powder) is modified by,
P = (1 + cos2(2θ)) / 2 (24)
For neutrons there is no polarization factor. Equation (24) is modified to become, for single crystal diffraction, the
Lorentz-polarization factor,
LP = (1 + cos2(2θ)) / (2 sin(2θ)) (25)
This is the correction needed for a single crystal in an unpolarised beam. For a powder there is an additional term
of 1/sin(θ).
2.6 Background
where Bm are refinable parameters and Tm is the Chebyshev function (defined by Tn+1(x) -
2xTn(x) + Tn-1(x) = 0, where T0 = 1 and T1 = x), or
(v) by refinement of the function
n
∑B
sin(QB 2 m+1 )
y ib = B 0 + B1 Q + 2m (28)
m =1
QB 2m+1
where Bm are refinable parameters and Q = 4π sin(θ)/λ = 2π/d. This function is typically used
when there is an amorphous component. The values B2m+1 are nearest neighbour distances rnn
and B2m are the amplitudes. The B1 term is either B1Q or B1θ for TOF or CW respectively.
The number of background terms, n, used in the series calculations can be increased to accommodate
complex backgrounds such as when a significant number of nearest neighbour distances are needed to describe
the amorphous contribution to the background.
Quantitative phase analysis can be performed on multi-phase samples using the formalism described by [Hill
and Howard,1987]. The general scattering cross-section for Bragg scattering is proportional to N/V, where N is the
number of unit cells contributing to the scattering and V is the unit cell volume. The scale factor, S, in equation (1)
is then proportional to N/V.
where S is the scale factor, Z is the number of formula units per unit cell, M is the molecular weight of the formula
unit, V is the unit cell volume and i is an index running over all phases. It is worth noting that S.V is proportional to
the number of unit cells diffracting (N) and Z.M is just the molecular weight of the unit cell, hence S.V.Z.M is
proportional to the weight of the diffracting sample. Other fractions, such as volume fraction are also easily
calculated, eg. VolumeFractionp = (S V2)p / Σ(S V2)i
[
exp −(β11 h 2 + β 22 k 2 + β 33 l 2 + 2β12 hk + 2β13 hl + 2β 23 kl) ] (30)
where h,k,l are the Miller indicies and β11...β23 are the anisotropic thermal parameters for atom j. If the ITHER
parameter is set then equation (30) takes the form
[ ]
exp −2π 2 (a *2 u11 h 2 + b *2 u 22 k 2 + c *2 u 33 l 2 + a * b * u12 hk + a * c * u13 hl + b * c * u 23 kl ) (31)
2 * * *
where <u> are the square of the thermal displacements (Å ), and a , b , c are the reciprocal lattice constants.
exp( −B iso (Q 4 π ) )
2
(32)
The least-squares procedure uses the Newton-Raphson algorithm to minimise the quantity
R = ∑ w i (y io − y ic ) 2 (34)
i
where yio is the set of observed diffraction intensities collected at each step across the pattern (in the case of a
detector array, yio is the average from n contributing detectors), yic is the set of corresponding calculated values
obtained from equation (1), and wi is the weight assigned to each observation (see below).
The minimisation of R is undertaken over all data points contributing to the peaks and (when refined) the
background.
Note that the contribution of each reflection to the calculated pattern is considered only over the range of 2θ
within ± n.Hk of the centre of the Bragg peak position 2θk, where n is usually a number between 2 (for Gaussian
peaks) and 7 (for Lorentzian peaks). Similarly, the contributions from peaks whose centres lie within nHk of the
end of the pattern or the upper or lower limits of user-defined 'excluded regions' in the main body of the pattern,
are also included in the calculation of the intensity at a particular step. The excluded regions are normally invoked
to remove from consideration any peaks from an impurity phase not able to be accounted for as second-phase.
For TOF the same calculations are used except that the TOF value (in microseconds) is used instead of 2θ, and
that a typical value used is 5. This is larger than a Gaussian due to the tailing exponentials in the TOF peakshape.
If xm are the adjustable parameters in the model, then the normal equations matrix has elements given by
∂ 2 y ic ∂y ∂y ic
Mmn = − ∑ w i ( y io − y ic ) − ic (35)
∂x m ∂x n ∂x m ∂x n
In practice, the first term is omitted to simplify the calculations (ie. the second derivatives are ignored). The shifts,
∆xm, which will best reduce the residual are then given by
∂R
∑M
1 −1
∆x m = − mn (36)
2 n
∂x n
The calculated shifts are then applied to the adjustable parameters xm and a new set of yic (ie. a new
calculated pattern) is produced. The whole procedure is repeated iteratively until a criterion of completion is met
say, that ∆xm < 0.1 σm {σm defined below) or the number of cycles has exceeded a certain limit. Since the process
is non linear, approximate starting values for all parameters are required for the first refinement cycle.
The Marquardt algorithm can also be used. This adjusts the diagonal matrix elements of M to
Mii = Mii ( 1 + ε ) (37)
where ε is the Marquardt parameter, and typically has values between 1.0 and 0.0001. The Marquardt value can
be either fixed (IMQT = 1) or allowed to automatically vary depending on the quality of the fit (IMQT = 2). Once
near convergence has been reached the value should be set to 0.0 (the automatic mode automatically does this),
which is the normal Newton-Raphson mode of least-squares (ε = 0). A fixed non-zero value or the automatic
mode is highly recommended for unstable refinements, but not recommend when convergence has been reached.
The values of the parameter esd's, σm, are calculated from the expression:
1/ 2
N
−1
∑
i=1
w i (y io − y ic )
2
σm = Mmm (38)
N−P
where Mmn-1 is the diagonal element of the inverse matrix, N is the number of observations (i.e. the total number
of yio's when the background is refined), and P is the number of adjusted parameters.
The weight wi assigned to the individual step intensity is the reciprocal of the variance σi2 at the ith step and is
usually based on counting statistics. For the cases in which the yio include the background contribution, either as a
refinable function or for subtraction by interpolation between user-selected points,
1 n n
wi = = ≈ (either weighting scheme may be selected) (39)
σi2
y ic y io
where n is the number of detectors contributing to the step intensity average. However, for the situation in which
the background Yib is measured independently in a 'no-sample' experiment:
1 n
wi = = (40)
σi2
y io + y ib
The quantities used to estimate the agreement between the observations and the model during the course of the
refinement are as follows:
∑ y io − y ic
(i) The profile R p = (41)
∑ y io
1/ 2
∑ w (y − y ) 2
(ii) The weighted profile R wp = i io ic (42)
∑ w y 2
i io
∑ w i (y io − y ic ) 2
2
R wp
(v) The goodness of fit, χ2 = = (45)
N−P R exp
(vi) The (unweighted) Durbin-Watson d-statistic [Flack, Vincent and Vincent 1980; Hill and Madsen 1986] for
the analysis of serial correlation in the profile
N N
d = ∑ (∆y i − ∆y i−1 ) 2 / ∑ ∆y i2 (46)
i= 2 i =1
where N is the number of observations and ∆yi is the difference between the observed and calculated intensity at a
given step i. Serial correlation is indicated (at the 99.9 per cent confidence level) unless Q < d < 4-Q where
N−1 3.0902
Q =2 − (47)
N − P (N + 2)1/2
3.1 Availability
The program (executable’s, source, manual and sample files) can be obtained free of charge from the Neutron
Scattering Group, ANSTO, Building 58, PMB 1, Menai, NSW, 2234, Australia. Please specify computer, media
required (3½’’, 5¼’’ or CD) and return address. Alternatively, the program can be obtained from the anonymous ftp
site:
ftp.ansto.gov.au /pub/physics/neutron/rietveld
Program users are requested to report to the authors any errors they may find in either the manual or the
program. Changes to the code made at the local institutes are also welcome and will be incorporated into new
versions for general redistribution.
3.2 Description
The program is written in FORTRAN 77/90. A brief description of the various subroutines and functions follows.
MAIN Main program, which calls in succession the subroutines INPTR, ASSIGN, ITER and EXPUT.
INPTR Reads the control input (from unit 5), the data (from unit 4), and (if required) the separate file of
background (from unit 2). Interprets codewords. If required, it interpolates background. Calls
subroutines: SPGP, CELL2, LOOKUP, REFGEN and RTMT.
SPGP - Interprets the space group symbol, and generates operators which SYMOPR uses to
generate the full set of equivalent positions, and OP1 and SMTRY2 use to generate the full set
of equivalent indices.
CELL2 - Converts from unit cell parameters a,b,c,α,β,γ to the cell constants A,B,C,D,E,F used in
the refinement
LOOKUP - Searches BLOCK DATA to find the relevant X-ray scattering factors or neutron
scattering lengths.
REFGEN - With calls to GENLIM, OP1, SORT then SMTRY2 generates indices, sorts, and
checks for symmetry related equivalents. References MULT to determine reflection
multiplicities. Stores phase number and reflection indices in IREFS(n), multiplicity in MLT(n),
width, position, Lorentz polarisation factor, and (if applicable) shape parameter in
REFS(n,1)....REFS(n,4), respectively.
RTMT - This subroutine works out and stores the operations of the space group. The operations
are packed into IVEC. The subroutine calls SYMOPR, which in tum calls CEL000 and OPERTR.
ASSIGN Examines the pattern point by point, and determines which are the contributing reflections at
th
each point The serial numbers of the first and last reflections contributing at the i point are
stored in KR(i). Note that the program calls ASSIGN only once, so the identification of contri-
buting reflections is only as good as the input values of zero, lattice parameters, line widths, etc.
will allow. Calls SORT in the two phase case.
ITER This subroutine controls the iterative solution of the least squares equations, and the cycle by
cycle output of results. Calls subroutines CALCUL SUMMAT, DPINV, CHISQ and OUTPTR.
CALCUL - Calculates, for each reflection, the square of the structure factor, and the derivatives
of this quantity with respect to the parameters on which it depends. Also calculates elements of
derivatives with respect to profile parameters. The derivatives are stored in DERSTO.
SUMMAT - This performs a calculation of intensity at each point in the pattern. It makes use of
squared structure factors from CALCUL and peak shape information through a call to function
PROFIL. Calculates derivatives using information passed from CALCUL in DERSTO, and
PROFIL. Adds contribution from each point to the vector VX (cf dR/dx of equation (36)) and the
matrix RJAC (M of equation (35))
PROFIL- Calculates normalised peak shape functions and returns these with relevant derivatives
to SUMMAT. Calls PVOIT in the evaluation of pseudo-Voigts, and WERF1 (which in turn calls
the Harwell subroutine FC01A) in the evaluation of Voigt functions. Ancillary functions are
called for determination of the gaussian and Lorentzian widths.
DPINV - Inverts matrix RJAC, and returns shifts (cf ∆xm equation (36)) in VX.
CHISQ - Evaluates residual (equation (34)) and other measures of fit (equations (41) - (45)).
OUTPTR - Applies shifts to obtain new parameters after each cycle. and their standard devia-
tions. Provides output after each cycle of refinement Calls DIRECT which calls ESD which calls
ERROR.
EXPUT This subroutine completes calculations and controls output after the final cycle of refinement It
evaluates the 'observed' integrated intensities, and the Bragg RB, as defined in equation (43).
This subroutine provides output as requested, which may include a new input file and plots. Calls
REWRIT and CALPLT.
REWRIT - This operates (if requested) to provide a new input file incorporating the final parame-
ter.
BLOCK This is a tabulation of scattering lengths and scattering factors, including anomalous dispersion
DATA coefficients (for X-rays). The neutron scattering lengths and X-ray scattering factors are from the
International Tables for X-ray Crystallography [1995], Vol.C, p384-391 and 500-502, respectively
and for O2- from Hovestreydt [1983].
Parameters are stored internally in arrays XL(I,J), GLB(I), and PAR(l,J). XL contains the data for the atoms.
The first index scans the atoms; the second, scans the parameters for the atom. GLB contains those parameters
that apply to all phases, i.e. zero-point, background and wavelength (or diffractometer constant). PAR contains
such parameters as scale factor, lattice constants, peak width/shape parameters, and preferred orientation
parameters, which are phase dependent. The first index (I) scans the phases, the second (J) scans the parameter
number.
The parameters are mapped to the elements of the normal matrix by user codewords entered for each
parameter. A zero codeword means that the parameter is not being refined. For each refined parameter, the code-
word is formed as:
sign(A) (10P + |A|)
where P is the parameter position in the matrix and A is the factor by which the computed shift will be multiplied
before use. As an example, assume that there is a wish to vary the x,y,z coordinates of an atom yet keep y = x/2.
The codewords may be set as x: 31.00, y. 30.50, z: 41.00; then x and y will be assigned to the third normal matrix
element and z to the fourth. Also, 1.00 times the shift in the third parameter will be applied to x, and 0.50 times
this shift to y. The full shift in the fourth parameter will be applied to z. Parameter positions for the three types of
parameters are stored in the arrays LP(I.J), LGLB(I), LPAR(I,J), and the required shifts stored in A(l,J), AGLB(I)
and APAR(I,J). The shifts are also multiplied by a relaxation factor before being applied to the parameters. The
user may supply four different relaxation factors which apply to four different classes of parameters.
The distribution tape contains a minimum of 9 files, although the precise number of may vary depending on
the version. All these files are written in ASCII code. The files are as follows:
1 LNEW12CON.FOR Program
2 LNEW13.FOR Core subroutines and functions
3 DISTANG.FOR Subroutine for angle/distance calculations
4 NSYMSUB.FOR Subroutines SPGP, RTMT, SYMOPR, OPERTR, OP1, SMTRY2, CELL000
5 BLOKDATA.FOR BLOCK DATA
6 PROFILE.FOR Subroutines PROFIL, VHALF (+ others)
7 PROFASYM.FOR Subroutines PROFVAL for the Finger,Cox, Jephcoat asymmetry
8 DATAREAD.FOR Subroutines DATAREAD, READFORM, READFREE
9 CORRECT.FOR Subroutines ABSCAT, ALSCAT, EXTCW,EXTTOF (+others)
10 BACKGND.FOR Subroutines BACFN, BACKDER,READBCK
11 BONDGEN.FOR Subroutines for bonds and bond valences
12 MISC.FOR Subroutines ESD, ERROR, DPINV
3.5 Notes on Compilation
The program was compiled at the Lucas Heights Research Laboratories with MS-Powerstation Fortran v4.0 or
Digital Fortran 6.0. The following remarks may be of assistance:
(a) The source code is divided into several files. These may be merged at the beginning or compiled
separately for subsequent combination at the link-edit step.
(b) The bit manipulation routines IAND, IOR, IEOR which are invoked by subroutines in the INPTR group are
FORTRAN 77 extensions which may not be recognised by every compiler (eg early versions). If these are
unrecognised, the relevant bit manipulation functions will have to be added locally.
(c) The function NARG (gets number of command line arguments) and the subroutine GETARG (returns the
argument value) may not be implemented on all machines. These can be removed with little effort and no loss in
functionality. The Unix code needs this feature removed.
(d) The memory allocation routines may need to be changed depending on the compiler, as these are
FORTRAN 90 operations.
The program applies to either X-ray or neutron diffraction patterns. It allows the refinement of the structures of
multiple phases simultaneously, and it accommodates data recorded at one or two wavelengths. Multiple x-ray
and/or neutron histograms (datasets) can be used in the refinement. Currently it is not applicable in the case of
magnetic neutron scattering.
Refinement of the structure can proceed if the following input information is supplied:
(i) a set of step scan data in equal 2θ or time increments,
(ii) 2θ/TOF limits and step width,
(iii) values for the radiation wavelengths (or diffractometer constants) and their intensity ratio (if required),
(iv) initial values for structural and profile parameters,
(v) 2θ/TOF zero and type of background (measured, interpolated, or refined),
(vi) space group symbol of each phase,
(vii) chemical symbol (and valence state in the case of X-ray data) of each atom, if accessing the set of stored
scattering factors or scattering lengths,
(viii) profile shape function, anisotropic vector, and distance from peak centre for intensity cut-off in units of Hk,
(ix) preferred orientation vector and asymmetry parameter for each phase,
(x) refinement termination control (either number of cycles or parameter shift test),
(xi) damping (relaxation) factors for the shifts applied to four different types of parameters, and
(xii) output controls (the full output can be lengthy).
The space group symbol input under (vi) above takes a form identical to that used in the International Tables
for X-ray Crystallography: no symmetry cards are required. Note, however, that since every atom is permuted
through all of the symmetry operations of the general position, the site occupancy input to the program for each
atom must be reduced by an appropriate factor if the atom occupies a special position in the unit cell.
Neutron scattering lengths and X-ray scattering factors can be accessed from the program's data blocks by the
use of a standard chemical symbol (see note (vii) above). For non-standard X-ray values the program permits the
scattering data to be input with the usual 9-parameter function, or as pairs of scattering factor and sin2θ values.
For neutrons, the scattering length can also be input separately.
Parameters that can be adjusted simultaneously in the least-squares refinement include the following:
(i) zero parameter
(ii) background function (up to 6 parameters),
(iii) unit cell dimensions (up to 6 parameters for each phase),
(iv) overall scale and overall isotropic thermal vibration parameters for each phase,
(v) atomic coordinates, thermal vibration (isotropic or anisotropic) and site occupancy parameters for each
phase,
(vi) preferred orientation parameter,
(vii) profile shape parameters for each phase (up to 4 for the 2θ-variable pseudo-Voigt option, and up to 3 for
the Pearson Vll option; in the case of the Voigt function, the peak shape is determined by the width
parameters),
(viii) peak half-width parameters for each phase (up to 4 for the pseudo-Voigt and Pearson Vll functions, and up
to 5 for the Voigt function), and
(ix) anisotropic peak shape (gaussian contribution only)
(x) wavelength or diffractometer constant
(xi) histogram scale factors (except for the first histogram)
(xii) peak asymmetry parameter for each phase.
Note that only the 2θ and background parameters apply 'globally’ to the entire pattern.
A typical set of parameter values is given below. Depending on the problem these can be changed and the
program recompiled.
Histograms 5 MAXDS
Phases 8 NUPH
Wavelengths 2
Observations (steps) 16000 IDSZ
Atoms (total from all phases) 200 NATS
Reflections (total from both wavelengths) 4000 IRS
Allowed parameters in least-squares 250 MSZ
Reflections contributing to a given step intensity 500 NIPOI
Excluded regions 30 MAXEXCL
Scattering sets 30 MAXFF
Background points for interpolation 30 MAXBK
Scattering factor pairs: sinθ/λ, f 50 MFCO
The number of observations, reflections, atoms, refinable parameters and contributing reflections to a given
step can be changed globally by changing the following lines in PARAM.INC:
PARAMETER (IDSZ=16000,IRS=4000)
PARAMETER (NATS=200,NIPOI=500,NUPH=8)
PARAMETER (MAXIPAR = 26, MAXIGL = 16, MAXEXCL = 30, MAXBK = 30)
PARAMETER (MAXDS=5, MAXGP = MAXIGL*MAXDS, MAXAP = MAXIPAR*MAXDS)
PARAMETER (MSZ=100,MSZM = MAXAP)
PARAMETER (MAXFF = 16, MFCO = 50)
The number of data points and the number of reflections per phase can also be changed via environment
variables. This is particularly useful if you want to perform refinements with multiple histograms, but still conserve
computer memory. For DOS/Windows systems these can be set on the command line using:
There are currently several different types of data formats that can be read. Each type have several options
that allow some flexibility in the reading of the file. They are:
Line 2+: the remainder of the file consists of the step-scan profile data in (10(I2, I6)), (10(I1, I7)) or 10F8
format where the first field contains the number of detectors contributing to the mean count given
in the second field; the first field may be left blank for single counter data.
Line 2+: the following lines contain the data in the format (2θ/TOF,Iobs) or (2θ/TOF,Iobs, wi). The data is
read in free format. THMIN and THMAX are found from the first and last 2θ/TOF in the file, and
STEP calculated assuming a constant step. If no wi is read it is calculated assuming absolute Ii,
i.e. wi = 1/Ii.
Line 2: specifies the start, step and number of steps in GSAS format: ‘BANK 1…..ESD/STD’
Line 3+: the remainder of the file consists of the step-scan profile data. Depending on whether the file is a
‘ESD” or ‘STD’ type GSAS file the program will read in either a 5(2F8) format where the first field
contains the counts and the second field gives the standard deviation of the counts, or 10(I2,I6) as
previously defined in 1), respectively.
The ‘ESD’ format can be useful for variable time counting if the counts are renormalised to a constant
scale.
7.2 Unit 5: Control Variables and Structure and Profile Parameters
An asterisk (*) before a line number indicates that the line's existence depends on the value of a control variable.
A hash (#) means this line is repeated for each histogram.
2. Histogram control line. There is a line for each histogram. The first line
determines the number of histograms in JOBTYP.
∑B
m=−1
m (2θ)
m
RMIN - minimum radius for bond/angle calculations and bond valence calc’s
RMAX -maximum radius for bond/angle calculations (if zero no bonds
calculated)
VMARQT – set value or starting value for the Marquardt algorithm.
4.2 * # 9F8 If TOF data or calculation is selected these values are the incident spectrum
values A0..A9 in the expression:
IncSpec = A0 + A1exp(− A2 / TOF 2 ) / TOF 5 + A3 exp(− A4 TOF 2 ) +
A5 exp(− A6 TOF 3 ) + A7 exp(− A8 TOF 4 )
If already incident spectrum corrected (e.g. ISIS data) then set A0 = 1.0,
A1…A8=0.0
*5.1 # 6(free format) THMIN, STEP, THMAX - start, step and finishing angles/TOF of next histogram
HSCAL, CHSCAL - histogram scaling factor and codeword. The histogram
scaling factor is relative to histogram 1, i.e. histogram 1 has a scaling
factor of 1.0 and other histograms are relative to this.
CW – codeword for wavelength or DIFC of histogram
CDIFA - codeword for DIFA of histogram (0.0 for CW)
Note: Since this line is read as free format - EVERY number must be present.
*6. (#) 2F8 If NBCKGD > 2 for a histogram, then there are NBCKGD lines: (if more than
one histogram then NBCKGD(NDS) lines follow one after another)
POS – position in 2θ/TOF
BCK – background intensity at this position
*7. (#) (2F8) If NEXCRG > 0 for a histogram, then there are NEXCRG lines:
ALOW - low angle bound } in degrees 2θ or TOF
AHIGH - high angle bound }
*8. (#) If NSCAT >0 for a histogram, then there are NSCAT sets of lines:
*8.1 (A4,4F8) NAM – symbol identifying this scattering set
DFP - ∆f’, or neutron scattering length
DFPP - ∆f’’ (ignored in the neutron case)
CDFP - codeword for ∆f’
CDFFP - codeword for ∆f’’
*8.2 (F8,8F9) In the X-ray case (only), either one line of the form A1 B1 A2 B2 A3 B3 A4 B4 C,
the coefficients for the analytic approximation to f, or a set of lines of the form
POSI, SCAT, where
POSI = sin(θ)/λ }
SCAT = f } max number of pairs = 28 (MAXCO-2)
The set is terminated by a line with -100 in the first position. If the first form is
desired, A2 must not be zero.
10.1 # 5(2F8),/5(2F8) ZER – zero point for 2θ (in degrees) or TOF (in µs)
FLGZER - codeword for zero point
If there is more than one histogram the zeros and codewords continue
on the same line. When there is more than 5, 10,... histograms the
values and codewords continue on the next line(s).
*10.2 (#) If NBCKGD < 0, there is a line pair for each histogram:
If IBCK = 1 then the following lines continue for another line i.e. (6F12,/,6F12)
(6F12) or BACK – background coefficients Bm in the expression
(6F12,/,6F12) n
y ib = ∑B
m=−1
m (2θ)m
m = 6 or 12 depending on the IBCK flag.
(6F12) or FBACK - codewords for background parameters
(6F12,/,6F12)
11. NPHASE sets of lines:
11.2 # (I2,2X,I2,2X, N – number of atoms (when N = 0 the phase will be refined using the Le Bail
3F4,8X,3F4) intensity extraction method)
Z – number of formula units per unit cell (only required for Quantitative Analysis
when molar percentages are needed)
PREF- preferred orientation direction expressed as three decimal Miller Indices
ANISO- anisotropic peak broadening direction expressed as three decimal
Miller Indices (when all zero the anisotropic profile functions are not
used and the values and codewords are not used)
11.3 (20A1) SYMB - space group symbol in Hermann-Mauguin notation (International Tables
for X-ray Crystallography) e.g.
P21 2121 = P 21 21 21
P3bar = P -3
P63/m = P 63/M
Short forms of the space group symbol and non-standard settings may be
acceptable. It is advisable to print and check the symmetry operators,
particularly for those space groups for which alternative origins are shown.
(this is the total peak FWHM for NPROF = 1, 2, 4 but only the Gaussian
component width for NPROF = 3, 5), φ is the angle between reflection hkl and
ANISO (Ua used only when the values of ANISO are non-zero)
or
σ0, σ1, σ2, σanis - coefficients in the expression for peak FWHM for NPROF = 7:
2 2 4 2 2
Hk = (σ0 + σ1 d + σ2 d + σanis d cos φ)
* 11.6.b (4F8) For TOF peak shape NPROF = 7, the following line is read:
ALPHA0 } used to calculate α = α0 + α1/d
ALPHA1 }
BETA0 ] used to calculate β = β0 + β1/d4
BETA1 ]
where αk is the acute angle between the scattering vector and the
normal to the crystallites (platey habit)
R – absorption R value used in calculating µR. For flat plate this is P0.
AS1 – asymmetry parameter (for either Rietveld or peak-sum model)
(not used in TOF peak shapes). This is S/L in NPROF=6.
AS2 – asymmetry parameter D/L in the Finger, Cox and Jephcoat method
(NPROF = 6). Not used in other profile functions.
11.9 (4F8) Peak shape function parameters: either
(after # 1) γ1, γ2, γ3 in the expression
γ = γ1 + γ2 2θ + γ3 (2θ)2
(NPROF = 1,2,4,6),
or
Ksec, the parameter related to particle size broadening in the Lorentzian
component of the Voigt function (for NPROF = 3,5)
(Lorentzian terms currently not used in NPROF = 7)
Ktan, the Lorentzian strain broadening term (for NPROF = 3,5)
* 11.10 (2F8) POR, ROU - if ABSTYPE=1, the flat plate absorption values, POR and ROU
(# after 1) are read. They represent the porosity and roughness of the sample.
11.11 N line pairs (these, and lines 11.11 - 11.15 are not required for calculated
patterns: JOBTYP=2,3,5):
(5F8) Cx Cy,Cz - codewords for fractional atomic coordinates
CB – codeword for isotropic temperature factor
CON – codeword for site occupation fraction
(6F8) Cβ11, Cβ22, Cβ33, Cβ12, Cβ13, Cβ23 - codewords for anisotropic temperature
factors
11.12 (F8,8X,F8) CS – codeword for phase scale factor (not to be confused with histogram scale)
CQ – codeword for overall isotropic temperature factor
11.13 (4F8) CU,CV,CW, CUa - codewords for peak FWHM parameters of each histogram
(after # 1) Or
Cσ0, Cσ1, Cσ2, Cσanis - codewords for TOF peak FWHM
11.13.b (4F8) CA0, CA1, CB0, CB1 - codewords for alpha and beta terms in the TOF peak
(after # 1) profile NPROF = 7
11.14 (6F8) CA, CB, CC, CD, CE, CF - codewords for the coefficients defined by
1/d2 = Ah2 + Bk2 + Cl2 + Dkl + Ehl + Fhk
(these coefficients are related to the cell constants)
11.15 (3F8) CP1 – codeword for the preferred orientation parameters of each histogram
(after # 1)
CR – codeword for the absorption R value for each histogram
CAS1 – codeword for the asymmetry parameter for each histogram
(AS cannot be released for Rietveld asymmetry if RLIM is lower than
the position of the first reflection). This is S/L for NPROF=6.
CAS2 – codeword for asymmetry parameter D/L in NPROF=6.
11.16 (4F8) Cγ1, (or CKs), Cγ2,(or CKt) Cγ3 - codewords for the peak shape function
(after # 1) parameters for each histogram (CKs, CKt are only necessary in the case of
NPROF = 3,5; Cγ3 should not be released for NPROF=2)
CEXT - Codeword for Extinction Parameter
11.17 (2F8) CPOR, CROU - codewords for the flat plate absorption correction, porosity and
(after # 1) roughness (read only if ABSTYPE =1)
Depending of the IPL1 value the following types of files are produced:
IPL2 = 2: Plot File consisting of yobs, ycalc, IREFS, and REFS. This format historically originated from the
ILL (Grenoble) and is typically called the ILL plot file. The programs JPLOT and LHPMPlot plot
this file. The source and executable of JPLOT are included with this package. Currently it only
runs on the IBM-PC, Vax/VMS and Alpha/VMS computers, but is modular so that only one
subroutine needs changing to adapt it to other computers. The program LHPMPlot runs under
Windows 95.
IPL2 = 3: A file consisting of 2θ/TOF, normalised yobs, ycalc, ydiff values and the 2θ/TOF positions of the
reflections. Typically this is used as input into a plotting package for publication plots. (eg.
KalediaGraph™ and Origin™, Axum™, SigmaPlot™ or Excel™)
IPL2 = 4: A file consisting of 2θ/TOF, yobs, ycalc, ydiff and the 2θ/TOF positions of the reflections. Typically
this is used as input into a plotting package for publication plots. (eg. KalediaGraph™ and
Origin™, etc)
Bond and bond valence calculations are output in this file. A summary of each phase is also printed.
The distance and angle calculations are output in this file. The correlation matrix is used in these calculations.
IFOUR = 1: The observed Fourier file is written as h, k, l, F2obs, σF2obs, and has the symmetry operators and
cell dimensions printed at the beginning of the file.
IFOUR = 2: The file is written as h, k, l, F2obs, σ(F2obs) and can be used in Shelxs type programs.
IFOUR = 3: The Fourier file is written as h, k, l, F2obs, phase.
IFOUR = 4: The Fourier file is written as h, k, l, F2calc, phase.
IFOUR = 5: The Fourier file is written as h, k, l, Fobs, Fcalc. (for pattersons)
IFOUR = 6: EXTRA/Sirpow format (3I4,2F15.4) of hkl, FWHM, F2obs. For Sirpow 92+.
8. HINTS
Due to the complexity of the Rietveld method, several helpful suggestions and cautionary notes are given to
help the beginning/intermediate user.
The program can read in 2 types of file: a fixed format and a free format. Problems typically arise when the
data is read in the wrong format. Typically neutron data does not need the high angular positional option
(LSYN=1) and so the header in the data file can be read easily using 3F8. Neutron data usually has many
detectors contributing to each count, so data read as 10(I2,I6) is the most popular (NFMT = 0), or the GSAS
format (NFMT=3) For synchrotron data the starting, step and finishing angles may need more significant figures
than 3F8 allows. Using the LSYN=1 option these values are read in free format (hence a space must separate the
values, unlike 3F8 where no space is required), but the input file must also be changed (line 5), so that the angles
are read in correctly. The Data is typically read as 10I8 (NFMT = 2).
If in doubt then the program can read data using a free listed format, where each line consists of angle(or
TOF), intensity and weighting (the weighting is optionally). This is the surest way of reading the data, but the files
are somewhat larger. Remember to put a header line or the first line will not be read and or will not know the
beginning of the next dataset in the file.
Several freeware packages are available for converting from one format to another. These are helpful when
combining different datasets for a combined refinement.
Problems when reading free format occur when comma or tabs are used as separators; spaces are the only
allowed form of separator.
Problems arise in fixed format when the number of points does not match the header line expectations. Make
sure that the number of points is accurately input.
8.2 The Input File
The first JOBTYP line determines the number of histograms the program will process. For each additional
histogram you want to refine you add 10 to the JOBTYP value of the first line (only). For example, if you want to
refine 2 Histrograms in total, then JOBTYP of the first line (second in the file) will be 10 (because there is 1
additional histogram to refine)+ whatever JOBTYP value the first histogram will be, say 0 for x-ray data
refinement. The next JOBTYP line (the next line in the file) will only have the JOBTYP of the second histogram,
say 1 for neutron data refinement.
When there is more than one histogram, parameter values for each histogram are read directly after one
another before going onto new values. For example, the scattering set data for a second histogram is read
directly after the first histogram scattering set, before it starts to read in any other variables.
8.2.2 Wavelength/DIFC
To refine the wavelength or DIFC, the peaks must generally be already very close to the Bragg markers. If
not, it is likely that the values will not converge. A simple check calculation (say with just the background refining)
is a simple way of telling.
8.2.3 Time-of-Flight
Time-of-flight data is given in microseconds, and so starting/ending values are typically in the range 5000 to
100000, depending on the instrument. It is not wise to refine the alpha, beta, DIFA and zero values in samples
other than calibration samples, as these are instrumental. Some institutes, such as ISIS, correct data for the
incident spectrum; in these cases set A0 =1.0 and A1..A9 = 0.0 on line 4.2.
For anomalous scattering experiments, ∆f’ needs to be implicitly input. The values of f’ and f’’ can be obtained
using a program such as FPRIME. It is not wise to refine the ∆f’’ in phases with centrosymetric space groups.
8.2.5 Background
For normal backgrounds the simple polynomial, option 0, with two or three varying parameters is adequate. If
the background tails upwards at low angles, then B-1 may be needed. For an amorphous background, the new
function, option -1, may be useful. If the amorphous component is known, then fixed R values are best. It may be
necessary to include more R values than the default (two) allows. This is achieved with the IBCK=1 option.
An amorphous x-ray background will not be described well by the amorphous function. This is due to the
angular dependence of the x-ray form factors not being included in the calculations.
The summation over equivalents, Flag IPREF=1 on line 3, is highly recommended for high symmetry space
groups. For high symmetry space groups, such as cubic, this summation is essential to obtaining a good fit. For
orthorhombic and lower symmetry it is not required, but it does not affect the result if it is on.
The peak shape, apart from the structural values, are the most difficult parameters to refine. For lab x-rays, in
particular, the peak shape is hard to model well.
If the FCJ asymmetry function is used (NPROF=6), then the two values should not be refined simultaneously,
altghough by using the Marquardt algorithm a stable refinement is possible. A good approach is to initially have
these two parameters at zero, and only when the refinement has somewhat converged, release them individually.
They can sometimes be constrained together, such as in neutron diffraction where these values are measurable,
and have a fixed ratio.
9. ACKNOWLEDGEMENTS
The authors are grateful to Dr R. A. Young for providing copies of the Wiles and Young program (versions
DBW2.9 and DBW3.2) from which program LHPM has been developed, and for his advice in subsequent
correspondence. The authors also thank Dr M. M. Elcombe and Dr S.J. Kennedy for frequent helpful contributions
to the program development
10. REFERENCES
1 H. M. Rietveld, J. Appl. Crystallogr. 2, 65 (1969).
2 H. M. Rietveld, Acta Crystallogr. 22, 151 (1967).
3 A. K. Cheetham and J. C. Taylor, J. Solid State Chem. 21, 253 (1977).
4 A. Albinati and B. T. M. Willis, J. Appl. Crystallogr. 15, 361 (1982).
5 J. C. Taylor, Aust. J. Phys. 38, 519 (1985).
6 A. W. Hewat, (ILL, Grenoble, 1973).
7 R. B. Von Dreele, J. D. Jorgensen, and C. G. Winsdor, J. Appl. Cryst. 15, 581 (1982).
8 G. Malmros and J. O. Thomas, J. Appl. Crystallogr. 10, 7 (1977).
9 C. P. Khattak and D. E. Cox, J. Appl. Crystallogr. 10, 405 (1977).
10 G. S. Pawley, G. A. Mackenzie, and O. W. Dietrich, Acta Crystallogr. A 33, 142 (1977).
11 C. Baerlocher, in Proc. Int. Conf. on Zeolites (Butterworths, London, Reno, 1993).
12 A. C. Larson and R. B. Von Dreele, in LAUR 86-748, 1986).
13 D. B. Wiles and R. A. Young, J. Appl. Crystallogr. 14, 149 (1981).
14 R. J. Hill and C. J. Howard, J. Appl. Cryst. 18, 173 (1985).
15 R. J. Hill, Am. Mineral. 69, 937 (1984).
16 G. Caglioti, A. Paoletti, and F. P. Ricci, Nucl. Instrum. 3, 223 (1958).
17 C. J. Howard, J. Appl. Cryst. 15, 615 (1982).
18 T. M. Sabine, B. A. Hunter, W. R. Sabine, et al., submitted (1997).
19 H. Hermann and M. Ermrich, Acta Cryst. A43, 401 (1987).
20 W. A. Dollase, J. Appl. Crystallogr. 19, 267 (1986).
21 C. W. J. Dwiggins, Acta Cryst. A28, 219 (1973).
22 T. M. Sabine, Acta Cryst. A44, 368 (1988).
23 R. J. Hill and C. J. Howard, J. Appl. Cryst. 20, 467 (1987).