Skip to main content

Extensive tutorials

Durham TOPAS tutorials (TOPAS site copy)

March 2026 note: these tutorials are undergoing extensive updates ready for the 2026 Durham school. Links may be broken and instructions incorrect over any ~2 day period.

Various tutorials on the use of topas/topas-editor are given below. They’ve been collated from various schools and user meetings. There’s more background/theory on many of them in the TOPAS Rietveld book.

There is a subset of tutorials on five of the most common uses of TOPAS which have more detailed instructions and screenshots here, along with some legacy jEdit introductory tutorials. These are a good place to start learning TOPAS.

Please note that these tutorials have been created over several years in TOPAS versions from v3 to v8. In some cases there may now be better ways of tackling the problem or setting up the input file. Most tutorials will run in v4.2 onwards, but some need functionality only available in later releases.

Many of the tutorials were originally written with jEdit. Most now assume that you are using the VS Code topas-editor extension, but should still be fine with jEdit.

1. Get started with a prewritten INP file

Tutorial 1.1 – How to run a prewritten input file.

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+.