Simulating Electronically Nonadiabatic Dynamics via the Generalized Quantum Master Equation