Skip to main content

tutorial surface 3

Parametric or Surface Rietveld Refinement – Update to Newer Language available in a Future TOPAS release

Files needed: d9_02592.rawwo3_p21n_80056.cifwo3_pb1_80053.cifwo3_pc_84843.cif

Cheat files (sorry, some are zipped for web upload permission reasosn): parametric_05.inp.zipd9_02592_p21n_01.inpd5_02592_pb1_01.inpd5_02592_3phase_01.inpwo3_t0000_04.inp,

Learning Outcomes: These exercises give an introduction to parametric or surface Rietveld refinement and its potential benefits. For more details see Stinton/Evans J. Appl. Cryst. (2007). 40, 87–95. The example is also covered in detail in Chapter 12 of the Rietveld text by Dinnebier, Leineweber and Evans. Warning: this is hard!!

Warning: this tutorial won’t work with current TOPAS releases.

The example used is variable temperature diffraction data on WO3 as it’s cooled from 300 to 100 K. Over this range the material undergoes a series of relatively subtle phase transitions. The space group changes from P21/n to P-1 to Pc on cooling. Since the structural changes are relatively minor, quantitative analysis of the phases present is difficult. For example, even though the sample is predominantly monoclinic P21/n at room temperature, the lower temperature P-1 structural model will actually fit the data better.

In the first part of the tutorial you will try and fit room temperature data using either a P21/n or P-1 model. You’ll then perform a 3 phase refinement using P21/nP-1 and Pc structural models against room temperature data. If you use this same file to refine against low temperature data then try the room temperature refinement again you’ll get different answers for the relative amounts of phases each time. One solution to this is to perform a parametric/surface fit where you “force” the cell parameters of each phase to vary smoothly over the entire ensemble of data. This gives reliable quantititative refinement which agrees well with neutron diffraction experiments. By imposing a simple, uncontroversial physical model we can select the “right answer” from “wrong answers”.

The .raw file contains 100 data sets recorded as the sample was cooled from 300 to 90 K.

This tutorial is written to make use of the latest #list language in TOPAS and to take advantage of the “use_stored_values” approach. With minor tweaks to the topas syntax you can now perform parametric refinements with an INP file that is just like one for a normal refinement. This will be available in a future TOPAS release.

To give you an idea of the simplifications, the new topas commands mean the INP file to do a 3 phase fit to 100 data sets with parametrically refined cell parameters is aroumd 400 lines long and trivial to set up from a normal refinement using jEdit. The first version of the tutorial had an INP file that was 25,660 lines long. Even the “efficient” second version needed an INP file 11983 lines long!

The earlier tutorial is linked here if you want it. If you’ve done that previously you can skip to the “Parametric Refinement” section.

Room Temperature Refinements

Learning outcome: different models fit room temperature data equally well – a problem!

1. Save the datafiles and cif files above to your directory.

2. Use the Durham “Simple Rietveld Refinement” menus to perform a refinement of 300 K data (range 1 of the raw file) using the P21/n structural model (wo3_p21n_80056.cif). The instrument used to collect the data was the durham d9. You should refine a height correction. Fit data from 20 to 80 degrees 2-theta. Refine a single overall temperature factor. Refine W xyz coordinates. You should get Rwp = 14.49% for a default set of 24 parameters.

3. Try an equivalent refinement using the P-1 model (wo3_pb1_80053.cif). You should get a lower Rwp = 14.33 % for 32 parameters. If you have trouble with this refinement try starting the cell parameters at the values you got for the P21/n model (7.30, 7.53, 7.69, 90, 90.8, 90).

4. Set up a three phase refinement in which the P21/nP-1 and Pc models are fitted simultaneously to the room temperature data. Use the same peak shape for all 3 phases. You should get Rwp ~12.7 % for a 48 parameter model. Try the file d5_02592_3phase_01.inp linked above to save time.

5. Note down the phase fractions you get at room temperature for the 3 phase fit. I got 77/22/1 %.

6. Try using your file to fit a low temperature data set. Put “range 50” after the filename in the input file. This is a 195 K data set. After fitting range 50 try fitting range 1 again. Note down the phase fractions.

7. Repeat 6 by fitting e.g. range 60 (174 K) then range 1; range 30 (238 K) then range 1; range 100 (90 K) then range 1. Note down refined phase fractions at 300 K each time. You should find they’re different each time you refine against the room temperature data despite all refinements having very similar R-factors.

Parametric Refinements

In this section we’ll go from fitting a single data set to fitting many data sets simultaneously. In the previous section we concluded that many different models will fit the room temperature data equally well. However if we have data collected at several temperatures we can try and fit all data sets simultaneously. It’s likely that there’s only one physically sensible model that will fit all the data simultaneously.

1. Save the file parametric_05.inp to your directory. This file will do a parametric fit of 11 data sets collected between 300 to 90 K simultaneously. The only constraint put on the data is that the cell parameters of each phase should vary smoothly with temperature. Run the file. You should get Rwp ~ 12.9 % for 184 parameter model.

[If you want to check compatibility with the earlier tutorial, add in the TCHz instrumental peak shape line at the bottom of the file, the Rwp will be identical to parametric_04.inp]

2. The file “results.txt” contains all refinement details from parametric_04.inp. Use e.g. excel or gnuplot to plot the results. If you’re a gnuplot person then you can just: load ‘plot_multitopas.gnu‘ and see all the results pop up on screen and in .gif files.

3. The parametric fit is set up to fit only 11 data sets by default. If your computer is up to it then try refining all 100 data sets. You can do this by commenting out the line that says “#define refine_some”. You should be able to get Rwp < 12.90 % for all data sets. Each convergence takes about 60 seconds on a slow 2014-era laptop.

4. Take a look through the five different sections of parametric_05 to understand its structure:

Section 1 contains standard TOPAS information about the refinement. Two unusual things: use_stored_values is described below; and USE_HKL_SIMILAR_TAG lets you save memory and speed up refinemetns (see tech ref).

Section 2 contains the instructions for topas to fit multiple files. Each filename and metadata (temperature, range in the file, etc) are stored in a #list. #define refine_some can be flagged in/out to fit all the data or just a subset for speed. This section then contains a macro “Create_XDDs” which sets up an xdd for each dataset in the #list. [Note that you might have to use “New_XDDs” rather than “Create_XDDs” depending on your topas version].

Section 3 describes parameters which are derived from the whole surface of diffraction data. In this example unit cell parameters are defined by smoothly varying functions. The parameters are derived by Rietveld fitting all data sets simultaneously. The only assumption made about the cell parameters is that theye evolve smoothly with temperature according to a simple physically reasonable model. Some “Phase_Common” parameters which feed into all phasesare also defined in this section.

Section 4 is an almost-standard Rietveld “for xdds” description of a three phase refinement. The unusual parts are the filenames, experimental temperatures and ranges which are set up on loading using the “= #Files(i);” syntax. In the rest of this section “local” parameters are automatically set up by topas to be different for each data set. Named parameters (e.g. prm xW1) are global to all data sets. At the end of the refinement values are saved to a .sv file and then read back in when the refinement is restarted. This is controlled by the “use_stored_values” flag at the top of the file. Magic.

Section 5 just contains some macros to control min/max settings on different parameters and to define some output lines.

5. parametric_05.inp is set up with various “#ifdef” statements which let you fit different models. Try playing with different options.

6. You can compare the results from parametric fitting with refining individual datasets using wo3_t0000_04.inp from the earlier tutorial. If you include the line that says #define fit_all_v6 then the topas v6 #list command will fit all datasets sequentially. You’ll see that even a well set up file like this can “fail” near the phase transition. See the plot below for how the phase fractions compare from parametric fitting (closed points) and individual (open points).

7. You might want to compare using parametric_05.inp with the command #define param_cell turned on and turned off.

8. A bottle of chianti for anybody who made it this far.