Atomistic and artificial intelligence simulations of grain boundaries and dislocations