Electronic Structure Calculations for Solids and Molecules: Theory and Computational Methods