The chemical Hamiltonian approach in density functional theory