Tutorial 4 - Combining Data
Overview
In this tutorial we will look at combining different data to improve the reliability of a refined model. We'll be looking at x-ray and neutron PDF data of BaTiO3. We'll learn why including multiple data can be beneficial; how to include multiple data in a refinement; and some of the things to be aware of when doing this.
Required Files
File | Description |
---|---|
BaTiO3_P4mm_starting.cif | Rough starting point for structure of BaTiO3 |
BaTiO3_11_ID_B.xy | X-ray PDF |
"BaTiO3_final_Qmax32_POWGEN.xy" | Neutron PDF |
Instrument Parameters
Data File | Instrument Parameters |
---|---|
BaTiO3_11_ID_B.xy | dQ = 0.057 |
BaTiO3_final_Qmax32_POWGEN.xy | dQ = 0.02713 |
Tutorial Instructions
We'll begin by refining the starting structure provided against X-ray PDF data collected at 11-ID-B at the APS. Create a new input file, with BaTiO3_11_ID_B.xy as the
xdd
. Include thedQ_damping
macro with the above parameter for dQ. Limit the refinement range to 1 to 50 Å (we know there will be no correlations below 1 Å in this oxide material).Load in the structure of BaTiO3 using BaTiO3_P4mm_starting.cif. Identify and activate the parameters which can be refined. For each site, replace the
beq
with abeq_spherical
macro; use a common radius for all sites, and common low and high beq values for the oxygen sites, and start all sites with sensible values: something like a beq_lo, beq_hi, and radius of 0.25, 0.75, 25 respectively. Don't bother to name all of the other refining parameters, just set them to refine using the addition of an@
. Add theview_structure
keyword, which we will use to inspect the refined structure.Run the refinement, and inspect the results. Combine the following approaches:
Look at the refined structure using the structure viewer that we requested in the input file. Open the temporary output window by clicking the button highlighted below. Now you can select pairs of atoms and see the refined bond lengths in the output window.
Check the fit using the Topas GUI. Pay particular attention to the low-r region. Try to map which bonds from the structure viewer correspond to which peaks in the PDF.
Check the refined parameters in the output file, you should get an r_wp of ~ 15.358. Are there any indications from the refined values that this refinement is not great?
You should find that the region around r = 2 Å is rather unsatisfactory, and that this region contains peaks from Ti-O bonds. You will see some oxygen
beq_spherical
values are unrealistically high. This could be because our model is incorrect (as a matter of fact, this is the case, and we'll look at applying a better model in Tutorial 6), but you should also notice that there is very little data in this region of the PDF to start with, and what data there are appear to be affected by a small error in the processing which has caused the background to sit at the wrong level. What is the reason for these features being so weak? (answer below)We can improve the model by refining it against both these X-ray data, and some corresponding neutron data simultaneously. Topas allows you to add as many
xdd
(which, despite the name, are used for both x-ray and neutron data) andstr
blocks as you like to an input file, so we can add anotherxdd
section in. However, you also need to tell topas what you want it to do with these blocks: from one input containing a singlestr
and multiplexdd
you could:refine a single structure against the
xdd
blocks independently - i.e. the equivalent of starting multiple independent refinements from the same starting modelrefine a single structure against the
xdd
blocks concurrently - i.e. a single refined model should attempt to fit all thexdd
blocks at the same time...of course, one can build more complex input files which do more refinements as well, but we'll leave those for the moment.
Add a second
xdd
section to the inp file, and includedQ_broadening
with the above value. We want thestr
we already have to apply to bothxdd
blocks, so we enclose thestr
in afor xdds {}
loop. Don't forget to tell topas these are neutron data by including the keywordneutron_data
. Overall you should have something that now looks like this:' header information, r factors, etc xdd <X-ray xdd block> ... xdd <neutron xdd block> ... for xdds { str '... a @ 4 b = Get(a); c @ 4.03 '... site Ba x 0 y 0 z 0 occ Ba 1 beq_spherical( @ , 0.25, @ , 0.75, radius, 30) '... view_structure }
Rerun the refinement. You can see an immediate effect of the
for xdds {}
loop; this input file should launch two structure viewers from the two times topas has looped through the structure: once for eachxdd
. Pick an equivalent bond in the two structure viewers, and use the two temporary output window to compare the bond lengths in the two viewers. What do you notice? What kind of refinement has we asked topas to do here?We want topas to refine a single model against the two
xdd
blocks, so we need to define parameter names, rather than using the anonymous@
tag that we're using currently. We therefore need to go through the structure and replace all the@
symbols with names:for xdds { str '... a lattice_parameter_a 4 b = Get(a); c lattice_parameter_c 4.03 '... site Ba x 0 y 0 z 0 occ Ba 1 beq_spherical(beq_lo_Ba, 0.25, beq_hi_Ba, 0.75, radius, 30) '... view_structure }
Rerun the refinement. Once again check a pair of equivalent bonds in the two viewers, and confirm they are now the same. By naming the variables, topas knows we want the same variable to apply every time it loops through the
for xdds {}
section.What has happened to the structure, compared to that refined against just the X-ray data? You should see that the oxygen atomic displacement parameters in particular has been improved.
In this case, we now have two sets of data that may be on completely different scales, and we have weighted each point in both
xdd
blocks with an identical weighting. This means topas will treat an absolute difference of 1 between the observed and calculated data in each fit equally, even if that difference is vastly more significant in onexdd
than in the other. In this case, our neutron data does have larger overall intensity, so we should down-weight it accordingly. We start by using thexdd_sum
keyword to calculate a scale factor for eachxdd
block, and then we add these together, and scale eachxdd
by the inverse of its proportion of this sum. We do this by including theweighting
keyword with an equation, as such:prm sum = sumx + sumn; xdd <X-ray xdd block> ... xdd_sum !sumx = Abs(Yobs); weighting = sum/sumx; xdd <neutron xdd block> ... xdd_sum !sumn = Abs(Yobs); weighting = sum/sumn;
It is important to remember that when the model is refined against multiple xdd blocks, the fit of the calculated to the observed data for any one xdd block cannot be better than when it is the only xdd refined against. By altering the weighting (i.e. try
weighting = 1e6 sum/sumx;
) you can vastly prioritise onexdd
over another: doing so moves away from co-refinement, and toward refinement against onexdd
and comparison to the other. The extreme of this is to simply set the weighting of onexdd
block to be 0. With bothxdd
blocks included, set theweighting
of the neutron block to 1, and theweighting
of the X-ray block to 0. Run the refinement and check the finalr_wp
. Now remove the X-rayxdd
completely and rerun - you should find that ther_wp
and the fit to the neutron data is identical.
Answers
Acknowledgements
11-BM data
If data from this beamtime are used in a publication, the following Acknowledgement should be used: “Use of the Advanced Photon Source at Argonne National Laboratory was supported by the U. S. Department of Energy, Office of Science, Office of Basic Energy Sciences, under Contract No. DE-AC02-06CH11357. Data were collected as part of the 2017 Modern Methods in Rietveld Refinement and Structural Analysis School with support from its sponsors”. You may also wish to acknowledge the beamline staff that collected your data, “We thank Saul H. Lapidus for his assistance with synchrotron powder diffraction data collection at 11-BM.”
11-ID-B data
If data from this beamtime are used in a publication, the following Acknowledgement should be used: “Use of the Advanced Photon Source at Argonne National Laboratory was supported by the U. S. Department of Energy, Office of Science, Office of Basic Energy Sciences, under Contract No. DE-AC02-06CH11357. Data were collected as part of the 2017 Modern Methods in Rietveld Refinement and Structural Analysis School with support from its sponsors”. You may also wish to acknowledge the beamline staff that collected your data, “We thank Karena W. Chapman for her assistance with synchrotron high energy X-ray scattering data collection at 11-ID-B.”