# Lattice in real space & reciprocal lattice, x ray diffraction

# Instructions

**1) What does the applet show?**

The applet shows a custom crystal structure in 2 dimensions and its reciprocal counterpart, the reciprocal lattice. The crystal structure is shown on the left hand side and consists of a Bravais lattice and a basis of certain atoms. The reciprocal lattice is shown on the right (+ signs).

In x-ray diffraction, the diffraction pattern only has spots on points of the reciprocal lattice, and their intensity shows a certain variation due to the basis, as described by the structure factor. The intensities can be shown as well.**2) How to use the applet?**

The view on the crystal structure and the reciprocal lattice can be zoomed by clicking the + and - buttons.

The adjustments are grouped into 3 sections:

- Bravais lattice

- Basis

- Additional Options

Concerning the Bravais lattice, one can adjust the lattice vectors a1 and a2 in Cartesian coordinates, where

a1 = (v1x, v1y), a2 = (v2x, v2y),

and in polar coordinates, where

a1 = r1 * (cos(phi1), sin(phi1)), a2 = r2 * (cos(phi2), sin(phi2))

Each of the possibilities has its advantages or disadvantages, so choose the possibility that fits your lattice best.

When adjusting the values of each variable, you can either use the given slider, or type in the desired value directly into the text field. Remember to confirm your change by pressing "Enter" when typing your value. Note that the structure may change slightly upon changing from Cartesian to polar coordinates. This reflects that the variables are fixed to the displayed values, the angle phi for instance only takes integer values here.

The basis of the lattice can be customized in the upper mid box. The box shows a current view of your basis, i.e. all atoms of the basis. Both the size and the color represent the number of electrons per atom.

By selecting one of the atoms, you get additional information on this specific atom. The information panel shows:

1) The internal number of the atom inside the basis.

2) The number of electrons which here corresponds to the diffraction intensity.

When having selected an atom, you can change:

1) The number of electrons, using the slider or the text field (as described for the lattice vectors)

2) The position inside the basis by just dragging the atom wherever you want.

3) Remove the atom by clicking "Remove Atom".

4) The phonon frequency, which is relevant fot he Debye-Waller factor.

Furthermore you can add a new atom to the basis by pressing "Add Atom".

"Additional Options" is a collection of options, that don't directly belong to "Bravais lattice" or "Basis".

1) The first box lets you select default lattices, which are directly loaded and displayed

2) "Bravais lattice" / "Reciprocal lattice" turns on/off the visualization of lattice points, lattice vectors, and cells.

3) "Intensity & Structure factor" turns on/off the visualization of the reciprocal lattice intensities using the structure factor

4) "Atomic Structure factor" visualizes the effect of the fact that atoms are no points but have a finite size. The calculation is based on a simple Gaussian shape.

5) "Logarithmic scale" enables/disables the use of a logarithmic scale to display the diffraction intensity

6) "Primitive Cell" / "Wigner-Seitz Cell" turns on/off the visualization of the stated cells of the lattice

7) "1st / 2nd Brillouin Zone" turns on/off the visualization of the 1st/2nd Brillouin zone in the reciprocal lattice

8) "Debye-Waller factor" enables/disables the fluctuation of the atoms at a given temperature T, adjustable below, changing the diffraction intensities of the reciprocal lattice dots. The calculation requires knowledge of the mass (which the applet derives from the electron number) and the phonon frequency, which can be adjusted in the top panel.

If one selects a point of the reciprocal lattice with the mouse, the Miller indices of that point and the structure factor are given at the bottom.