Electronic Structure and Magnetism of Inorganic Compounds