Diffraction of X-rays by chain molecules