Problem Solving with the TOPAS Macro Language: Corrections and Constraints in Simulated Annealing and Rietveld Refinement


Article Preview

The TOPAS macro language can be a powerful tool for increasing the capabilities of X-ray powder diffraction analysis. New corrections and constraints can be implemented without altering the program's code, allowing for experimentation with new ideas and approaches. Examples are given, exposing the power and flexibility of the macro language to help solving problems with a few lines of code. The use of simulated annealing for structure solution of an organic material from data exhibiting preferential orientation is one example. Another one is about extraction of useful structural information in Rietveld refinement of natural hydrotalcite-group minerals, a problematic case that would normally be regarded as over-parameterized for the data available.



Edited by:

Paolo Scardi and Robert E. Dinnebier




P. S. Whitfield et al., "Problem Solving with the TOPAS Macro Language: Corrections and Constraints in Simulated Annealing and Rietveld Refinement", Materials Science Forum, Vol. 651, pp. 11-25, 2010

Online since:

May 2010




[1] Bruker-AXS, DIFFRACPlus TOPAS: TOPAS 4. 2 User Manual, Bruker-AXS GmbH, Karlsruhe, Germany (2008).

[2] Bruker-AXS, DIFFRACPlus TOPAS: TOPAS 4. 2 Technical Reference, Bruker-AXS GmbH, Karlsruhe, Germany (2008).

[3] G.W. Stinton and J.S.O. Evans: J. Appl. Crystallogr. Vol. 40 (2007), pp.87-95.

[4] K.H. Stone, S.H. Lapidus and P.W. Stephens: J. Appl. Crystallogr. Vol. 42 (2009), p.385391.

[5] W.A. Dollase: J. Appl. Crystallogr. Vol. 19 (1986), pp.267-272.

[6] M. Järvinen: J. Appl. Crystallogr. Vol. 26 (1993), pp.525-531.

[7] V. Favre-Nicolin and R. Cerný: J. Appl. Crystallogr. Vol. 35 (2002), pp.734-743.

[8] Y. Filinchuk, A.V. Talyzin, D. Chernyshov and V. Dmitriev: Phys. Rev. B Vol. 76 (2007), pp.092104-4.

[9] M. Husak, A. Jegorov, J. Brus, W. van Beek, P. Pattison, M. Christensen, V. Favre-Nicolin and J. Maixner: Structural Chemistry Vol. 19 (2008), pp.517-525.


[10] P.S. Whitfield, Y. Le Page, A. Abouimrane and I.J. Davidson: Powder Diffr. Vol. 23 (2008), pp.292-299.

[11] P.S. Whitfield: J. Appl. Crystallogr. Vol. 42 (2009), pp.134-136.

[12] P.Y. Zavalij and M.S. Whittingham: Rigaku Journal Vol. 21 (2004), pp.2-14.

[13] Y. Ohashi: Physics and Chemistry of Minerals Vol. 10 (1984), pp.217-229.

[14] C.J. Brown: Acta Cryst. Vol. 7 (1954), pp.92-96.

[15] T.M. Sabine, B.A. Hunter, W.R. Sabine and C.J. Ball: J. Appl. Crystallogr. Vol. 31 (1998), pp.47-51.

[16] H.P. Klug and L.E. Alexander: X-ray diffraction procedures for polycrystalline and amorphous materials, (Wiley, New York 1974).

[17] L.B. McCusker, R.B. Von Dreele, D.E. Cox, D. Louer and P. Scardi: J. Appl. Crystallogr. Vol. 32 (1999), pp.36-50.


[18] J. -M. Joubert, R. Cerný, M. Latroche, A. Percheron-Guégan and K. Yvon: J. Appl. Crystallogr. Vol. 31 (1998), pp.327-332.

[19] P.S. Whitfield, I.J. Davidson, L.M.D. Cranswick, I.P. Swainson and P.W. Stephens: Solid State Ionics Vol. 176 (2005), pp.463-471.

[20] P.S. Whitfield, I.J. Davidson, P.W. Stephens, L.M.D. Cranswick and I.P. Swainson: Zeitschrift für Kristallographie Supplement Vol. 26 (2007), pp.483-488.

[21] L.D. Ashwal and B. Cairncross: Contributions to Mineralogy and Petrology Vol. 127 (1997), pp.75-86.

[22] S.J. Mills, P.S. Whitfield, S.A. Wilson, J.A. Woodhouse, G.M. Dipple, M. Raudsepp and C.A. Francis, submitted to American Mineralogist.

[23] P.S. Whitfield, S. Niketic, Y. Le Page and I.J. Davidson: Advances in X-Ray Analysis Vol. 49 (2005), pp.149-155.