Crystallography is a technique that characterizes the chemical structure of materials at the atomic level by analyzing the diffraction patterns of electromagnetic radiation or particles that have been deflected by atoms in the material. X-rays are most commonly used. From the raw data, the relative placement of atoms in space may be determined.