I was wondering for some time why in some cases x-ray crystallography and not NMR is used for structure determination of small molecules? Does crystallization maybe require a smaller amount of the compound than NMR?
Our group uses both methods a lot so here are some examples why you would use X-ray, in addition to NMR, in organic synthesis.
Your compound isn't soluble enough:
Colleagues produce very large aromatic systems for organic electronics which are basically insoluble in all solvents. With a good NMR machine (600MHz and up) it might still be enough to get spectra, but full structure elucidation might be difficult. Since the compounds crystallize well it's quite easy to get a X-ray structure.
Low number of carbon and hydrogen:
I've produced compounds with a C:H:N ratio of 2:3:5. The 1H is two singlets, the 13C is two signals. COSY, HSQC, HMBC,... won't tell you much either and it's much easier to use the nice crystals and get a structure that way than trying some correlated NMR experiments including nitrogen.
Imagine this compound which is quite similar to something we produced:
Since you got two quaternary centers here it's really hard to tell the configuration on those centers relative to each other using NMR. There's no coupling to determine the stereochemistry and a NOE experiment isn't very conclusive here. With X-Ray it's no problem to find out.
Actually, these problems are definitely the ones we use X-ray the most.
Theoretically it's also possible to determine absolute configuration with single crystal X-ray diffraction, while it's extremely hard to do, if not impossible, with NMR.
Single crystal X-ray diffraction gives you the configuration of your molecule, including relative configuration of stereocenters and possibly even absolute configuration, right away. If you only care about configuration (and not behaviour in solution) X-ray is definitely superior to NMR, there's basically no question on how your molecule looks.
On the other hand you need crystals and it's much more complicated to perform than NMR, so this definitely stays the number 1 method for synthetic chemists.
Coming from natural product chemistry, of course the structure elucidation by NMR is the most commonly used method, especially in isolation. NMR requires only a little substance dissolved in whichever deuterated solvent you have on your shelf and is rapidly set up. The only downside is that for very small amounts of sample you will be blocking the strongest NMR your institute has for extended amounts of time to record all the required experiments. X-ray structures on the other hand requires crystals, and those isolating natural products don’t want to trial and error forever hoping for them.
The strongest disadvantage of NMR is that there is no direct way to determine absolute stereochemistry and only a limited number of methods to determine relative stereochemistry. Often, Mosher ester experiments will be performed but they do consume a non-neglegible amount of substance that could otherwise be used for bioactivity tests etc. If the natural products contains carbohydrate side chains, figuring out which one will be immensely difficult by NMR alone.
On the (total) synthetic side of natural products chemistry, each intermediate is of course subjected to an NMR structure analysis. This is okay because stereochemistry is typically only built up in a few steps with known stereochemical outcome and an optical activity is often taken as a good enough indicator that the chirality turned out as expected. Most reactions won’t touch distal chiral centres and if they do one will arrive at a mixture of diastereomers which can easily be detected by NMR. So by taking this route, one can also confirm to a certain extent the structure of the synthesised natural product.
However, NMR is often ambiguous and sometimes error-prone. In my previous group and all through the literature I have often witnessed structure corrections following total synthesis. Maybe the original NMR analysis of the natural product gave a wrong diastereomer, maybe the enantiomer was incorrect and sometimes not even the connectivity was as proposed. Thus, one must always take proposed structures with a grain of salt until the structure is proven.
The only thing able to definitely prove a structure is an X-ray crystal structure. You get the positions of atoms and can deduce the connectivity. There is no margin for error if you performed it correctly. Most notably, you get both the absolute and relative stereochemistry for all stereocentres. The only question remaining is whether a certain atom is carbon, nitrogen or oxygen, but even that can be refined well enough. Finally, if you have good enough crystals to collect the scattering at very large angles, you can even locate the positions of the hydrogen atoms.
Typically, all structure elucidation is tentative until there has been a crystal structure. This goes for both isolation and synthesis.