Reaction coordinate method for quantum tunneling