We derive a Bohmian trajectory-based quantum dynamics approach for the calculation of adiabatic and nonadiabatic quantum effects in ab initio on-the-fly molecular dynamics simulations. The method is designed for calculations in the full, unconstrained, phase space of molecular systems described within density functional theory and time-dependent density functional theory. The problem of solving quantum hydrodynamic equations using trajectories in high dimensions is addressed using an expansion of the nuclear amplitude in atom centered Gaussians that are propagated along the quantum trajectories. In this work, we investigate the adiabatic limit of this theory, even though the full nonadiabatic case is derived. The method is first tested on the H-2 molecule and then applied to the study of the proton transfer dynamics in the phase space of the molecular complex (H3N-H-NH3)(+). DOI: 10.1103/PhysRevA.87.042501