Simulations of spiral galaxies with an active potential: molecular cloud formation and gas dynamics