4. Combining Data - The Power of Dual Refinements
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
. Limit the refinement range to 1 to 50 Å (we know there will be no correlations below 1 Å in this oxide material). Include thedQ_damping
macro with the above parameter for dQ. .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 starting parameters such as 0.25 (beq_lo
), 0.75 (beq_hi
), and 25 (beqradius
) respectively.The oxygen atom sites should be refined as equivilents by assinging the same parameter (i.e.,
beq_loO, beq_hiO, beqradiusO
).The other atomic sites should be distinct and will refine unless told otherwise, and as they are distinct sites, they should all refine individually.
Add a scale (3b. add new phase from CIF > scale factor)
Finally add the
view_structure
keyword at the end of the input file, 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 ~ 16.822. A good PDF refinement should sit in the <12% region, we should inspect the refinement and see what areas could be improved.
A simple improvement that you could make to this model is refining the lattice parameters. Using what you learnt in previous tutorials, refine the lattice parameters making sure they obey the rules of the space group. Hint: look at the xinsert menu for a macro that will do this for you.
You should find that despite all the effort so far, 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. These weaker features (see the “additional information” tab below) originate from the weaker signal from the atom-atom correlations in this region,PDF data is notoriously hard to process, and warrants a workshop to itself, and has caused slightly deviated background which now sits at the wrong level.
Overall, it is limited on what we can improve using XPDF data alone, lets introduce another data set to help improve data in this region.
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
str
against thexdd
blocks independently - i.e. the equivalent of starting multiple independent refinements from the same starting modelrefine a single
str
against thexdd
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 using the neutron data, don't forget to tell topas these are neutron data by including the keywordneutron_data
. Include adQ_broadening
with the above value. We want thestr
we already have to apply to bothxdd
blocks, so we enclose thestr
in afor xdds {}
loop.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.Which refinement shows the best agreement to the expected bond length?
This refinement is an example of 6a.
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.Dual refinements are not just for XPDF/NPDF refinements, you can use them for dual XRD/XPDF refinements as well. Refinements such as this can be very good for modelling deviations to local structure whilst still obeying an average structure. We will not show you how to do this within this tutorial, but we have taught you all the tools needed to do such a refinement, just be careful with using the correct macros (XRD and XPDF macros must be defined in the correct sections!)
Further methodologies to model short/local and long/average structures within one refinement can be found in tutorials 6 & 7.
Additional Information
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.”