The structure of beryllium chloride in the solid state and vapour