Why are X rays in X ray crystallography diffracted by the electron clouds rather than nuclei? I am considering the nuclei as solid particles and the electrons as waves creating clouds of electron density around the nuclei. Thinking of it like this, I can't see how X rays are diffracted by the electron clouds and not nuclei. Perhaps I am thinking about this wrong and the wave-like nature of the nucleus comes into play here?
EDIT: I had an idea, but I am not sure it is correct at all. To be honest I haven't yet thought about what it means for any of these quantum particles to be a 'barrier' to the X-rays, which is probably the starting point. I'm I correct in thinking that a region acts as a 'gap' if it doesn't interact significantly with the X--rays, and a region can be thought of as a barrier if it does, e.g. by repeated absorption of X-rays and emission in different direction etc.
I did a quick calculation using some random values for nuclear energy levels and electron energy levels (not sure what elements/isotopes I was looking at, but I don't think it really matters here) and I got that the greatest energy gap for a nuclear energy level (between n=1 and n=2) was about 7x10(-13)J whereas X-ray energy is about 5x10(-15)J, and electron energy level is on the order of 10(-15)J (again looking at the greatest energy gap transition n=1 to n=2). Perhaps the X-rays are diffracted around the electron density because the electrons interact with the X-rays but the interaction of X-rays with nuclei is minimal because of their different energy levels, so it is the elctrons that act as the barrier and the X-rays generally pass trhough the nuclei without interaction?
 A: Contemplate the difference in "size" of electron orbitals to the nucleus that is contained in the center:
Atomic sizes are on the order of 0.1 nm = 1 Angstrom = 10^-10 m
Nuclear sizes are on the order of femtometers which in the nuclear context are usually called fermis:
1 fm = 10^-15m
These go with the corresponding order of magnitude of energies: electron volts for electronic transitions , and Mega electron volts for nuclear transitions.
X-rays for crystallography are of the order of 10 keV, and it is the elastic scattering off the field of the lattice that identifies the location of atoms. In this sense the field an x-ray interacts with is a combination of the electric field of the orbitals of the electrons and the positive field of the nucleus,but that is orders of magnitude smaller than the field of the electron orbitals at the site of the orbitals. On a particle basis, the x-ray scatter elastically off an electron shell, as the electron orbitals shield the nucleus .
It is only with gamma energies that the nucleus can be approached, gamma wavelengths are small enough to penetrate without interacting with the electron orbitals and "see" the nucleus.
A: The nuclei are so much heavier. So they get accelerated much less than the electrons by the electric field of the x-rays. So they radiate much less, scatter much less. The relevant cross section for electron scattering is related to the Compton wavelength of the electron, given by the Bohr radius times the fine-structure constant, $\approx a_0/137$.
In some cases there is a strong nuclear resonance in the x-ray region, for example the 14.4 keV Mössbauer transition in Fe-57. Experiments have been done to get coherent scattering from this nucleus.
http://journals.aps.org/prl/abstract/10.1103/PhysRevLett.54.835
A: I agree with Pieter (but I do not have enough reputation to comment yet). And as pointed out by Physicist137, they actually scatter elastically both to electrons and nuclei. (see this paper on scattering of photons on nuclei, wherein a 4-th power relationship between cross-section is demonstrated, similar to Rayleigh scattering).
However, Rayleigh scattering (in general: elastic scattering of a photon to a much smaller particle) depends on the polarizability of the particle the photon interacts with, which is in this case essentially what Pieter says.
I would like to add two remarks


*

*Although Rayleigh scattering has this 4-th power relationship with energy photon energies may be not that important to describe the (elastic scattering) phenomenon, as you seem to assume. All energy-related phenomena where 'similar energies' are supposed have inelastic scattering/absorption underlying: from NMR, EPR (magnetic spin flips, which have an energy respectively in the radio/microwave range) over absorption of visible light (in the eV) spectrum to interactions in the keV range (e.g. XPS, XRF). When the light is not absorbed, it will scatter. So according to me, energy levels have nothing to do with this.

*The actual reason why X-rays can be used for XRD is that these have a wavelength similar to the spacing between atoms (or, to be more specific between the spacing between regions with equal electron density). While visible light or UV also undergo elastic scattering, their wavelenghth is much larger and destructive/constructive interference between different sources (which is what XRD relies on) will not happen.


I'm not an expert in this subject, just tried to contribute, so I'd like to hear your comments.
