Analysis of the crystalline structure of materials