ReX: a computer program for structural analysis using powder diffraction data