A Practical Method of Simulating X-Ray Diffraction.