First-principles study of the electronic, magnetic, and crystal structure of perovskite molybdates