First principles modeling of magnetic random access memory devices (invited)