Modelling the growth of transition metal nitrides