Electronic structure of ternary rhodium hydrides with lithium and magnesium.