Rietveld school tutorials
Rietveld school tutorials
This page is being prepared for the Durham 2026 Rietveld school. It won’t be officially live until April 2026. Most tutorials have been updated to modern TOPAS syntax and topas-editor use; those marked (O) haven’t.
The links below should take you to problems for different sessions of the school. This page can be launched from the topas-editor Help menu. Use the links in topas-editor to access the topas wiki for more helpm or to find space group tables, etc. There’s more background/theory on many of the tutorials in the TOPAS Rietveld book.
Lecture notes, other useful files and photos will be linked from this page.
The tutorials are arranged according to the sessions on your timetable (draft here). Early in the school please try and tackle the tutorials associated with each specific session. We don’t expect you to complete all the tutorials. Later in the school there will be time for you to tackle the problems most relevant to your research.
Initial set up and computer information
TOPAS will probably be launched using Appsanywhere or will be preinstalled in a folder called C:\users\dxf4321\Topas.
You will need to make sure that the VS Code is configured to point at this TOPAS directory. You can do this via the “VS Code TOPAS setup” menu then “Select TOPAS directory”. More information on the topas-editor setup is here. You can then launch TOPAS with the red “Run Bruker TOPAS” command at the top of the menus of TOPAS-Academic with the green rocket icon.
You should save relevant files in the folder “j:\school_work” (right click on links and use “save as”. Don’t save files in the main TOPAS folder or the VS Code folder – both may be wiped on logout.
A few of the early tutorials on Rietveld/Pawley/peak fitting/indexing contain basic step-by-step instructions on using TOPAS with screen shots of each stage. They’re the same as the simple tutorials here. Other tutorials are more brief.
1. Least squares refinement – excel
These tutorials are intended to introduce you to least squares refinement. We’ll use the solver function of excel to perform various least squares fits. We’ll start fitting a straight line then move on to fitting Gaussians and eventually performing a full Rietveld refinement. We’ll use TOPAS Academic to perform equivalent refinements to those in excel.
Tutorial 1.1 – Fitting straight lines, quadratics and Gaussians in excel.
Tutorial 1.2 – How to perform the same fits from Tutorial 1 in TOPAS.
Tutorial 1.3 – How to refine unit-cell parameters in excel.
Tutorial 1.4 – How to perform Pawley and Rietveld refinements in excel.
Tutorial 1.5 – Indexing-by-hand practice: How to index a tetragonal powder pattern and refine unit-cell parameters using excel.
2. Peak positions and auto indexing
Peak positions are one of the fundamental aspects of a diffraction pattern and are determined by the unit cell size and shape, the wavelength used and any instrumental offsets. These tutorials look at how unknown unit cells are obtained (indexing) then refined (e.g. Pawley fitting). You can try these procedures on any of the other data sets provided. If you’ve never used topas-editor/TOPAS before you might want to try e.g. tutorial 3.1 or tutorial 3.2 first which go through some of the mechanics of using topas-editor in a bit more detail.
Tutorial 2.1 – Peak Fitting: How to perform individual peak fitting in TOPAS, often the first step before indexing.
Tutorial 2.2 – Indexing: How to index a powder pattern in TOPAS.
3. Simple Rietveld refinement in topas-editor/TOPAS
The tutorials below are intended to give you an introduction to Rietveld and Pawley refinement using the topas-editor/TOPAS interface. The aim of the tutorial session is not to necessarily fully understand what your doing, but to make sure you’re happy with the “mechanics” of the overall process of Rietveld refinement.
If you want even more basic tutorials then take a look at the introductory tutorials on the web. The examples there have far more detail and contain screen shots of (approximately) what you should see at each stage. They were written for jEdit, but the topas-editor approach is similar.
Tutorial 3.1 – How to run a prewritten input file.
Tutorial 3.2 -topas-editor mechanics: TiO2 lab data Rietveld and Pawley refinements using topas-editor menus or templates.
Tutorials 3.3-3.5 – jEdit mechanics: TiO2 examples using jEdit for Rietveld from scratch, Rietveld from a template and Pawley from scratch . These are retained for legacy reasons.
Tutorial 3.6 – Rietveld analysis of Y2O3, with a few twists at the end. Explore how different aspects of the Rietveld model influence the calculated pattern.
Tutorial 3.7 – ZrW2O8 Rietveld: Simple Rietveld refinements using lab data, constant wavelength neutron and time of flight neutron data on the same sample – make sure you have John’s local.inc on your computer.
Tutorial 3.8 – Multiphase Rietveld refinement.
Tutorial 3.9 – LaMnO3 Rietveld with no detailed instructions.
4. Neutron/synchrotron/combined refinement
How to perform Rietveld/Pawley refinements against neutron/sychrotron data. As well as these examples you might want to repeat/complete some of the earlier exercises.
Tutorial 4.1 – Y2O3 data recorded on id31 at the ESRF.
Tutorial 4.2 – ZrW2O8 Rietveld: Simple Rietveld refinements using lab data, constant wavelength neutron and time of flight neutron data – make sure you have john’s local.inc on your computer. Note this is the same as the ZrW2O8 tutorial in the Rietveld section above.
Tutorial 4.3 – POLARIS time-of-flight multibank Si data using a template.
Tutorial 4.4 – PbSO4 constant wavelength neutron data from Jeremy Cockcroft.
Tutorial 4.5 – Combined Refinement: Builds from earlier tutorial on ZrW2O8 and shows how to simultaneously fit X-ray and neutron data. Also discusses ab-initio structure solution from X-ray and neutron data. See also gsas tutorials 3 and 4.
5. Peak shapes and microstructure
Peak shapes are another fundamental aspect of a diffraction pattern. These tutorials investigate some of the functions used in Rietveld packages and how peak shapes can be used to give information on sample size, strain or stacking faults.
Tutorial 5.1 – In this tutorial you’ll investigate some of the empirical various peak shape functions that are used in Rietveld refinement packages. You’ll use experimental fwhm vs 2-theta data in excel to come up with functions that might describe a real data set. You’ll then try these functions in TOPAS.
Tutorial 5.2 – This tutorial explores convolutions to fit a single peak in a pattern using the approach discussed in Rietveld school lectures.
Tutorial 5.3 – Fundamental parameters peak shape fitting – modelling peak shapes in terms of instrumental and sample contributions.
Tutorial 5.4 – Size/strain analysis: Shows how size/microstrain can be determined in TOPAS using the CeO2 round robin data with an empirical instrumental resoultion function.
Tutorial 5.5– Nanoparticle sizing: a simple approach to approximate size of ~2 nm nanoparticles from diffraction data.
Tutorial 5.6– Whole Powder Pattern Modelling (WPPM) tutorial by Prof. Paolo Scardi. This tutorial describes a more rigorous approach for modelling the contributions of size and microstrain distributions on powder peak shapes. It includes lots of references to the background theory.
Tutorial 5.7 – TOPAS v6+ lets you calculate the diffraction of materials with stacking faults. This tutorial takes you through this type of analysis using examples from the DIFFaX software package. This is the same as tutorial 12.1.
6. Restraints/rigid bodies
Use of extra chemical information such as restraints and rigid bodies or Z-matrices is often important when analysing powder data. Several of the tutorials (e.g. the one on ZrW2O8 Rietveld) use bond distance and angle restraints. Tutorials in this section provide more examples.
Tutorial 6.1 – How to use Z-matrices to describe molecular systems using glycine as an example.
Tutorial 6.2 – Rietveld refinement of an organic molecule using restraints, rigid bodies and Z-matrix approaches. See also gsas 7.
Tutorial 6.3 – A complex use of rigid bodies to refine three unique molecules in the asymmetric unit with Z-matrix descriptions to constrain internal symmetry. Data recorded on id31 at the ESRF.
7. Structure solution
Structure solution is not formally part of the course, but you could try the tutorials below if you’re interested. The tutorial on combined refinement of ZrW2O8 also explores these ideas.
Tutorial 7.1 – Structure Solution of an inorganic oxide: Takes the information from earlier tutorials and solves the structure of TiO2 using simulated annealing.
Tutorial 7.2 – Structure solution of a rigid organic molecule and other examples. Uses the same data as Tutorial 6.2.
Tutorial 7.3 – Structure solution of inorganic materials.
8. Miscellaneous examples
Tutorial 8.1 – Quantitative Rietveld refinement. This is extremely important in many industries. This example uses the Round Robin data of Ian Madsen and Nikki Scarlett.
Tutorial 8.2 – Solving a structure from single crystal data using charge flipping.
Tutorial 8.3 – Single crystal analysis: how to do a simple single crystal refinement in TOPAS.
Tutorial 8.4 – Using functions in TOPAS v5+ to explore the fundamental equations used in crystallographic refinement. All the relevant equations are programmed from an INP file.
9. Sequential and parametric/surface refinement
Tutorial 9.1 – How to refine against multiple datasets sequentially in v6+ with #list format or v4/v5 with command files.
Tutorial 9.2 – Parametric or surface Rietveld refinement – how to use surface fitting to analyse 100 patterns simultaneously to follow phase transitions in WO3. Tutorials linked from this one show several different ways of setting up input files in different TOPAS versions.
Tutorial 9.3 – An update to the parametric WO3 example for TOPAS v8+ using “stored values” – a parametric INP is as short as a standard INP.
Tutorial 9.4 – Parametric or surface Rietveld refinement – how to refine sample temperature from diffraction data using the ZrP2O7 example.
10. Symmetry mode refinements
Tutorial 10.1 – Structural transformations. Directly refine symmetry-mode amplitudes rather than traditional atomic xyz coordinates of a distorted superstructure. Example based on simulated lab x-ray diffraction data from low-temperature orthorhombic LaMnO3. The symmetry modes are obtained using the ISODISTORT software.
Tutorial 10.2 – Structural transformations. Directly refine symmetry-mode amplitudes rather than traditional atomic xyz coordinates of a distorted superstructure. Example based on laboratory x-ray diffraction data from room-temperature monoclinic WO3. The symmetry modes are obtained using the ISODISTORT software.
Tutorial 10.3 – Structural transformations. A more advanced symmetry-mode refinement example based on room-temperature WO3. Fit both neutron and X-ray data. Try to automatically infer space-group symmetry at high temperature using ISODISTORT.
Tutorial 10.4 – (O) By combining TOPAS, ISODISTORT and some python scripts you can automatically search through different space group possibilities for samples which undergo symmetry-lowering phase transitions.
Tutorial 10.5 – (O) This is an update of Tutorial 10.4 and shows how you can use a single TOPAS INP file to search through different space group possibilities for samples which undergo symmetry-lowering phase transitions – no external Python scripts are needed.
Tutorial 10.6 – (O) This tutorial teaches you how to use a Genetic Algorithm with a P1 distortion mode model of a structure to decide which modes are actually important in fitting the data. This lets you simultaneously determine the space group and structure of a material. The tutorial uses WO3 as an example. See also the magnetic example below.
11. Magnetic refinements
Tutorial 11.1 – TOPAS v5 onwards will perform magnetic Rietveld refinement. This tutorial takes you through three different ways of describing the low temperature magnetic structure of LaMnO3.
Tutorial 11.2 – (O) This tutorial teaches you how to use a Genetic Algorithm in P1 1.1 symmetry to determine the magnetic structure and true magnetic symmetry of a material.
12. Stacking fault refinements
Tutorial 12.1 – TOPAS v6+ lets you calculate the diffraction of materials with stacking faults. This tutorial takes you through this type of analysis using examples from the DIFFaX software package.
13. PDF refinement
Tutorial 13.1 – PDF small box fitting in TOPAS v6+. Tutorial fits dAta on SnO2 and a 2-phase mixture of SnO2 and MoO3.
Tutorial 13.2 – PDF small box fitting using anisotropic displacement parameters and ADP_5 in TOPAS v8+.
14. Other Rietveld packages
The following links are to a set of tutorials in other Rietveld packages, some of which use the same data sets as those in previous problems. A single .zip file with all the data for these examples is here.
GSAS-II 1 – This tutorial lets you try the Y2O3 Rietveld example in GSAS-II.
GSAS-I Tutorials – A set of tutorials written for GSAS-I; the same data can probably be analysed in GSAS-II.
Fullprof 1 – (O) Y2O3 lab data in fullprof.
15. Spot the errors
Tutorial 15.1 – Can you spot the problems with each of these experimental data sets?