Computer simulations allow materials scientists to predict experimental measurements and create new and more accurate models. One exciting and challenging area of computational materials science is the study of dislocations (line defects) in metals with "first principles" methods that accurately model atomic bonding in materials. Studying dislocations at the atomic scale reveals the complex effects of chemical bonding in the defect structure. This gives rise to several interesting phenomena: surprisingly strong interactions of solutes with dislocations in magnesium, and redistribution of hydrogen in palladium as well as changes to the vibrational spectra for hydrogen. These atomic-scale phenomena can be connected to larger scale material behavior, such as the strength of real magnesium alloys, or the formation of stable nanoscale hydride phases in regions of the phase diagram where they should not exist.