Effects of nuclear structure in the spin-dependent scattering of weakly interacting massive particles