x ray diffraction code