Calculating the spin memory loss at Cu$|$metal interfaces from first principles