The transfer Hamiltonian: a tool for large scale simulations with quantum mechanical forces