Ab initio-based approach to structural change of compound semiconductor surfaces during MBE growth