Solid state nuclear magnetic resonance and materials modelling of functional materials