Application of first-principles calculations to the design of rechargeable Li-batteries