It is worthwhile to explore the detailed reaction dynamics of various candidates for molecular switches, in order to understand, e.g., the differences in quantum yields and switching times.Here we report density-functional-based simulations for the rhodopsin-based molecule 4-[4methylbenzylidene]-5-p-tolyl-3,4-dihydro-2H-pyrrole (MDP), synthesized by Sampedro et al We find that the photoisomerization quantum yields are remarkably high: 82% for cis-to-trans, and 68% for trans-to-cis. The lifetimes of the S 1 excited state in cis-MDP in our calculations are in the range of 900-1800 fs, with a mean value of 1270 fs, while the range of times required for full cis-to-trans isomerization are 1100-2000 fs, with a mean value of 1530 fs. In trans-MDP, the calculated S 1 excited state lifetimes are 860-2140 fs, with a mean value of 1330 fs, and with the full trans-to-cis isomerization completed about 200 fs later. In both cases, the dominant reaction mechanism is rotation around the central C=C bond (connected to the pyrroline ring), and de-excitation occurs at an avoided crossing between the ground state and the lowest singlet state, near the midpoint of the rotational pathway. Perhaps remarkably, but apparently because of electrostatic repulsion, the direction of rotation is the same for both reactions.