The diffraction of X-rays and electrons by free molecules