Ab-initio calculations of the covalent-ionic curve crossing in LiF