Density-functional-theory approach to the Hamiltonian adaptive resolution simulation method