Effective and intermediate Hamiltonians obtained by similarity transformations