Generalization of the Dirac equation from Minkowski space to a general Lorentzian manifold with spin structure