First Principles Modelling of Shape Memory Alloys