# Crystallography

An narrow beam of x-rays arrives at a lattice of crystals, is diffracted, and the resulting beams captured on film.

The film has diffraction spots, or reflections, and these are of different intensities.

The crystal is rotated multiple times and a new film is captured.

Each reflection has a position hkl, and intensity, Ihkl.

A structure factor is Fhkl, it describes a wave with amplitude, frequency and phase.

Intensity is related to F squared.

A 3D protein structure model is created using knowledge about the existing residues and structure of the protein. It is refined until it fits the observed reflections. It will not be perfect due to imperfect crystals, water, and movement/vibration of atoms within the structure.

## R-factor

A structure factor (F) describes the reflection from a plane. It is the amplitude and phase of the x-rays in a reflection. ref Structure Factors and Electron Density

R-factor is used to calculate the difference between the model structure factors and observed structure factors.

From a model (PDB structure), the scattering pattern can be calculated, this is compared with the observed scattering pattern. This is done for all planes, and a R factor is calculated.

$$R = \frac{\sum{||F_{observed}|-|F_{model}||}}{\sum{|F_{observed}|}}$$

Lower R values are better, 0.20 is good.

The model starts off rough (0.4), and is refined until a low enough R-factor is found.

R value can be gamed by omitting experimental data, adding water to the model, or adding local structural disorder.

R-free is similar to R-factor, but only a test set, e.g. a 90% subset, is used in refinement. The remaining 10% is used for calculating the R-free value. This helps prevent overfitting.

More at Looking at Structures: R-value and R-free at the PDB.

$$n\lambda = 2d\sin\theta$$