Dynamic simulations of stimuli-responsive switching of azobenzene derivatives in self-assembled monolayers: reactive rotation potential and switching functions