Preparation and structural analysis of materials