Rovibrational Hamiltonian for molecular complexes