Skip to main content

tutorial_y2o3riet

Y2O3 Rietveld refinement tutorial

Learning Outcome: this tutorial is designed to take you through a simple Rietveld refinement with a couple more “twists” than other examples.  Rather than just “pressing buttons” and doing a black-box refinement, we’ll look at the effect different parameters have on the match between the experimental data and calculated pattern.  This will give you a feel for how different parameters influence a Rietveld refinement, and what to do when refinements go wrong.  In the initial parts of the tutorial we will therefore perform single calculations in TOPAS using the “step” (F7) button followed by “stop” (F8) rather than refining to convergence.

You should be able to get a “good” fit to the data with a standard Rietveld approach.  Careful analysis of the model towards the end of the refinement lets you explore the influence of preferred orientation, hkl-dependent peak shapes and experimental artefacts data on the quality of fit.

The exercise is done on a simulated data set so we can define what a “perfect” fit to the data should be.

Files: y2o3_demo.xye, y2o3_start.cif, y2o3_demo_stage0.inp, y2o3_demo_stage1.inp, y2o3_demo_stage2.inp, y2o3_demo_stage3.inp

A basic Rietveld fit
  1. Create an INP file to do a standard Rietveld fit to the dataset y2o3_demo.xye using the structural model in y2o3_start.cif via the menus in jEdit or VS Code topas-editor.  The data are for a Cu Ka1 diffractometer with a Ge 111 monochromator in reflection geometry.  Don’t select any corrections like zero-point or sample-height at this stage.  If you use VS code you might find it helpful to archive this starting file in case things go wrong: hit ctrl-tx.  If you use jEdit, manually save a copy of the INP file.  My model here is y2o3_demo_stage0.inp.
  2. If you have significant experience of Rietveld refinement see how close you can get to a “perfect” fit (Rwp = 10.32%).  You can then skip some of the following steps.
  3. Send the INP file to TOPAS and do a single calculation using the “step” button (F7) then the “stop” button (F8).  You should get an Rwp > 2000 %.
  4. Refine the model but DON’T update the INP file at the end of refinement (select “no” on the dialog box).  You should have an Rwp value of around 60%.  Does this fit look better or worse?  Would you rather work with this model or the starting model?  Should you always “accept” the results of a cycle of Rietveld iterations?
  5. In TOPAS run a single calculation again using the “step” button (F7) then “stop” to confirm you have an Rwp of around 2000+ %.  In the INP file set the number of least squares iterations to zero (iters 0).  Now try changing various parameters in the model manually to improve the fit.
  6. Change the cell parameter between 10.55 and 10.65 A.  What value puts the peaks in the best positions?  You might find it useful to zoom in to e.g. 10 to 40 2-theta range.  You should find a value of around 10.60 A is good.  What other parameter(s) might help optimise the peak positions over the whole 2-theta range?
  7. Change the scale factor manually from 0.001 to 0.00001.  You should find that a value around 0.00001 gives a sensible scaling between the observed and calculated patterns.
  8. Change the beq parameters on all sites to values between e.g. -3 and +3.  What is the influence on the high angle calculated data?  You should see that peaks at high angle are too intense with a negative b value and too weak with a large positive b value.  You should find that a value around 0.5 looks sensible across the 2-theta range.
  9. The peak shape parameter pkw in the TCHZ macro describes a constant Gaussian fwhm contribution to the reflections.  Try changing the value to see how the calculated pattern changes.  Try values of e.g. 0.001, 0.01 and 0.05, with other peak shape coefficients fixed at zero or small values (0.001).
  10. Try zooming in to e.g. 50-65 degrees 2-theta then changing the Y2 fractional x coordinate systematically from 0.95 to 1.0 in increments of 0.01.  You should see the relative peak intensities change.  A value around 0.97 should be optimal.
  11. Try changing the O2 x coordinate from 0.39 to 0.44 in increments of 0.01.  Do the intensities change very much?  If not, why not?
  12. Add parameter names or @ symbols to refine the parameters you have just investigated by hand.  You should be able to get an Rwp of around 24.5%.  For this space group and Wyckoff sites the only refinable fractional coordinates are x on Y2 and x, y and z on O.
  13. Compare the observed and calculated peak positions at low and high angles.  Do the peak positions match up across the whole 2-theta range?  Try adding either a sample-height correction or a zero-point correction.  Which is better?  What happens if you try and refine both?  You can find the relevant commands from the “TOPAS Durham/Rietveld or Pawley/Corrections” menu.  They need to go in the xdd section of the file – i.e. before the str section.  You should be able to get Rwp ~13.8%.  My model is in y2o3_demo_stage1.inp.
  14. At this point you have completed a “standard” Rietveld analysis, but is this an adequate model?  Are you missing any important features?  Note down your Rwp and GoF parameters.  Keep a record of the important fractional coordinates.  You could do this by making another archive copy of the INP file (ctrl-tx in VS Code).
  15. As an exercise, try changing values of some parameters in your model to see their influence on other parameters.  For example zoom in on the first couple of peaks.  For example, change the term describing peak asymmetry to Simple_Axial_Model(!axial, 20) and see how the peak shape changes.  Then change to Simple_Axial_Model(!axial, 0).  You should see that the cell parameter changes significantly (i.e. much more than its standard uncertainty) when you change the peak shape model.
Improving the fit – background and experimental artefacts
  1. View the data on a sqrt(y) scale and zoom in to inspect the background fit at low angles.  Try adding background polynomial terms to improve the fit.  How many parameters are needed to describe the background well?  I needed something like 24.  This is a lot!
  2. Go back to a single background term (bkg @ 0) and re-refine.  You should see that the background rises at low angles.  This commonly occurs due to air scatter.  Try adding a 1/2-theta background term by adding: One_on_X(@, 1000).  You can find this command in: TOPAS_v7_Menus/Scan file level/1 / X.
  3. You should get a reasonable fit to the background with just two parameters.  However, you will see a broad “hump” in the background around 10 degrees.  This type of hump is often caused by scattering from a sample holder.  It can often be fitted using a measured background of the holder or using simple functions.  Try adding a Gaussian peak by including the line: Insert_Peak(tth,10,!lor,0,fwhm, 2 min 0.01 max 10, int, 0.1).  You may also need to add the relevant macro to your INP file.  You can find it at https://topas.awh.durham.ac.uk/doku.php?id=insert_peak.  The resulting 5-parameter background model should describe the background better than a 24th order polynomial.  More parameters doesn’t always mean a better fit!
  4. Zoom into the data between 60 and 70 degrees.  You will see what looks like an unfitted peak.  Is it a Bragg reflection?  How many data points are in the “peak”?  Does it look like the other peaks?  If appropriate, try excluding it (exclude 67.3 67.5).  How much does Rwp change?  Do any other refined parameters change?  Should you exclude this point or retain it in the analysis?
Improving the fit – preferred orientation
  1. Look at the (222) and (400) reflections at 29.2 and 33.8 degrees, respectively.  Are their relative intensities 100% correct?  This is best assessed by looking at the difference curve.
  2. Try adding a spherical harmonic correction to describe preferred orientation.  In general, you should be very careful about using high-order spherical harmonic corrections.  My recipe is usually to try a high order function, see if it improves the fit, then think if it makes any physical sense.  If it does, I try and use a simpler model if at all possible.  Add the following line to your file then refine: PO_Spherical_Harmonics(sh, 8) normals_plot = sh;
  3. You should see a reduction in Rwp to around 11.6%.  The shape of the spherical harmonic correction is decidedly non-spherical.  It looks more like a cube than a sphere.  This indicates preferred orientation along the <111> directions.  Try applying a March-Dollase correction instead of the spherical harmonci.  Comment out the spherical harmonic correction (VS Code: highlight then ctrl-t/).  The line for a <111> March Dollase correction is: Preferred_Orientation(@, 0.9, , 1 1 1)
  4. You should get an equivalent fit with the simpler March-Dollase model in this case.  The significant improvement in Rwp with either model gives good evidence that a preferred orientation correction is needed.
Improving the fit – hkl-dependent peak shapes

It’s common for real world samples to have peak shapes that are anisotropic – i.e. they depend on the hkl values.  Some of the physics behind this, and how to treat it properly, is contained in Paolo Scardi’s WPPM tutorial.  We’ll adopt a phenomenological approach here.

  1. Zoom in on the (400) reflection at 33.8 degrees 2-theta.  Can you see that the experimental data are sharper than the calculated model?  You should see the same for the (800) at 71.1 degrees.
  2. Try adding the following line to the INP file, which uses the Popa-Stephens model to describe anisotropic strain broadening.  You should see a significant improvement in fit to Rwp around 10.5%.  Line to add: Stephens_cubic( eta, 0.9, s400c, 0, s22oc, 1)
  3. Using a hkl-dependent peak shape gives a much better fit. The approach used is convoluting the anisotropic strain on top of the TCHZ pseudo-Voigt peak shape so parameters may correlate and have no physical meaning.  Other tutorials show how to describe sample and instrument contributions to the peaks more correctly.  This model is saved as y2o3_demo_stage2.inp.
Improving the fit – fundamental parameters

Rather than using an empirical peak shape, it is often better to use a fundamental parameters approach.  This can allow the description of complex peak shapes with far fewer parameters, and parameters which capture the physics of the instrument used and the properties of the sample.

  1. From your INP file, delete the line describing the TCHZ() peak shape and the simple_axial() peak broadening.
  2. In the xdd section add the lines below which describe the instrument used.
  3. In the str section add the lines below which describe the sample contributions to the peak shape in terms of size and strain Lorentzian components.
  4. You should get Rwp = 10.32% and a gof of 1.02.  If you view the fit on a sqrt(y) scale you’ll see that the difference curve is essentially featureless – just random fluctuations.  This file is saved as y2o3_demo_stage3.inp.  This final model represents a “perfect fit” to these data – it is the model that was used to simulate it.
'INSTRUMENT:
Radius(217)
Divergence(1)
axial_conv
  filament_length         12
  sample_length           15
  receiving_slit_length   12
  primary_soller_angle    5
  secondary_soller_angle  5
Slit_Width(0.1)

'SAMPLE:
CS_L(size_lor, 348.025683`)
Strain_L(strain_lor, 0.049915368`)
Finishing up – getting ready for publication

There are a few things you should do at the end of any refinement.

  1. Calculate errors on refined parameters to make sure they are reasonable, then check the correlation matrix to make sure there is independent information on the parameters of interest.  Add the line “do_errors” to the start of the INP file.
  2. Run a final round of least squares.  The standard uncertainties on refined parameters will be appended to the INP file in the form 10.598107`_0.000038.  This is equivalent to 10.59811(4), with the number in brackets representing the standard uncertainty on the final parameter.  If the uncertainties make the INP file hard to read, you can remove them in VS Code by typing ctrl-te.
  3. You can inspect the correlation matrix either in the INP file or by clicking on the graphical viewer in TOPAS.  Watch out for parameters that are >80% correlated that are an important in your scientific model.  You might not worry if e.g. background or some peak shape parameters correlate with each other if they’re not scientifically important.
  4. You could try refining a sample-height correction and a zero-point correction simultaneously.  Look at the correlation matrix to see how they correlate with each other and with quantities like cell parameters.  Should they both be refined for this data set?
  5. Write a proper powder CIF file for archiving.  The best way is to use Matthew Rowles’ CIF macros which are available here: https://topas.awh.durham.ac.uk/doku.php?id=out_pdcif
  6. As a minimum add the following line to the str section of your INP file: local !CIF_PHASE_ID 1.  Add the following at the end of the INP file: Out_pdCIF(y2o3_demo.cif)
  7. Rerun the refinement.  If you have pdCIFplotter installed you can launch it to view the CIF from within the VS Code “TOpyAS” menu.