Copyright: C. J. Howard, B. A. Hunter, D. A. J. Swinkels
Citation: Help file prepared by Dom Swinkels


Rietica Rietveld Analysis

Rietica is a Rietveld structure refinement program in Windows 95 format. It is basically a Windows 95 front end to the FORTRAN 77 program known as LHPM, which is available for a number of different computer operating systems. The LHPM Manual therefore is a major part of this Help file.

Rietica for Windows 95 basically creates the text input file (xxx.inp), which controls the structure refinement in a powerful Windows interface.

The Rietica interface is described with frequent reference to the LHPM manual.


The Rietica Interface

When Rietica is first opened you are presented with the following main navigation window.

From here you access all parts of the program using either the menu structure or the buttons on the toolbar.

Rietica requires an input file (xxx.inp) and at least one data file (xxx.dat) to be available before refinement can start. The input file and one or more data files make up a project (xxx.rit). Until these files are available the Model menu and a number of the buttons are greyed out.

To open a new project select the Project menu followed by New or use the New Project button.

In most cases you will be working on an existing project so the next step would be to select the Project menu or the Open Project button and to open the desired project.

Several sample files are included to get started, for example, there is a neutron diffraction pattern (Caf2org.dat) of a mixture of two phases, calcium fluoride and metallic iron. The input control file is Caf2org.inp.

On opening a project the main navigation window becomes fully active as shown below:

Three methods are available for controlling the actual refinement process. They are the completely windows based Refine interface, a Manual Edit interface and a Rietveld Basic interface.

For further details click on the buttons in the above image or select a menu command below:

Data Analysis
Edit
File
Help
Information
Model
Plot Window
Project
Rietveld


File

The File Menu has the following sub-menu commands:

New Input	New Input creates a blank input file, that is, a file with the extension xxx.inp containing some default data. The format requirements of the input file are descibed in the manual.
Open File	Open File opens an existing input or data file.
Save	Save saves the current file using the current name to the current directory.
Save As	Save As saves the current file but allows you to change the name of the file or the directory in which it is saved.
Close	Closes the current file.
Options	Options takes you to another window, in which the default directory for the atoms.db, phases.db and the instruments.db files are kept.
Print	Print will print the current input file or plot.
Print Preview  Page Setup	Print Preview and Page Setup have their usual meanings.
Exit	Exit exits the Rietica software. Any files not saved will be lost.
The New Input, Open File, Save, Close, Print and Page Setup commands can also be accessed from the following tool bar buttons:


Edit

The Edit menu contains the usual Cut, Copy and Paste commands.

These are also available from the button bar

and have the usual meanings.


Project

The Project commands control Rietica projects.

New - will create a new project. It opens the New Project window using default names for the input and data files.

Change the Title, INPUT and DATA files to suit your project. It is good practice to use the same name for the three types of files: project (xxx.rit), input (xxx.inp) and data (xxx.dat) files .

To create the Caf2org.rit project using the sample Caf2org.inp and Caf2org.dat files supplied enter the correct locations for these files in the INPUT and DATA fields using the full path, such as for example D:/rietica/caf2org.inp. Then save the file as Caf2org.rit.

The VAR entries can also be filled in with any useful values or comments. These variables are not used elsewhere yet. Note that a right mouse button click allows runs to be added or deleted.

The remaining project menu commands are

Open	Opens a window in which an existing project can be selected.
Edit	Opens the Edit Project window where the current project can be edited.
Close	Closes the current project.
The New, Open, Edit and Close project commands are also available from the button bar


Model

The Model menu and its submenus and associated windows make up the main working areas of Rietica. This is where you select various refinement options and set the starting values for the parameters to be refined.

It has the following sub-menu commands:

Constraints
General
Histograms
Phases
Sample

These can also be accessed from the Model buttons:

 The symbols from left to right represent the

General, Histograms, Phases, Sample and Constraints windows.


General

The Main command opens a window, where general details about the refinement process and its outputs are set. The CaF2 example is shown below:

Select the options to be used by ticking the small square boxes or by selecting one of the radio buttons and fill in the values as required.


Phases

Information on the phases to be included in the refinement is given in this window. There are two phases in the sample file Caf2org.dat. The details of the CaF2 phase are shown below.

Ticks in the small squares indicate the parameters to be refined during the next refinement cycle.

To add or remove atoms in a Phase Window click the right mouse button to bring up the floating popup window.


Histograms

Information on the type and number of data histograms e.g. XRD or neutron diffraction spectra in the refinement is given in this window. The data in this window are mainly instrument related but include the format of the background to be fitted. Details relating to the Caf2org.dat histogram are shown below:

Ticks or crosses in the small boxes indicate the parameters to be refined in the next cycle.


Sample

Details such as peak shape, preferred orientation and absorption or extinction corrections relating to the sample are entered here.

The values to be refined are selected by ticks in the small square boxes.


Constraints

The constraints window summarises the parameters to be refined as set by ticks in the small boxes next to the various parameter values in the other refinement windows. Any constraints in the refinement are also entered here. The settings for the Caf2org.rit project are shown below:

To add constraints simply drag parameters from the upper Global, Phase and Sample windows into the lower contraints windows and enter the value, with which any change in the first parameter in the left window must be multiplied before it is applied to the second parameter in the right window. This value is often equal to 1 as in the example above because several parameters must change by the same amount. For the Caf2org example the U, V and W values for both phases in Histogram 1 are restrained to be changed equally.


Rietveld

The Rietveld menu command has three sub-commands:

Refine

Manual Edit

Rietveld Basic

These commands are also accessed from left to right by the following buttons:


Refine

The Rietveld Refine option controls and monitors the final refinement process in three windows. The main refinement window is shown below for the Caf2org.rit example:

Start	Push Start to start the refinement.
Step	Step through the refinement by pushing Step.
Finish	To Finish refinement push the Finish button. At this stage all output and update files are written to disk.
Update	Check the Update box to automatically update the current input file to the new refined values when the refinement is finished. For this to function the Update File box on the General window must also be checked.
Dynamic plotting	Check the Dynamic plotting button to see the refinement plot updated as the refinement progresses.
Watch Values	Check the Watch Values button to monitor the parameters being refined as refinement progresses.
The Watch Values window shows the current value and the estimated error of all parameters being refined as shown below for the Caf2org.rit project:


Manual Edit

The Manual Edit command opens a window in which the xxx.inp file, which controls the LHPM refinement program, can be edited manually, following the format requirements as detailed in the relevant section of the LHPM Manual.

This method of refinement behaves much like the original DOS version of LHPM. This is the mode of use, which reasonably expert users will find attractive because all changes can be made in a single window. Progress of the refinement can be monitored via the criteria of fit at the bottom of the screen as seen below:

This refinement option also allows a Dynamic Plot window to be open (select Process, Plot from the menu) but the Watch Values window is not available. The refinement is started (select Process, Refine) and can be stopped at the end of any cycle (select Process, Stop). Refinement can also be started or stopped using the Start or Stop buttons shown below:

At the end the input file can be updated (select Process, Update) to replace the xxx.inp file with one containing the new refined values. The various output files are also written to the current directory.


Rietveld Basic

Rietveld Basic is the most powerful form of controlling a large number of refinements since this Basic language allows many refinements to be set up with various controls to run unattended. Progress of the refinement is shown in the bottom window and the results are saved to disk under program control. A sample Rietveld Basic program is included with the software (Rietbasic.rib) and the Rietveld Basic language is described in some detail in Rietbasic.doc.

The Rietveld Basic Window is shown below:

Note that you may have to change the current directory definition in the sample Basic program to suit the location of your files Output files for each of the refinements can be written to the current directory for future use.


Information

The information menu basically provides input and output information.

Phase Info
View Input	Shows the xxx.inp file
View Output	Shows the xxx.out file, which contains all the numerical output values selected in the Main window. xxx.out is of course only fully available after refinement.
View Bonds	Shows the xxx.dst file containing details of all the bonds in the fitted structure. The bonds listed here are limited by the Min/Max values set on the General Window.
Plot Fourier	Shows the Fourier plot if one was selected in the General window.
Plot Refinement	Shows the Refinement plot if one was selected in the General Window.


Data Analysis

These features have not yet been implemented.

Radial Distribution	Fourier inverts the data to give a RDF or Pair DF.
Peak Fitting	Simple Peak Fitting of the data.
Peak Deconvolution	Deconvolution of overlapping peaks.


Help

Help Topics accesses this Help file.

Show Hints results in short hints being displayed for a few seconds when the cursor is placed over a button.


Plot Window

The progress of the refinement can be monitored graphically during refinement in the Refine and Manual Edit modes and when refinement is finished the plot can be modified as required for record or publication purposes. A sample Plot Window is shown below:

The chart can be extensively edited, printed, copied or saved as a bitmap (xxx.bmp).

The editing facilities are illustrated below:


Definitions

A number of short definitions and explanations of terms used on the Rietica windows are collected here.

Asymmetry Limit
Correlation Matrix
F^2 Limit
Input Step Intensities
Integrated Intensities
Line Printer Plot
Merged Reflection List
Obs. & Calc. Intensities
Output File Options
Properties
Reflection List
Relaxation Factors
Symmetry Operators
Termination


Output File Options

The output file options are entered on the General window. The options include Plot file and Fourier outputs (select one of 4 options for each) and a list of 8 outputs, which can be included in the text format output file.


Obs. & Calc. Intensities

When this output option in the General window is ticked the text output file will contain a listing of all observed and calculated intensities.


Integrated Intensities

When this output option in the General window is ticked the text output file will contain a listing of the integrated peak intensities.


Line Printer Plot

When this output option in the General window is ticked the text output file will contain a plot of the observed, calculated and difference intensities in line printer format. This option is no longer useful since superior graphic plots are available.


Reflection List

When this output option in the General window is ticked, the text output file will contain a list of all reflections in the fitted range. For each reflection hkl values, multiplicity, half width and position of the peak are given. If more than one phase is present these are listed separately for each phase. See also Merged Reflection List.


Correlation Matrix

When this output option in the General window is ticked the text output file will contain a matrix of correlation values for all the parameters fitted.


Input Step Intensities

When this output option in the General window is ticked the text output file will contain a listing of the observed intensity, calculated background intensity and the weight at each input step.


Merged Reflection List

When this output option in the General window is ticked, the text output file will contain a merged list of all reflections in the fitted range. For each reflection the source phase, hkl values, multiplicity, half width and position of the peak are given.


Symmetry Operators

When this output option in the General window is ticked, the text output file will contain a list of all the symmetry operators, which apply to this structure.


Properties

In the Properties box in the General window, four relaxation factors applied to the calculated change in the parameters may be entered. The Asymmetry Limit, F^2 Limit and a Termination factor are also entered here.


Relaxation Factors

Relaxation factors (General window) set the fraction of the calculated change to parameters actually applied before the next cycle. Small relaxation factors (say 0.3) slow down the convergence but avoid overshoot, oscillation or divergence.


Asymmetry Limit

This value sets a limit to the Rietveld asymmetry correction when used.

Normally leave this value equal to zero, which means this limit is ignored.


F^2 Limit

This may be used to ignore very small peaks when a large number of peaks is being fitted. Normally leave this value equal to zero, which means this limit is ignored.


Termination

The value set here causes the refinement to finish automatically when the last change in all the parameters is less than the fraction of the SD set here. A value of 0.10 is often used so that refinement stops when the change in all parameters is less than 10% of the SD for each parameter.


Undo, Redo

This facility has not been implemented yet.


Update File

Tick the Update File box on the General window to write a temporary update file (xxx.upd) to disk at the end of the refinement. This file goes to the C:/Temp/ directory and has the filename testclass.upd. If the Update Values box on the Refine window is also checked then the xxx.upd file is also copied to replace the previous xxx.inp file in the current directory.


LHPM Manual

AUSTRALIAN NUCLEAR SCIENCE AND TECHNOLOGY ORGANIZATION

LUCAS HEIGHTS RESEARCH LABORATORIES

A COMPUTER PROGRAM FOR RIETVELD ANALYSIS

OF X-RAY AND NEUTRON

POWDER DIFFRACTION PATTERNS

By C.J. HOWARD and B.A. HUNTER

FEBUARY 1997

Lucas Heights Research Laboratories

Private Mailbag 1

MENAI  2234

N.S.W.,  AUSTRALIA


Abstract

This manual gives detailed instructions for the Rietveld analysis computer program LHPM. The program is based on a program from D. B. Wiles and R. A. Young (Program DBW3.2, School of Physics and Engineering Experimental Station, Atlanta, Georgia 30332, USA.) but incorporates improvements which make it significantly different. Extensions to the program allow refinements of multiple X-ray and/or neutron data sets. A brief account of the Rietveld method and its implementation, and a program description are included.


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 which 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 is also being 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.  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 (specifically for the neutron diffractometer) by [Howard,1982].

•	Inclusion of a term of the form (2θ)-1 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 data file consisting of rows of 2θ, Intensity (and optionally weight(Intensity))

•	Multiple x-ray and/or neutron histograms (data sets) 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

•	Α anisotropic Gaussian peak broadening for all peak shape types

•	Ability to refine wavelength

•	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 on [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 (Jorgensen Peak Shape)

The LHPM program has been run successfully on the following computers Silicon Graphics, IBM-PC compatible’s, VAX-VMS, DEC-Station and DEC-Alpha’s.

This manual documents version 5.0 of our computer program for the Rietveld analysis of X-ray and neutron powder diffraction patterns.


The Method and its Implementation

The basis of the Rietveld method [Rietveld,1969, Rietveld,1967] is the equation

      (1)

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.

The intensity Ik is given by the expression

      (2)

where S is the scale factor, Mk is the multiplicity, Lk is the Lorentz-polarisation factor, and Fk is the structure factor,

      (3)

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

       (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 [image]  and [image] , the second wavelength is automatically tied to the first so that [image]  is constant.  The ratio of the intensities for two possible wavelengths is absorbed in the calculation of [image] , so that only a single scale factor for each phase is required. This ratio is not a refinable parameter.

Further details are in the following sections:

Absorption Correction

Background

Extinction Correction

Least Squares

Peak Shape Functions

Preferred Orientation

Quantitative Phase Analysis

Thermal Parameters


Peak Shape Functions

The peak profile function Gjk can be chosen from the following options:

(a) Pseudo-Voigt

      (5)

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

Pearson VlI

      (6)

where C2 = 21/γ -1 and Γ denotes the gamma function.

(c) Voigt

      (7)

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.

(d) Jorgensen (TOF)

      (8)

where α = α0 + α1/d, β = β0 + β1/d4, d is the d-spacing value, u = 0.5 α ( α σ2 + 2 Xi ), v = 0.5 β ( β σ2 - 2 Xi ), y = ( α σ2 + Xi )/(2σ), z = ( β σ2 - Xi )/(2σ), Xjk = (TOFi - TOFk)/Hk, σ is related to the FWHM of the contributing Gaussian by HGk = σ (8 ln2)1/2.

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

      (9)

where γ1, γ2 and γ3 are refinable parameters (γ3 is not operational for the Pearson Vll function).

For both of these profile types, the variation of the peak FWHM is defined by the function described by [Caglioti, et al.,1958]:

      (10)

where U, V and W are refinable parameters. The U parameter can have an additional (hkl) dependent term, Uanis, defined as Uanis = Uacos2φ, 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 (10), but the width of the Lorentzian component varies with sec(θ) and tan(θ):

      (11)

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 (10).

For the TOF profile function, the widths are governed by a Gaussian component of the form:

      (12)

where d is the d spacing.  The σ1 term is related to strain broadening, the σ2 term to particle size broadening and σ3 is an anisotropic strain term. The Lorentzian components, HLk have a similar form,

      (13)

Following [Rietveld,1969] all three CW profile functions can be corrected for peak asymmetry using the semi-empirical function

      (14)

where AS is a parameter to be determined.

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.


Preferred Orientation

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]

      (15)

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 reflection.  This ability can be turned on and off using a flag.


Absorption Correction

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:

      (16)

where μR is the product of the radius of the cylindrical sample and its linear absorption coefficient. The functions AB and AL are the Bragg and Laue absorption terms as calculated analytically by [Dwiggins,1973].

For flat plate geometry, where absorption from weak surface roughness is a significant factor, the expressions of [Hermann and Ermrich,1987] are used:

      (17)

where P0 is the bulk term, while Ps is a θ dependent term and is a function of the packing density, α0, and the degree of roughness, τ.  The parameters P0, α0 and τ are refinable, although P0 can be highly correlated to the scale factor.

For TOF neutron data the absorption is corrected using

      (18)

where μR is refinable.


Extinction Correction

Extinction for constant wavelength is corrected using the [Sabine,1988] extinction correction,

      (19)

where k is the reflection and EB and EL are the extinction at the Bragg (θ=90) and the Laue (θ=0) conditions respectively.  These are given by,

      (20)

and

      (21)

where x = D.(λ.Fk/V)2, D = mosaic block size, λ = wavelength, Fk = structure factor of reflection k and V = volume of unit cell.


Background

The background yib may be obtained in one of five ways:

(i) by measurement in an independent data collection run without the sample in place (data on input unit 2),

(ii) by estimation at several positions where no peaks appear to contribute and by linear interpolation for the points in between,

(iii) by refinement of the polynomial function

      (22)

where Bm is one of six refinable parameters,

(iv) by refinement using a type I or II Chebyshev polynomial function (shifted or non-shifted)

      (23)

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

      (24)

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

Quantitative phase analysis can be preformed 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.  The weight fraction of phase p can then be derived as

      (25)

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:


Thermal Parameters

The thermal parameter in equation (3) for atom j is given by,

      (26)

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 this equation takes the form

      (27)

where <u>’s are the square of the thermal displacements (Å2), and a*, b*, c* are the reciprocal lattice constants.  Similarly for isotropic thermal parameters we have,

      (28)

and for ITHER = 1,

      (29)

where Q = 4πsin(θ)/λ.


Least Squares

The least-squares procedure uses the Newton-Raphson algorithm to minimise the quantity

      (30)

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 Hk of the centre of the Bragg peak position 2θk, where n is usually a number between 1.5 (for Gaussian peaks) and 7.0 (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

      (31)

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

      (32)

where M-1 is the inverse of the matrix M.

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 values of the parameter esd's, σm, are calculated from the expression:

      (33)

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,

      (34)

where n is the number of detectors contributing to the step intensity average and either weighting scheme may be selected. However, for the situation in which the background Yib is measured independently in a 'no-sample' experiment:

      (35)

The quantities used to estimate the agreement between the observations and the model during the course of the refinement are as follows:

(i) The profile [image]      (36)

(ii) The weighted profile [image]      (37)

(iii) The Bragg [image]      (38)

where Iko is the 'observed' integrated intensity of reflection k calculated at the end of the refinement after apportioning each yio between the contributing peaks (and background when that is refined) according to the calculated intensities Ikc.

(iv) The expected [image]      (39)

(v) The goodness of fit [image]      (40)

(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

      (41)

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

      (42)

and P is the number of least-squares parameters being estimated.


The Program

The program is described in some detail in the following sections:

Availability

Description

Distribution Tape

Notes on Compilation

Parameters and Codewords


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 various anonymous ftp sites, including:

atom.ansto.gov.au/pub/physics/neutron/rietveld/(computer-type)

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.


Description

The program is written in FORTRAN 77, although no major changes (if any) are needed to compile using FORTRAN 66. 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 each point The serial numbers of the first and last reflections contributing at the ith point are stored in KR(i). Note that the program calls ASSIGN only once, so the identification of contributing 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 (32)) and the matrix RJAC (M of equation (31))
	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 (32)) in VX.
	CHISQ - Evaluates residual (equation (30)) and other measures of fit (equations (36), (37)).
	OUTPTR - Applies shifts to obtain new parameters after each cycle. and their standard deviations. 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 (38). 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 parameter.
BLOCK DATA	This is a tabulation of scattering lengths and scattering factors, including anomalous dispersion 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 and Codewords

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 which apply to both 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 scans the phases.

The parameters are mapped to the elements of the normal matrix by user codewords which are entered for each parameter. A zero codeword means that the parameter is not being refined. For each refined parameter, the codeword 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.


Distribution Tape

The distribution tape contains 9 files. All these files are written in ASCII code. The files are as follows:

File	Name	Contents
1	LHPM.FOR	Program MAIN
2	NSYMSUB.FOR	Subroutines SPGP, RTMT, SYMOPR, OPERTR, OP1, SMTRY2, CELL000
3	BLOKDATA.FOR	BLOCK DATA
4	PROFILE.FOR	Subroutines PROFIL, VHALF (+ others)
5	DATAREAD.FOR	Subroutines DATAREAD, READFORM, READFREE
6	CORRECT.FOR	Subroutines ABSCAT, ALSCAT, EXTCW,EXTTOF (+others)
7	BACKGND.FOR	Subroutines BACFN, BACKDER,READBCK
8	BONDGEN.FOR	Subroutines BONDGEN, MATMULT
9	MISC.FOR	Subroutines ESD, ERROR, DPINV
10	CaF2 DATA	Neutron data from a CaF2/Fe phase mixture
11	CaF2 INPUT	Input parameters for CaF2/Fe
12	CaF2 0UTPUT	Output expected from test


Notes on Compilation

The program was compiled at the Lucas Heights Research Laboratories with the Powerstation Fortran v4.0. The following remarks may be of assistance:

(a)	The source code is divided into 9 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 VS FORTRAN and VAX library functions which may not be recognised by every compiler. 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 no loss in functionality.  The Unix code needs this feature removed.


Operation of the Program

The program applies to either X-ray or neutron diffraction patterns. It allows the refinement of the structures of two 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

(xii) - peak asymmetry parameter for each phase.

Note that only the 2θ and background parameters apply 'globally’ to the entire pattern.


Maximum Parameter Values

The maximum number of values for a number of parameters are listed below:

Histograms	5	MAXDS
Phases	6	NUPH
Wavelengths	2
Observations (steps)	16000	IDSZ
Atoms (total from all phases)	200	NATS
Reflections (total from both wavelengths)	4000	IRS
Parameters in least-squares	250	MSZ
Reflections contributing to a given step intensity	500	NIPOI
Excluded regions	30	MAXEXCL
Input scattering sets	30	MAXFF
Background points for interpolation	30	MAXBK
Scattering factor pairs: sinθ/λ, f	50	MFCO
The number of steps, 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=5000,NATS=200,NIPOI=500,NUPH=6)

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)


Input and Output Files - Overview

Unit 2:	Contains the background profile data obtained in a 'no sample' experiment - otherwise unused. Data in format 10(12,16), 10(l1,17) OR 10I8. The experimental conditions used to collect the background pattern are assumed to be identical to those used for the sample
Unit 4:	Contains the observed step-scan data for refinement of the structure and profile (see below). Also used when calculating powder patterns - although the filename is changed automatically so that any real data is not overwritten.
Unit 5:	Contains the control variables and the crystal structural and profile parameters (see below). If requested, the information is updated to unit 8 at the end of a refinement.
Unit 6:	This is the main output unit. It contains all the control variables and starting parameters for the unambiguous reconstruction of a run, together with the results of each cycle of refinement and various other optional details (see below).
Unit 7:	Contains a summary of the agreement indices at the completion of each cycle. Normally assigned to the terminal when the program is run interactively.
Unit 8:	Contains the input control variables and the updated crystal structure and profile parameters from a completed refinement run.
Unit 9:	Contains the plot information for plotting, including the observed and calculated patterns, zero, positions and (hkl) for each peak and wavelength.
Unit 10:	Contains the generate bond distances and errors if requested
Unit 20:	Contains the 'observed' and calculated structure factors and other information (from phase 1 and wavelength 1) necessary for Fourier analysis or Shelx input.
Further details are given in the next section.


Input and Output Files - Details

Further details are given in the following sections:

Unit 4: Observed Stepscan Data

Unit 5: Control Variables and Structure and Profile Parameters

Unit 6: Main Output File

Unit 9: Plot File Output

Unit 10: Bond Distance Output File

Unit 20: Fourier Output File


Unit 4: Observed Stepscan Data

There are currently 2 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:

1) data file consisting of:

Line 1: contains the variables THMIN, STEP and THMAX in (3F8) or (*) format:

THMIN - starting angle for pattern in degrees 2θ or TOF (μs)

STEP - step size in degrees 2θ or TOF (μs)

THMAX - finishing angle in degrees 2θ or TOF (μs)

The remaining space on this line may be used for sample identification.

Line 2+: the remainder of the file consists of the step-scan profile data in (10(I2, I6)), (10(I1, I7)) or 10I8 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.

2) The second data format is:

Line 1: - a sample identification line

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.


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.

Line	Format	Description
1.	(A80)	TITLE - any 80 characters to be used to label the printout.
2.		Histogram control line.  There is a line for each histogram. The first line determines the number of histograms in JOBTYP.
2.1 #	(7I4)	JOBTYP 0 - X-ray data, CW 1 - neutron data (nuclear scattering only), CW 2 - pattern calculation, CW X-ray 3 - pattern calculation, CW neutron 4 - TOF neutron data 5 - pattern calculation, TOF neutron + (number of histograms - 1)*10 (first line only) (eg. 31 = 4 histograms, the first of which is neutron data).
		NPROF - profile shape function 1 - pseudo-Voigt  2 - Pearson VlI 3 - Voigt 1, 2 and 3 may be modified by the [Rietveld,1969] asymmetry correction, if required 4 - pseudo-Voigt  5 - Voigt  4 and 5 may be modified by a sum of five peaks asymmetry correction if required 7 - Jorgensen TOF
		NPHASE - number of phases (not used in lines NDS > 1)
		NBCKGD - background correction -2 - -5 - background to be refined in the form where Tm is aType I Chebychev Polynomial, shifted Type I, Type II or shifted Type II for -2, -3, -4 and -5 respectively -1 - background to be refined in the form 0 - background to be refined in the form 1 - background to be read from unit 2 2 ... up to ... MAXBK - background to be determined by interpolation between this number of points (maximum = MAXBK)
		NEXCRG - number of excluded regions (maximum = MAXEXCL) in histogram
		NSCAT - number of scattering sets used in histogram (these scattering sets needed only for those scatterers not included in the scattering factor table) (max = MAXFF)
		IWT- weighting scheme of histogram 0 - weight = 1/y(obs) 1 - weight = 1/y(calc) (after first cycle)
3.	17I1,3X,2F8	Output control flags - 0 = off, 1 = on: 1. IOT- observed and calculated step intensities 2. IPL - line printer plot 3. IPC - integrated intensities and Bragg R 4. MAT- correlation matrix 5. NXT - generate new input file on unit 8 6. LST1 - reflection list 7. LST2 - input step intensity data list 8. LST3 - merged reflection list for all the phases 9. IPL1 - symmetry operators 10. IPL2 - offline plot data on unit 9 0 = No plot file 1 = General File for Kalediagraph, Origin, Axum, Excel etc. 2 = ILL format output (JPLOT format) 3 = Normalised (2θ, Y(meas), Y(calc), Y(diff)) (RPLOT format) 4 = (2θ, Y(meas), Y(calc), Y(diff)) 11. IFOUR-Fourier coefficients on unit 20 0 = No file 1 = Observed/Calculated Fourier (3I8, 2F8) of hkl, sin(Fobs), cos(Fobs),... 2 = Shelx format (3I8, 2F8) of hkl, Fobs, σ(Fobs)
		12. NFMT -format of data file(s) 0 = format option 10(12,16) (default) 1 = format option 10(I1,I7) 2 = format option 10I8 4 = format (2θ, Iobs, wobs) or (t, Iobs, wobs) 5 = format (2θ, Iobs) or (t, Iobs) 6 = format (Iobs)
		13. LSYN - THMIN,STEP,THMAX read as F12 (default is F8) 14. LMR -read histograms from separate data files (default is for the histograms to be read from one file) 15. DSBB 0 = Debye-Scherrer 1 = Flat Plate/Bragg Bretanno (used for absorption selection) 16. IBCK 0 = 6 Background terms read/used in series expressions (eqs. 17-19) 1 = 12 background terms read/used in series expressions 17. IPREF 0 = March/Dollase Preferred Orientation Function 1 = Summed March/Dollase Preferred Orientation Function  18. ITHER 0 = refine thermal parameters as Bis and β’s 1 = refine thermal parameters as U2’s RMIN - minimum radius for bond calculations RMAX - maximum radius for bond calculations (if zero no bonds calculated)
4.1#	(9F8)	LAMDA(1) LAMDA(2) wavelengths in angstrom (smallest first) or DIFC DIFA TOF instrument constants in [image].
		RATIO - intensity ratio LAMDA(2) : LAMDA(1) (in TOF can put detector θ)
		WEIDS - histogram weighting factor (if 0.0 then automatically becomes 1.0)
		WDT -  width (range) of calculated profile (in units of Hk) beyond which it is set  to zero
		CTHM - coefficient in formula for polarisation correction when using a  monochromator: (ignored for neutron data)
		TMV- value of  μ, where μ = linear absorption coefficient
		RLIM - peaks below this angle corrected for asymmetry using the [Rietveld,1969] model (ignored for NPROF = 4 and 5, which correct at all angles in the pattern) (the first RLIM is used for all histograms) FFMIN- peaks less than this value are not included in the fit (in terms of |F|2)
4.2*#	9F8	If TOF data or calculation is selected these values are the incident spectrum values A0..A9 in the expression:
5.	(I4,5F4,3F8)	NCYCLE - number of least-squares cycles
		EPS - run terminates when all parameter shifts are less than EPS*esd
		RELAX(1) - relaxation factors for parameter shifts: coordinates, isotropic temperature factors, site occupancies
		RELAX(2) - anisotropic temperature factors
		RELAX(3) - scale factors, 2θ/TOF zero point, background parameters, unit cell, preferred orientation, overall temperature factor
		RELAX(4) - peak FWHM, asymmetry, shape
		THMIN STEP THMAX in degrees 2θ or μs (TOF) These angles are required only for pattern calculation modes(JOBTYP = 2,3,5), but if present for other modes, these values take priority over  those present on unit 4, and may be used to consider subsets of points in the observed pattern
		CW - codeword for wavelength or DIFC (for histogram 1) CDIFA - codeword for DIFA (for histogram 1) (0.0 for CW)
5.1 #	6(free format)	THMIN, STEP, THMAX - start, step and finishing angles/μs 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)
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 degrees 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 μs
		AHIGH - high angle bound in degrees 2θ or μs
*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 POSI, SCAT 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.
9.	I8	MAXS - number of parameters varied
10.		Global parameters:
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 (6F12,/,6F12)	BACK - background coefficients Bm in the expression m = 6 or 12 depending on the IBCK flag.
	(6F12) or (6F12,/,6F12)	FBACK - codewords for background parameters
11.		NPHASE sets of lines:
11.1	(A80)	PHSNM - name of phase
11.2 #	(2I4,4X,3F4,8X,3F4)	N - number of atoms 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 21 21 = 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.
11.4		N line pairs:
	(2A4,8X,5F8)	LABEL - identification characters for atom
		NTYP - link to scattering data for atom: either NAM from line 8.1, or chemical symbol and valence to access internal table of values
		x,y,z- fractional atomic coordinates
		B - isotropic temperature factor (or U depending on ITHER flag)
		ON - site occupation fraction (related to site multiplicity)
	(6F8)	β11, β22, β33, β12, β13, β23 - anisotropic temperature factors (or <U>2’s depending on ITHER flag)
11.5	(G12,4X,F8)	S - scale factor
		Q - overall isotropic temperature factor
11.6 (after # 1)	(4F8)	U,V,W,Ua - coefficients in the expression for peak FWHM: (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:
11.6b*	(4F8)	For TOF peak shape NPROF = 7, the following line is read: ALPHA0 ALPHA1 used to calculate α = α0 + α1/d BETA0  BETA1 used to calculate β = β0 + β1/d4
11.7	(6F8)	a,b,c - cell dimensions in angstroms
		α, β, γ - cell interaxial angles in degrees
11.8 (after # 1)	(3F8)	P1- preferred orientation parameters in the expression: 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.
		AS - asymmetry parameter (for either Rietveld or peak-sum model) (not used in TOF peak shapes).
11.9 (after # 1)	(4F8)	Peak shape function parameters: either  γ1, γ2, γ3 in the expression  (or NPROF = 1,2,4),  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) EXT - extinction parameter
11.10	(2F8)	POR, ROU -  if IDSBB=1, the flat plate absorption values, POR and ROU 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 (after # 1)	(4F8)	CU,CV,CW, CUa - codewords for peak FWHM parameters of each histogram  or Cσ0, Cσ1, Cσ2, Cσanis - codewords for TOF peak FWHM
11.12a*	(4F8)	CA0, CA1, CB0, CB1 - codewords for alpha and beta terms in the TOF peak 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 (after # 1)	(3F8)	CP1 - codeword for the preferred orientation parameters of each histogram
		CR - codeword for the absorption R value for each histogram
		CAS - 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)
11.16	(4F8)	Cγ1, (or CKs), Cγ2,(or CKt) Cγ3 - codewords for the peak shape function 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 roughness


Unit 6: Main Output File

The output at the end of a run includes the following:

(i) - a complete identification of the refinement conditions, starting parameters and subject

(ii) - symmetry operators for the general position of the space group,

(iii) - a reflection list for each phase (separate and merged),

(iv)  - the input and background-corrected profile data list with wi values and range of contributing reflections to each step intensity

(v) - the final values, shifts and esd's of all parameters after each cycle of refinement

(vi) - a list of all agreement indices after each cycle, the R-factors being expressed as percentages

(vii) - the average intensity difference for the profile, taken in blocks of 20 steps

(viii) - the correlation matrix,

(ix) - the 'observed' and calculated integrated Bragg intensities together with their estimated standard deviations, and the derived Bragg R-factor expressed in per cent

(x) - the observed and calculated individual step intensities, and

(xi) - a line printer or off-line plot of the observed, calculated and difference profiles, together with reflection position markers.

All but (i) and (v)-(vii) of these output features are optional.


Unit 9: Plot File Output

Depending of the IPL1 value the following types of files are produced:

IPL1 = 0: - No plot file

IPL1 = 1: - Standard 10(I2,I6) or 10(I1,I7) file

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 (MAC) and Origin (PC) 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 (MAC) and Origin (PC))


Unit 10: Bond Distance Output File

Rudimentary bond distance calculations and errors are output in this file.  The errors are calculated using the correlation matrix.


Unit 20: Fourier Output File

Four options are available:

IFOUR = 1: - The observed Fourier file is written as h, k, l, sin(F), cos(F).  This can be used in Fourier plotting

IFOUR = 2: - The file is written as h, k, l, F^2, sigma(F^2) and can be used in Shelxs type programs.

IFOUR = 3: - The calculated Fourier file is written as h, k, l, sin(F), cos(F).

IFOUR = 4:  - The difference Fourier file is written as h, k, l, sin(F), cos(F).


Hints

Due to the complexity of the Rietveld method, several helpful suggestions and cautionary notes are given to help the beginning/intermediate user in relation to the Data and Input files.


The Data File

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 (LSYNC=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).  For synchrotron data the starting, step and finishing angles may need more significant figures than 3F8 allows.  Using the LSYNC=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 in 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 can optionally be not read).  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.


The Input File

Below is a list of the more common problems:

Background

Multiple Histrograms

Peak Shape

Preferred Orientation

Scattering Factors

Time-of-Flight

Wavelength/DIFC


Multiple Histrograms

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.


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.


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 pure instrumental.  Some institutes correct there data for the incident spectrum.  In these cases set A0 =1.0, A1..A9 = 0.0 on line 4.2.


Scattering Factors

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.


Background

For normal backgrounds the simple polynomial, option 0, with 2 - 3 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 allows (2).  This is achieved with the ITHER=1 option.


Preferred Orientation

The summation over equivalents, Flag IPREF=1 on line 3, is highly recommended.  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 to have it on.


Peak Shape

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 not modelled well by the current peak shapes.


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.


References

Albinati and Willis 1982
Baerlocher 1993
Caglioti et. al. 1958
Cheetham and Taylor 1977
Dollase 1986
Dwiggins 1973
Hermann and Ermrich 1987
Hewat 1973
Hill 1984
Hill and Howard 1985
Hill and Howard 1987
Howard 1982
Khattak and Cox 1977
Larson and Von Dreele 1986
Malmros and Thomas 1977
Pawley et. al. 1977
Rietveld 1967
Rietveld 1969
Sabine 1988
Sabine et. al. 1997
Taylor 1985
Von Dreele et. al. 1982
Wiles and Young 1981


Rietveld 1969

H. M. Rietveld, J. Appl. Crystallogr. 2, 65 (1969).


Rietveld 1967

H. M. Rietveld, Acta Crystallogr. 22, 151 (1967).


Cheetham and Taylor 1977

A. K. Cheetham and J. C. Taylor, J. Solid State Chem. 21, 253 (1977).


Albinati and Willis 1982

A. Albinati and B. T. M. Willis, J. Appl. Crystallogr. 15, 361 (1982).


Taylor 1985

J. C. Taylor, Aust. J. Phys. 38, 519 (1985).


Hewat 1973

A. W. Hewat,  (ILL, Grenoble, 1973).


Von Dreele et. al. 1982

R. B. Von Dreele, J. D. Jorgensen, and C. G. Winsdor, J. Appl. Cryst. 15, 581 (1982).


Malmros and Thomas 1977

G. Malmros and J. O. Thomas, J. Appl. Crystallogr. 10, 7 (1977).


Khattak and Cox 1977

C. P. Khattak and D. E. Cox, J. Appl. Crystallogr. 10, 405 (1977).


Pawley et. al. 1977

G. S. Pawley, G. A. Mackenzie, and O. W. Dietrich, Acta Crystallogr. A33, 142 (1977).


Baerlocher 1993

C. Baerlocher, in Proc. Int. Conf. on Zeolites (Butterworths, London, Reno, 1993).


Larson and Von Dreele 1986

C. Larson and R. B. Von Dreele, in LAUR 86-748, 1986).


Wiles and Young 1981

D. B. Wiles and R. A. Young, J. Appl. Crystallogr. 14, 149 (1981).


Hill and Howard 1985

R. J. Hill and C. J. Howard, J. Appl. Cryst. 18, 173 (1985).


Hill 1984

R. J. Hill, Am. Mineral. 69, 937 (1984).


Caglioti et. al. 1958

G. Caglioti, A. Paoletti, and F. P. Ricci, Nucl. Instrum. 3, 223 (1958).


Howard 1982

C. J. Howard, J. Appl. Cryst. 15, 615 (1982).


Sabine et. al. 1997

T. M. Sabine, B. A. Hunter, W. R. Sabine, et al., submitted  (1997).


Hermann and Ermrich 1987

H. Hermann and M. Ermrich, Acta Cryst. A43, 401 (1987).


Dollase 1986

W. A. Dollase, J. Appl. Crystallogr. 19, 267 (1986).


Dwiggins 1973

C. W. J. Dwiggins, Acta Cryst. A28, 219 (1973).


Sabine 1988

T. M. Sabine, Acta Cryst. A44, 368 (1988).


Hill and Howard 1987

R. J. Hill and C. J. Howard, J. Appl. Cryst. 20, 467 (1987).