Crystallography, branch of science that deals with discerning the arrangement and bonding of atoms in crystalline solids and with the geometric structure of crystal lattices. Classically, the optical properties of crystals were of value in mineralogy and chemistry for the identification of substances. Modern crystallography is largely based on the analysis of the diffraction of X-rays by crystals acting as optical gratings. Using X-ray crystallography, chemists are able to determine the internal structures and bonding arrangements of minerals and molecules, including the structures of large complex molecules, such as proteins and DNA.