In [1]:
# Set up some imports that we will need
from pymatgen import Lattice, Structure
from pymatgen.analysis.diffraction.xrd import XRDCalculator
from IPython.display import Image, display
%matplotlib inline
In [2]:
# Create CsCl structure
a = 4.209 #Angstrom
latt = Lattice.cubic(a)
structure = Structure(latt, ["Cs", "Cl"], [[0, 0, 0], [0.5, 0.5, 0.5]])
c = XRDCalculator()
c.show_xrd_plot(structure)
Compare it with the experimental XRD pattern below.
In [3]:
display(Image(filename=('./PDF - alpha CsCl.png')))
In [4]:
# Create CsCl structure
a = 6.923 #Angstrom
latt = Lattice.cubic(a)
structure = Structure(latt, ["Cs", "Cs", "Cs", "Cs", "Cl", "Cl", "Cl", "Cl"],
[[0, 0, 0], [0.5, 0.5, 0], [0, 0.5, 0.5], [0.5, 0, 0.5],
[0.5, 0.5, 0.5], [0, 0, 0.5], [0, 0.5, 0], [0.5, 0, 0]])
c.show_xrd_plot(structure)
Compare it with the experimental XRD pattern below.
In [5]:
display(Image(filename=('./PDF - beta CsCl.png')))