Guide · XRD Rietveld refinement · Complete guide

Rietveld refinement online: the complete guide

What each step of a Rietveld refinement does, how Auto refine decides, how to tell a good fit from a bad one, and every control for the cases that need more, from dopants to a known composition. Worked through on the built-in sample, a simulated Cu Kα pattern of anatase and rutile (TiO2). The tool runs GSAS-II on our server; you need only a browser.

ScienLytic ·

Contents
  1. What Rietveld refinement does
  2. Why refine here instead of in GSAS-II by hand
  3. 1. Prepare the files
  4. 2. Load and check
  5. Radiation and polarization
  6. 3. Set the fitting range
  7. 4. Refine: Auto refine
  8. How Auto refine decides
  9. Several phases: all together or one after the other
  10. Adding or removing a phase later
  11. 5. The run list
  12. 6. Judge the fit
  13. 7. Settings for special samples
  14. Peak position correction
  15. Background
  16. Texture (preferred orientation)
  17. Crystallite size and microstrain models
  18. Dopants, cation mixing and vacancies (site models)
  19. Expert: every parameter, fixed values, ranges and formulas
  20. Known composition and amorphous content
  21. 8. Read the results
  22. 9. Export
  23. 10. Step by step
  24. Common mistakes
  25. Try it

The short version

  • Load the raw pattern and one CIF per phase; check the radiation.
  • Limit the fitting range to where the peaks are.
  • Press Auto refine. It refines in the classic order and keeps a step only when the fit improves and every value stays physical.
  • Judge the fit by the difference curve, by Rwp against the lowest possible Rwp, and by GOF.
  • For special samples, add what the sample needs: texture, a size or microstrain model, a dopant or vacancy model, fixed values, a known composition.
  • Read the results; export tables, refined CIFs and the GSAS-II project.

What Rietveld refinement does

A Rietveld refinement calculates the whole powder pattern from a structural model, one crystal structure per phase plus the instrument and the background, and adjusts the model's parameters until the calculated pattern matches the measured one point by point. What you get back are the refined parameters: lattice parameters, phase fractions, crystallite size and microstrain, atom positions and displacement parameters, each with an uncertainty.

It refines a model; it does not find one. The phases must be known, as CIF files, before you start. If you do not know them yet, run phase identification first: it searches a library of known structures for the phases that explain your peaks and sends them here with Send to Rietveld refinement →.

Why refine here instead of in GSAS-II by hand

The engine is GSAS-II, the open-source Rietveld program of the Advanced Photon Source at Argonne National Laboratory, unmodified. What differs is how you use it: in GSAS-II every step is yours to operate and to judge; here that work is already done for you.

One click refines the whole pattern. Auto refine releases the parameters in the order an experienced user would: background, scale and zero; lattice; peak shape; asymmetry; atomic coordinates; Uiso. A step is kept only when the fit gets better and every value stays physical; otherwise it is undone. Several phases are refined together or one after the other. You do not need to know what to release next, and a step that diverges cannot spoil the model.

No software to learn first. Nothing to install, no GSAS-II interface to learn, no order of steps to remember. Every step says what it does, what a good result looks like and what to do if it is not. When the fit is poor, the tool says in words where the cause most likely lies: the background, a missing phase, the intensities, the positions or the peak shape.

Every step is kept; nothing is overwritten. GSAS-II writes each refinement into the current project; going back several steps usually means a copy you saved yourself or a backup file. Here every run is saved automatically: view the fit of any run, roll back to before any step, or start over, and the earlier results are still there.

The same results as GSAS-II. Every value and uncertainty is calculated by GSAS-II. Export the GSAS-II project (.gpx) and open it in GSAS-II on your computer: you see the same model and the same numbers, and you can carry on refining there.

The controls for complex samples are all there. Expert mode lists every parameter GSAS-II can refine on the project, and more:

In GSAS-II these usually mean editing constraints or writing a script; here you type a number or press a button, and Auto refine obeys them too.

Easy for newcomers, quicker for experts. A newcomer presses Auto refine and gets a sound result. An expert lets Auto refine lay the groundwork, then adjusts only what matters in Expert mode.

Your computer stays free. The refinement runs on our server; close the tab and come back later, the project is still there.

Straight from phase identification. The phase identification tool hands the identified phases and their CIFs over with one click, Send to Rietveld refinement →.

On a reference mixture of known weighed composition, sample 1a of the IUCr round robin on quantitative phase analysis (corundum / fluorite / zincite weighed at 1.15 / 94.81 / 4.04 wt %), Auto refine alone gives 1.28 / 94.75 / 3.97 wt %.

This tool refines X-ray powder patterns. For neutron, time-of-flight, single-crystal and magnetic refinements, use GSAS-II itself.

1. Prepare the files

The pattern. Upload the file your diffractometer wrote, or its plain export. The tool reads:

Anything else: export it as two-column text. Use the raw counts, not a smoothed or background-subtracted curve: the refinement fits the background itself and weighs every point by its counting noise. The tool warns when a pattern looks processed.

One CIF per phase. From a database (the Crystallography Open Database, ICSD, the Materials Project), from a paper's supporting information, or from the phase identification tool (right-click a phase, Download CIF). A close structure is fine to start with: the lattice parameters refine; the atoms only need to be roughly right.

2. Load and check

Open the XRD refinement tool and press Try with sample data, or drop your pattern and CIFs onto Drop files here (together or one by one). Each CIF becomes a phase under Phases. The order there is the phase order in every table: put the main phase first. The arrows reorder, × removes.

The sample loaded: one pattern, two phases, the tutorial strip above the plot and the first step's checks on the right.The sample loaded: one pattern, two phases, the tutorial strip above the plot and the first step's checks on the right.
Figure 1. The sample loaded: one pattern, two phases, the tutorial strip above the plot and the first step's checks on the right.

The right column walks through the refinement in nine parts. Part 1, Know your files, lists what was read: the pattern's range and number of points, each phase with its space group and starting cell, and the radiation. Check them, then press Files look right, start →.

Part 1 lists the pattern, the phases and the radiation as read from your files.Part 1 lists the pattern, the phases and the radiation as read from your files.
Figure 2. Part 1 lists the pattern, the phases and the radiation as read from your files.

Above the parts, Lowest possible Rwp is already shown. It comes from the counting noise of your data alone, before any fitting, and it is the yardstick for the rest of the guide.

Radiation and polarization

Radiation offers what the file states (xrdml, ras, Bruker raw / brml and the PANalytical CSV carry it), the usual tubes (Cu, Co, Mo, Fe, Cr and Ag Kα1+2; Cu and Mo also Kα1 only; Cu with the extra W Lα line of an ageing tube) and Other wavelength… for anything else, such as a synchrotron. A wrong choice puts every reflection in the wrong place, or gives every peak a shoulder that is not there.

With Other wavelength… there is a Source choice: Laboratory tube (polarization 0.7, a tube with a monochromator) or Synchrotron (polarization 0.99), preselected when the wavelength is no tube's. Polarization changes how intensities fall with angle, so it matters for Uiso and site occupancies much more than for Rwp.

3. Set the fitting range

Part 2, Fitting range, asks where to fit. Fit from just below the first peak to where the peaks fade into noise. Two regions often do harm: the steep low-angle slope from the direct beam, and a long noisy high-angle tail. Both slow the refinement down and pull the background model away from where it matters.

A peak that belongs to no phase of your list (the sample holder, a film, an unknown impurity) can be cut out with an Excluded regions entry instead of being forced into the model. Auto refine also finds one or two such narrow peaks by itself at the end (below).

Part 2: the 2θ range and optional excluded regions.Part 2: the 2θ range and optional excluded regions.
Figure 3. Part 2: the 2θ range and optional excluded regions.

4. Refine: Auto refine

Press Auto refine and confirm with Run all steps. It runs the classic order of a manual refinement, one block of parameters at a time:

  1. Background + scale + zero: the background polynomial, the scale of each phase (from which the phase fractions come) and the peak position correction.
  2. Lattice parameters: peak positions.
  3. Profile parameters: peak widths and shapes, which carry crystallite size and microstrain.
  4. Peak asymmetry: the low-angle tail of peaks from the instrument.
  5. Atomic coordinates: atom positions that the space group leaves free, which change peak intensities.
  6. Displacement (Uiso): thermal and static disorder, which damps the high-angle intensities.

Pause stops after the step that is running.

The Auto refine dialog: phases together or one after the other, what to leave out, texture.The Auto refine dialog: phases together or one after the other, what to leave out, texture.
Figure 4. The Auto refine dialog: phases together or one after the other, what to leave out, texture.

The dialog has a few choices; the defaults suit most patterns:

The finished refinement: the calculated pattern over the measured one, the difference curve under it, the run list in the middle, the numbers on the right.The finished refinement: the calculated pattern over the measured one, the difference curve under it, the run list in the middle, the numbers on the right.
Figure 5. The finished refinement: the calculated pattern over the measured one, the difference curve under it, the run list in the middle, the numbers on the right.

How Auto refine decides

A run is kept when Rwp is not more than 0.05 points above the accepted model, GSAS-II did not diverge, and no value is unphysical: a phase fraction outside 0 to 100 %, a Uiso outside 0 to 0.08 Ų for an atom the run could move, a value the engine had to clamp. A run that fails is left in the list as discarded, and the next step starts from the last accepted model.

Some steps run only inside Auto refine, and only when their condition is met:

Several phases: all together or one after the other

With all together (the default) each step releases its parameters for every phase at once: one run per step.

With one after the other, in this order, the background and every scale are refined first; then the first phase goes through lattice, profile, atomic coordinates and Uiso, then the second phase, and so on. Peak shape terms that belong to no phase go with the first phase; extra background terms and texture come after the last phase. Each run is judged by the same rules, and what was accepted stays released for the later runs. Put the main phase first. It takes about as many times longer as there are fully refined phases, and it is steadier when a minor phase is weak or its peaks overlap the main phase.

amount only on a phase refines only its scale (its cell, size and atoms stay as in the CIF): useful for a minor phase or an internal standard you trust.

Adding or removing a phase later

Changing the phase list makes a new project. When an earlier project of the same pattern has a refined model, the tool offers Keep the refined model or Start from the CIFs. Keeping it carries over every refined value of the phases both lists have (cell, scale, size, strain, texture, atoms, site models) and the instrument values; a new phase starts from its CIF with a small scale. Auto refine then continues from that model instead of starting over.

5. The run list

Every refinement, automatic or by hand, is a numbered run in the middle column, with its Rwp, χ², GOF and number of parameters, and a mark: accepted or discarded. The current model is the last accepted run.

The run list. Any run can be viewed, and the model can be rolled back to before it.The run list. Any run can be viewed, and the model can be rolled back to before it.
Figure 6. The run list. Any run can be viewed, and the model can be rolled back to before it.

View shows that run's fit; Roll back to before returns the model to the state before that run. Undo takes back the last run; Restart starts again from the CIFs. Nothing is lost by trying.

6. Judge the fit

Judge in this order:

  1. The difference curve (observed minus calculated, under the plot). It should look like noise around zero. A peak-shaped wiggle points at its cause by its shape: a sharp up-and-down at a peak means the position or width is off; a bump where no tick mark stands means a missing phase; peaks of one family all too strong or too weak suggest texture.
  2. Rwp against the lowest possible Rwp. Rwp is the weighted misfit in per cent; the lowest possible Rwp (often written Rexp) is the misfit that pure counting noise would leave. They should be close. On the sample: 7.68 % against about 7.3 %.
  3. GOF, their ratio (χ² is its square). Near 1 means the remaining misfit is noise. Clearly above 2 means the model still misses something.
Rwp, the lowest possible Rwp, χ² and GOF of the current model.Rwp, the lowest possible Rwp, χ² and GOF of the current model.
Figure 7. Rwp, the lowest possible Rwp, χ² and GOF of the current model.

Rwp alone says little: a pattern with few counts gives a high Rwp for a perfect model, and a pattern with a huge background gives a low Rwp for a poor one. That is why the tool always shows it next to the lowest possible Rwp.

When Rwp is 10 % or more, or GOF 2 or more, Results adds a diagnosis in words: which part of the misfit is largest (background, peaks of no phase, intensities, positions or peak shape) and what usually causes it. Explain this result reads the numbers on screen to you in plain language. If Rwp still will not go down, Ask for a free review sends the refinement to us; the answer comes to your messages and by e-mail.

7. Settings for special samples

Auto refine covers most powders. The settings below are for the samples that need more. They are in Step by step (the step they belong to) and in Expert, and every later run obeys them, Auto refine included.

Peak position correction

Zero shift (instrument) moves every peak by the same angle: transmission or capillary data, or a zero calibrated on a standard. Sample displacement (specimen height, Bragg-Brentano) is the usual error of laboratory reflection data, a shift that changes with angle. The two are strongly correlated, so one is refined.

Background

Background terms sets the Chebyshev terms (12 by default): raise it to 16 to 24 for an amorphous hump or a curved low-angle background, lower it for a short, clean pattern. Edit by hand lets you click anchor points under the pattern: Keep exactly as drawn, or let 4 Chebyshev terms fine-tune it. Back to automatic returns to the polynomial.

Texture (preferred orientation)

Texture is off unless you ask for it, because a texture model fitted to a random powder absorbs a peak-shape error and gives wrong amounts. Switch it on for plates or needles that lie flat in the holder, for pressed pellets, sheets and foils. In the profile step, Preferred orientation has a model per phase:

The result gives the Texture J index of spherical harmonics: 1 means random, above 1.5 strong texture.

Crystallite size and microstrain models

When peak widths depend on direction (a layered compound: 00l broad, hk0 sharp), one size and one microstrain cannot follow them. Peak broadening gives each phase a model:

Cubic phases have no uniaxial choice. The chosen model is tried by the next run that refines that phase's size or microstrain; Auto refine never changes a model you chose.

The profile step: a texture model and a size and microstrain model for each phase.The profile step: a texture model and a size and microstrain model for each phase.
Figure 8. The profile step: a texture model and a size and microstrain model for each phase.

Dopants, cation mixing and vacancies (site models)

A doped or non-stoichiometric compound has the structure of its parent with different atoms, or fewer, on some sites. In the atomic coordinates step, Site models adds one refined value per model:

Tick the new value to refine it. The result states the refined composition, with its uncertainty, and warns when a value sits at its limit or is poorly determined. Site models need a settled profile: add them after the profile step. Auto refine never adds one by itself.

Site models in the atomic coordinates step: the Dopant form open for anatase.Site models in the atomic coordinates step: the Dopant form open for anatase.
Figure 9. Site models in the atomic coordinates step: the Dopant form open for anatase.

Expert: every parameter, fixed values, ranges and formulas

Expert is one table of every parameter GSAS-II can refine on this project: instrument and sample (zero, displacement, U V W X Y, asymmetry), every background term, and per phase the scale, each cell parameter, size, microstrain, texture, each site model, and x, y, z and Uiso of each atom. Tick what to refine and press Run selected; then Accept keeps the result, Discard leaves the model as it was.

Expert mode: the parameters of each group with their values; tick to refine, type a value or press the pin to fix.Expert mode: the parameters of each group with their values; tick to refine, type a value or press the pin to fix.
Figure 10. Expert mode: the parameters of each group with their values; tick to refine, type a value or press the pin to fix.

When you fixed or typed values that the accepted model does not have yet, Auto refine starts with a run "Values fixed by you" and judges every later step against the model with your values.

Known composition and amorphous content

Known composition (at the top of Expert) is for a weighed mixture: type the amount of each phase you know, Weight or Moles (with the formula one mole stands for), and every run keeps that ratio while the other phases stay free. It needs a first accepted run.

Known composition opened in Expert, and the Ranges boxes under each parameter.Known composition opened in Expert, and the Ranges boxes under each parameter.
Figure 11. Known composition opened in Expert, and the Ranges boxes under each parameter.

Amorphous content (in Results) uses an internal standard: pick the Phase of known weight, type Its weight in the sample and press Calculate. The other phases are scaled to it, and what is missing from 100 % is amorphous or unidentified. Once a standard is set, Auto refine also refuses a step that would make that amorphous content negative.

8. Read the results

The verdict and numbers under Results.The verdict and numbers under Results.
Figure 12. The verdict and numbers under Results.

Under Results, each phase has a card with its weight fraction, cell, preferred-orientation factor, crystallite size and microstrain; then come the distances, bond lengths and angles.

Refined phases of the sample: anatase 64.86 ± 0.09 wt %, rutile 35.14 ± 0.09 wt %, with their cells.Refined phases of the sample: anatase 64.86 ± 0.09 wt %, rutile 35.14 ± 0.09 wt %, with their cells.
Figure 13. Refined phases of the sample: anatase 64.86 ± 0.09 wt %, rutile 35.14 ± 0.09 wt %, with their cells.

9. Export

Export: tick the files and press Export selected.Export: tick the files and press Export selected.
Figure 14. Export: tick the files and press Export selected.

Under Export, tick what you need and press Export selected:

Open in Plot turns the fit into a journal-ready figure for free. From Plot, Open in Origin (.slplot) gives a file that you drag into Origin (2021 or later, with the free ScienLytic app for Origin installed): Origin draws the same figure as an ordinary, fully editable Origin graph with its workbook, almost identical to the one in Plot.

Exports belong to the run being viewed, so you can also export an earlier run. On your own data the fit, Rwp, GOF and the fit plot are always free; the refined numbers and the files are unlocked per dataset. The sample is always unlocked.

10. Step by step

Step by step runs the same nine parts one at a time, with what each does, what a good result looks like and what to do if it is not. You choose what to release in each step, then Accept or Discard the run; Accept, stay here keeps it and lets you release more in the same step. All together or One at a time decides whether a step refines every phase at once or one phase per run. Use it to learn, or when Auto refine discards a step you want to understand.

Common mistakes

  1. Too many phases at once. Five candidate phases, two of them far below 1 wt %, make an unstable refinement. Start with the main phase, add one phase at a time, and keep it only if Rwp drops clearly and its peaks are visible in the difference curve.
  2. Fitting the whole measured range. The direct-beam slope at low angle and a noisy high-angle tail add nothing but time. Set the fitting range to where the peaks are.
  3. Refining atoms on weak data. On a weak or noisy pattern, atom positions and Uiso cannot be determined; leave them out in the Auto refine dialog.
  4. A wrong radiation or polarization. A Kα1-only instrument fitted as Kα1+2 (or the reverse) gives doubled or missing shoulders on every peak; synchrotron data refined with a tube's polarization gives wrong Uiso and occupancies.
  5. Texture on a random powder. It lowers Rwp a little and moves the amounts. Use it only for plates, needles, pellets, sheets and foils.
  6. Uploading processed data. A smoothed or background-subtracted pattern makes Rwp, GOF and the amounts unreliable. Upload the file the diffractometer wrote.
  7. Reading the weight fractions as absolute. They are fractions of the crystalline phases in the model. An amorphous part or a missing phase changes the real amounts without changing these; use an internal standard.

Try it

Open the XRD tool with the sample

In a hurry? The quick start covers the same flow in five steps.