\documentstyle[a4,12pt]{article}\pagestyle{plain}\textwidth 15cm\topmargin -2.0cm\oddsidemargin 0.5cm\textheight 24cm\pagenumbering{arabic}\raggedbottom\begin{document}\parindent 0cm\parskip 6pt\vspace*{6.0cm}\begin{center}{\Large \bf PROFIL Version 5.17}\vspace{0.5cm}27$^{th}$ November 1994\vspace{0.5cm}{\large Jeremy Karl Cockcroft}\vspace{0.5cm}{\large \em Department of Crystallography, Birkbeck College,\\Malet Street, London WC1E 7HX, United Kingdom.}\vspace{1.0cm}{\small Manual printed on \today}\end{center}\newpage{\bf Historical Note}{\tt PROFIL} is an entirely new Rietveld program. Many other versions ofthe Rietveld program are simply modifications to earlier versions of theoriginal code. This version, written in a simple subset of the Fortran-77language, is not based on any of the earlier codes.The original version (1.0) was scratch written in order torefine parameters not available in the then current Rietveld programs. Theearly algorithms closely followed the traditional Rietveld approach ofa data preparation ({\tt PREPRO}) followed by adata refinement ({\tt PROFIL}) stage.Subsequent developments reduced the data preparation stage to zero calculationleaving the calculation of the peak positions and widths to the main refinementprogram. With the introduction of multiphase refinement in version 4.0,important modifications to the basic algorithms were made. In particular, theprinciple of dynamic peak-width allocation was introduced which allows intenseor broad peaks with d-spacings at higher 2$\theta$ angles to be calculated aheadof those weaker peaks at lower 2$\theta$.With the introduction of this version, several important changes have beenmade. The most important change has been the revision of the code toproduce a machine independent version. Currently, the program works oncomputers running either the VMS or Unix operating systems.As a result, the keyworded input, first introduced in version 3.0,has been extended.In addition, the introduction of refinable parameters has been easier withthe automatic generation of refinement codewords. Further, the program nowallows for the simultaneous refinement of both X-ray and neutron radiation datasets. The suite of programs based around {\tt PROFIL} 5.0 now use a newstandard format for the powder data files.Another changes include furtherchecks concerning symmetry and the option of LeBail style patterndecomposition. The earlier version already deduced the space groupand its number from the symmetry operators (irrespective of setting). Thisversion also checks that the codewords for the atomic coordinates andanistropic temperature factors are compatible with the site symmetryof the atoms. (Also, it does not rely on the atom being placed on the firstspecial positions listed in the International Tables since the method used isdeductive.) This should result in fewer singular matrices due to incorrectcodewords.{\bf Introduction}This manual is divided into four parts: The first part containsgeneral information on the suite of programs available.The second partcontains a description of the parameter file used by {\tt PROFIL}.The third part outlines how to set up the files and carry out a Rietveldrefinement. The fourth part contains technical information concerning{\tt PROFIL}. The final part contains information on how to use {\tt PROFIL}for pattern decomposition.The {\tt PROFIL} suite of programs comprises the following programsand are available for computers operating under VMS or Unix.\hangindent 1.5cmData conversion programs:\\{\tt SUMSPF} Converts ILL D1A/D2B data to {\tt .SPF} files.\\{\tt PDSSPF} Converts Daresbury PDS data to {\tt .SPF} files.\\{\tt RAWSPF} Converts Siemens D500 data to {\tt .SPF} files.\\{\tt F1BSPF} Converts ILL D1B data to {\tt .SPF} files.\\{\tt OUTFIT} Converts {\tt PROFIL.OUT} files to {\tt .FIT} files.\\{\tt SPFSUM} Converts {\tt .SPF} files to ILL D1A/D2B data files.\\{\tt FITOUT} Converts {\tt .FIT} files to {\tt PROFIL.OUT} files.\hangindent 1.5cmData manipulation programs:\\{\tt DIRSPF} Lists the header block of multidata set {\tt .SPF} files.\\{\tt EDISPF} Cuts large multidata set into smaller multidata set.\\{\tt SPFADD} Adds multiple data set together to give single data set.\hangindent 1.5cmData plotting programs:\\{\tt PLOT86} Interactive $XY$ plotting program (N.B. by Andy Murray).\\{\tt XYPLOT} Produces PostScript plots of {\tt .SPF}, {\tt .PRE},             and {\tt .FIT} files.\\{\tt XYZPLT} Produces 3-D pictures from multidata set files.\hangindent 1.5cmData preparation and fitting programs:\\{\tt PREPAR} Prepares {\tt .PRE} files from {\tt .SPF} files.\\{\tt PREPRO} Generates binary data file.\\{\tt PROFIL} Main Rietveld program.\hangindent 1.5cmOther useful programs:\\{\tt REFCEL} Refines wavelength or unit cell parameters.\\{\tt DRAGON} Generates {\em h~k~l} from space group and cell parameters.\\{\tt BONDLA} Standalone program to calculate bond lengths and angles.\\{\tt JACKAL} Ball \$ stick / Space filling structure plotting program.The general use of the programs is outlined below. The four latter programs havetheir own manuals and their use is only mentioned briefly in this one.Many of the programs are simple interactive programs with little need fordocumentation other than that described below.{\bf Data conversion programs}\hangindent 1.5cm{\tt SUMSPF}, {\tt PDSSPF}, {\tt RAWSPF}, and {\tt F1BSPF}\\These programs convert diffractometer data from various sources to thestandard powder format ({\tt .SPF}) adopted by the {\tt PROFIL}suite of programs. {\tt OUTFIT} converts the old style observed and calculateddata files {\tt .OUT} to the new format files.An example of the format of the {\tt .SPF}files is as follows:{\footnotesize \tt \begin{verbatim}CFCl3 ground in liquid N2 and run in 16mm vanadium sample can       1       1       1    3020       1    5.0000  155.9500    0.0500  2.990000  0.000000     500.0      10.0     20:59:58 20-JUN-89  23266  23302 NEUTRON      D1A     1.500     1.520     1.570     0.000     0.000     0.000     0.000     0.000   5.000     24     26     27     28     32     35     40     48     53     61           1.26   1.32   1.34   1.37   1.46   1.53   1.63   1.79   1.88   2.02   5.500     70     77     88     97    103    115    124    134    144    147           2.16   2.27   2.42   2.54   2.62   2.77   2.88   2.99   3.10   3.13   6.000    156    158    170    180    181    188    195    198    207    209           3.22   3.25   3.37   3.46   3.47   3.54   3.61   3.63   3.71   3.73   6.500    213    215    219    223    228    234    230    232    232    226           3.77   3.79   3.82   3.86   3.90   3.95   3.92   3.93   3.93   3.88   .......\end{verbatim}}The first line contains the title (A80). The second line contains the totalnumber of data sets in the file, the format version (currently 1),and the individual data set number (3I8).The third line containscontains the number of data points in the powder pattern, the data file type,the $2\theta$ angles of the first and last points and the step size in degrees,followed by the nominal wavelength(s), $\lambda_{(1)}$ (and $\lambda_2$)(2I8, 3F10.4, 2F10.6). The data filetype has the value 1, 2, or 3 to indicate that the file is observed data only({\tt .SPF} file),observed and calculated data from {\tt PROFIL} ({\tt .FIT} file),or Rietveld input data ({\tt .PRE file}), respectively.The fourth line of the data file contains a monitor count value, a time countvalue, the time and date of the data set (or when the file was created), runidentification numbers, data type, and instrument(2F10.1, 5X, A8, 1X, A9, 2I7, 1X, A12, 1X, A6).The data type {\em must} be one of {\tt NEUTRON}, {\tt SYNCHROTRON}, or {\ttXRAY}. This information is used by the program {\tt PROFIL}.The fifth line has 10 values and typically containsadditional information on the sample such as temperature and position(e.g. $\chi$, $\omega$) values (8F10.3).The input data files for Rietveld ({\tt .PRE} files)contain extra lines before the powder diffraction data.Firstly, they contain the background as an array of ({\em x,y}) points,(2$\theta$, intensity) in order of ascending $2\theta$ value. The data is inputone point per line (F8.3, I8) and the list is terminated with anegative 2$\theta$ value, e.g. -1.0 0.There may be certain regions of the data that the user wishes to exclude fromthe refinement process. These follow the background informationin the form of lower and upper 2$\theta$ values to indicatethe range to be excluded. The list must terminate with a negative angle.Finally, the {\tt .PRE} files may contain an {\em h~k~l} input list (usuallygenerated from the program {\tt DRAGON}), the first line of which is the numberof reflections in the list (I8). Normally reflections are generated internallyby {\tt PROFIL} and this value will be zero.The next lines contain the data. Each line startswith the 2$\theta$ angle of the first data point on the line, followed by thevalues of the next 10 data points in intervals determined by the step size ofthe data set (F8.3,10I7).Each data file contains a second line containing either the erroron each data point ({\tt .SPF} and {\tt .PRE} files) (8X, 10F7.2)or the calculated value ofthe data point ({\tt .FIT} files) (8X, 10I7), again with 10 values per line.Following the powder diffraction data, the data files may also contain outputreflection and excluded region information, in a similar format to that usedby the {\tt .PRE} files as input values.Multidata set files are simply single data sets appended together,each starting with a titleand with the data set number systematically incremented throughout thewhole data file.\parindent 0cm{\bf Data plotting programs}\hangindent 1.5cm{\tt PLOT86}, {\tt XYPLOT}, {\tt XYZPLT}\\These programs are for plotting the observed (and calculated) data. {\tt PLOT86}is an older program that is used for interactive plotting on Tektronixcompatible terminals. It has the option of a cursor allowing values to be pickeddirectly off the screen and stored in a file. This program is mainly used toobtain the background of the data by graphical methods and to monitor the fit bythe Rietveld method. {\tt XYPLOT}, by contrast, is non-interactive andis written to produce high-quality $XY$ plots for publication purposes.It outputsstandard PostScript files that can be sent to most laser printers.\parindent 1.5cm\hangindent 1.5cm{\tt XYPLOT} has been rewritten to work with the new standard formatfiles used by the {\tt PROFIL} suite of programs. {\tt PLOT86} currentlyreads the old files format only. Until it is revised, two data conversionprograms, {\tt SPFSUM} and {\tt FITOUT},  are available thatconvert the {\tt .SPF} and {\tt .FIT} files to {\tt .SUM} and {\tt .OUT} files,respectively.\parindent 0cm{\bf Data preparation and fitting programs}\hangindent 1.5cm{\tt PREPAR}\\This program is used to create the Rietveld input data file from the{\tt .SPF} files and background data point files. The default file extensionof the latter is {\tt .BGR}. the program requests the number of data setsto be fitted simultaneously (usually only 1), the data file name(s), and thebackground file name(s). The range of data to be fitted is specifiedinteractively, as are any regions that are to be excluded from the fittingprocess.\hangindent 1.5cm{\tt PREPRO}\\This program reads in the data file (with default extension {\tt .PRE}) andgenerates the binary data file {\tt PROFIL.BIN} used by theRietveld program {\tt PROFIL}. The data file is normallycreated with the program {\tt PREPAR} since most ofthe powder diffraction data is fixed format. PostScript plot filesmay be generated of the {\tt *.PRE} files using the program {\tt XYPLOT}.The program basically performs syntax checks only the crystallographic data.\hangindent 1.5cm{\tt PROFIL}\\This is the main Rietveld program. It uses two files for input, namely, thebinary data file {\tt PROFIL.BIN} and the crystal refinement file.The default file name for the latter is {\tt PROFIL.PAR}, but the defaultfile extension is {\tt .PRO}, e.g. the file name {\tt SF6} will beinterpreted as {\tt SF6.PRO}. Output file generation is requested via theparameters specified in the crystal refinement file. The format of the fileis described later.{\bf Other useful programs}{\tt REFCEL}, {\tt DRAGON}, {\tt BONDLA}, and {\tt JACKAL}\\These programs supplement the {\tt PROFIL} suite of programs and arestandalone programs with their own manuals. Before fitting a powder diffractionpattern, it is often useful to be able to refine the lattice parameters from thepeak positions alone. This can be performed with the program {\tt REFCEL}. It isalso useful to check the positions of the peaks against those calculatedfrom known unit cell values (and space group). The program DRAGON generatedlists of {\em h~k~l} values for this purpose. The main Rietveld program cancalculate bond lengths and angles at the end of each refinment, but is oftenuseful to be able to calculate these values from coordinate values directly.This is done using the program {\tt BONDLA}. Finally, having fitted thestructure to the data, one needs a picture showing the arrangement of atoms ormolecules within the unit cell. {\tt JACKAL} is a non-interactive program thatgenerates PostScript files of the crystal structure that are suitable forpublication. The plot files are usually displayedfirst on workstations using PostScriptpreviewers in order to obtain the best orientation, shading, light angles etc.{\bf Contents of the {\tt PROFIL.PAR} files}The files are free format within each line and case independent. Each linestarts with a keyword and lines must be in the order given below. Variablesare usually delimited by spaces, though commas and tabs may be used.Lines starting with the keyword {\tt TEXT} are treated as comments lines.Variables are treated as either strings (A) or as integer/realnumbers (I/F). The format type is indicated after each keyword. Reals withinteger values may have the decimal point omitted, but integers are onlyaccepted without it.\parindent 0cm\hangindent 1.5cm{\large \tt TITLE} (A)\\This keyword is followed by a text string of up to 74 characters and is used toidentify the parameter file.\hangindent 1.5cm{\large \tt VERS} (F I)\\This keyword indicates the version of the refinement program and the numberof refinements used. The values are {\em output} by {\tt PROFIL}. Initial valuescan be set to zero or left blank.\hangindent 1.5cm{\large \tt NPHASE} (I)\\This keyword specifies the number of phases (originally called patterns)that are to be fitted to the data.\hangindent 1.5cm{\large \tt WGHT} (nF)\\This keyword allows the weights of different data sets to be varied. It hasthe value 1.0 for fits to single data set. For fits to multidata sets,the values of all the weights of the $y_i$ pointswithin the $n^{th}$ data setare multiplied by the $n^{th}$ specified value.If the value is zero, then the data set is ignored.\parskip 0pt\hangindent 1.5cm{\large \tt OUTP} (n(A I))\\This keyword and its sub keywords and values indicate which output filesare to be generated: The line may be left blank in which case{\tt LIS 1 PAR 1}is assumed for a normal Rietveld refinement.Since a maximum of 10 sub keywords per line is allowed,the keyword {\tt OUTP} may be repeated andfurther sub keywords given on a second line.\parindent 2.5cm\hangindent 4.1cm{\tt LIS} $n$ : If $n = 1$ then the lineprinter listing {\tt PROFIL.LIS}is generated(and in more detail if $n = -1$). By default, $n$ is set to 1.\hangindent 4.1cm{\tt PAR} $n$ : If $n = 1$ then a new parameter file{\tt PROFIL.PAR } is generated at the end of therefinement (even if {\tt NCYC 0} {\em v.i.}). If the input parameter fileis {\tt PROFIL.PAR}, then it will be renamed {\tt PROFIL.V}$nn$where $nn$ is a double digitinteger number chosen sequentially.\hangindent 4.1cm{\tt FIT} $n$ : If $n = 1$ then the program generates the data file{\tt PROFIL.FIT}that can be used to plot the observed,calculated, and difference powder diffraction patterns. The data file alsocontains information on the peak positions of each phase and excluded regions ofthe data. For the case of multidata set refinements, the file will containall the information for each data set. The file has a standard formatand may be converted to the old format using the program {\tt FITOUT}({\em v.s.}).\hangindent 4.1cm{\tt HKL} $n$ : If $n > 0$ then the data file{\tt PROFIL.HKL} of {\em h~k~l} and F$_{hkl}$ that canbe used for Fourier studies is generated.The integer $n$ specifies that values for the$n^{th}$ phase are to be output. Note that the structure factors refer to thoseused to fit the first data set only. If this is a neutron-radiation data set,then neutron-diffraction structure factors will be output.The file is keyworded starting with the title ({\tt TITLE}),followed by cell parameter information ({\tt CELL}),symmetry information ({\tt LATT} and {\tt SYMM} {\em v.i.}),and then the structure factors ({\tt HKLF}). The latter lines consist of{\em h~k~l}, F$_{hkl}$(calc), $\phi_{hkl}$ (in rad.), and F$_{hkl}$(obs).Reflections incompletely calculated or totally excluded are indicated bya $\star$.\hangindent 4.1cm{\tt INT} $n$ : If $n > 0$ then the program generates the data file{\tt PROFIL.INT} for the$n^{th}$ data set containing {\em h~k~l} and I$_{hkl}$ for all phases.Reflections incompletely calculated or totally excluded are indicated bya $\star$ and comment.\hangindent 4.1cm{\tt COR} $n$ : If $n = 1$ then the data file {\tt PROFIL.COR} isgenerated containing the full normalized variance-covariance matrix. All valuesare multiplied by 100\%.\hangindent 4.1cm{\tt TAB} $n$ : If $n = 1$ then the program generates a table of refinedparameters with esd values in () in a form suitable for publication. The tablewill contain information on each phase for multiphase refinements.For LeBail pattern decomposition, $n = 0$.\hangindent 4.1cm{\tt XYZ} $n$ : If $n > 0$ then the data file{\tt PROFIL.XYZ} is generatedcontaining the coordinates and symmetry information of the$n^{th}$ phase in a format suitable for the plotting program {\tt JACKAL}.For LeBail pattern decomposition, $n = 0$.\hangindent 4.1cm{\tt ATM} $n$ : If $n > 0$ then the program generates the data file{\tt PROFIL.ATM}containing the coordinates of {\em all} of the atoms in the unit cellof the $n^{th}$ phase.For LeBail pattern decomposition, $n = 0$.\hangindent 4.1cm{\tt BON} $n$ : If $n > 0$ then the keyworded data file{\tt PROFIL.BON} is generated which maybe used as input to the bond length and angle calculation program {\tt BONDLA}.For LeBail pattern decomposition, $n = 0$.\hangindent 4.1cm{\tt REF} $n$ : For normal Rietveld refinement, $n = 0$. For Lebail patterndecomposition set $n = 1$ to obtain a file containing {\em h~k~l} andI$_{hkl}$ that may be used for further cycles of refinement.\hangindent 4.1cm{\tt INS} $n$ : If $n = 1$ then the keyworded data file {\tt PROFIL.INS}in {\tt SHELX} format is produced. This is useful for direct method solutionsusing the {\tt SHELX} program {\tt XS}.\hangindent 4.1cm{\tt RES} $n$ : If $n > 0$ then the keyworded data file {\tt PROFIL.RES}in {\tt SHELX} format is produced. This is useful for plotting withthe {\tt SHELX} program {\tt XP}, e.g. for ellipsoid plots. It may also beused as an input file to the Cerius program by Molecular Simulations.For LeBail pattern decomposition, $n = 0$.\parindent 0cm\parskip 6pt\hangindent 1.5cm{\large \tt SHFT} (4F)\\This keyword is followed by 4 real numbers that can be used to damp therefinement process. The 4 reals (which must be in the range $0 \le x \le 1$)are set normally to 1.0. They refer to atomic coordinate parameters,atomic thermal parameters, linear parameters (e.g. scale factor,site occupation numbers), and non-linear parameters (e.g. cell parameters,wavelength).\hangindent 1.5cm{\large \tt NCYC} (I)\\This keyword and value specifies the number of cycles of refinementwhich must be in the range $0 \le n \le 99$. It is recommended to set{\tt NCYC}$ = 0$ each time a new parameter file is created by hand using aneditor as this allows syntax checks to be performed. In addition, the user cancheck that the contents of the lineprinter file are correct.The next few lines starting with {\tt WAVE} and ending with {\tt SCAT} or{\tt ANOM} must be repeated as a group for each data set that is being fitted.\hangindent 1.5cm{\large \tt WAVE} (F A [F])\\This keyword is followed by a value specifying the wavelength of the radiationthat was used to collect the data. It is followed by the sub keyword {\tt FIX}or {\tt VARY} to indicate whether the wavelength is a fixed or refinableparameter. If {\tt VARY} is specified, then it may be followed by an optionalcodeword indicating parameter number and multiplier ({\em v.i.\ }{\bf Codewords}).\hangindent 1.5cm{\large \tt ZERO} (F A [F])\\This keyword and value specifies the zero-point error in the 2$\theta$ scale ofthe diffractometer.Its value is followed by thesub keyword {\tt FIX}or {\tt VARY} to indicate whether the 2$\theta$ zero-point error is afixed or refinableparameter. If {\tt VARY} is specified, then it may be followed by an optionalcodeword.\hangindent 1.5cm{\large \tt GEOM} (A F)\\This must be followed by the keyword {\tt 2TH-M} and a value.{\tt 2TH-M} applies only to monochromnated laboratory X-ray data andallows for polarization of theincident X-ray beam when a primary monochromator is used (e.g. removal ofK$_{\alpha_2}$). The value specifiesthe monochromator 2$\theta_M$ angle in degrees and is used solelyas part of the L-P correction.If the keyword is omitted, the angle is simply set to zero.\hangindent 1.5cm{\large \tt ABSC} (3F)\\This keyword has 3 arguments. The first specifies the absorption coefficient$\mu r$ used to correct the absorption of a {\em cylindrical} sample. Thesecond specifies the diameter (2$r$) of the sample and is used only to calculatea theoretical value of the absorption coefficient (N.B.\ The secondvalues is currently unused). The third value specifies the absorptioncoefficient, $\mu d$, when a thin film is used to cover a flate plate sample.(Only one of the corrections may be used with any one data set.)\hangindent 1.5cm{\large \tt SCAT} (A F)\\The line containing this keyword should be repeated for each chemical elementin the sample. The first sub keyword is the chemical element symbole.g.\ Pb forlead. If the value that follows is left unspecified, then the programsubstitutes {\em either} the value of the neutron scattering length {\em b} forneutron radiation data {\em or} the value of {\em Z} for X-ray radiation data.In addition, and for the latter case only, the program automatically suppliesan X-ray form factor and anomalous dispersion terms $f'$ and $f''$ set to zero.If {\em Z} is non-zero, then the additional lines starting with the keywords{\tt FORM} and {\tt ANOM} must be given.\hangindent 1.5cm{\large \tt FORM} (2F)\\This keyword applies only to X-ray data and when the value of {\em Z} in{\tt SCAT} is non-zero. For each value of {\tt SCAT}, 5 lines beginning{\tt FORM} must be specified where the values a(i), b(i) on each lineare used to specify the form factor according to the equation$f(0) = \sum a_i \exp\{b_i (\sin\theta/\lambda)^2\}$.\hangindent 1.5cm{\large \tt ANOM} (2F A [2F])\\This keyword applies only to X-ray data and when the value of {\em Z} in{\tt SCAT} is non-zero. After the X-ray form factor specified by {\tt FORM},a single line is required to specify the anomalous dispersion terms$f'$ and $f''$.Their values are followed by thesub keyword {\tt FIX}or {\tt VARY} to indicate whether the dispersion terms arefixed or refinableparameters. If {\tt VARY} is specified, then 2 optionalcodewords may follow. (N.B. Currently only the {\tt FIX} option is available).The next lines starting with {\tt LATT} and ending with {\tt PEAK}(if single phase) or{\tt BOND} should be given as a group for each diffracting phase in the sample.Space group symmetry information should be given either using{\tt SPGP} or {\tt LATT} combined with {\tt SYMM}.(Non-standard settings are encouraged where appropriate but should bespecified using {\tt LATT} and {\tt SYMM} information.)\hangindent 1.5cm{\large \tt SPGP} (A [A])\\This keyword specifies the space group as given in the InternationalTables for Crystallography. An optional keyword valueis the symmetry of the origin. (N.B. This keyword is currently unavailable untilcomplete tests have been performed.) Internally, the program converts theinformation into {\tt LATT} and {\tt SYMM} type values.\hangindent 1.5cm{\large \tt LATT} (2A)\\This keyword has 2 string values giving (a) the centrosymmetricity ofthe {\em origin}(not the space group) as either {\tt C} (centric) or {\tt A} (acentric)and (b) the Bravais lattice centring as one of {\tt P} (primitive),{\tt A} (A-face centred),{\tt B} (B-face centred),{\tt C} (C-face centred),{\tt F} (all-face centred),{\tt I} (body centred), or{\tt R} (rhombohedral obverse centring with hexagonal axes).\hangindent 1.5cm{\large \tt SYMM} (A , A , A)\\This keyword is given for each line of symmetry operators. The symmetryoperator should be given in the form printed in the International Tablesfor Crystallography with the translational part of the operator in fractionalform (e.g. 0.5 is written as {\tt 1/2}). All the translational parts must be aninteger multiple of $\frac{1}{24}$.Note that it is {\em not} necessary to give {\em all} the symmetry operatorsof the space group.The program only requires sufficient operators that when multiplied togethergenerate the complete space group.{\em x},~{\em y},~{\em z} may be omitted. Ones containing latticecentrings are converted into {\tt LATT} information.\hangindent 1.5cm{\large \tt CELL} (6F)\\This keyword specifies the values of the lattice parameters {\em a},{\em b}, and {\em c} in {\AA}ngstroms and $\alpha$, $\beta$, and $\gamma$ indegrees.Following the cell information, the contents of the asymmetric unit of thecrystallographic cell are specified.This consists of lines starting with the keywords{\tt ATOM}, and then optionally {\tt TLS}. Anisotropic atomsmay have the one of the optional keywords {\tt BETA}, {\tt BIJ}, or {\tt UIJ}following the keyword {\tt ATOM}.{\large \tt ATOM} (A 5F A)\parskip 0pt\parindent 1.5cm\hangindent 3.0cmAtom label:\\The first sub keyword specifies an atom label.The atom label {\em must} followcertain conventions. It must start with the chemical symbol of thescattering element followed optionally by one or two digits. If a single digitis used, then a letter may be used in addition e.g. Na(2A). The use of bracketsaround the digit(s) (and letter) are optional and are added automatically by theprogram if omitted. The program must be able to match the chemical elementto one of those specified in the list of scatterers.When the list of scatterersdiffers between two data sets (commonly H and D), the program willattempt to match the symbol to that used for the first data set only.\hangindent 3.0cm{\em x y z}:\\The next 3 values specify the fractional {\em x},~{\em y},~{\em z}coordinates of the atom. The program will adjust the values, if necessary, sothat they lie within the range $-0.5 \le x \le 1.5$,$-0.5 \le y \le 1.5$, and $-0.5 \le z \le 1.5$.\hangindent 3.0cm{\em B}(iso):\\The next value gives the isotropic temperature factor, {\em B},which is used in the form $\exp\{-B (\sin\theta/\lambda)^2\}$.When specified thefinal sub keyword of the line should be left blank or set to one of {\tt ISO}or {\tt I->A} ({\em v.i.}).\hangindent 3.0cm{\em N}:\\This next value specifiesthe number of atoms of that type within the unit cell. In order to obtainsite occupation factors it is necessary to divide each value by $N_{xyz}$, thenumber of positions in the unit cell corresponding to the general position{\em x,~y,~z}. {\em N}, rather than {\em s.o.f},should be used so that the correct sample density is calculated.\hangindent 3.0cmB(type):\\The final sub keyword of the line is used tospecify whether an atom isto be treated as isotropic ({\tt ISO}) or anisotropic ({\tt ANISO}).If {\tt ANISO} is given, then {\em B}(iso) is forced to be zero and a furtherline must follow starting with one of the keywords{\tt BETA}, {\tt BIJ}, or {\tt UIJ} ({\em v.i.}).It may also be used to indicate whether an isotropic valueis to be converted to anisotropic ({\tt I->A}) or vice-versa ({\tt A->I}).\parskip 6pt\parindent 0cm\hangindent 1.5cm{\large \tt BETA} (6F)\\This line specifies the anisotropic temperature factor in the form given by\[\exp\{-(\beta_{11}h^2+\beta_{22}k^2+\beta_{33}l^2+2\beta_{23}kl+2\beta_{31}lh+2\beta_{12}hk)\}.\]The order of the terms $\beta_{ij}$ follows the order in the above equation.This is the form used internally by the Rietveld program but for publicationpurposes either $B_{ij}$ or $U_{ij}$ are recommended. All forms are listed inthe lineprinter file but $B_{ij}$ only is used for the output files{\tt PROFIL.PAR} and {\tt PROFIL.TAB}.\hangindent 1.5cm{\large \tt BIJ} (6F)\\This line specifies the anisotropic temperature factor in the form given by\[\exp\{-(B_{11}h^2a^{\star^2}+B_{22}k^2b^{\star^2}+B_{33}l^2c^{\star^2}+\]\[2B_{23}klb^{\star}c^{\star}+2B_{31}lhc^{\star}a^{\star}+2B_{12}hka^{\star}b^{\star})/4\}.\]The order of the terms $B_{ij}$ follows the order in the above equation.\hangindent 1.5cm{\large \tt UIJ} (6F)\\This line specifies the anisotropic temperature factor in the form given by\[\exp\{-2\pi^2(U_{11}h^2a^{\star^2}+U_{22}k^2b^{\star^2}+U_{33}l^2c^{\star^2}+\]\[2U_{23}klb^{\star}c^{\star}+2U_{31}lhc^{\star}a^{\star}+2U_{12}hka^{\star}b^{\star})\}.\]The order of the terms $U_{ij}$ follows the order in the above equation.\hangindent 1.5cm{\large \tt TLS} ()\\{\em Optional} keyword.For further information, please consult the author.The next pair of lines ({\tt INST} and {\tt PEAK}) should be repeatedas a group for each data set that is being fitted simultaneously.\hangindent 1.5cm{\large \tt INST} (4F)\\This keyword has 4 real values starting with the scale factor and then the3 resolution (or peak width) parameters {\em U}, {\em V}, and {\em W}.The full-width at half height (FWHH) of the peaks is given by the formula\[Fw^2=U\tan^2\theta+V\tan\theta+W.\]\hangindent 1.5cm{\large \tt PEAK} (A 2F)\\This keyword is followed by a sub keyword that describes the peak-shapefunction to be used in the refinement. Peak shape functions currently availableare {\tt GAUSS} (Gaussian) and {\tt PVOIGT} (pseudo-Voigt).Following the sub keyword, the first real number is the value of the asymmetryparameter that is used when fitting neutron diffraction data toaccount for the low-angle peak asymmetry. For the pseudo-Voigt peak-shapefunction, the correction term applies only to the Gaussian part of the peakshape. The second real number applies only to the pseudo-Voigt peak-shapefunction and is the value of $\eta$ as given by\[pV(x,w) = (1- \eta )G(x,w) + \eta L(x,w)\]When a data file is initially created for a single phase refinement, {\tt PEAK}can be the last line of the file. The program will then generate theremainder of the file automatically in the output file {\tt PROFIL.PAR}. It iseasier for the user to edit the new output file than to create the rest of thefile by hand.{\bf Codewords}The first group of lines that follow start with one of the keywords {\tt FIX}or {\tt VARY} followed by a sub keyword indicating the parameter type.The keyword {\tt FIX} indicate that all the parameters are fixed and all thecodewords corresponding to those parameters are set to zero.If the keyword {\tt VARY} is specified, then some or all of the parameterswithin the group specified by the sub keyword may be refined. If no codewords,are given then they are generated automatically starting with parameternumber 1000.A codeword, Cw, consists of two parts: A parameter number, Np,and a shift multiplier, Sm. The latter normally takes the value of 1.0,but may take other values when certain parameters are tied together.For example, refinement of the coordinatesof an atom on the special position {\em x},~{\em 2x},~{\em z} requiresthat the $y$ coordinate shifts twice as much as the $x$ coordinateduring the refinement. The parameters are always renumbered starting at 1.The codeword is a composite number given by\[{\rm Cw} = {\rm Np} * 10 + {\rm Sm}.\]If the shift multiplier is negative, then the absolute value of it is added to10$\times$ the parameter number and the whole codeword is then made negative.\hangindent 1.5cm{\large \tt VARY CELL} (6F)\\These keywords are followed by 6 optional reals for the cell codewords.\hangindent 1.5cm{\large \tt VARY Atom-Label XYZBN} (5F)\\For each line starting with the keyword {\tt ATOM}, there must be an equivalentline starting with {\tt FIX} or {\tt VARY} followed by the atom name.This may be followed by one of the keywords {\tt XYZ}, {\tt XYZB}, {\tt XYZBN},{\tt B}, {\tt N}, {\tt BN}, or {\tt XYZN} to vary xyz, xyz \& B(iso), etc..\The first optionallows refinement of the atom coordinates only and leaves the siteoccupation number and isotropic temperature factor (if used) fixed.The third option allows all theparameters on the {\tt ATOM} line to be refined, and so on.Codewords are generated automnatically for each parameter type unless givenexplicitly.The program will apply symmetry constraints to atoms on specialpositions automatically.\hangindent 1.5cm{\large \tt VARY BIJ} (6F)\\This optional line should follow each of the lines above for any atom with ananisotropic temperature factor. There are 6 optional codewords for each of the$B_{ij}$ values. The program will apply symmetry constraints to the valuesautomatically. This line must be present for all atoms where either$\beta_{ij}$, $B_{ij}$, or $U_{ij}$ are input, even if there is an instructionto convert from an anisotropic to isotropic temperature factor({\tt A->I} {\em v.s.}). Conversely, it should be absent if there is aninstruction to convert from an isotropic to an anisotropic temperature factor({\tt I->A} {\em v.s.}). In the latter case, 6 codewords will be generatedautomatically if the codeword for {\em B}(iso) is non-zero.\hangindent 1.5cm{\large \tt VARY TLS} ()\\{\em Optional} keyword.For further information, please consult the author.The next lines with sub keywords {\tt SCALE} to {\tt PEAK} should bespecified as a group for each data set that is beingfitted simultaneously.\hangindent 1.5cm{\large \tt VARY SCALE} (F)\\This keyword is followed by an optional codeword for refinement of the scalefactor.\hangindent 1.5cm{\large \tt VARY UVW} (3F)\\This keyword is followed by optional codewords for refinement of thepeak width parameters U V W. It is frequently desired to vary only 1 or 2of the UVW parameters. Under these circumstances, include only thoserequired in the keyword, e.g. {\tt VARY VW} to refine V and W only.\hangindent 1.5cm{\large \tt VARY PEAK} (2F)\\This keyword is followed by optional codewords for refinement of thepeak asymmetry parameter and the Gaussian-Lorentzian ratio $\eta$ whena pseudo-Voigt peak-shape function is used. Note that the codeword forpeak asymmetry is only generated automatically for neutron data sets.Following the codeword lines, additional optional information may be supplied.For example, restraints (or ``slack constraints'') are given using thekeyword {\tt CHEM}.\hangindent 1.5cm{\large \tt CHEM} (A 2F or A [I 3F])\\For each chemical restraint, a group of lines startingwith the keyword {\tt CHEM} is required. The first line has a sub keywordgiving the restraint type which must be one of {\tt DIST}, {\tt ANGLE}, or{\tt SAME} for distance, angle, or same distance restraints respectively.These are followed by two values giving the magnitude of the restraint(which is zero for the difference between two distances) and the error.Since the error is used to weight the restraint, its value must be non-zero.The smaller its value, the bigger the weight of the observation.\parindent 1.5cm\hangindent 1.5cmThe number of lines that follow depend on the restraint type and is 2, 3, and 4for distance, angle, and same distance, respectively. Each of the subsequentlines specifies an atom label. Since the atom in the list given by {\tt ATOM}may have different coordinates to that required for the restraint, then optionalsymmetry information may be specified on the line. This comprises an integerwhich is the number of the symmetry operator (as given in the lineprinterlisting) and a fractional translational $x$, $y$, $z$. If the structure iscentrsymmetric and an inversion of the coordinates is needed, then the symmetryoperator number is set negative. Note that the effect of inversion on thesymmetry operator $\frac{1}{2}-x, \frac{1}{4}+y, \bar{z}$ results in$\frac{1}{2}+x, \frac{3}{4}-y, z$.\hangindent 1.5cmFor three atoms given in an angle restraint, the angle refers to that subtendedby the second atom with respect to the first and third in the list. In order torestrain two distances to be the same, then the observation is the thedifference between them is zero. This allows the magnitude of the distance torefine whilst keeping both distances similar. One distance is between the firstand second and the other is the third and fourth atoms in the list.\parindent 0cm\hangindent 1.5cm{\large \tt BFAC} (A 2F or A [I 3F])\\(Restraints on the temperature factors for rigid bonds has not yetbeen reincorporated in version 1.0)\hangindent 1.5cm{\large \tt OCCN} (A 2F or A [I 3F])\\(Restraints for site occupation numbers have not yet been introduced.)\hangindent 1.5cm{\large \tt BOND} (3F)\\This keyword is followed by 3 values to specify the limits for bond lengthand angle calculations. The first 2 values specify a minimum andmaximum distance in which bond lengths and angles will be calculated.The last value is used to specify a maximum contact distance below whichonly distance values are calculated.An example of a typical parameter file created with a text editor is shownbelow.{\footnotesize \tt \begin{verbatim}TITLE D2S phase III run on D1AVERSNPAT 1WGHTOUTPSHFT 1 1 1 1NCYC 0WAVE  1.9106ZERO -0.2ABSC 0SCAT SSCAT DLATT C PSYMM  -x,-y,1/2+zSYMM  x,1/2-y,-zSYMM  -x,1/2+y,1/2-zCELL 4.076 13.380 6.721ATOM S1 -0.042  0.144   0.25  0.3  4ATOM S2  0.460  0.401   0.25  0.3  4ATOM D1  0.172  0.216   0.25  1.0  4ATOM D2  0.193  0.073   0.25  1.0  4ATOM D3  0.672  0.379   0.105 1.0  8INST   1.0 0.2 -0.5 0.5PEAK\end{verbatim}}After running through {\tt PROFIL} with zero cycles, the new parameter filehas the appearance as shown below.{\footnotesize \tt \begin{verbatim}TITLE D2S phase III run on D1AVERS     5.00       0NPAT     1WGHT    1.000OUTP   LIS 1 PAR 1 FIT 0 HKL 0 INT 0 COR 0 TAB 0 XYZ 0 ATM 0 BON 0 REF 0SHFT    1.000   1.000   1.000   1.000NCYC     0TEXT Parameters for data set number 1 (Wav., 2th. zero, abs., & b/f values)WAVE  1.9106001   FIXZERO   -0.20000   FIXABSC      0.000       0.0       0.000SCAT S         2.847000     Neutron b valueSCAT D         6.674000     Neutron b valueTEXT Diffracting material (or phase) 1TEXT Space group  57 : PbcmLATT      C     PSYMM         x,                  y,                  zSYMM        -x,                 -y,                1/2+zSYMM         x,                1/2-y,               -zSYMM        -x,                1/2+y,              1/2-zCELL    4.076000  13.380001   6.721000    90.0000    90.0000    90.0000ATOM S(1)    -0.042000  0.144000  0.250000    0.3000    4.00000  ISOATOM S(2)     0.460000  0.401000  0.250000    0.3000    4.00000  ISOATOM D(1)     0.172000  0.216000  0.250000    1.0000    4.00000  ISOATOM D(2)     0.193000  0.073000  0.250000    1.0000    4.00000  ISOATOM D(3)     0.672000  0.379000  0.105000    1.0000    8.00000  ISOTEXT Instrumental parameters for material (or phase) 1 in data set 1INST   0.1000000E+01    0.200000   -0.500000    0.500000PEAK GAUSS      0.000000TEXT R-factors:     Rwp =724.5%     Rexp =  5.9%     RI =737.4%TEXT Refinement codewords for diffracting material (or phase) 1FIX  CELLFIX  S(1)   XYZFIX  S(2)   XYZFIX  D(1)   XYZFIX  D(2)   XYZFIX  D(3)   XYZFIX  SCALEFIX  UVWFIX  PEAKBOND     0.0100    2.0000    3.5000\end{verbatim}}Although the output is ``fixed'' format, there is no need to keep it this whilstediting it since the input file is read as free format. The program adds sometext comments to help break the file into sections. This is particularly usefulfor large parameter files, especially when fitting either multidata set ofmultiphase data.{\bf Setting up the files for Rietveld refinement}It must emphasised that the purpose of the Rietveld method is to refinestructures and not to solve them. Hence before commencing a refinement, it isessential to have some knowledge of the unit cell, space group, andits contents, i.e. a structural model. The instrumental parameters are usuallyknown approximately from studies of simple materials such as Ni or Si that arefrequently used for instrument calibration.\newcounter{steps}\begin{list}%{\em Step \arabic{steps}.}{\usecounter{steps}\setlength{\labelsep}{0.5cm}\settowidth{\labelwidth}{\em Step 9.}\setlength{\leftmargin}{\labelwidth}\addtolength{\leftmargin}{\labelsep}}\itemSome Rietveld programs use polynomial functions to fit the background scatteringassociated with every powder diffraction pattern. {\tt PROFIL} requires that thebackground is estimated graphically as a series of points that are connectedby straight lines. Intermediate points are obtained by linear interpolation.This step is readily carried out using the program {\tt PLOT86} with the cursorand the command {\tt B}. {\tt PLOT86} generates a file called {\tt BACK.DAT}containing the background points. However, the file {\em must} be edited sincethe 2$\theta$ values are still given in the old units of$\frac{1}{100}^{\circ}$, but it is a simple edit to convert these values todegrees.\itemGenerate the Rietveld data ({\tt .PRE}) file. This can be done automaticallyusing the program {\tt PREPAR}. If the data file is not in the required format,first convert it to the standard format that is now used ({\em v.s.}).{\tt PREPAR} also requires a file containing the background information. Thefile is free format with 2 values per line (2$\theta$, intensity). A warningmessage will be given if the program detects that the 2$\theta$ values are inthe old $\frac{1}{100}^{\circ}$ units. The 2$\theta$ values must be given inascending order.\itemGenerate a binary data file from the {\tt .PRE} file using the program {\ttPREPRO}. This program performs a few syntax checks on the data file but does nocalculations on the data.\itemCreate, using a text editor, a file containing the crystallographic modelas described in the previous section, i.e. starting with {\tt TITLE} andending with {\tt PEAK}. Set the number of cycles of refinement to zeroand run the program {\tt PROFIL} using this parameter file.Assuming that the option {\tt OUTP PAR 1} has been specified, the program willcreate a new parameter file with all the refinable parameters set to {\tt FIX}.Edit the new parameter file, e.g. change {\tt FIX SCALE} to {\tt VARY SCALE},reset the number of cycles of refinement to 3, and rerun the program. If therefinement does not converge in the given number of cycles, simply rerunwithout editing the new parameter file until convergence occurs.\itemCheck the results by typing (or printing) the lineprinter file {\tt PROFIL.LIS}.Check that bond lengths and angles listed in the lineprinter file make sense.Regularly observe the progress of the fit in terms of the calculated databy using the output option {\tt OUTP FIT 1}. The file can be plottedusing the programs {\tt FITOUT} (to convert the data file) and {\tt PLOT86}.This is better check than simply looking at the $R$-factors.\itemOnce the structure has been refined successfully, it may be plotted using theprogram {\tt JACKAL}. Also tables of the parameters with e.s.d.s  are listed infile {\tt PROFIL.TAB}. Automatic tables of bond lengths, etc. are not yetavailable.\end{list}{\bf Technical information on the program} {\tt PROFIL}The program follows the basic procedure as outlined in the original paper byH.~M. Rietveld ({\em J. Appl. Cryst.} (1969) {\bf 2}, 65--71) and only a briefr\'esum\'e is given here.(To be finished)The thin-film absorption correction for flate plate sample geometry isgiven by the simple geometric expression:\[A_{hkl} = \exp ( - 2 \mu d / \sin \theta) . \]Since the correction is applied to the model, calculated intensities aremultiplied by this factor.$R$-factors.{\bf Pattern decomposition} {\tt PROFIL}A method of whole pattern decomposition was first described by G.~S.~Pawleyin 1981. More recently, an alternative alorithm based on the Rietveldmethod of obtaining I(obs) has been suggested by LeBail. It is this lattermethod that has been implemented in this version of {\tt PROFIL}.\end{document}