X-ray studies of molecular structure during the crystallisation of organic salts