The knowledge of the binding energy of molecules on astrophysically relevant ices can help to obtain an estimate of the desorption rate, i.e. the molecules residence time on the surface. This represents an important parameter for astrochemical models, and it is crucial to determine the chemical fate of interstellar complex organic molecules formed on the surface of dust grains and observed in the densest regions of the interstellar medium through rich rotational lines. In this work, we propose a new robust procedure to study the interaction of atoms and molecules with interstellar ices, based on ab initio molecular dynamics and density functional theory, validated by high-level ab initio methods at a CCSD(T)/CBS level. We have applied this procedure to a simple but astronomically relevant molecule, hydrogen fluoride (HF), a promising tracer of the molecular content of galaxies. In total we found 13 unique equilibrium structures of HF binding to small water clusters of up to 4 molecules, with binding energies ranging from 1208 K to 7162 K (2.40 to 14.23 kcal mol−1). We computed a 22-molecules model of amorphous solid water (ASW) surface using ab initio molecular dynamics simulations and carried out a systematic analysis of the binding sites of HF, in terms of binding modes and binding energies. Considering 10 different water clusters configurations, we found a binding energy distribution with an average value of 5313±74 K, and a dispersion of 921±115 K (10.56±0.15 kcal mol−1), and a dispersion of 921±115 K (1.83±0.23 kcal mol−1). Finally, the effect of the electrostatic field of the 22 water molecules on the binding energies was investigated incrementally by symmetry adapted perturbation theory, in order to gauge the effect of the water environment on the binding energies. The results indicate that the extent of the electrostatic interaction of HF with ASW depends strongly on the properties of the binding site on the water cluster. We expect that this work will provide a solid foundation for a systematic development of a binding energy distribution database of small molecules on astrophysically relevant surfaces.