I remember that 20+ years ago we used a program called Powder Cell to calculate diffraction patterns from models of materials (for example, to compare it with experimental data from powder diffraction). I just fired this program up under wine and it still works:

Powder Cell screenshot

What are modern alternatives?

Note: this program takes description of a unit cell (atoms and unit cell parameters) and produces indexed pattern. This is different than using the Debye scattering formula to calculate diffraction pattern of any set of atoms, but without Miller indices.


3 Answers 3


Perhaps the easiest solution is to use VESTA, which can read in a CIF (and many other crystalline structure formats) and produce a powder diffraction pattern ("Utilities" > "Powder Diffraction Pattern"). Behind the scenes, VESTA is using RIETAN-FP to do the calculation, which has a standalone version to download if you wanted. enter image description here Another way you could do this, especially for those who have to do this for many structures and don't mind using Python, is with the xrd module in Pymatgen, which provides a bit more flexibility. This could be done as shown below:

import pymatgen as pm
from pymatgen.analysis.diffraction.xrd import XRDCalculator
p = '/path/to/my.cif' #path to CIF
structure = pm.Structure.from_file(p) #read in structure
xrd = XRDCalculator() #initiate XRD calculator (can specify various options here)
pattern = xrd.get_pattern(structure)
  • 3
    $\begingroup$ There's MAUD but who's gonna argue with a Python solution! $\endgroup$
    – uhoh
    Commented May 1, 2020 at 15:43

You are looking for the calculation of structure factor. Basically the X-Ray spectra could be calculated as Fourier transform of your crystal lattice and the Intensity ($I(\mathbf{q})$) could be estimated as:

$$I(\mathbf{q}) = f^{2} \sum_{i=1}^{N} \exp{(-i \mathbf{q} \cdot \mathbf{R}_{i})}$$

Basically, $\mathbf{q}$ is the scattering vector and the X-Ray spectra would be a 3D field in Fourier space but because you have other knowledge about your crystal structure, you could just plot $I$ versus $2\theta$ the angle of scattering vector and you would get your X-Ray spectra.

  • $\begingroup$ Take care that diffraction is not a spectroscopic technique (= anelastic interaction between radiation and matter). By diffraction (elastic interaction) you obtain a pattern, not a spectrum. Then, consider that a lattice is a regular array of geometrical points, whereas the crystal structure (producing the diffraction) is a convolution of a lattice with a motif (atom or a group of atoms). $\endgroup$
    – gryphys
    Commented Dec 12, 2022 at 10:43

You can also simulate powder diffraction patterns from a .CIF file, right on your Android smartphone using my app:

CrysX-Crystallographic Tools

It works best with .CIF files obtained from materialsproject.org.

enter image description hereenter image description hereenter image description here

Here is a YouTube tutorial: https://www.youtube.com/watch?v=lkCeZgS35b8

For further information on how the calculation is done, you can refer to my blog posts:

  1. https://www.bragitoff.com/2018/10/x-ray-diffraction-xrd-pattern-simulator-c-program-ver-2-tutorial/
  2. https://www.bragitoff.com/2018/10/atomic-form-factor-calculator-table/
  3. https://www.bragitoff.com/2018/10/structure-factor-calculator-c-program/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .