First principles calculations of magnetism and structural properties of transition metals and rare earths systems.